From nobody Mon Nov 15 00:32:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4FEA0184D6AA; Mon, 15 Nov 2021 00:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hsqs71ftSz4kgt; Mon, 15 Nov 2021 00:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18D6B105BF; Mon, 15 Nov 2021 00:32: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 1AF0WRRT027159; Mon, 15 Nov 2021 00:32:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AF0WRSS027158; Mon, 15 Nov 2021 00:32:27 GMT (envelope-from git) Date: Mon, 15 Nov 2021 00:32:27 GMT Message-Id: <202111150032.1AF0WRSS027158@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: 0864ab3d3235 - main - procstat auxv: print out FXRNG List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0864ab3d3235f22c45f3790b2eb94974a51af062 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0864ab3d3235f22c45f3790b2eb94974a51af062 commit 0864ab3d3235f22c45f3790b2eb94974a51af062 Author: Konstantin Belousov AuthorDate: 2021-11-13 20:55:52 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-15 00:32:00 +0000 procstat auxv: print out FXRNG Sponsored by: The FreeBSD Foundation MFC after: 1 week --- usr.bin/procstat/procstat_auxv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.bin/procstat/procstat_auxv.c b/usr.bin/procstat/procstat_auxv.c index 0b540de973de..f868b7ed2381 100644 --- a/usr.bin/procstat/procstat_auxv.c +++ b/usr.bin/procstat/procstat_auxv.c @@ -233,6 +233,12 @@ procstat_auxv(struct procstat *procstat, struct kinfo_proc *kipp) xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_PS_STRINGS/%p}\n", prefix, "AT_PS_STRINGS", auxv[i].a_un.a_ptr); break; +#endif +#ifdef AT_FXRNG + case AT_FXRNG: + xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_FXRNG/%p}\n", + prefix, "AT_FXRNG", auxv[i].a_un.a_ptr); + break; #endif default: xo_emit("{dw:/%s}{Lw:/%16ld/%ld}{:UNKNOWN/%#lx}\n", From nobody Mon Nov 15 00:33:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 559DC184DC9F; Mon, 15 Nov 2021 00:33: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 4Hsqt3200Tz4kwH; Mon, 15 Nov 2021 00:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2503E105C2; Mon, 15 Nov 2021 00:33: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 1AF0XFO3028235; Mon, 15 Nov 2021 00:33:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AF0XFS1028234; Mon, 15 Nov 2021 00:33:15 GMT (envelope-from git) Date: Mon, 15 Nov 2021 00:33:15 GMT Message-Id: <202111150033.1AF0XFS1028234@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: 8660813153d0 - main - start_init: use 'p' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8660813153d02e9e681ae083edc7f1d574cb62ca Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8660813153d02e9e681ae083edc7f1d574cb62ca commit 8660813153d02e9e681ae083edc7f1d574cb62ca Author: Konstantin Belousov AuthorDate: 2021-11-14 20:47:59 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-15 00:33:01 +0000 start_init: use 'p' Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/kern/init_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index fde07dcbf46d..c43bfa407241 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -773,7 +773,7 @@ start_init(void *dummy) */ KASSERT((td->td_pflags & TDP_EXECVMSPC) == 0, ("nested execve")); - oldvmspace = td->td_proc->p_vmspace; + oldvmspace = p->p_vmspace; error = kern_execve(td, &args, NULL, oldvmspace); KASSERT(error != 0, ("kern_execve returned success, not EJUSTRETURN")); From nobody Mon Nov 15 03:37:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6A687185BDFB; Mon, 15 Nov 2021 03:37:53 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher 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 "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hsvz50wl2z3tZP; Mon, 15 Nov 2021 03:37:53 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.16.1/8.16.1) with ESMTPS id 1AF3bjgM007379 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 14 Nov 2021 19:37:45 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.16.1/8.16.1/Submit) id 1AF3bjU1007378; Sun, 14 Nov 2021 19:37:45 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Sun, 14 Nov 2021 19:37:45 -0800 From: Gleb Smirnoff To: Emmanuel Vadot , Ian Lepore Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 44aae623ab85 - main - Add ETHER_ALIGN support to ng_device(4). Message-ID: References: <202111141239.1AECdLrA069026@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: <202111141239.1AECdLrA069026@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4Hsvz50wl2z3tZP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, On Sun, Nov 14, 2021 at 12:39:21PM +0000, Emmanuel Vadot wrote: E> Author: Ian Lepore E> AuthorDate: 2021-11-09 14:34:06 +0000 E> Commit: Emmanuel Vadot E> CommitDate: 2021-11-14 12:37:41 +0000 E> E> Add ETHER_ALIGN support to ng_device(4). E> E> This adds a new ng_device command, NGM_DEVICE_ETHERALIGN, which has no E> associated args. After the command arrives, the device begins adjusting all E> packets sent out its hook to have ETHER_ALIGN bytes of padding at the E> beginning of the packet. The ETHER_ALIGN padding is added only when E> running on an architecture that requires strict alignment of IP headers E> (based on the __NO_STRICT_ALIGNMENT macro, which is only #define'd on E> x86 as of this writing). E> E> This also adds ascii <-> binary command translation to ng_device, both for E> the existing NGM_DEVICE_GET_DEVNAME and the new ETHERALIGN command. E> E> This also gives a name to every ng_device node when it is constructed, using E> the cdev device name (ngd0, ngd1, etc). This makes it easier to address E> command msgs to the device using ngctl(8). Since early days of netgraph there were plans to make data link types on hooks. For example, for ng_ether or ng_eiface that would be hardcoded to Ethernet. Other more generic nodes like ng_socket or ng_device would be able to see peer's DLT and make their own decisions on that. Or even netgraph itself would be able to enforce alignment. Hopefully some day somebody will find time for that. P.S. Also very curios to hear how ng_device is used in practice. I always looked at it as at a test/experiment node type. -- Gleb Smirnoff From nobody Mon Nov 15 04:00:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5044418659E6; Mon, 15 Nov 2021 04:00: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 4HswTJ1jBcz4Twj; Mon, 15 Nov 2021 04:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1998612FAB; Mon, 15 Nov 2021 04:00: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 1AF40ZMR004531; Mon, 15 Nov 2021 04:00:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AF40ZNI004530; Mon, 15 Nov 2021 04:00:35 GMT (envelope-from git) Date: Mon, 15 Nov 2021 04:00:35 GMT Message-Id: <202111150400.1AF40ZNI004530@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 06f79675b7a0 - main - unionfs: fix potential deadlock in VOP_RMDIR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06f79675b7a0c8766c536dec686efba9e8447a73 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=06f79675b7a0c8766c536dec686efba9e8447a73 commit 06f79675b7a0c8766c536dec686efba9e8447a73 Author: Jason A. Harmening AuthorDate: 2021-11-14 07:28:29 +0000 Commit: Jason A. Harmening CommitDate: 2021-11-15 04:07:42 +0000 unionfs: fix potential deadlock in VOP_RMDIR VOP_RMDIR() is called with both parent and child directory vnodes locked. The relookup operation performed by the unionfs implementation may relock both vnodes. Accordingly, unionfs_relookup() drops the parent vnode lock, but the child vnode lock is never dropped. Although relookup() will very likely try to relock the child vnode which is already locked, in most cases this doesn't produce a deadlock because unionfs_lock() forces LK_CANRECURSE (!). However, relocking of the parent vnode while the child vnode remains locked effectively reverses the expected parent->child lock order, which can produce a deadlock e.g. in the presence of a concurrent unionfs_lookup() operation. Address the issue by dropping the child lock around the unionfs_relookup() call in unionfs_rmdir(). Reported by: pho Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D32986 --- sys/fs/unionfs/union_vnops.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index b6c088fb3804..81741dc19349 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -1434,11 +1434,23 @@ unionfs_rmdir(struct vop_rmdir_args *ap) ump = MOUNTTOUNIONFSMOUNT(ap->a_vp->v_mount); if (ump->um_whitemode == UNIONFS_WHITE_ALWAYS || lvp != NULLVP) cnp->cn_flags |= DOWHITEOUT; + /* + * The relookup path will need to relock the parent dvp and + * possibly the vp as well. Locking is expected to be done + * in parent->child order; drop the lock on vp to avoid LOR + * and potential recursion on vp's lock. + * vp is expected to remain referenced during VOP_RMDIR(), + * so vref/vrele should not be necessary here. + */ + VOP_UNLOCK(ap->a_vp); + VNPASS(vrefcnt(ap->a_vp) > 0, ap->a_vp); error = unionfs_relookup_for_delete(ap->a_dvp, cnp, td); + vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY); + if (error == 0 && VN_IS_DOOMED(uvp)) + error = ENOENT; if (error == 0) error = VOP_RMDIR(udvp, uvp, cnp); - } - else if (lvp != NULLVP) + } else if (lvp != NULLVP) error = unionfs_mkwhiteout(udvp, cnp, td, unp->un_path, unp->un_pathlen); From nobody Mon Nov 15 06:05:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 327701857CC8; Mon, 15 Nov 2021 06:05: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 4HszFx0twbz3Mcv; Mon, 15 Nov 2021 06:05:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F2B20149F0; Mon, 15 Nov 2021 06:05: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 1AF65ugu068895; Mon, 15 Nov 2021 06:05:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AF65ud1068894; Mon, 15 Nov 2021 06:05:56 GMT (envelope-from git) Date: Mon, 15 Nov 2021 06:05:56 GMT Message-Id: <202111150605.1AF65ud1068894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: f7523c8a19d0 - main - iser: Remove redundant linuxkpi MODULE_DEPEND List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7523c8a19d008412ccc969b12eeb756613f3678 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=f7523c8a19d008412ccc969b12eeb756613f3678 commit f7523c8a19d008412ccc969b12eeb756613f3678 Author: Ka Ho Ng AuthorDate: 2021-11-15 06:04:08 +0000 Commit: Ka Ho Ng CommitDate: 2021-11-15 06:04:08 +0000 iser: Remove redundant linuxkpi MODULE_DEPEND Since ibcore depends on linuxkpi, there is no need to pull in the linuxkpi dependency in iser. MFC after: 1 week Sponsored by: The FreeBSD Foundation Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D32977 --- sys/dev/iser/icl_iser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/iser/icl_iser.c b/sys/dev/iser/icl_iser.c index be09a3649dd9..f3780a441e01 100644 --- a/sys/dev/iser/icl_iser.c +++ b/sys/dev/iser/icl_iser.c @@ -566,5 +566,4 @@ moduledata_t icl_iser_data = { DECLARE_MODULE(icl_iser, icl_iser_data, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); MODULE_DEPEND(icl_iser, icl, 1, 1, 1); MODULE_DEPEND(icl_iser, ibcore, 1, 1, 1); -MODULE_DEPEND(icl_iser, linuxkpi, 1, 1, 1); MODULE_VERSION(icl_iser, 1); From nobody Mon Nov 15 06:10:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 060AB185AE41; Mon, 15 Nov 2021 06:10: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 4HszMg6dg3z3Pmy; Mon, 15 Nov 2021 06:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C475D14A77; Mon, 15 Nov 2021 06:10: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 1AF6At9W078224; Mon, 15 Nov 2021 06:10:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AF6AtDu078208; Mon, 15 Nov 2021 06:10:55 GMT (envelope-from git) Date: Mon, 15 Nov 2021 06:10:55 GMT Message-Id: <202111150610.1AF6AtDu078208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: b366ee4868bc - main - Consolodate four copies of the STDSB define into a single place. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b366ee4868bca2b3ebe4bb29c9590a29b6cecc29 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=b366ee4868bca2b3ebe4bb29c9590a29b6cecc29 commit b366ee4868bca2b3ebe4bb29c9590a29b6cecc29 Author: Kirk McKusick AuthorDate: 2021-11-15 06:09:06 +0000 Commit: Kirk McKusick CommitDate: 2021-11-15 06:10:16 +0000 Consolodate four copies of the STDSB define into a single place. The STDSB macro is passed to the ffs_sbget() routine to fetch a UFS/FFS superblock "from the stadard place". It was identically defined in lib/libufs/libufs.h, stand/libsa/ufs.c, sys/ufs/ffs/ffs_extern.h, and sys/ufs/ffs/ffs_subr.c. Delete it from these four files and define it instead in sys/ufs/ffs/fs.h. All existing uses of this macro already include sys/ufs/ffs/fs.h so no include changes need to be made. No functional change intended. Sponsored by: Netflix --- lib/libufs/libufs.h | 6 ------ stand/libsa/ufs.c | 5 ----- sys/ufs/ffs/ffs_extern.h | 6 ------ sys/ufs/ffs/ffs_subr.c | 5 ----- sys/ufs/ffs/fs.h | 12 ++++++++++++ 5 files changed, 12 insertions(+), 22 deletions(-) diff --git a/lib/libufs/libufs.h b/lib/libufs/libufs.h index 8160fdcd68a9..63a8dc170997 100644 --- a/lib/libufs/libufs.h +++ b/lib/libufs/libufs.h @@ -117,12 +117,6 @@ int ffs_sbput(void *, struct fs *, off_t, void ffs_update_dinode_ckhash(struct fs *, struct ufs2_dinode *); int ffs_verify_dinode_ckhash(struct fs *, struct ufs2_dinode *); -/* - * Request standard superblock location in ffs_sbget - */ -#define STDSB -1 /* Fail if check-hash is bad */ -#define STDSB_NOHASHFAIL -2 /* Ignore check-hash failure */ - /* * block.c */ diff --git a/stand/libsa/ufs.c b/stand/libsa/ufs.c index a4015dea74c2..31212bf3473a 100644 --- a/stand/libsa/ufs.c +++ b/stand/libsa/ufs.c @@ -154,11 +154,6 @@ static int ufs_use_sa_read(void *, off_t, void **, int); /* from ffs_subr.c */ int ffs_sbget(void *, struct fs **, off_t, char *, int (*)(void *, off_t, void **, int)); -/* - * Request standard superblock location in ffs_sbget - */ -#define STDSB -1 /* Fail if check-hash is bad */ -#define STDSB_NOHASHFAIL -2 /* Ignore check-hash failure */ /* * Read a new inode into a file structure. diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h index c835239986ba..fdc08dc6aafb 100644 --- a/sys/ufs/ffs/ffs_extern.h +++ b/sys/ufs/ffs/ffs_extern.h @@ -137,12 +137,6 @@ int ffs_breadz(struct ufsmount *, struct vnode *, daddr_t, daddr_t, int, #define FFSR_FORCE 0x0001 #define FFSR_UNSUSPEND 0x0002 -/* - * Request standard superblock location in ffs_sbget - */ -#define STDSB -1 /* Fail if check-hash is bad */ -#define STDSB_NOHASHFAIL -2 /* Ignore check-hash failure */ - /* * Definitions for TRIM interface * diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index 3e6cefa7be0c..60d90aac5bcc 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -50,11 +50,6 @@ uint32_t ffs_calc_sbhash(struct fs *); struct malloc_type; #define UFS_MALLOC(size, type, flags) malloc(size) #define UFS_FREE(ptr, type) free(ptr) -/* - * Request standard superblock location in ffs_sbget - */ -#define STDSB -1 /* Fail if check-hash is bad */ -#define STDSB_NOHASHFAIL -2 /* Ignore check-hash failure */ #else /* _KERNEL */ #include diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h index df003c4282d9..00c153b9684d 100644 --- a/sys/ufs/ffs/fs.h +++ b/sys/ufs/ffs/fs.h @@ -77,6 +77,18 @@ #define SBLOCKSIZE 8192 #define SBLOCKSEARCH \ { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 } +/* + * Request standard superblock location in ffs_sbget(). + * + * STDSB will fail if the superblock has a check hash and it is wrong. + * + * STDSB_NOHASHFAIL will note that the check hash is wrong but will + * still return the superblock. This is used by the bootstrap code + * to give the system a chance to come up so that fsck can be run + * to correct the problem. + */ +#define STDSB -1 /* Fail if check-hash is bad */ +#define STDSB_NOHASHFAIL -2 /* Ignore check-hash failure */ /* * Max number of fragments per block. This value is NOT tweakable. From nobody Mon Nov 15 09:42:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6A2C7188E062; Mon, 15 Nov 2021 09:42: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 4Ht43K2b2cz3ls4; Mon, 15 Nov 2021 09:42:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A29F175C5; Mon, 15 Nov 2021 09:42: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 1AF9g5Js060003; Mon, 15 Nov 2021 09:42:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AF9g5F9060002; Mon, 15 Nov 2021 09:42:05 GMT (envelope-from git) Date: Mon, 15 Nov 2021 09:42:05 GMT Message-Id: <202111150942.1AF9g5F9060002@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: fb4114332463 - main - Added a new unionfs test scenario. Removed a few old unionfs tests from the exclude list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb41143324635477f4e21af3f89d626b730fc053 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=fb41143324635477f4e21af3f89d626b730fc053 commit fb41143324635477f4e21af3f89d626b730fc053 Author: Peter Holm AuthorDate: 2021-11-15 09:40:51 +0000 Commit: Peter Holm CommitDate: 2021-11-15 09:40:51 +0000 Added a new unionfs test scenario. Removed a few old unionfs tests from the exclude list --- tools/test/stress2/misc/all.exclude | 5 +- tools/test/stress2/misc/unionfs6.sh | 97 +++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 4 deletions(-) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index 220fb119dcc3..c93eb8779260 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -73,11 +73,8 @@ syzkaller43.sh WiP 20210906 syzkaller46.sh WiP 20211026 syzkaller47.sh WiP 20211026 truss3.sh WiP 20200915 -unionfs.sh insmntque: non-locked vp: xx is not exclusive locked... 20130909 -unionfs2.sh insmntque: mp-safe fs and non-locked vp is not ... 20111219 -unionfs3.sh insmntque: mp-safe fs and non-locked vp is not ... 20111216 unionfs4.sh WiP 20210916 -unionfs5.sh WiP 20210916 +unionfs6.sh WiP 20211115 zfs14.sh WiP 20211110 # Test not to run for other reasons: diff --git a/tools/test/stress2/misc/unionfs6.sh b/tools/test/stress2/misc/unionfs6.sh new file mode 100755 index 000000000000..21620f3f39b6 --- /dev/null +++ b/tools/test/stress2/misc/unionfs6.sh @@ -0,0 +1,97 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 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. +# + +# unionfs(8) test +# "panic: ufs dir vp 0xfffffe0157351068 ip 0xfffffe016a63d488 flags 0x3c06" seen + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +. ../default.cfg + +md1=$mdstart +md2=$((md1 + 1)) +mp1=/mnt$md1 +mp2=/mnt$md2 +mkdir -p $mp1 $mp2 +set -e +for i in $mp1 $mp2; do + mount | grep -q "on $i " && umount -f $i +done +for i in $md1 $md2; do + mdconfig -l | grep -q md$i && mdconfig -d -u $i +done + +mdconfig -a -t swap -s 4g -u $md1 +mdconfig -a -t swap -s 4g -u $md2 +newfs $newfs_flags -n md$md1 > /dev/null +newfs $newfs_flags -n md$md2 > /dev/null +mount /dev/md$md1 $mp1 +mount /dev/md$md2 $mp2 + +mount -t unionfs -o noatime $mp1 $mp2 +set +e +mount | grep -E "$mp1|$mp2" + +export CTRLDIR=$mp2/stressX.control +export INCARNATIONS=10 +export LOAD=80 +export RUNDIR=$mp2/stressX +export runRUNTIME=5m +export rwLOAD=80 +export symlinkLOAD=80 + +export TESTPROGS=" +testcases/lockf2/lockf2 +testcases/symlink/symlink +testcases/openat/openat +testcases/rw/rw +testcases/fts/fts +testcases/link/link +testcases/lockf/lockf +testcases/creat/creat +testcases/mkdir/mkdir +testcases/rename/rename +testcases/mkfifo/mkfifo +testcases/dirnprename/dirnprename +testcases/dirrename/dirrename +testcases/swap/swap +" + +set +e +chmod 777 $mp2 +su $testuser -c \ + '(cd ..; ./testcases/run/run $TESTPROGS)' + +umount $mp2 # The unionfs mount +umount $mp2 +n=`find $mp1/stressX | wc -l` +[ $n -eq 1 ] && s=0 || { find $mp1/stressX -ls | head -12; s=1; } +umount $mp1 +mdconfig -d -u $md2 +mdconfig -d -u $md1 +exit $s From nobody Mon Nov 15 14:42:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C6991188F6AF; Mon, 15 Nov 2021 14:42: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 4HtBk35DQRz4p2g; Mon, 15 Nov 2021 14:42:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93F6A1B442; Mon, 15 Nov 2021 14:42: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 1AFEgZ6M058482; Mon, 15 Nov 2021 14:42:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFEgZ7p058481; Mon, 15 Nov 2021 14:42:35 GMT (envelope-from git) Date: Mon, 15 Nov 2021 14:42:35 GMT Message-Id: <202111151442.1AFEgZ7p058481@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: 9e9c651caceb - main - cddl: fix missing ZFS library 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e9c651caceb9ecd17131e8bb29791ba4cf1cec7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9e9c651caceb9ecd17131e8bb29791ba4cf1cec7 commit 9e9c651caceb9ecd17131e8bb29791ba4cf1cec7 Author: Greg V AuthorDate: 2021-10-16 16:29:28 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 14:42:07 +0000 cddl: fix missing ZFS library dependencies In 9fae47666 zfsd got a libspl dependency to avoid undefined references. However that workaround did not help external consumers of libzfs_core. Fix all missing dependencies lld 13 and the rtld complain about. Reviewed by: freqlabs, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32521 --- Makefile.inc1 | 8 ++++++-- cddl/lib/Makefile | 4 +++- cddl/lib/libavl/Makefile | 1 + cddl/lib/libnvpair/Makefile | 1 + cddl/lib/libzfs_core/Makefile | 2 +- cddl/lib/libzutil/Makefile | 2 +- cddl/usr.sbin/zfsd/Makefile.common | 2 +- share/mk/src.libnames.mk | 6 ++++-- 8 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index ba1c74adabe1..6d6991a395c2 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3027,11 +3027,15 @@ _cddl_lib_libzfs_core= cddl/lib/libzfs_core _cddl_lib_libzfs= cddl/lib/libzfs _cddl_lib_libzfsbootenv= cddl/lib/libzfsbootenv +cddl/lib/libavl__L: cddl/lib/libspl__L + +cddl/lib/libnvpair__L: cddl/lib/libspl__L + cddl/lib/libtpool__L: cddl/lib/libspl__L -cddl/lib/libzutil__L: cddl/lib/libavl__L cddl/lib/libtpool__L +cddl/lib/libzutil__L: cddl/lib/libavl__L lib/libgeom__L lib/msun__L cddl/lib/libtpool__L -cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L +cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L cddl/lib/libspl__L cddl/lib/libzutil__L cddl/lib/libzfs__L: cddl/lib/libzfs_core__L lib/msun__L lib/libutil__L cddl/lib/libzfs__L: lib/libthr__L lib/libmd__L lib/libz__L cddl/lib/libumem__L diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile index ae6862f70443..5ca0d56b291a 100644 --- a/cddl/lib/Makefile +++ b/cddl/lib/Makefile @@ -36,11 +36,13 @@ _pam_zfs_key= pam_zfs_key .endif .endif +SUBDIR_DEPEND_libavl= libspl SUBDIR_DEPEND_libctf= libspl SUBDIR_DEPEND_libdtrace= libctf +SUBDIR_DEPEND_libnvpair= libspl SUBDIR_DEPEND_libtpool= libspl SUBDIR_DEPEND_libuutil= libavl libspl -SUBDIR_DEPEND_libzfs_core= libnvpair +SUBDIR_DEPEND_libzfs_core= libnvpair libspl libzutil SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core libzutil SUBDIR_DEPEND_libzpool= libavl libnvpair libumem libicp SUBDIR_DEPEND_libzutil= libavl libtpool diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile index 2f7b9ad30856..b5e3b458f982 100644 --- a/cddl/lib/libavl/Makefile +++ b/cddl/lib/libavl/Makefile @@ -4,6 +4,7 @@ PACKAGE= runtime LIB= avl +LIBADD= spl SRCS= avl.c WARNS?= 3 CFLAGS+= -DIN_BASE diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile index 670253eff7c1..aaf76ed3fb28 100644 --- a/cddl/lib/libnvpair/Makefile +++ b/cddl/lib/libnvpair/Makefile @@ -4,6 +4,7 @@ .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libnvpair LIB= nvpair +LIBADD= spl PACKAGE= runtime # user diff --git a/cddl/lib/libzfs_core/Makefile b/cddl/lib/libzfs_core/Makefile index abe0348f2313..5a7475f55428 100644 --- a/cddl/lib/libzfs_core/Makefile +++ b/cddl/lib/libzfs_core/Makefile @@ -7,7 +7,7 @@ LIB= zfs_core -LIBADD= nvpair +LIBADD= nvpair spl zutil PACKAGE= runtime INCS= libzfs_core.h diff --git a/cddl/lib/libzutil/Makefile b/cddl/lib/libzutil/Makefile index 85467151a5bb..2e6b53658b22 100644 --- a/cddl/lib/libzutil/Makefile +++ b/cddl/lib/libzutil/Makefile @@ -5,7 +5,7 @@ .PATH: ${SRCTOP}/sys/contrib/openzfs/module/os/freebsd/zfs LIB= zutil -LIBADD= avl tpool +LIBADD= avl geom m tpool PACKAGE= runtime INCS = zutil_import.h diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common index c18c796ce0ed..5e9257d7b37e 100644 --- a/cddl/usr.sbin/zfsd/Makefile.common +++ b/cddl/usr.sbin/zfsd/Makefile.common @@ -26,7 +26,7 @@ CFLAGS+= -I${SRCTOP}/cddl/usr.sbin # use issetugid(2) CFLAGS+= -D_MACHINE_FLOAT_H_ -DHAVE_ISSETUGID -LIBADD+= devdctl zfs zfs_core util geom bsdxml sbuf nvpair avl spl uutil zutil +LIBADD+= devdctl zfs util geom bsdxml sbuf nvpair avl uutil zutil cscope: find ${.CURDIR} -type f -a \( -name "*.[ch]" -o -name "*.cc" \) \ diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 227691804e2a..7873d05d18da 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -260,6 +260,7 @@ LIBVERIEXEC?= ${LIBVERIEXECDIR}/libveriexec.a _DP_80211= sbuf bsdxml _DP_9p= sbuf _DP_archive= z bz2 lzma bsdxml zstd +_DP_avl= spl _DP_zstd= pthread .if ${MK_BLACKLIST} != "no" _DP_blacklist+= pthread @@ -380,6 +381,7 @@ _DP_stats= sbuf pthread _DP_stdthreads= pthread _DP_tacplus= md _DP_ncursesw= tinfow +_DP_nvpair= spl _DP_panelw= ncursesw _DP_rpcsec_gss= gssapi _DP_smb= kiconv @@ -391,9 +393,9 @@ _DP_uutil= avl spl _DP_zfs= md pthread umem util uutil m avl bsdxml crypto geom nvpair \ z zfs_core zutil _DP_zfsbootenv= zfs nvpair -_DP_zfs_core= nvpair +_DP_zfs_core= nvpair spl zutil _DP_zpool= md pthread z icp spl nvpair avl umem -_DP_zutil= avl tpool +_DP_zutil= avl geom m tpool _DP_be= zfs spl nvpair zfsbootenv _DP_netmap= _DP_ifconfig= m From nobody Mon Nov 15 15:16:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 42026189F529; Mon, 15 Nov 2021 15: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 4HtCTW12Mhz3HMX; Mon, 15 Nov 2021 15:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 03BB71C11D; Mon, 15 Nov 2021 15: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 1AFFGkMd099416; Mon, 15 Nov 2021 15: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 1AFFGkTB099415; Mon, 15 Nov 2021 15:16:46 GMT (envelope-from git) Date: Mon, 15 Nov 2021 15:16:46 GMT Message-Id: <202111151516.1AFFGkTB099415@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: 5c2e6d9610f1 - stable/13 - hwpmc: initialize arm64 counter/interrupt 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5c2e6d9610f1b3f1d7c5d69b925212a7b1fd9391 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5c2e6d9610f1b3f1d7c5d69b925212a7b1fd9391 commit 5c2e6d9610f1b3f1d7c5d69b925212a7b1fd9391 Author: Mitchell Horne AuthorDate: 2021-11-08 19:33:25 +0000 Commit: Mitchell Horne CommitDate: 2021-11-15 15:13:50 +0000 hwpmc: initialize arm64 counter/interrupt state Performance counters and overflow interrupts are assumed to be disabled by default, but this is not guaranteed. Ensure we disable both during per-cpu initialization, before enabling the PMU. Otherwise, some systems (such as the Ampere eMAG) would experience an interrupt storm upon loading the hwpmc module. Reviewed by: br MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32854 (cherry picked from commit b826cc3caf6abc6a5d1926bd478b464938d45697) --- sys/dev/hwpmc/hwpmc_arm64.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index 8a149f5f508f..ea433ca191d2 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -484,6 +484,16 @@ arm64_pcpu_init(struct pmc_mdep *md, int cpu) pc->pc_hwpmcs[i + first_ri] = phw; } + /* + * Disable all counters and overflow interrupts. Upon reset they are in + * an undefined state. + * + * Don't issue an isb here, just wait for the one in arm64_pmcr_write() + * to make the writes visible. + */ + WRITE_SPECIALREG(pmcntenclr_el0, 0xffffffff); + WRITE_SPECIALREG(pmintenclr_el1, 0xffffffff); + /* Enable unit */ pmcr = arm64_pmcr_read(); pmcr |= PMCR_E; From nobody Mon Nov 15 15:22:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8F46D180BB57; Mon, 15 Nov 2021 15:22: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 4HtCcb3XlCz3LW5; Mon, 15 Nov 2021 15:22:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A7651C1D2; Mon, 15 Nov 2021 15:22: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 1AFFMt0G012938; Mon, 15 Nov 2021 15:22:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFFMtsf012937; Mon, 15 Nov 2021 15:22:55 GMT (envelope-from git) Date: Mon, 15 Nov 2021 15:22:55 GMT Message-Id: <202111151522.1AFFMtsf012937@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: c8a4404da737 - stable/12 - hwpmc: initialize arm64 counter/interrupt 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c8a4404da737ea7e859287094de38953a84bdd68 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c8a4404da737ea7e859287094de38953a84bdd68 commit c8a4404da737ea7e859287094de38953a84bdd68 Author: Mitchell Horne AuthorDate: 2021-11-08 19:33:25 +0000 Commit: Mitchell Horne CommitDate: 2021-11-15 15:22:35 +0000 hwpmc: initialize arm64 counter/interrupt state Performance counters and overflow interrupts are assumed to be disabled by default, but this is not guaranteed. Ensure we disable both during per-cpu initialization, before enabling the PMU. Otherwise, some systems (such as the Ampere eMAG) would experience an interrupt storm upon loading the hwpmc module. Reviewed by: br MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32854 (cherry picked from commit b826cc3caf6abc6a5d1926bd478b464938d45697) --- sys/dev/hwpmc/hwpmc_arm64.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index af028d3fce94..919f588afff2 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -454,6 +454,16 @@ arm64_pcpu_init(struct pmc_mdep *md, int cpu) pc->pc_hwpmcs[i + first_ri] = phw; } + /* + * Disable all counters and overflow interrupts. Upon reset they are in + * an undefined state. + * + * Don't issue an isb here, just wait for the one in arm64_pmcr_write() + * to make the writes visible. + */ + WRITE_SPECIALREG(pmcntenclr_el0, 0xffffffff); + WRITE_SPECIALREG(pmintenclr_el1, 0xffffffff); + /* Enable unit */ pmcr = arm64_pmcr_read(); pmcr |= PMCR_E; From nobody Mon Nov 15 15:37:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 32BC618536A8 for ; Mon, 15 Nov 2021 15: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 4HtCxV0wnlz3QSl; Mon, 15 Nov 2021 15:37:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E55D01C2DA; Mon, 15 Nov 2021 15: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 1AFFbXog027108; Mon, 15 Nov 2021 15: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 1AFFbXGT027107; Mon, 15 Nov 2021 15:37:33 GMT (envelope-from git) Date: Mon, 15 Nov 2021 15:37:33 GMT Message-Id: <202111151537.1AFFbXGT027107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Baptiste Daroussin Subject: git: a5efdeedef48..e9bf778aefc1 - vendor/mandoc - 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/vendor/mandoc X-Git-Reftype: branch X-Git-Commit: e9bf778aefc154b6bdefd2772f7fd85819f465b1 X-Git-Oldrev: a5efdeedef481aea3632844ca94a80567a75b5ad X-Git-Newrev: e9bf778aefc154b6bdefd2772f7fd85819f465b1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/mandoc has been updated by bapt: URL: https://cgit.FreeBSD.org/src/log/?id=a5efdeedef48..e9bf778aefc1 e9bf778aefc1 mandoc: import v1.14.6 From nobody Mon Nov 15 15:37:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3416318535CC for ; Mon, 15 Nov 2021 15:37: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 4HtCxZ0zW8z3QmS; Mon, 15 Nov 2021 15:37:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 030661C58B; Mon, 15 Nov 2021 15:37: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 1AFFbb6p027206; Mon, 15 Nov 2021 15: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 1AFFbbZ5027205; Mon, 15 Nov 2021 15:37:37 GMT (envelope-from git) Date: Mon, 15 Nov 2021 15:37:37 GMT Message-Id: <202111151537.1AFFbbZ5027205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Baptiste Daroussin Subject: git: 15d10cb535e1 - Create tag vendor/mandoc/1.14.6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/tags/vendor/mandoc/1.14.6 X-Git-Reftype: annotated tag X-Git-Commit: 15d10cb535e112d494360f874257b66298486110 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/mandoc/1.14.6 has been created by bapt: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/mandoc/1.14.6 tag vendor/mandoc/1.14.6 Tagger: Baptiste Daroussin TaggerDate: 2021-11-15 15:36:39 +0000 mandoc: tag import of v1.14.6 commit e9bf778aefc154b6bdefd2772f7fd85819f465b1 Author: Baptiste Daroussin AuthorDate: 2021-11-15 15:35:39 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-15 15:35:39 +0000 mandoc: import v1.14.6 From nobody Mon Nov 15 15:59:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AA2F01890006; Mon, 15 Nov 2021 15:59: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 4HtDRM4L6zz3ps2; Mon, 15 Nov 2021 15:59:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75EF11C93F; Mon, 15 Nov 2021 15:59: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 1AFFxxfA053295; Mon, 15 Nov 2021 15:59:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFFxxO5053294; Mon, 15 Nov 2021 15:59:59 GMT (envelope-from git) Date: Mon, 15 Nov 2021 15:59:59 GMT Message-Id: <202111151559.1AFFxxO5053294@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 6d38604fc532 - main - mandoc: import version 1.14.6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d38604fc532a3fc060788e3ce40464b46047eaf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=6d38604fc532a3fc060788e3ce40464b46047eaf commit 6d38604fc532a3fc060788e3ce40464b46047eaf Merge: 9e9c651caceb e9bf778aefc1 Author: Baptiste Daroussin AuthorDate: 2021-11-15 15:54:38 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-15 15:58:58 +0000 mandoc: import version 1.14.6 MFC after: 3 weeks contrib/mandoc/INSTALL | 17 +- contrib/mandoc/LICENSE | 6 +- contrib/mandoc/Makefile | 64 ++- contrib/mandoc/Makefile.depend | 38 +- contrib/mandoc/NEWS | 201 ++++++- contrib/mandoc/TODO | 142 ++++- contrib/mandoc/apropos.1 | 15 +- contrib/mandoc/arch.c | 4 +- contrib/mandoc/att.c | 4 +- contrib/mandoc/catman.c | 4 +- contrib/mandoc/cgi.c | 72 ++- contrib/mandoc/chars.c | 7 +- contrib/mandoc/compat_err.c | 13 +- contrib/mandoc/compat_fts.c | 29 +- contrib/mandoc/compat_fts.h | 3 +- contrib/mandoc/compat_getline.c | 13 +- contrib/mandoc/compat_getsubopt.c | 13 +- contrib/mandoc/compat_isblank.c | 14 +- contrib/mandoc/compat_mkdtemp.c | 23 +- contrib/mandoc/compat_mkstemps.c | 63 +++ contrib/mandoc/compat_ohash.c | 13 +- contrib/mandoc/compat_progname.c | 15 +- contrib/mandoc/compat_reallocarray.c | 15 +- contrib/mandoc/compat_recallocarray.c | 25 +- contrib/mandoc/compat_strcasestr.c | 13 +- contrib/mandoc/compat_stringlist.c | 82 +-- contrib/mandoc/compat_stringlist.h | 43 +- contrib/mandoc/compat_strlcat.c | 62 +-- contrib/mandoc/compat_strlcpy.c | 49 +- contrib/mandoc/compat_strndup.c | 16 +- contrib/mandoc/compat_strsep.c | 15 +- contrib/mandoc/compat_strtonum.c | 15 +- contrib/mandoc/compat_vasprintf.c | 13 +- contrib/mandoc/config.h | 8 +- contrib/mandoc/configure | 313 ++++++----- contrib/mandoc/configure.local.example | 71 ++- contrib/mandoc/dba_array.c | 4 +- contrib/mandoc/dba_read.c | 4 +- contrib/mandoc/eqn.7 | 55 +- contrib/mandoc/eqn.c | 14 +- contrib/mandoc/html.c | 337 ++++++++---- contrib/mandoc/html.h | 36 +- contrib/mandoc/libmandoc.h | 14 +- contrib/mandoc/main.c | 961 +++++++++++++++++++-------------- contrib/mandoc/man.1 | 98 ++-- contrib/mandoc/man.7 | 55 +- contrib/mandoc/man.conf.5 | 14 +- contrib/mandoc/man_html.c | 43 +- contrib/mandoc/man_macro.c | 12 +- contrib/mandoc/man_term.c | 132 +---- contrib/mandoc/man_validate.c | 157 +++++- contrib/mandoc/manconf.h | 10 +- contrib/mandoc/mandoc.1 | 141 ++++- contrib/mandoc/mandoc.c | 85 +-- contrib/mandoc/mandoc.css | 7 +- contrib/mandoc/mandoc.h | 22 +- contrib/mandoc/mandoc_char.7 | 21 +- contrib/mandoc/mandoc_headers.3 | 79 ++- contrib/mandoc/mandoc_html.3 | 270 ++++++++- contrib/mandoc/mandoc_malloc.3 | 41 +- contrib/mandoc/mandoc_msg.c | 17 +- contrib/mandoc/mandoc_ohash.c | 4 +- contrib/mandoc/mandoc_parse.h | 3 +- contrib/mandoc/mandoc_xr.c | 4 +- contrib/mandoc/mandocd.c | 4 +- contrib/mandoc/mandocdb.c | 247 ++++++--- contrib/mandoc/manpath.c | 48 +- contrib/mandoc/mdoc.7 | 183 +++++-- contrib/mandoc/mdoc.c | 13 +- contrib/mandoc/mdoc_html.c | 385 ++++++------- contrib/mandoc/mdoc_macro.c | 7 +- contrib/mandoc/mdoc_man.c | 124 +++-- contrib/mandoc/mdoc_markdown.c | 55 +- contrib/mandoc/mdoc_state.c | 5 +- contrib/mandoc/mdoc_term.c | 440 ++++++--------- contrib/mandoc/mdoc_validate.c | 527 ++++++++++++------ contrib/mandoc/out.c | 75 ++- contrib/mandoc/out.h | 6 +- contrib/mandoc/read.c | 31 +- contrib/mandoc/roff.7 | 8 +- contrib/mandoc/roff.c | 233 +++++--- contrib/mandoc/roff.h | 17 +- contrib/mandoc/roff_html.c | 4 +- contrib/mandoc/roff_int.h | 5 +- contrib/mandoc/roff_term.c | 56 +- contrib/mandoc/roff_validate.c | 10 +- contrib/mandoc/soelim.c | 8 +- contrib/mandoc/tag.c | 415 +++++++------- contrib/mandoc/tag.h | 35 +- contrib/mandoc/tbl.7 | 13 +- contrib/mandoc/tbl.h | 7 +- contrib/mandoc/tbl_data.c | 53 +- contrib/mandoc/tbl_html.c | 42 +- contrib/mandoc/tbl_layout.c | 63 ++- contrib/mandoc/tbl_term.c | 60 +- contrib/mandoc/term.c | 25 +- contrib/mandoc/term_ascii.c | 32 +- contrib/mandoc/term_ps.c | 9 +- contrib/mandoc/term_tab.c | 4 +- contrib/mandoc/term_tag.c | 227 ++++++++ contrib/mandoc/term_tag.h | 34 ++ contrib/mandoc/test-attribute.c | 48 ++ contrib/mandoc/test-mkstemps.c | 12 + contrib/mandoc/tree.c | 201 +++++-- usr.bin/mandoc/Makefile | 1 + 105 files changed, 5029 insertions(+), 2896 deletions(-) diff --cc contrib/mandoc/Makefile index f4e29540df00,000000000000..48c4741812b6 mode 100644,000000..100644 --- a/contrib/mandoc/Makefile +++ b/contrib/mandoc/Makefile @@@ -1,603 -1,0 +1,609 @@@ - # $Id: Makefile,v 1.530 2019/03/06 16:08:41 schwarze Exp $ ++# $Id: Makefile,v 1.540 2021/09/21 11:04:40 schwarze Exp $ +# ++# Copyright (c) 2011, 2013-2021 Ingo Schwarze +# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons - # Copyright (c) 2011, 2013-2019 Ingo Schwarze +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + - VERSION = 1.14.5 ++VERSION = 1.14.6 + +# === LIST OF FILES ==================================================== + - TESTSRCS = test-be32toh.c \ ++TESTSRCS = test-attribute.c \ ++ test-be32toh.c \ + test-cmsg.c \ + test-dirent-namlen.c \ + test-EFTYPE.c \ + test-err.c \ + test-fts.c \ + test-getline.c \ + test-getsubopt.c \ + test-isblank.c \ + test-mkdtemp.c \ ++ test-mkstemps.c \ + test-nanosleep.c \ + test-noop.c \ + test-ntohl.c \ + test-O_DIRECTORY.c \ + test-ohash.c \ + test-PATH_MAX.c \ + test-pledge.c \ + test-progname.c \ + test-reallocarray.c \ + test-recallocarray.c \ + test-recvmsg.c \ + test-rewb-bsd.c \ + test-rewb-sysv.c \ + test-sandbox_init.c \ + test-strcasestr.c \ + test-stringlist.c \ + test-strlcat.c \ + test-strlcpy.c \ + test-strndup.c \ + test-strptime.c \ + test-strsep.c \ + test-strtonum.c \ + test-vasprintf.c \ + test-wchar.c + +SRCS = arch.c \ + att.c \ + catman.c \ + cgi.c \ + chars.c \ + compat_err.c \ + compat_fts.c \ + compat_getline.c \ + compat_getsubopt.c \ + compat_isblank.c \ + compat_mkdtemp.c \ ++ compat_mkstemps.c \ + compat_ohash.c \ + compat_progname.c \ + compat_reallocarray.c \ + compat_recallocarray.c \ + compat_strcasestr.c \ + compat_stringlist.c \ + compat_strlcat.c \ + compat_strlcpy.c \ + compat_strndup.c \ + compat_strsep.c \ + compat_strtonum.c \ + compat_vasprintf.c \ + dba.c \ + dba_array.c \ + dba_read.c \ + dba_write.c \ + dbm.c \ + dbm_map.c \ + demandoc.c \ + eqn.c \ + eqn_html.c \ + eqn_term.c \ + html.c \ + lib.c \ + main.c \ + man.c \ + man_html.c \ + man_macro.c \ + man_term.c \ + man_validate.c \ + mandoc.c \ + mandoc_aux.c \ + mandoc_msg.c \ + mandoc_ohash.c \ + mandoc_xr.c \ + mandocd.c \ + mandocdb.c \ + manpath.c \ + mansearch.c \ + mdoc.c \ + mdoc_argv.c \ + mdoc_html.c \ + mdoc_macro.c \ + mdoc_man.c \ + mdoc_markdown.c \ + mdoc_state.c \ + mdoc_term.c \ + mdoc_validate.c \ + msec.c \ + out.c \ + preconv.c \ + read.c \ + roff.c \ + roff_html.c \ + roff_term.c \ + roff_validate.c \ + soelim.c \ + st.c \ + tag.c \ + tbl.c \ + tbl_data.c \ + tbl_html.c \ + tbl_layout.c \ + tbl_opts.c \ + tbl_term.c \ + term.c \ + term_ascii.c \ + term_ps.c \ + term_tab.c \ ++ term_tag.c \ + tree.c + +DISTFILES = INSTALL \ + LICENSE \ + Makefile \ + Makefile.depend \ + NEWS \ + TODO \ + apropos.1 \ + catman.8 \ + cgi.h.example \ + compat_fts.h \ + compat_ohash.h \ + compat_stringlist.h \ + configure \ + configure.local.example \ + dba.h \ + dba_array.h \ + dba_write.h \ + dbm.h \ + dbm_map.h \ + demandoc.1 \ + eqn.7 \ + eqn.h \ + eqn_parse.h \ + gmdiff \ + html.h \ + lib.in \ + libman.h \ + libmandoc.h \ + libmdoc.h \ + main.h \ + makewhatis.8 \ + man.1 \ + man.7 \ + man.cgi.3 \ + man.cgi.8 \ + man.conf.5 \ + man.h \ + man.options.1 \ + manconf.h \ + mandoc.1 \ + mandoc.3 \ + mandoc.css \ + mandoc.db.5 \ + mandoc.h \ + mandoc_aux.h \ + mandoc_char.7 \ + mandoc_escape.3 \ + mandoc_headers.3 \ + mandoc_html.3 \ + mandoc_malloc.3 \ + mandoc_ohash.h \ + mandoc_parse.h \ + mandoc_xr.h \ + mandocd.8 \ + mansearch.3 \ + mansearch.h \ + mchars_alloc.3 \ + mdoc.7 \ + mdoc.h \ + msec.in \ + out.h \ + predefs.in \ + roff.7 \ + roff.h \ + roff_int.h \ + soelim.1 \ + tag.h \ + tbl.3 \ + tbl.7 \ + tbl.h \ + tbl_int.h \ + tbl_parse.h \ + term.h \ ++ term_tag.h \ + $(SRCS) \ + $(TESTSRCS) + +LIBMAN_OBJS = man.o \ + man_macro.o \ + man_validate.o + +LIBMDOC_OBJS = att.o \ + lib.o \ + mdoc.o \ + mdoc_argv.o \ + mdoc_macro.o \ + mdoc_state.o \ + mdoc_validate.o \ + st.o + +LIBROFF_OBJS = eqn.o \ + roff.o \ + roff_validate.o \ + tbl.o \ + tbl_data.o \ + tbl_layout.o \ + tbl_opts.o + +LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ + $(LIBMDOC_OBJS) \ + $(LIBROFF_OBJS) \ + arch.o \ + chars.o \ + mandoc.o \ + mandoc_aux.o \ + mandoc_msg.o \ + mandoc_ohash.o \ + mandoc_xr.o \ + msec.o \ + preconv.o \ - read.o ++ read.o \ ++ tag.o + - COMPAT_OBJS = compat_err.o \ ++ALL_COBJS = compat_err.o \ + compat_fts.o \ + compat_getline.o \ + compat_getsubopt.o \ + compat_isblank.o \ + compat_mkdtemp.o \ ++ compat_mkstemps.o \ + compat_ohash.o \ + compat_progname.o \ + compat_reallocarray.o \ + compat_recallocarray.o \ + compat_strcasestr.o \ ++ compat_stringlist.o \ + compat_strlcat.o \ + compat_strlcpy.o \ + compat_strndup.o \ + compat_strsep.o \ + compat_strtonum.o \ + compat_vasprintf.o + +MANDOC_HTML_OBJS = eqn_html.o \ + html.o \ + man_html.o \ + mdoc_html.o \ + roff_html.o \ + tbl_html.o + +MANDOC_TERM_OBJS = eqn_term.o \ + man_term.o \ + mdoc_term.o \ + roff_term.o \ + term.o \ + term_ascii.o \ + term_ps.o \ + term_tab.o \ ++ term_tag.o \ + tbl_term.o + +DBM_OBJS = dbm.o \ + dbm_map.o \ + mansearch.o + +DBA_OBJS = dba.o \ + dba_array.o \ + dba_read.o \ + dba_write.o \ + mandocdb.o + +MAIN_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_MAN_OBJS) \ + $(MANDOC_TERM_OBJS) \ + $(DBM_OBJS) \ + $(DBA_OBJS) \ + main.o \ + manpath.o \ + mdoc_man.o \ + mdoc_markdown.o \ + out.o \ - tag.o \ + tree.o + +CGI_OBJS = $(MANDOC_HTML_OBJS) \ + $(DBM_OBJS) \ + cgi.o \ + out.o + +MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_TERM_OBJS) \ + mandocd.o \ - out.o \ - tag.o ++ out.o + +DEMANDOC_OBJS = demandoc.o + - SOELIM_OBJS = soelim.o \ - compat_err.o \ - compat_getline.o \ - compat_progname.o \ - compat_reallocarray.o \ - compat_stringlist.o - +WWW_MANS = apropos.1.html \ + demandoc.1.html \ + man.1.html \ + man.options.1.html \ + mandoc.1.html \ + soelim.1.html \ + man.cgi.3.html \ + mandoc.3.html \ + mandoc_escape.3.html \ + mandoc_headers.3.html \ + mandoc_html.3.html \ + mandoc_malloc.3.html \ + mansearch.3.html \ + mchars_alloc.3.html \ + tbl.3.html \ + man.conf.5.html \ + mandoc.db.5.html \ + eqn.7.html \ + man.7.html \ + mandoc_char.7.html \ + mdoc.7.html \ + roff.7.html \ + tbl.7.html \ + catman.8.html \ + makewhatis.8.html \ + man.cgi.8.html \ + mandocd.8.html + +WWW_INCS = eqn.h.html \ + html.h.html \ + man.h.html \ + manconf.h.html \ + mandoc.h.html \ + mandoc_aux.h.html \ + mandoc_parse.h.html \ + mansearch.h.html \ + mdoc.h.html \ + roff.h.html \ + tbl.h.html \ + tbl_int.h.html \ + tbl_parse.h.html + +# === USER CONFIGURATION =============================================== + +include Makefile.local + +# === DEPENDENCY HANDLING ============================================== + - all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local ++all: mandoc man demandoc soelim $(BUILD_TARGETS) Makefile.local + +install: base-install $(INSTALL_TARGETS) + +www: $(WWW_MANS) $(WWW_INCS) + +$(WWW_MANS) $(WWW_INCS): mandoc + +.PHONY: base-install cgi-install install www-install +.PHONY: clean distclean depend + +include Makefile.depend + +# === TARGETS CONTAINING SHELL COMMANDS ================================ + +distclean: clean + rm -f Makefile.local config.h config.h.old config.log config.log.old + +clean: - rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) - rm -f mandoc $(MAIN_OBJS) ++ rm -f libmandoc.a $(LIBMANDOC_OBJS) $(ALL_COBJS) ++ rm -f mandoc man $(MAIN_OBJS) + rm -f man.cgi $(CGI_OBJS) + rm -f mandocd catman catman.o $(MANDOCD_OBJS) + rm -f demandoc $(DEMANDOC_OBJS) - rm -f soelim $(SOELIM_OBJS) ++ rm -f soelim soelim.o + rm -f $(WWW_MANS) $(WWW_INCS) mandoc*.tar.gz mandoc*.sha256 ++ rm -f Makefile.tmp1 Makefile.tmp2 + rm -rf *.dSYM + +base-install: mandoc demandoc soelim + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 + mkdir -p $(DESTDIR)$(MANDIR)/man5 + mkdir -p $(DESTDIR)$(MANDIR)/man7 + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS) + cd $(DESTDIR)$(SBINDIR) && \ + $(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS) + $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1 + $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_MAN) makewhatis.8 \ + $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + +lib-install: libmandoc.a + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(INCLUDEDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) + $(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \ + mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ + mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 + +cgi-install: man.cgi + mkdir -p $(DESTDIR)$(CGIBINDIR) + mkdir -p $(DESTDIR)$(HTDOCDIR) + $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) + $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR) + +catman-install: mandocd catman + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR) + $(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + $(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/mandoc + rm -f $(DESTDIR)$(BINDIR)/demandoc + rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi + rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css + rm -f $(DESTDIR)$(SBINDIR)/mandocd + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3 + rm -f $(DESTDIR)$(INCLUDEDIR)/eqn.h + rm -f $(DESTDIR)$(INCLUDEDIR)/man.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_parse.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h + rm -f $(DESTDIR)$(INCLUDEDIR)/tbl.h + [ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR) + +regress: all + cd regress && ./regress.pl + +regress-clean: + cd regress && ./regress.pl . clean + +Makefile.local config.h: configure $(TESTSRCS) + @echo "$@ is out of date; please run ./configure" + @exit 1 + - libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) - ar rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) ++libmandoc.a: $(MANDOC_COBJS) $(LIBMANDOC_OBJS) ++ $(AR) rs $@ $(MANDOC_COBJS) $(LIBMANDOC_OBJS) + +mandoc: $(MAIN_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD) + ++man: mandoc ++ $(LN) mandoc man ++ +man.cgi: $(CGI_OBJS) libmandoc.a + $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD) + +mandocd: $(MANDOCD_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD) + +catman: catman.o libmandoc.a + $(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD) + +demandoc: $(DEMANDOC_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD) + - soelim: $(SOELIM_OBJS) - $(CC) -o $@ $(LDFLAGS) $(SOELIM_OBJS) ++soelim: $(SOELIM_COBJS) soelim.o ++ $(CC) -o $@ $(LDFLAGS) $(SOELIM_COBJS) soelim.o + +# --- maintainer targets --- + +www-install: www + $(INSTALL_DATA) mandoc.css $(HTDOCDIR) + $(INSTALL_DATA) $(WWW_MANS) $(HTDOCDIR)/man + $(INSTALL_DATA) $(WWW_INCS) $(HTDOCDIR)/includes + +depend: config.h - mkdep -f Makefile.depend $(CFLAGS) $(SRCS) ++ ./configure -depend ++ mkdep -f Makefile.tmp1 $(CFLAGS) $(SRCS) + perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ - Makefile.depend > Makefile.tmp - mv Makefile.tmp Makefile.depend ++ Makefile.tmp1 > Makefile.tmp2 ++ rm Makefile.tmp1 ++ mv Makefile.tmp2 Makefile.depend + +regress-distclean: + @find regress \ + -name '.#*' -o \ + -name '*.orig' -o \ + -name '*.rej' -o \ + -name '*.core' \ + -exec rm -i {} \; + +regress-distcheck: + @find regress ! -type d ! -type f + @find regress -type f \ + ! -path '*/CVS/*' \ + ! -name Makefile \ + ! -name Makefile.inc \ + ! -name '*.in' \ + ! -name '*.out_ascii' \ + ! -name '*.out_utf8' \ + ! -name '*.out_html' \ + ! -name '*.out_markdown' \ + ! -name '*.out_lint' \ + ! -path regress/regress.pl \ + ! -path regress/regress.pl.1 + +dist: mandoc-$(VERSION).sha256 + +mandoc-$(VERSION).sha256: mandoc-$(VERSION).tar.gz + sha256 mandoc-$(VERSION).tar.gz > $@ + +mandoc-$(VERSION).tar.gz: $(DISTFILES) + ls regress/*/*/*.mandoc_* && exit 1 || true + mkdir -p .dist/mandoc-$(VERSION)/ + $(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION) + cp -pR regress .dist/mandoc-$(VERSION) + find .dist/mandoc-$(VERSION)/regress \ + -type d -name CVS -print0 | xargs -0 rm -rf + chmod 755 .dist/mandoc-$(VERSION)/configure + ( cd .dist/ && tar zcf ../$@ mandoc-$(VERSION) ) + rm -rf .dist/ + +dist-install: dist + $(INSTALL_DATA) mandoc-$(VERSION).tar.gz mandoc-$(VERSION).sha256 \ + $(HTDOCDIR)/snapshots + +# === SUFFIX RULES ===================================================== + +.SUFFIXES: .1 .3 .5 .7 .8 .h +.SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html + +.h.h.html: + highlight -I $< > $@ + - .1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc - mandoc -Thtml -Wwarning,stop \ ++.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: ++ ./mandoc -Thtml -Wwarning,stop \ + -O 'style=/mandoc.css,man=/man/%N.%S.html;https://man.openbsd.org/%N.%S,includes=/includes/%I.html' \ + $< > $@ diff --cc contrib/mandoc/compat_mkstemps.c index 000000000000,32394ffa682e..32394ffa682e mode 000000,100644..100644 --- a/contrib/mandoc/compat_mkstemps.c +++ b/contrib/mandoc/compat_mkstemps.c diff --cc contrib/mandoc/config.h index 36ff8a880eba,000000000000..553c4c8b7400 mode 100644,000000..100644 --- a/contrib/mandoc/config.h +++ b/contrib/mandoc/config.h @@@ -1,55 -1,0 +1,53 @@@ +#ifdef __cplusplus +#error "Do not use C++. See the INSTALL file." +#endif + - #if !defined(__GNUC__) || (__GNUC__ < 4) - #define __attribute__(x) - #endif - +#include + +#define MAN_CONF_FILE "/etc/man.conf" +#define MANPATH_BASE "/usr/share/man" +#define MANPATH_DEFAULT "/usr/share/man:/usr/local/man" +#define OSENUM MANDOC_OS_OTHER +#define UTF8_LOCALE "en_US.UTF-8" - #define HAVE_CMSG_XPG42 0 +#define HAVE_DIRENT_NAMLEN 1 +#define HAVE_ENDIAN 0 +#define HAVE_ERR 1 +#define HAVE_FTS 1 +#define HAVE_FTS_COMPARE_CONST 1 +#define HAVE_GETLINE 1 +#define HAVE_GETSUBOPT 1 +#define HAVE_ISBLANK 1 +#define HAVE_LESS_T 1 +#define HAVE_MKDTEMP 1 ++#define HAVE_MKSTEMPS 1 +#define HAVE_NTOHL 1 +#define HAVE_PLEDGE 0 +#define HAVE_PROGNAME 1 +#define HAVE_REALLOCARRAY 1 +#define HAVE_RECALLOCARRAY 0 +#define HAVE_REWB_BSD 1 +#define HAVE_REWB_SYSV 1 +#define HAVE_SANDBOX_INIT 0 +#define HAVE_STRCASESTR 1 +#define HAVE_STRINGLIST 1 +#define HAVE_STRLCAT 1 +#define HAVE_STRLCPY 1 +#define HAVE_STRNDUP 1 +#define HAVE_STRPTIME 1 +#define HAVE_STRSEP 1 +#define HAVE_STRTONUM 1 +#define HAVE_SYS_ENDIAN 1 +#define HAVE_VASPRINTF 1 +#define HAVE_WCHAR 1 +#define HAVE_OHASH 1 ++#define NEED_XPG4_2 0 + +#define BINM_APROPOS "apropos" +#define BINM_CATMAN "catman" +#define BINM_MAKEWHATIS "makewhatis" +#define BINM_MAN "man" +#define BINM_SOELIM "soelim" +#define BINM_WHATIS "whatis" ++#define BINM_PAGER "less" + +extern void *recallocarray(void *, size_t, size_t, size_t); diff --cc contrib/mandoc/main.c index 14a3691bfc59,000000000000..3c0255387c71 mode 100644,000000..100644 --- a/contrib/mandoc/main.c +++ b/contrib/mandoc/main.c @@@ -1,1282 -1,0 +1,1405 @@@ - /* $Id: main.c,v 1.332 2019/07/19 20:27:25 schwarze Exp $ */ ++/* $Id: main.c,v 1.358 2021/09/04 22:38:46 schwarze Exp $ */ +/* ++ * Copyright (c) 2010-2012, 2014-2021 Ingo Schwarze + * Copyright (c) 2008-2012 Kristaps Dzonsons - * Copyright (c) 2010-2012, 2014-2019 Ingo Schwarze + * Copyright (c) 2010 Joerg Sonnenberger + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ * ++ * Main program for mandoc(1), man(1), apropos(1), whatis(1), and help(1). + */ +#include "config.h" + +#include +#include +#include /* MACHINE */ +#include +#include + +#include +#include +#if HAVE_ERR +#include +#endif +#include +#include +#include ++#include +#if HAVE_SANDBOX_INIT +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mandoc_aux.h" +#include "mandoc.h" +#include "mandoc_xr.h" +#include "roff.h" +#include "mdoc.h" +#include "man.h" +#include "mandoc_parse.h" +#include "tag.h" ++#include "term_tag.h" +#include "main.h" +#include "manconf.h" +#include "mansearch.h" + +enum outmode { + OUTMODE_DEF = 0, + OUTMODE_FLN, + OUTMODE_LST, + OUTMODE_ALL, + OUTMODE_ONE +}; + +enum outt { + OUTT_ASCII = 0, /* -Tascii */ + OUTT_LOCALE, /* -Tlocale */ + OUTT_UTF8, /* -Tutf8 */ + OUTT_TREE, /* -Ttree */ + OUTT_MAN, /* -Tman */ + OUTT_HTML, /* -Thtml */ + OUTT_MARKDOWN, /* -Tmarkdown */ + OUTT_LINT, /* -Tlint */ + OUTT_PS, /* -Tps */ + OUTT_PDF /* -Tpdf */ +}; + - struct curparse { - struct mparse *mp; - struct manoutput *outopts; /* output options */ ++struct outstate { ++ struct tag_files *tag_files; /* Tagging state variables. */ + void *outdata; /* data for output */ - char *os_s; /* operating system for display */ ++ int use_pager; + int wstop; /* stop after a file with a warning */ - enum mandoc_os os_e; /* check base system conventions */ ++ int had_output; /* Some output was generated. */ + enum outt outtype; /* which output to use */ +}; + + +int mandocdb(int, char *[]); + - static void check_xr(void); - static int fs_lookup(const struct manpaths *, - size_t ipath, const char *, - const char *, const char *, ++static void check_xr(struct manpaths *); ++static void fs_append(char **, size_t, int, ++ size_t, const char *, enum form, ++ struct manpage **, size_t *); ++static int fs_lookup(const struct manpaths *, size_t, ++ const char *, const char *, const char *, + struct manpage **, size_t *); +static int fs_search(const struct mansearch *, - const struct manpaths *, int, char**, ++ const struct manpaths *, const char *, + struct manpage **, size_t *); - static void outdata_alloc(struct curparse *); - static void parse(struct curparse *, int, const char *); ++static void glob_esc(char **, const char *, const char *); ++static void outdata_alloc(struct outstate *, struct manoutput *); ++static void parse(struct mparse *, int, const char *, ++ struct outstate *, struct manconf *); +static void passthrough(int, int); - static pid_t spawn_pager(struct tag_files *); ++static void process_onefile(struct mparse *, struct manpage *, ++ int, struct outstate *, struct manconf *); ++static void run_pager(struct outstate *, char *); ++static pid_t spawn_pager(struct outstate *, char *); +static void usage(enum argmode) __attribute__((__noreturn__)); - static int woptions(struct curparse *, char *); ++static int woptions(char *, enum mandoc_os *, int *); + +static const int sec_prios[] = {1, 4, 5, 8, 6, 3, 7, 2, 9}; +static char help_arg[] = "help"; +static char *help_argv[] = {help_arg, NULL}; + + +int +main(int argc, char *argv[]) +{ - struct manconf conf; - struct mansearch search; - struct curparse curp; - struct winsize ws; - struct tag_files *tag_files; *** 1811 LINES SKIPPED *** From nobody Mon Nov 15 16:16:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E175118961EE; Mon, 15 Nov 2021 16:16:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HtDpj629wz3tlF; Mon, 15 Nov 2021 16:16:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8601:8b20:20ec:4262:a347:5719]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 173DA25F30; Mon, 15 Nov 2021 16:16:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) To: Randall Stewart Cc: Jessica Clarke , Randall Ray Stewart , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202111111131.1ABBVH6s017371@gitrepo.freebsd.org> <2a564b11-b1f4-a4fe-745b-27f45fb134eb@FreeBSD.org> <5A60AA15-F560-44D9-89A0-BD0A197E5E58@netflix.com> From: John Baldwin Subject: Re: git: b8d60729deef - main - tcp: Congestion control cleanup. Message-ID: <5cef43ac-0c37-5b3b-c938-1024fc746cb0@FreeBSD.org> Date: Mon, 15 Nov 2021 08:16:43 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.14.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 In-Reply-To: <5A60AA15-F560-44D9-89A0-BD0A197E5E58@netflix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N On 11/14/21 7:03 AM, Randall Stewart wrote: > John: > > This is fine to do, but I want to make sure everyone understands that > I was specifically asked to make compile fail on the transport call > if CC_XXXX or CC_DEFAULT was not defined. Its not how I had the code > originally but it was requested specifically. > > I am fine with all the changes aka it showing up in DEFAULT that’s a > good solution. > > And I think Warner’s patch with an ifndef in cc.c works perfectly that > way if you are say netapp and don’t use newreno you can do a > > nooptions CC_NEWRENO > options CC_CUBIC > options CC_DEFAULT=\â€cubic\†> > And it all just works for you ;) No worries. I think this is one of those cases where some things just aren't obvious until subjected to wider testing. You sought review (and got a fair bit of it), and without some kind of available pre-commit CI I don't know that we can expect folks to boot changes in qemu for all architectures by hand prior to commit (which I think might have been the only realistic way to catch the breakage on arm64 or the vnet issues). I do think one of the goals of Warner's group is to figure out a way to provide some level of pre-commit CI that folks can opt into. FWIW, the arm64 breakage wasn't really due to the changes in this commit either, it was just that this commit exposed a longstanding bug in the hhook code that hadn't yet surfaced. -- John Baldwin From nobody Mon Nov 15 16:26:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4BBA81854153 for ; Mon, 15 Nov 2021 16:26:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x929.google.com (mail-ua1-x929.google.com [IPv6:2607:f8b0:4864:20::929]) (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 4HtF1r0rFrz4S6r for ; Mon, 15 Nov 2021 16:26:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x929.google.com with SMTP id i6so36058126uae.6 for ; Mon, 15 Nov 2021 08:26:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Pc00qRiFMUTCOOlMAuxaNrH41SBwIntFov9o/XsOYzg=; b=AzwDrnfVCYCoSMW17i+VluBDM1R+23TbmlYLXNr6hJetbYD7+DpxSrItHsq9aVaBSG o8tOONu81bm0i5JKtDgn1ncpVfLqrj+T3dOiPn8Obz4ypWdBY5kCnbZn0Z6SIrCQXV9Y qdGRsZxg4B5yzK6gFeXm1tf1AUI+5HQMhviL+JIhIWUiT6v+VxqyB7EXPHjlfApXF5zU 8qk7juAiR+jkYfHUez7QsOtScTwRnHaARxzwAzSjFcAyfMwMsv1vBffRwpMRsAf8xGct 09O2h8w+apu9voU6iB6dsOsEOczdsBq167/6TBPPrQpBl7uk9N8802KUzdvjOc+rPZCu 3rlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Pc00qRiFMUTCOOlMAuxaNrH41SBwIntFov9o/XsOYzg=; b=DtLAA9vRbZezpQ+MF2xpl3NJTQeFN6FGEpSPHH5/QOyY8NPMemsWDzufpRLFqLrTxn fM/nz2QIH2RlzDqzOMAGmqMRfdih6GG7XwWDh/gM+gr9PXMA+iaI+pFocQiEpPLWg+Bp xBY/WPsw7XlPouDjWcR+fUatYTeP/bil6J8sJgL8v53P+xv5c5fQ2oub8rYggt4OrS6n duIabbsytSOX2ORG3is5QRDjxQpkaFO4CuOZrwkOYnJ4KbI9cnVtGgdqd0OLN7ZKvWFP yHIiKbovlwfLD1WTbguBFWuC69lPLocRq52S00FrQ3RK3o6I02WfvNz7rN3jBY24R9Fl DHtQ== X-Gm-Message-State: AOAM530W+7atXm71QXmgGgcVShqM44twkAgUGCcKD/1yv8fQoW14A5GB A11ueuhQa4Q7T1wGZk5sm3uL6lTI7jO+a91KfsojwZCs3ko= X-Google-Smtp-Source: ABdhPJzur7/q7s1h/3xJ78hIf1ieXtQgY28udEzMnRgUPCen4+rPdGxu6p47Ej6z2jEqjta3AkMRbFLEJtmIvecM0Cc= X-Received: by 2002:a9f:2383:: with SMTP id 3mr45119uao.77.1636993583526; Mon, 15 Nov 2021 08:26:23 -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: <202111111131.1ABBVH6s017371@gitrepo.freebsd.org> <2a564b11-b1f4-a4fe-745b-27f45fb134eb@FreeBSD.org> <5A60AA15-F560-44D9-89A0-BD0A197E5E58@netflix.com> <5cef43ac-0c37-5b3b-c938-1024fc746cb0@FreeBSD.org> In-Reply-To: <5cef43ac-0c37-5b3b-c938-1024fc746cb0@FreeBSD.org> From: Warner Losh Date: Mon, 15 Nov 2021 09:26:12 -0700 Message-ID: Subject: Re: git: b8d60729deef - main - tcp: Congestion control cleanup. To: John Baldwin Cc: Randall Stewart , Jessica Clarke , Randall Ray Stewart , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000000bc8c005d0d64526" X-Rspamd-Queue-Id: 4HtF1r0rFrz4S6r X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --0000000000000bc8c005d0d64526 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 15, 2021 at 9:16 AM John Baldwin wrote: > On 11/14/21 7:03 AM, Randall Stewart wrote: > > John: > > > > This is fine to do, but I want to make sure everyone understands that > > I was specifically asked to make compile fail on the transport call > > if CC_XXXX or CC_DEFAULT was not defined. Its not how I had the code > > originally but it was requested specifically. > > > > I am fine with all the changes aka it showing up in DEFAULT that=E2=80= =99s a > > good solution. > > > > And I think Warner=E2=80=99s patch with an ifndef in cc.c works perfect= ly that > > way if you are say netapp and don=E2=80=99t use newreno you can do a > > > > nooptions CC_NEWRENO > > options CC_CUBIC > > options CC_DEFAULT=3D\=E2=80=9Dcubic\=E2=80=9D > > > > And it all just works for you ;) > > No worries. I think this is one of those cases where some things just > aren't obvious until subjected to wider testing. You sought review (and > got a fair bit of it), and without some kind of available pre-commit CI > I don't know that we can expect folks to boot changes in qemu for all > architectures by hand prior to commit (which I think might have been the > only realistic way to catch the breakage on arm64 or the vnet issues). > I do think one of the goals of Warner's group is to figure out a way to > provide some level of pre-commit CI that folks can opt into. > To be fair, there is a simple level of pre-commit checking/CI that folks ca= n opt into today. If you push your branch to github or gitlab, CirrusCI will run a simple smoke test and test-boot on both amd64 and arm64, though I don't know if that would have caught the panic due to different ordering issue or not (I've not tried it). There may be a registration of your fork with CirrusCI that's needed, though. I try to use this for any non-trivial chang= e unless I've done a full build/install world/kernel cycle on the changes. If you are interested in this stuff, please subscribe to git@. I'm trying to have a discussion there, and it would benefit from more participation. > FWIW, the arm64 breakage wasn't really due to the changes in this commit > either, it was just that this commit exposed a longstanding bug in the > hhook code that hadn't yet surfaced. > One thing that would have caught more problems, though, is a make universe prior to commit: That would have caught the now-broken config files. While it would be nice to get this Warner --0000000000000bc8c005d0d64526-- From nobody Mon Nov 15 17:12:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7A2E91898E37; Mon, 15 Nov 2021 17:12: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 4HtG3134thz4kNK; Mon, 15 Nov 2021 17:12:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4AAA21DB17; Mon, 15 Nov 2021 17:12: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 1AFHCTvd060290; Mon, 15 Nov 2021 17:12:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFHCTgL060289; Mon, 15 Nov 2021 17:12:29 GMT (envelope-from git) Date: Mon, 15 Nov 2021 17:12:29 GMT Message-Id: <202111151712.1AFHCTgL060289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: f2b391528ad9 - main - Add ability to suppress UFS/FFS superblock check-hash failure 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: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f2b391528ad9b11a2089457108a55645e358e92f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=f2b391528ad9b11a2089457108a55645e358e92f commit f2b391528ad9b11a2089457108a55645e358e92f Author: Kirk McKusick AuthorDate: 2021-11-15 17:10:47 +0000 Commit: Kirk McKusick CommitDate: 2021-11-15 17:11:54 +0000 Add ability to suppress UFS/FFS superblock check-hash failure messages. When reading UFS/FFS superblocks that have check hashes, both the kernel and libufs print an error message if the check hash is incorrect. This commit adds the ability to request that the error message not be made. It is intended for use by programs like fsck that wants to print its own error message and by kernel subsystems like glabel that just wants to check for possible filesystem types. This capability will be used in followup commits. Sponsored by: Netflix --- sys/ufs/ffs/ffs_subr.c | 26 ++++++++++++++------------ sys/ufs/ffs/fs.h | 10 ++++++++++ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index 60d90aac5bcc..09f03458e753 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -155,7 +155,6 @@ ffs_sbget(void *devfd, struct fs **fsp, off_t altsblock, int i, error, size, blks; uint8_t *space; int32_t *lp; - int chkhash; char *buf; fs = NULL; @@ -168,12 +167,9 @@ ffs_sbget(void *devfd, struct fs **fsp, off_t altsblock, return (error); } } else { - chkhash = 1; - if (altsblock == STDSB_NOHASHFAIL) - chkhash = 0; for (i = 0; sblock_try[i] != -1; i++) { if ((error = readsuper(devfd, &fs, sblock_try[i], 0, - chkhash, readfunc)) == 0) + altsblock, readfunc)) == 0) break; if (fs != NULL) { UFS_FREE(fs, filltype); @@ -279,6 +275,13 @@ readsuper(void *devfd, struct fs **fsp, off_t sblockloc, int isaltsblk, fs->fs_metackhash &= CK_SUPPORTED; fs->fs_flags &= FS_SUPPORTED; if (fs->fs_ckhash != (ckhash = ffs_calc_sbhash(fs))) { + if (chkhash == STDSB_NOMSG) + return (EINTEGRITY); + if (chkhash == STDSB_NOHASHFAIL_NOMSG) { + fs->fs_flags |= FS_NEEDSFSCK; + fs->fs_fmod = 1; + return (0); + } #ifdef _KERNEL res = uprintf("Superblock check-hash failed: recorded " "check-hash 0x%x != computed check-hash 0x%x%s\n", @@ -296,13 +299,12 @@ readsuper(void *devfd, struct fs **fsp, off_t sblockloc, int isaltsblk, "check-hash 0x%x != computed check-hash " "0x%x%s\n", fs->fs_ckhash, ckhash, chkhash == 0 ? " (Ignored)" : ""); - if (chkhash == 0) { - fs->fs_flags |= FS_NEEDSFSCK; - fs->fs_fmod = 1; - return (0); - } - fs->fs_fmod = 0; - return (EINTEGRITY); + if (chkhash == STDSB) + return (EINTEGRITY); + /* chkhash == STDSB_NOHASHFAIL */ + fs->fs_flags |= FS_NEEDSFSCK; + fs->fs_fmod = 1; + return (0); } /* Have to set for old filesystems that predate this field */ fs->fs_sblockactualloc = sblockloc; diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h index 00c153b9684d..8c0047f17caf 100644 --- a/sys/ufs/ffs/fs.h +++ b/sys/ufs/ffs/fs.h @@ -86,9 +86,19 @@ * still return the superblock. This is used by the bootstrap code * to give the system a chance to come up so that fsck can be run * to correct the problem. + * + * STDSB_NOMSG is the same as STDSB but the kernel does not print an + * error message. It is used by programs like fsck that want to + * print their own error message. + * + * STDSB_NOHASHFAIL_NOMSG is the same as STDSB_NOHASHFAIL but the kernel + * does not print an error message. It is used by clients like glabel + * that just want to check for possible filesystem types. */ #define STDSB -1 /* Fail if check-hash is bad */ #define STDSB_NOHASHFAIL -2 /* Ignore check-hash failure */ +#define STDSB_NOMSG -3 /* STDSB with no kernel message */ +#define STDSB_NOHASHFAIL_NOMSG -4 /* STDSB_NOHASHFAIL with no message */ /* * Max number of fragments per block. This value is NOT tweakable. From nobody Mon Nov 15 17:27:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1BEF518A186A; Mon, 15 Nov 2021 17:27: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 4HtGNl02cWz4pvq; Mon, 15 Nov 2021 17:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1EC41DAA9; Mon, 15 Nov 2021 17:27: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 1AFHRoNi073598; Mon, 15 Nov 2021 17:27:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFHRosi073597; Mon, 15 Nov 2021 17:27:50 GMT (envelope-from git) Date: Mon, 15 Nov 2021 17:27:50 GMT Message-Id: <202111151727.1AFHRosi073597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 728f2c61312a - main - Suppress UFS/FFS superblock check-hash failure messages when identifying disk labels. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 728f2c61312aaf550f0a761bdbcdcbd4977e23f0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=728f2c61312aaf550f0a761bdbcdcbd4977e23f0 commit 728f2c61312aaf550f0a761bdbcdcbd4977e23f0 Author: Kirk McKusick AuthorDate: 2021-11-15 17:26:21 +0000 Commit: Kirk McKusick CommitDate: 2021-11-15 17:26:21 +0000 Suppress UFS/FFS superblock check-hash failure messages when identifying disk labels. When the geom label subsystem is checking labels to discover if they are UFS/FFS filesystems, do not print a kernel error message if a superblock is found with a check-hash error. That issue is best handled later if an attempt is made to actually use the filesystem. Sponsored by: Netflix --- sys/geom/label/g_label_ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/label/g_label_ufs.c b/sys/geom/label/g_label_ufs.c index b29a04c9f348..0de09ec93896 100644 --- a/sys/geom/label/g_label_ufs.c +++ b/sys/geom/label/g_label_ufs.c @@ -140,7 +140,7 @@ g_label_ufs_taste_common(struct g_consumer *cp, char *label, size_t size, int wh fs = NULL; if (SBLOCKSIZE % pp->sectorsize != 0 || ffs_sbget(cp, &fs, - STDSB_NOHASHFAIL, M_GEOM, g_use_g_read_data) != 0) { + STDSB_NOHASHFAIL_NOMSG, M_GEOM, g_use_g_read_data) != 0) { KASSERT(fs == NULL, ("g_label_ufs_taste_common: non-NULL fs %p\n", fs)); return; From nobody Mon Nov 15 18:02:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4D96E188A057; Mon, 15 Nov 2021 18:02: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 4HtH9F1dLCz3Hd2; Mon, 15 Nov 2021 18:02:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 196591E53D; Mon, 15 Nov 2021 18:02: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 1AFI2vxF027254; Mon, 15 Nov 2021 18:02:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFI2uU2027253; Mon, 15 Nov 2021 18:02:56 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:02:56 GMT Message-Id: <202111151802.1AFI2uU2027253@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: 1fb99e97e959 - main - bus: Make BUS_TRANSLATE_RESOURCE behave more like other bus methods List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1fb99e97e959a51306fd216a41977079d4689665 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1fb99e97e959a51306fd216a41977079d4689665 commit 1fb99e97e959a51306fd216a41977079d4689665 Author: Mark Johnston AuthorDate: 2021-11-15 16:29:49 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 18:01:30 +0000 bus: Make BUS_TRANSLATE_RESOURCE behave more like other bus methods - Return an errno value upon failure, instead of 1. - Provide a bus_translate_resource() wrapper. - Implement the generic version, which traverses the hierarchy until a bus driver with a non-trivial implementation is found, in subr_bus.c like other similar default implementations. - Make ofw_pcib_translate_resource() return an error if a matching PCI address range is not found. - Make generic_pcie_translate_resource_common() return an int instead of a bool. Fix up callers. No functional change intended. Reviewed by: imp, jhb MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32855 --- sys/compat/linuxkpi/common/src/linux_pci.c | 9 +++++--- sys/dev/ofw/ofw_pcib.c | 6 +++--- sys/dev/pci/pci_host_generic.c | 19 +++++++++-------- sys/dev/pci/pci_user.c | 2 +- sys/kern/bus_if.m | 18 ++++------------ sys/kern/subr_bus.c | 33 ++++++++++++++++++++++++++++++ sys/sys/bus.h | 2 ++ 7 files changed, 60 insertions(+), 29 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index db94bc08239e..8ec6a5af2140 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -690,14 +690,17 @@ pci_resource_start(struct pci_dev *pdev, int bar) struct resource_list_entry *rle; rman_res_t newstart; device_t dev; + int error; if ((rle = linux_pci_get_bar(pdev, bar, true)) == NULL) return (0); dev = pdev->pdrv != NULL && pdev->pdrv->isdrm ? device_get_parent(pdev->dev.bsddev) : pdev->dev.bsddev; - if (BUS_TRANSLATE_RESOURCE(dev, rle->type, rle->start, &newstart)) { - device_printf(pdev->dev.bsddev, "translate of %#jx failed\n", - (uintmax_t)rle->start); + error = bus_translate_resource(dev, rle->type, rle->start, &newstart); + if (error != 0) { + device_printf(pdev->dev.bsddev, + "translate of %#jx failed: %d\n", + (uintmax_t)rle->start, error); return (0); } return (newstart); diff --git a/sys/dev/ofw/ofw_pcib.c b/sys/dev/ofw/ofw_pcib.c index 1de5a884ebc9..b10feffedf6c 100644 --- a/sys/dev/ofw/ofw_pcib.c +++ b/sys/dev/ofw/ofw_pcib.c @@ -511,11 +511,11 @@ ofw_pcib_translate_resource(device_t bus, int type, rman_res_t start, if (type == space) { start += (rp->host - rp->pci); - break; + *newstart = start; + return (0); } } - *newstart = start; - return (0); + return (ENOENT); } static int diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c index 4d7d9f314dce..e1a0a48bad3a 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -331,7 +331,7 @@ pci_host_generic_core_release_resource(device_t dev, device_t child, int type, return (bus_generic_release_resource(dev, child, type, rid, res)); } -static bool +static int generic_pcie_translate_resource_common(device_t dev, int type, rman_res_t start, rman_res_t end, rman_res_t *new_start, rman_res_t *new_end) { @@ -385,7 +385,7 @@ generic_pcie_translate_resource_common(device_t dev, int type, rman_res_t start, break; } - return (found); + return (found ? 0 : ENOENT); } static int @@ -394,7 +394,7 @@ generic_pcie_translate_resource(device_t bus, int type, { rman_res_t newend; /* unused */ - return (!generic_pcie_translate_resource_common( + return (generic_pcie_translate_resource_common( bus, type, start, 0, newstart, &newend)); } @@ -422,8 +422,8 @@ pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, type, rid, start, end, count, flags)); /* Translate the address from a PCI address to a physical address */ - if (!generic_pcie_translate_resource_common(dev, type, start, end, &phys_start, - &phys_end)) { + if (generic_pcie_translate_resource_common(dev, type, start, end, + &phys_start, &phys_end) != 0) { device_printf(dev, "Failed to translate resource %jx-%jx type %x for %s\n", (uintmax_t)start, (uintmax_t)end, type, @@ -474,9 +474,12 @@ generic_pcie_activate_resource(device_t dev, device_t child, int type, start = rman_get_start(r); end = rman_get_end(r); - if (!generic_pcie_translate_resource_common(dev, type, start, end, &start, - &end)) - return (EINVAL); + res = generic_pcie_translate_resource_common(dev, type, start, end, + &start, &end); + if (res != 0) { + rman_deactivate_resource(r); + return (res); + } rman_set_start(r, start); rman_set_end(r, end); diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c index 7ebd9b66138c..ce63122128c5 100644 --- a/sys/dev/pci/pci_user.c +++ b/sys/dev/pci/pci_user.c @@ -877,7 +877,7 @@ pci_bar_mmap(device_t pcidev, struct pci_bar_mmap *pbm) return (EBUSY); /* XXXKIB enable if _ACTIVATE */ if (!PCI_BAR_MEM(pm->pm_value)) return (EIO); - error = BUS_TRANSLATE_RESOURCE(pcidev, SYS_RES_MEMORY, + error = bus_translate_resource(pcidev, SYS_RES_MEMORY, pm->pm_value & PCIM_BAR_MEM_BASE, &membase); if (error != 0) return (error); diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m index 0bd7056019ab..0f673c983d08 100644 --- a/sys/kern/bus_if.m +++ b/sys/kern/bus_if.m @@ -77,18 +77,6 @@ CODE { return (0); } - static int - null_translate_resource(device_t bus, int type, rman_res_t start, - rman_res_t *newstart) - { - if (device_get_parent(bus) != NULL) - return (BUS_TRANSLATE_RESOURCE(device_get_parent(bus), - type, start, newstart)); - - *newstart = start; - return (0); - } - static ssize_t null_get_property(device_t dev, device_t child, const char *propname, void *propvalue, size_t size) @@ -425,10 +413,12 @@ METHOD int adjust_resource { rman_res_t _end; }; - /** * @brief translate a resource value * + * Give a bus driver the opportunity to translate resource ranges. If + * successful, the host's view of the resource starting at @p _start is + * returned in @p _newstart, otherwise an error is returned. * * @param _dev the device associated with the resource * @param _type the type of resource @@ -440,7 +430,7 @@ METHOD int translate_resource { int _type; rman_res_t _start; rman_res_t *_newstart; -} DEFAULT null_translate_resource; +} DEFAULT bus_generic_translate_resource; /** * @brief Release a resource diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index cdbaee9c203e..09072e1a23de 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -4242,6 +4242,24 @@ bus_generic_adjust_resource(device_t dev, device_t child, int type, return (EINVAL); } +/* + * @brief Helper function for implementing BUS_TRANSLATE_RESOURCE(). + * + * This simple implementation of BUS_TRANSLATE_RESOURCE() simply calls the + * BUS_TRANSLATE_RESOURCE() method of the parent of @p dev. If there is no + * parent, no translation happens. + */ +int +bus_generic_translate_resource(device_t dev, int type, rman_res_t start, + rman_res_t *newstart) +{ + if (dev->parent) + return (BUS_TRANSLATE_RESOURCE(dev->parent, type, start, + newstart)); + *newstart = start; + return (0); +} + /** * @brief Helper function for implementing BUS_ALLOC_RESOURCE(). * @@ -4672,6 +4690,21 @@ bus_adjust_resource(device_t dev, int type, struct resource *r, rman_res_t start return (BUS_ADJUST_RESOURCE(dev->parent, dev, type, r, start, end)); } +/** + * @brief Wrapper function for BUS_TRANSLATE_RESOURCE(). + * + * This function simply calls the BUS_TRANSLATE_RESOURCE() method of the + * parent of @p dev. + */ +int +bus_translate_resource(device_t dev, int type, rman_res_t start, + rman_res_t *newstart) +{ + if (dev->parent == NULL) + return (EINVAL); + return (BUS_TRANSLATE_RESOURCE(dev->parent, type, start, newstart)); +} + /** * @brief Wrapper function for BUS_ACTIVATE_RESOURCE(). * diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 8544aa32cff8..0942b7246ae4 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -515,6 +515,8 @@ void bus_release_resources(device_t dev, const struct resource_spec *rs, int bus_adjust_resource(device_t child, int type, struct resource *r, rman_res_t start, rman_res_t end); +int bus_translate_resource(device_t child, int type, rman_res_t start, + rman_res_t *newstart); struct resource *bus_alloc_resource(device_t dev, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); From nobody Mon Nov 15 18:02:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E1CFC1889E54; Mon, 15 Nov 2021 18:02: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 4HtH9G2vxmz3Hsj; Mon, 15 Nov 2021 18:02:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 367371E59C; Mon, 15 Nov 2021 18:02: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 1AFI2ws0027280; Mon, 15 Nov 2021 18:02:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFI2wDS027279; Mon, 15 Nov 2021 18:02:58 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:02:58 GMT Message-Id: <202111151802.1AFI2wDS027279@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: b0acc3f11ba3 - main - vm_pager: Optimize an assertion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b0acc3f11ba31f0aea8ca5ce2720b481dfa79d1b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b0acc3f11ba31f0aea8ca5ce2720b481dfa79d1b commit b0acc3f11ba31f0aea8ca5ce2720b481dfa79d1b Author: Mark Johnston AuthorDate: 2021-11-15 16:33:30 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 18:01:30 +0000 vm_pager: Optimize an assertion Obtained from: jeff (object_concurrency patches) Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D32946 --- sys/vm/vm_pager.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c index 69f0a2dc2bbb..6a186156b616 100644 --- a/sys/vm/vm_pager.c +++ b/sys/vm/vm_pager.c @@ -338,12 +338,11 @@ vm_pager_get_pages(vm_object_t object, vm_page_t *m, int count, int *rbehind, * updated the array. */ #ifdef INVARIANTS - VM_OBJECT_RLOCK(object); - KASSERT(m[i] == vm_page_lookup(object, pindex++), + KASSERT(m[i] == vm_page_relookup(object, pindex++), ("%s: mismatch page %p pindex %ju", __func__, m[i], (uintmax_t )pindex - 1)); - VM_OBJECT_RUNLOCK(object); #endif + /* * Zero out partially filled data. */ From nobody Mon Nov 15 18:02:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E2E3B1889FCE; Mon, 15 Nov 2021 18:02: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 4HtH9H577Fz3Hsq; Mon, 15 Nov 2021 18:02:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 689C71E6B0; Mon, 15 Nov 2021 18:02: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 1AFI2x3t027309; Mon, 15 Nov 2021 18:02:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFI2xFW027308; Mon, 15 Nov 2021 18:02:59 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:02:59 GMT Message-Id: <202111151802.1AFI2xFW027308@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: 87b646630c48 - main - vm_page: Consolidate page busy sleep mechanisms List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 87b646630c4892e21446cd096bea6bcaecea33ac Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=87b646630c4892e21446cd096bea6bcaecea33ac commit 87b646630c4892e21446cd096bea6bcaecea33ac Author: Mark Johnston AuthorDate: 2021-11-15 16:35:44 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 18:01:30 +0000 vm_page: Consolidate page busy sleep mechanisms - Modify vm_page_busy_sleep() and vm_page_busy_sleep_unlocked() to take a VM_ALLOC_* flag indicating whether to sleep on shared-busy, and fix up callers. - Modify vm_page_busy_sleep() to return a status indicating whether the object lock was dropped, and fix up callers. - Convert callers of vm_page_sleep_if_busy() to use vm_page_busy_sleep() instead. - Remove vm_page_sleep_if_(x)busy(). No functional change intended. Obtained from: jeff (object_concurrency patches) Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32947 --- ObsoleteFiles.inc | 3 ++ share/man/man9/Makefile | 1 - share/man/man9/vm_page_busy.9 | 40 +++++++++--------- sys/vm/vm_fault.c | 5 +-- sys/vm/vm_object.c | 27 ++++++++---- sys/vm/vm_page.c | 97 ++++++++----------------------------------- sys/vm/vm_page.h | 6 +-- 7 files changed, 62 insertions(+), 117 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index aec721b740b9..a5ca6b8542a1 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -40,6 +40,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20211115: vm_page_sleep_if_busy removed +OLD_FILES+=share/man/man9/vm_page_sleep_if_busy.9.gz + # 20211113: new clang import which bumps version from 12.0.1 to 13.0.0. OLD_FILES+=usr/lib/clang/12.0.1/include/cuda_wrappers/algorithm OLD_FILES+=usr/lib/clang/12.0.1/include/cuda_wrappers/complex diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index eb4465259226..b22dd2dff262 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2354,7 +2354,6 @@ MLINKS+=vm_page_busy.9 vm_page_busied.9 \ vm_page_busy.9 vm_page_busy_sleep.9 \ vm_page_busy.9 vm_page_sbusied.9 \ vm_page_busy.9 vm_page_sbusy.9 \ - vm_page_busy.9 vm_page_sleep_if_busy.9 \ vm_page_busy.9 vm_page_sunbusy.9 \ vm_page_busy.9 vm_page_trysbusy.9 \ vm_page_busy.9 vm_page_tryxbusy.9 \ diff --git a/share/man/man9/vm_page_busy.9 b/share/man/man9/vm_page_busy.9 index f4e922a8319f..3f08a467bcb1 100644 --- a/share/man/man9/vm_page_busy.9 +++ b/share/man/man9/vm_page_busy.9 @@ -24,7 +24,7 @@ .\" DAMAGE. .\" .\" $FreeBSD$ -.Dd August 07, 2013 +.Dd November 11, 2021 .Dt VM_PAGE_BUSY 9 .Os .Sh NAME @@ -33,7 +33,6 @@ .Nm vm_page_busy_sleep , .Nm vm_page_sbusied , .Nm vm_page_sbusy , -.Nm vm_page_sleep_if_busy , .Nm vm_page_sunbusy , .Nm vm_page_trysbusy , .Nm vm_page_tryxbusy , @@ -52,14 +51,12 @@ .Fn vm_page_busied "vm_page_t m" .Ft void .Fn vm_page_busy_downgrade "vm_page_t m" -.Ft void -.Fn vm_page_busy_sleep "vm_page_t m" "const char *msg" +.Ft bool +.Fn vm_page_busy_sleep "vm_page_t m" "const char *msg" "int allocflags" .Ft int .Fn vm_page_sbusied "vm_page_t m" .Ft void .Fn vm_page_sbusy "vm_page_t m" -.Ft int -.Fn vm_page_sleep_if_busy "vm_page_t m" "const char *msg" .Ft void .Fn vm_page_sunbusy "vm_page_t m" .Ft int @@ -114,8 +111,23 @@ from an exclusive busy state to a shared busy state. .Pp The .Fn vm_page_busy_sleep -function puts the invoking thread to sleep using the appropriate -waitchannels for the busy mechanism. +checks the busy state of the page +.Fa m +and puts the invoking thread to sleep if the page is busy. +The VM object for the page must be locked. +The +.Fa allocflags +parameter must be either +.Dv 0 , +in which case the function will sleep if the page is busied, +or +.Dv VM_ALLOC_IGN_SBUSY , +in which case the function will sleep only if the page is exclusively +busied. +A return value of true indicates that the invoking thread was put to +sleep and that the object was unlocked. +A return value of false indicates that the invoking thread did not sleep +and the object remains locked. The parameter .Fa msg is a string describing the sleep condition for userland tools. @@ -133,18 +145,6 @@ function shared busies .Fa m . .Pp The -.Fn vm_page_sleep_if_busy -function puts the invoking thread to sleep, using the appropriate -waitchannels for the busy mechanism, if -.Fa m . -is busied in either exclusive or shared mode. -If the invoking thread slept a non-zero value is returned, otherwise -0 is returned. -The parameter -.Fa msg -is a string describing the sleep condition for userland tools. -.Pp -The .Fn vm_page_sunbusy function shared unbusies .Fa m . diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 6bc59222b50e..d459bad78dd8 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1294,9 +1294,8 @@ vm_fault_busy_sleep(struct faultstate *fs) } vm_object_pip_wakeup(fs->object); unlock_map(fs); - if (fs->m == vm_page_lookup(fs->object, fs->pindex)) - vm_page_busy_sleep(fs->m, "vmpfw", false); - else + if (fs->m != vm_page_lookup(fs->object, fs->pindex) || + !vm_page_busy_sleep(fs->m, "vmpfw", 0)) VM_OBJECT_WUNLOCK(fs->object); VM_CNT_INC(v_intrans); vm_object_deallocate(fs->first_object); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 5bbe7faed50b..6c4df272f739 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1397,7 +1397,8 @@ next_page: */ vm_page_aflag_set(tm, PGA_REFERENCED); } - vm_page_busy_sleep(tm, "madvpo", false); + if (!vm_page_busy_sleep(tm, "madvpo", 0)) + VM_OBJECT_WUNLOCK(tobject); goto relookup; } vm_page_advise(tm, advice); @@ -1581,7 +1582,8 @@ retry: */ if (vm_page_tryxbusy(m) == 0) { VM_OBJECT_WUNLOCK(new_object); - vm_page_sleep_if_busy(m, "spltwt"); + if (vm_page_busy_sleep(m, "spltwt", 0)) + VM_OBJECT_WLOCK(orig_object); VM_OBJECT_WLOCK(new_object); goto retry; } @@ -1667,14 +1669,17 @@ vm_object_collapse_scan_wait(vm_object_t object, vm_page_t p) VM_OBJECT_WUNLOCK(object); VM_OBJECT_WUNLOCK(backing_object); vm_radix_wait(); + VM_OBJECT_WLOCK(object); + } else if (p->object == object) { + VM_OBJECT_WUNLOCK(backing_object); + if (vm_page_busy_sleep(p, "vmocol", 0)) + VM_OBJECT_WLOCK(object); } else { - if (p->object == object) + VM_OBJECT_WUNLOCK(object); + if (!vm_page_busy_sleep(p, "vmocol", 0)) VM_OBJECT_WUNLOCK(backing_object); - else - VM_OBJECT_WUNLOCK(object); - vm_page_busy_sleep(p, "vmocol", false); + VM_OBJECT_WLOCK(object); } - VM_OBJECT_WLOCK(object); VM_OBJECT_WLOCK(backing_object); return (TAILQ_FIRST(&backing_object->memq)); } @@ -2103,7 +2108,8 @@ again: * not specified. */ if (vm_page_tryxbusy(p) == 0) { - vm_page_sleep_if_busy(p, "vmopar"); + if (vm_page_busy_sleep(p, "vmopar", 0)) + VM_OBJECT_WLOCK(object); goto again; } if (vm_page_wired(p)) { @@ -2407,7 +2413,10 @@ again: VM_OBJECT_RUNLOCK(tobject); tobject = t1object; } - vm_page_busy_sleep(tm, "unwbo", true); + tobject = tm->object; + if (!vm_page_busy_sleep(tm, "unwbo", + VM_ALLOC_IGN_SBUSY)) + VM_OBJECT_RUNLOCK(tobject); goto again; } vm_page_unwire(tm, queue); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index ac710bf43d08..28eb95d9fb33 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1000,24 +1000,26 @@ vm_page_sunbusy(vm_page_t m) * vm_page_busy_sleep: * * Sleep if the page is busy, using the page pointer as wchan. - * This is used to implement the hard-path of busying mechanism. + * This is used to implement the hard-path of the busying mechanism. + * + * If VM_ALLOC_IGN_SBUSY is specified in allocflags, the function + * will not sleep if the page is shared-busy. * - * If nonshared is true, sleep only if the page is xbusy. + * The object lock must be held on entry. * - * The object lock must be held on entry and will be released on exit. + * Returns true if it slept and dropped the object lock, or false + * if there was no sleep and the lock is still held. */ -void -vm_page_busy_sleep(vm_page_t m, const char *wmesg, bool nonshared) +bool +vm_page_busy_sleep(vm_page_t m, const char *wmesg, int allocflags) { vm_object_t obj; obj = m->object; VM_OBJECT_ASSERT_LOCKED(obj); - vm_page_lock_assert(m, MA_NOTOWNED); - if (!_vm_page_busy_sleep(obj, m, m->pindex, wmesg, - nonshared ? VM_ALLOC_SBUSY : 0 , true)) - VM_OBJECT_DROP(obj); + return (_vm_page_busy_sleep(obj, m, m->pindex, wmesg, allocflags, + true)); } /* @@ -1026,21 +1028,19 @@ vm_page_busy_sleep(vm_page_t m, const char *wmesg, bool nonshared) * Sleep if the page is busy, using the page pointer as wchan. * This is used to implement the hard-path of busying mechanism. * - * If nonshared is true, sleep only if the page is xbusy. + * If VM_ALLOC_IGN_SBUSY is specified in allocflags, the function + * will not sleep if the page is shared-busy. * * The object lock must not be held on entry. The operation will * return if the page changes identity. */ void vm_page_busy_sleep_unlocked(vm_object_t obj, vm_page_t m, vm_pindex_t pindex, - const char *wmesg, bool nonshared) + const char *wmesg, int allocflags) { - VM_OBJECT_ASSERT_UNLOCKED(obj); - vm_page_lock_assert(m, MA_NOTOWNED); - _vm_page_busy_sleep(obj, m, pindex, wmesg, - nonshared ? VM_ALLOC_SBUSY : 0, false); + (void)_vm_page_busy_sleep(obj, m, pindex, wmesg, allocflags, false); } /* @@ -1050,6 +1050,8 @@ vm_page_busy_sleep_unlocked(vm_object_t obj, vm_page_t m, vm_pindex_t pindex, * lockstate against parameters. Returns true if it sleeps and * false otherwise. * + * allocflags uses VM_ALLOC_* flags to specify the lock required. + * * If locked is true the lock will be dropped for any true returns * and held for any false returns. */ @@ -1395,71 +1397,6 @@ vm_page_free_invalid(vm_page_t m) vm_page_free(m); } -/* - * vm_page_sleep_if_busy: - * - * Sleep and release the object lock if the page is busied. - * Returns TRUE if the thread slept. - * - * The given page must be unlocked and object containing it must - * be locked. - */ -int -vm_page_sleep_if_busy(vm_page_t m, const char *wmesg) -{ - vm_object_t obj; - - vm_page_lock_assert(m, MA_NOTOWNED); - VM_OBJECT_ASSERT_WLOCKED(m->object); - - /* - * The page-specific object must be cached because page - * identity can change during the sleep, causing the - * re-lock of a different object. - * It is assumed that a reference to the object is already - * held by the callers. - */ - obj = m->object; - if (_vm_page_busy_sleep(obj, m, m->pindex, wmesg, 0, true)) { - VM_OBJECT_WLOCK(obj); - return (TRUE); - } - return (FALSE); -} - -/* - * vm_page_sleep_if_xbusy: - * - * Sleep and release the object lock if the page is xbusied. - * Returns TRUE if the thread slept. - * - * The given page must be unlocked and object containing it must - * be locked. - */ -int -vm_page_sleep_if_xbusy(vm_page_t m, const char *wmesg) -{ - vm_object_t obj; - - vm_page_lock_assert(m, MA_NOTOWNED); - VM_OBJECT_ASSERT_WLOCKED(m->object); - - /* - * The page-specific object must be cached because page - * identity can change during the sleep, causing the - * re-lock of a different object. - * It is assumed that a reference to the object is already - * held by the callers. - */ - obj = m->object; - if (_vm_page_busy_sleep(obj, m, m->pindex, wmesg, VM_ALLOC_SBUSY, - true)) { - VM_OBJECT_WLOCK(obj); - return (TRUE); - } - return (FALSE); -} - /* * vm_page_dirty_KBI: [ internal use only ] * diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 21e33facc0a8..7adeaa7ddbe2 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -599,9 +599,9 @@ malloc2vm_flags(int malloc_flags) bool vm_page_busy_acquire(vm_page_t m, int allocflags); void vm_page_busy_downgrade(vm_page_t m); int vm_page_busy_tryupgrade(vm_page_t m); -void vm_page_busy_sleep(vm_page_t m, const char *msg, bool nonshared); +bool vm_page_busy_sleep(vm_page_t m, const char *msg, int allocflags); void vm_page_busy_sleep_unlocked(vm_object_t obj, vm_page_t m, - vm_pindex_t pindex, const char *wmesg, bool nonshared); + vm_pindex_t pindex, const char *wmesg, int allocflags); void vm_page_free(vm_page_t m); void vm_page_free_zero(vm_page_t m); @@ -685,8 +685,6 @@ vm_page_t vm_page_scan_contig(u_long npages, vm_page_t m_start, vm_page_t m_end, u_long alignment, vm_paddr_t boundary, int options); vm_page_bits_t vm_page_set_dirty(vm_page_t m); void vm_page_set_valid_range(vm_page_t m, int base, int size); -int vm_page_sleep_if_busy(vm_page_t m, const char *msg); -int vm_page_sleep_if_xbusy(vm_page_t m, const char *msg); vm_offset_t vm_page_startup(vm_offset_t vaddr); void vm_page_sunbusy(vm_page_t m); bool vm_page_try_remove_all(vm_page_t m); From nobody Mon Nov 15 18:03:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1EB6D1889FE4; Mon, 15 Nov 2021 18:03: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 4HtH9K58Xsz3Hnn; Mon, 15 Nov 2021 18:03:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DF0E1E4CF; Mon, 15 Nov 2021 18:03: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 1AFI30nv027333; Mon, 15 Nov 2021 18:03:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFI30hO027332; Mon, 15 Nov 2021 18:03:00 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:03:00 GMT Message-Id: <202111151803.1AFI30hO027332@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: a2665158d03e - main - vm_page: Remove vm_page_sbusy() and vm_page_xbusy() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a2665158d03e87dad410384e5c61c72e675f3edd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a2665158d03e87dad410384e5c61c72e675f3edd commit a2665158d03e87dad410384e5c61c72e675f3edd Author: Mark Johnston AuthorDate: 2021-11-15 16:35:52 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 18:01:30 +0000 vm_page: Remove vm_page_sbusy() and vm_page_xbusy() They are unused today and cannot be safely used in the face of unlocked lookup, in which pages may be busied without the object lock held. Obtained from: jeff (object_concurrency patches) Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32948 --- ObsoleteFiles.inc | 4 +++- share/man/man9/Makefile | 2 -- share/man/man9/vm_page_busy.9 | 16 ---------------- sys/vm/vm_page.h | 12 ------------ 4 files changed, 3 insertions(+), 31 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index a5ca6b8542a1..00cfe2a33129 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -40,7 +40,9 @@ # xargs -n1 | sort | uniq -d; # done -# 20211115: vm_page_sleep_if_busy removed +# 20211115: vm_page busy functions removed +OLD_FILES+=share/man/man9/vm_page_sbusy.9.gz +OLD_FILES+=share/man/man9/vm_page_xbusy.9.gz OLD_FILES+=share/man/man9/vm_page_sleep_if_busy.9.gz # 20211113: new clang import which bumps version from 12.0.1 to 13.0.0. diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index b22dd2dff262..2bb45e3a6dc8 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2353,12 +2353,10 @@ MLINKS+=vm_page_busy.9 vm_page_busied.9 \ vm_page_busy.9 vm_page_busy_downgrade.9 \ vm_page_busy.9 vm_page_busy_sleep.9 \ vm_page_busy.9 vm_page_sbusied.9 \ - vm_page_busy.9 vm_page_sbusy.9 \ vm_page_busy.9 vm_page_sunbusy.9 \ vm_page_busy.9 vm_page_trysbusy.9 \ vm_page_busy.9 vm_page_tryxbusy.9 \ vm_page_busy.9 vm_page_xbusied.9 \ - vm_page_busy.9 vm_page_xbusy.9 \ vm_page_busy.9 vm_page_xunbusy.9 \ vm_page_busy.9 vm_page_assert_sbusied.9 \ vm_page_busy.9 vm_page_assert_unbusied.9 \ diff --git a/share/man/man9/vm_page_busy.9 b/share/man/man9/vm_page_busy.9 index 3f08a467bcb1..88511aafabca 100644 --- a/share/man/man9/vm_page_busy.9 +++ b/share/man/man9/vm_page_busy.9 @@ -32,12 +32,10 @@ .Nm vm_page_busy_downgrade , .Nm vm_page_busy_sleep , .Nm vm_page_sbusied , -.Nm vm_page_sbusy , .Nm vm_page_sunbusy , .Nm vm_page_trysbusy , .Nm vm_page_tryxbusy , .Nm vm_page_xbusied , -.Nm vm_page_xbusy , .Nm vm_page_xunbusy , .Nm vm_page_assert_sbusied , .Nm vm_page_assert_unbusied , @@ -56,8 +54,6 @@ .Ft int .Fn vm_page_sbusied "vm_page_t m" .Ft void -.Fn vm_page_sbusy "vm_page_t m" -.Ft void .Fn vm_page_sunbusy "vm_page_t m" .Ft int .Fn vm_page_trysbusy "vm_page_t m" @@ -66,8 +62,6 @@ .Ft int .Fn vm_page_xbusied "vm_page_t m" .Ft void -.Fn vm_page_xbusy "vm_page_t m" -.Ft void .Fn vm_page_xunbusy "vm_page_t m" .Pp .Cd "options INVARIANTS" @@ -140,11 +134,6 @@ in shared mode. Returns zero otherwise. .Pp The -.Fn vm_page_sbusy -function shared busies -.Fa m . -.Pp -The .Fn vm_page_sunbusy function shared unbusies .Fa m . @@ -173,11 +162,6 @@ in exclusive mode. Returns zero otherwise. .Pp The -.Fn vm_page_xbusy -function exclusive busies -.Fa m . -.Pp -The .Fn vm_page_xunbusy function exclusive unbusies .Fa m . diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 7adeaa7ddbe2..7183e0577bba 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -755,24 +755,12 @@ void vm_page_lock_assert_KBI(vm_page_t m, int a, const char *file, int line); #define vm_page_busied(m) \ (vm_page_busy_fetch(m) != VPB_UNBUSIED) -#define vm_page_sbusy(m) do { \ - if (!vm_page_trysbusy(m)) \ - panic("%s: page %p failed shared busying", __func__, \ - (m)); \ -} while (0) - #define vm_page_xbusied(m) \ ((vm_page_busy_fetch(m) & VPB_SINGLE_EXCLUSIVE) != 0) #define vm_page_busy_freed(m) \ (vm_page_busy_fetch(m) == VPB_FREED) -#define vm_page_xbusy(m) do { \ - if (!vm_page_tryxbusy(m)) \ - panic("%s: page %p failed exclusive busying", __func__, \ - (m)); \ -} while (0) - /* Note: page m's lock must not be owned by the caller. */ #define vm_page_xunbusy(m) do { \ if (!atomic_cmpset_rel_int(&(m)->busy_lock, \ From nobody Mon Nov 15 18:03:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BE86D188A223; Mon, 15 Nov 2021 18:03: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 4HtH9M0fGnz3HlM; Mon, 15 Nov 2021 18:03:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF4521E53E; Mon, 15 Nov 2021 18:03: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 1AFI310p027357; Mon, 15 Nov 2021 18:03:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFI31mI027356; Mon, 15 Nov 2021 18:03:01 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:03:01 GMT Message-Id: <202111151803.1AFI31mI027356@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: d28af1abf031 - main - vm: Add a mode to vm_object_page_remove() which skips invalid 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d28af1abf031ee87a478b37180e3f0c518caedf6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d28af1abf031ee87a478b37180e3f0c518caedf6 commit d28af1abf031ee87a478b37180e3f0c518caedf6 Author: Mark Johnston AuthorDate: 2021-11-15 16:44:04 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 18:01:30 +0000 vm: Add a mode to vm_object_page_remove() which skips invalid pages This will be used to break a deadlock in ZFS between the per-mountpoint teardown lock and page busy locks. In particular, when purging data from the page cache during dataset rollback, we want to avoid blocking on the busy state of invalid pages since the busying thread may be blocked on the teardown lock in zfs_getpages(). Add a helper, vn_pages_remove_valid(), for use by filesystems. Bump __FreeBSD_version so that the OpenZFS port can make use of the new helper. PR: 258208 Reviewed by: avg, kib, sef Tested by: pho (part of a larger patch) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32931 --- sys/kern/vfs_vnops.c | 22 ++++++++++++++++++++++ sys/sys/vnode.h | 2 ++ sys/vm/vm_object.c | 19 +++++++++++++++++++ sys/vm/vm_object.h | 1 + 4 files changed, 44 insertions(+) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 79d422aacfef..66fcbf80bb3a 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -2429,6 +2429,10 @@ vn_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, return (setfown(td, active_cred, vp, uid, gid)); } +/* + * Remove pages in the range ["start", "end") from the vnode's VM object. If + * "end" is 0, then the range extends to the end of the object. + */ void vn_pages_remove(struct vnode *vp, vm_pindex_t start, vm_pindex_t end) { @@ -2441,6 +2445,24 @@ vn_pages_remove(struct vnode *vp, vm_pindex_t start, vm_pindex_t end) VM_OBJECT_WUNLOCK(object); } +/* + * Like vn_pages_remove(), but skips invalid pages, which by definition are not + * mapped into any process' address space. Filesystems may use this in + * preference to vn_pages_remove() to avoid blocking on pages busied in + * preparation for a VOP_GETPAGES. + */ +void +vn_pages_remove_valid(struct vnode *vp, vm_pindex_t start, vm_pindex_t end) +{ + vm_object_t object; + + if ((object = vp->v_object) == NULL) + return; + VM_OBJECT_WLOCK(object); + vm_object_page_remove(object, start, end, OBJPR_VALIDONLY); + VM_OBJECT_WUNLOCK(object); +} + int vn_bmap_seekhole_locked(struct vnode *vp, u_long cmd, off_t *off, struct ucred *cred) diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 6bffd7656c62..1a202abfd4dd 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -770,6 +770,8 @@ int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, int vn_open_vnode(struct vnode *vp, int fmode, struct ucred *cred, struct thread *td, struct file *fp); void vn_pages_remove(struct vnode *vp, vm_pindex_t start, vm_pindex_t end); +void vn_pages_remove_valid(struct vnode *vp, vm_pindex_t start, + vm_pindex_t end); int vn_pollrecord(struct vnode *vp, struct thread *p, int events); int vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base, int len, off_t offset, enum uio_seg segflg, int ioflg, diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 6c4df272f739..c465a2cf76dd 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2099,6 +2099,21 @@ again: for (; p != NULL && (p->pindex < end || end == 0); p = next) { next = TAILQ_NEXT(p, listq); + /* + * Skip invalid pages if asked to do so. Try to avoid acquiring + * the busy lock, as some consumers rely on this to avoid + * deadlocks. + * + * A thread may concurrently transition the page from invalid to + * valid using only the busy lock, so the result of this check + * is immediately stale. It is up to consumers to handle this, + * for instance by ensuring that all invalid->valid transitions + * happen with a mutex held, as may be possible for a + * filesystem. + */ + if ((options & OBJPR_VALIDONLY) != 0 && vm_page_none_valid(p)) + continue; + /* * If the page is wired for any reason besides the existence * of managed, wired mappings, then it cannot be freed. For @@ -2112,6 +2127,10 @@ again: VM_OBJECT_WLOCK(object); goto again; } + if ((options & OBJPR_VALIDONLY) != 0 && vm_page_none_valid(p)) { + vm_page_xunbusy(p); + continue; + } if (vm_page_wired(p)) { wired: if ((options & OBJPR_NOTMAPPED) == 0 && diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 1bf4cee856c7..3b280228de13 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -232,6 +232,7 @@ struct vm_object { */ #define OBJPR_CLEANONLY 0x1 /* Don't remove dirty pages. */ #define OBJPR_NOTMAPPED 0x2 /* Don't unmap pages. */ +#define OBJPR_VALIDONLY 0x4 /* Ignore invalid pages. */ TAILQ_HEAD(object_q, vm_object); From nobody Mon Nov 15 18:03:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 89960188A50C; Mon, 15 Nov 2021 18:03: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 4HtH9N41Cqz3HtM; Mon, 15 Nov 2021 18:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC9411DFC8; Mon, 15 Nov 2021 18:03: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 1AFI32Em027381; Mon, 15 Nov 2021 18:03:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFI32DG027380; Mon, 15 Nov 2021 18:03:02 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:03:02 GMT Message-Id: <202111151803.1AFI32DG027380@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: 42c2cd1ffbdf - main - amd64: Annotate an unlikely condition in smp_targeted_tlb_shootdown() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 42c2cd1ffbdfa706764362eca1b7bf5eeeee2aef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=42c2cd1ffbdfa706764362eca1b7bf5eeeee2aef commit 42c2cd1ffbdfa706764362eca1b7bf5eeeee2aef Author: Mark Johnston AuthorDate: 2021-11-15 17:40:00 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 18:01:30 +0000 amd64: Annotate an unlikely condition in smp_targeted_tlb_shootdown() Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/amd64/amd64/mp_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index e954e8cebbb9..fb8c2af271ed 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -625,7 +625,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, * It is not necessary to signal other CPUs while booting or * when in the debugger. */ - if (kdb_active || KERNEL_PANICKED() || !smp_started) + if (__predict_false(kdb_active || KERNEL_PANICKED() || !smp_started)) goto local_cb; KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); From nobody Mon Nov 15 18:03:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2695F188A346; Mon, 15 Nov 2021 18:03: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 4HtH9P1bJTz3HgX; Mon, 15 Nov 2021 18:03:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02FB81E4D0; Mon, 15 Nov 2021 18:03: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 1AFI331Q027405; Mon, 15 Nov 2021 18:03:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFI33Mj027404; Mon, 15 Nov 2021 18:03:03 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:03:03 GMT Message-Id: <202111151803.1AFI33Mj027404@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: 71e6e9da225a - main - amd64: Initialize kernel_pmap's active CPU set to all_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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 71e6e9da225aede95f6813a0fcf886538d0da9fe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=71e6e9da225aede95f6813a0fcf886538d0da9fe commit 71e6e9da225aede95f6813a0fcf886538d0da9fe Author: Mark Johnston AuthorDate: 2021-11-15 17:41:24 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 18:01:30 +0000 amd64: Initialize kernel_pmap's active CPU set to all_cpus This is in preference to simply filling the cpuset, and allows the conditional in pmap_invalidate_cpu_mask() to be elided. Also export pmap_invalidate_cpu_mask() outside of pmap.c for use in a subsequent commit. Suggested by: kib Reviewed by: alc, kib Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32792 --- sys/amd64/amd64/pmap.c | 22 ++++++++++++++-------- sys/amd64/include/pmap.h | 6 ++++++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 3f1125cfc79f..f369ec360c83 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1958,11 +1958,16 @@ pmap_bootstrap(vm_paddr_t *firstaddr) kernel_pmap->pm_pmltop = kernel_pml4; kernel_pmap->pm_cr3 = KPML4phys; kernel_pmap->pm_ucr3 = PMAP_NO_CR3; - CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); kernel_pmap->pm_stats.resident_count = res; kernel_pmap->pm_flags = pmap_flags; + /* + * The kernel pmap is always active on all CPUs. Once CPUs are + * enumerated, the mask will be set equal to all_cpus. + */ + CPU_FILL(&kernel_pmap->pm_active); + /* * Initialize the TLB invalidations generation number lock. */ @@ -3010,12 +3015,6 @@ pmap_invalidate_ept(pmap_t pmap) smr_wait(pmap->pm_eptsmr, goal); } -static cpuset_t -pmap_invalidate_cpu_mask(pmap_t pmap) -{ - return (pmap == kernel_pmap ? all_cpus : pmap->pm_active); -} - static inline void pmap_invalidate_preipi_pcid(pmap_t pmap) { @@ -10925,7 +10924,14 @@ pmap_pti_init(void) pti_finalized = true; VM_OBJECT_WUNLOCK(pti_obj); } -SYSINIT(pmap_pti, SI_SUB_CPU + 1, SI_ORDER_ANY, pmap_pti_init, NULL); + +static void +pmap_cpu_init(void *arg __unused) +{ + CPU_COPY(&all_cpus, &kernel_pmap->pm_active); + pmap_pti_init(); +} +SYSINIT(pmap_cpu, SI_SUB_CPU + 1, SI_ORDER_ANY, pmap_cpu_init, NULL); static pdp_entry_t * pmap_pti_pdpe(vm_offset_t va) diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 1e63ffb68099..b327d04c8261 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -532,6 +532,12 @@ vm_page_t pmap_page_alloc_below_4g(bool zeroed); void pmap_san_enter(vm_offset_t); #endif +static __inline cpuset_t +pmap_invalidate_cpu_mask(pmap_t pmap) +{ + return (pmap->pm_active); +} + #endif /* _KERNEL */ /* Return various clipped indexes for a given VA */ From nobody Mon Nov 15 18:03:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C04F9188A267; Mon, 15 Nov 2021 18:03: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 4HtH9Q0rCwz3HtX; Mon, 15 Nov 2021 18:03:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2044A1E540; Mon, 15 Nov 2021 18:03: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 1AFI35J6027435; Mon, 15 Nov 2021 18:03:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFI35MS027434; Mon, 15 Nov 2021 18:03:05 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:03:05 GMT Message-Id: <202111151803.1AFI35MS027434@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: ab12e8db292c - main - amd64: Reduce the amount of cpuset copying done for TLB shootdowns List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ab12e8db292c386a33445dcd95fa629413954192 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ab12e8db292c386a33445dcd95fa629413954192 commit ab12e8db292c386a33445dcd95fa629413954192 Author: Mark Johnston AuthorDate: 2021-11-15 17:52:03 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 18:01:31 +0000 amd64: Reduce the amount of cpuset copying done for TLB shootdowns We use pmap_invalidate_cpu_mask() to get the set of active CPUs. This (32-byte) set is copied by value through multiple frames until we get to smp_targeted_tlb_shootdown(), where it is copied yet again. Avoid this copying by having smp_targeted_tlb_shootdown() make a local copy of the active CPUs for the pmap, and drop the cpuset parameter, simplifying callers. Also leverage the use of the non-destructive CPU_FOREACH_ISSET to avoid unneeded copying within smp_targeted_tlb_shootdown(). Reviewed by: alc, kib Tested by: pho MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32792 --- sys/amd64/amd64/mp_machdep.c | 39 ++++++++++++++++++--------------------- sys/amd64/amd64/pmap.c | 8 +++----- sys/amd64/include/pmap.h | 9 +++++++-- sys/x86/include/x86_smp.h | 15 ++++++++++++--- 4 files changed, 40 insertions(+), 31 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index fb8c2af271ed..5cd9d93dd0f1 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -613,10 +613,10 @@ invl_scoreboard_slot(u_int cpu) * completion. */ static void -smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, - vm_offset_t addr2, smp_invl_cb_t curcpu_cb, enum invl_op_codes op) +smp_targeted_tlb_shootdown(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2, + smp_invl_cb_t curcpu_cb, enum invl_op_codes op) { - cpuset_t other_cpus; + cpuset_t mask; uint32_t generation, *p_cpudone; int cpu; bool is_all; @@ -631,10 +631,12 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); /* - * Check for other cpus. Return if none. + * Make a stable copy of the set of CPUs on which the pmap is active. + * See if we have to interrupt other CPUs. */ - is_all = !CPU_CMP(&mask, &all_cpus); - CPU_CLR(PCPU_GET(cpuid), &mask); + CPU_COPY(pmap_invalidate_cpu_mask(pmap), &mask); + is_all = CPU_CMP(&mask, &all_cpus) == 0; + CPU_CLR(curcpu, &mask); if (CPU_EMPTY(&mask)) goto local_cb; @@ -663,7 +665,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, CPU_FOREACH_ISSET(cpu, &mask) { KASSERT(*invl_scoreboard_slot(cpu) != 0, ("IPI scoreboard is zero, initiator %d target %d", - PCPU_GET(cpuid), cpu)); + curcpu, cpu)); *invl_scoreboard_slot(cpu) = 0; } @@ -674,14 +676,11 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, */ if (is_all) { ipi_all_but_self(IPI_INVLOP); - other_cpus = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &other_cpus); } else { - other_cpus = mask; ipi_selected(mask, IPI_INVLOP); } curcpu_cb(pmap, addr1, addr2); - CPU_FOREACH_ISSET(cpu, &other_cpus) { + CPU_FOREACH_ISSET(cpu, &mask) { p_cpudone = invl_scoreboard_slot(cpu); while (atomic_load_int(p_cpudone) != generation) ia32_pause(); @@ -705,29 +704,28 @@ local_cb: } void -smp_masked_invltlb(cpuset_t mask, pmap_t pmap, smp_invl_cb_t curcpu_cb) +smp_masked_invltlb(pmap_t pmap, smp_invl_cb_t curcpu_cb) { - smp_targeted_tlb_shootdown(mask, pmap, 0, 0, curcpu_cb, invl_op_tlb); + smp_targeted_tlb_shootdown(pmap, 0, 0, curcpu_cb, invl_op_tlb); #ifdef COUNT_XINVLTLB_HITS ipi_global++; #endif } void -smp_masked_invlpg(cpuset_t mask, vm_offset_t addr, pmap_t pmap, - smp_invl_cb_t curcpu_cb) +smp_masked_invlpg(vm_offset_t addr, pmap_t pmap, smp_invl_cb_t curcpu_cb) { - smp_targeted_tlb_shootdown(mask, pmap, addr, 0, curcpu_cb, invl_op_pg); + smp_targeted_tlb_shootdown(pmap, addr, 0, curcpu_cb, invl_op_pg); #ifdef COUNT_XINVLTLB_HITS ipi_page++; #endif } void -smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2, - pmap_t pmap, smp_invl_cb_t curcpu_cb) +smp_masked_invlpg_range(vm_offset_t addr1, vm_offset_t addr2, pmap_t pmap, + smp_invl_cb_t curcpu_cb) { - smp_targeted_tlb_shootdown(mask, pmap, addr1, addr2, curcpu_cb, + smp_targeted_tlb_shootdown(pmap, addr1, addr2, curcpu_cb, invl_op_pgrng); #ifdef COUNT_XINVLTLB_HITS ipi_range++; @@ -738,8 +736,7 @@ smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2, void smp_cache_flush(smp_invl_cb_t curcpu_cb) { - smp_targeted_tlb_shootdown(all_cpus, NULL, 0, 0, curcpu_cb, - INVL_OP_CACHE); + smp_targeted_tlb_shootdown(kernel_pmap, 0, 0, curcpu_cb, INVL_OP_CACHE); } /* diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index f369ec360c83..e9973a420de3 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -3146,8 +3146,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) ("pmap_invalidate_page: invalid type %d", pmap->pm_type)); pmap_invalidate_preipi(pmap); - smp_masked_invlpg(pmap_invalidate_cpu_mask(pmap), va, pmap, - pmap_invalidate_page_curcpu_cb); + smp_masked_invlpg(va, pmap, pmap_invalidate_page_curcpu_cb); } /* 4k PTEs -- Chosen to exceed the total size of Broadwell L2 TLB */ @@ -3245,7 +3244,7 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) ("pmap_invalidate_range: invalid type %d", pmap->pm_type)); pmap_invalidate_preipi(pmap); - smp_masked_invlpg_range(pmap_invalidate_cpu_mask(pmap), sva, eva, pmap, + smp_masked_invlpg_range(sva, eva, pmap, pmap_invalidate_range_curcpu_cb); } @@ -3331,8 +3330,7 @@ pmap_invalidate_all(pmap_t pmap) ("pmap_invalidate_all: invalid type %d", pmap->pm_type)); pmap_invalidate_preipi(pmap); - smp_masked_invltlb(pmap_invalidate_cpu_mask(pmap), pmap, - pmap_invalidate_all_curcpu_cb); + smp_masked_invltlb(pmap, pmap_invalidate_all_curcpu_cb); } static void diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index b327d04c8261..318e70e7794c 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -532,10 +532,15 @@ vm_page_t pmap_page_alloc_below_4g(bool zeroed); void pmap_san_enter(vm_offset_t); #endif -static __inline cpuset_t +/* + * Returns a pointer to a set of CPUs on which the pmap is currently active. + * Note that the set can be modified without any mutual exclusion, so a copy + * must be made if a stable value is required. + */ +static __inline volatile cpuset_t * pmap_invalidate_cpu_mask(pmap_t pmap) { - return (pmap->pm_active); + return (&pmap->pm_active); } #endif /* _KERNEL */ diff --git a/sys/x86/include/x86_smp.h b/sys/x86/include/x86_smp.h index b9a1febb70f2..2cf0ff97eae0 100644 --- a/sys/x86/include/x86_smp.h +++ b/sys/x86/include/x86_smp.h @@ -107,14 +107,23 @@ void ipi_swi_handler(struct trapframe frame); void ipi_selected(cpuset_t cpus, u_int ipi); void ipi_self_from_nmi(u_int vector); void set_interrupt_apic_ids(void); +void mem_range_AP_init(void); +void topo_probe(void); + +/* functions in mp_machdep.c */ void smp_cache_flush(smp_invl_cb_t curcpu_cb); +#ifdef __i386__ void smp_masked_invlpg(cpuset_t mask, vm_offset_t addr, struct pmap *pmap, smp_invl_cb_t curcpu_cb); void smp_masked_invlpg_range(cpuset_t mask, vm_offset_t startva, vm_offset_t endva, struct pmap *pmap, smp_invl_cb_t curcpu_cb); void smp_masked_invltlb(cpuset_t mask, struct pmap *pmap, smp_invl_cb_t curcpu_cb); -void mem_range_AP_init(void); -void topo_probe(void); - +#else +void smp_masked_invlpg(vm_offset_t addr, struct pmap *pmap, + smp_invl_cb_t curcpu_cb); +void smp_masked_invlpg_range(vm_offset_t startva, vm_offset_t endva, + struct pmap *pmap, smp_invl_cb_t curcpu_cb); +void smp_masked_invltlb(struct pmap *pmap, smp_invl_cb_t curcpu_cb); +#endif #endif From nobody Mon Nov 15 18:11:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B3D9A188F698; Mon, 15 Nov 2021 18:11: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 4HtHMc4Jmvz3PD7; Mon, 15 Nov 2021 18:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 739311E6D0; Mon, 15 Nov 2021 18:11: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 1AFIBunp039663; Mon, 15 Nov 2021 18:11:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFIBuiY039662; Mon, 15 Nov 2021 18:11:56 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:11:56 GMT Message-Id: <202111151811.1AFIBuiY039662@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: ab9866cc793d - stable/13 - pci: Implement pci_bar_enabled() for SR-IOV VFs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ab9866cc793ddd454dca4e85caa8475bde1baaa7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ab9866cc793ddd454dca4e85caa8475bde1baaa7 commit ab9866cc793ddd454dca4e85caa8475bde1baaa7 Author: Mark Johnston AuthorDate: 2021-11-09 18:07:57 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 18:11:52 +0000 pci: Implement pci_bar_enabled() for SR-IOV VFs In a VF's configuration space, "memory space enable" is hard-wired to 0, so the existing implementation always returns false. We need to read the SR-IOV control register from the PF device to get the value of the MSE bit. Fix pci_bar_enabled() to read this register instead for VFs. I don't see any way to access the PF's config space without a backpointer in the pci device ivars, so I added one. This fixes a regression where bhyve(8) fails to map the MSI-X table after commit 7fa233534736 ("bhyve: Map the MSI-X table unconditionally for passthrough") when a VF is passed through, since with that commit we use PCIOCBARMMAP to map the table and that ioctl always fails for VFs without this change. As a bonus, pciconf(8) now correctly reports the enablement of BARs for VFs. Reported and tested by: Raúl Muñoz Reviewed by: rstone, jhb Sponsored by: The FreeBSD Foundation (cherry picked from commit 1f960e646b7280795766fdaa183e3b9bd4cea345) --- sys/dev/pci/pci.c | 10 ++++++++++ sys/dev/pci/pci_iov.c | 1 + sys/dev/pci/pci_iov_private.h | 1 + 3 files changed, 12 insertions(+) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 530526adb7b3..4c79d9260fc0 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -3150,6 +3150,16 @@ pci_bar_enabled(device_t dev, struct pci_map *pm) if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg) && !(pm->pm_value & PCIM_BIOS_ENABLE)) return (0); +#ifdef PCI_IOV + if ((dinfo->cfg.flags & PCICFG_VF) != 0) { + struct pcicfg_iov *iov; + + iov = dinfo->cfg.iov; + cmd = pci_read_config(iov->iov_pf, + iov->iov_pos + PCIR_SRIOV_CTL, 2); + return ((cmd & PCIM_SRIOV_VF_MSE) != 0); + } +#endif cmd = pci_read_config(dev, PCIR_COMMAND, 2); if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg) || PCI_BAR_MEM(pm->pm_value)) return ((cmd & PCIM_CMD_MEMEN) != 0); diff --git a/sys/dev/pci/pci_iov.c b/sys/dev/pci/pci_iov.c index 6db2cf445843..f577640595a9 100644 --- a/sys/dev/pci/pci_iov.c +++ b/sys/dev/pci/pci_iov.c @@ -151,6 +151,7 @@ pci_iov_attach_method(device_t bus, device_t dev, nvlist_t *pf_schema, error = EBUSY; goto cleanup; } + iov->iov_pf = dev; iov->iov_pos = iov_pos; schema = pci_iov_build_schema(&pf_schema, &vf_schema); diff --git a/sys/dev/pci/pci_iov_private.h b/sys/dev/pci/pci_iov_private.h index 0d1dda871b44..be3456d4781f 100644 --- a/sys/dev/pci/pci_iov_private.h +++ b/sys/dev/pci/pci_iov_private.h @@ -37,6 +37,7 @@ struct pci_iov_bar { }; struct pcicfg_iov { + device_t iov_pf; struct cdev *iov_cdev; nvlist_t *iov_schema; From nobody Mon Nov 15 18:11:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DADB4188F784; Mon, 15 Nov 2021 18:11:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HtHMd5PMBz3P35; Mon, 15 Nov 2021 18:11:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A49A1E900; Mon, 15 Nov 2021 18:11: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 1AFIBvuj039687; Mon, 15 Nov 2021 18:11:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFIBvjs039686; Mon, 15 Nov 2021 18:11:57 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:11:57 GMT Message-Id: <202111151811.1AFIBvjs039686@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: e002d882ac20 - stable/13 - bhyve: Map the MSI-X table unconditionally for passthrough List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e002d882ac2094047a8d5a8bef9252e5006b5828 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e002d882ac2094047a8d5a8bef9252e5006b5828 commit e002d882ac2094047a8d5a8bef9252e5006b5828 Author: Mark Johnston AuthorDate: 2021-10-09 15:36:19 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 18:11:52 +0000 bhyve: Map the MSI-X table unconditionally for passthrough It is possible for the PBA to reside in the same page as the MSI-X table. And, while devices are not supposed to do this, at least some Intel wifi devices place registers in a page shared with the MSI-X table. To handle the first case we currently map the PBA page using /dev/mem, and the second case is not handled. Kill two birds with one stone: map the MSI-X table BAR using the PCIOCBARMMAP ioctl instead of /dev/mem, and map the entire table so that accesses beyond the bounds of the table can be emulated. Regions of the BAR not containing the table are left unmapped. PR: 251046 Reviewed by: bz, grehan, jhb Sponsored by: The FreeBSD Foundation (cherry picked from commit 7fa2335347362378322a4d27cb40f6e6cd5dd0fb) --- usr.sbin/bhyve/pci_emul.h | 4 +- usr.sbin/bhyve/pci_passthru.c | 186 +++++++++++++++++------------------------- 2 files changed, 76 insertions(+), 114 deletions(-) diff --git a/usr.sbin/bhyve/pci_emul.h b/usr.sbin/bhyve/pci_emul.h index 031a6113fac4..5b6a17119960 100644 --- a/usr.sbin/bhyve/pci_emul.h +++ b/usr.sbin/bhyve/pci_emul.h @@ -157,8 +157,8 @@ struct pci_devinst { int pba_size; int function_mask; struct msix_table_entry *table; /* allocated at runtime */ - void *pba_page; - int pba_page_offset; + uint8_t *mapped_addr; + size_t mapped_size; } pi_msix; void *pi_arg; /* devemu-private data */ diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 2c6a2ebd8dd9..bf99c646c480 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -43,7 +43,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include +#include #ifndef WITHOUT_CAPSICUM #include @@ -69,17 +72,12 @@ __FBSDID("$FreeBSD$"); #define _PATH_DEVPCI "/dev/pci" #endif -#ifndef _PATH_MEM -#define _PATH_MEM "/dev/mem" -#endif - #define LEGACY_SUPPORT 1 #define MSIX_TABLE_COUNT(ctrl) (((ctrl) & PCIM_MSIXCTRL_TABLE_SIZE) + 1) #define MSIX_CAPLEN 12 static int pcifd = -1; -static int memfd = -1; struct passthru_softc { struct pci_devinst *psc_pi; @@ -290,30 +288,30 @@ msix_table_read(struct passthru_softc *sc, uint64_t offset, int size) uint64_t *src64; uint64_t data; size_t entry_offset; - int index; + uint32_t table_offset; + int index, table_count; pi = sc->psc_pi; - if (pi->pi_msix.pba_page != NULL && offset >= pi->pi_msix.pba_offset && - offset < pi->pi_msix.pba_offset + pi->pi_msix.pba_size) { - switch(size) { + + table_offset = pi->pi_msix.table_offset; + table_count = pi->pi_msix.table_count; + if (offset < table_offset || + offset >= table_offset + table_count * MSIX_TABLE_ENTRY_SIZE) { + switch (size) { case 1: - src8 = (uint8_t *)(pi->pi_msix.pba_page + offset - - pi->pi_msix.pba_page_offset); + src8 = (uint8_t *)(pi->pi_msix.mapped_addr + offset); data = *src8; break; case 2: - src16 = (uint16_t *)(pi->pi_msix.pba_page + offset - - pi->pi_msix.pba_page_offset); + src16 = (uint16_t *)(pi->pi_msix.mapped_addr + offset); data = *src16; break; case 4: - src32 = (uint32_t *)(pi->pi_msix.pba_page + offset - - pi->pi_msix.pba_page_offset); + src32 = (uint32_t *)(pi->pi_msix.mapped_addr + offset); data = *src32; break; case 8: - src64 = (uint64_t *)(pi->pi_msix.pba_page + offset - - pi->pi_msix.pba_page_offset); + src64 = (uint64_t *)(pi->pi_msix.mapped_addr + offset); data = *src64; break; default: @@ -322,32 +320,28 @@ msix_table_read(struct passthru_softc *sc, uint64_t offset, int size) return (data); } - if (offset < pi->pi_msix.table_offset) - return (-1); - - offset -= pi->pi_msix.table_offset; + offset -= table_offset; index = offset / MSIX_TABLE_ENTRY_SIZE; - if (index >= pi->pi_msix.table_count) - return (-1); + assert(index < table_count); entry = &pi->pi_msix.table[index]; entry_offset = offset % MSIX_TABLE_ENTRY_SIZE; - switch(size) { + switch (size) { case 1: - src8 = (uint8_t *)((void *)entry + entry_offset); + src8 = (uint8_t *)((uint8_t *)entry + entry_offset); data = *src8; break; case 2: - src16 = (uint16_t *)((void *)entry + entry_offset); + src16 = (uint16_t *)((uint8_t *)entry + entry_offset); data = *src16; break; case 4: - src32 = (uint32_t *)((void *)entry + entry_offset); + src32 = (uint32_t *)((uint8_t *)entry + entry_offset); data = *src32; break; case 8: - src64 = (uint64_t *)((void *)entry + entry_offset); + src64 = (uint64_t *)((uint8_t *)entry + entry_offset); data = *src64; break; default: @@ -368,46 +362,39 @@ msix_table_write(struct vmctx *ctx, int vcpu, struct passthru_softc *sc, uint32_t *dest32; uint64_t *dest64; size_t entry_offset; - uint32_t vector_control; - int index; + uint32_t table_offset, vector_control; + int index, table_count; pi = sc->psc_pi; - if (pi->pi_msix.pba_page != NULL && offset >= pi->pi_msix.pba_offset && - offset < pi->pi_msix.pba_offset + pi->pi_msix.pba_size) { - switch(size) { + + table_offset = pi->pi_msix.table_offset; + table_count = pi->pi_msix.table_count; + if (offset < table_offset || + offset >= table_offset + table_count * MSIX_TABLE_ENTRY_SIZE) { + switch (size) { case 1: - dest8 = (uint8_t *)(pi->pi_msix.pba_page + offset - - pi->pi_msix.pba_page_offset); + dest8 = (uint8_t *)(pi->pi_msix.mapped_addr + offset); *dest8 = data; break; case 2: - dest16 = (uint16_t *)(pi->pi_msix.pba_page + offset - - pi->pi_msix.pba_page_offset); + dest16 = (uint16_t *)(pi->pi_msix.mapped_addr + offset); *dest16 = data; break; case 4: - dest32 = (uint32_t *)(pi->pi_msix.pba_page + offset - - pi->pi_msix.pba_page_offset); + dest32 = (uint32_t *)(pi->pi_msix.mapped_addr + offset); *dest32 = data; break; case 8: - dest64 = (uint64_t *)(pi->pi_msix.pba_page + offset - - pi->pi_msix.pba_page_offset); + dest64 = (uint64_t *)(pi->pi_msix.mapped_addr + offset); *dest64 = data; break; - default: - break; } return; } - if (offset < pi->pi_msix.table_offset) - return; - - offset -= pi->pi_msix.table_offset; + offset -= table_offset; index = offset / MSIX_TABLE_ENTRY_SIZE; - if (index >= pi->pi_msix.table_count) - return; + assert(index < table_count); entry = &pi->pi_msix.table[index]; entry_offset = offset % MSIX_TABLE_ENTRY_SIZE; @@ -435,13 +422,10 @@ msix_table_write(struct vmctx *ctx, int vcpu, struct passthru_softc *sc, static int init_msix_table(struct vmctx *ctx, struct passthru_softc *sc, uint64_t base) { + struct pci_devinst *pi = sc->psc_pi; + struct pci_bar_mmap pbm; int b, s, f; - int idx; - size_t remaining; uint32_t table_size, table_offset; - uint32_t pba_size, pba_offset; - vm_paddr_t start; - struct pci_devinst *pi = sc->psc_pi; assert(pci_msix_table_bar(pi) >= 0 && pci_msix_pba_bar(pi) >= 0); @@ -449,55 +433,48 @@ init_msix_table(struct vmctx *ctx, struct passthru_softc *sc, uint64_t base) s = sc->psc_sel.pc_dev; f = sc->psc_sel.pc_func; - /* - * If the MSI-X table BAR maps memory intended for - * other uses, it is at least assured that the table - * either resides in its own page within the region, - * or it resides in a page shared with only the PBA. + /* + * Map the region of the BAR containing the MSI-X table. This is + * necessary for two reasons: + * 1. The PBA may reside in the first or last page containing the MSI-X + * table. + * 2. While PCI devices are not supposed to use the page(s) containing + * the MSI-X table for other purposes, some do in practice. */ + memset(&pbm, 0, sizeof(pbm)); + pbm.pbm_sel = sc->psc_sel; + pbm.pbm_flags = PCIIO_BAR_MMAP_RW; + pbm.pbm_reg = PCIR_BAR(pi->pi_msix.pba_bar); + pbm.pbm_memattr = VM_MEMATTR_DEVICE; + + if (ioctl(pcifd, PCIOCBARMMAP, &pbm) != 0) { + warn("Failed to map MSI-X table BAR on %d/%d/%d", b, s, f); + return (-1); + } + assert(pbm.pbm_bar_off == 0); + pi->pi_msix.mapped_addr = (uint8_t *)(uintptr_t)pbm.pbm_map_base; + pi->pi_msix.mapped_size = pbm.pbm_map_length; + table_offset = rounddown2(pi->pi_msix.table_offset, 4096); table_size = pi->pi_msix.table_offset - table_offset; table_size += pi->pi_msix.table_count * MSIX_TABLE_ENTRY_SIZE; table_size = roundup2(table_size, 4096); - idx = pi->pi_msix.table_bar; - start = pi->pi_bar[idx].addr; - remaining = pi->pi_bar[idx].size; - - if (pi->pi_msix.pba_bar == pi->pi_msix.table_bar) { - pba_offset = pi->pi_msix.pba_offset; - pba_size = pi->pi_msix.pba_size; - if (pba_offset >= table_offset + table_size || - table_offset >= pba_offset + pba_size) { - /* - * If the PBA does not share a page with the MSI-x - * tables, no PBA emulation is required. - */ - pi->pi_msix.pba_page = NULL; - pi->pi_msix.pba_page_offset = 0; - } else { - /* - * The PBA overlaps with either the first or last - * page of the MSI-X table region. Map the - * appropriate page. - */ - if (pba_offset <= table_offset) - pi->pi_msix.pba_page_offset = table_offset; - else - pi->pi_msix.pba_page_offset = table_offset + - table_size - 4096; - pi->pi_msix.pba_page = mmap(NULL, 4096, PROT_READ | - PROT_WRITE, MAP_SHARED, memfd, start + - pi->pi_msix.pba_page_offset); - if (pi->pi_msix.pba_page == MAP_FAILED) { - warn( - "Failed to map PBA page for MSI-X on %d/%d/%d", - b, s, f); - return (-1); - } - } - } + /* + * Unmap any pages not covered by the table, we do not need to emulate + * accesses to them. Avoid releasing address space to help ensure that + * a buggy out-of-bounds access causes a crash. + */ + if (table_offset != 0) + if (mprotect(pi->pi_msix.mapped_addr, table_offset, + PROT_NONE) != 0) + warn("Failed to unmap MSI-X table BAR region"); + if (table_offset + table_size != pi->pi_msix.mapped_size) + if (mprotect(pi->pi_msix.mapped_addr, + pi->pi_msix.mapped_size - (table_offset + table_size), + PROT_NONE) != 0) + warn("Failed to unmap MSI-X table BAR region"); return (0); } @@ -645,7 +622,7 @@ passthru_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) #ifndef WITHOUT_CAPSICUM cap_rights_t rights; cap_ioctl_t pci_ioctls[] = - { PCIOCREAD, PCIOCWRITE, PCIOCGETBAR, PCIOCBARIO }; + { PCIOCREAD, PCIOCWRITE, PCIOCGETBAR, PCIOCBARIO, PCIOCBARMMAP }; #endif sc = NULL; @@ -676,21 +653,6 @@ passthru_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif - if (memfd < 0) { - memfd = open(_PATH_MEM, O_RDWR, 0); - if (memfd < 0) { - warn("failed to open %s", _PATH_MEM); - return (error); - } - } - -#ifndef WITHOUT_CAPSICUM - cap_rights_clear(&rights, CAP_IOCTL); - cap_rights_set(&rights, CAP_MMAP_RW); - if (caph_rights_limit(memfd, &rights) == -1) - errx(EX_OSERR, "Unable to apply rights for sandbox"); -#endif - #define GET_INT_CONFIG(var, name) do { \ value = get_config_value_node(nvl, name); \ if (value == NULL) { \ From nobody Mon Nov 15 18:11:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4CDAF188F69D; Mon, 15 Nov 2021 18:11: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 4HtHMf6f3nz3P0X; Mon, 15 Nov 2021 18:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB0D31E784; Mon, 15 Nov 2021 18:11: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 1AFIBwSR039711; Mon, 15 Nov 2021 18:11:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFIBwhl039710; Mon, 15 Nov 2021 18:11:58 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:11:58 GMT Message-Id: <202111151811.1AFIBwhl039710@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: de957de09785 - stable/13 - bhyve: Fix the WITH_BHYVE_SNAPSHOT build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: de957de097857fabb69a59a9ba36276c5e735de5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=de957de097857fabb69a59a9ba36276c5e735de5 commit de957de097857fabb69a59a9ba36276c5e735de5 Author: Mark Johnston AuthorDate: 2021-10-16 17:13:26 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 18:11:53 +0000 bhyve: Fix the WITH_BHYVE_SNAPSHOT build Note, this breaks compatibility with snapshots generated by older builds of bhyve(8). Fixes: 7fa233534736 ("bhyve: Map the MSI-X table unconditionally for passthrough") Reported by: Greg V Reviewed by: grehan, bz Sponsored by: The FreeBSD Foundation (cherry picked from commit 77bc75c7abd29de69d3ef35b66c23c7baba95094) --- usr.sbin/bhyve/pci_emul.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index 113ac5121238..d155029d269f 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -2079,7 +2079,6 @@ pci_snapshot_pci_dev(struct vm_snapshot_meta *meta) SNAPSHOT_VAR_OR_LEAVE(pi->pi_msix.pba_offset, meta, ret, done); SNAPSHOT_VAR_OR_LEAVE(pi->pi_msix.pba_size, meta, ret, done); SNAPSHOT_VAR_OR_LEAVE(pi->pi_msix.function_mask, meta, ret, done); - SNAPSHOT_VAR_OR_LEAVE(pi->pi_msix.pba_page_offset, meta, ret, done); SNAPSHOT_BUF_OR_LEAVE(pi->pi_cfgdata, sizeof(pi->pi_cfgdata), meta, ret, done); From nobody Mon Nov 15 18:19:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CE0991894643; Mon, 15 Nov 2021 18:19: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 4HtHWn5Rtdz3l00; Mon, 15 Nov 2021 18:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C9911E8AA; Mon, 15 Nov 2021 18:19: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 1AFIJ1oJ041123; Mon, 15 Nov 2021 18:19:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFIJ1AE041122; Mon, 15 Nov 2021 18:19:01 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:19:01 GMT Message-Id: <202111151819.1AFIJ1AE041122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 8e76bae0b72e - main - cxgbe(4): Keep link configuration compatible with really old firmwares. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e76bae0b72e53da80c48ba138b1cfd712724df4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=8e76bae0b72e53da80c48ba138b1cfd712724df4 commit 8e76bae0b72e53da80c48ba138b1cfd712724df4 Author: Navdeep Parhar AuthorDate: 2021-11-11 00:10:41 +0000 Commit: Navdeep Parhar CommitDate: 2021-11-15 18:18:04 +0000 cxgbe(4): Keep link configuration compatible with really old firmwares. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/common/t4_hw.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index d6f85a1fcd34..e2b55dc71eba 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -3959,6 +3959,14 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port, if (lc->requested_fec & FEC_MODULE) fec |= fec_to_fwcap(lc->fec_hint); } + + /* + * This is for compatibility with old firmwares. The original + * way to request NO_FEC was to not set any of the FEC bits. New + * firmwares understand this too. + */ + if (fec == FW_PORT_CAP32_FEC_NO_FEC) + fec = 0; } /* Force AN on for BT cards. */ From nobody Mon Nov 15 18:37:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 673E8189DF61; Mon, 15 Nov 2021 18:37: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 4HtHwX2TL1z3rtP; Mon, 15 Nov 2021 18:37:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34AC41ECAB; Mon, 15 Nov 2021 18:37: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 1AFIb0X9067923; Mon, 15 Nov 2021 18:37:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFIb0EF067922; Mon, 15 Nov 2021 18:37:00 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:37:00 GMT Message-Id: <202111151837.1AFIb0EF067922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: f0da2a14670a - main - syscalls: unwrap a long line List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0da2a14670a34d1decfbc17800c4dc4e4ebc324 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f0da2a14670a34d1decfbc17800c4dc4e4ebc324 commit f0da2a14670a34d1decfbc17800c4dc4e4ebc324 Author: Brooks Davis AuthorDate: 2021-11-15 18:34:27 +0000 Commit: Brooks Davis CommitDate: 2021-11-15 18:34:27 +0000 syscalls: unwrap a long line Style dictates that each variable is on a single line Reviewed by: kib --- sys/kern/syscalls.master | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 0965d5771c5a..5b5bc70fb21a 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -448,8 +448,7 @@ 63 AUE_NULL COMPAT { int getkerninfo( int op, - _Out_writes_bytes_opt( - *size) char *where, + _Out_writes_bytes_opt(*size) char *where, _Inout_opt_ size_t *size, int arg ); From nobody Mon Nov 15 18:37:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 91309189DF68; Mon, 15 Nov 2021 18:37: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 4HtHwY3XKxz3rwS; Mon, 15 Nov 2021 18:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 599CC1E7C6; Mon, 15 Nov 2021 18:37: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 1AFIb1lP067947; Mon, 15 Nov 2021 18:37:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFIb17V067946; Mon, 15 Nov 2021 18:37:01 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:37:01 GMT Message-Id: <202111151837.1AFIb17V067946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8e4a3add99ca - main - struct kevent_freebsd11 -> struct freebsd11_kevent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e4a3add99ca05c46bde826adcbea552d7a7d9e9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8e4a3add99ca05c46bde826adcbea552d7a7d9e9 commit 8e4a3add99ca05c46bde826adcbea552d7a7d9e9 Author: Brooks Davis AuthorDate: 2021-11-15 18:34:27 +0000 Commit: Brooks Davis CommitDate: 2021-11-15 18:34:27 +0000 struct kevent_freebsd11 -> struct freebsd11_kevent Rename to match the naming of syscalls and allow 32 to be appended without making an ugly name like kevent_freebsd1132. While here, make the kevent changelist argument const. Reviewed by: kib --- sys/compat/freebsd32/freebsd32_misc.c | 14 +++++++------- sys/compat/freebsd32/syscalls.master | 4 ++-- sys/kern/kern_event.c | 10 +++++----- sys/kern/syscalls.master | 6 +++--- sys/sys/event.h | 4 ++-- usr.bin/kdump/kdump.c | 8 ++++---- usr.bin/truss/syscalls.c | 4 ++-- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 08941ebc5be9..f05b63e5b0ac 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -762,7 +762,7 @@ static int freebsd32_kevent11_copyout(void *arg, struct kevent *kevp, int count) { struct freebsd11_freebsd32_kevent_args *uap; - struct kevent32_freebsd11 ks32[KQ_NEVENTS]; + struct freebsd11_kevent32 ks32[KQ_NEVENTS]; int i, error; KASSERT(count <= KQ_NEVENTS, ("count (%d) > KQ_NEVENTS", count)); @@ -789,7 +789,7 @@ static int freebsd32_kevent11_copyin(void *arg, struct kevent *kevp, int count) { struct freebsd11_freebsd32_kevent_args *uap; - struct kevent32_freebsd11 ks32[KQ_NEVENTS]; + struct freebsd11_kevent32 ks32[KQ_NEVENTS]; int i, j, error; KASSERT(count <= KQ_NEVENTS, ("count (%d) > KQ_NEVENTS", count)); @@ -826,7 +826,7 @@ freebsd11_freebsd32_kevent(struct thread *td, .k_copyin = freebsd32_kevent11_copyin, }; #ifdef KTRACE - struct kevent32_freebsd11 *eventlist = uap->eventlist; + struct freebsd11_kevent32 *eventlist = uap->eventlist; #endif int error; @@ -841,17 +841,17 @@ freebsd11_freebsd32_kevent(struct thread *td, tsp = NULL; #ifdef KTRACE if (KTRPOINT(td, KTR_STRUCT_ARRAY)) - ktrstructarray("kevent32_freebsd11", UIO_USERSPACE, + ktrstructarray("freebsd11_kevent32", UIO_USERSPACE, uap->changelist, uap->nchanges, - sizeof(struct kevent32_freebsd11)); + sizeof(struct freebsd11_kevent32)); #endif error = kern_kevent(td, uap->fd, uap->nchanges, uap->nevents, &k_ops, tsp); #ifdef KTRACE if (error == 0 && KTRPOINT(td, KTR_STRUCT_ARRAY)) - ktrstructarray("kevent32_freebsd11", UIO_USERSPACE, + ktrstructarray("freebsd11_kevent32", UIO_USERSPACE, eventlist, td->td_retval[0], - sizeof(struct kevent32_freebsd11)); + sizeof(struct freebsd11_kevent32)); #endif return (error); } diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 5cb7c059a670..3d676fa9c3c8 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -670,10 +670,10 @@ gid_t *sgid); } 362 AUE_KQUEUE NOPROTO { int kqueue(void); } 363 AUE_KEVENT COMPAT11 { int freebsd32_kevent(int fd, \ - const struct kevent32_freebsd11 * \ + const struct freebsd11_kevent32 * \ changelist, \ int nchanges, \ - struct kevent32_freebsd11 *eventlist, \ + struct freebsd11_kevent32 *eventlist, \ int nevents, \ const struct timespec32 *timeout); } 364 AUE_NULL OBSOL __cap_get_proc diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index ade71a848868..de652de6106f 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1107,7 +1107,7 @@ kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps) struct g_kevent_args { int fd; - void *changelist; + const void *changelist; int nchanges; void *eventlist; int nevents; @@ -1212,7 +1212,7 @@ static int kevent11_copyout(void *arg, struct kevent *kevp, int count) { struct freebsd11_kevent_args *uap; - struct kevent_freebsd11 kev11; + struct freebsd11_kevent kev11; int error, i; KASSERT(count <= KQ_NEVENTS, ("count (%d) > KQ_NEVENTS", count)); @@ -1241,7 +1241,7 @@ static int kevent11_copyin(void *arg, struct kevent *kevp, int count) { struct freebsd11_kevent_args *uap; - struct kevent_freebsd11 kev11; + struct freebsd11_kevent kev11; int error, i; KASSERT(count <= KQ_NEVENTS, ("count (%d) > KQ_NEVENTS", count)); @@ -1271,7 +1271,7 @@ freebsd11_kevent(struct thread *td, struct freebsd11_kevent_args *uap) .arg = uap, .k_copyout = kevent11_copyout, .k_copyin = kevent11_copyin, - .kevent_size = sizeof(struct kevent_freebsd11), + .kevent_size = sizeof(struct freebsd11_kevent), }; struct g_kevent_args gk_args = { .fd = uap->fd, @@ -1282,7 +1282,7 @@ freebsd11_kevent(struct thread *td, struct freebsd11_kevent_args *uap) .timeout = uap->timeout, }; - return (kern_kevent_generic(td, &gk_args, &k_ops, "kevent_freebsd11")); + return (kern_kevent_generic(td, &gk_args, &k_ops, "freebsd11_kevent")); } #endif diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 5b5bc70fb21a..2c50bbe543ca 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1907,9 +1907,9 @@ 363 AUE_KEVENT COMPAT11|CAPENABLED { int kevent( int fd, - _In_reads_opt_(nchanges) struct kevent_freebsd11 *changelist, + _In_reads_opt_(nchanges) const struct freebsd11_kevent *changelist, int nchanges, - _Out_writes_opt_(nevents) struct kevent_freebsd11 *eventlist, + _Out_writes_opt_(nevents) struct freebsd11_kevent *eventlist, int nevents, _In_opt_ const struct timespec *timeout ); @@ -3099,7 +3099,7 @@ 560 AUE_KEVENT STD|CAPENABLED { int kevent( int fd, - _In_reads_opt_(nchanges) struct kevent *changelist, + _In_reads_opt_(nchanges) const struct kevent *changelist, int nchanges, _Out_writes_opt_(nevents) struct kevent *eventlist, int nevents, diff --git a/sys/sys/event.h b/sys/sys/event.h index f1bdc7e2a80e..7d337d40c1e6 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -93,7 +93,7 @@ struct kevent { #if defined(_WANT_FREEBSD11_KEVENT) /* Older structure used in FreeBSD 11.x and older. */ -struct kevent_freebsd11 { +struct freebsd11_kevent { __uintptr_t ident; /* identifier for this event */ short filter; /* filter for event */ unsigned short flags; @@ -121,7 +121,7 @@ struct kevent32 { }; #ifdef _WANT_FREEBSD11_KEVENT -struct kevent32_freebsd11 { +struct freebsd11_kevent32 { u_int32_t ident; /* identifier for this event */ short filter; /* filter for event */ u_short flags; diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 8b47212f88fc..611c9021cd78 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -2142,8 +2142,8 @@ ktrstructarray(struct ktr_struct_array *ksa, size_t buflen) goto bad_size; memcpy(&kev, data, sizeof(kev)); ktrkevent(&kev); - } else if (strcmp(name, "kevent_freebsd11") == 0) { - struct kevent_freebsd11 kev11; + } else if (strcmp(name, "freebsd11_kevent") == 0) { + struct freebsd11_kevent kev11; if (ksa->struct_size != sizeof(kev11)) goto bad_size; @@ -2175,8 +2175,8 @@ ktrstructarray(struct ktr_struct_array *ksa, size_t buflen) #endif kev.udata = (void *)(uintptr_t)kev32.udata; ktrkevent(&kev); - } else if (strcmp(name, "kevent32_freebsd11") == 0) { - struct kevent32_freebsd11 kev32; + } else if (strcmp(name, "freebsd11_kevent32") == 0) { + struct freebsd11_kevent32 kev32; if (ksa->struct_size != sizeof(kev32)) goto bad_size; diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 128ae624cf5f..67a370b808b5 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -2111,7 +2111,7 @@ print_arg(struct syscall_arg *sc, unsigned long *args, register_t *retval, break; } case Kevent11: { - struct kevent_freebsd11 *ke11; + struct freebsd11_kevent *ke11; struct kevent ke; int numevents = -1; size_t bytes; @@ -2123,7 +2123,7 @@ print_arg(struct syscall_arg *sc, unsigned long *args, register_t *retval, numevents = retval[0]; if (numevents >= 0) { - bytes = sizeof(struct kevent_freebsd11) * numevents; + bytes = sizeof(struct freebsd11_kevent) * numevents; if ((ke11 = malloc(bytes)) == NULL) err(1, "Cannot malloc %zu bytes for kevent array", From nobody Mon Nov 15 18:37:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5054C189E2A1; Mon, 15 Nov 2021 18:37: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 4HtHwZ6Qpsz3rlh; Mon, 15 Nov 2021 18:37:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A158C1ED05; Mon, 15 Nov 2021 18:37: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 1AFIb26G067971; Mon, 15 Nov 2021 18:37:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFIb2LD067970; Mon, 15 Nov 2021 18:37:02 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:37:02 GMT Message-Id: <202111151837.1AFIb2LD067970@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 3f8ced5bce29 - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f8ced5bce29d7fcc975d382281209db494e982c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=3f8ced5bce29d7fcc975d382281209db494e982c commit 3f8ced5bce29d7fcc975d382281209db494e982c Author: Brooks Davis AuthorDate: 2021-11-15 18:34:27 +0000 Commit: Brooks Davis CommitDate: 2021-11-15 18:34:27 +0000 syscalls: regen --- sys/compat/freebsd32/freebsd32_proto.h | 4 ++-- sys/kern/systrace_args.c | 4 ++-- sys/sys/sysproto.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 3a59abc99dcf..7a259a84a221 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -1263,9 +1263,9 @@ struct freebsd11_freebsd32_fhstat_args { }; struct freebsd11_freebsd32_kevent_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char changelist_l_[PADL_(const struct kevent32_freebsd11 *)]; const struct kevent32_freebsd11 * changelist; char changelist_r_[PADR_(const struct kevent32_freebsd11 *)]; + char changelist_l_[PADL_(const struct freebsd11_kevent32 *)]; const struct freebsd11_kevent32 * changelist; char changelist_r_[PADR_(const struct freebsd11_kevent32 *)]; char nchanges_l_[PADL_(int)]; int nchanges; char nchanges_r_[PADR_(int)]; - char eventlist_l_[PADL_(struct kevent32_freebsd11 *)]; struct kevent32_freebsd11 * eventlist; char eventlist_r_[PADR_(struct kevent32_freebsd11 *)]; + char eventlist_l_[PADL_(struct freebsd11_kevent32 *)]; struct freebsd11_kevent32 * eventlist; char eventlist_r_[PADR_(struct freebsd11_kevent32 *)]; char nevents_l_[PADL_(int)]; int nevents; char nevents_r_[PADR_(int)]; char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; }; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index a3e28aed31f9..8e34456d2fb2 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -3209,7 +3209,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 560: { struct kevent_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->changelist; /* struct kevent * */ + uarg[1] = (intptr_t)p->changelist; /* const struct kevent * */ iarg[2] = p->nchanges; /* int */ uarg[3] = (intptr_t)p->eventlist; /* struct kevent * */ iarg[4] = p->nevents; /* int */ @@ -8749,7 +8749,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct kevent *"; + p = "userland const struct kevent *"; break; case 2: p = "int"; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 2a89ee0770f3..5aadd3f0990b 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -1735,7 +1735,7 @@ struct mknodat_args { }; struct kevent_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char changelist_l_[PADL_(struct kevent *)]; struct kevent * changelist; char changelist_r_[PADR_(struct kevent *)]; + char changelist_l_[PADL_(const struct kevent *)]; const struct kevent * changelist; char changelist_r_[PADR_(const struct kevent *)]; char nchanges_l_[PADL_(int)]; int nchanges; char nchanges_r_[PADR_(int)]; char eventlist_l_[PADL_(struct kevent *)]; struct kevent * eventlist; char eventlist_r_[PADR_(struct kevent *)]; char nevents_l_[PADL_(int)]; int nevents; char nevents_r_[PADR_(int)]; @@ -2649,9 +2649,9 @@ struct freebsd11_fhstat_args { }; struct freebsd11_kevent_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char changelist_l_[PADL_(struct kevent_freebsd11 *)]; struct kevent_freebsd11 * changelist; char changelist_r_[PADR_(struct kevent_freebsd11 *)]; + char changelist_l_[PADL_(const struct freebsd11_kevent *)]; const struct freebsd11_kevent * changelist; char changelist_r_[PADR_(const struct freebsd11_kevent *)]; char nchanges_l_[PADL_(int)]; int nchanges; char nchanges_r_[PADR_(int)]; - char eventlist_l_[PADL_(struct kevent_freebsd11 *)]; struct kevent_freebsd11 * eventlist; char eventlist_r_[PADR_(struct kevent_freebsd11 *)]; + char eventlist_l_[PADL_(struct freebsd11_kevent *)]; struct freebsd11_kevent * eventlist; char eventlist_r_[PADR_(struct freebsd11_kevent *)]; char nevents_l_[PADL_(int)]; int nevents; char nevents_r_[PADR_(int)]; char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)]; }; From nobody Mon Nov 15 18:37:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6888D189E327; Mon, 15 Nov 2021 18:37: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 4HtHwd0DNQz3rwt; Mon, 15 Nov 2021 18:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF87D1ED06; Mon, 15 Nov 2021 18:37: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 1AFIb4QH068019; Mon, 15 Nov 2021 18:37:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFIb4Lx068018; Mon, 15 Nov 2021 18:37:04 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:37:04 GMT Message-Id: <202111151837.1AFIb4Lx068018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 9df4e7e2e90f - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9df4e7e2e90fc48b6f09eec5b92e63451a9cba26 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9df4e7e2e90fc48b6f09eec5b92e63451a9cba26 commit 9df4e7e2e90fc48b6f09eec5b92e63451a9cba26 Author: Brooks Davis AuthorDate: 2021-11-15 18:34:28 +0000 Commit: Brooks Davis CommitDate: 2021-11-15 18:34:28 +0000 syscalls: regen --- sys/compat/freebsd32/freebsd32_proto.h | 10 ++++++++++ sys/compat/freebsd32/freebsd32_syscall.h | 2 +- sys/compat/freebsd32/freebsd32_syscalls.c | 2 +- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 7a259a84a221..2ddd5f472ccf 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -936,6 +936,14 @@ struct ofreebsd32_fstat_args { struct ofreebsd32_getpagesize_args { char dummy_l_[PADL_(int32_t)]; int32_t dummy; char dummy_r_[PADR_(int32_t)]; }; +struct ofreebsd32_mmap_args { + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; + char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char pos_l_[PADL_(int32_t)]; int32_t pos; char pos_r_[PADR_(int32_t)]; +}; struct ofreebsd32_sigreturn_args { char sigcntxp_l_[PADL_(struct ia32_sigcontext3 *)]; struct ia32_sigcontext3 * sigcntxp; char sigcntxp_r_[PADR_(struct ia32_sigcontext3 *)]; }; @@ -986,6 +994,7 @@ int ofreebsd32_sigprocmask(struct thread *, struct ofreebsd32_sigprocmask_args * int ofreebsd32_sigpending(struct thread *, struct ofreebsd32_sigpending_args *); int ofreebsd32_fstat(struct thread *, struct ofreebsd32_fstat_args *); int ofreebsd32_getpagesize(struct thread *, struct ofreebsd32_getpagesize_args *); +int ofreebsd32_mmap(struct thread *, struct ofreebsd32_mmap_args *); int ofreebsd32_sigreturn(struct thread *, struct ofreebsd32_sigreturn_args *); int ofreebsd32_sigvec(struct thread *, struct ofreebsd32_sigvec_args *); int ofreebsd32_sigblock(struct thread *, struct ofreebsd32_sigblock_args *); @@ -1343,6 +1352,7 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_execve AUE_EXECVE #define FREEBSD32_SYS_AUE_ofreebsd32_fstat AUE_FSTAT #define FREEBSD32_SYS_AUE_ofreebsd32_getpagesize AUE_NULL +#define FREEBSD32_SYS_AUE_ofreebsd32_mmap AUE_MMAP #define FREEBSD32_SYS_AUE_freebsd32_mprotect AUE_MPROTECT #define FREEBSD32_SYS_AUE_freebsd32_setitimer AUE_SETITIMER #define FREEBSD32_SYS_AUE_freebsd32_getitimer AUE_GETITIMER diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 9f2f439c4c7f..124e8b0e05e7 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -76,7 +76,7 @@ /* 68 is obsolete vwrite */ #define FREEBSD32_SYS_sbrk 69 #define FREEBSD32_SYS_sstk 70 - /* 71 is old mmap */ + /* 71 is old freebsd32_mmap */ #define FREEBSD32_SYS_freebsd11_vadvise 72 #define FREEBSD32_SYS_munmap 73 #define FREEBSD32_SYS_freebsd32_mprotect 74 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 4d20af028834..f0ae365ddf3d 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -80,7 +80,7 @@ const char *freebsd32_syscallnames[] = { "obs_vwrite", /* 68 = obsolete vwrite */ "sbrk", /* 69 = sbrk */ "sstk", /* 70 = sstk */ - "compat.mmap", /* 71 = old mmap */ + "compat.freebsd32_mmap", /* 71 = old freebsd32_mmap */ "compat11.vadvise", /* 72 = freebsd11 vadvise */ "munmap", /* 73 = munmap */ "freebsd32_mprotect", /* 74 = freebsd32_mprotect */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index f8769b8de446..c48e7b1f3c9a 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -133,7 +133,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 68 = obsolete vwrite */ { .sy_narg = AS(sbrk_args), .sy_call = (sy_call_t *)sys_sbrk, .sy_auevent = AUE_SBRK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 69 = sbrk */ { .sy_narg = AS(sstk_args), .sy_call = (sy_call_t *)sys_sstk, .sy_auevent = AUE_SSTK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 70 = sstk */ - { compat(AS(ommap_args),mmap), .sy_auevent = AUE_MMAP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 71 = old mmap */ + { compat(AS(ofreebsd32_mmap_args),freebsd32_mmap), .sy_auevent = AUE_MMAP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 71 = old freebsd32_mmap */ { compat11(AS(freebsd11_vadvise_args),vadvise), .sy_auevent = AUE_O_VADVISE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 72 = freebsd11 vadvise */ { .sy_narg = AS(munmap_args), .sy_call = (sy_call_t *)sys_munmap, .sy_auevent = AUE_MUNMAP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 73 = munmap */ { .sy_narg = AS(freebsd32_mprotect_args), .sy_call = (sy_call_t *)freebsd32_mprotect, .sy_auevent = AUE_MPROTECT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 74 = freebsd32_mprotect */ From nobody Mon Nov 15 18:37:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 901C9189E160; Mon, 15 Nov 2021 18:37: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 4HtHwb6qYJz3s3B; Mon, 15 Nov 2021 18:37:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DC971ECAC; Mon, 15 Nov 2021 18:37: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 1AFIb3B9067995; Mon, 15 Nov 2021 18:37:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFIb3kd067994; Mon, 15 Nov 2021 18:37:03 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:37:03 GMT Message-Id: <202111151837.1AFIb3kd067994@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 01ce7fca440c - main - ommap: fix signed len and pos 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01ce7fca440cbb63275c8554049f0594602b173b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=01ce7fca440cbb63275c8554049f0594602b173b commit 01ce7fca440cbb63275c8554049f0594602b173b Author: Brooks Davis AuthorDate: 2021-11-15 18:34:28 +0000 Commit: Brooks Davis CommitDate: 2021-11-15 18:34:28 +0000 ommap: fix signed len and pos arguments 4.3 BSD's mmap took an int len and long pos. Reject negative lengths and in freebsd32 sign-extend pos correctly rather than mis-handling negative positions as large positive ones. Reviewed by: kib --- sys/compat/freebsd32/freebsd32_misc.c | 9 +++++++++ sys/compat/freebsd32/syscalls.master | 4 ++-- sys/sys/syscallsubr.h | 2 ++ sys/vm/vm_mmap.c | 29 ++++++++++++++++++++--------- 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index f05b63e5b0ac..4375d88fdb93 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -535,6 +535,15 @@ freebsd6_freebsd32_mmap(struct thread *td, } #endif +#ifdef COMPAT_43 +int +ofreebsd32_mmap(struct thread *td, struct ofreebsd32_mmap_args *uap) +{ + return (kern_ommap(td, (uintptr_t)uap->addr, uap->len, uap->prot, + uap->flags, uap->fd, uap->pos)); +} +#endif + int freebsd32_setitimer(struct thread *td, struct freebsd32_setitimer_args *uap) { diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 3d676fa9c3c8..c76e6b426b2e 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -176,8 +176,8 @@ 68 AUE_NULL OBSOL vwrite 69 AUE_SBRK NOPROTO { int sbrk(int incr); } 70 AUE_SSTK NOPROTO { int sstk(int incr); } -71 AUE_MMAP COMPAT|NOPROTO { void *mmap(void *addr, int len, \ - int prot, int flags, int fd, int pos); } +71 AUE_MMAP COMPAT { void *freebsd32_mmap(void *addr, int len, \ + int prot, int flags, int fd, int32_t pos); } 72 AUE_O_VADVISE COMPAT11|NOPROTO { int vadvise(int anom); } 73 AUE_MUNMAP NOPROTO { int munmap(void *addr, size_t len); } 74 AUE_MPROTECT STD { int freebsd32_mprotect(void *addr, \ diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 4b57ae5cf938..ecd0da74329f 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -218,6 +218,8 @@ int kern_nanosleep(struct thread *td, struct timespec *rqt, int kern_ntp_adjtime(struct thread *td, struct timex *ntv, int *retvalp); int kern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap, long *ploff); +int kern_ommap(struct thread *td, uintptr_t hint, int len, int oprot, + int oflags, int fd, long pos); int kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flags, int mode); int kern_pathconf(struct thread *td, const char *path, diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 21fe6d82ec6a..8ad049ed6d5e 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -456,6 +456,14 @@ struct ommap_args { #endif int ommap(struct thread *td, struct ommap_args *uap) +{ + return (kern_ommap(td, (uintptr_t)uap->addr, uap->len, uap->prot, + uap->flags, uap->fd, uap->pos)); +} + +int +kern_ommap(struct thread *td, uintptr_t hint, int len, int oprot, + int oflags, int fd, long pos) { static const char cvtbsdprot[8] = { 0, @@ -469,35 +477,38 @@ ommap(struct thread *td, struct ommap_args *uap) }; int flags, prot; + if (len < 0) + return (EINVAL); + #define OMAP_ANON 0x0002 #define OMAP_COPY 0x0020 #define OMAP_SHARED 0x0010 #define OMAP_FIXED 0x0100 - prot = cvtbsdprot[uap->prot & 0x7]; + prot = cvtbsdprot[oprot & 0x7]; #if (defined(COMPAT_FREEBSD32) && defined(__amd64__)) || defined(__i386__) if (i386_read_exec && SV_PROC_FLAG(td->td_proc, SV_ILP32) && prot != 0) prot |= PROT_EXEC; #endif flags = 0; - if (uap->flags & OMAP_ANON) + if (oflags & OMAP_ANON) flags |= MAP_ANON; - if (uap->flags & OMAP_COPY) + if (oflags & OMAP_COPY) flags |= MAP_COPY; - if (uap->flags & OMAP_SHARED) + if (oflags & OMAP_SHARED) flags |= MAP_SHARED; else flags |= MAP_PRIVATE; - if (uap->flags & OMAP_FIXED) + if (oflags & OMAP_FIXED) flags |= MAP_FIXED; return (kern_mmap(td, &(struct mmap_req){ - .mr_hint = (uintptr_t)uap->addr, - .mr_len = uap->len, + .mr_hint = hint, + .mr_len = len, .mr_prot = prot, .mr_flags = flags, - .mr_fd = uap->fd, - .mr_pos = uap->pos, + .mr_fd = fd, + .mr_pos = pos, })); } #endif /* COMPAT_43 */ From nobody Mon Nov 15 20:03:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2D35C188994E; Mon, 15 Nov 2021 20:03: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 4HtKrk0pRkz3DFs; Mon, 15 Nov 2021 20:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFEEE1FD2E; Mon, 15 Nov 2021 20:03: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 1AFK3nrA087718; Mon, 15 Nov 2021 20:03:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFK3nE8087717; Mon, 15 Nov 2021 20:03:49 GMT (envelope-from git) Date: Mon, 15 Nov 2021 20:03:49 GMT Message-Id: <202111152003.1AFK3nE8087717@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: 44265dc3dae1 - main - ktls: Add padding tests for AES-CBC MTE cipher suites. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 44265dc3dae1d373f33f474244b5c9811471080b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=44265dc3dae1d373f33f474244b5c9811471080b commit 44265dc3dae1d373f33f474244b5c9811471080b Author: John Baldwin AuthorDate: 2021-11-15 19:26:45 +0000 Commit: John Baldwin CommitDate: 2021-11-15 19:26:45 +0000 ktls: Add padding tests for AES-CBC MTE cipher suites. For each AES-CBC MTE cipher suite, test sending records with 1 to 16 bytes of payload. This ensures that all of the potential padding values are covered. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32840 --- tests/sys/kern/ktls_test.c | 95 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 88 insertions(+), 7 deletions(-) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index 908f7f1818a2..bf2b81645d31 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -970,9 +970,9 @@ ATF_TC_BODY(ktls_transmit_##cipher_name##_##name, tc) \ ATF_TP_ADD_TC(tp, ktls_transmit_##cipher_name##_##name); #define GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ - auth_alg, minor, type, len) \ -ATF_TC_WITHOUT_HEAD(ktls_transmit_##cipher_name##_control); \ -ATF_TC_BODY(ktls_transmit_##cipher_name##_control, tc) \ + auth_alg, minor, name, type, len) \ +ATF_TC_WITHOUT_HEAD(ktls_transmit_##cipher_name##_##name); \ +ATF_TC_BODY(ktls_transmit_##cipher_name##_##name, tc) \ { \ struct tls_enable en; \ uint64_t seqno; \ @@ -986,8 +986,8 @@ ATF_TC_BODY(ktls_transmit_##cipher_name##_control, tc) \ } #define ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ - auth_alg, minor) \ - ATF_TP_ADD_TC(tp, ktls_transmit_##cipher_name##_control); + auth_alg, minor, name) \ + ATF_TP_ADD_TC(tp, ktls_transmit_##cipher_name##_##name); #define GEN_TRANSMIT_TESTS(cipher_name, cipher_alg, key_size, auth_alg, \ minor) \ @@ -996,7 +996,7 @@ ATF_TC_BODY(ktls_transmit_##cipher_name##_control, tc) \ GEN_TRANSMIT_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ auth_alg, minor, long, 64 * 1024) \ GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ - auth_alg, minor, 0x21 /* Alert */, 32) + auth_alg, minor, control, 0x21 /* Alert */, 32) #define ADD_TRANSMIT_TESTS(cipher_name, cipher_alg, key_size, auth_alg, \ minor) \ @@ -1005,7 +1005,7 @@ ATF_TC_BODY(ktls_transmit_##cipher_name##_control, tc) \ ADD_TRANSMIT_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ auth_alg, minor, long) \ ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ - auth_alg, minor) + auth_alg, minor, control) /* * For each supported cipher suite, run three transmit tests: @@ -1023,11 +1023,92 @@ AES_CBC_TESTS(GEN_TRANSMIT_TESTS); AES_GCM_TESTS(GEN_TRANSMIT_TESTS); CHACHA20_TESTS(GEN_TRANSMIT_TESTS); +#define GEN_TRANSMIT_PADDING_TESTS(cipher_name, cipher_alg, key_size, \ + auth_alg, minor) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_1, 0x21 /* Alert */, 1) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_2, 0x21 /* Alert */, 2) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_3, 0x21 /* Alert */, 3) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_4, 0x21 /* Alert */, 4) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_5, 0x21 /* Alert */, 5) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_6, 0x21 /* Alert */, 6) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_7, 0x21 /* Alert */, 7) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_8, 0x21 /* Alert */, 8) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_9, 0x21 /* Alert */, 9) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_10, 0x21 /* Alert */, 10) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_11, 0x21 /* Alert */, 11) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_12, 0x21 /* Alert */, 12) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_13, 0x21 /* Alert */, 13) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_14, 0x21 /* Alert */, 14) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_15, 0x21 /* Alert */, 15) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_16, 0x21 /* Alert */, 16) + +#define ADD_TRANSMIT_PADDING_TESTS(cipher_name, cipher_alg, key_size, \ + auth_alg, minor) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_1) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_2) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_3) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_4) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_5) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_6) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_7) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_8) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_9) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_10) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_11) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_12) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_13) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_14) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_15) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_16) + +/* + * For AES-CBC MTE cipher suites using padding, add tests of messages + * with each possible padding size. Note that the padding_ tests + * do not necessarily test bytes of padding as the padding is a + * function of the cipher suite's MAC length. However, cycling + * through all of the payload sizes from 1 to 16 should exercise all + * of the possible padding lengths for each suite. + */ +AES_CBC_TESTS(GEN_TRANSMIT_PADDING_TESTS); + ATF_TP_ADD_TCS(tp) { AES_CBC_TESTS(ADD_TRANSMIT_TESTS); AES_GCM_TESTS(ADD_TRANSMIT_TESTS); CHACHA20_TESTS(ADD_TRANSMIT_TESTS); + AES_CBC_TESTS(ADD_TRANSMIT_PADDING_TESTS); return (atf_no_error()); } From nobody Mon Nov 15 20:03:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BEF891889761; Mon, 15 Nov 2021 20:03: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 4HtKrl2p6jz3D6q; Mon, 15 Nov 2021 20:03:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 292B21FE40; Mon, 15 Nov 2021 20:03: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 1AFK3ph5087745; Mon, 15 Nov 2021 20:03:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFK3pCd087744; Mon, 15 Nov 2021 20:03:51 GMT (envelope-from git) Date: Mon, 15 Nov 2021 20:03:51 GMT Message-Id: <202111152003.1AFK3pCd087744@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: 0ff2a12ae32a - main - ktls: Add tests for sending empty fragments for TLS 1.0 connections. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0ff2a12ae32a3a88be63f4036599c1324ce04f78 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0ff2a12ae32a3a88be63f4036599c1324ce04f78 commit 0ff2a12ae32a3a88be63f4036599c1324ce04f78 Author: John Baldwin AuthorDate: 2021-11-15 19:27:15 +0000 Commit: John Baldwin CommitDate: 2021-11-15 19:28:12 +0000 ktls: Add tests for sending empty fragments for TLS 1.0 connections. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32841 --- tests/sys/kern/ktls_test.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index bf2b81645d31..423ccf65cb0c 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -911,6 +911,64 @@ test_ktls_transmit_control(struct tls_enable *en, uint64_t seqno, uint8_t type, close(sockets[0]); } +static void +test_ktls_transmit_empty_fragment(struct tls_enable *en, uint64_t seqno) +{ + struct tls_record_layer *hdr; + char *outbuf; + size_t outbuf_cap, payload_len, record_len; + ssize_t rv; + int sockets[2]; + uint8_t record_type; + + outbuf_cap = tls_header_len(en) + tls_trailer_len(en); + outbuf = malloc(outbuf_cap); + hdr = (struct tls_record_layer *)outbuf; + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[1], IPPROTO_TCP, TCP_TXTLS_ENABLE, en, + sizeof(*en)) == 0); + + fd_set_blocking(sockets[0]); + fd_set_blocking(sockets[1]); + + /* A write of zero bytes should send an empty fragment. */ + rv = write(sockets[1], NULL, 0); + ATF_REQUIRE(rv == 0); + + /* + * First read the header to determine how much additional data + * to read. + */ + rv = read(sockets[0], outbuf, sizeof(struct tls_record_layer)); + ATF_REQUIRE(rv == sizeof(struct tls_record_layer)); + payload_len = ntohs(hdr->tls_length); + record_len = payload_len + sizeof(struct tls_record_layer); + ATF_REQUIRE(record_len <= outbuf_cap); + rv = read(sockets[0], outbuf + sizeof(struct tls_record_layer), + payload_len); + ATF_REQUIRE(rv == (ssize_t)payload_len); + + rv = decrypt_tls_record(en, seqno, outbuf, record_len, NULL, 0, + &record_type); + + ATF_REQUIRE_MSG(rv == 0, + "read %zd decrypted bytes for an empty fragment", rv); + ATF_REQUIRE(record_type == TLS_RLTYPE_APP); + + free(outbuf); + + close(sockets[1]); + close(sockets[0]); +} + +#define TLS_10_TESTS(M) \ + M(aes128_cbc_1_0_sha1, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA1_HMAC) \ + M(aes256_cbc_1_0_sha1, CRYPTO_AES_CBC, 256 / 8, \ + CRYPTO_SHA1_HMAC) + #define AES_CBC_TESTS(M) \ M(aes128_cbc_1_0_sha1, CRYPTO_AES_CBC, 128 / 8, \ CRYPTO_SHA1_HMAC, TLS_MINOR_VER_ZERO) \ @@ -989,6 +1047,26 @@ ATF_TC_BODY(ktls_transmit_##cipher_name##_##name, tc) \ auth_alg, minor, name) \ ATF_TP_ADD_TC(tp, ktls_transmit_##cipher_name##_##name); +#define GEN_TRANSMIT_EMPTY_FRAGMENT_TEST(cipher_name, cipher_alg, \ + key_size, auth_alg) \ +ATF_TC_WITHOUT_HEAD(ktls_transmit_##cipher_name##_empty_fragment); \ +ATF_TC_BODY(ktls_transmit_##cipher_name##_empty_fragment, tc) \ +{ \ + struct tls_enable en; \ + uint64_t seqno; \ + \ + ATF_REQUIRE_KTLS(); \ + seqno = random(); \ + build_tls_enable(cipher_alg, key_size, auth_alg, \ + TLS_MINOR_VER_ZERO, seqno, &en); \ + test_ktls_transmit_empty_fragment(&en, seqno); \ + free_tls_enable(&en); \ +} + +#define ADD_TRANSMIT_EMPTY_FRAGMENT_TEST(cipher_name, cipher_alg, \ + key_size, auth_alg) \ + ATF_TP_ADD_TC(tp, ktls_transmit_##cipher_name##_empty_fragment); + #define GEN_TRANSMIT_TESTS(cipher_name, cipher_alg, key_size, auth_alg, \ minor) \ GEN_TRANSMIT_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ @@ -1103,12 +1181,19 @@ CHACHA20_TESTS(GEN_TRANSMIT_TESTS); */ AES_CBC_TESTS(GEN_TRANSMIT_PADDING_TESTS); +/* + * Test "empty fragments" which are TLS records with no payload that + * OpenSSL can send for TLS 1.0 connections. + */ +TLS_10_TESTS(GEN_TRANSMIT_EMPTY_FRAGMENT_TEST); + ATF_TP_ADD_TCS(tp) { AES_CBC_TESTS(ADD_TRANSMIT_TESTS); AES_GCM_TESTS(ADD_TRANSMIT_TESTS); CHACHA20_TESTS(ADD_TRANSMIT_TESTS); AES_CBC_TESTS(ADD_TRANSMIT_PADDING_TESTS); + TLS_10_TESTS(ADD_TRANSMIT_EMPTY_FRAGMENT_TEST); return (atf_no_error()); } From nobody Mon Nov 15 20:03:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0CE121889B9C; Mon, 15 Nov 2021 20:03: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 4HtKrm3ntZz3Cw4; Mon, 15 Nov 2021 20:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D8E21FE41; Mon, 15 Nov 2021 20:03: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 1AFK3qdW087769; Mon, 15 Nov 2021 20:03:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFK3qdO087768; Mon, 15 Nov 2021 20:03:52 GMT (envelope-from git) Date: Mon, 15 Nov 2021 20:03:52 GMT Message-Id: <202111152003.1AFK3qdO087768@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: 900a28fe33ef - main - ktls: Reject some invalid cipher suites. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 900a28fe33ef998aaee55cb243f4efa35471da07 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=900a28fe33ef998aaee55cb243f4efa35471da07 commit 900a28fe33ef998aaee55cb243f4efa35471da07 Author: John Baldwin AuthorDate: 2021-11-15 19:28:56 +0000 Commit: John Baldwin CommitDate: 2021-11-15 19:30:12 +0000 ktls: Reject some invalid cipher suites. - Reject AES-CBC cipher suites for TLS 1.0 and TLS 1.1 using auth algorithms other than SHA1-HMAC. - Reject AES-GCM cipher suites for TLS versions older than 1.2. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32842 --- sys/kern/uipc_ktls.c | 51 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 4e14cee18c8a..07e5a4c8399f 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -551,40 +551,51 @@ ktls_create_session(struct socket *so, struct tls_enable *en, } if (en->auth_key_len != 0) return (EINVAL); - if ((en->tls_vminor == TLS_MINOR_VER_TWO && - en->iv_len != TLS_AEAD_GCM_LEN) || - (en->tls_vminor == TLS_MINOR_VER_THREE && - en->iv_len != TLS_1_3_GCM_IV_LEN)) + switch (en->tls_vminor) { + case TLS_MINOR_VER_TWO: + if (en->iv_len != TLS_AEAD_GCM_LEN) + return (EINVAL); + break; + case TLS_MINOR_VER_THREE: + if (en->iv_len != TLS_1_3_GCM_IV_LEN) + return (EINVAL); + break; + default: return (EINVAL); + } break; case CRYPTO_AES_CBC: switch (en->auth_algorithm) { case CRYPTO_SHA1_HMAC: - /* - * TLS 1.0 requires an implicit IV. TLS 1.1+ - * all use explicit IVs. - */ - if (en->tls_vminor == TLS_MINOR_VER_ZERO) { - if (en->iv_len != TLS_CBC_IMPLICIT_IV_LEN) - return (EINVAL); - break; - } - - /* FALLTHROUGH */ + break; case CRYPTO_SHA2_256_HMAC: case CRYPTO_SHA2_384_HMAC: - /* Ignore any supplied IV. */ - en->iv_len = 0; + if (en->tls_vminor != TLS_MINOR_VER_TWO) + return (EINVAL); break; default: return (EINVAL); } if (en->auth_key_len == 0) return (EINVAL); - if (en->tls_vminor != TLS_MINOR_VER_ZERO && - en->tls_vminor != TLS_MINOR_VER_ONE && - en->tls_vminor != TLS_MINOR_VER_TWO) + + /* + * TLS 1.0 requires an implicit IV. TLS 1.1 and 1.2 + * use explicit IVs. + */ + switch (en->tls_vminor) { + case TLS_MINOR_VER_ZERO: + if (en->iv_len != TLS_CBC_IMPLICIT_IV_LEN) + return (EINVAL); + break; + case TLS_MINOR_VER_ONE: + case TLS_MINOR_VER_TWO: + /* Ignore any supplied IV. */ + en->iv_len = 0; + break; + default: return (EINVAL); + } break; case CRYPTO_CHACHA20_POLY1305: if (en->auth_algorithm != 0 || en->auth_key_len != 0) From nobody Mon Nov 15 20:03:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 12BCD1889C83; Mon, 15 Nov 2021 20:03: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 4HtKrn65Ctz3DCn; Mon, 15 Nov 2021 20:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E5D31FE42; Mon, 15 Nov 2021 20:03: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 1AFK3rwL087793; Mon, 15 Nov 2021 20:03:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFK3r5a087792; Mon, 15 Nov 2021 20:03:53 GMT (envelope-from git) Date: Mon, 15 Nov 2021 20:03:53 GMT Message-Id: <202111152003.1AFK3r5a087792@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: d1c369f926e7 - main - ktls: Add tests ensuring various invalid cipher suites are rejected. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d1c369f926e7d04354d044cc13d8ecfb3e325636 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d1c369f926e7d04354d044cc13d8ecfb3e325636 commit d1c369f926e7d04354d044cc13d8ecfb3e325636 Author: John Baldwin AuthorDate: 2021-11-15 19:30:48 +0000 Commit: John Baldwin CommitDate: 2021-11-15 19:30:48 +0000 ktls: Add tests ensuring various invalid cipher suites are rejected. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32843 --- tests/sys/kern/ktls_test.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index 423ccf65cb0c..ef0f7405b3fd 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -1187,6 +1187,70 @@ AES_CBC_TESTS(GEN_TRANSMIT_PADDING_TESTS); */ TLS_10_TESTS(GEN_TRANSMIT_EMPTY_FRAGMENT_TEST); +static void +test_ktls_invalid_transmit_cipher_suite(struct tls_enable *en) +{ + int sockets[2]; + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[1], IPPROTO_TCP, TCP_TXTLS_ENABLE, en, + sizeof(*en)) == -1); + ATF_REQUIRE(errno == EINVAL); + + close(sockets[1]); + close(sockets[0]); +} + +#define GEN_INVALID_TRANSMIT_TEST(name, cipher_alg, key_size, auth_alg, \ + minor) \ +ATF_TC_WITHOUT_HEAD(ktls_transmit_invalid_##name); \ +ATF_TC_BODY(ktls_transmit_invalid_##name, tc) \ +{ \ + struct tls_enable en; \ + uint64_t seqno; \ + \ + ATF_REQUIRE_KTLS(); \ + seqno = random(); \ + build_tls_enable(cipher_alg, key_size, auth_alg, minor, seqno, \ + &en); \ + test_ktls_invalid_transmit_cipher_suite(&en); \ + free_tls_enable(&en); \ +} + +#define ADD_INVALID_TRANSMIT_TEST(name, cipher_alg, key_size, auth_alg, \ + minor) \ + ATF_TP_ADD_TC(tp, ktls_transmit_invalid_##name); + +#define INVALID_CIPHER_SUITES(M) \ + M(aes128_cbc_1_0_sha256, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_256_HMAC, TLS_MINOR_VER_ZERO) \ + M(aes128_cbc_1_0_sha384, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_384_HMAC, TLS_MINOR_VER_ZERO) \ + M(aes128_gcm_1_0, CRYPTO_AES_NIST_GCM_16, 128 / 8, 0, \ + TLS_MINOR_VER_ZERO) \ + M(chacha20_poly1305_1_0, CRYPTO_CHACHA20_POLY1305, 256 / 8, 0, \ + TLS_MINOR_VER_ZERO) \ + M(aes128_cbc_1_1_sha256, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_256_HMAC, TLS_MINOR_VER_ONE) \ + M(aes128_cbc_1_1_sha384, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_384_HMAC, TLS_MINOR_VER_ONE) \ + M(aes128_gcm_1_1, CRYPTO_AES_NIST_GCM_16, 128 / 8, 0, \ + TLS_MINOR_VER_ONE) \ + M(chacha20_poly1305_1_1, CRYPTO_CHACHA20_POLY1305, 256 / 8, 0, \ + TLS_MINOR_VER_ONE) \ + M(aes128_cbc_1_3_sha1, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA1_HMAC, TLS_MINOR_VER_THREE) \ + M(aes128_cbc_1_3_sha256, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_256_HMAC, TLS_MINOR_VER_THREE) \ + M(aes128_cbc_1_3_sha384, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_384_HMAC, TLS_MINOR_VER_THREE) + +/* + * Ensure that invalid cipher suites are rejected for transmit. + */ +INVALID_CIPHER_SUITES(GEN_INVALID_TRANSMIT_TEST); + ATF_TP_ADD_TCS(tp) { AES_CBC_TESTS(ADD_TRANSMIT_TESTS); @@ -1194,6 +1258,7 @@ ATF_TP_ADD_TCS(tp) CHACHA20_TESTS(ADD_TRANSMIT_TESTS); AES_CBC_TESTS(ADD_TRANSMIT_PADDING_TESTS); TLS_10_TESTS(ADD_TRANSMIT_EMPTY_FRAGMENT_TEST); + INVALID_CIPHER_SUITES(ADD_INVALID_TRANSMIT_TEST); return (atf_no_error()); } From nobody Mon Nov 15 20:03:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CAE911889BCB; Mon, 15 Nov 2021 20:03: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 4HtKrs1c7mz3DB8; Mon, 15 Nov 2021 20:03:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3CE91FDDC; Mon, 15 Nov 2021 20:03: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 1AFK3uQm087871; Mon, 15 Nov 2021 20:03:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFK3uON087870; Mon, 15 Nov 2021 20:03:56 GMT (envelope-from git) Date: Mon, 15 Nov 2021 20:03:56 GMT Message-Id: <202111152003.1AFK3uON087870@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: 83a54b582f89 - main - ktls: Add tests ensuring unsupported receive cipher suites are rejected. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 83a54b582f89ff63f9076eb7d50b5cdbd009905f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=83a54b582f89ff63f9076eb7d50b5cdbd009905f commit 83a54b582f89ff63f9076eb7d50b5cdbd009905f Author: John Baldwin AuthorDate: 2021-11-15 19:32:49 +0000 Commit: John Baldwin CommitDate: 2021-11-15 19:32:49 +0000 ktls: Add tests ensuring unsupported receive cipher suites are rejected. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32982 --- tests/sys/kern/ktls_test.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index 5aea56baa91f..21e3213a8634 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -1237,6 +1237,14 @@ test_ktls_receive_app_data(struct tls_enable *en, uint64_t seqno, size_t len) M(chacha20_poly1305_1_2, CRYPTO_CHACHA20_POLY1305, 256 / 8, 0, \ TLS_MINOR_VER_TWO) +#define TLS_13_TESTS(M) \ + M(aes128_gcm_1_3, CRYPTO_AES_NIST_GCM_16, 128 / 8, 0, \ + TLS_MINOR_VER_THREE) \ + M(aes256_gcm_1_3, CRYPTO_AES_NIST_GCM_16, 256 / 8, 0, \ + TLS_MINOR_VER_THREE) \ + M(chacha20_poly1305_1_3, CRYPTO_CHACHA20_POLY1305, 256 / 8, 0, \ + TLS_MINOR_VER_THREE) + #define AES_CBC_TESTS(M) \ M(aes128_cbc_1_0_sha1, CRYPTO_AES_CBC, 128 / 8, \ CRYPTO_SHA1_HMAC, TLS_MINOR_VER_ZERO) \ @@ -1612,6 +1620,48 @@ ATF_TC_BODY(ktls_receive_invalid_##name, tc) \ */ INVALID_CIPHER_SUITES(GEN_INVALID_RECEIVE_TEST); +static void +test_ktls_unsupported_receive_cipher_suite(struct tls_enable *en) +{ + int sockets[2]; + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[1], IPPROTO_TCP, TCP_RXTLS_ENABLE, en, + sizeof(*en)) == -1); + ATF_REQUIRE(errno == EPROTONOSUPPORT || errno == ENOTSUP); + + close(sockets[1]); + close(sockets[0]); +} + +#define GEN_UNSUPPORTED_RECEIVE_TEST(name, cipher_alg, key_size, \ + auth_alg, minor) \ +ATF_TC_WITHOUT_HEAD(ktls_receive_unsupported_##name); \ +ATF_TC_BODY(ktls_receive_unsupported_##name, tc) \ +{ \ + struct tls_enable en; \ + uint64_t seqno; \ + \ + ATF_REQUIRE_KTLS(); \ + seqno = random(); \ + build_tls_enable(cipher_alg, key_size, auth_alg, minor, seqno, \ + &en); \ + test_ktls_unsupported_receive_cipher_suite(&en); \ + free_tls_enable(&en); \ +} + +#define ADD_UNSUPPORTED_RECEIVE_TEST(name, cipher_alg, key_size, \ + auth_alg, minor) \ + ATF_TP_ADD_TC(tp, ktls_receive_unsupported_##name); + +/* + * Ensure that valid cipher suites not supported for receive are + * rejected. + */ +AES_CBC_TESTS(GEN_UNSUPPORTED_RECEIVE_TEST); +TLS_13_TESTS(GEN_UNSUPPORTED_RECEIVE_TEST); + ATF_TP_ADD_TCS(tp) { /* Transmit tests */ @@ -1623,7 +1673,9 @@ ATF_TP_ADD_TCS(tp) INVALID_CIPHER_SUITES(ADD_INVALID_TRANSMIT_TEST); /* Receive tests */ + AES_CBC_TESTS(ADD_UNSUPPORTED_RECEIVE_TEST); TLS_12_TESTS(ADD_RECEIVE_TESTS); + TLS_13_TESTS(ADD_UNSUPPORTED_RECEIVE_TEST); INVALID_CIPHER_SUITES(ADD_INVALID_RECEIVE_TEST); return (atf_no_error()); From nobody Mon Nov 15 20:03:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BC7ED1889D93; Mon, 15 Nov 2021 20:03: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 4HtKrr5MZkz3CwZ; Mon, 15 Nov 2021 20:03:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 860211FC76; Mon, 15 Nov 2021 20:03: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 1AFK3sIm087817; Mon, 15 Nov 2021 20:03:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFK3se1087816; Mon, 15 Nov 2021 20:03:54 GMT (envelope-from git) Date: Mon, 15 Nov 2021 20:03:54 GMT Message-Id: <202111152003.1AFK3se1087816@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: 3e7f8a8da254 - main - ktls: Add simple receive tests of kernel TLS. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3e7f8a8da254cfa97af90c3aae1cb827da55fc9d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3e7f8a8da254cfa97af90c3aae1cb827da55fc9d commit 3e7f8a8da254cfa97af90c3aae1cb827da55fc9d Author: John Baldwin AuthorDate: 2021-11-15 19:31:16 +0000 Commit: John Baldwin CommitDate: 2021-11-15 19:31:16 +0000 ktls: Add simple receive tests of kernel TLS. Similar to the simple transmit tests added in a10482ea7476d68d1ab028145ae6d97cef747b49, these tests test the kernel TLS functionality directly by manually encrypting TLS records using randomly generated keys and writing them to a socket to be processed by the kernel. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32980 --- tests/sys/kern/ktls_test.c | 319 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 319 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index ef0f7405b3fd..bdd2e62a546c 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -262,6 +262,68 @@ verify_hash(const EVP_MD *md, const void *key, size_t key_len, const void *aad, return (true); } +static bool +aead_encrypt(const EVP_CIPHER *cipher, const char *key, const char *nonce, + const void *aad, size_t aad_len, const char *input, char *output, + size_t size, char *tag, size_t tag_len) +{ + EVP_CIPHER_CTX *ctx; + int outl, total; + + ctx = EVP_CIPHER_CTX_new(); + if (ctx == NULL) { + warnx("EVP_CIPHER_CTX_new failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + return (false); + } + if (EVP_EncryptInit_ex(ctx, cipher, NULL, (const u_char *)key, + (const u_char *)nonce) != 1) { + warnx("EVP_EncryptInit_ex failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + EVP_CIPHER_CTX_set_padding(ctx, 0); + if (aad != NULL) { + if (EVP_EncryptUpdate(ctx, NULL, &outl, (const u_char *)aad, + aad_len) != 1) { + warnx("EVP_EncryptUpdate for AAD failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + } + if (EVP_EncryptUpdate(ctx, (u_char *)output, &outl, + (const u_char *)input, size) != 1) { + warnx("EVP_EncryptUpdate failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + total = outl; + if (EVP_EncryptFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) { + warnx("EVP_EncryptFinal_ex failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + total += outl; + if ((size_t)total != size) { + warnx("encrypt size mismatch: %zu vs %d", size, total); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, tag_len, tag) != + 1) { + warnx("EVP_CIPHER_CTX_ctrl(EVP_CTRL_AEAD_GET_TAG) failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + EVP_CIPHER_CTX_free(ctx); + return (true); +} + static bool aead_decrypt(const EVP_CIPHER *cipher, const char *key, const char *nonce, const void *aad, size_t aad_len, const char *input, char *output, @@ -714,6 +776,68 @@ decrypt_tls_record(struct tls_enable *en, uint64_t seqno, const void *src, record_type)); } +/* + * Encrypt a TLS record of type 'record_type' with payload 'len' bytes + * long at 'src' and store the result at 'dst'. If 'dst' doesn't have + * sufficient room ('avail'), fail the test. + */ +static size_t +encrypt_tls_12_aead(struct tls_enable *en, uint8_t record_type, uint64_t seqno, + const void *src, size_t len, void *dst) +{ + struct tls_record_layer *hdr; + struct tls_aead_data aad; + char nonce[12]; + size_t hdr_len, mac_len, record_len; + + hdr = dst; + + hdr_len = tls_header_len(en); + mac_len = tls_mac_len(en); + record_len = hdr_len + len + mac_len; + + hdr->tls_type = record_type; + hdr->tls_vmajor = TLS_MAJOR_VER_ONE; + hdr->tls_vminor = TLS_MINOR_VER_TWO; + hdr->tls_length = htons(record_len - sizeof(*hdr)); + if (en->cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + memcpy(hdr + 1, &seqno, sizeof(seqno)); + + tls_12_aead_aad(en, len, hdr, seqno, &aad); + if (en->cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + tls_12_gcm_nonce(en, hdr, nonce); + else + tls_13_nonce(en, seqno, nonce); + + ATF_REQUIRE(aead_encrypt(tls_EVP_CIPHER(en), en->cipher_key, nonce, + &aad, sizeof(aad), src, (char *)dst + hdr_len, len, + (char *)dst + hdr_len + len, mac_len)); + + return (record_len); +} + +static size_t +encrypt_tls_aead(struct tls_enable *en, uint8_t record_type, uint64_t seqno, + const void *src, size_t len, void *dst, size_t avail) +{ + size_t record_len; + + record_len = tls_header_len(en) + len + tls_trailer_len(en); + ATF_REQUIRE(record_len <= avail); + + ATF_REQUIRE(encrypt_tls_12_aead(en, record_type, seqno, src, len, + dst) == record_len); + + return (record_len); +} + +static size_t +encrypt_tls_record(struct tls_enable *en, uint8_t record_type, uint64_t seqno, + const void *src, size_t len, void *dst, size_t avail) +{ + return (encrypt_tls_aead(en, record_type, seqno, src, len, dst, avail)); +} + static void test_ktls_transmit_app_data(struct tls_enable *en, uint64_t seqno, size_t len) { @@ -963,12 +1087,156 @@ test_ktls_transmit_empty_fragment(struct tls_enable *en, uint64_t seqno) close(sockets[0]); } +static size_t +ktls_receive_tls_record(struct tls_enable *en, int fd, uint8_t record_type, + void *data, size_t len) +{ + struct msghdr msg; + struct cmsghdr *cmsg; + struct tls_get_record *tgr; + char cbuf[CMSG_SPACE(sizeof(*tgr))]; + struct iovec iov; + ssize_t rv; + + memset(&msg, 0, sizeof(msg)); + + msg.msg_control = cbuf; + msg.msg_controllen = sizeof(cbuf); + + iov.iov_base = data; + iov.iov_len = len; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + + ATF_REQUIRE((rv = recvmsg(fd, &msg, 0)) > 0); + + ATF_REQUIRE((msg.msg_flags & (MSG_EOR | MSG_CTRUNC)) == MSG_EOR); + + cmsg = CMSG_FIRSTHDR(&msg); + ATF_REQUIRE(cmsg != NULL); + ATF_REQUIRE(cmsg->cmsg_level == IPPROTO_TCP); + ATF_REQUIRE(cmsg->cmsg_type == TLS_GET_RECORD); + ATF_REQUIRE(cmsg->cmsg_len == CMSG_LEN(sizeof(*tgr))); + + tgr = (struct tls_get_record *)CMSG_DATA(cmsg); + ATF_REQUIRE(tgr->tls_type == record_type); + ATF_REQUIRE(tgr->tls_vmajor == en->tls_vmajor); + ATF_REQUIRE(tgr->tls_vminor == en->tls_vminor); + ATF_REQUIRE(tgr->tls_length == htons(rv)); + + return (rv); +} + +static void +test_ktls_receive_app_data(struct tls_enable *en, uint64_t seqno, size_t len) +{ + struct kevent ev; + char *plaintext, *received, *outbuf; + size_t outbuf_cap, outbuf_len, outbuf_sent, received_len, todo, written; + ssize_t rv; + int kq, sockets[2]; + + plaintext = alloc_buffer(len); + received = malloc(len); + outbuf_cap = tls_header_len(en) + TLS_MAX_MSG_SIZE_V10_2 + + tls_trailer_len(en); + outbuf = malloc(outbuf_cap); + + ATF_REQUIRE((kq = kqueue()) != -1); + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[0], IPPROTO_TCP, TCP_RXTLS_ENABLE, en, + sizeof(*en)) == 0); + + EV_SET(&ev, sockets[0], EVFILT_READ, EV_ADD, 0, 0, NULL); + ATF_REQUIRE(kevent(kq, &ev, 1, NULL, 0, NULL) == 0); + EV_SET(&ev, sockets[1], EVFILT_WRITE, EV_ADD, 0, 0, NULL); + ATF_REQUIRE(kevent(kq, &ev, 1, NULL, 0, NULL) == 0); + + received_len = 0; + outbuf_len = 0; + written = 0; + + while (received_len != len) { + ATF_REQUIRE(kevent(kq, NULL, 0, &ev, 1, NULL) == 1); + + switch (ev.filter) { + case EVFILT_WRITE: + /* + * Compose the next TLS record to send. + */ + if (outbuf_len == 0) { + ATF_REQUIRE(written < len); + todo = len - written; + if (todo > TLS_MAX_MSG_SIZE_V10_2) + todo = TLS_MAX_MSG_SIZE_V10_2; + outbuf_len = encrypt_tls_record(en, + TLS_RLTYPE_APP, seqno, plaintext + written, + todo, outbuf, outbuf_cap); + outbuf_sent = 0; + written += todo; + seqno++; + } + + /* + * Try to write the remainder of the current + * TLS record. + */ + rv = write(ev.ident, outbuf + outbuf_sent, + outbuf_len - outbuf_sent); + ATF_REQUIRE_MSG(rv > 0, + "failed to write to socket"); + outbuf_sent += rv; + if (outbuf_sent == outbuf_len) { + outbuf_len = 0; + if (written == len) { + ev.flags = EV_DISABLE; + ATF_REQUIRE(kevent(kq, &ev, 1, NULL, 0, + NULL) == 0); + } + } + break; + + case EVFILT_READ: + ATF_REQUIRE((ev.flags & EV_EOF) == 0); + + rv = ktls_receive_tls_record(en, ev.ident, + TLS_RLTYPE_APP, received + received_len, + len - received_len); + received_len += rv; + break; + } + } + + ATF_REQUIRE_MSG(written == received_len, + "read %zu decrypted bytes, but wrote %zu", received_len, written); + + ATF_REQUIRE(memcmp(plaintext, received, len) == 0); + + free(outbuf); + free(received); + free(plaintext); + + close(sockets[1]); + close(sockets[0]); + close(kq); +} + #define TLS_10_TESTS(M) \ M(aes128_cbc_1_0_sha1, CRYPTO_AES_CBC, 128 / 8, \ CRYPTO_SHA1_HMAC) \ M(aes256_cbc_1_0_sha1, CRYPTO_AES_CBC, 256 / 8, \ CRYPTO_SHA1_HMAC) +#define TLS_12_TESTS(M) \ + M(aes128_gcm_1_2, CRYPTO_AES_NIST_GCM_16, 128 / 8, 0, \ + TLS_MINOR_VER_TWO) \ + M(aes256_gcm_1_2, CRYPTO_AES_NIST_GCM_16, 256 / 8, 0, \ + TLS_MINOR_VER_TWO) \ + M(chacha20_poly1305_1_2, CRYPTO_CHACHA20_POLY1305, 256 / 8, 0, \ + TLS_MINOR_VER_TWO) + #define AES_CBC_TESTS(M) \ M(aes128_cbc_1_0_sha1, CRYPTO_AES_CBC, 128 / 8, \ CRYPTO_SHA1_HMAC, TLS_MINOR_VER_ZERO) \ @@ -1251,8 +1519,57 @@ ATF_TC_BODY(ktls_transmit_invalid_##name, tc) \ */ INVALID_CIPHER_SUITES(GEN_INVALID_TRANSMIT_TEST); +#define GEN_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, name, len) \ +ATF_TC_WITHOUT_HEAD(ktls_receive_##cipher_name##_##name); \ +ATF_TC_BODY(ktls_receive_##cipher_name##_##name, tc) \ +{ \ + struct tls_enable en; \ + uint64_t seqno; \ + \ + ATF_REQUIRE_KTLS(); \ + seqno = random(); \ + build_tls_enable(cipher_alg, key_size, auth_alg, minor, seqno, \ + &en); \ + test_ktls_receive_app_data(&en, seqno, len); \ + free_tls_enable(&en); \ +} + +#define ADD_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, name) \ + ATF_TP_ADD_TC(tp, ktls_receive_##cipher_name##_##name); + +#define GEN_RECEIVE_TESTS(cipher_name, cipher_alg, key_size, auth_alg, \ + minor) \ + GEN_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, short, 64) \ + GEN_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, long, 64 * 1024) + +#define ADD_RECEIVE_TESTS(cipher_name, cipher_alg, key_size, auth_alg, \ + minor) \ + ADD_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, short) \ + ADD_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, long) + +/* + * For each supported cipher suite, run two receive tests: + * + * - a short test which sends 64 bytes of application data (likely as + * a single TLS record) + * + * - a long test which sends 64KB of application data (split across + * multiple TLS records) + * + * Note that receive is currently only supported for TLS 1.2 AEAD + * cipher suites. + */ +TLS_12_TESTS(GEN_RECEIVE_TESTS); + ATF_TP_ADD_TCS(tp) { + /* Transmit tests */ AES_CBC_TESTS(ADD_TRANSMIT_TESTS); AES_GCM_TESTS(ADD_TRANSMIT_TESTS); CHACHA20_TESTS(ADD_TRANSMIT_TESTS); @@ -1260,5 +1577,7 @@ ATF_TP_ADD_TCS(tp) TLS_10_TESTS(ADD_TRANSMIT_EMPTY_FRAGMENT_TEST); INVALID_CIPHER_SUITES(ADD_INVALID_TRANSMIT_TEST); + /* Receive tests */ + TLS_12_TESTS(ADD_RECEIVE_TESTS); return (atf_no_error()); } From nobody Mon Nov 15 20:03:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 85DFD1889DA1; Mon, 15 Nov 2021 20: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 4HtKrs5VCvz3D7D; Mon, 15 Nov 2021 20:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A83F9200DF; Mon, 15 Nov 2021 20:03: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 1AFK3tM9087841; Mon, 15 Nov 2021 20:03:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFK3tlh087840; Mon, 15 Nov 2021 20:03:55 GMT (envelope-from git) Date: Mon, 15 Nov 2021 20:03:55 GMT Message-Id: <202111152003.1AFK3tlh087840@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: 233ce578a424 - main - ktls: Add tests ensuring invalid receive cipher suites are rejected. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 233ce578a424a7a3e5cf21ea6ba2b2036950d54f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=233ce578a424a7a3e5cf21ea6ba2b2036950d54f commit 233ce578a424a7a3e5cf21ea6ba2b2036950d54f Author: John Baldwin AuthorDate: 2021-11-15 19:32:15 +0000 Commit: John Baldwin CommitDate: 2021-11-15 19:32:15 +0000 ktls: Add tests ensuring invalid receive cipher suites are rejected. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32981 --- tests/sys/kern/ktls_test.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index bdd2e62a546c..5aea56baa91f 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -1567,6 +1567,51 @@ ATF_TC_BODY(ktls_receive_##cipher_name##_##name, tc) \ */ TLS_12_TESTS(GEN_RECEIVE_TESTS); +static void +test_ktls_invalid_receive_cipher_suite(struct tls_enable *en) +{ + int sockets[2]; + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[1], IPPROTO_TCP, TCP_RXTLS_ENABLE, en, + sizeof(*en)) == -1); + + /* + * XXX: TLS 1.3 fails with ENOTSUP before checking for invalid + * ciphers. + */ + ATF_REQUIRE(errno == EINVAL || errno == ENOTSUP); + + close(sockets[1]); + close(sockets[0]); +} + +#define GEN_INVALID_RECEIVE_TEST(name, cipher_alg, key_size, auth_alg, \ + minor) \ +ATF_TC_WITHOUT_HEAD(ktls_receive_invalid_##name); \ +ATF_TC_BODY(ktls_receive_invalid_##name, tc) \ +{ \ + struct tls_enable en; \ + uint64_t seqno; \ + \ + ATF_REQUIRE_KTLS(); \ + seqno = random(); \ + build_tls_enable(cipher_alg, key_size, auth_alg, minor, seqno, \ + &en); \ + test_ktls_invalid_receive_cipher_suite(&en); \ + free_tls_enable(&en); \ +} + +#define ADD_INVALID_RECEIVE_TEST(name, cipher_alg, key_size, auth_alg, \ + minor) \ + ATF_TP_ADD_TC(tp, ktls_receive_invalid_##name); + +/* + * Ensure that invalid cipher suites are rejected for receive. + */ +INVALID_CIPHER_SUITES(GEN_INVALID_RECEIVE_TEST); + ATF_TP_ADD_TCS(tp) { /* Transmit tests */ @@ -1579,5 +1624,7 @@ ATF_TP_ADD_TCS(tp) /* Receive tests */ TLS_12_TESTS(ADD_RECEIVE_TESTS); + INVALID_CIPHER_SUITES(ADD_INVALID_RECEIVE_TEST); + return (atf_no_error()); } From nobody Mon Nov 15 20:22:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 876941893BE9; Mon, 15 Nov 2021 20:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HtLGH3RyCz3Mgx; Mon, 15 Nov 2021 20:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56A2B1FF5D; Mon, 15 Nov 2021 20:22: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 1AFKMVkQ014528; Mon, 15 Nov 2021 20:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFKMV4t014527; Mon, 15 Nov 2021 20:22:31 GMT (envelope-from git) Date: Mon, 15 Nov 2021 20:22:31 GMT Message-Id: <202111152022.1AFKMV4t014527@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: a8eacf9329e2 - main - cxgbe(4): Change the way t4_shutdown_adapter brings the link(s) down. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8eacf9329e2984f9c950fb5ef6447be4676007a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=a8eacf9329e2984f9c950fb5ef6447be4676007a commit a8eacf9329e2984f9c950fb5ef6447be4676007a Author: Navdeep Parhar AuthorDate: 2021-11-15 18:55:04 +0000 Commit: Navdeep Parhar CommitDate: 2021-11-15 20:17:26 +0000 cxgbe(4): Change the way t4_shutdown_adapter brings the link(s) down. Modify the GPIO pins only on the Base-T cards and even there drive all of them low instead of putting them in hi-z state. For the rest (this is the common case), directly power off the PLLs of the high speed serdes. This is the simplest method that does not involve or conflict with the firmware but still works with all T4-T6 cards regardless of what's plugged into the port. This fixes a problem where the peer wouldn't always see a link down if it is connected to the device using a -CR4 copper cable. MFC after: 3 weeks Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 3 ++- sys/dev/cxgbe/common/t4_hw.c | 24 +++++++++++++----------- sys/dev/cxgbe/firmware/t4fw_interface.h | 8 ++++++++ sys/dev/cxgbe/t4_main.c | 5 +++++ 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 4762b46f3799..a7139b3f7b0e 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -930,7 +930,8 @@ struct adapter { struct tls_tunables tlst; uint8_t doorbells; - int offload_map; /* ports with IFCAP_TOE enabled */ + int offload_map; /* port_id's with IFCAP_TOE enabled */ + int bt_map; /* tx_chan's with BASE-T */ int active_ulds; /* ULDs activated on this adapter */ int flags; int debug_flags; diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index e2b55dc71eba..26ffddaa98f4 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -3827,15 +3827,6 @@ static uint16_t fwcaps32_to_caps16(uint32_t caps32) return caps16; } -static bool -is_bt(struct port_info *pi) -{ - - return (pi->port_type == FW_PORT_TYPE_BT_SGMII || - pi->port_type == FW_PORT_TYPE_BT_XFI || - pi->port_type == FW_PORT_TYPE_BT_XAUI); -} - static int8_t fwcap_to_fec(uint32_t caps, bool unset_means_none) { int8_t fec = 0; @@ -3970,7 +3961,7 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port, } /* Force AN on for BT cards. */ - if (is_bt(adap->port[adap->chan_map[port]])) + if (isset(&adap->bt_map, port)) aneg = lc->pcaps & FW_PORT_CAP32_ANEG; rcap = aneg | speed | fc | fec; @@ -9414,9 +9405,11 @@ int t4_prep_adapter(struct adapter *adapter, u32 *buf) int t4_shutdown_adapter(struct adapter *adapter) { int port; + const bool bt = adapter->bt_map != 0; t4_intr_disable(adapter); - t4_write_reg(adapter, A_DBG_GPIO_EN, 0); + if (bt) + t4_write_reg(adapter, A_DBG_GPIO_EN, 0xffff0000); for_each_port(adapter, port) { u32 a_port_cfg = is_t4(adapter) ? PORT_REG(port, A_XGMAC_PORT_CFG) : @@ -9425,6 +9418,15 @@ int t4_shutdown_adapter(struct adapter *adapter) t4_write_reg(adapter, a_port_cfg, t4_read_reg(adapter, a_port_cfg) & ~V_SIGNAL_DET(1)); + if (!bt) { + u32 hss_cfg0 = is_t4(adapter) ? + PORT_REG(port, A_XGMAC_PORT_HSS_CFG0) : + T5_PORT_REG(port, A_MAC_PORT_HSS_CFG0); + t4_set_reg_field(adapter, hss_cfg0, F_HSSPDWNPLLB | + F_HSSPDWNPLLA | F_HSSPLLBYPB | F_HSSPLLBYPA, + F_HSSPDWNPLLB | F_HSSPDWNPLLA | F_HSSPLLBYPB | + F_HSSPLLBYPA); + } } t4_set_reg_field(adapter, A_SGE_CONTROL, F_GLOBALENABLE, 0); diff --git a/sys/dev/cxgbe/firmware/t4fw_interface.h b/sys/dev/cxgbe/firmware/t4fw_interface.h index 876fd61b4b21..93e5f2207411 100644 --- a/sys/dev/cxgbe/firmware/t4fw_interface.h +++ b/sys/dev/cxgbe/firmware/t4fw_interface.h @@ -7804,6 +7804,14 @@ enum fw_port_type { FW_PORT_TYPE_NONE = M_FW_PORT_CMD_PTYPE }; +static inline bool +is_bt(enum fw_port_type port_type) +{ + return (port_type == FW_PORT_TYPE_BT_SGMII || + port_type == FW_PORT_TYPE_BT_XFI || + port_type == FW_PORT_TYPE_BT_XAUI); +} + /* These are read from module's EEPROM and determined once the module is inserted. */ enum fw_port_module_type { diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 44a9a1343016..f30e8c14ecb4 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -1313,6 +1313,11 @@ t4_attach(device_t dev) goto done; } + if (is_bt(pi->port_type)) + setbit(&sc->bt_map, pi->tx_chan); + else + MPASS(!isset(&sc->bt_map, pi->tx_chan)); + snprintf(pi->lockname, sizeof(pi->lockname), "%sp%d", device_get_nameunit(dev), i); mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); From nobody Mon Nov 15 20:41:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8CB41189D51C; Mon, 15 Nov 2021 20:41: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 4HtLhb3cwLz3jm0; Mon, 15 Nov 2021 20:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D556204D7; Mon, 15 Nov 2021 20:41: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 1AFKfphP040010; Mon, 15 Nov 2021 20:41:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFKfp3u040009; Mon, 15 Nov 2021 20:41:51 GMT (envelope-from git) Date: Mon, 15 Nov 2021 20:41:51 GMT Message-Id: <202111152041.1AFKfp3u040009@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: 3f9acedb020b - main - growfs: do not error if filesystem is already requested 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f9acedb020b4bcac850eee8a60c75e0880d3e3f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3f9acedb020b4bcac850eee8a60c75e0880d3e3f commit 3f9acedb020b4bcac850eee8a60c75e0880d3e3f Author: Ed Maste AuthorDate: 2021-11-15 20:37:34 +0000 Commit: Ed Maste CommitDate: 2021-11-15 20:40:57 +0000 growfs: do not error if filesystem is already requested size For some cloud/virtualization use cases it can be convenient to grow the filesystem on boot any time the disk/partition happens to be larger, but not fail if it remains the same size. Continue to emit a message if we have no action to take, but exit with status 0 if the size remains the same. Reviewed by: trasz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32856 --- sbin/growfs/growfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index 510192dada0b..1f1bcf82c965 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1503,7 +1503,10 @@ main(int argc, char **argv) humanize_number(newsizebuf, sizeof(newsizebuf), size, "B", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - errx(1, "requested size %s is not larger than the current " + if (size == (uint64_t)(osblock.fs_size * osblock.fs_fsize)) + errx(0, "requested size %s is equal to the current " + "filesystem size %s", newsizebuf, oldsizebuf); + errx(1, "requested size %s is smaller than the current " "filesystem size %s", newsizebuf, oldsizebuf); } From nobody Mon Nov 15 20:49:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5296718505FF; Mon, 15 Nov 2021 20:49: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 4HtLsd1xqCz3lxX; Mon, 15 Nov 2021 20:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 237322079E; Mon, 15 Nov 2021 20:49: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 1AFKnf5r041512; Mon, 15 Nov 2021 20:49:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFKnfIT041511; Mon, 15 Nov 2021 20:49:41 GMT (envelope-from git) Date: Mon, 15 Nov 2021 20:49:41 GMT Message-Id: <202111152049.1AFKnfIT041511@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: 7d20a08076b4 - main - ldd: also use exec mode for -a List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7d20a08076b4c9d4513585a01fc57c39be654edf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7d20a08076b4c9d4513585a01fc57c39be654edf commit 7d20a08076b4c9d4513585a01fc57c39be654edf Author: Konstantin Belousov AuthorDate: 2021-11-15 20:45:51 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-15 20:49:33 +0000 ldd: also use exec mode for -a The -a option also requires passing specific environment variables to instance of rtld doing tracing. PR: 259069 Sponsored by: The FreeBSD Foundation MFC after: 1 week --- usr.bin/ldd/ldd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index 492e29dff211..c16b6f5e8496 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -236,7 +236,7 @@ main(int argc, char *argv[]) if (is_shlib == 0) { execl(*argv, *argv, (char *)NULL); warn("%s", *argv); - } else if (fmt1 == NULL && fmt2 == NULL) { + } else if (fmt1 == NULL && fmt2 == NULL && !aflag) { dlopen(*argv, RTLD_TRACE); warnx("%s: %s", *argv, dlerror()); } else { From nobody Mon Nov 15 21:13:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B6371188BB3F; Mon, 15 Nov 2021 21:13:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HtMP54lX5z3vWW; Mon, 15 Nov 2021 21:13:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82BBD20DD8; Mon, 15 Nov 2021 21:13: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 1AFLDT0x081380; Mon, 15 Nov 2021 21:13:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFLDTm9081379; Mon, 15 Nov 2021 21:13:29 GMT (envelope-from git) Date: Mon, 15 Nov 2021 21:13:29 GMT Message-Id: <202111152113.1AFLDTm9081379@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: 2287ced2f568 - main - clock: Group the "clocks" SYSINIT with the function definition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2287ced2f5686aeda69676342d6a1ff6257f5f6d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2287ced2f5686aeda69676342d6a1ff6257f5f6d commit 2287ced2f5686aeda69676342d6a1ff6257f5f6d Author: Mark Johnston AuthorDate: 2021-11-15 20:31:03 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 21:13:24 +0000 clock: Group the "clocks" SYSINIT with the function definition This is how most SYSINITs are defined. Also annotate the dummy parameter with __unused. No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/kern/kern_clock.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index c215471ab2d9..3998ffd2a607 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -90,9 +90,6 @@ PMC_SOFT_DEFINE_EX( , , clock, prof, \ extern void hardclock_device_poll(void); #endif /* DEVICE_POLLING */ -static void initclocks(void *dummy); -SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL); - /* Spin-lock protecting profiling statistics. */ static struct mtx time_lock; @@ -391,9 +388,8 @@ static int devpoll_run = 0; /* * Initialize clock frequencies and start both clocks running. */ -/* ARGSUSED*/ static void -initclocks(void *dummy) +initclocks(void *dummy __unused) { int i; @@ -421,6 +417,7 @@ initclocks(void *dummy) wdog_software_attach = watchdog_attach; #endif } +SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL); static __noinline void hardclock_itimer(struct thread *td, struct pstats *pstats, int cnt, int usermode) From nobody Mon Nov 15 21:13:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 04BB9188BD90; Mon, 15 Nov 2021 21:13: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 4HtMP66Vyfz3vHj; Mon, 15 Nov 2021 21:13:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE04F210AC; Mon, 15 Nov 2021 21:13: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 1AFLDUcO081404; Mon, 15 Nov 2021 21:13:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFLDUnp081403; Mon, 15 Nov 2021 21:13:30 GMT (envelope-from git) Date: Mon, 15 Nov 2021 21:13:30 GMT Message-Id: <202111152113.1AFLDUnp081403@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: 22875f88799e - main - x86: Implement deferred TSC calibration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 22875f88799e1684febf79b5049541e0f825aaa1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=22875f88799e1684febf79b5049541e0f825aaa1 commit 22875f88799e1684febf79b5049541e0f825aaa1 Author: Mark Johnston AuthorDate: 2021-11-15 20:31:21 +0000 Commit: Mark Johnston CommitDate: 2021-11-15 21:13:24 +0000 x86: Implement deferred TSC calibration There is no universal way to find the TSC frequency. Newer Intel CPUs may report it via CPUID leaves 0x15 and 0x16. Sometimes it can be obtained from the PLATFORM_INFO MSR as well, though we never use that. On older platforms we derive the frequency using a DELAY(1000000) call, which uses the 8254 PIT. On some newer platforms the 8254 is apparently non-functional, leading to bogus calibration results. On such platforms the TSC frequency must be available from CPUID. It is also possible to disable calibration with a tunable, in which case we try to parse the brand string if the TSC freq is not available from CPUID. CPUID 0x15 provides an authoritative TSC frequency value, but even that is not always available on new Intel platforms. CPUID 0x16 provides the specified processor base frequency, which is not the same as the TSC frequency. Empirically, it is close enough for early boot, but too far off for timekeeping: on a Comet Lake NUC, CPUID 0x16 yields 1600MHz but the TSC frequency is rougly 1608MHz, leading to frequent clock stepping when NTP is in use. Thus we have a situation where we cannot calibrate using the PIT and cannot obtain a precise frequency from CPUID (or MSRs). This change seeks to address that by using the CPUID 0x16 value during early boot and refining the calibration later once ACPI-based timecounters are available. TSC frequency detection is thus split into two phases: Early phase: - On Intel platforms, query CPUID 0x15 and 0x16 and use that value initially if available. - Otherwise, get an estimate using the PIT, reducing the delay loop to 100ms from 1s. - Continue to register the TSC as the CPU ticks provider early, even though the frequency may be off. Otherwise any code executed during boot that uses cpu_ticks() (e.g., context switching) gets tripped up when the ticks provider changes. Later phase: - In SI_SUB_CLOCKS, once the timehands are initialized, load the current TSC and timecounter (sbinuptime()) values at the beginning and end of a 1s interval and use the timecounter frequency (typically from kvmclock, HPET or the ACPI PM timer) to estimate the TSC frequency. - Update the TSC timecounter, global tsc_freq and CPU ticker with the new frequency and finally register the TSC as a timecounter. Reviewed by: kib, jhb (previous version) Discussed with: imp, cperciva MFC after: 6 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32512 --- sys/x86/x86/local_apic.c | 7 +- sys/x86/x86/tsc.c | 202 +++++++++++++++++++++++++++++++---------------- 2 files changed, 141 insertions(+), 68 deletions(-) diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index 2cd2e0c23e11..0def21687bbf 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -1013,7 +1013,12 @@ lapic_change_mode(struct eventtimer *et, struct lapic *la, enum lat_timer_mode newmode) { - if (la->la_timer_mode == newmode) + /* + * The TSC frequency may change during late calibration against other + * timecounters (HPET or ACPI PMTimer). + */ + if (la->la_timer_mode == newmode && + (newmode != LAT_MODE_DEADLINE || et->et_frequency == tsc_freq)) return; switch (newmode) { case LAT_MODE_PERIODIC: diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c index a6c7ec7a8307..bba5e352b031 100644 --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -32,12 +32,14 @@ __FBSDID("$FreeBSD$"); #include "opt_clock.h" #include +#include #include #include #include #include #include -#include +#include +#include #include #include #include @@ -84,7 +86,7 @@ SYSCTL_INT(_machdep, OID_AUTO, disable_tsc, CTLFLAG_RDTUN, &tsc_disabled, 0, static int tsc_skip_calibration; SYSCTL_INT(_machdep, OID_AUTO, disable_tsc_calibration, CTLFLAG_RDTUN, &tsc_skip_calibration, 0, - "Disable TSC frequency calibration"); + "Disable early TSC frequency calibration"); static void tsc_freq_changed(void *arg, const struct cf_level *level, int status); @@ -134,14 +136,11 @@ tsc_freq_vmware(void) } /* - * Calculate TSC frequency using information from the CPUID leaf 0x15 - * 'Time Stamp Counter and Nominal Core Crystal Clock'. If leaf 0x15 - * is not functional, as it is on Skylake/Kabylake, try 0x16 'Processor - * Frequency Information'. Leaf 0x16 is described in the SDM as - * informational only, but if 0x15 did not work, and TSC calibration - * is disabled, it is the best we can get at all. It should still be - * an improvement over the parsing of the CPU model name in - * tsc_freq_intel(), when available. + * Calculate TSC frequency using information from the CPUID leaf 0x15 'Time + * Stamp Counter and Nominal Core Crystal Clock'. If leaf 0x15 is not + * functional, as it is on Skylake/Kabylake, try 0x16 'Processor Frequency + * Information'. Leaf 0x16 is described in the SDM as informational only, but + * we can use this value until late calibration is complete. */ static bool tsc_freq_cpuid(uint64_t *res) @@ -167,8 +166,8 @@ tsc_freq_cpuid(uint64_t *res) return (false); } -static void -tsc_freq_intel(void) +static bool +tsc_freq_intel_brand(uint64_t *res) { char brand[48]; u_int regs[4]; @@ -205,7 +204,7 @@ tsc_freq_intel(void) i = 1000000; break; default: - return; + return (false); } #define C2D(c) ((c) - '0') if (p[1] == '.') { @@ -221,17 +220,39 @@ tsc_freq_intel(void) freq *= i * 1000000; } #undef C2D - tsc_freq = freq; + *res = freq; + return (true); } } + return (false); } static void -probe_tsc_freq(void) +tsc_freq_8254(uint64_t *res) { - uint64_t tmp_freq, tsc1, tsc2; - int no_cpuid_override; + uint64_t tsc1, tsc2; + int64_t overhead; + int count, i; + + overhead = 0; + for (i = 0, count = 8; i < count; i++) { + tsc1 = rdtsc_ordered(); + DELAY(0); + tsc2 = rdtsc_ordered(); + if (i > 0) + overhead += tsc2 - tsc1; + } + overhead /= count; + + tsc1 = rdtsc_ordered(); + DELAY(100000); + tsc2 = rdtsc_ordered(); + tsc_freq = (tsc2 - tsc1 - overhead) * 10; +} +static void +probe_tsc_freq(void) +{ if (cpu_power_ecx & CPUID_PERF_STAT) { /* * XXX Some emulators expose host CPUID without actual support @@ -287,50 +308,44 @@ probe_tsc_freq(void) break; } - if (tsc_skip_calibration) { - if (tsc_freq_cpuid(&tmp_freq)) - tsc_freq = tmp_freq; - else if (cpu_vendor_id == CPU_VENDOR_INTEL) - tsc_freq_intel(); - if (tsc_freq == 0) - tsc_disabled = 1; - } else { + if (tsc_freq_cpuid(&tsc_freq)) { + /* + * If possible, use the value obtained from CPUID as the initial + * frequency. This will be refined later during boot but is + * good enough for now. The 8254 PIT is not functional on some + * newer platforms anyway, so don't delay our boot for what + * might be a garbage result. Late calibration is required if + * the initial frequency was obtained from CPUID.16H, as the + * derived value may be off by as much as 1%. + */ if (bootverbose) - printf("Calibrating TSC clock ... "); - tsc1 = rdtsc(); - DELAY(1000000); - tsc2 = rdtsc(); - tsc_freq = tsc2 - tsc1; - + printf("Early TSC frequency %juHz derived from CPUID\n", + (uintmax_t)tsc_freq); + } else if (tsc_skip_calibration) { /* - * If the difference between calibrated frequency and - * the frequency reported by CPUID 0x15/0x16 leafs - * differ significantly, this probably means that - * calibration is bogus. It happens on machines - * without 8254 timer. The BIOS rarely properly - * reports it in FADT boot flags, so just compare the - * frequencies directly. + * Try to parse the brand string to obtain the nominal TSC + * frequency. */ - if (tsc_freq_cpuid(&tmp_freq) && qabs(tsc_freq - tmp_freq) > - uqmin(tsc_freq, tmp_freq)) { - no_cpuid_override = 0; - TUNABLE_INT_FETCH("machdep.disable_tsc_cpuid_override", - &no_cpuid_override); - if (!no_cpuid_override) { - if (bootverbose) { - printf( - "TSC clock: calibration freq %ju Hz, CPUID freq %ju Hz%s\n", - (uintmax_t)tsc_freq, - (uintmax_t)tmp_freq, - no_cpuid_override ? "" : - ", doing CPUID override"); - } - tsc_freq = tmp_freq; - } + if (cpu_vendor_id == CPU_VENDOR_INTEL && + tsc_freq_intel_brand(&tsc_freq)) { + if (bootverbose) + printf( + "Early TSC frequency %juHz derived from brand string\n", + (uintmax_t)tsc_freq); + } else { + tsc_disabled = 1; } + } else { + /* + * Calibrate against the 8254 PIT. This estimate will be + * refined later in tsc_calib(). + */ + tsc_freq_8254(&tsc_freq); + if (bootverbose) + printf( + "Early TSC frequency %juHz calibrated from 8254 PIT\n", + (uintmax_t)tsc_freq); } - if (bootverbose) - printf("TSC clock: %ju Hz\n", (intmax_t)tsc_freq); } void @@ -372,13 +387,18 @@ init_TSC(void) break; } #endif - + probe_tsc_freq(); /* * Inform CPU accounting about our boot-time clock rate. This will * be updated if someone loads a cpufreq driver after boot that * discovers a new max frequency. + * + * The frequency may also be updated after late calibration is complete; + * however, we register the TSC as the ticker now to avoid switching + * counters after much of the kernel has already booted and potentially + * sampled the CPU clock. */ if (tsc_freq != 0) set_cputicker(rdtsc, tsc_freq, !tsc_is_invariant); @@ -656,11 +676,65 @@ init_TSC_tc(void) if (tsc_freq != 0) { tsc_timecounter.tc_frequency = tsc_freq >> shift; tsc_timecounter.tc_priv = (void *)(intptr_t)shift; - tc_init(&tsc_timecounter); + + /* + * Timecounter registration is deferred until after late + * calibration is finished. + */ } } SYSINIT(tsc_tc, SI_SUB_SMP, SI_ORDER_ANY, init_TSC_tc, NULL); +static void +tsc_update_freq(uint64_t new_freq) +{ + atomic_store_rel_64(&tsc_freq, new_freq); + atomic_store_rel_64(&tsc_timecounter.tc_frequency, + new_freq >> (int)(intptr_t)tsc_timecounter.tc_priv); +} + +/* + * Perform late calibration of the TSC frequency once ACPI-based timecounters + * are available. + */ +static void +tsc_calib(void *arg __unused) +{ + sbintime_t t_start, t_end; + uint64_t freq_khz, tsc_start, tsc_end; + register_t flags; + int cpu; + + if (tsc_disabled) + return; + + flags = intr_disable(); + cpu = curcpu; + tsc_start = rdtsc_ordered(); + t_start = sbinuptime(); + intr_restore(flags); + + DELAY(1000000); + + thread_lock(curthread); + sched_bind(curthread, cpu); + + flags = intr_disable(); + tsc_end = rdtsc_ordered(); + t_end = sbinuptime(); + intr_restore(flags); + + sched_unbind(curthread); + thread_unlock(curthread); + + freq_khz = (SBT_1S / 1024) * (tsc_end - tsc_start) / (t_end - t_start); + + tsc_update_freq(freq_khz * 1024); + tc_init(&tsc_timecounter); + set_cputicker(rdtsc, tsc_freq, !tsc_is_invariant); +} +SYSINIT(tsc_calib, SI_SUB_CLOCKS + 1, SI_ORDER_ANY, tsc_calib, NULL); + void resume_TSC(void) { @@ -752,9 +826,7 @@ tsc_freq_changed(void *arg, const struct cf_level *level, int status) /* Total setting for this level gives the new frequency in MHz. */ freq = (uint64_t)level->total_set.freq * 1000000; - atomic_store_rel_64(&tsc_freq, freq); - tsc_timecounter.tc_frequency = - freq >> (int)(intptr_t)tsc_timecounter.tc_priv; + tsc_update_freq(freq); } static int @@ -767,14 +839,10 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) if (freq == 0) return (EOPNOTSUPP); error = sysctl_handle_64(oidp, &freq, 0, req); - if (error == 0 && req->newptr != NULL) { - atomic_store_rel_64(&tsc_freq, freq); - atomic_store_rel_64(&tsc_timecounter.tc_frequency, - freq >> (int)(intptr_t)tsc_timecounter.tc_priv); - } + if (error == 0 && req->newptr != NULL) + tsc_update_freq(freq); return (error); } - SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, 0, sysctl_machdep_tsc_freq, "QU", From nobody Mon Nov 15 23:52:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A23A0188EF6B; Mon, 15 Nov 2021 23:52: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 4HtQwy3bmMz3nVX; Mon, 15 Nov 2021 23:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5AF6723246; Mon, 15 Nov 2021 23:52: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 1AFNqo4Q093755; Mon, 15 Nov 2021 23:52:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFNqoPU093754; Mon, 15 Nov 2021 23:52:50 GMT (envelope-from git) Date: Mon, 15 Nov 2021 23:52:50 GMT Message-Id: <202111152352.1AFNqoPU093754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: f10a8d09716d - main - Allow the MNT_FORCE flag to be passed through to an initial mount. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f10a8d09716dd1024023d244936597fca8360945 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=f10a8d09716dd1024023d244936597fca8360945 commit f10a8d09716dd1024023d244936597fca8360945 Author: Kirk McKusick AuthorDate: 2021-11-15 23:45:06 +0000 Commit: Kirk McKusick CommitDate: 2021-11-15 23:45:56 +0000 Allow the MNT_FORCE flag to be passed through to an initial mount. When doing an initial mount(8) with its -f (force) flag, the MNT_FORCE flag is not passed through to the underlying filesystem mount routine. MNT_FORCE is only passed through on later updates to an existing mount. With this commit the MNT_FORCE flag is now passed through on the initial mount. Sanity check: kib Sponsored by: Netflix --- sys/kern/vfs_mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 2fc98d3cc6c8..5b68a8fec474 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1138,7 +1138,8 @@ vfs_domount_first( /* XXXMAC: pass to vfs_mount_alloc? */ mp->mnt_optnew = *optlist; /* Set the mount level flags. */ - mp->mnt_flag = (fsflags & (MNT_UPDATEMASK | MNT_ROOTFS | MNT_RDONLY)); + mp->mnt_flag = (fsflags & + (MNT_UPDATEMASK | MNT_ROOTFS | MNT_RDONLY | MNT_FORCE)); /* * Mount the filesystem. From nobody Tue Nov 16 00:03:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 240651893C4E; Tue, 16 Nov 2021 00:04: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 4HtR9r0Tpwz3rRZ; Tue, 16 Nov 2021 00:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5F4E23446; Tue, 16 Nov 2021 00: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 1AG03xII007511; Tue, 16 Nov 2021 00: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 1AG03xJc007510; Tue, 16 Nov 2021 00:03:59 GMT (envelope-from git) Date: Tue, 16 Nov 2021 00:03:59 GMT Message-Id: <202111160003.1AG03xJc007510@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 9e9dcac95ad0 - main - Allow forced r/w mount of UFS/FFS filesystem with a bad check hash. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e9dcac95ad0a6c49a01619f82290fbf512fe25b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=9e9dcac95ad0a6c49a01619f82290fbf512fe25b commit 9e9dcac95ad0a6c49a01619f82290fbf512fe25b Author: Kirk McKusick AuthorDate: 2021-11-16 00:03:08 +0000 Commit: Kirk McKusick CommitDate: 2021-11-16 00:03:47 +0000 Allow forced r/w mount of UFS/FFS filesystem with a bad check hash. Normally a UFS/FFS filesystem with a bad check hash can only be mounted read only. With this commit the mount(8) -f (force) option can be used to force a read-write mount of a UFS/FFS filesystem with a bad check hash. Conveniently the filesystem will proceed to update its on-disk superblock with a corrected check hash. Sponsored by: Netflix --- sys/ufs/ffs/ffs_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index bdaf4c98b090..f2ea6b666fad 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -964,7 +964,7 @@ ffs_mountfs(odevvp, mp, td) } /* fetch the superblock and summary information */ loc = STDSB; - if ((mp->mnt_flag & MNT_ROOTFS) != 0) + if ((mp->mnt_flag & (MNT_ROOTFS | MNT_FORCE)) != 0) loc = STDSB_NOHASHFAIL; if ((error = ffs_sbget(devvp, &fs, loc, M_UFSMNT, ffs_use_bread)) != 0) goto out; From nobody Tue Nov 16 00:11:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E2D2718973F6; Tue, 16 Nov 2021 00:11: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 4HtRLC5tlPz3th1; Tue, 16 Nov 2021 00:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABAC12368F; Tue, 16 Nov 2021 00:11: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 1AG0BFXh017048; Tue, 16 Nov 2021 00:11:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AG0BFUf017047; Tue, 16 Nov 2021 00:11:15 GMT (envelope-from git) Date: Tue, 16 Nov 2021 00:11:15 GMT Message-Id: <202111160011.1AG0BFUf017047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 9b8eb1c5b62d - main - Followup to f2b391528ad9 to improve printed message. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b8eb1c5b62d95217ecb7846af39440bb987d1c3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=9b8eb1c5b62d95217ecb7846af39440bb987d1c3 commit 9b8eb1c5b62d95217ecb7846af39440bb987d1c3 Author: Kirk McKusick AuthorDate: 2021-11-16 00:10:02 +0000 Commit: Kirk McKusick CommitDate: 2021-11-16 00:10:02 +0000 Followup to f2b391528ad9 to improve printed message. Sponsored by: Netflix --- sys/ufs/ffs/ffs_subr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index 09f03458e753..a3b7035e6a96 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -286,7 +286,7 @@ readsuper(void *devfd, struct fs **fsp, off_t sblockloc, int isaltsblk, res = uprintf("Superblock check-hash failed: recorded " "check-hash 0x%x != computed check-hash 0x%x%s\n", fs->fs_ckhash, ckhash, - chkhash == 0 ? " (Ignored)" : ""); + chkhash == STDSB_NOHASHFAIL ? " (Ignored)" : ""); #else res = 0; #endif @@ -298,7 +298,8 @@ readsuper(void *devfd, struct fs **fsp, off_t sblockloc, int isaltsblk, printf("Superblock check-hash failed: recorded " "check-hash 0x%x != computed check-hash " "0x%x%s\n", fs->fs_ckhash, ckhash, - chkhash == 0 ? " (Ignored)" : ""); + chkhash == STDSB_NOHASHFAIL ? + " (Ignored)" : ""); if (chkhash == STDSB) return (EINTEGRITY); /* chkhash == STDSB_NOHASHFAIL */ From nobody Tue Nov 16 00:45:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EDD931857D7F; Tue, 16 Nov 2021 00:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HtS6H43G1z4ZBm; Tue, 16 Nov 2021 00:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6714C23F07; Tue, 16 Nov 2021 00:45: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 1AG0jxaU060314; Tue, 16 Nov 2021 00:45:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AG0jx4d060313; Tue, 16 Nov 2021 00:45:59 GMT (envelope-from git) Date: Tue, 16 Nov 2021 00:45:59 GMT Message-Id: <202111160045.1AG0jx4d060313@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: 6c34f4cd2f9e - stable/13 - amd64/ia32/ia32_signal.c: Use ANSI C functions definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 6c34f4cd2f9e348416ef4addec9e4bc454653cdd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6c34f4cd2f9e348416ef4addec9e4bc454653cdd commit 6c34f4cd2f9e348416ef4addec9e4bc454653cdd Author: Konstantin Belousov AuthorDate: 2021-11-12 17:11:22 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-16 00:45:30 +0000 amd64/ia32/ia32_signal.c: Use ANSI C functions definitions (cherry picked from commit c5658876b416c1f8206bd8d269af85239e8467aa) --- sys/amd64/ia32/ia32_signal.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c index 6c879eccfc77..52a9af0f64d2 100644 --- a/sys/amd64/ia32/ia32_signal.c +++ b/sys/amd64/ia32/ia32_signal.c @@ -742,15 +742,9 @@ ofreebsd32_sigreturn(struct thread *td, struct ofreebsd32_sigreturn_args *uap) #endif #ifdef COMPAT_FREEBSD4 -/* - * MPSAFE - */ int -freebsd4_freebsd32_sigreturn(td, uap) - struct thread *td; - struct freebsd4_freebsd32_sigreturn_args /* { - const struct freebsd4_freebsd32_ucontext *sigcntxp; - } */ *uap; +freebsd4_freebsd32_sigreturn(struct thread *td, + struct freebsd4_freebsd32_sigreturn_args *uap) { struct ia32_ucontext4 uc; struct trapframe *regs; @@ -816,15 +810,8 @@ freebsd4_freebsd32_sigreturn(td, uap) } #endif /* COMPAT_FREEBSD4 */ -/* - * MPSAFE - */ int -freebsd32_sigreturn(td, uap) - struct thread *td; - struct freebsd32_sigreturn_args /* { - const struct freebsd32_ucontext *sigcntxp; - } */ *uap; +freebsd32_sigreturn(struct thread *td, struct freebsd32_sigreturn_args *uap) { struct ia32_ucontext uc; struct trapframe *regs; From nobody Tue Nov 16 04:36:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 36FEB188858E; Tue, 16 Nov 2021 04:36: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 4HtYDp0wSlz4dtX; Tue, 16 Nov 2021 04:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00D8926B6E; Tue, 16 Nov 2021 04:36: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 1AG4avqY070042; Tue, 16 Nov 2021 04:36:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AG4av2t070041; Tue, 16 Nov 2021 04:36:57 GMT (envelope-from git) Date: Tue, 16 Nov 2021 04:36:57 GMT Message-Id: <202111160436.1AG4av2t070041@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: b086bc0bf1dd - main - mps: Fix debugging line List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b086bc0bf1dd78b161e3ba7a5732fc49ea3c1b82 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b086bc0bf1dd78b161e3ba7a5732fc49ea3c1b82 commit b086bc0bf1dd78b161e3ba7a5732fc49ea3c1b82 Author: Warner Losh AuthorDate: 2021-11-16 03:31:48 +0000 Commit: Warner Losh CommitDate: 2021-11-16 04:27:14 +0000 mps: Fix debugging line Print cm instead of sc here, as is done in mpr. We can get the sc from cm, but not vice versa. Sponsored by: Netflix --- sys/dev/mps/mps_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index c86cf1850048..6e610c725edb 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -1560,7 +1560,7 @@ mpssas_scsiio_timeout(void *data) MPS_FUNCTRACE(sc); mtx_assert(&sc->mps_mtx, MA_OWNED); - mps_dprint(sc, MPS_XINFO|MPS_RECOVERY, "Timeout checking cm %p\n", sc); + mps_dprint(sc, MPS_XINFO|MPS_RECOVERY, "Timeout checking cm %p\n", cm); /* * Run the interrupt handler to make sure it's not pending. This From nobody Tue Nov 16 04:36:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 657791888358; Tue, 16 Nov 2021 04:37: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 4HtYDq2ggtz4dtc; Tue, 16 Nov 2021 04:36:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2BDC227012; Tue, 16 Nov 2021 04:36: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 1AG4axUm070072; Tue, 16 Nov 2021 04:36:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AG4axIh070071; Tue, 16 Nov 2021 04:36:59 GMT (envelope-from git) Date: Tue, 16 Nov 2021 04:36:59 GMT Message-Id: <202111160436.1AG4axIh070071@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: 2bbaed4d7fca - main - mpr: Minor formatting changes to match mps. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2bbaed4d7fcace17c619536f4119b89058ed4392 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2bbaed4d7fcace17c619536f4119b89058ed4392 commit 2bbaed4d7fcace17c619536f4119b89058ed4392 Author: Warner Losh AuthorDate: 2021-11-16 03:35:58 +0000 Commit: Warner Losh CommitDate: 2021-11-16 04:27:15 +0000 mpr: Minor formatting changes to match mps. Minor reformatting nits to make mprsas_scsiio_timeout match mpssas_scsiio_timeout more closely. The differences aren't necessary and are distracting when comparing the routines. No functional changes. Sponsored by: Netflix --- sys/dev/mpr/mpr_sas.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index 9b69e0654ae4..aace724e16f2 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -1677,19 +1677,19 @@ mprsas_scsiio_timeout(void *data) /* target already in recovery, just queue up another * timedout command to be processed later. */ - mpr_dprint(sc, MPR_RECOVERY, "queued timedout cm %p for " - "processing by tm %p\n", cm, targ->tm); - } - else if ((targ->tm = mprsas_alloc_tm(sc)) != NULL) { - /* start recovery by aborting the first timedout command */ + mpr_dprint(sc, MPR_RECOVERY, + "queued timedout cm %p for processing by tm %p\n", + cm, targ->tm); + } else if ((targ->tm = mprsas_alloc_tm(sc)) != NULL) { mpr_dprint(sc, MPR_RECOVERY|MPR_INFO, "Sending abort to target %u for SMID %d\n", targ->tid, cm->cm_desc.Default.SMID); mpr_dprint(sc, MPR_RECOVERY, "timedout cm %p allocated tm %p\n", cm, targ->tm); + + /* start recovery by aborting the first timedout command */ mprsas_send_abort(sc, targ->tm, cm); - } - else { + } else { /* XXX queue this target up for recovery once a TM becomes * available. The firmware only has a limited number of * HighPriority credits for the high priority requests used From nobody Tue Nov 16 08:09:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 180F71894387; Tue, 16 Nov 2021 08: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 4HtdyW08F1z4n5m; Tue, 16 Nov 2021 08:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6A061B2E; Tue, 16 Nov 2021 08: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 1AG89s8C050623; Tue, 16 Nov 2021 08: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 1AG89sKE050622; Tue, 16 Nov 2021 08:09:54 GMT (envelope-from git) Date: Tue, 16 Nov 2021 08:09:54 GMT Message-Id: <202111160809.1AG89sKE050622@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 7d95b0f32832 - stable/13 - snd_uaudio(4): Fix string index computations for iFeature. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7d95b0f32832c30e7191d6c3694025652de0cb1e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=7d95b0f32832c30e7191d6c3694025652de0cb1e commit 7d95b0f32832c30e7191d6c3694025652de0cb1e Author: Hans Petter Selasky AuthorDate: 2021-11-09 21:07:36 +0000 Commit: Hans Petter Selasky CommitDate: 2021-11-16 08:09:09 +0000 snd_uaudio(4): Fix string index computations for iFeature. This allows the iFeature strings to be properly read by the snd_uaudio(4) driver, when parsing the audio feature unit descriptors. Submitted by: Zhichao1.Li@dell.com Sponsored by: NVIDIA Networking (cherry picked from commit 11f09b17fe2cf0b5489601aee548a06486f0b749) --- sys/dev/sound/usb/uaudio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 3a7d4189b9ef..bc5b0d04c020 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -3648,18 +3648,18 @@ uaudio_mixer_add_feature(struct uaudio_softc *sc, cmask |= uaudio_mixer_feature_get_bmaControls(d, chan); } - if (nchan > MIX_MAX_CHAN) - nchan = MIX_MAX_CHAN; - MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); - i = d->bmaControls[d->bControlSize]; + i = d->bmaControls[nchan * d->bControlSize]; if (i == 0 || usbd_req_get_string_any(sc->sc_udev, NULL, MIX(sc).desc, sizeof(MIX(sc).desc), i) != 0) { MIX(sc).desc[0] = 0; } + if (nchan > MIX_MAX_CHAN) + nchan = MIX_MAX_CHAN; + for (ctl = 1; ctl <= LOUDNESS_CONTROL; ctl++) { fumask = FU_MASK(ctl); @@ -3782,9 +3782,6 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc, for (chan = 1; chan < nchan; chan++) cmask |= UGETDW(d->bmaControls[chan]); - if (nchan > MIX_MAX_CHAN) - nchan = MIX_MAX_CHAN; - MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); i = d->bmaControls[nchan][0]; @@ -3794,6 +3791,9 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc, MIX(sc).desc[0] = 0; } + if (nchan > MIX_MAX_CHAN) + nchan = MIX_MAX_CHAN; + for (ctl = 3; ctl != 0; ctl <<= 2) { mixernumber = uaudio20_mixer_determine_class(&iot[id]); From nobody Tue Nov 16 08:11:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 19C1618945C6; Tue, 16 Nov 2021 08:11: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 4Htdzp0CF8z4nV1; Tue, 16 Nov 2021 08:11:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB7141D8D; Tue, 16 Nov 2021 08:11: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 1AG8B1j4059778; Tue, 16 Nov 2021 08:11:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AG8B1nQ059777; Tue, 16 Nov 2021 08:11:01 GMT (envelope-from git) Date: Tue, 16 Nov 2021 08:11:01 GMT Message-Id: <202111160811.1AG8B1nQ059777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 43a03be0bb50 - stable/12 - snd_uaudio(4): Fix string index computations for iFeature. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 43a03be0bb5070b445b1c16d17b1791d345ec5d0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=43a03be0bb5070b445b1c16d17b1791d345ec5d0 commit 43a03be0bb5070b445b1c16d17b1791d345ec5d0 Author: Hans Petter Selasky AuthorDate: 2021-11-09 21:07:36 +0000 Commit: Hans Petter Selasky CommitDate: 2021-11-16 08:10:42 +0000 snd_uaudio(4): Fix string index computations for iFeature. This allows the iFeature strings to be properly read by the snd_uaudio(4) driver, when parsing the audio feature unit descriptors. Submitted by: Zhichao1.Li@dell.com Sponsored by: NVIDIA Networking (cherry picked from commit 11f09b17fe2cf0b5489601aee548a06486f0b749) --- sys/dev/sound/usb/uaudio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 221f4d3d1bd7..d620d5fd1cce 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -3666,18 +3666,18 @@ uaudio_mixer_add_feature(struct uaudio_softc *sc, cmask |= uaudio_mixer_feature_get_bmaControls(d, chan); } - if (nchan > MIX_MAX_CHAN) - nchan = MIX_MAX_CHAN; - MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); - i = d->bmaControls[d->bControlSize]; + i = d->bmaControls[nchan * d->bControlSize]; if (i == 0 || usbd_req_get_string_any(sc->sc_udev, NULL, MIX(sc).desc, sizeof(MIX(sc).desc), i) != 0) { MIX(sc).desc[0] = 0; } + if (nchan > MIX_MAX_CHAN) + nchan = MIX_MAX_CHAN; + for (ctl = 1; ctl <= LOUDNESS_CONTROL; ctl++) { fumask = FU_MASK(ctl); @@ -3801,9 +3801,6 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc, for (chan = 1; chan < nchan; chan++) cmask |= UGETDW(d->bmaControls[chan]); - if (nchan > MIX_MAX_CHAN) - nchan = MIX_MAX_CHAN; - MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); i = d->bmaControls[nchan][0]; @@ -3813,6 +3810,9 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc, MIX(sc).desc[0] = 0; } + if (nchan > MIX_MAX_CHAN) + nchan = MIX_MAX_CHAN; + for (ctl = 3; ctl != 0; ctl <<= 2) { mixernumber = uaudio20_mixer_determine_class(&iot[id]); From nobody Tue Nov 16 08:15:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E179F18972F1; Tue, 16 Nov 2021 08:15: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 4Htf515yQ5z4qHs; Tue, 16 Nov 2021 08:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A61281CFB; Tue, 16 Nov 2021 08:15: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 1AG8FXbj063769; Tue, 16 Nov 2021 08:15:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AG8FXMk063768; Tue, 16 Nov 2021 08:15:33 GMT (envelope-from git) Date: Tue, 16 Nov 2021 08:15:33 GMT Message-Id: <202111160815.1AG8FXMk063768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 6511b6ed285d - stable/11 - snd_uaudio(4): Fix string index computations for iFeature. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 6511b6ed285d349f28452b6dbe0d4f46aff47956 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=6511b6ed285d349f28452b6dbe0d4f46aff47956 commit 6511b6ed285d349f28452b6dbe0d4f46aff47956 Author: Hans Petter Selasky AuthorDate: 2021-11-09 21:07:36 +0000 Commit: Hans Petter Selasky CommitDate: 2021-11-16 08:15:14 +0000 snd_uaudio(4): Fix string index computations for iFeature. This allows the iFeature strings to be properly read by the snd_uaudio(4) driver, when parsing the audio feature unit descriptors. Submitted by: Zhichao1.Li@dell.com Sponsored by: NVIDIA Networking (cherry picked from commit 11f09b17fe2cf0b5489601aee548a06486f0b749) --- sys/dev/sound/usb/uaudio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index cd6037faaa0d..03356f6c06b3 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -3664,18 +3664,18 @@ uaudio_mixer_add_feature(struct uaudio_softc *sc, cmask |= uaudio_mixer_feature_get_bmaControls(d, chan); } - if (nchan > MIX_MAX_CHAN) - nchan = MIX_MAX_CHAN; - MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); - i = d->bmaControls[d->bControlSize]; + i = d->bmaControls[nchan * d->bControlSize]; if (i == 0 || usbd_req_get_string_any(sc->sc_udev, NULL, MIX(sc).desc, sizeof(MIX(sc).desc), i) != 0) { MIX(sc).desc[0] = 0; } + if (nchan > MIX_MAX_CHAN) + nchan = MIX_MAX_CHAN; + for (ctl = 1; ctl <= LOUDNESS_CONTROL; ctl++) { fumask = FU_MASK(ctl); @@ -3799,9 +3799,6 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc, for (chan = 1; chan < nchan; chan++) cmask |= UGETDW(d->bmaControls[chan]); - if (nchan > MIX_MAX_CHAN) - nchan = MIX_MAX_CHAN; - MIX(sc).wIndex = MAKE_WORD(d->bUnitId, sc->sc_mixer_iface_no); i = d->bmaControls[nchan][0]; @@ -3811,6 +3808,9 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc, MIX(sc).desc[0] = 0; } + if (nchan > MIX_MAX_CHAN) + nchan = MIX_MAX_CHAN; + for (ctl = 3; ctl != 0; ctl <<= 2) { mixernumber = uaudio20_mixer_determine_class(&iot[id]); From nobody Tue Nov 16 09:12:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3A7BC18918BC; Tue, 16 Nov 2021 09:12: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 4HtgLf19V4z3ND9; Tue, 16 Nov 2021 09:12:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0963127E3; Tue, 16 Nov 2021 09:12: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 1AG9CP6k043970; Tue, 16 Nov 2021 09:12:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AG9CPSQ043969; Tue, 16 Nov 2021 09:12:25 GMT (envelope-from git) Date: Tue, 16 Nov 2021 09:12:25 GMT Message-Id: <202111160912.1AG9CPSQ043969@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: 2e0d67c3ed7e - main - loader: lsefi: Print more information List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2e0d67c3ed7ec760b2d54f8258304b2e6359418b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2e0d67c3ed7ec760b2d54f8258304b2e6359418b commit 2e0d67c3ed7ec760b2d54f8258304b2e6359418b Author: Emmanuel Vadot AuthorDate: 2021-11-15 11:12:50 +0000 Commit: Emmanuel Vadot CommitDate: 2021-11-16 09:11:53 +0000 loader: lsefi: Print more information Printing the EFI_HANDLE pointer isn't very useful. If the handle have a IMAGE_DEVICE_PATH or a DEVICE_PATH protocol print it. This makes it easier to see which devices are present and what protocol they expose. Reviewed by: imp, tsoome Differential Revision: https://reviews.freebsd.org/D32991 Sponsored by: Beckhoff Automation GmbH & Co. KG --- stand/efi/loader/main.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index d8b3b1d19b15..73936d870771 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -1402,6 +1402,30 @@ command_mode(int argc, char *argv[]) COMMAND_SET(lsefi, "lsefi", "list EFI handles", command_lsefi); +static void +lsefi_print_handle_info(EFI_HANDLE handle) +{ + EFI_DEVICE_PATH *devpath; + EFI_DEVICE_PATH *imagepath; + CHAR16 *dp_name; + + imagepath = efi_lookup_image_devpath(handle); + if (imagepath != NULL) { + dp_name = efi_devpath_name(imagepath); + printf("Handle for image %S", dp_name); + efi_free_devpath_name(dp_name); + return; + } + devpath = efi_lookup_devpath(handle); + if (devpath != NULL) { + dp_name = efi_devpath_name(devpath); + printf("Handle for device %S", dp_name); + efi_free_devpath_name(dp_name); + return; + } + printf("Handle %p", handle); +} + static int command_lsefi(int argc __unused, char *argv[] __unused) { @@ -1437,7 +1461,7 @@ command_lsefi(int argc __unused, char *argv[] __unused) EFI_GUID **protocols = NULL; handle = buffer[i]; - printf("Handle %p", handle); + lsefi_print_handle_info(handle); if (pager_output("\n")) break; /* device path */ From nobody Tue Nov 16 09:12:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7AAC618915F7; Tue, 16 Nov 2021 09:12: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 4HtgLg2JDLz3MpL; Tue, 16 Nov 2021 09:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FA1C27E4; Tue, 16 Nov 2021 09:12: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 1AG9CRku043994; Tue, 16 Nov 2021 09:12:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AG9CRLN043993; Tue, 16 Nov 2021 09:12:27 GMT (envelope-from git) Date: Tue, 16 Nov 2021 09:12:27 GMT Message-Id: <202111160912.1AG9CRLN043993@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: 123b5b876377 - main - loader: Do not force comconsole for arm and arm64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 123b5b8763778e83b6816ad9db62a9b956055c32 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=123b5b8763778e83b6816ad9db62a9b956055c32 commit 123b5b8763778e83b6816ad9db62a9b956055c32 Author: Emmanuel Vadot AuthorDate: 2021-11-15 11:17:43 +0000 Commit: Emmanuel Vadot CommitDate: 2021-11-16 09:11:56 +0000 loader: Do not force comconsole for arm and arm64 This makes GOP not probed on some situation (AMD Card on PCIe slot with EDK2 as we have a SERIAL_IO_PROTOCOL compatible uart). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D32992 Sponsored by: Beckhoff Automation GmbH & Co. KG --- stand/efi/loader/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 73936d870771..7b78f94eb368 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -947,7 +947,7 @@ main(int argc, CHAR16 *argv[]) */ setenv("console", "efi", 1); uhowto = parse_uefi_con_out(); -#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) +#if defined(__riscv) if ((uhowto & RB_SERIAL) != 0) setenv("console", "comconsole", 1); #endif From nobody Tue Nov 16 14:00:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B13A1189055C; Tue, 16 Nov 2021 14:00: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 4HtnlJ4hMVz4p1L; Tue, 16 Nov 2021 14:00:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 812FD6738; Tue, 16 Nov 2021 14:00: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 1AGE0iZv026334; Tue, 16 Nov 2021 14:00:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGE0iaJ026333; Tue, 16 Nov 2021 14:00:44 GMT (envelope-from git) Date: Tue, 16 Nov 2021 14:00:44 GMT Message-Id: <202111161400.1AGE0iaJ026333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "George V. Neville-Neil" Subject: git: 406feaa862d7 - main - Initial clean up the language in the manual pages. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 406feaa862d702d17ac3e8df096cfe22cdb7091a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=406feaa862d702d17ac3e8df096cfe22cdb7091a commit 406feaa862d702d17ac3e8df096cfe22cdb7091a Author: George V. Neville-Neil AuthorDate: 2021-11-10 06:38:36 +0000 Commit: George V. Neville-Neil CommitDate: 2021-11-10 18:09:18 +0000 Initial clean up the language in the manual pages. Summary: The manual pages need a bit of editing for language and clarity. Reviewers: oshogbo, #manpages Subscribers: imp Differential Revision: https://reviews.freebsd.org/D32976 --- lib/libcasper/libcasper/libcasper.3 | 98 ++++++++++++++++------------- lib/libcasper/libcasper/libcasper_service.3 | 35 +++++------ lib/libcasper/services/cap_net/cap_net.3 | 8 ++- 3 files changed, 75 insertions(+), 66 deletions(-) diff --git a/lib/libcasper/libcasper/libcasper.3 b/lib/libcasper/libcasper/libcasper.3 index bf678457abeb..c08ea0f21f8b 100644 --- a/lib/libcasper/libcasper/libcasper.3 +++ b/lib/libcasper/libcasper/libcasper.3 @@ -78,68 +78,71 @@ .Sh DESCRIPTION The .Nm libcasper -library allows to manage application capabilities through the casper process. +library provides for the control of application capabilities through the casper process. .Pp -The application capability (represented by the +An application capability, represented by the .Vt cap_channel_t -type) is a communication channel between the caller and the casper process -daemon or an instance of one of its services. -A capability to the casper process obtained with the +type, is a communication channel between the caller and the casper +daemon or an instance of one of the daemon's services. +A capability to the casper process, obtained with the .Fn cap_init -function allows to create capabilities to casper's services via the +function, allows a program to create capabilities to acacce +the casper daemon's services via the .Fn cap_service_open function. .Pp The .Fn cap_init -function opens capability to the casper process. +function instantiates a capability to allow a program to access +the casper daemon. .Pp The .Fn cap_wrap -function creates +function creates a .Vt cap_channel_t -based on the given socket. -The function is used when capability is inherited through +based on the socket supplied in the call. +The function is used when a capability is inherited through the .Xr execve 2 -or send over +system call, +or sent over a .Xr unix 4 -domain socket as a regular file descriptor and has to be represented as -.Vt cap_channel_t -again. +domain socket as a file descriptor, +nd has to be converted into a +.Vt cap_channel_t . The .Fa flags argument defines the channel behavior. The supported flags are: .Bl -ohang -offset indent .It CASPER_NO_UNIQ -The communication between process and casper uses no unique version of nvlist. +The communication between the process and the casper daemon no unique version of nvlist. .El .Pp The .Fn cap_unwrap -function is the opposite of the +function returns the +.Xr unix 4 +domain socket that was provided to the .Fn cap_wrap -function. -It frees the +function, +and frees the .Vt cap_channel_t -structure and returns -.Xr unix 4 -domain socket associated with it. +structure. .Pp The .Fn cap_clone -function clones the given capability. +function returns a clone of the capability passed as its only argument. .Pp The .Fn cap_close -function closes the given capability. +function closes, and frees, the given capability. .Pp The .Fn cap_sock -function returns +function returns the .Xr unix 4 domain socket descriptor associated with the given capability for use with -system calls like +system calls such as: .Xr kevent 2 , .Xr poll 2 and @@ -147,33 +150,36 @@ and .Pp The .Fn cap_limit_get -function stores current limits of the given capability in the +function stores the current limits of the given capability in the .Fa limitsp argument. -If the function return +If the function returns .Va 0 and .Dv NULL -is stored in +is stored in the .Fa limitsp -it means there are no limits set. +argument, +there are no limits set. .Pp The .Fn cap_limit_set function sets limits for the given capability. -The limits are provided as a +The limits are provided as an .Xr nvlist 9 . -The exact format depends on the service the capability represents. +The exact format of the limits depends on the service that the +capability represents. .Fn cap_limit_set -frees the limits regardless of whether the operation succeeds or fails. +frees the limits passed to the call, +whether or not the operation succeeds or fails. .Pp The .Fn cap_send_nvlist function sends the given .Xr nvlist 9 over the given capability. -This is low level interface to communicate with casper services. -Most services should provide higher level API. +This is a low level interface to communicate with casper services. +It is expected that most services will provide a higher level API. .Pp The .Fn cap_recv_nvlist @@ -185,41 +191,43 @@ The .Fn cap_xfer_nvlist function sends the given .Xr nvlist 9 , -destroys it and receives new +destroys it, and receives a new .Xr nvlist 9 in response over the given capability. It does not matter if the function succeeds or fails, the .Xr nvlist 9 -given for sending will always be destroyed once the function returns. +given for sending will always be destroyed before the function returns. .Pp The .Fn cap_service_open -function opens casper service of the given name through casper capability -obtained via the +function opens the casper service named in the call using +the casper capability obtained via the .Fn cap_init function. -The function returns capability that provides access to opened service. +The +.Fn cap_service_open +function returns a capability that provides access to the opened service. Casper supports the following services in the base system: .Pp .Bl -tag -width "system.random" -compact -offset indent .It system.dns -provides DNS libc compatible API +provides libc compatible DNS API .It system.grp -provides +provides a .Xr getgrent 3 compatible API .It system.net -provides network libc compatible API +provides a libc compatible network API .It system.pwd -provides +provides a .Xr getpwent 3 compatible API .It system.sysctl -provides +provides a .Xr sysctlbyname 3 compatible API .It system.syslog -provides +provides a .Xr syslog 3 compatible API .El diff --git a/lib/libcasper/libcasper/libcasper_service.3 b/lib/libcasper/libcasper/libcasper_service.3 index c0656a23a572..c210cdde182a 100644 --- a/lib/libcasper/libcasper/libcasper_service.3 +++ b/lib/libcasper/libcasper/libcasper_service.3 @@ -47,7 +47,7 @@ typedef int service_command_func_t(const char *, const nvlist_t *, nvlist_t *, .Sh DESCRIPTION The .Nm CREATE_SERVICE -macro to create a new Casper service. +macro is used to create a new Casper service. The .Fa name is a string containing the service name, which will be used in the @@ -57,44 +57,43 @@ function to identify it. The .Fa limit_func is a function of type -.Li service_limit_func_t . -The first argument of the function contains +.Li service_limit_func_t +where the first argument of the function contains an containing .Xr nvlist 9 , -old service limits and second one the new limits. -If the services wasn't limited the old limits will be set to +old service limits and the second argument contains the new limits. +If the service wasn't limited then the old limits will be set to .Dv NULL . -This function should not allow to extend service limits and only limit it -further. +This function must not allow the extension of service limits. The .Fa command_func is a function of type -.Li service_command_func_t . -First argument is the name of the command that should be executed. +.Li service_command_func_t +where the first argument is the name of the command that should be executed. The first .Xr nvlist 9 -contains the current limits. -Next one contains a +contains the current limits and the second contains an .Xr nvlist 9 -with current request. -The last one contains an output +with the current request. +The last argument contains a return value .Xr nvlist 9 which contains the response from Casper. .Pp The .Fa flags -argument defines limits of the service. +argument defines the limits of the service. The supported flags are: .Bl -ohang -offset indent .It CASPER_SERVICE_STDIO The Casper service has access to the stdio descriptors from the process it was spawned from. .It CASPER_SERVICE_FD -The Casper service has access to all descriptors besides stdio descriptors from -the process it was spawned from. +The Casper service has access to all of the descriptors, +besides the stdio descriptors, +from the process it was spawned from. .It CASPER_SERVICE_NO_UNIQ_LIMITS -The whole Casper communication is using +The whole Casper communication is using an .Xr nvlist 9 -with +with the .Xr NVLIST_NO_UNIQ 9 flag. .El diff --git a/lib/libcasper/services/cap_net/cap_net.3 b/lib/libcasper/services/cap_net/cap_net.3 index e74f7dd70d67..765abbdf41aa 100644 --- a/lib/libcasper/services/cap_net/cap_net.3 +++ b/lib/libcasper/services/cap_net/cap_net.3 @@ -91,7 +91,7 @@ The functions .Fn cap_gethostbyaddr and .Fn cap_getnameinfo -are respectively equivalent to +provide a set of APIs equivalent to .Xr bind 2 , .Xr connect 2 , .Xr gethostbyname 3 , @@ -99,7 +99,7 @@ are respectively equivalent to .Xr gethostbyaddr 3 and .Xr getnameinfo 3 -except that the connection to the +except that a connection to the .Nm system.net service needs to be provided. .Sh LIMITS @@ -107,8 +107,10 @@ By default, the cap_net capability provides unrestricted access to the network namespace. Applications typically only require access to a small portion of the network namespace: +The .Fn cap_net_limit -interface can be used to restrict access to the network. +function can be used to restrict access to the network. +The .Fn cap_net_limit_init returns an opaque limit handle used to store a list of capabilities. The From nobody Tue Nov 16 14:00:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D8BA8189075F; Tue, 16 Nov 2021 14:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HtnlK5cW5z4nw2; Tue, 16 Nov 2021 14:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A27376831; Tue, 16 Nov 2021 14:00: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 1AGE0jDC026358; Tue, 16 Nov 2021 14:00:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGE0jZ3026357; Tue, 16 Nov 2021 14:00:45 GMT (envelope-from git) Date: Tue, 16 Nov 2021 14:00:45 GMT Message-Id: <202111161400.1AGE0jZ3026357@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "George V. Neville-Neil" Subject: git: 409d1bf7d6de - main - Address review comments from 0mp, debdrup and oshogbo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 409d1bf7d6deef77ccf685e1624589997247a267 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=409d1bf7d6deef77ccf685e1624589997247a267 commit 409d1bf7d6deef77ccf685e1624589997247a267 Author: George V. Neville-Neil AuthorDate: 2021-11-10 13:18:32 +0000 Commit: George V. Neville-Neil CommitDate: 2021-11-10 18:09:18 +0000 Address review comments from 0mp, debdrup and oshogbo --- lib/libcasper/libcasper/libcasper.3 | 19 ++++++++++--------- lib/libcasper/libcasper/libcasper_service.3 | 14 +++++++------- lib/libcasper/services/cap_net/cap_net.3 | 2 +- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/libcasper/libcasper/libcasper.3 b/lib/libcasper/libcasper/libcasper.3 index c08ea0f21f8b..02c08270dcf2 100644 --- a/lib/libcasper/libcasper/libcasper.3 +++ b/lib/libcasper/libcasper/libcasper.3 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 3, 2021 +.Dd November 15, 2021 .Dt LIBCASPER 3 .Os .Sh NAME @@ -78,7 +78,8 @@ .Sh DESCRIPTION The .Nm libcasper -library provides for the control of application capabilities through the casper process. +library provides for the control of application capabilities through +the casper process. .Pp An application capability, represented by the .Vt cap_channel_t @@ -86,7 +87,7 @@ type, is a communication channel between the caller and the casper daemon or an instance of one of the daemon's services. A capability to the casper process, obtained with the .Fn cap_init -function, allows a program to create capabilities to acacce +function, allows a program to create capabilities to access the casper daemon's services via the .Fn cap_service_open function. @@ -107,7 +108,7 @@ system call, or sent over a .Xr unix 4 domain socket as a file descriptor, -nd has to be converted into a +and has to be converted into a .Vt cap_channel_t . The .Fa flags @@ -115,16 +116,15 @@ argument defines the channel behavior. The supported flags are: .Bl -ohang -offset indent .It CASPER_NO_UNIQ -The communication between the process and the casper daemon no unique version of nvlist. +The communication between the process and the casper daemon no +unique version of nvlist. .El .Pp The .Fn cap_unwrap function returns the .Xr unix 4 -domain socket that was provided to the -.Fn cap_wrap -function, +domain socket used by the daemon service, and frees the .Vt cap_channel_t structure. @@ -191,7 +191,8 @@ The .Fn cap_xfer_nvlist function sends the given .Xr nvlist 9 , -destroys it, and receives a new +destroys it, +and receives a new .Xr nvlist 9 in response over the given capability. It does not matter if the function succeeds or fails, the diff --git a/lib/libcasper/libcasper/libcasper_service.3 b/lib/libcasper/libcasper/libcasper_service.3 index c210cdde182a..9e0f76cf98d0 100644 --- a/lib/libcasper/libcasper/libcasper_service.3 +++ b/lib/libcasper/libcasper/libcasper_service.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 5, 2020 +.Dd November 15, 2021 .Dt LIBCASPER 3 .Os .Sh NAME @@ -47,7 +47,7 @@ typedef int service_command_func_t(const char *, const nvlist_t *, nvlist_t *, .Sh DESCRIPTION The .Nm CREATE_SERVICE -macro is used to create a new Casper service. +macro is used to create a new casper service. The .Fa name is a string containing the service name, which will be used in the @@ -61,7 +61,7 @@ is a function of type where the first argument of the function contains an containing .Xr nvlist 9 , old service limits and the second argument contains the new limits. -If the service wasn't limited then the old limits will be set to +If the service was not limited then the old limits will be set to .Dv NULL . This function must not allow the extension of service limits. The @@ -76,7 +76,7 @@ contains the current limits and the second contains an with the current request. The last argument contains a return value .Xr nvlist 9 -which contains the response from Casper. +which contains the response from casper. .Pp The .Fa flags @@ -84,14 +84,14 @@ argument defines the limits of the service. The supported flags are: .Bl -ohang -offset indent .It CASPER_SERVICE_STDIO -The Casper service has access to the stdio descriptors from the process it was +The casper service has access to the stdio descriptors from the process it was spawned from. .It CASPER_SERVICE_FD -The Casper service has access to all of the descriptors, +The casper service has access to all of the descriptors, besides the stdio descriptors, from the process it was spawned from. .It CASPER_SERVICE_NO_UNIQ_LIMITS -The whole Casper communication is using an +The whole casper communication is using an .Xr nvlist 9 with the .Xr NVLIST_NO_UNIQ 9 diff --git a/lib/libcasper/services/cap_net/cap_net.3 b/lib/libcasper/services/cap_net/cap_net.3 index 765abbdf41aa..e64038a48330 100644 --- a/lib/libcasper/services/cap_net/cap_net.3 +++ b/lib/libcasper/services/cap_net/cap_net.3 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2020 +.Dd November 15, 2021 .Dt CAP_NET 3 .Os .Sh NAME From nobody Tue Nov 16 14:00:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 69CF118906CD; Tue, 16 Nov 2021 14:00: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 4HtnlM0CHmz4p6P; Tue, 16 Nov 2021 14:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BFC016832; Tue, 16 Nov 2021 14:00: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 1AGE0k8M026382; Tue, 16 Nov 2021 14:00:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGE0kb5026381; Tue, 16 Nov 2021 14:00:46 GMT (envelope-from git) Date: Tue, 16 Nov 2021 14:00:46 GMT Message-Id: <202111161400.1AGE0kb5026381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "George V. Neville-Neil" Subject: git: 06a8ffd4cd54 - main - Fix two more nits from 0mp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06a8ffd4cd5453671e4c81e0875e544f1d58822c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=06a8ffd4cd5453671e4c81e0875e544f1d58822c commit 06a8ffd4cd5453671e4c81e0875e544f1d58822c Author: George V. Neville-Neil AuthorDate: 2021-11-10 17:51:42 +0000 Commit: George V. Neville-Neil CommitDate: 2021-11-10 18:09:19 +0000 Fix two more nits from 0mp --- lib/libcasper/libcasper/libcasper.3 | 4 ++-- lib/libcasper/libcasper/libcasper_service.3 | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libcasper/libcasper/libcasper.3 b/lib/libcasper/libcasper/libcasper.3 index 02c08270dcf2..2151131e29ec 100644 --- a/lib/libcasper/libcasper/libcasper.3 +++ b/lib/libcasper/libcasper/libcasper.3 @@ -116,7 +116,7 @@ argument defines the channel behavior. The supported flags are: .Bl -ohang -offset indent .It CASPER_NO_UNIQ -The communication between the process and the casper daemon no +The communication between the process and the casper daemon uses no unique version of nvlist. .El .Pp @@ -144,7 +144,7 @@ function returns the domain socket descriptor associated with the given capability for use with system calls such as: .Xr kevent 2 , -.Xr poll 2 +.Xr poll 2 , and .Xr select 2 . .Pp diff --git a/lib/libcasper/libcasper/libcasper_service.3 b/lib/libcasper/libcasper/libcasper_service.3 index 9e0f76cf98d0..8ddc41f3d617 100644 --- a/lib/libcasper/libcasper/libcasper_service.3 +++ b/lib/libcasper/libcasper/libcasper_service.3 @@ -58,9 +58,10 @@ The .Fa limit_func is a function of type .Li service_limit_func_t -where the first argument of the function contains an containing +where the first argument of the function contains an .Xr nvlist 9 , -old service limits and the second argument contains the new limits. +old service limits and +the second argument contains the new limits. If the service was not limited then the old limits will be set to .Dv NULL . This function must not allow the extension of service limits. From nobody Tue Nov 16 16:55:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4D48D189FC66; Tue, 16 Nov 2021 16:55:41 +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 4Htsd91jlkz4n2N; Tue, 16 Nov 2021 16:55:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 9E88222F6; Tue, 16 Nov 2021 16:55:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 406feaa862d7 - main - Initial clean up the language in the manual pages. To: "George V. Neville-Neil" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202111161400.1AGE0iaJ026333@gitrepo.freebsd.org> From: John Baldwin Message-ID: Date: Tue, 16 Nov 2021 08:55:39 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.14.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 In-Reply-To: <202111161400.1AGE0iaJ026333@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 11/16/21 6:00 AM, George V. Neville-Neil wrote: > The branch main has been updated by gnn: > > URL: https://cgit.FreeBSD.org/src/commit/?id=406feaa862d702d17ac3e8df096cfe22cdb7091a > > commit 406feaa862d702d17ac3e8df096cfe22cdb7091a > Author: George V. Neville-Neil > AuthorDate: 2021-11-10 06:38:36 +0000 > Commit: George V. Neville-Neil > CommitDate: 2021-11-10 18:09:18 +0000 > > Initial clean up the language in the manual pages. > > Summary: The manual pages need a bit of editing for language and clarity. > > Reviewers: oshogbo, #manpages > > Subscribers: imp > > Differential Revision: https://reviews.freebsd.org/D32976 Note that we don't quite use 'arc land' directly. You can use 'git arc stage' as an alternative to pull relevant info from phab into your commit message. We also rewrite history to squash fixup commits (such as your two later followups) into the main commit using 'git rebase' or the like before pushing to the tree to keep the history clean and make history as bisectable as possible. -- John Baldwin From nobody Tue Nov 16 17:14:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AE49C1889856; Tue, 16 Nov 2021 17:14: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 4Htt3M3rG6z3C90; Tue, 16 Nov 2021 17:14:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 648F111645; Tue, 16 Nov 2021 17:14: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 1AGHEtBk084292; Tue, 16 Nov 2021 17:14:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGHEtBA084291; Tue, 16 Nov 2021 17:14:55 GMT (envelope-from git) Date: Tue, 16 Nov 2021 17:14:55 GMT Message-Id: <202111161714.1AGHEtBA084291@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: 8ef0c11e7ce7 - main - nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8ef0c11e7ce79106130012cb929a8324045f7ff9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8ef0c11e7ce79106130012cb929a8324045f7ff9 commit 8ef0c11e7ce79106130012cb929a8324045f7ff9 Author: Konstantin Belousov AuthorDate: 2021-11-15 20:24:46 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-16 17:13:29 +0000 nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers VOP_FSYNC() asserts that the vnode is exclusively locked for NFS. If we try to execute file with recently modified content, the assert is triggered. Reviewed by: rmacklem Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32999 --- sys/fs/nfsclient/nfs_clvnops.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index d4545cf2d840..920bf2524c01 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -647,6 +647,11 @@ nfs_open(struct vop_open_args *ap) NFSLOCKNODE(np); if (np->n_flag & NMODIFIED) { NFSUNLOCKNODE(np); + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp)) + return (EBADF); + } error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error == EINTR || error == EIO) { if (NFS_ISV4(vp)) @@ -683,6 +688,11 @@ nfs_open(struct vop_open_args *ap) if (vp->v_type == VDIR) np->n_direofoffset = 0; NFSUNLOCKNODE(np); + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp)) + return (EBADF); + } error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error == EINTR || error == EIO) { if (NFS_ISV4(vp)) @@ -703,6 +713,11 @@ nfs_open(struct vop_open_args *ap) (vp->v_type == VREG)) { if (np->n_directio_opens == 0) { NFSUNLOCKNODE(np); + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp)) + return (EBADF); + } error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error) { if (NFS_ISV4(vp)) @@ -748,6 +763,11 @@ nfs_open(struct vop_open_args *ap) if (vp->v_writecount <= -1) { if ((obj = vp->v_object) != NULL && vm_object_mightbedirty(obj)) { + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp)) + return (EBADF); + } VM_OBJECT_WLOCK(obj); vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); VM_OBJECT_WUNLOCK(obj); @@ -831,6 +851,11 @@ nfs_close(struct vop_close_args *ap) * mmap'ed writes or via write(). */ if (nfs_clean_pages_on_close && vp->v_object) { + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp) && ap->a_fflag != FNONBLOCK) + return (EBADF); + } VM_OBJECT_WLOCK(vp->v_object); vm_object_page_clean(vp->v_object, 0, 0, 0); VM_OBJECT_WUNLOCK(vp->v_object); @@ -855,11 +880,22 @@ nfs_close(struct vop_close_args *ap) * traditional vnode locking implemented for Vnode Ops. */ int cm = newnfs_commit_on_close ? 1 : 0; + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp) && ap->a_fflag != FNONBLOCK) + return (EBADF); + } error = ncl_flush(vp, MNT_WAIT, ap->a_td, cm, 0); /* np->n_flag &= ~NMODIFIED; */ } else if (NFS_ISV4(vp)) { if (nfscl_mustflush(vp) != 0) { int cm = newnfs_commit_on_close ? 1 : 0; + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp) && ap->a_fflag != + FNONBLOCK) + return (EBADF); + } error = ncl_flush(vp, MNT_WAIT, ap->a_td, cm, 0); /* @@ -869,6 +905,12 @@ nfs_close(struct vop_close_args *ap) */ } } else { + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp) && ap->a_fflag != + FNONBLOCK) + return (EBADF); + } error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); } NFSLOCKNODE(np); From nobody Tue Nov 16 17:46:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 92D0B189C0D1; Tue, 16 Nov 2021 17:46:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HttlG3q1cz3gxj; Tue, 16 Nov 2021 17:46:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id E6D111FC5; Tue, 16 Nov 2021 17:46:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: b8d60729deef - main - tcp: Congestion control cleanup. To: Randall Stewart , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202111111131.1ABBVH6s017371@gitrepo.freebsd.org> From: John Baldwin Message-ID: <9382fdb3-4cf5-41bf-626f-7fed2bf21045@FreeBSD.org> Date: Tue, 16 Nov 2021 09:46:00 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.14.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 In-Reply-To: <202111111131.1ABBVH6s017371@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 11/11/21 3:31 AM, Randall Stewart wrote: > The branch main has been updated by rrs: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b8d60729deefa0bd13e6a395fcab4928e6e10445 > > commit b8d60729deefa0bd13e6a395fcab4928e6e10445 > Author: Randall Stewart > AuthorDate: 2021-11-11 11:28:18 +0000 > Commit: Randall Stewart > CommitDate: 2021-11-11 11:28:18 +0000 > > tcp: Congestion control cleanup. > > NOTE: HEADS UP read the note below if your kernel config is not including GENERIC!! > > This patch does a bit of cleanup on TCP congestion control modules. There were some rather > interesting surprises that one could get i.e. where you use a socket option to change > from one CC (say cc_cubic) to another CC (say cc_vegas) and you could in theory get > a memory failure and end up on cc_newreno. This is not what one would expect. The > new code fixes this by requiring a cc_data_sz() function so we can malloc with M_WAITOK > and pass in to the init function preallocated memory. The CC init is expected in this > case *not* to fail but if it does and a module does break the > "no fail with memory given" contract we do fall back to the CC that was in place at the time. > > This also fixes up a set of common newreno utilities that can be shared amongst other > CC modules instead of the other CC modules reaching into newreno and executing > what they think is a "common and understood" function. Lets put these functions in > cc.c and that way we have a common place that is easily findable by future developers or > bug fixers. This also allows newreno to evolve and grow support for its features i.e. ABE > and HYSTART++ without having to dance through hoops for other CC modules, instead > both newreno and the other modules just call into the common functions if they desire > that behavior or roll there own if that makes more sense. > > Note: This commit changes the kernel configuration!! If you are not using GENERIC in > some form you must add a CC module option (one of CC_NEWRENO, CC_VEGAS, CC_CUBIC, > CC_CDG, CC_CHD, CC_DCTCP, CC_HTCP, CC_HD). You can have more than one defined > as well if you desire. Note that if you create a kernel configuration that does not > define a congestion control module and includes INET or INET6 the kernel compile will > break. Also you need to define a default, generic adds 'options CC_DEFAULT=\"newreno\" > but you can specify any string that represents the name of the CC module (same names > that show up in the CC module list under net.inet.tcp.cc). If you fail to add the > options CC_DEFAULT in your kernel configuration the kernel build will also break. > > Reviewed by: Michael Tuexen > Sponsored by: Netflix Inc. > RELNOTES:YES > Differential Revision: https://reviews.freebsd.org/D32693 FYI, I've seen a new LOR on shutdown that I think might be from this commit: lock order reversal: 1st 0xffffffff81dccc90 cc_list (cc_list, rw) @ /mnt/jhb/work/git/crypto/sys/netinet/cc/cc.c:245 2nd 0xffffffff81dcc510 vnet_rwlock (vnet_rwlock, rw) @ /mnt/jhb/work/git/crypto/sys/netinet/cc/cc.c:208 lock order cc_list -> vnet_rwlock attempted at: #0 0xffffffff80b6e803 at witness_checkorder+0x9a3 #1 0xffffffff80b0430d at __rw_rlock_int+0x8d #2 0xffffffff80b049ed at __rw_rlock+0xd #3 0xffffffff80cb8e76 at cc_check_default+0x46 #4 0xffffffff80cb8d2b at cc_deregister_algo+0x4b #5 0xffffffff80cb941a at cc_modevent+0x1a #6 0xffffffff80ae702b at module_shutdown+0x6b #7 0xffffffff80b0903e at kern_reboot+0x34e #8 0xffffffff80b0898a at sys_reboot+0x4a #9 0xffffffff80f7131c at syscallenter+0x10c #10 0xffffffff80f71045 at amd64_syscall+0x15 #11 0xffffffff80f492db at fast_syscall_common+0xf8 -- John Baldwin From nobody Tue Nov 16 17:56:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 070DC1850C3E; Tue, 16 Nov 2021 17:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HttzH6rvKz3kw3; Tue, 16 Nov 2021 17:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCA6F11F8C; Tue, 16 Nov 2021 17: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 1AGHuR7P038236; Tue, 16 Nov 2021 17: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 1AGHuRhA038235; Tue, 16 Nov 2021 17:56:27 GMT (envelope-from git) Date: Tue, 16 Nov 2021 17:56:27 GMT Message-Id: <202111161756.1AGHuRhA038235@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: d71830cdf0df - main - ktls: Use ATF_REQUIRE instead of assert() for validating TLS header lengths. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d71830cdf0df6dbc4bd3332daa95d9ecd7d64060 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d71830cdf0df6dbc4bd3332daa95d9ecd7d64060 commit d71830cdf0df6dbc4bd3332daa95d9ecd7d64060 Author: John Baldwin AuthorDate: 2021-11-16 17:56:15 +0000 Commit: John Baldwin CommitDate: 2021-11-16 17:56:15 +0000 ktls: Use ATF_REQUIRE instead of assert() for validating TLS header lengths. The TLS header length field is set by the kernel, so if it is incorrect that is an indication of a kernel bug, not an internal error in the tests. Prompted by: markj (comment in an earlier review) Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D33003 --- tests/sys/kern/ktls_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index 21e3213a8634..64e26bb27f37 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -913,8 +913,8 @@ test_ktls_transmit_app_data(struct tls_enable *en, uint64_t seqno, size_t len) record_len = sizeof(struct tls_record_layer) + ntohs(hdr->tls_length); - assert(record_len <= outbuf_cap); - assert(record_len > outbuf_len); + ATF_REQUIRE(record_len <= outbuf_cap); + ATF_REQUIRE(record_len > outbuf_len); rv = read(ev.ident, outbuf + outbuf_len, record_len - outbuf_len); if (rv == -1 && errno == EAGAIN) @@ -1013,7 +1013,7 @@ test_ktls_transmit_control(struct tls_enable *en, uint64_t seqno, uint8_t type, ATF_REQUIRE(rv == sizeof(struct tls_record_layer)); payload_len = ntohs(hdr->tls_length); record_len = payload_len + sizeof(struct tls_record_layer); - assert(record_len <= outbuf_cap); + ATF_REQUIRE(record_len <= outbuf_cap); rv = read(sockets[0], outbuf + sizeof(struct tls_record_layer), payload_len); ATF_REQUIRE(rv == (ssize_t)payload_len); From nobody Tue Nov 16 17:56:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5E2701850B78; Tue, 16 Nov 2021 17:56: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 4HttzK1Rh3z3kxp; Tue, 16 Nov 2021 17:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E420011F8D; Tue, 16 Nov 2021 17: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 1AGHuSRP038265; Tue, 16 Nov 2021 17: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 1AGHuSLM038264; Tue, 16 Nov 2021 17:56:28 GMT (envelope-from git) Date: Tue, 16 Nov 2021 17:56:28 GMT Message-Id: <202111161756.1AGHuSLM038264@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: 694c708d6a0d - main - ktls tests: Check the return values of close(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 694c708d6a0d00f84fa53357a1cc8a72272a26e3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=694c708d6a0d00f84fa53357a1cc8a72272a26e3 commit 694c708d6a0d00f84fa53357a1cc8a72272a26e3 Author: John Baldwin AuthorDate: 2021-11-16 17:56:15 +0000 Commit: John Baldwin CommitDate: 2021-11-16 17:56:15 +0000 ktls tests: Check the return values of close(). Suggested by: markj Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D33004 --- tests/sys/kern/ktls_test.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index 64e26bb27f37..9942e78091b1 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -945,9 +945,9 @@ test_ktls_transmit_app_data(struct tls_enable *en, uint64_t seqno, size_t len) free(decrypted); free(plaintext); - close(sockets[1]); - close(sockets[0]); - close(kq); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); + ATF_REQUIRE(close(kq) == 0); } static void @@ -1031,8 +1031,8 @@ test_ktls_transmit_control(struct tls_enable *en, uint64_t seqno, uint8_t type, free(decrypted); free(plaintext); - close(sockets[1]); - close(sockets[0]); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); } static void @@ -1083,8 +1083,8 @@ test_ktls_transmit_empty_fragment(struct tls_enable *en, uint64_t seqno) free(outbuf); - close(sockets[1]); - close(sockets[0]); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); } static size_t @@ -1218,9 +1218,9 @@ test_ktls_receive_app_data(struct tls_enable *en, uint64_t seqno, size_t len) free(received); free(plaintext); - close(sockets[1]); - close(sockets[0]); - close(kq); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); + ATF_REQUIRE(close(kq) == 0); } #define TLS_10_TESTS(M) \ @@ -1474,8 +1474,8 @@ test_ktls_invalid_transmit_cipher_suite(struct tls_enable *en) sizeof(*en)) == -1); ATF_REQUIRE(errno == EINVAL); - close(sockets[1]); - close(sockets[0]); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); } #define GEN_INVALID_TRANSMIT_TEST(name, cipher_alg, key_size, auth_alg, \ @@ -1591,8 +1591,8 @@ test_ktls_invalid_receive_cipher_suite(struct tls_enable *en) */ ATF_REQUIRE(errno == EINVAL || errno == ENOTSUP); - close(sockets[1]); - close(sockets[0]); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); } #define GEN_INVALID_RECEIVE_TEST(name, cipher_alg, key_size, auth_alg, \ @@ -1631,8 +1631,8 @@ test_ktls_unsupported_receive_cipher_suite(struct tls_enable *en) sizeof(*en)) == -1); ATF_REQUIRE(errno == EPROTONOSUPPORT || errno == ENOTSUP); - close(sockets[1]); - close(sockets[0]); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); } #define GEN_UNSUPPORTED_RECEIVE_TEST(name, cipher_alg, key_size, \ From nobody Tue Nov 16 17:59:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 83BA61852C1D; Tue, 16 Nov 2021 17:59: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 4Htv2b32ZDz3lyM; Tue, 16 Nov 2021 17:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40BF911F17; Tue, 16 Nov 2021 17:59: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 1AGHxJjs038570; Tue, 16 Nov 2021 17:59:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGHxJ0W038569; Tue, 16 Nov 2021 17:59:19 GMT (envelope-from git) Date: Tue, 16 Nov 2021 17:59:19 GMT Message-Id: <202111161759.1AGHxJ0W038569@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: 16bea05ac327 - main - ktls: Split encrypt vs decrypt OCF counters. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16bea05ac3275d41663939da0d5c26d89f15cd53 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=16bea05ac3275d41663939da0d5c26d89f15cd53 commit 16bea05ac3275d41663939da0d5c26d89f15cd53 Author: John Baldwin AuthorDate: 2021-11-16 17:58:52 +0000 Commit: John Baldwin CommitDate: 2021-11-16 17:58:52 +0000 ktls: Split encrypt vs decrypt OCF counters. Reviewed by: gallatin, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D33006 --- sys/opencrypto/ktls_ocf.c | 62 +++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index 0fdec6f6d139..dc8b6f76257b 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -76,34 +76,44 @@ static SYSCTL_NODE(_kern_ipc_tls_stats, OID_AUTO, ocf, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Kernel TLS offload via OCF stats"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls10_cbc_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls10_cbc_crypts, - CTLFLAG_RD, &ocf_tls10_cbc_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls10_cbc_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls10_cbc_encrypts, + CTLFLAG_RD, &ocf_tls10_cbc_encrypts, "Total number of OCF TLS 1.0 CBC encryption operations"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls11_cbc_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls11_cbc_crypts, - CTLFLAG_RD, &ocf_tls11_cbc_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls11_cbc_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls11_cbc_encrypts, + CTLFLAG_RD, &ocf_tls11_cbc_encrypts, "Total number of OCF TLS 1.1/1.2 CBC encryption operations"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls12_gcm_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_gcm_crypts, - CTLFLAG_RD, &ocf_tls12_gcm_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls12_gcm_decrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_gcm_decrypts, + CTLFLAG_RD, &ocf_tls12_gcm_decrypts, + "Total number of OCF TLS 1.2 GCM decryption operations"); + +static COUNTER_U64_DEFINE_EARLY(ocf_tls12_gcm_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_gcm_encrypts, + CTLFLAG_RD, &ocf_tls12_gcm_encrypts, "Total number of OCF TLS 1.2 GCM encryption operations"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls12_chacha20_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_chacha20_crypts, - CTLFLAG_RD, &ocf_tls12_chacha20_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls12_chacha20_decrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_chacha20_decrypts, + CTLFLAG_RD, &ocf_tls12_chacha20_decrypts, + "Total number of OCF TLS 1.2 Chacha20-Poly1305 decryption operations"); + +static COUNTER_U64_DEFINE_EARLY(ocf_tls12_chacha20_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_chacha20_encrypts, + CTLFLAG_RD, &ocf_tls12_chacha20_encrypts, "Total number of OCF TLS 1.2 Chacha20-Poly1305 encryption operations"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls13_gcm_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_gcm_crypts, - CTLFLAG_RD, &ocf_tls13_gcm_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls13_gcm_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_gcm_encrypts, + CTLFLAG_RD, &ocf_tls13_gcm_encrypts, "Total number of OCF TLS 1.3 GCM encryption operations"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls13_chacha20_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_chacha20_crypts, - CTLFLAG_RD, &ocf_tls13_chacha20_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls13_chacha20_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_chacha20_encrypts, + CTLFLAG_RD, &ocf_tls13_chacha20_encrypts, "Total number of OCF TLS 1.3 Chacha20-Poly1305 encryption operations"); static COUNTER_U64_DEFINE_EARLY(ocf_inplace); @@ -340,9 +350,9 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_ocf_encrypt_state *state, } if (os->implicit_iv) - counter_u64_add(ocf_tls10_cbc_crypts, 1); + counter_u64_add(ocf_tls10_cbc_encrypts, 1); else - counter_u64_add(ocf_tls11_cbc_crypts, 1); + counter_u64_add(ocf_tls11_cbc_encrypts, 1); if (outiov != NULL) counter_u64_add(ocf_separate_output, 1); else @@ -434,9 +444,9 @@ ktls_ocf_tls12_aead_encrypt(struct ktls_ocf_encrypt_state *state, crp->crp_op = CRYPTO_OP_ENCRYPT | CRYPTO_OP_COMPUTE_DIGEST; crp->crp_flags = CRYPTO_F_CBIMM | CRYPTO_F_IV_SEPARATE; if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) - counter_u64_add(ocf_tls12_gcm_crypts, 1); + counter_u64_add(ocf_tls12_gcm_encrypts, 1); else - counter_u64_add(ocf_tls12_chacha20_crypts, 1); + counter_u64_add(ocf_tls12_chacha20_encrypts, 1); if (outiov != NULL) counter_u64_add(ocf_separate_output, 1); else @@ -502,9 +512,9 @@ ktls_ocf_tls12_aead_decrypt(struct ktls_session *tls, crypto_use_mbuf(&crp, m); if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) - counter_u64_add(ocf_tls12_gcm_crypts, 1); + counter_u64_add(ocf_tls12_gcm_decrypts, 1); else - counter_u64_add(ocf_tls12_chacha20_crypts, 1); + counter_u64_add(ocf_tls12_chacha20_decrypts, 1); error = ktls_ocf_dispatch(os, &crp); crypto_destroyreq(&crp); @@ -575,9 +585,9 @@ ktls_ocf_tls13_aead_encrypt(struct ktls_ocf_encrypt_state *state, memcpy(crp->crp_iv, nonce, sizeof(nonce)); if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) - counter_u64_add(ocf_tls13_gcm_crypts, 1); + counter_u64_add(ocf_tls13_gcm_encrypts, 1); else - counter_u64_add(ocf_tls13_chacha20_crypts, 1); + counter_u64_add(ocf_tls13_chacha20_encrypts, 1); if (outiov != NULL) counter_u64_add(ocf_separate_output, 1); else From nobody Tue Nov 16 18:01:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1BD671855338; Tue, 16 Nov 2021 18:01: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 4Htv5F6vMKz3nYH; Tue, 16 Nov 2021 18:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD788120F9; Tue, 16 Nov 2021 18:01: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 1AGI1bRe051927; Tue, 16 Nov 2021 18:01:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGI1b16051926; Tue, 16 Nov 2021 18:01:37 GMT (envelope-from git) Date: Tue, 16 Nov 2021 18:01:37 GMT Message-Id: <202111161801.1AGI1b16051926@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: c34a5148e8f2 - main - ffs: fix newly introduced LOR between mntfs vnode lock and topology lock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c34a5148e8f21e9be28330c4ae4884b6f31193dd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c34a5148e8f21e9be28330c4ae4884b6f31193dd commit c34a5148e8f21e9be28330c4ae4884b6f31193dd Author: Konstantin Belousov AuthorDate: 2021-11-16 17:31:11 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-16 18:01:31 +0000 ffs: fix newly introduced LOR between mntfs vnode lock and topology lock The mntfs vnode lock should be before topology, as established in ffs_mountfs(). Extend the locked region in ffs_unmount(). Reported and reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33013 --- sys/geom/geom_vfs.c | 2 -- sys/ufs/ffs/ffs_vfsops.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c index 9590fee11000..ab068d7c85d5 100644 --- a/sys/geom/geom_vfs.c +++ b/sys/geom/geom_vfs.c @@ -309,9 +309,7 @@ g_vfs_close(struct g_consumer *cp) gp = cp->geom; sc = gp->softc; vp = cp->private; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); bufobj_invalbuf(sc->sc_bo, V_SAVE, 0, 0); - VOP_UNLOCK(vp); sc->sc_bo->bo_private = cp->private; gp->softc = NULL; mtx_destroy(&sc->sc_mtx); diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index f2ea6b666fad..1edc127bd68c 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1431,6 +1431,7 @@ ffs_unmount(mp, mntflags) taskqueue_free(ump->um_trim_tq); free (ump->um_trimhash, M_TRIM); } + vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); g_topology_lock(); g_vfs_close(ump->um_cp); g_topology_unlock(); @@ -1438,7 +1439,6 @@ ffs_unmount(mp, mntflags) ump->um_odevvp->v_bufobj.bo_flag &= ~BO_NOBUFS; BO_UNLOCK(&ump->um_odevvp->v_bufobj); atomic_store_rel_ptr((uintptr_t *)&ump->um_dev->si_mountpt, 0); - vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); mntfs_freevp(ump->um_devvp); vrele(ump->um_odevvp); dev_rel(ump->um_dev); From nobody Tue Nov 16 18:27:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D28BE189351C; Tue, 16 Nov 2021 18:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HtvgC5gDvz4RKp; Tue, 16 Nov 2021 18:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A345012522; Tue, 16 Nov 2021 18:27: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 1AGIRZRX078541; Tue, 16 Nov 2021 18:27:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGIRZkW078540; Tue, 16 Nov 2021 18:27:35 GMT (envelope-from git) Date: Tue, 16 Nov 2021 18:27:35 GMT Message-Id: <202111161827.1AGIRZkW078540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 1580afcd6eaf - main - randomdev: Remove 100 ms sleep from write routine List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1580afcd6eaf803192f014f3658036cbd49a6e3c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=1580afcd6eaf803192f014f3658036cbd49a6e3c commit 1580afcd6eaf803192f014f3658036cbd49a6e3c Author: Colin Percival AuthorDate: 2021-11-13 16:38:09 +0000 Commit: Colin Percival CommitDate: 2021-11-16 18:27:27 +0000 randomdev: Remove 100 ms sleep from write routine This was introduced in 2014 along with the comment (which has since been deleted): /* Introduce an annoying delay to stop swamping */ Modern cryptographic random number generators can ingest arbitrarily large amounts of non-random (or even maliciously selected) input without losing their security. Depending on the number of "boot entropy files" present on the system, this can speed up the boot process by up to 1 second. Reviewed by: cem MFC ater: 1 week Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D32984 --- sys/dev/random/randomdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c index 4b032cd3feb9..02b92d226417 100644 --- a/sys/dev/random/randomdev.c +++ b/sys/dev/random/randomdev.c @@ -340,7 +340,6 @@ randomdev_write(struct cdev *dev __unused, struct uio *uio, int flags __unused) if (error) break; randomdev_accumulate(random_buf, c); - tsleep(p_random_alg_context, 0, "randwr", hz/10); } if (nbytes != uio->uio_resid && (error == ERESTART || error == EINTR)) /* Partial write, not error. */ From nobody Tue Nov 16 18:27:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 488EA189368F; Tue, 16 Nov 2021 18:27: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 4HtvgF0FnMz4RKx; Tue, 16 Nov 2021 18:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1C491259A; Tue, 16 Nov 2021 18:27: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 1AGIRaYx078565; Tue, 16 Nov 2021 18:27:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGIRat4078564; Tue, 16 Nov 2021 18:27:36 GMT (envelope-from git) Date: Tue, 16 Nov 2021 18:27:36 GMT Message-Id: <202111161827.1AGIRat4078564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 57a8fa6f0189 - main - kvmclock: Expose implied TSC frequency via sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57a8fa6f0189316ab4d13ffbc6dc5410d56dcbac Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=57a8fa6f0189316ab4d13ffbc6dc5410d56dcbac commit 57a8fa6f0189316ab4d13ffbc6dc5410d56dcbac Author: Colin Percival AuthorDate: 2021-11-16 18:21:31 +0000 Commit: Colin Percival CommitDate: 2021-11-16 18:27:27 +0000 kvmclock: Expose implied TSC frequency via sysctl An interface was added to derive an implied TSC frequency from pvclock in 2015, but this interface was never exposed anywhere user-visible. Reviewed by: kib, bryanv Differential Revision: https://reviews.freebsd.org/D32974 --- sys/dev/kvm_clock/kvm_clock.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sys/dev/kvm_clock/kvm_clock.c b/sys/dev/kvm_clock/kvm_clock.c index 1a76432e417d..747b98c4f173 100644 --- a/sys/dev/kvm_clock/kvm_clock.c +++ b/sys/dev/kvm_clock/kvm_clock.c @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -77,6 +78,7 @@ static devclass_t kvm_clock_devclass; static struct pvclock_wall_clock *kvm_clock_get_wallclock(void *arg); static void kvm_clock_system_time_enable(struct kvm_clock_softc *sc); static void kvm_clock_system_time_enable_pcpu(void *arg); +static void kvm_clock_setup_sysctl(device_t); static struct pvclock_wall_clock * kvm_clock_get_wallclock(void *arg) @@ -166,6 +168,7 @@ kvm_clock_attach(device_t dev) sc->pvc.timeinfos = sc->timeinfos; sc->pvc.stable_flag_supported = stable_flag_supported; pvclock_init(&sc->pvc, dev, KVM_CLOCK_DEVNAME, KVM_CLOCK_TC_QUALITY, 0); + kvm_clock_setup_sysctl(dev); return (0); } @@ -217,6 +220,29 @@ kvm_clock_settime(device_t dev, struct timespec *ts) return (0); } +static int +kvm_clock_tsc_freq_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct kvm_clock_softc *sc = oidp->oid_arg1; + uint64_t freq = pvclock_tsc_freq(sc->timeinfos); + + return (sysctl_handle_64(oidp, &freq, 0, req)); +} + +static void +kvm_clock_setup_sysctl(device_t dev) +{ + struct kvm_clock_softc *sc = device_get_softc(dev); + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev); + struct sysctl_oid *tree = device_get_sysctl_tree(dev); + struct sysctl_oid_list *child = SYSCTL_CHILDREN(tree); + + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tsc_freq", + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + kvm_clock_tsc_freq_sysctl, "QU", + "Time Stamp Counter frequency"); +} + static device_method_t kvm_clock_methods[] = { DEVMETHOD(device_identify, kvm_clock_identify), DEVMETHOD(device_probe, kvm_clock_probe), From nobody Tue Nov 16 18:27:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 42418189352C; Tue, 16 Nov 2021 18:27: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 4HtvgG2fnJz4RL7; Tue, 16 Nov 2021 18:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0164212701; Tue, 16 Nov 2021 18:27: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 1AGIRb4q078589; Tue, 16 Nov 2021 18:27:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGIRbkn078588; Tue, 16 Nov 2021 18:27:37 GMT (envelope-from git) Date: Tue, 16 Nov 2021 18:27:37 GMT Message-Id: <202111161827.1AGIRbkn078588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 231bac4ccc43 - main - rtsol/rtsold: Add option to skip random delay List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 231bac4ccc431381d70c966a5bd5a95fbfc1f163 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=231bac4ccc431381d70c966a5bd5a95fbfc1f163 commit 231bac4ccc431381d70c966a5bd5a95fbfc1f163 Author: Colin Percival AuthorDate: 2021-11-16 18:24:05 +0000 Commit: Colin Percival CommitDate: 2021-11-16 18:27:28 +0000 rtsol/rtsold: Add option to skip random delay In accordance with a SHOULD in RFC 4861, rtsol and rtsold wait a random time between zero and one (aka MAX_RTR_SOLICITATION_DELAY) seconds before sending a Router Solicitation, in order to avoid network congestion if many hosts come online at once. (The question of how many hosts would be required to cause congestion by each sending a single packet on a Gbps+ network is left to the reader.) The new option -i disables this wait and instructs rtsol and rtsold to send the Router Solicitation immediately. Reviewed by: bz, kp (earlier version) MFC after: 1 week Relnotes: yes Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D32956 --- usr.sbin/rtsold/rtsold.8 | 16 +++++++++++----- usr.sbin/rtsold/rtsold.c | 13 ++++++++++--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/usr.sbin/rtsold/rtsold.8 b/usr.sbin/rtsold/rtsold.8 index 84e4d3013ef4..6b0e64ab0fac 100644 --- a/usr.sbin/rtsold/rtsold.8 +++ b/usr.sbin/rtsold/rtsold.8 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 14, 2021 +.Dd November 12, 2021 .Dt RTSOLD 8 .Os .\" @@ -39,27 +39,27 @@ .\" .Sh SYNOPSIS .Nm -.Op Fl dDfFmu1 +.Op Fl dDfFimu1 .Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl p Ar pidfile .Op Fl R Ar script-name .Ar interface ... .Nm -.Op Fl dDfFmu1 +.Op Fl dDfFimu1 .Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl p Ar pidfile .Op Fl R Ar script-name .Fl a .Nm rtsol -.Op Fl dDu +.Op Fl dDiu .Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl R Ar script-name .Ar interface ... .Nm rtsol -.Op Fl dDu +.Op Fl dDiu .Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl R Ar script-name @@ -194,6 +194,12 @@ The settings may be changed manually with .Xr sysctl 8 and .Xr ifconfig 8 . +.It Fl i +Transmit Router Solicitation packets immediately, without waiting the +normal random (between 0 and 1 second) delay. +This option should not be used on networks where it might result in +congestion due to many hosts simultaneously (re)connecting and +sending such packets. .It Fl m Enable mobility support. If this option is specified, diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c index 592321f59aca..f1ba3b07c879 100644 --- a/usr.sbin/rtsold/rtsold.c +++ b/usr.sbin/rtsold/rtsold.c @@ -99,6 +99,7 @@ cap_channel_t *capllflags, *capscript, *capsendmsg, *capsyslog; /* static variables and functions */ static int mobile_node = 0; +static int no_solicitation_delay = 0; static sig_atomic_t do_dump, do_exit; static struct pidfh *pfh; @@ -125,11 +126,11 @@ main(int argc, char **argv) progname = basename(argv[0]); if (strcmp(progname, "rtsold") == 0) { - opts = "adDfFm1M:O:p:R:u"; + opts = "adDfFim1M:O:p:R:u"; once = 0; pidfilepath = NULL; } else { - opts = "adDFM:O:R:u"; + opts = "adDFiM:O:R:u"; fflag = 1; once = 1; } @@ -151,6 +152,9 @@ main(int argc, char **argv) case 'F': Fflag = 1; break; + case 'i': + no_solicitation_delay = 1; + break; case 'm': mobile_node = 1; break; @@ -717,7 +721,10 @@ rtsol_timer_update(struct ifinfo *ifi) ifi->timer = tm_max; /* stop timer(valid?) */ break; case IFS_DELAY: - interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * MILLION); + if (no_solicitation_delay) + interval = 0; + else + interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * MILLION); ifi->timer.tv_sec = interval / MILLION; ifi->timer.tv_nsec = (interval % MILLION) * 1000; break; From nobody Tue Nov 16 18:52:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2F992189DF34; Tue, 16 Nov 2021 18:52: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 4HtwD90Y3lz4ZTP; Tue, 16 Nov 2021 18:52:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E88F712D1F; Tue, 16 Nov 2021 18:52: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 1AGIqeCV017838; Tue, 16 Nov 2021 18:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGIqebV017837; Tue, 16 Nov 2021 18:52:40 GMT (envelope-from git) Date: Tue, 16 Nov 2021 18:52:40 GMT Message-Id: <202111161852.1AGIqebV017837@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: 4285655adb74 - main - aesni: Avoid a potential out-of-bounds load in AES_GCM_encrypt() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4285655adb7480336857bf8e051365d73db18011 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4285655adb7480336857bf8e051365d73db18011 commit 4285655adb7480336857bf8e051365d73db18011 Author: Mark Johnston AuthorDate: 2021-11-16 14:16:16 +0000 Commit: Mark Johnston CommitDate: 2021-11-16 18:30:22 +0000 aesni: Avoid a potential out-of-bounds load in AES_GCM_encrypt() Reported by: Jenkins (KASAN job) Reviewed by: cem, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33012 --- sys/crypto/aesni/aesni_ghash.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/crypto/aesni/aesni_ghash.c b/sys/crypto/aesni/aesni_ghash.c index b0d1b6137ec6..a1295b6ccbda 100644 --- a/sys/crypto/aesni/aesni_ghash.c +++ b/sys/crypto/aesni/aesni_ghash.c @@ -504,9 +504,10 @@ AES_GCM_encrypt(const unsigned char *in, unsigned char *out, } tmp1 = _mm_aesenc_si128(tmp1, KEY[nr-1]); tmp1 = _mm_aesenclast_si128(tmp1, KEY[nr]); - tmp1 = _mm_xor_si128(tmp1, - _mm_loadu_si128(&((const __m128i *)in)[k])); - last_block = tmp1; + last_block = _mm_setzero_si128(); + memcpy(&last_block, &((const __m128i *)in)[k], + nbytes % 16); + last_block = _mm_xor_si128(last_block, tmp1); for (j=0; j To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 42188bb5c118 - main - unix: Remove a write-only local 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42188bb5c118f456af0606a2ce6ae26378716415 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=42188bb5c118f456af0606a2ce6ae26378716415 commit 42188bb5c118f456af0606a2ce6ae26378716415 Author: Mark Johnston AuthorDate: 2021-11-16 14:43:33 +0000 Commit: Mark Johnston CommitDate: 2021-11-16 18:30:22 +0000 unix: Remove a write-only local variable Reported by: clang MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/kern/uipc_usrreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 0ee29143c731..fe018aa65d85 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1006,7 +1006,7 @@ uipc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, struct unpcb *unp, *unp2; struct socket *so2; u_int mbcnt, sbcc; - int freed, error; + int error; unp = sotounpcb(so); KASSERT(unp != NULL, ("%s: unp == NULL", __func__)); @@ -1014,7 +1014,7 @@ uipc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, so->so_type == SOCK_SEQPACKET, ("%s: socktype %d", __func__, so->so_type)); - freed = error = 0; + error = 0; if (flags & PRUS_OOB) { error = EOPNOTSUPP; goto release; From nobody Tue Nov 16 18:52:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E8589189DF57; Tue, 16 Nov 2021 18:52: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 4HtwDC4vdSz4Z7V; Tue, 16 Nov 2021 18:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32DBD12CBA; Tue, 16 Nov 2021 18:52: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 1AGIqh54017892; Tue, 16 Nov 2021 18:52:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGIqhxc017891; Tue, 16 Nov 2021 18:52:43 GMT (envelope-from git) Date: Tue, 16 Nov 2021 18:52:43 GMT Message-Id: <202111161852.1AGIqhxc017891@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: fcaa890c4469 - main - mbuf: Only allow extpg mbufs if the system has a direct map List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fcaa890c4469118255d463495b4044eef484fa3e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fcaa890c4469118255d463495b4044eef484fa3e commit fcaa890c4469118255d463495b4044eef484fa3e Author: Mark Johnston AuthorDate: 2021-11-16 18:31:04 +0000 Commit: Mark Johnston CommitDate: 2021-11-16 18:31:04 +0000 mbuf: Only allow extpg mbufs if the system has a direct map Some upcoming changes will modify software checksum routines like in_cksum() to operate using m_apply(), which uses the direct map to access packet data for unmapped mbufs. This approach of course does not work on platforms without a direct map, so we have to disallow the use of unmapped mbufs on such platforms. I believe this is the right tradeoff: we only configure KTLS on amd64 and arm64 today (and one KTLS consumer, NFS TLS, requires a direct map already), and the use of unmapped mbufs with plain sendfile is a recent optimization. If need be, m_apply() could be modified to create CPU-private mappings of extpg mbuf pages as a fallback. So, change mb_use_ext_pgs to be hard-wired to zero on systems without a direct map. Note that PMAP_HAS_DMAP is not a compile-time constant on some systems, so the default value of mb_use_ext_pgs has to be determined during boot. Reviewed by: jhb Discussed with: gallatin MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32940 --- sys/kern/kern_mbuf.c | 32 ++++++++++++++++++++++++++++++-- sys/rpc/rpcsec_tls/rpctls_impl.c | 2 +- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index d1f2fd2bd9e4..78a270189a4b 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -116,9 +116,26 @@ int nmbjumbop; /* limits number of page size jumbo clusters */ int nmbjumbo9; /* limits number of 9k jumbo clusters */ int nmbjumbo16; /* limits number of 16k jumbo clusters */ -bool mb_use_ext_pgs = true; /* use M_EXTPG mbufs for sendfile & TLS */ -SYSCTL_BOOL(_kern_ipc, OID_AUTO, mb_use_ext_pgs, CTLFLAG_RWTUN, +bool mb_use_ext_pgs = false; /* use M_EXTPG mbufs for sendfile & TLS */ + +static int +sysctl_mb_use_ext_pgs(SYSCTL_HANDLER_ARGS) +{ + int error, extpg; + + extpg = mb_use_ext_pgs; + error = sysctl_handle_int(oidp, &extpg, 0, req); + if (error == 0 && req->newptr != NULL) { + if (extpg != 0 && !PMAP_HAS_DMAP) + error = EOPNOTSUPP; + else + mb_use_ext_pgs = extpg != 0; + } + return (error); +} +SYSCTL_PROC(_kern_ipc, OID_AUTO, mb_use_ext_pgs, CTLTYPE_INT | CTLFLAG_RW, &mb_use_ext_pgs, 0, + sysctl_mb_use_ext_pgs, "IU", "Use unmapped mbufs for sendfile(2) and TLS offload"); static quad_t maxmbufmem; /* overall real memory limit for all mbufs */ @@ -137,6 +154,7 @@ static void tunable_mbinit(void *dummy) { quad_t realmem; + int extpg; /* * The default limit for all mbuf related memory is 1/2 of all @@ -173,6 +191,16 @@ tunable_mbinit(void *dummy) if (nmbufs < nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) nmbufs = lmax(maxmbufmem / MSIZE / 5, nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16); + + /* + * Unmapped mbufs can only safely be used on platforms with a direct + * map. + */ + if (PMAP_HAS_DMAP) { + extpg = mb_use_ext_pgs; + TUNABLE_INT_FETCH("kern.ipc.mb_use_ext_pgs", &extpg); + mb_use_ext_pgs = extpg != 0; + } } SYSINIT(tunable_mbinit, SI_SUB_KMEM, SI_ORDER_MIDDLE, tunable_mbinit, NULL); diff --git a/sys/rpc/rpcsec_tls/rpctls_impl.c b/sys/rpc/rpcsec_tls/rpctls_impl.c index 110ba107540a..c495213b08e2 100644 --- a/sys/rpc/rpcsec_tls/rpctls_impl.c +++ b/sys/rpc/rpcsec_tls/rpctls_impl.c @@ -711,7 +711,7 @@ rpctls_getinfo(u_int *maxlenp, bool rpctlscd_run, bool rpctlssd_run) int error; size_t siz; - if (PMAP_HAS_DMAP == 0 || !mb_use_ext_pgs) + if (!mb_use_ext_pgs) return (false); siz = sizeof(enable); error = kernel_sysctlbyname(curthread, "kern.ipc.tls.enable", From nobody Tue Nov 16 18:52:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 13808189E104; Tue, 16 Nov 2021 18:52: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 4HtwDD4Dy8z4Z9c; Tue, 16 Nov 2021 18:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C4B312C20; Tue, 16 Nov 2021 18:52: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 1AGIqi8n017917; Tue, 16 Nov 2021 18:52:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGIqi6F017916; Tue, 16 Nov 2021 18:52:44 GMT (envelope-from git) Date: Tue, 16 Nov 2021 18:52:44 GMT Message-Id: <202111161852.1AGIqi6F017916@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: b4d758a0cc54 - main - sctp: Use m_apply() to calcuate a checksum for an mbuf chain List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b4d758a0cc54d991d2bdf7f697ec0b6b3fd6230d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b4d758a0cc54d991d2bdf7f697ec0b6b3fd6230d commit b4d758a0cc54d991d2bdf7f697ec0b6b3fd6230d Author: Mark Johnston AuthorDate: 2021-11-16 18:36:30 +0000 Commit: Mark Johnston CommitDate: 2021-11-16 18:36:30 +0000 sctp: Use m_apply() to calcuate a checksum for an mbuf chain m_apply() works on unmapped mbufs, so this will let us elide mb_unmapped_to_ext() calls preceding sctp_calculate_cksum() calls in the network stack. Modify sctp_calculate_cksum() to assume it's passed an mbuf header. This assumption appears to be true in practice, and we need to know the full length of the chain. No functional change intended. Reviewed by: tuexen, jhb MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32941 --- sys/netinet/sctp_crc32.c | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/sys/netinet/sctp_crc32.c b/sys/netinet/sctp_crc32.c index a36d36dc4861..97b881bb5062 100644 --- a/sys/netinet/sctp_crc32.c +++ b/sys/netinet/sctp_crc32.c @@ -80,6 +80,16 @@ sctp_finalize_crc32c(uint32_t crc32c) return (crc32c); } +static int +sctp_calculate_cksum_cb(void *arg, void *data, u_int len) +{ + uint32_t *basep; + + basep = arg; + *basep = calculate_crc32c(*basep, data, len); + return (0); +} + /* * Compute the SCTP checksum in network byte order for a given mbuf chain m * which contains an SCTP packet starting at offset. @@ -89,30 +99,17 @@ sctp_finalize_crc32c(uint32_t crc32c) uint32_t sctp_calculate_cksum(struct mbuf *m, uint32_t offset) { - uint32_t base = 0xffffffff; - - while (offset > 0) { - KASSERT(m != NULL, ("sctp_calculate_cksum, offset > length of mbuf chain")); - if (offset < (uint32_t)m->m_len) { - break; - } - offset -= m->m_len; - m = m->m_next; - } - if (offset > 0) { - base = calculate_crc32c(base, - (unsigned char *)(m->m_data + offset), - (unsigned int)(m->m_len - offset)); - m = m->m_next; - } - while (m != NULL) { - base = calculate_crc32c(base, - (unsigned char *)m->m_data, - (unsigned int)m->m_len); - m = m->m_next; - } - base = sctp_finalize_crc32c(base); - return (base); + uint32_t base; + int len; + + M_ASSERTPKTHDR(m); + KASSERT(offset < m->m_pkthdr.len, + ("%s: invalid offset %u into mbuf %p", __func__, offset, m)); + + base = 0xffffffff; + len = m->m_pkthdr.len - offset; + (void)m_apply(m, offset, len, sctp_calculate_cksum_cb, &base); + return (sctp_finalize_crc32c(base)); } #if defined(SCTP) || defined(SCTP_SUPPORT) From nobody Tue Nov 16 18:52:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0124E189DF7C; Tue, 16 Nov 2021 18:52: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 4HtwDG08kRz4ZPM; Tue, 16 Nov 2021 18:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C8C71295B; Tue, 16 Nov 2021 18:52: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 1AGIqjvD017941; Tue, 16 Nov 2021 18:52:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGIqjV7017940; Tue, 16 Nov 2021 18:52:45 GMT (envelope-from git) Date: Tue, 16 Nov 2021 18:52:45 GMT Message-Id: <202111161852.1AGIqjV7017940@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: 756bb50b6a86 - main - sctp: Remove now-unneeded mb_unmapped_to_ext() calls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 756bb50b6a867f3309ce76d76f1842a667dd303a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=756bb50b6a867f3309ce76d76f1842a667dd303a commit 756bb50b6a867f3309ce76d76f1842a667dd303a Author: Mark Johnston AuthorDate: 2021-11-16 18:38:09 +0000 Commit: Mark Johnston CommitDate: 2021-11-16 18:38:09 +0000 sctp: Remove now-unneeded mb_unmapped_to_ext() calls sctp_delayed_checksum() now handles unmapped mbufs, thanks to m_apply(). No functional change intended. Reviewed by: tuexen MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32942 --- sys/netinet/ip_divert.c | 6 ------ sys/netinet/ip_output.c | 12 ------------ sys/netipsec/ipsec_output.c | 12 ------------ sys/netpfil/pf/pf.c | 3 --- 4 files changed, 33 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 3e1200b1ff1c..fb4eba220703 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -220,9 +220,6 @@ divert_packet(struct mbuf *m, bool incoming) } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP) { - m = mb_unmapped_to_ext(m); - if (m == NULL) - return; sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; } @@ -238,9 +235,6 @@ divert_packet(struct mbuf *m, bool incoming) } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) - return; sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; } diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index d850cf5b5167..cfa6b1919a06 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -753,12 +753,6 @@ sendit: } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSTAT_INC(ips_odropped); - error = ENOBUFS; - goto bad; - } sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; } @@ -911,12 +905,6 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m0->m_pkthdr.csum_flags & CSUM_SCTP) { - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) { - error = ENOBUFS; - IPSTAT_INC(ips_odropped); - goto done; - } sctp_delayed_cksum(m0, hlen); m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; } diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index 0a722140f93e..0b171e9c4970 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -411,12 +411,6 @@ ipsec4_common_output(struct mbuf *m, struct inpcb *inp, int forwarding) if (m->m_pkthdr.csum_flags & CSUM_SCTP) { struct ip *ip; - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSECSTAT_INC(ips_out_nomem); - key_freesp(&sp); - return (ENOBUFS); - } ip = mtod(m, struct ip *); sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; @@ -791,12 +785,6 @@ ipsec6_common_output(struct mbuf *m, struct inpcb *inp, int forwarding) } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSEC6STAT_INC(ips_out_nomem); - key_freesp(&sp); - return (ENOBUFS); - } sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; } diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 9595650dbc36..8891ac75330a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6000,9 +6000,6 @@ pf_route(struct mbuf **m, struct pf_krule *r, int dir, struct ifnet *oifp, } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m0->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) - goto done; sctp_delayed_cksum(m0, (uint32_t)(ip->ip_hl << 2)); m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; } From nobody Tue Nov 16 21:26:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7AAA918A455C; Tue, 16 Nov 2021 21:26: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 4Htzf52jZcz4ThJ; Tue, 16 Nov 2021 21:26:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A99514D48; Tue, 16 Nov 2021 21:26: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 1AGLQrnj019102; Tue, 16 Nov 2021 21:26:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGLQrV7019101; Tue, 16 Nov 2021 21:26:53 GMT (envelope-from git) Date: Tue, 16 Nov 2021 21:26:53 GMT Message-Id: <202111162126.1AGLQrV7019101@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: 32854e528ac6 - main - mbuf: Properly set the default value for mb_use_ext_pgs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 32854e528ac6f99e019674f545d0a27940fb8bba Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=32854e528ac6f99e019674f545d0a27940fb8bba commit 32854e528ac6f99e019674f545d0a27940fb8bba Author: Mark Johnston AuthorDate: 2021-11-16 21:23:11 +0000 Commit: Mark Johnston CommitDate: 2021-11-16 21:23:11 +0000 mbuf: Properly set the default value for mb_use_ext_pgs Reported by: Jenkins Fixes: fcaa890c4469 ("mbuf: Only allow extpg mbufs if the system has a direct map") Pointy hat: markj --- sys/kern/kern_mbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 78a270189a4b..af00bf8182ac 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -197,7 +197,7 @@ tunable_mbinit(void *dummy) * map. */ if (PMAP_HAS_DMAP) { - extpg = mb_use_ext_pgs; + extpg = 1; TUNABLE_INT_FETCH("kern.ipc.mb_use_ext_pgs", &extpg); mb_use_ext_pgs = extpg != 0; } From nobody Tue Nov 16 21:59:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E7E64188DAFC; Tue, 16 Nov 2021 21:59: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 4Hv0N46CK1z4gZ8; Tue, 16 Nov 2021 21:59:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0EB11543C; Tue, 16 Nov 2021 21:59: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 1AGLxm2Z059198; Tue, 16 Nov 2021 21:59:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGLxmvo059197; Tue, 16 Nov 2021 21:59:48 GMT (envelope-from git) Date: Tue, 16 Nov 2021 21:59:48 GMT Message-Id: <202111162159.1AGLxmvo059197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Oskar Holmlund Subject: git: 09f907eb0cc0 - stable/12 - release: fix git clone command if /usr/ports does not exist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oh X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 09f907eb0cc009a83b47225bf18222237b34aa44 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by oh: URL: https://cgit.FreeBSD.org/src/commit/?id=09f907eb0cc009a83b47225bf18222237b34aa44 commit 09f907eb0cc009a83b47225bf18222237b34aa44 Author: Oskar Holmlund AuthorDate: 2021-11-16 23:41:33 +0000 Commit: Oskar Holmlund CommitDate: 2021-11-16 23:41:33 +0000 release: fix git clone command if /usr/ports does not exist Approved by: manu (mentor) Reviewed by: gjb Differential revision: https://reviews.freebsd.org/D32995 --- release/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/release.sh b/release/release.sh index 86e3592d068b..ef666689eca1 100755 --- a/release/release.sh +++ b/release/release.sh @@ -224,7 +224,7 @@ chroot_setup() { if [ -d "${CHROOTDIR}/usr/ports/.git" ]; then git -C ${CHROOTDIR}/usr/ports pull -q else - git -C ${CHROOTDIR}/usr/ports -b ${PORTBRANCH} clone + git clone -b ${PORTBRANCH} ${GITROOT}/${GITPORTS} ${CHROOTDIR}/usr/ports fi fi From nobody Tue Nov 16 22:26:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AFE761898C7E; Tue, 16 Nov 2021 22:26: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 4Hv0z64PKJz4pKr; Tue, 16 Nov 2021 22:26:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7785D15CDD; Tue, 16 Nov 2021 22:26: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 1AGMQg4N099241; Tue, 16 Nov 2021 22:26:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGMQg00099240; Tue, 16 Nov 2021 22:26:42 GMT (envelope-from git) Date: Tue, 16 Nov 2021 22:26:42 GMT Message-Id: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b014e0f15bc73d80ef49b64fd1f8c29f469467cb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=b014e0f15bc73d80ef49b64fd1f8c29f469467cb commit b014e0f15bc73d80ef49b64fd1f8c29f469467cb Author: Marcin Wojtas AuthorDate: 2021-10-24 14:53:06 +0000 Commit: Marcin Wojtas CommitDate: 2021-11-16 22:16:09 +0000 Enable ASLR by default for 64-bit executables Address Space Layout Randomization (ASLR) is an exploit mitigation technique implemented in the majority of modern operating systems. It involves randomly positioning the base address of an executable and the position of libraries, heap, and stack, in a process's address space. Although over the years ASLR proved to not guarantee full OS security on its own, this mechanism can make exploitation more difficult. Tests on the tier 1 64-bit architectures demonstrated that the ASLR is stable and does not result in noticeable performance degradation, therefore it should be safe to enable this mechanism by default. Moreover its effectiveness is increased for PIE (Position Independent Executable) binaries. Thanks to commit 9a227a2fd642 ("Enable PIE by default on 64-bit architectures"), building from src is not necessary to have PIE binaries. It is enough to control usage of ASLR in the OS solely by setting the appropriate sysctls. This patch toggles the kernel settings to use address map randomization for PIE & non-PIE 64-bit binaries. It also disables SBRK, in order to allow utilization of the bss grow region for mappings. The latter has no effect if ASLR is disabled, so apply it to all architectures. As for the drawbacks, a consequence of using the ASLR is more significant VM fragmentation, hence the issues may be encountered in the systems with a limited address space in high memory consumption cases, such as buildworld. As a result, although the tests on 32-bit architectures with ASLR enabled were mostly on par with what was observed on 64-bit ones, the defaults for the former are not changed at this time. Also, for the sake of safety keep the feature disabled for 32-bit executables on 64-bit machines, too. The committed change affects the overall OS operation, so the following should be taken into consideration: * Address space fragmentation. * A changed ABI due to modified layout of address space. * More complicated debugging due to: * Non-reproducible address space layout between runs. * Some debuggers automatically disable ASLR for spawned processes, making target's environment different between debug and non-debug runs. In order to confirm/rule-out the dependency of any encountered issue on ASLR it is strongly advised to re-run the test with the feature disabled - it can be done by setting the following sysctls in the /etc/sysctl.conf file: kern.elf64.aslr.enable=0 kern.elf64.aslr.pie_enable=0 Co-developed by: Dawid Gorecki Reviewed by: emaste, kib Obtained from: Semihalf Sponsored by: Stormshield MFC after: 1 month Differential revision: https://reviews.freebsd.org/D27666 --- sys/kern/imgact_elf.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 898f0f66a532..38ad61d8720b 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -161,19 +161,33 @@ SYSCTL_NODE(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, aslr, ""); #define ASLR_NODE_OID __CONCAT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), _aslr) -static int __elfN(aslr_enabled) = 0; +/* + * While for 64-bit machines ASLR works properly, there are + * still some problems when using 32-bit architectures. For this + * reason ASLR is only enabled by default when running native + * 64-bit non-PIE executables. + */ +static int __elfN(aslr_enabled) = __ELF_WORD_SIZE == 64; SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, enable, CTLFLAG_RWTUN, &__elfN(aslr_enabled), 0, __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": enable address map randomization"); -static int __elfN(pie_aslr_enabled) = 0; +/* + * Enable ASLR only for 64-bit PIE binaries by default. + */ +static int __elfN(pie_aslr_enabled) = __ELF_WORD_SIZE == 64; SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, pie_enable, CTLFLAG_RWTUN, &__elfN(pie_aslr_enabled), 0, __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": enable address map randomization for PIE binaries"); -static int __elfN(aslr_honor_sbrk) = 1; +/* + * Sbrk is now deprecated and it can be assumed, that in most + * cases it will not be used anyway. This setting is valid only + * for the ASLR enabled and allows for utilizing the bss grow region. + */ +static int __elfN(aslr_honor_sbrk) = 0; SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, honor_sbrk, CTLFLAG_RW, &__elfN(aslr_honor_sbrk), 0, __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": assume sbrk is used"); From nobody Tue Nov 16 22:26:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4B2141899105; Tue, 16 Nov 2021 22:26:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hv0z761wCz4pBN; Tue, 16 Nov 2021 22:26:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2A0815CDE; Tue, 16 Nov 2021 22:26: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 1AGMQhDD099265; Tue, 16 Nov 2021 22:26:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGMQhOi099264; Tue, 16 Nov 2021 22:26:43 GMT (envelope-from git) Date: Tue, 16 Nov 2021 22:26:43 GMT Message-Id: <202111162226.1AGMQhOi099264@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: bf410c6eda51 - main - Revert "bsdinstall: add knob to set ASLR sysctls" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf410c6eda515364db5f6ed74b765efdec0595ae Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=bf410c6eda515364db5f6ed74b765efdec0595ae commit bf410c6eda515364db5f6ed74b765efdec0595ae Author: Marcin Wojtas AuthorDate: 2021-11-12 19:32:57 +0000 Commit: Marcin Wojtas CommitDate: 2021-11-16 22:16:10 +0000 Revert "bsdinstall: add knob to set ASLR sysctls" This reverts commit 020f4112559ebf7e94665c9a69f89d21929ce82a. Because now ASLR is enabled by default for 64-bit architectures and the purpose of the installation menu is to allow choosing additional 'mitigation'/'hardening' options that are originally disabled, remove the ASLR knob from bsdinstall. Discussed with: emaste Obtained from: Semihalf Sponsored by: Stormshield --- usr.sbin/bsdinstall/scripts/hardening | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/hardening b/usr.sbin/bsdinstall/scripts/hardening index 67ee3672712d..58ea0a112e26 100755 --- a/usr.sbin/bsdinstall/scripts/hardening +++ b/usr.sbin/bsdinstall/scripts/hardening @@ -28,20 +28,6 @@ : ${DIALOG_OK=0} -set_aslr_sysctls() -{ - for bit in 32 64; do - if ! sysctl -Nq kern.elf$bit.aslr.enable >/dev/null; then - continue - fi - cat >> $BSDINSTALL_TMPETC/sysctl.conf.hardening <<-EOF - kern.elf$bit.aslr.enable=1 - kern.elf$bit.aslr.pie_enable=1 - kern.elf$bit.aslr.honor_sbrk=0 - EOF - done -} - echo -n > $BSDINSTALL_TMPETC/rc.conf.hardening echo -n > $BSDINSTALL_TMPETC/sysctl.conf.hardening echo -n > $BSDINSTALL_TMPBOOT/loader.conf.hardening @@ -62,7 +48,6 @@ FEATURES=$( dialog --backtitle "FreeBSD Installer" \ "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ "9 secure_console" "Enable console password prompt" ${secure_console:-off} \ "10 disable_ddtrace" "Disallow DTrace destructive-mode" ${disable_ddtrace:-off} \ - "11 enable_aslr" "Enable address layout randomization" ${enable_aslr:-off} \ 2>&1 1>&3 ) exec 3>&- @@ -101,9 +86,6 @@ for feature in $FEATURES; do disable_ddtrace) echo 'security.bsd.allow_destructive_dtrace=0' >> $BSDINSTALL_TMPBOOT/loader.conf.hardening ;; - enable_aslr) - set_aslr_sysctls - ;; esac done From nobody Tue Nov 16 23:29:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B37CB189A15A; Tue, 16 Nov 2021 23: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 4Hv2M94gzdz3hGb; Tue, 16 Nov 2021 23:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D17C168C8; Tue, 16 Nov 2021 23: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 1AGNT9uL079754; Tue, 16 Nov 2021 23: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 1AGNT9QN079753; Tue, 16 Nov 2021 23:29:09 GMT (envelope-from git) Date: Tue, 16 Nov 2021 23:29:09 GMT Message-Id: <202111162329.1AGNT9QN079753@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: d677d4be0c23 - main - Skip -flto for all MIPS 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d677d4be0c23a8061710232334e9dc703e591bc4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d677d4be0c23a8061710232334e9dc703e591bc4 commit d677d4be0c23a8061710232334e9dc703e591bc4 Author: Warner Losh AuthorDate: 2021-11-16 23:10:25 +0000 Commit: Warner Losh CommitDate: 2021-11-16 23:23:02 +0000 Skip -flto for all MIPS ports There likely should be a macro for the ports that support lto, but I'm making sure that all the mips things build before decommissioning it and this is the only thing that's broken... Sponsored by: Netflix --- usr.bin/gh-bc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/gh-bc/Makefile b/usr.bin/gh-bc/Makefile index e5f68b704d79..213559478b88 100644 --- a/usr.bin/gh-bc/Makefile +++ b/usr.bin/gh-bc/Makefile @@ -62,8 +62,8 @@ MAN_SRC_BC= bc/A.1 MAN_SRC_DC= dc/A.1 # prevent floating point incompatibilities caused by -flto on some architectures -.if ${MACHINE_ARCH} != mips && ${MACHINE_ARCH} != mips64 && \ - ${MACHINE_ARCH} != powerpc64 && ${MACHINE_ARCH} != riscv64 +.if ${MACHINE_ARCH:Mmips*} == "" && ${MACHINE_ARCH} != powerpc64 && \ + ${MACHINE_ARCH} != riscv64 CFLAGS+= -flto .endif From nobody Tue Nov 16 23:42:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 68C381850915; Tue, 16 Nov 2021 23:42:24 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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 4Hv2fS2C4Tz3m8J; Tue, 16 Nov 2021 23:42:24 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pj1-x102d.google.com with SMTP id np6-20020a17090b4c4600b001a90b011e06so838303pjb.5; Tue, 16 Nov 2021 15:42:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:reply-to:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=Dm/7OsTRlmcI7rUbuNE0Gdqzz96IDDDhUVuaJy8OMFw=; b=J/HCjnDhMBjbx5BpKGT+EhCCBG+UaczU5JEtICBMgHqn5JDWe+TfWCu6H4/lMsWSoo CYr2LGhuJl+PSYQUVzwe6RoxI5IB5tMKd2rDwbXAxtywZfl/TBvRHHZirvfJ3CEy574T 8suevcGl64OTu619xGk1do4pHwO22ekuusTjdHVayy+BW/UTP8ysQqsqqQKpeNhjy8qR Vs8RPM3rmBANCJ4pg5eInI7TputKKNsIfTiXMEPnxTfdsbKV4nfnmHkAS8VsDwKON/vX e7oHYBgOcUJWidlaV+Lpswo6PduvBjSoPEqhM3dpgmd9t2Q/S6r0Iz+lVXf8Bl+P0zE0 tlWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :reply-to:subject:content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=Dm/7OsTRlmcI7rUbuNE0Gdqzz96IDDDhUVuaJy8OMFw=; b=6hfI0sWazzorWAT2vD+6trmY26vVG+zOs5Jgw2j8XW9kNc5nv7/Zu/d84Yimpsmkmq 9fQLMfX8ydeNb1+g6o2cZrDrKgbDyz7jxBixZap4wfiJm3Qca/yrtPQwc24bBOpo0mA5 FiHrrtM8ggkjelTbYcL0xH/1BAzxtXt3jg1pQWdvykFWN1bBo5cviwVvoTA4+g/6pUsK gDUhoBPhmOq/YwcMw5odcH7X6g3ToKgAAYdpHsmVZq0dqJMg/blaUiwO4LEW2EcnmlbY U4AUcP+RaJZi6P/pGUskwB0RSDIBaO4fWfTLFmy32Jm3AEQt89wnXV1lInXNWxzdI3ct +0DA== X-Gm-Message-State: AOAM53027XmmAh59P4mm1fNitiIEI7CT6FbhiSzb2FD/DaYM5+m1y7Ix 5HXfNGsxV0BwY66B6BkqDTIMWix8bgM= X-Google-Smtp-Source: ABdhPJxQxfNDCS40miFHKNYg7op2ONXrJ7s/6sQKmtAOmC/6OJqJSAV76xJ86rrTziduL5G0RN4j7A== X-Received: by 2002:a17:90a:e005:: with SMTP id u5mr3793557pjy.17.1637106136947; Tue, 16 Nov 2021 15:42:16 -0800 (PST) Received: from ?IPV6:2403:5807:1b:1:6c9e:b489:476f:91c0? (2403-5807-1b-1-6c9e-b489-476f-91c0.ip6.aussiebb.net. [2403:5807:1b:1:6c9e:b489:476f:91c0]) by smtp.gmail.com with ESMTPSA id o9sm10298093pfh.37.2021.11.16.15.42.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Nov 2021 15:42:16 -0800 (PST) Sender: Kubilay Kocak Message-ID: Date: Wed, 17 Nov 2021 10:42:12 +1100 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Thunderbird/96.0a1 Reply-To: koobs@FreeBSD.org Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables Content-Language: en-US To: Marcin Wojtas , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> From: Kubilay Kocak In-Reply-To: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Hv2fS2C4Tz3m8J X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 17/11/2021 9:26 am, Marcin Wojtas wrote: > The branch main has been updated by mw: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b014e0f15bc73d80ef49b64fd1f8c29f469467cb > > commit b014e0f15bc73d80ef49b64fd1f8c29f469467cb > Author: Marcin Wojtas > AuthorDate: 2021-10-24 14:53:06 +0000 > Commit: Marcin Wojtas > CommitDate: 2021-11-16 22:16:09 +0000 > > Enable ASLR by default for 64-bit executables > > Address Space Layout Randomization (ASLR) is an exploit mitigation > technique implemented in the majority of modern operating systems. > It involves randomly positioning the base address of an executable > and the position of libraries, heap, and stack, in a process's address > space. Although over the years ASLR proved to not guarantee full OS > security on its own, this mechanism can make exploitation more difficult. > > Tests on the tier 1 64-bit architectures demonstrated that the ASLR is > stable and does not result in noticeable performance degradation, > therefore it should be safe to enable this mechanism by default. > Moreover its effectiveness is increased for PIE (Position Independent > Executable) binaries. Thanks to commit 9a227a2fd642 ("Enable PIE by > default on 64-bit architectures"), building from src is not necessary > to have PIE binaries. It is enough to control usage of ASLR in the > OS solely by setting the appropriate sysctls. > > This patch toggles the kernel settings to use address map randomization > for PIE & non-PIE 64-bit binaries. It also disables SBRK, in order > to allow utilization of the bss grow region for mappings. The latter > has no effect if ASLR is disabled, so apply it to all architectures. > > As for the drawbacks, a consequence of using the ASLR is more > significant VM fragmentation, hence the issues may be encountered > in the systems with a limited address space in high memory consumption > cases, such as buildworld. As a result, although the tests on 32-bit > architectures with ASLR enabled were mostly on par with what was > observed on 64-bit ones, the defaults for the former are not changed > at this time. Also, for the sake of safety keep the feature disabled > for 32-bit executables on 64-bit machines, too. > > The committed change affects the overall OS operation, so the > following should be taken into consideration: > * Address space fragmentation. > * A changed ABI due to modified layout of address space. > * More complicated debugging due to: > * Non-reproducible address space layout between runs. > * Some debuggers automatically disable ASLR for spawned processes, > making target's environment different between debug and > non-debug runs. > > In order to confirm/rule-out the dependency of any encountered issue > on ASLR it is strongly advised to re-run the test with the feature > disabled - it can be done by setting the following sysctls > in the /etc/sysctl.conf file: > kern.elf64.aslr.enable=0 > kern.elf64.aslr.pie_enable=0 > > Co-developed by: Dawid Gorecki > Reviewed by: emaste, kib > Obtained from: Semihalf > Sponsored by: Stormshield > MFC after: 1 month > Differential revision: https://reviews.freebsd.org/D27666 > --- > sys/kern/imgact_elf.c | 20 +++++++++++++++++--- > 1 file changed, 17 insertions(+), 3 deletions(-) > > diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c > index 898f0f66a532..38ad61d8720b 100644 > --- a/sys/kern/imgact_elf.c > +++ b/sys/kern/imgact_elf.c > @@ -161,19 +161,33 @@ SYSCTL_NODE(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, aslr, > ""); > #define ASLR_NODE_OID __CONCAT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), _aslr) > > -static int __elfN(aslr_enabled) = 0; > +/* > + * While for 64-bit machines ASLR works properly, there are > + * still some problems when using 32-bit architectures. For this > + * reason ASLR is only enabled by default when running native > + * 64-bit non-PIE executables. > + */ > +static int __elfN(aslr_enabled) = __ELF_WORD_SIZE == 64; > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, enable, CTLFLAG_RWTUN, > &__elfN(aslr_enabled), 0, > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) > ": enable address map randomization"); > > -static int __elfN(pie_aslr_enabled) = 0; > +/* > + * Enable ASLR only for 64-bit PIE binaries by default. > + */ > +static int __elfN(pie_aslr_enabled) = __ELF_WORD_SIZE == 64; > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, pie_enable, CTLFLAG_RWTUN, > &__elfN(pie_aslr_enabled), 0, > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) > ": enable address map randomization for PIE binaries"); The current description seems ambiguous with respect to the added comment. If the sysctl (=1) applies ASLR "only" for PIE binaries, where the =0 (sysctl disabled) case applies it unconditionally, a better description might be: "Enable address map randomization only for PIE binaries" What is the actual/correct behaviour of the control? Might aslr_enabled_pie_only also be a better OID name? Perhaps not worth the churn, but long term it would be great if OID names reflected what they are/do, rather than what they're not/don't do. > -static int __elfN(aslr_honor_sbrk) = 1; > +/* > + * Sbrk is now deprecated and it can be assumed, that in most > + * cases it will not be used anyway. This setting is valid only > + * for the ASLR enabled and allows for utilizing the bss grow region. > + */ > +static int __elfN(aslr_honor_sbrk) = 0; > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, honor_sbrk, CTLFLAG_RW, > &__elfN(aslr_honor_sbrk), 0, > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": assume sbrk is used"); > Can we add (DEPRECATED) to the control description, and/or otherwise mark the control as deprecated if the sysctl framework supports an attribute marking them as such? From nobody Tue Nov 16 23:56:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 457B91857AF3; Tue, 16 Nov 2021 23:56: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 4Hv2z41ZDmz3qNS; Tue, 16 Nov 2021 23:56:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15CCF16CF8; Tue, 16 Nov 2021 23:56: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 1AGNum6o019258; Tue, 16 Nov 2021 23:56:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGNumOJ019257; Tue, 16 Nov 2021 23:56:48 GMT (envelope-from git) Date: Tue, 16 Nov 2021 23:56:48 GMT Message-Id: <202111162356.1AGNumOJ019257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: fa8d8f299ba1 - stable/13 - nfscl: Use a smaller initial delay time for NFSERR_DELAY List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fa8d8f299ba1eb2dcfd763e096e90dbc57066c57 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=fa8d8f299ba1eb2dcfd763e096e90dbc57066c57 commit fa8d8f299ba1eb2dcfd763e096e90dbc57066c57 Author: Rick Macklem AuthorDate: 2021-11-02 00:21:31 +0000 Commit: Rick Macklem CommitDate: 2021-11-16 23:52:17 +0000 nfscl: Use a smaller initial delay time for NFSERR_DELAY For NFS RPCs that receive a NFSERR_DELAY reply, the delay time is initially 1sec and then increases exponentially to NFS_TRYLATERDEL. It was found that this delay time is excessive for some NFSv4 servers, which work well with a 1msec delay. A 1sec delay resulted in very slow performance for Remove and Rename when delegations and pNFS were enabled. This patch decreases the initial delay time to 1msec. Found during a recent IETF NFSv4 working group testing event. (cherry picked from commit 5a95a6e8e4d9e947b3bb4b4755a7242e1ddd72e7) --- sys/fs/nfs/nfs_commonkrpc.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 423ddb52494f..2235f1077a03 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -107,6 +107,10 @@ static int nfs_reconnects; static int nfs3_jukebox_delay = 10; static int nfs_skip_wcc_data_onerr = 1; static int nfs_dsretries = 2; +static struct timespec nfs_trylater_max = { + .tv_sec = NFS_TRYLATERDEL, + .tv_nsec = 0, +}; SYSCTL_DECL(_vfs_nfs); @@ -584,12 +588,11 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp, u_char *retsum, int toplevel, u_int64_t *xidp, struct nfsclsession *dssep) { uint32_t retseq, retval, slotseq, *tl; - time_t waituntil; int i = 0, j = 0, opcnt, set_sigset = 0, slot; int error = 0, usegssname = 0, secflavour = AUTH_SYS; int freeslot, maxslot, reterr, slotpos, timeo; u_int16_t procnum; - u_int nextconn, trylater_delay = 1; + u_int nextconn; struct nfs_feedback_arg nf; struct timeval timo; AUTH *auth; @@ -602,7 +605,11 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp, struct nfsclsession *sep; uint8_t sessionid[NFSX_V4SESSIONID]; bool nextconn_set; + struct timespec trylater_delay, ts, waituntil; + /* Initially 1msec. */ + trylater_delay.tv_sec = 0; + trylater_delay.tv_nsec = 1000000; sep = dssep; if (xidp != NULL) *xidp = 0; @@ -1144,12 +1151,19 @@ tryagain: (nd->nd_repstat == NFSERR_DELAY && (nd->nd_flag & ND_NFSV4) == 0) || nd->nd_repstat == NFSERR_RESOURCE) { - if (trylater_delay > NFS_TRYLATERDEL) - trylater_delay = NFS_TRYLATERDEL; - waituntil = NFSD_MONOSEC + trylater_delay; - while (NFSD_MONOSEC < waituntil) - (void) nfs_catnap(PZERO, 0, "nfstry"); - trylater_delay *= 2; + /* Clip at NFS_TRYLATERDEL. */ + if (timespeccmp(&trylater_delay, + &nfs_trylater_max, >)) + trylater_delay = nfs_trylater_max; + getnanouptime(&waituntil); + timespecadd(&waituntil, &trylater_delay, + &waituntil); + do { + nfs_catnap(PZERO, 0, "nfstry"); + getnanouptime(&ts); + } while (timespeccmp(&ts, &waituntil, <)); + timespecadd(&trylater_delay, &trylater_delay, + &trylater_delay); /* Double each time. */ if (slot != -1) { mtx_lock(&sep->nfsess_mtx); sep->nfsess_slotseq[slot]++; From nobody Wed Nov 17 00:06:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F392D188B65B; Wed, 17 Nov 2021 00:06: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 4Hv3BS6SQnz3sxT; Wed, 17 Nov 2021 00:06:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE40A1724E; Wed, 17 Nov 2021 00:06: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 1AH06e1M032824; Wed, 17 Nov 2021 00:06:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH06eTo032823; Wed, 17 Nov 2021 00:06:40 GMT (envelope-from git) Date: Wed, 17 Nov 2021 00:06:40 GMT Message-Id: <202111170006.1AH06eTo032823@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: 5509bad74e44 - main - nfsd: Add a new rc variable nfs_server_maxio List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5509bad74e44eed3b9d54fbd74d3752b88428147 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=5509bad74e44eed3b9d54fbd74d3752b88428147 commit 5509bad74e44eed3b9d54fbd74d3752b88428147 Author: Rick Macklem AuthorDate: 2021-11-17 00:02:53 +0000 Commit: Rick Macklem CommitDate: 2021-11-17 00:02:53 +0000 nfsd: Add a new rc variable nfs_server_maxio Since vfs.nfsd.srvmaxio can only be set when nfsd.ko is loaded, but nfsd is not running, setting it in /etc/sysctl.conf is not feasible when "options NFSD" was not specified for the kernel. This patch adds a new rc variable nfs_server_maxio, which sets vfs.nfsd.srvmaxio at the correct time. rc.conf.5 will be patched separately. Reviewed by: 0mp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32997 --- libexec/rc/rc.conf | 1 + libexec/rc/rc.d/nfsd | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 0cfee2d9c194..b27e1154a5e7 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -359,6 +359,7 @@ nfs_access_cache="60" # Client cache timeout in seconds nfs_server_enable="NO" # This host is an NFS server (or NO). nfs_server_flags="-u -t" # Flags to nfsd (if enabled). nfs_server_managegids="NO" # The NFS server maps gids for AUTH_SYS (or NO). +nfs_server_maxio="131072" # Maximum I/O size for the nfsd. mountd_enable="NO" # Run mountd (or NO). mountd_flags="-r -S" # Flags to mountd (if NFS server enabled). weak_mountd_authentication="NO" # Allow non-root mount requests to be served. diff --git a/libexec/rc/rc.d/nfsd b/libexec/rc/rc.d/nfsd index 1d0689b3beb7..b746cf7cea9d 100755 --- a/libexec/rc/rc.d/nfsd +++ b/libexec/rc/rc.d/nfsd @@ -28,6 +28,12 @@ nfsd_precmd() # oids are available. load_kld nfsd || return 1 + if [ -n "${nfs_server_maxio}" ]; then + if ! sysctl vfs.nfsd.srvmaxio=${nfs_server_maxio} >/dev/null; then + warn "Failed to set server max I/O" + fi + fi + if checkyesno nfs_reserved_port_only; then echo 'NFS on reserved port only=YES' sysctl vfs.nfsd.nfs_privport=1 > /dev/null From nobody Wed Nov 17 00:57:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5872818A3D1D for ; Wed, 17 Nov 2021 00:57: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 4Hv4Jh1RnWz4dTP; Wed, 17 Nov 2021 00:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F1FFA17CB0; Wed, 17 Nov 2021 00:57: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 1AH0v7u0098753; Wed, 17 Nov 2021 00:57:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH0v7T4098752; Wed, 17 Nov 2021 00:57:07 GMT (envelope-from git) Date: Wed, 17 Nov 2021 00:57:07 GMT Message-Id: <202111170057.1AH0v7T4098752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 6c8f03232aa9..269b5dadcfd1 - 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: 269b5dadcfd1d5732cf763dddcd46009a332eae4 X-Git-Oldrev: 6c8f03232aa98e950bfe187f9ff53d3541687b50 X-Git-Newrev: 269b5dadcfd1d5732cf763dddcd46009a332eae4 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=6c8f03232aa9..269b5dadcfd1 2a9c572059e9 zdb: Report bad label checksum 371e0f775474 Exclude zfs_copies_003_pos on Linux c23803be84cb Restore dirty dnode detection logic 637771a066ba ZTS: zfs_list_004_neg should not check paths that belong to ZFS d04b5c9e877a zhack: Add repair label option 49d42425d6dc Check l2cache vdevs pending list inside the vdev_inuse() 420b44488ff9 Remove basename(1). Clean up/shorten some coreutils pipelines c9d62d135638 Introduce a tunable to exclude special class buffers from L2ARC ac32854a6eef Remove (now unused) td argument from zfs_lookup() 8ac58c3f567a Fix `zfs:AUTO` autodetection in initramfs scripts b8dcfb2c9ff3 FreeBSD: fix world build after de198f2d9 269b5dadcfd1 Enable edonr in FreeBSD From nobody Wed Nov 17 01:21:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 09ABD1856FCF; Wed, 17 Nov 2021 01:22: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 4Hv4sM6KRWz4l2h; Wed, 17 Nov 2021 01:21:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6F791821F; Wed, 17 Nov 2021 01:21: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 1AH1LxL7038882; Wed, 17 Nov 2021 01:21:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH1LxO7038881; Wed, 17 Nov 2021 01:21:59 GMT (envelope-from git) Date: Wed, 17 Nov 2021 01:21:59 GMT Message-Id: <202111170121.1AH1LxO7038881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 6fc80c13284f - stable/13 - nfscl: Check for a forced dismount in nfscl_getref() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6fc80c13284fd3c7e53a273a7ef001e66fe7f7be Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6fc80c13284fd3c7e53a273a7ef001e66fe7f7be commit 6fc80c13284fd3c7e53a273a7ef001e66fe7f7be Author: Rick Macklem AuthorDate: 2021-11-03 00:28:13 +0000 Commit: Rick Macklem CommitDate: 2021-11-17 01:18:34 +0000 nfscl: Check for a forced dismount in nfscl_getref() The nfscl_getref() function is called within nfscl_doiods() when the NFSv4.1/4.2 pNFS client is doing I/O on a DS. As such, nfscl_getref() needs to check for a forced dismount. This patch adds that check. Found during a recent IETF NFSv4 working group testing event. (cherry picked from commit 331883a2f2e9ae5567085e4cd3a7ae3db2a2b022) --- sys/fs/nfsclient/nfs_clstate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index f1d661e7c90a..51f901bf14fc 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -4909,6 +4909,7 @@ int nfscl_getref(struct nfsmount *nmp) { struct nfsclclient *clp; + int ret; NFSLOCKCLSTATE(); clp = nfscl_findcl(nmp); @@ -4916,9 +4917,12 @@ nfscl_getref(struct nfsmount *nmp) NFSUNLOCKCLSTATE(); return (0); } - nfsv4_getref(&clp->nfsc_lock, NULL, NFSCLSTATEMUTEXPTR, NULL); + nfsv4_getref(&clp->nfsc_lock, NULL, NFSCLSTATEMUTEXPTR, nmp->nm_mountp); + ret = 1; + if (NFSCL_FORCEDISM(nmp->nm_mountp)) + ret = 0; NFSUNLOCKCLSTATE(); - return (1); + return (ret); } /* From nobody Wed Nov 17 01:23:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CB8C21857803; Wed, 17 Nov 2021 01:23: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 4Hv4vQ54ZGz4lgt; Wed, 17 Nov 2021 01:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E11318488; Wed, 17 Nov 2021 01:23: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 1AH1Nk4Y039122; Wed, 17 Nov 2021 01:23:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH1Nk3L039121; Wed, 17 Nov 2021 01:23:46 GMT (envelope-from git) Date: Wed, 17 Nov 2021 01:23:46 GMT Message-Id: <202111170123.1AH1Nk3L039121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 4a03ae8d17dd - stable/13 - nfscl: Fix use after free for forced dismount List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4a03ae8d17ddf3d3b57ca281000fd98e200b92cc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=4a03ae8d17ddf3d3b57ca281000fd98e200b92cc commit 4a03ae8d17ddf3d3b57ca281000fd98e200b92cc Author: Rick Macklem AuthorDate: 2021-11-03 19:15:40 +0000 Commit: Rick Macklem CommitDate: 2021-11-17 01:20:01 +0000 nfscl: Fix use after free for forced dismount When a forced dismount is done and delegations are being issued by the server (disabled by default for FreeBSD servers), the delegation structure is free'd before the loop calling vflush(). This could result in a use after free of the delegation structure. This patch changes the code so that the delegation structures are not free'd until after the vflush() loop for forced dismounts. Found during a recent IETF NFSv4 working group testing event. (cherry picked from commit 441222585968517c595ef7f39e5c71a42d238acd) --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clstate.c | 16 +++++++++++----- sys/fs/nfsclient/nfs_clvfsops.c | 13 +++++++++++-- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 44aedec09a96..b45143067c46 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -592,7 +592,7 @@ void nfscl_lockrelease(struct nfscllockowner *, int, int); void nfscl_fillclid(u_int64_t, char *, u_int8_t *, u_int16_t); void nfscl_filllockowner(void *, u_int8_t *, int); void nfscl_freeopen(struct nfsclopen *, int, bool); -void nfscl_umount(struct nfsmount *, NFSPROC_T *); +void nfscl_umount(struct nfsmount *, NFSPROC_T *, struct nfscldeleghead *); void nfscl_renewthread(struct nfsclclient *, NFSPROC_T *); void nfscl_initiate_recovery(struct nfsclclient *); int nfscl_hasexpired(struct nfsclclient *, u_int32_t, NFSPROC_T *); diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 51f901bf14fc..4392ed6cbcb2 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -119,7 +119,8 @@ static void nfscl_insertlock(struct nfscllockowner *, struct nfscllock *, struct nfscllock *, int); static int nfscl_updatelock(struct nfscllockowner *, struct nfscllock **, struct nfscllock **, int); -static void nfscl_delegreturnall(struct nfsclclient *, NFSPROC_T *); +static void nfscl_delegreturnall(struct nfsclclient *, NFSPROC_T *, + struct nfscldeleghead *); static u_int32_t nfscl_nextcbident(void); static mount_t nfscl_getmnt(int, uint8_t *, u_int32_t, struct nfsclclient **); static struct nfsclclient *nfscl_getclnt(u_int32_t); @@ -1987,7 +1988,7 @@ static int fake_global; /* Used to force visibility of MNTK_UNMOUNTF */ * Called from nfs umount to free up the clientid. */ void -nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p) +nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p, struct nfscldeleghead *dhp) { struct nfsclclient *clp; struct ucred *cred; @@ -2049,7 +2050,7 @@ nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p) * the server throws it away? */ LIST_REMOVE(clp, nfsc_list); - nfscl_delegreturnall(clp, p); + nfscl_delegreturnall(clp, p, dhp); cred = newnfs_getcred(); if (NFSHASNFSV4N(nmp)) { (void)nfsrpc_destroysession(nmp, clp, cred, p); @@ -3440,7 +3441,8 @@ lookformore: * (Must be called with client sleep lock.) */ static void -nfscl_delegreturnall(struct nfsclclient *clp, NFSPROC_T *p) +nfscl_delegreturnall(struct nfsclclient *clp, NFSPROC_T *p, + struct nfscldeleghead *dhp) { struct nfscldeleg *dp, *ndp; struct ucred *cred; @@ -3449,7 +3451,11 @@ nfscl_delegreturnall(struct nfsclclient *clp, NFSPROC_T *p) TAILQ_FOREACH_SAFE(dp, &clp->nfsc_deleg, nfsdl_list, ndp) { nfscl_cleandeleg(dp); (void) nfscl_trydelegreturn(dp, cred, clp->nfsc_nmp, p); - nfscl_freedeleg(&clp->nfsc_deleg, dp, true); + if (dhp != NULL) { + nfscl_freedeleg(&clp->nfsc_deleg, dp, false); + TAILQ_INSERT_HEAD(dhp, dp, nfsdl_list); + } else + nfscl_freedeleg(&clp->nfsc_deleg, dp, true); } NFSFREECRED(cred); } diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c index 57ac7f59f38d..55941170fc69 100644 --- a/sys/fs/nfsclient/nfs_clvfsops.c +++ b/sys/fs/nfsclient/nfs_clvfsops.c @@ -1765,8 +1765,11 @@ nfs_unmount(struct mount *mp, int mntflags) struct nfsmount *nmp; int error, flags = 0, i, trycnt = 0; struct nfsclds *dsp, *tdsp; + struct nfscldeleg *dp, *ndp; + struct nfscldeleghead dh; td = curthread; + TAILQ_INIT(&dh); if (mntflags & MNT_FORCE) flags |= FORCECLOSE; @@ -1790,7 +1793,7 @@ nfs_unmount(struct mount *mp, int mntflags) if (error) goto out; /* For a forced close, get rid of the renew thread now */ - nfscl_umount(nmp, td); + nfscl_umount(nmp, td, &dh); } /* We hold 1 extra ref on the root vnode; see comment in mountnfs(). */ do { @@ -1805,7 +1808,7 @@ nfs_unmount(struct mount *mp, int mntflags) * We are now committed to the unmount. */ if ((mntflags & MNT_FORCE) == 0) - nfscl_umount(nmp, td); + nfscl_umount(nmp, td, NULL); else { mtx_lock(&nmp->nm_mtx); nmp->nm_privflag |= NFSMNTP_FORCEDISM; @@ -1847,6 +1850,12 @@ nfs_unmount(struct mount *mp, int mntflags) } free(nmp->nm_tlscertname, M_NEWNFSMNT); free(nmp, M_NEWNFSMNT); + + /* Free up the delegation structures for forced dismounts. */ + TAILQ_FOREACH_SAFE(dp, &dh, nfsdl_list, ndp) { + TAILQ_REMOVE(&dh, dp, nfsdl_list); + free(dp, M_NFSCLDELEG); + } out: return (error); } From nobody Wed Nov 17 01:28:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CF8A0188ABE6; Wed, 17 Nov 2021 01:28: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 4Hv51M5Tgjz4nNG; Wed, 17 Nov 2021 01:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C81118233; Wed, 17 Nov 2021 01:28: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 1AH1StYg039571; Wed, 17 Nov 2021 01:28:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH1St4d039570; Wed, 17 Nov 2021 01:28:55 GMT (envelope-from git) Date: Wed, 17 Nov 2021 01:28:55 GMT Message-Id: <202111170128.1AH1St4d039570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 19f780169c43 - stable/13 - nfscl: Fix forced dismount from looping on commit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 19f780169c43f017f4786ccf0b6f9a4637bd2c31 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=19f780169c43f017f4786ccf0b6f9a4637bd2c31 commit 19f780169c43f017f4786ccf0b6f9a4637bd2c31 Author: Rick Macklem AuthorDate: 2021-11-03 21:25:44 +0000 Commit: Rick Macklem CommitDate: 2021-11-17 01:25:29 +0000 nfscl: Fix forced dismount from looping on commit When a forced dismount is in progress, it is possible to end up looping, retrying commits that fail. This patch fixes the problem by pretending that commits succeeded when a forced dismount is in prgress. (cherry picked from commit 6b67753488cb506f05694c5f6d2e74cf53497c54) --- sys/fs/nfsclient/nfs_clbio.c | 2 +- sys/fs/nfsclient/nfs_clvnops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 250d01d88948..73f559ad82f8 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -1738,7 +1738,7 @@ ncl_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td, off = ((u_quad_t)bp->b_blkno) * DEV_BSIZE + bp->b_dirtyoff; retv = ncl_commit(vp, off, bp->b_dirtyend-bp->b_dirtyoff, bp->b_wcred, td); - if (retv == 0) { + if (NFSCL_FORCEDISM(vp->v_mount) || retv == 0) { bp->b_dirtyoff = bp->b_dirtyend = 0; bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK); bp->b_resid = 0; diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index eab6eed82830..cd8077e243ea 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -3045,7 +3045,7 @@ again: for (i = 0; i < bvecpos; i++) { bp = bvec[i]; bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK); - if (retv) { + if (!NFSCL_FORCEDISM(vp->v_mount) && retv) { /* * Error, leave B_DELWRI intact */ From nobody Wed Nov 17 01:30:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7E313188AF64; Wed, 17 Nov 2021 01:30: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 4Hv52k36cVz4ntk; Wed, 17 Nov 2021 01:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BFA41848A; Wed, 17 Nov 2021 01:30: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 1AH1U6XE042343; Wed, 17 Nov 2021 01:30:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH1U632042340; Wed, 17 Nov 2021 01:30:06 GMT (envelope-from git) Date: Wed, 17 Nov 2021 01:30:06 GMT Message-Id: <202111170130.1AH1U632042340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: aff57157db04 - stable/13 - nfscl: Fix forced dismount when "nconnect" is specified List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aff57157db04d67b2c8d2516021a17575a8c7041 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=aff57157db04d67b2c8d2516021a17575a8c7041 commit aff57157db04d67b2c8d2516021a17575a8c7041 Author: Rick Macklem AuthorDate: 2021-11-03 20:26:38 +0000 Commit: Rick Macklem CommitDate: 2021-11-17 01:27:06 +0000 nfscl: Fix forced dismount when "nconnect" is specified When a forced dismount is done and the "nconnect" mount option was used, the additional connections must be closed. This patch does that. Found during a recent IETF NFSv4 working group testing event. (cherry picked from commit ae49051c033a2468af2f1f0079ecaf069b993245) --- sys/fs/nfs/nfs_commonkrpc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 2235f1077a03..358d77fe5b30 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1298,9 +1298,13 @@ newnfs_nmcancelreqs(struct nfsmount *nmp) { struct nfsclds *dsp; struct __rpc_client *cl; + int i; if (nmp->nm_sockreq.nr_client != NULL) CLNT_CLOSE(nmp->nm_sockreq.nr_client); + for (i = 0; i < nmp->nm_aconnect; i++) + if (nmp->nm_aconn[i] != NULL) + CLNT_CLOSE(nmp->nm_aconn[i]); lookformore: NFSLOCKMNT(nmp); TAILQ_FOREACH(dsp, &nmp->nm_sess, nfsclds_list) { From nobody Wed Nov 17 01:36:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EAD46188ED08; Wed, 17 Nov 2021 01:36: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 4Hv5BZ6J6Fz4qh1; Wed, 17 Nov 2021 01:36:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1C2718424; Wed, 17 Nov 2021 01:36: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 1AH1asOM052936; Wed, 17 Nov 2021 01:36:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH1asdm052935; Wed, 17 Nov 2021 01:36:54 GMT (envelope-from git) Date: Wed, 17 Nov 2021 01:36:54 GMT Message-Id: <202111170136.1AH1asdm052935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 00e9bc2d937f - stable/12 - nfscl: Fix forced dismount from looping on commit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 00e9bc2d937fd8de6638c4a5669e78f04cd94110 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=00e9bc2d937fd8de6638c4a5669e78f04cd94110 commit 00e9bc2d937fd8de6638c4a5669e78f04cd94110 Author: Rick Macklem AuthorDate: 2021-11-03 21:25:44 +0000 Commit: Rick Macklem CommitDate: 2021-11-17 01:33:19 +0000 nfscl: Fix forced dismount from looping on commit When a forced dismount is in progress, it is possible to end up looping, retrying commits that fail. This patch fixes the problem by pretending that commits succeeded when a forced dismount is in prgress. (cherry picked from commit 6b67753488cb506f05694c5f6d2e74cf53497c54) --- sys/fs/nfsclient/nfs_clbio.c | 2 +- sys/fs/nfsclient/nfs_clvnops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index c61cb1db9b95..52eb879caafb 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -1726,7 +1726,7 @@ ncl_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td, off = ((u_quad_t)bp->b_blkno) * DEV_BSIZE + bp->b_dirtyoff; retv = ncl_commit(vp, off, bp->b_dirtyend-bp->b_dirtyoff, bp->b_wcred, td); - if (retv == 0) { + if (NFSCL_FORCEDISM(vp->v_mount) || retv == 0) { bp->b_dirtyoff = bp->b_dirtyend = 0; bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK); bp->b_resid = 0; diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 17859a16424b..ffa8e41ec578 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -2934,7 +2934,7 @@ again: for (i = 0; i < bvecpos; i++) { bp = bvec[i]; bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK); - if (retv) { + if (!NFSCL_FORCEDISM(vp->v_mount) && retv) { /* * Error, leave B_DELWRI intact */ From nobody Wed Nov 17 01:42:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EF2D5189205C; Wed, 17 Nov 2021 01:42: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 4Hv5KQ630vz4shQ; Wed, 17 Nov 2021 01:42:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AED5418823; Wed, 17 Nov 2021 01:42: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 1AH1goiO066334; Wed, 17 Nov 2021 01:42:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH1gogk066333; Wed, 17 Nov 2021 01:42:50 GMT (envelope-from git) Date: Wed, 17 Nov 2021 01:42:50 GMT Message-Id: <202111170142.1AH1gogk066333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 8ca2474ce604 - stable/12 - nfscl: Check for a forced dismount in nfscl_getref() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8ca2474ce6043d1536591495a0969a48df72a5cd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=8ca2474ce6043d1536591495a0969a48df72a5cd commit 8ca2474ce6043d1536591495a0969a48df72a5cd Author: Rick Macklem AuthorDate: 2021-11-03 00:28:13 +0000 Commit: Rick Macklem CommitDate: 2021-11-17 01:39:46 +0000 nfscl: Check for a forced dismount in nfscl_getref() The nfscl_getref() function is called within nfscl_doiods() when the NFSv4.1/4.2 pNFS client is doing I/O on a DS. As such, nfscl_getref() needs to check for a forced dismount. This patch adds that check. Found during a recent IETF NFSv4 working group testing event. (cherry picked from commit 331883a2f2e9ae5567085e4cd3a7ae3db2a2b022) --- sys/fs/nfsclient/nfs_clstate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 5f35e4e708e9..dd4eae5a0d2d 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -4707,6 +4707,7 @@ int nfscl_getref(struct nfsmount *nmp) { struct nfsclclient *clp; + int ret; NFSLOCKCLSTATE(); clp = nfscl_findcl(nmp); @@ -4714,9 +4715,12 @@ nfscl_getref(struct nfsmount *nmp) NFSUNLOCKCLSTATE(); return (0); } - nfsv4_getref(&clp->nfsc_lock, NULL, NFSCLSTATEMUTEXPTR, NULL); + nfsv4_getref(&clp->nfsc_lock, NULL, NFSCLSTATEMUTEXPTR, nmp->nm_mountp); + ret = 1; + if (NFSCL_FORCEDISM(nmp->nm_mountp)) + ret = 0; NFSUNLOCKCLSTATE(); - return (1); + return (ret); } /* From nobody Wed Nov 17 01:47:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C19ED1895537; Wed, 17 Nov 2021 01:47:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hv5QG53nNz4vGs; Wed, 17 Nov 2021 01:47:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DD4118444; Wed, 17 Nov 2021 01:47: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 1AH1l26Z066760; Wed, 17 Nov 2021 01:47:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH1l2hi066759; Wed, 17 Nov 2021 01:47:02 GMT (envelope-from git) Date: Wed, 17 Nov 2021 01:47:02 GMT Message-Id: <202111170147.1AH1l2hi066759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 04c2ce41e3fc - stable/12 - nfscl: Fix use after free for forced dismount List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 04c2ce41e3fcdef045eeea9f338f6b0eb547f64d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=04c2ce41e3fcdef045eeea9f338f6b0eb547f64d commit 04c2ce41e3fcdef045eeea9f338f6b0eb547f64d Author: Rick Macklem AuthorDate: 2021-11-03 19:15:40 +0000 Commit: Rick Macklem CommitDate: 2021-11-17 01:43:30 +0000 nfscl: Fix use after free for forced dismount When a forced dismount is done and delegations are being issued by the server (disabled by default for FreeBSD servers), the delegation structure is free'd before the loop calling vflush(). This could result in a use after free of the delegation structure. This patch changes the code so that the delegation structures are not free'd until after the vflush() loop for forced dismounts. Found during a recent IETF NFSv4 working group testing event. (cherry picked from commit 441222585968517c595ef7f39e5c71a42d238acd) --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clstate.c | 16 +++++++++++----- sys/fs/nfsclient/nfs_clvfsops.c | 13 +++++++++++-- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 5177a1c2c065..91914314970d 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -563,7 +563,7 @@ void nfscl_lockrelease(struct nfscllockowner *, int, int); void nfscl_fillclid(u_int64_t, char *, u_int8_t *, u_int16_t); void nfscl_filllockowner(void *, u_int8_t *, int); void nfscl_freeopen(struct nfsclopen *, int); -void nfscl_umount(struct nfsmount *, NFSPROC_T *); +void nfscl_umount(struct nfsmount *, NFSPROC_T *, struct nfscldeleghead *); void nfscl_renewthread(struct nfsclclient *, NFSPROC_T *); void nfscl_initiate_recovery(struct nfsclclient *); int nfscl_hasexpired(struct nfsclclient *, u_int32_t, NFSPROC_T *); diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index dd4eae5a0d2d..ad4f16df8be8 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -113,7 +113,8 @@ static void nfscl_insertlock(struct nfscllockowner *, struct nfscllock *, struct nfscllock *, int); static int nfscl_updatelock(struct nfscllockowner *, struct nfscllock **, struct nfscllock **, int); -static void nfscl_delegreturnall(struct nfsclclient *, NFSPROC_T *); +static void nfscl_delegreturnall(struct nfsclclient *, NFSPROC_T *, + struct nfscldeleghead *); static u_int32_t nfscl_nextcbident(void); static mount_t nfscl_getmnt(int, uint8_t *, u_int32_t, struct nfsclclient **); static struct nfsclclient *nfscl_getclnt(u_int32_t); @@ -1880,7 +1881,7 @@ static int fake_global; /* Used to force visibility of MNTK_UNMOUNTF */ * Called from nfs umount to free up the clientid. */ void -nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p) +nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p, struct nfscldeleghead *dhp) { struct nfsclclient *clp; struct ucred *cred; @@ -1942,7 +1943,7 @@ nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p) * the server throws it away? */ LIST_REMOVE(clp, nfsc_list); - nfscl_delegreturnall(clp, p); + nfscl_delegreturnall(clp, p, dhp); cred = newnfs_getcred(); if (NFSHASNFSV4N(nmp)) { (void)nfsrpc_destroysession(nmp, clp, cred, p); @@ -3280,7 +3281,8 @@ lookformore: * (Must be called with client sleep lock.) */ static void -nfscl_delegreturnall(struct nfsclclient *clp, NFSPROC_T *p) +nfscl_delegreturnall(struct nfsclclient *clp, NFSPROC_T *p, + struct nfscldeleghead *dhp) { struct nfscldeleg *dp, *ndp; struct ucred *cred; @@ -3289,7 +3291,11 @@ nfscl_delegreturnall(struct nfsclclient *clp, NFSPROC_T *p) TAILQ_FOREACH_SAFE(dp, &clp->nfsc_deleg, nfsdl_list, ndp) { nfscl_cleandeleg(dp); (void) nfscl_trydelegreturn(dp, cred, clp->nfsc_nmp, p); - nfscl_freedeleg(&clp->nfsc_deleg, dp, true); + if (dhp != NULL) { + nfscl_freedeleg(&clp->nfsc_deleg, dp, false); + TAILQ_INSERT_HEAD(dhp, dp, nfsdl_list); + } else + nfscl_freedeleg(&clp->nfsc_deleg, dp, true); } NFSFREECRED(cred); } diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c index 49a08e3787b4..b839ad347696 100644 --- a/sys/fs/nfsclient/nfs_clvfsops.c +++ b/sys/fs/nfsclient/nfs_clvfsops.c @@ -1666,8 +1666,11 @@ nfs_unmount(struct mount *mp, int mntflags) struct nfsmount *nmp; int error, flags = 0, i, trycnt = 0; struct nfsclds *dsp, *tdsp; + struct nfscldeleg *dp, *ndp; + struct nfscldeleghead dh; td = curthread; + TAILQ_INIT(&dh); if (mntflags & MNT_FORCE) flags |= FORCECLOSE; @@ -1691,7 +1694,7 @@ nfs_unmount(struct mount *mp, int mntflags) if (error) goto out; /* For a forced close, get rid of the renew thread now */ - nfscl_umount(nmp, td); + nfscl_umount(nmp, td, &dh); } /* We hold 1 extra ref on the root vnode; see comment in mountnfs(). */ do { @@ -1706,7 +1709,7 @@ nfs_unmount(struct mount *mp, int mntflags) * We are now committed to the unmount. */ if ((mntflags & MNT_FORCE) == 0) - nfscl_umount(nmp, td); + nfscl_umount(nmp, td, NULL); else { mtx_lock(&nmp->nm_mtx); nmp->nm_privflag |= NFSMNTP_FORCEDISM; @@ -1747,6 +1750,12 @@ nfs_unmount(struct mount *mp, int mntflags) nfscl_freenfsclds(dsp); } free(nmp, M_NEWNFSMNT); + + /* Free up the delegation structures for forced dismounts. */ + TAILQ_FOREACH_SAFE(dp, &dh, nfsdl_list, ndp) { + TAILQ_REMOVE(&dh, dp, nfsdl_list); + free(dp, M_NFSCLDELEG); + } out: return (error); } From nobody Wed Nov 17 05:40:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A8688189692C for ; Wed, 17 Nov 2021 05:40:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (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 4HvBbm3jwdz4qgF for ; Wed, 17 Nov 2021 05:40:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x82d.google.com with SMTP id n15so1639294qta.0 for ; Tue, 16 Nov 2021 21:40:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=053EvcVzG+ZrHHJkHd/vWtW+B4xvPS1N8BuuIgI+nHY=; b=HFVybR3rcgouB6BvuhgweMqe5/KaBC1GCWzQl053VQyqA6uj0g0TO/JahJm0qtkU4s LoQfReMl0p4DpOCG/PFhB7rlaw2Jm7jqiED0v5TRJWnQgwMCp5s/VlkvFvDU1gii6G4o aU+RD+MpyPatXh0vtabeFJgVJrjpkbeU8sFqNAheLDJBLjy3qXI2NsF+83B7s2gPrq7t XJHHVfyuYTOheqwBbYo5WH2SI/bTXJg5p/MgBC4IwjBGMJ5HRwbFIr3G3p2qVoxkKz/a T0aJ45z8eK/AqOn1CbnyehqLECkVh1Epb0Nxhvqh62jgjh+8wTkc73BGQ5ScHyFZf7iX ZOlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=053EvcVzG+ZrHHJkHd/vWtW+B4xvPS1N8BuuIgI+nHY=; b=oEIDwlG7UFL1SizHh5VcUukVKmjvO7bCr8qPXwu2olncOQ/tjtvyEDSq200MKi2Zy7 Fe33EZCbyiJX3KYmQO1J6ApvbZefceMZrvzysHlyvtJRK1Nj4V+v+A+YPXOfbS9rpgCD 46AmlbbVfsM7WReKLVYNs0soSa/qaQLM52m0oKkKBeDbC5dDdR5MFkYKcDjD6AZNL4mH yao2Zg4D/F5nw5ZSlRkdQGWeIVtF1z4ROq+CkVunRyT7RQPOORGXcoQgwnPBd6AXzNHb YVCfo4I/YZJs+iOg5gCJFBnFDu1I0orvE+v3AIaPtCh6MQUu8w+Guc9H+Q78cCf5af/9 8NBg== X-Gm-Message-State: AOAM5324zXszFqtDTibxwVtrLvhUuIuVM7eVSCxo+GZxxMyVLUiBk0v/ UczBrgO7wQtzmO8mUHjBI6naWrJFCS9ClhLW X-Google-Smtp-Source: ABdhPJxCzWNpkLKawlpxsrUb9e1Ux7+IoOwujhSG88XAszBDHY9BY7qq/IIzNCnfiPqH4jsPlRAJrA== X-Received: by 2002:ac8:5796:: with SMTP id v22mr13758080qta.304.1637127636095; Tue, 16 Nov 2021 21:40:36 -0800 (PST) Received: from mutt-hbsd (pool-100-16-224-136.bltmmd.fios.verizon.net. [100.16.224.136]) by smtp.gmail.com with ESMTPSA id e13sm4697024qte.56.2021.11.16.21.40.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Nov 2021 21:40:35 -0800 (PST) Date: Wed, 17 Nov 2021 00:40:34 -0500 From: Shawn Webb To: Kubilay Kocak Cc: Marcin Wojtas , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables Message-ID: <20211117054034.jr6wdl5o42dv2kb6@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 14.0-CURRENT-HBSD FreeBSD 14.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yd54oiu2dteiihry" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4HvBbm3jwdz4qgF X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --yd54oiu2dteiihry Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 17, 2021 at 10:42:12AM +1100, Kubilay Kocak wrote: > On 17/11/2021 9:26 am, Marcin Wojtas wrote: > > The branch main has been updated by mw: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Db014e0f15bc73d80ef49b64f= d1f8c29f469467cb > >=20 > > commit b014e0f15bc73d80ef49b64fd1f8c29f469467cb > > Author: Marcin Wojtas > > AuthorDate: 2021-10-24 14:53:06 +0000 > > Commit: Marcin Wojtas > > CommitDate: 2021-11-16 22:16:09 +0000 > >=20 > > Enable ASLR by default for 64-bit executables > > Address Space Layout Randomization (ASLR) is an exploit mitigation > > technique implemented in the majority of modern operating systems. > > It involves randomly positioning the base address of an executable > > and the position of libraries, heap, and stack, in a process's add= ress > > space. Although over the years ASLR proved to not guarantee full OS > > security on its own, this mechanism can make exploitation more dif= ficult. > > Tests on the tier 1 64-bit architectures demonstrated that the ASL= R is > > stable and does not result in noticeable performance degradation, > > therefore it should be safe to enable this mechanism by default. > > Moreover its effectiveness is increased for PIE (Position Independ= ent > > Executable) binaries. Thanks to commit 9a227a2fd642 ("Enable PIE by > > default on 64-bit architectures"), building from src is not necess= ary > > to have PIE binaries. It is enough to control usage of ASLR in the > > OS solely by setting the appropriate sysctls. > > This patch toggles the kernel settings to use address map randomiz= ation > > for PIE & non-PIE 64-bit binaries. It also disables SBRK, in order > > to allow utilization of the bss grow region for mappings. The latt= er > > has no effect if ASLR is disabled, so apply it to all architecture= s. > > As for the drawbacks, a consequence of using the ASLR is more > > significant VM fragmentation, hence the issues may be encountered > > in the systems with a limited address space in high memory consump= tion > > cases, such as buildworld. As a result, although the tests on 32-b= it > > architectures with ASLR enabled were mostly on par with what was > > observed on 64-bit ones, the defaults for the former are not chang= ed > > at this time. Also, for the sake of safety keep the feature disabl= ed > > for 32-bit executables on 64-bit machines, too. > > The committed change affects the overall OS operation, so the > > following should be taken into consideration: > > * Address space fragmentation. > > * A changed ABI due to modified layout of address space. > > * More complicated debugging due to: > > * Non-reproducible address space layout between runs. > > * Some debuggers automatically disable ASLR for spawned processe= s, > > making target's environment different between debug and > > non-debug runs. > > In order to confirm/rule-out the dependency of any encountered iss= ue > > on ASLR it is strongly advised to re-run the test with the feature > > disabled - it can be done by setting the following sysctls > > in the /etc/sysctl.conf file: > > kern.elf64.aslr.enable=3D0 > > kern.elf64.aslr.pie_enable=3D0 > > Co-developed by: Dawid Gorecki > > Reviewed by: emaste, kib > > Obtained from: Semihalf > > Sponsored by: Stormshield > > MFC after: 1 month > > Differential revision: https://reviews.freebsd.org/D27666 > > --- > > sys/kern/imgact_elf.c | 20 +++++++++++++++++--- > > 1 file changed, 17 insertions(+), 3 deletions(-) > >=20 > > diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c > > index 898f0f66a532..38ad61d8720b 100644 > > --- a/sys/kern/imgact_elf.c > > +++ b/sys/kern/imgact_elf.c > > @@ -161,19 +161,33 @@ SYSCTL_NODE(__CONCAT(_kern_elf, __ELF_WORD_SIZE),= OID_AUTO, aslr, > > ""); > > #define ASLR_NODE_OID __CONCAT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), = _aslr) > > -static int __elfN(aslr_enabled) =3D 0; > > +/* > > + * While for 64-bit machines ASLR works properly, there are > > + * still some problems when using 32-bit architectures. For this > > + * reason ASLR is only enabled by default when running native > > + * 64-bit non-PIE executables. > > + */ > > +static int __elfN(aslr_enabled) =3D __ELF_WORD_SIZE =3D=3D 64; > > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, enable, CTLFLAG_RWTUN, > > &__elfN(aslr_enabled), 0, > > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) > > ": enable address map randomization"); > > -static int __elfN(pie_aslr_enabled) =3D 0; > > +/* > > + * Enable ASLR only for 64-bit PIE binaries by default. > > + */ > > +static int __elfN(pie_aslr_enabled) =3D __ELF_WORD_SIZE =3D=3D 64; > > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, pie_enable, CTLFLAG_RWTUN, > > &__elfN(pie_aslr_enabled), 0, > > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) > > ": enable address map randomization for PIE binaries"); >=20 > The current description seems ambiguous with respect to the added comment. > If the sysctl (=3D1) applies ASLR "only" for PIE binaries, where the =3D0 > (sysctl disabled) case applies it unconditionally, a better description > might be: >=20 > "Enable address map randomization only for PIE binaries" >=20 > What is the actual/correct behaviour of the control? It also doesn't make much sense to toggle AS{L}R for the different parts of an executable image. AS{L}R is an "all or nothing" thing. Really, there should be only a single toggle with four modes: 1. AS{L}R force disable 2. AS{L}R opt out 3. AS{L}R opt in 4. AS{L}R force enable HardenedBSD has found that users get confused or are unsure of having too many toggles. "What happens when I do ?" In this case, you'd probably have to have deeper knowledge of how FreeBSD's AS{L}R is implemented. Having a single sysctl knob makes life easier for users and reduces implementation complexity. Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --yd54oiu2dteiihry Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmGUldAACgkQ/y5nonf4 4fpd0w/+LO+NtrKFMuiImHMyT1OJukVAgJiFD2C6/uQSpPIy/g4geWuB16MaRHxM jnUOgpJjypfTo0ToiEs9Eh5q3EAIDqqbQR5AdFrycwdG+A1F/jZptWiqJWhZgmuI oD+caYuzVmen4dBPM5niMP/1pRatCSREZzfG+OQ/kXCN+5m0vMsDprpGFkzdP/+W +SlGtpiV8fRDj/FmVVF/XXq1IlM8dXgZOYCZw6dLatdIqBnn/lzSx9psBh/D0Ums V/E2WjIDZx9O4Tb5XmtkcV1VYiHGMBtpXCVn7gFtEokVo+o1/oeKrb9X7rXyeys7 tcKTtdvZFVy0/d9BMpUzO8nE6rzD0nblOS9iOFo9xr612ULNmHxBS5WkunOetcMP z3+aGx3IiqpexBmsFlva/BNssvRwZI+s5v4EiQFOJrpN9SrBzkifbQ6QWF0/wnia rBGSm+MQbSd/BJDPknbDioyjGT6P3ROGqRelrDgb9qOIr0N3xOiOJIp7NzBQhWzI BQIlvueqMAUdXE9KsLWkKKW8WQTZTlOPIrx/Y+JP4L5j1vrj8sSID8bPHNotYOlN xsMGrf3Y2mJi7vmai9mG3y095xSE8zunDzXl38NI6fEky9Db+hRwDDvhksvl79uW 3v/WapZZtpcwMERSYk6GE0igIaOqPZ026dhRSUO/h10vChb47lE= =+1cg -----END PGP SIGNATURE----- --yd54oiu2dteiihry-- From nobody Wed Nov 17 06:20:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CC2CA188A215; Wed, 17 Nov 2021 06:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvCVM5MgKz3KmJ; Wed, 17 Nov 2021 06:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 993911C13B; Wed, 17 Nov 2021 06:20: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 1AH6KxPG038980; Wed, 17 Nov 2021 06:20:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH6KxM7038979; Wed, 17 Nov 2021 06:20:59 GMT (envelope-from git) Date: Wed, 17 Nov 2021 06:20:59 GMT Message-Id: <202111170620.1AH6KxM7038979@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: 23e1961e78b0 - main - riscv: add COMPAT_FREEBSD12 option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23e1961e78b0ac4d1cf03426d1a642962069f2b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=23e1961e78b0ac4d1cf03426d1a642962069f2b9 commit 23e1961e78b0ac4d1cf03426d1a642962069f2b9 Author: Kristof Provost AuthorDate: 2021-11-16 19:46:26 +0000 Commit: Kristof Provost CommitDate: 2021-11-17 02:08:14 +0000 riscv: add COMPAT_FREEBSD12 option Turn on compat option for older FreeBSD versions (i.e. 12). We do not enable the compat options for 11 or older because riscv was never supported in those versions. Reviewed by: jrtc27 (previous version) MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33015 --- sys/riscv/conf/GENERIC | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 4ce1cb6a3cda..28eb77ad4bc1 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -52,6 +52,7 @@ options TMPFS # Efficient memory filesystem options GEOM_PART_GPT # GUID Partition Tables. options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization +options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support From nobody Wed Nov 17 06:21:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 84024188A224; Wed, 17 Nov 2021 06:21:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvCVN6nc3z3L0Y; Wed, 17 Nov 2021 06:21:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6A6D1BF79; Wed, 17 Nov 2021 06:21: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 1AH6L030039008; Wed, 17 Nov 2021 06:21:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH6L0pb039007; Wed, 17 Nov 2021 06:21:00 GMT (envelope-from git) Date: Wed, 17 Nov 2021 06:21:00 GMT Message-Id: <202111170621.1AH6L0pb039007@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: 4e85b6489045 - main - Add a COMPAT_FREEBSD13 kernel option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e85b6489045e05112a141a4b2585613bb5fed09 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4e85b6489045e05112a141a4b2585613bb5fed09 commit 4e85b6489045e05112a141a4b2585613bb5fed09 Author: Kristof Provost AuthorDate: 2021-11-15 21:01:34 +0000 Commit: Kristof Provost CommitDate: 2021-11-17 02:08:40 +0000 Add a COMPAT_FREEBSD13 kernel option Use it wherever COMPAT_FREEBSD11 is currently specified. Reviewed by: jhb (previous version) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33005 --- sys/amd64/conf/GENERIC | 1 + sys/amd64/conf/MINIMAL | 1 + sys/arm/conf/std.armv6 | 1 + sys/arm/conf/std.armv7 | 1 + sys/arm64/conf/std.arm64 | 1 + sys/conf/NOTES | 3 +++ sys/conf/options | 1 + sys/i386/conf/GENERIC | 1 + sys/i386/conf/MINIMAL | 1 + sys/mips/conf/JZ4780 | 1 + sys/mips/conf/X1000 | 1 + sys/mips/conf/std.BERI | 1 + sys/powerpc/conf/GENERIC | 1 + sys/powerpc/conf/GENERIC64 | 1 + sys/powerpc/conf/GENERIC64LE | 1 + sys/powerpc/conf/MPC85XX | 1 + sys/powerpc/conf/MPC85XXSPE | 1 + sys/riscv/conf/GENERIC | 1 + 18 files changed, 20 insertions(+) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index f47b995beb2c..589d81e06dde 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -67,6 +67,7 @@ options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options COMPAT_FREEBSD13 # Compatible with FreeBSD13 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index f724cbd2e3f1..14c07c0f04b6 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -61,6 +61,7 @@ options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options COMPAT_FREEBSD13 # Compatible with FreeBSD13 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support diff --git a/sys/arm/conf/std.armv6 b/sys/arm/conf/std.armv6 index cdfb755eb9c2..47724f176f4a 100644 --- a/sys/arm/conf/std.armv6 +++ b/sys/arm/conf/std.armv6 @@ -52,6 +52,7 @@ options MAC # Support for Mandatory Access Control (MAC) options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options COMPAT_FREEBSD13 # Compatible with FreeBSD13 # DTrace support options KDTRACE_HOOKS # Kernel DTrace hooks diff --git a/sys/arm/conf/std.armv7 b/sys/arm/conf/std.armv7 index 7512bbaa2939..88c963643a25 100644 --- a/sys/arm/conf/std.armv7 +++ b/sys/arm/conf/std.armv7 @@ -52,6 +52,7 @@ options MAC # Support for Mandatory Access Control (MAC) options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options COMPAT_FREEBSD13 # Compatible with FreeBSD13 # DTrace support options KDTRACE_HOOKS # Kernel DTrace hooks diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64 index 599fd2aebeff..e5ed1d7db996 100644 --- a/sys/arm64/conf/std.arm64 +++ b/sys/arm64/conf/std.arm64 @@ -43,6 +43,7 @@ options EFIRT # EFI Runtime Services support options COMPAT_FREEBSD32 # Compatible with FreeBSD/arm options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options COMPAT_FREEBSD13 # Compatible with FreeBSD13 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support diff --git a/sys/conf/NOTES b/sys/conf/NOTES index a1f466a7a8b5..79fa149ad33f 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -365,6 +365,9 @@ options COMPAT_FREEBSD11 # Enable FreeBSD12 compatibility syscalls options COMPAT_FREEBSD12 +# Enable FreeBSD13 compatibility syscalls +options COMPAT_FREEBSD13 + # Enable Linux Kernel Programming Interface options COMPAT_LINUXKPI diff --git a/sys/conf/options b/sys/conf/options index a103ab85c1b9..58cb6458b656 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -100,6 +100,7 @@ COMPAT_FREEBSD9 opt_global.h COMPAT_FREEBSD10 opt_global.h 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 diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 5447c452c4f7..3b5a24a647c0 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -62,6 +62,7 @@ options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options COMPAT_FREEBSD13 # Compatible with FreeBSD13 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index 9d735dbb0580..0aa6dff54b50 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -61,6 +61,7 @@ options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options COMPAT_FREEBSD13 # Compatible with FreeBSD13 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support diff --git a/sys/mips/conf/JZ4780 b/sys/mips/conf/JZ4780 index 962334eeffda..df15d55b1d82 100644 --- a/sys/mips/conf/JZ4780 +++ b/sys/mips/conf/JZ4780 @@ -32,6 +32,7 @@ options BREAK_TO_DEBUGGER options COMPAT_FREEBSD10 options COMPAT_FREEBSD11 options COMPAT_FREEBSD12 +options COMPAT_FREEBSD13 options SCHED_4BSD #4BSD scheduler options INET #InterNETworking diff --git a/sys/mips/conf/X1000 b/sys/mips/conf/X1000 index 1b4ab45ce1e2..83bafd71ca4c 100644 --- a/sys/mips/conf/X1000 +++ b/sys/mips/conf/X1000 @@ -30,6 +30,7 @@ options BREAK_TO_DEBUGGER options COMPAT_FREEBSD10 options COMPAT_FREEBSD11 options COMPAT_FREEBSD12 +options COMPAT_FREEBSD13 options SCHED_4BSD #4BSD scheduler options INET #InterNETworking diff --git a/sys/mips/conf/std.BERI b/sys/mips/conf/std.BERI index 965754546d1a..4497d19eb391 100644 --- a/sys/mips/conf/std.BERI +++ b/sys/mips/conf/std.BERI @@ -32,6 +32,7 @@ options CAPABILITIES options COMPAT_FREEBSD10 options COMPAT_FREEBSD11 options COMPAT_FREEBSD12 +options COMPAT_FREEBSD13 options INTRNG options SCHED_ULE diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index cdf1266ec5a6..4897cfb6ae6c 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -69,6 +69,7 @@ options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options COMPAT_FREEBSD13 # Compatible with FreeBSD13 options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI options KTRACE #ktrace(1) syscall trace support options STACK #stack(9) support diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 93a130e07dc6..c6c8fc2eb00c 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -76,6 +76,7 @@ options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options COMPAT_FREEBSD13 # Compatible with FreeBSD13 options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI options KTRACE #ktrace(1) syscall trace support options STACK #stack(9) support diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index 6bd0c8154673..699ac9f16060 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -68,6 +68,7 @@ options GEOM_LABEL #Provides labelization #options COMPAT_FREEBSD32 #Compatible with FreeBSD/powerpcle binaries options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options COMPAT_FREEBSD13 # Compatible with FreeBSD13 options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI options KTRACE #ktrace(1) syscall trace support options STACK #stack(9) support diff --git a/sys/powerpc/conf/MPC85XX b/sys/powerpc/conf/MPC85XX index f68f3e6f5f75..0e806aed76a9 100644 --- a/sys/powerpc/conf/MPC85XX +++ b/sys/powerpc/conf/MPC85XX @@ -61,6 +61,7 @@ options WITNESS_SKIPSPIN options COMPAT_FREEBSD10 options COMPAT_FREEBSD11 options COMPAT_FREEBSD12 +options COMPAT_FREEBSD13 options HWPMC_HOOKS options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data diff --git a/sys/powerpc/conf/MPC85XXSPE b/sys/powerpc/conf/MPC85XXSPE index 553a616bb707..6445112af1d7 100644 --- a/sys/powerpc/conf/MPC85XXSPE +++ b/sys/powerpc/conf/MPC85XXSPE @@ -62,6 +62,7 @@ options WITNESS_SKIPSPIN options COMPAT_FREEBSD10 options COMPAT_FREEBSD11 options COMPAT_FREEBSD12 +options COMPAT_FREEBSD13 options HWPMC_HOOKS options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 28eb77ad4bc1..055574920bb5 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -53,6 +53,7 @@ options GEOM_PART_GPT # GUID Partition Tables. options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization options COMPAT_FREEBSD12 # Compatible with FreeBSD12 +options COMPAT_FREEBSD13 # Compatible with FreeBSD13 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support From nobody Wed Nov 17 06:21:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 82281188A329; Wed, 17 Nov 2021 06:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvCVQ0jPLz3KmS; Wed, 17 Nov 2021 06:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E58C61C0DD; Wed, 17 Nov 2021 06:21: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 1AH6L1OM039035; Wed, 17 Nov 2021 06:21:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH6L1Ns039034; Wed, 17 Nov 2021 06:21:01 GMT (envelope-from git) Date: Wed, 17 Nov 2021 06:21:01 GMT Message-Id: <202111170621.1AH6L1Ns039034@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: 8e492101ec04 - main - pf: add COMPAT_FREEBSD13 for DIOCKEEPCOUNTERS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8e492101ec04d939f4a657d812785c01c8e4986d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8e492101ec04d939f4a657d812785c01c8e4986d commit 8e492101ec04d939f4a657d812785c01c8e4986d Author: Kristof Provost AuthorDate: 2021-11-15 20:14:00 +0000 Commit: Kristof Provost CommitDate: 2021-11-17 02:09:20 +0000 pf: add COMPAT_FREEBSD13 for DIOCKEEPCOUNTERS DIOCKEEPCOUNTERS used to overlap with DIOCGIFSPEEDV0, which has been fixed in 14, but remains in stable/12 and stable/13. Support the old, overlapping, call under COMPAT_FREEBSD13. Reviewed by: jhb Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33001 --- sys/net/pfvar.h | 1 + sys/netpfil/pf/pf_ioctl.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index ab22b9c5f3a4..c9c3ab082c71 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1753,6 +1753,7 @@ struct pfioc_iface { #define DIOCGETSYNCOOKIES _IOWR('D', 94, struct pfioc_nv) #define DIOCSETSYNCOOKIES _IOWR('D', 95, struct pfioc_nv) #define DIOCKEEPCOUNTERS _IOWR('D', 96, struct pfioc_nv) +#define DIOCKEEPCOUNTERS_FREEBSD13 _IOWR('D', 92, struct pfioc_nv) struct pf_ifspeed_v0 { char ifname[IFNAMSIZ]; diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 727ebb0135f4..f5612f6d0084 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -4665,6 +4665,9 @@ DIOCCHANGEADDR_error: pf_kill_srcnodes((struct pfioc_src_node_kill *)addr); break; +#ifdef COMPAT_FREEBSD13 + case DIOCKEEPCOUNTERS_FREEBSD13: +#endif case DIOCKEEPCOUNTERS: error = pf_keepcounters((struct pfioc_nv *)addr); break; From nobody Wed Nov 17 06:21:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BD8C0188A423; Wed, 17 Nov 2021 06:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvCVR6BKxz3KxW; Wed, 17 Nov 2021 06:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 110971BF9F; Wed, 17 Nov 2021 06:21: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 1AH6L2ob039059; Wed, 17 Nov 2021 06:21:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH6L2j5039058; Wed, 17 Nov 2021 06:21:02 GMT (envelope-from git) Date: Wed, 17 Nov 2021 06:21:02 GMT Message-Id: <202111170621.1AH6L2j5039058@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: b6cbbcae40b4 - main - m_get3(): actually use the selected zone List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b6cbbcae40b49acdc6d1d368fc365c7a55c378b1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b6cbbcae40b49acdc6d1d368fc365c7a55c378b1 commit b6cbbcae40b49acdc6d1d368fc365c7a55c378b1 Author: Kristof Provost AuthorDate: 2021-11-16 19:47:37 +0000 Commit: Kristof Provost CommitDate: 2021-11-17 02:09:20 +0000 m_get3(): actually use the selected zone Reported by: markj --- sys/kern/kern_mbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index af00bf8182ac..88a3e84c558d 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -1428,7 +1428,7 @@ m_get3(int size, int how, short type, int flags) else zone = zone_jumbo16; - n = uma_zalloc_arg(zone_jumbop, m, how); + n = uma_zalloc_arg(zone, m, how); if (n == NULL) { m_free_raw(m); return (NULL); From nobody Wed Nov 17 09:09:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3D63C189B2CB; Wed, 17 Nov 2021 09:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvHDK65jDz3CsP; Wed, 17 Nov 2021 09:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97A091DD72; Wed, 17 Nov 2021 09:09: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 1AH995Su053603; Wed, 17 Nov 2021 09:09:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH9958u053602; Wed, 17 Nov 2021 09:09:05 GMT (envelope-from git) Date: Wed, 17 Nov 2021 09:09:05 GMT Message-Id: <202111170909.1AH9958u053602@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: dae1713419a6 - main - zfs: merge openzfs/zfs@269b5dadc (master) into main List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: dae1713419a669d4f6c7acddf81a21297c809741 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=dae1713419a669d4f6c7acddf81a21297c809741 commit dae1713419a669d4f6c7acddf81a21297c809741 Merge: b6cbbcae40b4 269b5dadcfd1 Author: Martin Matuska AuthorDate: 2021-11-17 08:35:14 +0000 Commit: Martin Matuska CommitDate: 2021-11-17 08:39:40 +0000 zfs: merge openzfs/zfs@269b5dadc (master) into main Notable upstream pull request merges: #12285 Introduce a tunable to exclude special class buffers from L2ARC #12689 Check l2cache vdevs pending list inside the vdev_inuse() #12735 Enable edonr in FreeBSD #12743 FreeBSD: fix world build after de198f2 #12745 Restore dirty dnode detection logic Obtained from: OpenZFS OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4 sys/contrib/openzfs/cmd/vdev_id/vdev_id | 11 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 52 ++++++- sys/contrib/openzfs/cmd/zed/zed.d/all-syslog.sh | 2 +- .../openzfs/cmd/zed/zed.d/generic-notify.sh | 2 +- sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 6 +- sys/contrib/openzfs/cmd/zhack/zhack.c | 171 ++++++++++++++++++++- sys/contrib/openzfs/cmd/zpool/zpool.d/dm-deps | 10 +- sys/contrib/openzfs/cmd/zpool/zpool.d/iostat | 6 +- sys/contrib/openzfs/cmd/zpool/zpool.d/lsblk | 2 +- sys/contrib/openzfs/cmd/zpool/zpool.d/media | 15 +- sys/contrib/openzfs/cmd/zpool/zpool.d/ses | 2 +- sys/contrib/openzfs/config/always-python.m4 | 2 +- sys/contrib/openzfs/config/always-pyzfs.m4 | 2 +- sys/contrib/openzfs/config/zfs-meta.m4 | 4 +- sys/contrib/openzfs/configure.ac | 1 + sys/contrib/openzfs/contrib/bpftrace/zfs-trace.sh | 3 +- .../dracut/02zfsexpandknowledge/module-setup.sh.in | 16 +- .../contrib/dracut/90zfs/module-setup.sh.in | 2 +- .../openzfs/contrib/dracut/90zfs/parse-zfs.sh.in | 2 +- .../contrib/dracut/90zfs/zfs-generator.sh.in | 2 +- sys/contrib/openzfs/contrib/initramfs/scripts/zfs | 11 +- sys/contrib/openzfs/etc/init.d/zfs-import.in | 3 +- sys/contrib/openzfs/etc/zfs/zfs-functions.in | 14 +- sys/contrib/openzfs/include/sys/arc.h | 1 + sys/contrib/openzfs/include/sys/dbuf.h | 11 +- sys/contrib/openzfs/include/sys/dmu_objset.h | 4 - sys/contrib/openzfs/include/sys/spa.h | 1 + sys/contrib/openzfs/include/sys/zio.h | 2 - sys/contrib/openzfs/man/man1/zhack.1 | 7 + sys/contrib/openzfs/man/man4/zfs.4 | 5 + sys/contrib/openzfs/man/man7/zfsprops.7 | 4 - sys/contrib/openzfs/man/man7/zpool-features.7 | 4 - sys/contrib/openzfs/module/Makefile.bsd | 6 + .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 21 ++- .../openzfs/module/zcommon/zfeature_common.c | 8 +- sys/contrib/openzfs/module/zcommon/zfs_prop.c | 14 -- sys/contrib/openzfs/module/zfs/arc.c | 12 ++ sys/contrib/openzfs/module/zfs/dbuf.c | 71 ++++++++- sys/contrib/openzfs/module/zfs/dmu.c | 2 +- sys/contrib/openzfs/module/zfs/dmu_objset.c | 34 +++- sys/contrib/openzfs/module/zfs/dnode.c | 2 +- sys/contrib/openzfs/module/zfs/spa.c | 21 ++- sys/contrib/openzfs/module/zfs/vdev_label.c | 23 ++- sys/contrib/openzfs/module/zfs/zio_checksum.c | 4 - sys/contrib/openzfs/rpm/generic/zfs-dkms.spec.in | 2 +- sys/contrib/openzfs/scripts/kmodtool | 2 +- sys/contrib/openzfs/scripts/zfs-tests.sh | 4 +- sys/contrib/openzfs/scripts/zfs.sh | 11 +- sys/contrib/openzfs/scripts/zimport.sh | 2 +- sys/contrib/openzfs/tests/runfiles/common.run | 13 +- sys/contrib/openzfs/tests/runfiles/linux.run | 4 - .../openzfs/tests/test-runner/bin/zts-report.py.in | 1 + .../openzfs/tests/zfs-tests/include/blkdev.shlib | 13 ++ .../openzfs/tests/zfs-tests/include/libtest.shlib | 8 +- .../tests/functional/checksum/Makefile.am | 4 +- .../tests/functional/checksum/default.cfg | 5 +- .../tests/functional/cli_root/Makefile.am | 1 + .../tests/functional/cli_root/zdb/Makefile.am | 1 + .../functional/cli_root/zdb/zdb_label_checksum.ksh | 78 ++++++++++ .../cli_root/zfs_set/checksum_001_pos.ksh | 5 +- .../tests/functional/cli_root/zhack/Makefile.am | 3 + .../cli_root/zhack/zhack_label_checksum.ksh | 64 ++++++++ .../cli_root/zpool_add/zpool_add_009_neg.ksh | 12 +- .../functional/cli_root/zpool_get/zpool_get.cfg | 9 +- .../functional/cli_user/zfs_list/zfs_list.kshlib | 19 +++ .../cli_user/zfs_list/zfs_list_004_neg.ksh | 10 +- .../functional/reservation/reservation_021_neg.ksh | 2 +- sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 69 files changed, 685 insertions(+), 192 deletions(-) diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_label_checksum.ksh index 000000000000,6cc1560418bc..6cc1560418bc mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_label_checksum.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_label_checksum.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zhack/Makefile.am index 000000000000,931dacde6beb..931dacde6beb mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zhack/Makefile.am +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zhack/Makefile.am diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zhack/zhack_label_checksum.ksh index 000000000000,67c7e7c4487d..67c7e7c4487d mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zhack/zhack_label_checksum.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zhack/zhack_label_checksum.ksh diff --cc sys/modules/zfs/zfs_config.h index a893f3431c85,000000000000..a680b5f49c92 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,864 -1,0 +1,864 @@@ +/* + * $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 */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 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 + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* 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_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* 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 queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* 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 */ + +/* 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 */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* 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 */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* 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 */ + +/* 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 */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* 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->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 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 */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* 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 */ + +/* 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 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* 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 */ + +/* 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 */ + +/* 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 */ + +/* 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 */ + +/* ->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_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 */ + +/* 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() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->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 */ + +/* 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 */ + +/* 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 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 */ + +/* xattr_handler->set() wants dentry */ +/* #undef HAVE_XATTR_SET_DENTRY */ + +/* xattr_handler->set() wants both dentry and inode */ +/* #undef HAVE_XATTR_SET_DENTRY_INODE */ + +/* xattr_handler->set() wants xattr_handler */ +/* #undef HAVE_XATTR_SET_HANDLER */ + +/* xattr_handler->set() takes user_namespace */ +/* #undef HAVE_XATTR_SET_USERNS */ + +/* Define if you have [z] */ +#define HAVE_ZLIB 1 + +/* __posix_acl_chmod() exists */ +/* #undef HAVE___POSIX_ACL_CHMOD */ + +/* kernel exports FPU functions */ +/* #undef KERNEL_EXPORTS_X86_FPU */ + +/* TBD: fetch(3) support */ +#if 0 +/* whether the chosen libfetch is to be loaded at run-time */ +#define LIBFETCH_DYNAMIC 1 + +/* libfetch is fetch(3) */ +#define LIBFETCH_IS_FETCH 1 + +/* libfetch is libcurl */ +#define LIBFETCH_IS_LIBCURL 0 + +/* soname of chosen libfetch */ +#define LIBFETCH_SONAME "libfetch.so.6" +#endif + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* make_request_fn() return type */ +/* #undef MAKE_REQUEST_FN_RET */ + +/* hardened module_param_call */ +/* #undef MODULE_PARAM_CALL_CONST */ + +/* struct shrink_control has nid */ +/* #undef SHRINK_CONTROL_HAS_NID */ + +/* Defined for legacy compatibility. */ +#define SPL_META_ALIAS ZFS_META_ALIAS + +/* Defined for legacy compatibility. */ +#define SPL_META_RELEASE ZFS_META_RELEASE + +/* Defined for legacy compatibility. */ +#define SPL_META_VERSION ZFS_META_VERSION + +/* True if ZFS is to be compiled for a FreeBSD system */ +#define SYSTEM_FREEBSD 1 + +/* True if ZFS is to be compiled for a Linux system */ +/* #undef SYSTEM_LINUX */ + +/* zfs debugging enabled */ +/* #undef ZFS_DEBUG */ + +/* /dev/zfs minor */ +/* #undef ZFS_DEVICE_MINOR */ + +/* enum node_stat_item contains NR_FILE_PAGES */ +/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES */ + +/* enum node_stat_item contains NR_INACTIVE_ANON */ +/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON */ + +/* enum node_stat_item contains NR_INACTIVE_FILE */ +/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE */ + +/* enum zone_stat_item contains NR_FILE_PAGES */ +/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_FILE_PAGES */ + +/* enum zone_stat_item contains NR_INACTIVE_ANON */ +/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_ANON */ + +/* enum zone_stat_item contains NR_INACTIVE_FILE */ +/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_FILE */ + +/* global_node_page_state() exists */ +/* #undef ZFS_GLOBAL_NODE_PAGE_STATE */ + +/* global_zone_page_state() exists */ +/* #undef ZFS_GLOBAL_ZONE_PAGE_STATE */ + +/* Define to 1 if GPL-only symbols can be used */ +/* #undef ZFS_IS_GPL_COMPATIBLE */ + +/* Define the project alias string. */ - #define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g6c8f03232" ++#define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g269b5dadc" + +/* Define the project author. */ +#define ZFS_META_AUTHOR "OpenZFS" + +/* Define the project release date. */ +/* #undef ZFS_META_DATA */ + +/* Define the maximum compatible kernel version. */ +#define ZFS_META_KVER_MAX "5.14" + +/* Define the minimum compatible kernel version. */ +#define ZFS_META_KVER_MIN "3.10" + +/* Define the project license. */ +#define ZFS_META_LICENSE "CDDL" + +/* Define the libtool library 'age' version information. */ +/* #undef ZFS_META_LT_AGE */ + +/* Define the libtool library 'current' version information. */ +/* #undef ZFS_META_LT_CURRENT */ + +/* Define the libtool library 'revision' version information. */ +/* #undef ZFS_META_LT_REVISION */ + +/* Define the project name. */ +#define ZFS_META_NAME "zfs" + +/* Define the project release. */ - #define ZFS_META_RELEASE "FreeBSD_g6c8f03232" ++#define ZFS_META_RELEASE "FreeBSD_g269b5dadc" + +/* Define the project version. */ +#define ZFS_META_VERSION "2.1.99" + +/* count is located in percpu_ref.data */ +/* #undef ZFS_PERCPU_REF_COUNT_IN_DATA */ + diff --cc sys/modules/zfs/zfs_gitrev.h index 20123ea30655,000000000000..d8d9df0110ad mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_gitrev.h +++ b/sys/modules/zfs/zfs_gitrev.h @@@ -1,5 -1,0 +1,5 @@@ *** 6 LINES SKIPPED *** From nobody Wed Nov 17 09:24:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4486F18A4480 for ; Wed, 17 Nov 2021 09:24:27 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvHZ31008z3L8n for ; Wed, 17 Nov 2021 09:24:27 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-lf1-x12a.google.com with SMTP id b1so5485068lfs.13 for ; Wed, 17 Nov 2021 01:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=12SbY2q/LBMh+FxmZTs2Uuo5hI0C7ZFepcHE2Dxxs08=; b=7LNujxAfYDoJ7+xqUd+Pnv8uTqi6bKTylrKeFFNgDuq+b27aGijFKW7zsZEOswMFIu 2Vlo8zxe019bolqmTBQf7p5x4ub7GBiQjvVoq/uq4EcGdq3txcK9CAMpBHUG1DvtwG8X 1Jd0JyJ9AEg/BBq5J0KI90JSkKhnCSMvElCanj7yjqIkuW2G1eI87yu8BsPL5UHVrNUA uxTBKN/4LHgX6jJJ5VLf8cC2N992AI8LlyOwbGHPF3HIrSgr8zZaVj0+P85e3Gfq83J9 xcGjAMBofywAwyDScLwzReO1foJUK/kBj6Xvtnr2FTKLSyWVD9/LzpL1dyY099w5XdAM IoVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=12SbY2q/LBMh+FxmZTs2Uuo5hI0C7ZFepcHE2Dxxs08=; b=bG78yJ2mmEhQ8MmrDBpl8B1IdIdkxjp7fvBt7B0AjPWtCYFMmeXwKMzFvNGmWHXiyI hOSart0MG1pcWDy629vS569XYDWSpe8n7ttMNjqw3Koa8SD9fwQD+dZqYCnd3zBjarQh GGP81GtImMPyQrRSJeDEp7u8RrdFBh7K5t7v0Tk2kaf6EpTuu7/0O+RlzF1eJhzjaph3 w0VOmUoF5FuFw5DtMcBDRKedqajjsy4/eTr/ETkTH4o9tz1C0Gadiyrv4m5w2rsgo3qF yoeKHuQAZVOVdh6JXDBavvXllRPHAylijeZ3Ti8S6rwqeGkUNiCQ4a0+PAq9WmLdwh1K vwwQ== X-Gm-Message-State: AOAM533/QJOtLBxeTp+rXCuPmlZPKsuWUVEM8wOPO+SL/tfCXTOxriIH LTfdU76pMvLtIO1F9W0CZ7PGkr6q/Gb4yk6nlJVDDRmRjDA= X-Google-Smtp-Source: ABdhPJwpz4FBGR6F2F0E/keJAAXAar1b8scH0FZ7oFr1XIWJ7GAVJabRd8TbVggwZ1+QfCEIo1+xIuxG734NshI5HTE= X-Received: by 2002:a05:6512:689:: with SMTP id t9mr14039628lfe.614.1637141060069; Wed, 17 Nov 2021 01:24:20 -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: <202111170909.1AH9958u053602@gitrepo.freebsd.org> In-Reply-To: <202111170909.1AH9958u053602@gitrepo.freebsd.org> From: Marcin Wojtas Date: Wed, 17 Nov 2021 10:24:11 +0100 Message-ID: Subject: Re: git: dae1713419a6 - main - zfs: merge openzfs/zfs@269b5dadc (master) into main To: Martin Matuska Cc: src-committers , 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: 4HvHZ31008z3L8n X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, Thank you for the update. =C5=9Br., 17 lis 2021 o 10:09 Martin Matuska napisa=C5=82(= a): > > The branch main has been updated by mm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Ddae1713419a669d4f6c7acddf8= 1a21297c809741 > > commit dae1713419a669d4f6c7acddf81a21297c809741 > Merge: b6cbbcae40b4 269b5dadcfd1 > Author: Martin Matuska > AuthorDate: 2021-11-17 08:35:14 +0000 > Commit: Martin Matuska > CommitDate: 2021-11-17 08:39:40 +0000 > > zfs: merge openzfs/zfs@269b5dadc (master) into main > > Notable upstream pull request merges: > #12285 Introduce a tunable to exclude special class buffers from L2= ARC > #12689 Check l2cache vdevs pending list inside the vdev_inuse() > #12735 Enable edonr in FreeBSD > #12743 FreeBSD: fix world build after de198f2 > #12745 Restore dirty dnode detection logic > > Obtained from: OpenZFS > OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4 > I have one question to make sure about the guidelines for future. I've been using ZFS on my arm64 machine for a while (a HEAD snapshot from ~July + custom newer kernels for development) - after trying the vanilla kernel after Nov 10 OpenZFS update I could no longer access the root partition (even after returning back to the kernel that had previously worked). I repeated the same thing with Nov 4 snapshot: - Install system with ZFS - Try kernel binary with updated OpenZFS - lose access to root partition. Is such behavior expected? If yes, is it recommended for the ZFS case to use kernel and the world only from the same baseline? Best regards, Marcin > sys/contrib/openzfs/cmd/vdev_id/vdev_id | 11 +- > sys/contrib/openzfs/cmd/zdb/zdb.c | 52 ++++++- > sys/contrib/openzfs/cmd/zed/zed.d/all-syslog.sh | 2 +- > .../openzfs/cmd/zed/zed.d/generic-notify.sh | 2 +- > sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 6 +- > sys/contrib/openzfs/cmd/zhack/zhack.c | 171 +++++++++++++++= +++++- > sys/contrib/openzfs/cmd/zpool/zpool.d/dm-deps | 10 +- > sys/contrib/openzfs/cmd/zpool/zpool.d/iostat | 6 +- > sys/contrib/openzfs/cmd/zpool/zpool.d/lsblk | 2 +- > sys/contrib/openzfs/cmd/zpool/zpool.d/media | 15 +- > sys/contrib/openzfs/cmd/zpool/zpool.d/ses | 2 +- > sys/contrib/openzfs/config/always-python.m4 | 2 +- > sys/contrib/openzfs/config/always-pyzfs.m4 | 2 +- > sys/contrib/openzfs/config/zfs-meta.m4 | 4 +- > sys/contrib/openzfs/configure.ac | 1 + > sys/contrib/openzfs/contrib/bpftrace/zfs-trace.sh | 3 +- > .../dracut/02zfsexpandknowledge/module-setup.sh.in | 16 +- > .../contrib/dracut/90zfs/module-setup.sh.in | 2 +- > .../openzfs/contrib/dracut/90zfs/parse-zfs.sh.in | 2 +- > .../contrib/dracut/90zfs/zfs-generator.sh.in | 2 +- > sys/contrib/openzfs/contrib/initramfs/scripts/zfs | 11 +- > sys/contrib/openzfs/etc/init.d/zfs-import.in | 3 +- > sys/contrib/openzfs/etc/zfs/zfs-functions.in | 14 +- > sys/contrib/openzfs/include/sys/arc.h | 1 + > sys/contrib/openzfs/include/sys/dbuf.h | 11 +- > sys/contrib/openzfs/include/sys/dmu_objset.h | 4 - > sys/contrib/openzfs/include/sys/spa.h | 1 + > sys/contrib/openzfs/include/sys/zio.h | 2 - > sys/contrib/openzfs/man/man1/zhack.1 | 7 + > sys/contrib/openzfs/man/man4/zfs.4 | 5 + > sys/contrib/openzfs/man/man7/zfsprops.7 | 4 - > sys/contrib/openzfs/man/man7/zpool-features.7 | 4 - > sys/contrib/openzfs/module/Makefile.bsd | 6 + > .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 21 ++- > .../openzfs/module/zcommon/zfeature_common.c | 8 +- > sys/contrib/openzfs/module/zcommon/zfs_prop.c | 14 -- > sys/contrib/openzfs/module/zfs/arc.c | 12 ++ > sys/contrib/openzfs/module/zfs/dbuf.c | 71 ++++++++- > sys/contrib/openzfs/module/zfs/dmu.c | 2 +- > sys/contrib/openzfs/module/zfs/dmu_objset.c | 34 +++- > sys/contrib/openzfs/module/zfs/dnode.c | 2 +- > sys/contrib/openzfs/module/zfs/spa.c | 21 ++- > sys/contrib/openzfs/module/zfs/vdev_label.c | 23 ++- > sys/contrib/openzfs/module/zfs/zio_checksum.c | 4 - > sys/contrib/openzfs/rpm/generic/zfs-dkms.spec.in | 2 +- > sys/contrib/openzfs/scripts/kmodtool | 2 +- > sys/contrib/openzfs/scripts/zfs-tests.sh | 4 +- > sys/contrib/openzfs/scripts/zfs.sh | 11 +- > sys/contrib/openzfs/scripts/zimport.sh | 2 +- > sys/contrib/openzfs/tests/runfiles/common.run | 13 +- > sys/contrib/openzfs/tests/runfiles/linux.run | 4 - > .../openzfs/tests/test-runner/bin/zts-report.py.in | 1 + > .../openzfs/tests/zfs-tests/include/blkdev.shlib | 13 ++ > .../openzfs/tests/zfs-tests/include/libtest.shlib | 8 +- > .../tests/functional/checksum/Makefile.am | 4 +- > .../tests/functional/checksum/default.cfg | 5 +- > .../tests/functional/cli_root/Makefile.am | 1 + > .../tests/functional/cli_root/zdb/Makefile.am | 1 + > .../functional/cli_root/zdb/zdb_label_checksum.ksh | 78 ++++++++++ > .../cli_root/zfs_set/checksum_001_pos.ksh | 5 +- > .../tests/functional/cli_root/zhack/Makefile.am | 3 + > .../cli_root/zhack/zhack_label_checksum.ksh | 64 ++++++++ > .../cli_root/zpool_add/zpool_add_009_neg.ksh | 12 +- > .../functional/cli_root/zpool_get/zpool_get.cfg | 9 +- > .../functional/cli_user/zfs_list/zfs_list.kshlib | 19 +++ > .../cli_user/zfs_list/zfs_list_004_neg.ksh | 10 +- > .../functional/reservation/reservation_021_neg.ksh | 2 +- > sys/modules/zfs/zfs_config.h | 4 +- > sys/modules/zfs/zfs_gitrev.h | 2 +- > 69 files changed, 685 insertions(+), 192 deletions(-) > > diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/z= db/zdb_label_checksum.ksh > index 000000000000,6cc1560418bc..6cc1560418bc > mode 000000,100755..100755 > --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/z= db_label_checksum.ksh > +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/z= db_label_checksum.ksh > diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/z= hack/Makefile.am > index 000000000000,931dacde6beb..931dacde6beb > mode 000000,100644..100644 > --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zhack= /Makefile.am > +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zhack= /Makefile.am > diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/z= hack/zhack_label_checksum.ksh > index 000000000000,67c7e7c4487d..67c7e7c4487d > mode 000000,100755..100755 > --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zhack= /zhack_label_checksum.ksh > +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zhack= /zhack_label_checksum.ksh > diff --cc sys/modules/zfs/zfs_config.h > index a893f3431c85,000000000000..a680b5f49c92 > mode 100644,000000..100644 > --- a/sys/modules/zfs/zfs_config.h > +++ b/sys/modules/zfs/zfs_config.h > @@@ -1,864 -1,0 +1,864 @@@ > +/* > + * $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 */ > + > +/* Define if host toolchain supports AES */ > +#define HAVE_AES 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 > + > +/* bdev_check_media_change() exists */ > +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ > + > +/* bdev_whole() is available */ > +/* #undef HAVE_BDEV_WHOLE */ > + > +/* 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_op_attrs is available */ > +/* #undef HAVE_BIO_SET_OP_ATTRS */ > + > +/* 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 queue backing_dev_info is dynamic */ > +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ > + > +/* 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 CFPreferencesCopyAppVa= lue 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 preinst= alled. > + */ > +/* #undef HAVE_DCGETTEXT */ > + > +/* DECLARE_EVENT_CLASS() is available */ > +/* #undef HAVE_DECLARE_EVENT_CLASS */ > + > +/* 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 */ > + > +/* fops->aio_fsync() exists */ > +/* #undef HAVE_FILE_AIO_FSYNC */ > + > +/* file_dentry() is available */ > +/* #undef HAVE_FILE_DENTRY */ > + > +/* 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 */ > + > +/* fops->fsync() with range */ > +/* #undef HAVE_FSYNC_RANGE */ > + > +/* fops->fsync() without dentry */ > +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ > + > +/* 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 preinstal= led. */ > +/* #undef HAVE_GETTEXT */ > + > +/* iops->get_acl() exists */ > +/* #undef HAVE_GET_ACL */ > + > +/* iops->get_acl() takes rcu */ > +/* #undef HAVE_GET_ACL_RCU */ > + > +/* 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 */ > + > +/* Define if you have the iconv() function and it works. */ > +#define HAVE_ICONV 1 > + > +/* 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->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 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 */ > + > +/* uncached_acl_sentinel() exists */ > +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ > + > +/* 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 */ > + > +/* 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 */ > + > +/* Define to 1 if you have the header file. */ > +#define HAVE_MEMORY_H 1 > + > +/* 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 */ > + > +/* 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 */ > + > +/* 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 */ > + > +/* 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 */ > + > +/* ->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_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 */ > + > +/* 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() 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' functio= n. */ > +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ > + > +/* kernel has __kernel_fpu_* functions */ > +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ > + > +/* Define to 1 if you have the header file. */ > +#define HAVE_UNISTD_H 1 > + > +/* iops->getattr() takes struct user_namespace* */ > +/* #undef HAVE_USERNS_IOPS_GETATTR */ > + > +/* iops->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 */ > + > +/* 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 */ > + > +/* 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 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 */ > + > +/* xattr_handler->set() wants dentry */ > +/* #undef HAVE_XATTR_SET_DENTRY */ > + > +/* xattr_handler->set() wants both dentry and inode */ > +/* #undef HAVE_XATTR_SET_DENTRY_INODE */ > + > +/* xattr_handler->set() wants xattr_handler */ > +/* #undef HAVE_XATTR_SET_HANDLER */ > + > +/* xattr_handler->set() takes user_namespace */ > +/* #undef HAVE_XATTR_SET_USERNS */ > + > +/* Define if you have [z] */ > +#define HAVE_ZLIB 1 > + > +/* __posix_acl_chmod() exists */ > +/* #undef HAVE___POSIX_ACL_CHMOD */ > + > +/* kernel exports FPU functions */ > +/* #undef KERNEL_EXPORTS_X86_FPU */ > + > +/* TBD: fetch(3) support */ > +#if 0 > +/* whether the chosen libfetch is to be loaded at run-time */ > +#define LIBFETCH_DYNAMIC 1 > + > +/* libfetch is fetch(3) */ > +#define LIBFETCH_IS_FETCH 1 > + > +/* libfetch is libcurl */ > +#define LIBFETCH_IS_LIBCURL 0 > + > +/* soname of chosen libfetch */ > +#define LIBFETCH_SONAME "libfetch.so.6" > +#endif > + > +/* Define to the sub-directory where libtool stores uninstalled librari= es. */ > +#define LT_OBJDIR ".libs/" > + > +/* make_request_fn() return type */ > +/* #undef MAKE_REQUEST_FN_RET */ > + > +/* hardened module_param_call */ > +/* #undef MODULE_PARAM_CALL_CONST */ > + > +/* struct shrink_control has nid */ > +/* #undef SHRINK_CONTROL_HAS_NID */ > + > +/* Defined for legacy compatibility. */ > +#define SPL_META_ALIAS ZFS_META_ALIAS > + > +/* Defined for legacy compatibility. */ > +#define SPL_META_RELEASE ZFS_META_RELEASE > + > +/* Defined for legacy compatibility. */ > +#define SPL_META_VERSION ZFS_META_VERSION > + > +/* True if ZFS is to be compiled for a FreeBSD system */ > +#define SYSTEM_FREEBSD 1 > + > +/* True if ZFS is to be compiled for a Linux system */ > +/* #undef SYSTEM_LINUX */ > + > +/* zfs debugging enabled */ > +/* #undef ZFS_DEBUG */ > + > +/* /dev/zfs minor */ > +/* #undef ZFS_DEVICE_MINOR */ > + > +/* enum node_stat_item contains NR_FILE_PAGES */ > +/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES */ > + > +/* enum node_stat_item contains NR_INACTIVE_ANON */ > +/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON */ > + > +/* enum node_stat_item contains NR_INACTIVE_FILE */ > +/* #undef ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE */ > + > +/* enum zone_stat_item contains NR_FILE_PAGES */ > +/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_FILE_PAGES */ > + > +/* enum zone_stat_item contains NR_INACTIVE_ANON */ > +/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_ANON */ > + > +/* enum zone_stat_item contains NR_INACTIVE_FILE */ > +/* #undef ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_FILE */ > + > +/* global_node_page_state() exists */ > +/* #undef ZFS_GLOBAL_NODE_PAGE_STATE */ > + > +/* global_zone_page_state() exists */ > +/* #undef ZFS_GLOBAL_ZONE_PAGE_STATE */ > + > +/* Define to 1 if GPL-only symbols can be used */ > +/* #undef ZFS_IS_GPL_COMPATIBLE */ > + > +/* Define the project alias string. */ > - #define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g6c8f03232" > ++#define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g269b5dadc" > + > +/* Define the project author. */ > +#define ZFS_META_AUTHOR "OpenZFS" > + > +/* Define the project release date. */ > +/* #undef ZFS_META_DATA */ > + > +/* Define the maximum compatible kernel version. */ > +#define ZFS_META_KVER_MAX "5.14" > + > +/* Define the minimum compatible kernel version. */ > +#define ZFS_META_KVER_MIN "3.10" > + > +/* Define the project license. */ > +#define ZFS_META_LICENSE "CDDL" > + > +/* Define the libtool library 'age' version information. */ > +/* #undef ZFS_META_LT_AGE */ > + > +/* Define the libtool library 'current' version information. */ > +/* #undef ZFS_META_LT_CURRENT */ > + > +/* Define the libtool library 'revision' version information. */ > +/* #undef ZFS_META_LT_REVISION */ > + > +/* Define the project name. */ > +#define ZFS_META_NAME "zfs" > + > +/* Define the project release. */ > - #define ZFS_META_RELEASE "FreeBSD_g6c8f03232" > ++#define ZFS_META_RELEASE "FreeBSD_g269b5dadc" > + > +/* Define the project version. */ > +#define ZFS_META_VERSION "2.1.99" > + > +/* count is located in percpu_ref.data */ > +/* #undef ZFS_PERCPU_REF_COUNT_IN_DATA */ > + > diff --cc sys/modules/zfs/zfs_gitrev.h > index 20123ea30655,000000000000..d8d9df0110ad > mode 100644,000000..100644 > --- a/sys/modules/zfs/zfs_gitrev.h > +++ b/sys/modules/zfs/zfs_gitrev.h > @@@ -1,5 -1,0 +1,5 @@@ > *** 6 LINES SKIPPED *** From nobody Wed Nov 17 11:43:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1DE08189FF94; Wed, 17 Nov 2021 11:40:29 +0000 (UTC) (envelope-from thj@freebsd.org) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.3 with cipher TLS_AES_256_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 4HvLb106Lpz4q05; Wed, 17 Nov 2021 11:40:29 +0000 (UTC) (envelope-from thj@freebsd.org) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CE38E5C0114; Wed, 17 Nov 2021 06:40:28 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 17 Nov 2021 06:40:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=ZucQ2lqVLG72Xi4X3wU7QYg1+3w2/XJkwXXOik1MJ ls=; b=dbyNXc7LG+VaZnpEdcN0hD8fmphPKrDokDeTuIWXrszcGHfphjM1IwURu L4IS7OZ9KGgGH1yorKhANWdimZB9/Q6rZx2mEWUATRj6+BNMZYH5QtnbWGesH+ow mukHCcCobLt02sLzUMTPxsDuCD7Ek4cnhmR8aIKc8U36d/Yv2Bu2iDG01T9++UUo y8nEOffPhX55mkvN7XpMHQnAzHGP1g7iRVRggVcpf66rkqTEpPo4IvqDbIDaZhAz 60/jUaDvTqFlr1qRO0olbYcsebTGFwjuDRcPys476zXosLpNUSiLImNUcxKzCNXs iVrqMx4g4+Ba5aOf8HUkw5yfkWHRw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrfeeggddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggugfgjsehtkeertddttdejnecuhfhrohhmpefvohhmucfl ohhnvghsuceothhhjhesfhhrvggvsghsugdrohhrgheqnecuggftrfgrthhtvghrnhepje ejfefhhfegkeefueduudffkedukedvleejuedukeffudeukeduuedtudejleeknecuffho mhgrihhnpehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepthhhjhesfhhrvggvsghsugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Nov 2021 06:40:27 -0500 (EST) Date: Wed, 17 Nov 2021 11:43:18 +0000 From: Tom Jones To: Marcin Wojtas Cc: Martin Matuska , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: dae1713419a6 - main - zfs: merge openzfs/zfs@269b5dadc (master) into main Message-ID: <20211117114318.GC17668@tom-desk.erg.abdn.ac.uk> References: <202111170909.1AH9958u053602@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: 4HvLb106Lpz4q05 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 17, 2021 at 10:24:11AM +0100, Marcin Wojtas wrote: > Hi, > > Thank you for the update. > > Å›r., 17 lis 2021 o 10:09 Martin Matuska napisaÅ‚(a): > > > > The branch main has been updated by mm: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=dae1713419a669d4f6c7acddf81a21297c809741 > > > > commit dae1713419a669d4f6c7acddf81a21297c809741 > > Merge: b6cbbcae40b4 269b5dadcfd1 > > Author: Martin Matuska > > AuthorDate: 2021-11-17 08:35:14 +0000 > > Commit: Martin Matuska > > CommitDate: 2021-11-17 08:39:40 +0000 > > > > zfs: merge openzfs/zfs@269b5dadc (master) into main > > > > Notable upstream pull request merges: > > #12285 Introduce a tunable to exclude special class buffers from L2ARC > > #12689 Check l2cache vdevs pending list inside the vdev_inuse() > > #12735 Enable edonr in FreeBSD > > #12743 FreeBSD: fix world build after de198f2 > > #12745 Restore dirty dnode detection logic > > > > Obtained from: OpenZFS > > OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4 > > > > I have one question to make sure about the guidelines for future. I've > been using ZFS on my arm64 machine for a while (a HEAD snapshot from > ~July + custom newer kernels for development) - after trying the > vanilla kernel after Nov 10 OpenZFS update I could no longer access > the root partition (even after returning back to the kernel that had > previously worked). > > I repeated the same thing with Nov 4 snapshot: > - Install system with ZFS > - Try kernel binary with updated OpenZFS - lose access to root partition. > > Is such behavior expected? If yes, is it recommended for the ZFS case > to use kernel and the world only from the same baseline? > > Best regards, > Marcin I don't know if this is related, but I just updated from the 4th November snapshot to this commit and my zfs on root box can't mount root. Annoyingly I haven't time to debug right now. - Tom From nobody Wed Nov 17 11:48:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 88A6518A343B; Wed, 17 Nov 2021 11:48:40 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mail.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 4HvLmR6d4Bz4s13; Wed, 17 Nov 2021 11:48:39 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1637149712; 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=6CC8qTUN2zEc0Z4uMrYk5nhgKsJ2d15kG2nhybNpCjE=; b=jKzE9tnP+SEjqx5eAvzy5np8F41grDP90JZ9Gjy59Xa+q8V2nGpbn5njoTYdzfgXXGOOP4 NF/vi/5EQ70qXcgA6Eo7SS8aYRl3iDGpUu52Wi/BQH9NdBJMsivEl7kGvHdy5B0E5ihWV5 AGRze3o2V6i3yKAFUxuqqzq3cPghHYM= Received: from skull.home.blih.net (lfbn-idf2-1-1163-183.w90-92.abo.wanadoo.fr [90.92.222.183]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 4d67f845 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 17 Nov 2021 11:48:32 +0000 (UTC) Date: Wed, 17 Nov 2021 12:48:29 +0100 From: Emmanuel Vadot To: Tom Jones Cc: Marcin Wojtas , Martin Matuska , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: dae1713419a6 - main - zfs: merge openzfs/zfs@269b5dadc (master) into main Message-Id: <20211117124829.8b80d2d0dd308b940b1dd481@bidouilliste.com> In-Reply-To: <20211117114318.GC17668@tom-desk.erg.abdn.ac.uk> References: <202111170909.1AH9958u053602@gitrepo.freebsd.org> <20211117114318.GC17668@tom-desk.erg.abdn.ac.uk> 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: 4HvLmR6d4Bz4s13 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 17 Nov 2021 11:43:18 +0000 Tom Jones wrote: > On Wed, Nov 17, 2021 at 10:24:11AM +0100, Marcin Wojtas wrote: > > Hi, > >=20 > > Thank you for the update. > >=20 > > ?r., 17 lis 2021 o 10:09 Martin Matuska napisa?(a): > > > > > > The branch main has been updated by mm: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Ddae1713419a669d4f6c7ac= ddf81a21297c809741 > > > > > > commit dae1713419a669d4f6c7acddf81a21297c809741 > > > Merge: b6cbbcae40b4 269b5dadcfd1 > > > Author: Martin Matuska > > > AuthorDate: 2021-11-17 08:35:14 +0000 > > > Commit: Martin Matuska > > > CommitDate: 2021-11-17 08:39:40 +0000 > > > > > > zfs: merge openzfs/zfs@269b5dadc (master) into main > > > > > > Notable upstream pull request merges: > > > #12285 Introduce a tunable to exclude special class buffers fro= m L2ARC > > > #12689 Check l2cache vdevs pending list inside the vdev_inuse() > > > #12735 Enable edonr in FreeBSD > > > #12743 FreeBSD: fix world build after de198f2 > > > #12745 Restore dirty dnode detection logic > > > > > > Obtained from: OpenZFS > > > OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4 > > > > >=20 > > I have one question to make sure about the guidelines for future. I've > > been using ZFS on my arm64 machine for a while (a HEAD snapshot from > > ~July + custom newer kernels for development) - after trying the > > vanilla kernel after Nov 10 OpenZFS update I could no longer access > > the root partition (even after returning back to the kernel that had > > previously worked). > >=20 > > I repeated the same thing with Nov 4 snapshot: > > - Install system with ZFS > > - Try kernel binary with updated OpenZFS - lose access to root partitio= n. > >=20 > > Is such behavior expected? If yes, is it recommended for the ZFS case > > to use kernel and the world only from the same baseline? > >=20 > > Best regards, > > Marcin >=20 > I don't know if this is related, but I just updated from the 4th > November snapshot to this commit and my zfs on root box can't mount > root. >=20 > Annoyingly I haven't time to debug right now. >=20 > - Tom I had this problem recently and didn't had much time to debug but what I know is that it's related to recent addition of counter which adds some SYSINIT. I think that something in the zfs code isn't setup properly wrt order and breaks sometimes when SYSINIT are re-arranged by a new compile. To confirm this just remove a few drivers from GENERIC that you don't use (I've removed stuff like nfs* which adds a lot of SYSINITs) and boot with debug.verbose_sysinit=3D1 to compare with a working kernel. Also on my side typing '?' at mountroot listed the zfs pool so if it's the same for you that might be the same problem as mine (of course selecting the pool at mountroot didn't worked). Cheers, --=20 Emmanuel Vadot From nobody Wed Nov 17 11:59:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 96FC61850D69 for ; Wed, 17 Nov 2021 11:59:58 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) (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 4HvM1T6mCBz3Bms for ; Wed, 17 Nov 2021 11:59:57 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-lf1-x12c.google.com with SMTP id t26so7125704lfk.9 for ; Wed, 17 Nov 2021 03:59:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=BkayvgvaUp74XCAX8lVdu0IF7IRAhiJZ8FNzjwFq0lk=; b=Nn93ATqu4GBhQ7lcnEh6EOYoQC2ieHAtbdiNRis9JOxWaXLySrjptGxsJ/izIdTzFR HVTNE7L+dM6uYhXWydvBQFgrr3aqTc+F3tO9aDAXSNo1cIVVeTq66FGHcabV2dzGwmSu gSyv9JO1M6CWRPyVDQAu1nwCTnczDRvMiRJtRN7uJ93rE/A3C+Q75BWkdyy+VQ6icfSq oBnPBhxK32EFCU+/KKn+mvLGGRbki8F5Ln7So96kTGF7kYu19NfUEBqgBoN6TzrG9Uwn m9zop+jw6hZ7h8OEG5lSypwt7tqj9nrKWQINK+poP33VIIkBxxFChFxhsji9trwZoSvX OvqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=BkayvgvaUp74XCAX8lVdu0IF7IRAhiJZ8FNzjwFq0lk=; b=7WRtxXVoma6OcsBCNHF7gjJA0CBtkZhiRlOF03IxC3pJT0+4WuBvO1/J3XNfZOETOW JODlkKvzGnl4NqwXebo1Ct0M1Jgt+BNoVoTTrM6HXYuJS9ycOl7Y/RemIu3iSKI8caCZ 66BolzfxbKYRhfIembcX54MN4a4jaQSY6cYpWgXDVdhiRVxFhQuO2NUyavmwnAU5iWoi 8l5ZFe4S4q3czkj9L8+fw4RblVxzdRgnSBLCxcIhW7+MKUifSlNL/GXoO7feBB/wTCg/ OTzs+ucgFmFUVPXV0JFm9KJIsCD4y+snttgO4Cho/GXd1jgdqE5B0yJ195EKJDTmTvNi 24eA== X-Gm-Message-State: AOAM533aq7EQCtu4JVrCQgNkWKw0XaqxVAZ4kZ4637bR2FXH/9Al2HtE InC6wLtzMa/J43N7GNZW4y6SVCfQuPIDrTCWdQGBWA== X-Google-Smtp-Source: ABdhPJwCUtPAKki2ZZxlKQBt5sM8kF0Gzzw4OQfbIbBQe5Ft6aZSCQLTwS94AQAQUCzOLoDHTcbYCC73jjA2K8P9ZGw= X-Received: by 2002:a2e:8906:: with SMTP id d6mr7166921lji.454.1637150396572; Wed, 17 Nov 2021 03:59:56 -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: <202111170909.1AH9958u053602@gitrepo.freebsd.org> <20211117114318.GC17668@tom-desk.erg.abdn.ac.uk> <20211117124829.8b80d2d0dd308b940b1dd481@bidouilliste.com> In-Reply-To: <20211117124829.8b80d2d0dd308b940b1dd481@bidouilliste.com> From: Marcin Wojtas Date: Wed, 17 Nov 2021 12:59:44 +0100 Message-ID: Subject: Re: git: dae1713419a6 - main - zfs: merge openzfs/zfs@269b5dadc (master) into main To: Emmanuel Vadot Cc: Tom Jones , Martin Matuska , src-committers , 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: 4HvM1T6mCBz3Bms X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, =C5=9Br., 17 lis 2021 o 12:48 Emmanuel Vadot napisa= =C5=82(a): > > On Wed, 17 Nov 2021 11:43:18 +0000 > Tom Jones wrote: > > > On Wed, Nov 17, 2021 at 10:24:11AM +0100, Marcin Wojtas wrote: > > > Hi, > > > > > > Thank you for the update. > > > > > > ?r., 17 lis 2021 o 10:09 Martin Matuska napisa?(a): > > > > > > > > The branch main has been updated by mm: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Ddae1713419a669d4f6c7= acddf81a21297c809741 > > > > > > > > commit dae1713419a669d4f6c7acddf81a21297c809741 > > > > Merge: b6cbbcae40b4 269b5dadcfd1 > > > > Author: Martin Matuska > > > > AuthorDate: 2021-11-17 08:35:14 +0000 > > > > Commit: Martin Matuska > > > > CommitDate: 2021-11-17 08:39:40 +0000 > > > > > > > > zfs: merge openzfs/zfs@269b5dadc (master) into main > > > > > > > > Notable upstream pull request merges: > > > > #12285 Introduce a tunable to exclude special class buffers f= rom L2ARC > > > > #12689 Check l2cache vdevs pending list inside the vdev_inuse= () > > > > #12735 Enable edonr in FreeBSD > > > > #12743 FreeBSD: fix world build after de198f2 > > > > #12745 Restore dirty dnode detection logic > > > > > > > > Obtained from: OpenZFS > > > > OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4 > > > > > > > > > > I have one question to make sure about the guidelines for future. I'v= e > > > been using ZFS on my arm64 machine for a while (a HEAD snapshot from > > > ~July + custom newer kernels for development) - after trying the > > > vanilla kernel after Nov 10 OpenZFS update I could no longer access > > > the root partition (even after returning back to the kernel that had > > > previously worked). > > > > > > I repeated the same thing with Nov 4 snapshot: > > > - Install system with ZFS > > > - Try kernel binary with updated OpenZFS - lose access to root partit= ion. > > > > > > Is such behavior expected? If yes, is it recommended for the ZFS case > > > to use kernel and the world only from the same baseline? > > > > > > Best regards, > > > Marcin > > > > I don't know if this is related, but I just updated from the 4th > > November snapshot to this commit and my zfs on root box can't mount > > root. > > > > Annoyingly I haven't time to debug right now. > > > > - Tom > > I had this problem recently and didn't had much time to debug but what > I know is that it's related to recent addition of counter which adds > some SYSINIT. I think that something in the zfs code isn't setup > properly wrt order and breaks sometimes when SYSINIT are re-arranged by > a new compile. > To confirm this just remove a few drivers from GENERIC that you don't > use (I've removed stuff like nfs* which adds a lot of SYSINITs) and > boot with debug.verbose_sysinit=3D1 to compare with a working kernel. The problem observed in my setup is, that after booting the kernel from top of main, there is no such thing as "working kernel" any more, i.e. the damage seems to be permanent. > Also on my side typing '?' at mountroot listed the zfs pool so if it's > the same for you that might be the same problem as mine (of course > selecting the pool at mountroot didn't worked). I tried all partitions listed with "?", but none worked. For the time being I had to reinstall the system with UFS. Best regards, Marcin > > Cheers, > > -- > Emmanuel Vadot From nobody Wed Nov 17 12:12:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 19E09185636B; Wed, 17 Nov 2021 12:12:27 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mail.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 4HvMHt3QGDz3Fbn; Wed, 17 Nov 2021 12:12:26 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1637151145; 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=5FS9bhutay2C0tFAWWrwv1egX0oLJ3rgxoz2rq0UGL8=; b=ScUm1aSubKdY94STUu2/K7AJ1G8fuxfypmu+FUPsAE3IRm3UEP0fq2ufaxeme+A0wrTRsL sXzGpklDXf2TtlT0hmciAqACE0UBiGS9BId6NJCR96pbfBf1jThv1WAyzT5HYWgD97MdzG cg4XXqhkzb4JmnxxXphl3s4QWckwkck= Received: from amy (lfbn-idf2-1-1163-183.w90-92.abo.wanadoo.fr [90.92.222.183]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 8f873046 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 17 Nov 2021 12:12:25 +0000 (UTC) Date: Wed, 17 Nov 2021 13:12:24 +0100 From: Emmanuel Vadot To: Marcin Wojtas Cc: Tom Jones , Martin Matuska , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: dae1713419a6 - main - zfs: merge openzfs/zfs@269b5dadc (master) into main Message-Id: <20211117131224.8155a533ee843e952877908a@bidouilliste.com> In-Reply-To: References: <202111170909.1AH9958u053602@gitrepo.freebsd.org> <20211117114318.GC17668@tom-desk.erg.abdn.ac.uk> <20211117124829.8b80d2d0dd308b940b1dd481@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=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4HvMHt3QGDz3Fbn X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 17 Nov 2021 12:59:44 +0100 Marcin Wojtas wrote: > Hi, >=20 > ?r., 17 lis 2021 o 12:48 Emmanuel Vadot napisa?(a= ): > > > > On Wed, 17 Nov 2021 11:43:18 +0000 > > Tom Jones wrote: > > > > > On Wed, Nov 17, 2021 at 10:24:11AM +0100, Marcin Wojtas wrote: > > > > Hi, > > > > > > > > Thank you for the update. > > > > > > > > ?r., 17 lis 2021 o 10:09 Martin Matuska napisa?(a): > > > > > > > > > > The branch main has been updated by mm: > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Ddae1713419a669d4f6= c7acddf81a21297c809741 > > > > > > > > > > commit dae1713419a669d4f6c7acddf81a21297c809741 > > > > > Merge: b6cbbcae40b4 269b5dadcfd1 > > > > > Author: Martin Matuska > > > > > AuthorDate: 2021-11-17 08:35:14 +0000 > > > > > Commit: Martin Matuska > > > > > CommitDate: 2021-11-17 08:39:40 +0000 > > > > > > > > > > zfs: merge openzfs/zfs@269b5dadc (master) into main > > > > > > > > > > Notable upstream pull request merges: > > > > > #12285 Introduce a tunable to exclude special class buffers= from L2ARC > > > > > #12689 Check l2cache vdevs pending list inside the vdev_inu= se() > > > > > #12735 Enable edonr in FreeBSD > > > > > #12743 FreeBSD: fix world build after de198f2 > > > > > #12745 Restore dirty dnode detection logic > > > > > > > > > > Obtained from: OpenZFS > > > > > OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4 > > > > > > > > > > > > > I have one question to make sure about the guidelines for future. I= 've > > > > been using ZFS on my arm64 machine for a while (a HEAD snapshot from > > > > ~July + custom newer kernels for development) - after trying the > > > > vanilla kernel after Nov 10 OpenZFS update I could no longer access > > > > the root partition (even after returning back to the kernel that had > > > > previously worked). > > > > > > > > I repeated the same thing with Nov 4 snapshot: > > > > - Install system with ZFS > > > > - Try kernel binary with updated OpenZFS - lose access to root part= ition. > > > > > > > > Is such behavior expected? If yes, is it recommended for the ZFS ca= se > > > > to use kernel and the world only from the same baseline? > > > > > > > > Best regards, > > > > Marcin > > > > > > I don't know if this is related, but I just updated from the 4th > > > November snapshot to this commit and my zfs on root box can't mount > > > root. > > > > > > Annoyingly I haven't time to debug right now. > > > > > > - Tom > > > > I had this problem recently and didn't had much time to debug but what > > I know is that it's related to recent addition of counter which adds > > some SYSINIT. I think that something in the zfs code isn't setup > > properly wrt order and breaks sometimes when SYSINIT are re-arranged by > > a new compile. > > To confirm this just remove a few drivers from GENERIC that you don't > > use (I've removed stuff like nfs* which adds a lot of SYSINITs) and > > boot with debug.verbose_sysinit=3D1 to compare with a working kernel. >=20 > The problem observed in my setup is, that after booting the kernel > from top of main, there is no such thing as "working kernel" any more, > i.e. the damage seems to be permanent. Oh so the zpool is not working anymore at all ? What does trying to import it from a memstick ? > > Also on my side typing '?' at mountroot listed the zfs pool so if it's > > the same for you that might be the same problem as mine (of course > > selecting the pool at mountroot didn't worked). >=20 > I tried all partitions listed with "?", but none worked. For the time > being I had to reinstall the system with UFS. >=20 > Best regards, > Marcin >=20 > > > > Cheers, > > > > -- > > Emmanuel Vadot --=20 Emmanuel Vadot From nobody Wed Nov 17 12:23:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CDB3D188C967; Wed, 17 Nov 2021 12:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvMXJ5DKKz3LVL; Wed, 17 Nov 2021 12:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93B6020D59; Wed, 17 Nov 2021 12:23: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 1AHCNCbW020307; Wed, 17 Nov 2021 12:23:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHCNCHP020306; Wed, 17 Nov 2021 12:23:12 GMT (envelope-from git) Date: Wed, 17 Nov 2021 12:23:12 GMT Message-Id: <202111171223.1AHCNCHP020306@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 E=C3=9Fer?= Subject: git: 09cd63416051 - main - zfs: fix commit dae1713419a6 merge openzfs/zfs@269b5dadc into main List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 09cd63416051ec8007ebc5ec45af44314eb5a0e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=09cd63416051ec8007ebc5ec45af44314eb5a0e8 commit 09cd63416051ec8007ebc5ec45af44314eb5a0e8 Author: Stefan Eßer AuthorDate: 2021-11-17 12:16:39 +0000 Commit: Stefan Eßer CommitDate: 2021-11-17 12:16:39 +0000 zfs: fix commit dae1713419a6 merge openzfs/zfs@269b5dadc into main Commit dae1713419a6 did not add two required lines for edonr specific functionality to this file, causing kernel build failures if ZFS is compiled in. This commit should be included in an eventual MFC of dae1713419a6. --- sys/conf/files | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index 4cc6e3dcde8c..aceaac1bd95e 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -243,6 +243,9 @@ contrib/openzfs/module/zcommon/zfs_prop.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zcommon/zpool_prop.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zcommon/zprop_common.c optional zfs compile-with "${ZFS_C}" +# zfs edon-r hash support +contrib/openzfs/module/icp/algs/edonr/edonr.c optional zfs compile-with "${ZFS_C}" + #zfs core common code contrib/openzfs/module/zfs/abd.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zfs/aggsum.c optional zfs compile-with "${ZFS_C}" @@ -283,6 +286,7 @@ contrib/openzfs/module/zfs/dsl_prop.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zfs/dsl_scan.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zfs/dsl_synctask.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zfs/dsl_userhold.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/zfs/edonr_zfs.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zfs/fm.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zfs/gzip.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/zfs/lzjb.c optional zfs compile-with "${ZFS_C}" From nobody Wed Nov 17 12:57:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 31D9E189BC60; Wed, 17 Nov 2021 12:54:29 +0000 (UTC) (envelope-from thj@freebsd.org) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.3 with cipher TLS_AES_256_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 4HvNDP0Btpz3ntD; Wed, 17 Nov 2021 12:54:29 +0000 (UTC) (envelope-from thj@freebsd.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 4AAD43201CD3; Wed, 17 Nov 2021 07:54:22 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 17 Nov 2021 07:54:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=RPJyT+J6yLnwg3C9JfHyLvmf9j2QqKhEeq82Ah3iH XI=; b=gXHwyjGC2b0Je/9D7KXzK37N8NFyU1I/bTNfguncKKHYjb6lN9BNqoEr2 9D0/+EUgTZ91AjbodK5kfwwtm5wzmMUZxa5XthW0yTmOqhsZKUB0AVa153ubPXcH iTxR+h2j6HhClfYepzeu0y2TWzf06shqjbFV7hBtHIEJLnsy+X4KCcAe8NYWeabA gU8bt5OGvCIBrAe/1hkGBlIyifWe3JgkQIGUcgTwCzl72uHPSbaXl7WtkeZG+A9h QtFkDVxxzamfEndcKfPCZXw1jgG80CVbTTAw/ep9517uYXfpyDIUTB1aK6xI2taZ P1yv2SlyFhYFsV6AJcLquf8AdUkiA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrfeeggdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggugfgjsehtkeertddttdejnecuhfhrohhmpefvohhmucfl ohhnvghsuceothhhjhesfhhrvggvsghsugdrohhrgheqnecuggftrfgrthhtvghrnhepje ejfefhhfegkeefueduudffkedukedvleejuedukeffudeukeduuedtudejleeknecuffho mhgrihhnpehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepthhhjhesfhhrvggvsghsugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Nov 2021 07:54:20 -0500 (EST) Date: Wed, 17 Nov 2021 12:57:11 +0000 From: Tom Jones To: Marcin Wojtas Cc: Emmanuel Vadot , Martin Matuska , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: dae1713419a6 - main - zfs: merge openzfs/zfs@269b5dadc (master) into main Message-ID: <20211117125711.GD17668@tom-desk.erg.abdn.ac.uk> References: <202111170909.1AH9958u053602@gitrepo.freebsd.org> <20211117114318.GC17668@tom-desk.erg.abdn.ac.uk> <20211117124829.8b80d2d0dd308b940b1dd481@bidouilliste.com> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: 4HvNDP0Btpz3ntD X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 17, 2021 at 12:59:44PM +0100, Marcin Wojtas wrote: > Hi, > > Å›r., 17 lis 2021 o 12:48 Emmanuel Vadot napisaÅ‚(a): > > > > On Wed, 17 Nov 2021 11:43:18 +0000 > > Tom Jones wrote: > > > > > On Wed, Nov 17, 2021 at 10:24:11AM +0100, Marcin Wojtas wrote: > > > > Hi, > > > > > > > > Thank you for the update. > > > > > > > > ?r., 17 lis 2021 o 10:09 Martin Matuska napisa?(a): > > > > > > > > > > The branch main has been updated by mm: > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=dae1713419a669d4f6c7acddf81a21297c809741 > > > > > > > > > > commit dae1713419a669d4f6c7acddf81a21297c809741 > > > > > Merge: b6cbbcae40b4 269b5dadcfd1 > > > > > Author: Martin Matuska > > > > > AuthorDate: 2021-11-17 08:35:14 +0000 > > > > > Commit: Martin Matuska > > > > > CommitDate: 2021-11-17 08:39:40 +0000 > > > > > > > > > > zfs: merge openzfs/zfs@269b5dadc (master) into main > > > > > > > > > > Notable upstream pull request merges: > > > > > #12285 Introduce a tunable to exclude special class buffers from L2ARC > > > > > #12689 Check l2cache vdevs pending list inside the vdev_inuse() > > > > > #12735 Enable edonr in FreeBSD > > > > > #12743 FreeBSD: fix world build after de198f2 > > > > > #12745 Restore dirty dnode detection logic > > > > > > > > > > Obtained from: OpenZFS > > > > > OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4 > > > > > > > > > > > > > I have one question to make sure about the guidelines for future. I've > > > > been using ZFS on my arm64 machine for a while (a HEAD snapshot from > > > > ~July + custom newer kernels for development) - after trying the > > > > vanilla kernel after Nov 10 OpenZFS update I could no longer access > > > > the root partition (even after returning back to the kernel that had > > > > previously worked). > > > > > > > > I repeated the same thing with Nov 4 snapshot: > > > > - Install system with ZFS > > > > - Try kernel binary with updated OpenZFS - lose access to root partition. > > > > > > > > Is such behavior expected? If yes, is it recommended for the ZFS case > > > > to use kernel and the world only from the same baseline? > > > > > > > > Best regards, > > > > Marcin > > > > > > I don't know if this is related, but I just updated from the 4th > > > November snapshot to this commit and my zfs on root box can't mount > > > root. > > > > > > Annoyingly I haven't time to debug right now. > > > > > > - Tom > > > > I had this problem recently and didn't had much time to debug but what > > I know is that it's related to recent addition of counter which adds > > some SYSINIT. I think that something in the zfs code isn't setup > > properly wrt order and breaks sometimes when SYSINIT are re-arranged by > > a new compile. > > To confirm this just remove a few drivers from GENERIC that you don't > > use (I've removed stuff like nfs* which adds a lot of SYSINITs) and > > boot with debug.verbose_sysinit=1 to compare with a working kernel. > > The problem observed in my setup is, that after booting the kernel > from top of main, there is no such thing as "working kernel" any more, > i.e. the damage seems to be permanent. > > > Also on my side typing '?' at mountroot listed the zfs pool so if it's > > the same for you that might be the same problem as mine (of course > > selecting the pool at mountroot didn't worked). > > I tried all partitions listed with "?", but none worked. For the time > being I had to reinstall the system with UFS. > For anyone that tries to debug this issue, in my case I booted kernel.old and everything was fine. - Tom From nobody Wed Nov 17 13:57:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8B603189BD1D for ; Wed, 17 Nov 2021 13:57:27 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (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 4HvPd33DwJz4dHZ for ; Wed, 17 Nov 2021 13:57:27 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-lf1-x12f.google.com with SMTP id m27so8846969lfj.12 for ; Wed, 17 Nov 2021 05:57:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ZeFlHlLefTuLffe5nnN84VBnRmrrb/XL850Wu5aq9S0=; b=hQUv56UzukUQre6Ph2FH6sHgdAD8DBJ91FtvTCbUPPWb/An/A7GORmE+Jby15Uq8gp NeZQ/PfQ8TV5M7ZfcJARftDCqI9JSCaIboiJzR1XX9FO4P0Er4H/7UL5mRxoCBmaEK/b 4ulmS3Z9TT0pV8pxgD5Xw2Y5gzz1BfnbEmu7UZDuyeoaDbWrPj1dzyE2pYwTOSjJPEE0 cN1hHtYq4UIunwavnFwkYWScPJ5PQZoxBMMZ7R7Bu5s6jgTyeIxTzgySRnHNyBSmrqsB 4a2wPGZdhKRF4ZfiO2qqNQbI6+qPxOX2ihyvkcePikh2MVjpyHTHbSp+U5yFFWAPzcX5 6DJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ZeFlHlLefTuLffe5nnN84VBnRmrrb/XL850Wu5aq9S0=; b=TmbC63lNdHC7lEVdsKfpm50ueM0oGJUGzt+kfcKwXrW4ka3PQoRCkTK4FO3CG7z3D+ IGPeztQkOFoEvLwA66wJ9Omwcri3o9b+liVhmv1wXpJkSncwgUunJWLnoHybQKoD8PVR iEHN1H+xBTKnd6MDCA15vAmtqa98jxEoDJfSsrFer8oyOa0gj2xXBXfKk7blcffSduh4 7euVUr7rUPpignX4pgPJjyIcu5vvCUKOW0PI6fkw7s5GrrcRRssw/EdafbBYFojyUJuf HSMZVMmSqRbT+cL5lRQPkujp/MGIbHAI5+Y5pQjF4pd2lJOV+dSNrXmvZ6TXBLH4YkOk g2jQ== X-Gm-Message-State: AOAM530yVqfFsBR8BQ/VZ7r4SJN02QCGy3OdLCDM6meoKHfPtMZlFvH+ X65rnT6qzlNobq5sWKf3fvx6PzmKSzWgC6VFFTBx8A== X-Google-Smtp-Source: ABdhPJyEy+ownuC9/jKITdrfE9f7QRs2LBJ0K9t8x5btrzt8jcMuZwfR+v0EnrLCSgbJ2WkJQpKMxYMkWZQpmTT9kMo= X-Received: by 2002:ac2:4c34:: with SMTP id u20mr15934445lfq.671.1637157445452; Wed, 17 Nov 2021 05:57:25 -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: <202111170909.1AH9958u053602@gitrepo.freebsd.org> <20211117114318.GC17668@tom-desk.erg.abdn.ac.uk> <20211117124829.8b80d2d0dd308b940b1dd481@bidouilliste.com> <20211117125711.GD17668@tom-desk.erg.abdn.ac.uk> In-Reply-To: <20211117125711.GD17668@tom-desk.erg.abdn.ac.uk> From: Marcin Wojtas Date: Wed, 17 Nov 2021 14:57:16 +0100 Message-ID: Subject: Re: git: dae1713419a6 - main - zfs: merge openzfs/zfs@269b5dadc (master) into main To: Tom Jones Cc: Emmanuel Vadot , Martin Matuska , src-committers , 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: 4HvPd33DwJz4dHZ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N =C5=9Br., 17 lis 2021 o 13:54 Tom Jones napisa=C5=82(a): > > On Wed, Nov 17, 2021 at 12:59:44PM +0100, Marcin Wojtas wrote: > > Hi, > > > > =C5=9Br., 17 lis 2021 o 12:48 Emmanuel Vadot na= pisa=C5=82(a): > > > > > > On Wed, 17 Nov 2021 11:43:18 +0000 > > > Tom Jones wrote: > > > > > > > On Wed, Nov 17, 2021 at 10:24:11AM +0100, Marcin Wojtas wrote: > > > > > Hi, > > > > > > > > > > Thank you for the update. > > > > > > > > > > ?r., 17 lis 2021 o 10:09 Martin Matuska napisa?(= a): > > > > > > > > > > > > The branch main has been updated by mm: > > > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Ddae1713419a669d4= f6c7acddf81a21297c809741 > > > > > > > > > > > > commit dae1713419a669d4f6c7acddf81a21297c809741 > > > > > > Merge: b6cbbcae40b4 269b5dadcfd1 > > > > > > Author: Martin Matuska > > > > > > AuthorDate: 2021-11-17 08:35:14 +0000 > > > > > > Commit: Martin Matuska > > > > > > CommitDate: 2021-11-17 08:39:40 +0000 > > > > > > > > > > > > zfs: merge openzfs/zfs@269b5dadc (master) into main > > > > > > > > > > > > Notable upstream pull request merges: > > > > > > #12285 Introduce a tunable to exclude special class buffe= rs from L2ARC > > > > > > #12689 Check l2cache vdevs pending list inside the vdev_i= nuse() > > > > > > #12735 Enable edonr in FreeBSD > > > > > > #12743 FreeBSD: fix world build after de198f2 > > > > > > #12745 Restore dirty dnode detection logic > > > > > > > > > > > > Obtained from: OpenZFS > > > > > > OpenZFS commit: 269b5dadcfd1d5732cf763dddcd46009a332eae4 > > > > > > > > > > > > > > > > I have one question to make sure about the guidelines for future.= I've > > > > > been using ZFS on my arm64 machine for a while (a HEAD snapshot f= rom > > > > > ~July + custom newer kernels for development) - after trying the > > > > > vanilla kernel after Nov 10 OpenZFS update I could no longer acce= ss > > > > > the root partition (even after returning back to the kernel that = had > > > > > previously worked). > > > > > > > > > > I repeated the same thing with Nov 4 snapshot: > > > > > - Install system with ZFS > > > > > - Try kernel binary with updated OpenZFS - lose access to root pa= rtition. > > > > > > > > > > Is such behavior expected? If yes, is it recommended for the ZFS = case > > > > > to use kernel and the world only from the same baseline? > > > > > > > > > > Best regards, > > > > > Marcin > > > > > > > > I don't know if this is related, but I just updated from the 4th > > > > November snapshot to this commit and my zfs on root box can't mount > > > > root. > > > > > > > > Annoyingly I haven't time to debug right now. > > > > > > > > - Tom > > > > > > I had this problem recently and didn't had much time to debug but wh= at > > > I know is that it's related to recent addition of counter which adds > > > some SYSINIT. I think that something in the zfs code isn't setup > > > properly wrt order and breaks sometimes when SYSINIT are re-arranged = by > > > a new compile. > > > To confirm this just remove a few drivers from GENERIC that you don'= t > > > use (I've removed stuff like nfs* which adds a lot of SYSINITs) and > > > boot with debug.verbose_sysinit=3D1 to compare with a working kernel. > > > > The problem observed in my setup is, that after booting the kernel > > from top of main, there is no such thing as "working kernel" any more, > > i.e. the damage seems to be permanent. > > > > > Also on my side typing '?' at mountroot listed the zfs pool so if it= 's > > > the same for you that might be the same problem as mine (of course > > > selecting the pool at mountroot didn't worked). > > > > I tried all partitions listed with "?", but none worked. For the time > > being I had to reinstall the system with UFS. > > > > For anyone that tries to debug this issue, in my case I booted > kernel.old and everything was fine. > I saw the breakage in my system with 81b22a9892b1 OpenZFS update (from Nov 10). I haven't tried with this one yet. Best regards, Marcin From nobody Wed Nov 17 14:27:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 32B7B18502B9; Wed, 17 Nov 2021 14:27: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 4HvQHh0vk3z4mCD; Wed, 17 Nov 2021 14:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F343122660; Wed, 17 Nov 2021 14:27: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 1AHERR6p079986; Wed, 17 Nov 2021 14:27:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHERR3q079985; Wed, 17 Nov 2021 14:27:27 GMT (envelope-from git) Date: Wed, 17 Nov 2021 14:27:27 GMT Message-Id: <202111171427.1AHERR3q079985@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: 3a15ccadf87e - stable/13 - kasan: Disable validation of function parameters passed by value List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3a15ccadf87ec55068656e6a87c8b19eea1fd390 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3a15ccadf87ec55068656e6a87c8b19eea1fd390 commit 3a15ccadf87ec55068656e6a87c8b19eea1fd390 Author: Mark Johnston AuthorDate: 2021-11-03 16:28:48 +0000 Commit: Mark Johnston CommitDate: 2021-11-17 14:27:16 +0000 kasan: Disable validation of function parameters passed by value It appears that the emitted code in the caller does not update shadow state for values passed on the stack to the callee, which it seemingly ought to do after pushing values on the stack and prior to the call itself. This leaves open a window where an interrupt handler can cause regions of the stack containing these values to be poisoned, resulting in rare false positive reports. This happens particularly in the amd64 TLB invalidation code, where we liberally pass cpuset_t's around by value. LLVM has a flag to disable validation of accesses of function parameters passed by value. Such validation is itself a relatively new feature. Turn it off for now. Reported by: pho, syzkaller Sponsored by: The FreeBSD Foundation (cherry picked from commit 2a519c3b14c29688e42d11f916655318b13c8409) --- sys/conf/kern.pre.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index daba78135c79..e57c187f940d 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -114,7 +114,8 @@ SAN_CFLAGS+= -fsanitize=kernel-address \ -mllvm -asan-instrument-dynamic-allocas=true \ -mllvm -asan-globals=true \ -mllvm -asan-use-after-scope=true \ - -mllvm -asan-instrumentation-with-call-threshold=0 + -mllvm -asan-instrumentation-with-call-threshold=0 \ + -mllvm -asan-instrument-byval=false .endif KCSAN_ENABLED!= grep KCSAN opt_global.h || true ; echo From nobody Wed Nov 17 14:47:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2A978188ACE7; Wed, 17 Nov 2021 14:47: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 4HvQks0kxVz4svq; Wed, 17 Nov 2021 14:47:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE1F322F01; Wed, 17 Nov 2021 14:47: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 1AHElWeo007000; Wed, 17 Nov 2021 14:47:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHElWdC006999; Wed, 17 Nov 2021 14:47:32 GMT (envelope-from git) Date: Wed, 17 Nov 2021 14:47:32 GMT Message-Id: <202111171447.1AHElWdC006999@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 97e28f0f58cd - main - tcp: Rack ack war with a mis-behaving firewall or nat with resets. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97e28f0f58cda4488ccd299470f308b0135a1821 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=97e28f0f58cda4488ccd299470f308b0135a1821 commit 97e28f0f58cda4488ccd299470f308b0135a1821 Author: Randall Stewart AuthorDate: 2021-11-17 14:45:51 +0000 Commit: Randall Stewart CommitDate: 2021-11-17 14:45:51 +0000 tcp: Rack ack war with a mis-behaving firewall or nat with resets. Previously we added ack-war prevention for misbehaving firewalls. This is where the f/w or nat messes up its sequence numbers and causes an ack-war. There is yet another type of ack war that we have found in the wild that is like unto this. Basically the f/w or nat gets a ack (keep-alive probe or such) and instead of turning the ack/seq around and adding a TH_RST it does something real stupid and sends a new packet with seq=0. This of course triggers the challenge ack in the reset processing which then sends in a challenge ack (if the seq=0 is within the range of possible sequence numbers allowed by the challenge) and then we rinse-repeat. This will add the needed tweaks (similar to the last ack-war prevention using the same sysctls and counters) to prevent it and allow say 5 per second by default. Reviewed by: Michael Tuexen Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D32938 --- sys/netinet/tcp_stacks/rack.c | 32 ++++++++++++++++++------- sys/netinet/tcp_stacks/rack_bbr_common.c | 40 ++++++++++++++++++++++++++++---- sys/netinet/tcp_stacks/rack_bbr_common.h | 5 ++-- 3 files changed, 62 insertions(+), 15 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 7769aa1272c0..30c8e18f2adb 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -11564,9 +11564,12 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, return (0); } } + if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (ctf_process_rst(m, th, so, tp)); + return (__ctf_process_rst(m, th, so, tp, + &rack->r_ctl.challenge_ack_ts, + &rack->r_ctl.challenge_ack_cnt)); /* * RFC 1323 PAWS: If we have a timestamp reply on this segment and * it's less than ts_recent, drop it. @@ -11775,7 +11778,9 @@ rack_do_established(struct mbuf *m, struct tcphdr *th, struct socket *so, if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (ctf_process_rst(m, th, so, tp)); + return (__ctf_process_rst(m, th, so, tp, + &rack->r_ctl.challenge_ack_ts, + &rack->r_ctl.challenge_ack_cnt)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in @@ -11875,7 +11880,9 @@ rack_do_close_wait(struct mbuf *m, struct tcphdr *th, struct socket *so, ctf_calc_rwin(so, tp); if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (ctf_process_rst(m, th, so, tp)); + return (__ctf_process_rst(m, th, so, tp, + &rack->r_ctl.challenge_ack_ts, + &rack->r_ctl.challenge_ack_cnt)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in * synchronized state. @@ -12004,7 +12011,9 @@ rack_do_fin_wait_1(struct mbuf *m, struct tcphdr *th, struct socket *so, if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (ctf_process_rst(m, th, so, tp)); + return (__ctf_process_rst(m, th, so, tp, + &rack->r_ctl.challenge_ack_ts, + &rack->r_ctl.challenge_ack_cnt)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in * synchronized state. @@ -12131,7 +12140,9 @@ rack_do_closing(struct mbuf *m, struct tcphdr *th, struct socket *so, if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (ctf_process_rst(m, th, so, tp)); + return (__ctf_process_rst(m, th, so, tp, + &rack->r_ctl.challenge_ack_ts, + &rack->r_ctl.challenge_ack_cnt)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in * synchronized state. @@ -12244,7 +12255,9 @@ rack_do_lastack(struct mbuf *m, struct tcphdr *th, struct socket *so, if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (ctf_process_rst(m, th, so, tp)); + return (__ctf_process_rst(m, th, so, tp, + &rack->r_ctl.challenge_ack_ts, + &rack->r_ctl.challenge_ack_cnt)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in * synchronized state. @@ -12358,7 +12371,9 @@ rack_do_fin_wait_2(struct mbuf *m, struct tcphdr *th, struct socket *so, /* Reset receive buffer auto scaling when not in bulk receive mode. */ if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (ctf_process_rst(m, th, so, tp)); + return (__ctf_process_rst(m, th, so, tp, + &rack->r_ctl.challenge_ack_ts, + &rack->r_ctl.challenge_ack_cnt)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in * synchronized state. @@ -14566,7 +14581,8 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, rack_check_probe_rtt(rack, us_cts); } rack_clear_rate_sample(rack); - if (rack->forced_ack) { + if ((rack->forced_ack) && + ((th->th_flags & TH_RST) == 0)) { rack_handle_probe_response(rack, tiwin, us_cts); } /* diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index bf93359368f9..88e028109c95 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -764,7 +764,8 @@ ctf_do_drop(struct mbuf *m, struct tcpcb *tp) } int -ctf_process_rst(struct mbuf *m, struct tcphdr *th, struct socket *so, struct tcpcb *tp) +__ctf_process_rst(struct mbuf *m, struct tcphdr *th, struct socket *so, + struct tcpcb *tp, uint32_t *ts, uint32_t *cnt) { /* * RFC5961 Section 3.2 @@ -811,11 +812,40 @@ ctf_process_rst(struct mbuf *m, struct tcphdr *th, struct socket *so, struct tcp dropped = 1; ctf_do_drop(m, tp); } else { + int send_challenge; + KMOD_TCPSTAT_INC(tcps_badrst); - /* Send challenge ACK. */ - tcp_respond(tp, mtod(m, void *), th, m, - tp->rcv_nxt, tp->snd_nxt, TH_ACK); - tp->last_ack_sent = tp->rcv_nxt; + if ((ts != NULL) && (cnt != NULL) && + (tcp_ack_war_time_window > 0) && + (tcp_ack_war_cnt > 0)) { + /* We are possibly preventing an ack-rst war prevention */ + uint32_t cts; + + /* + * We use a msec tick here which gives us + * roughly 49 days. We don't need the + * precision of a microsecond timestamp which + * would only give us hours. + */ + cts = tcp_ts_getticks(); + if (TSTMP_LT((*ts), cts)) { + /* Timestamp is in the past */ + *cnt = 0; + *ts = (cts + tcp_ack_war_time_window); + } + if (*cnt < tcp_ack_war_cnt) { + *cnt = (*cnt + 1); + send_challenge = 1; + } else + send_challenge = 0; + } else + send_challenge = 1; + if (send_challenge) { + /* Send challenge ACK. */ + tcp_respond(tp, mtod(m, void *), th, m, + tp->rcv_nxt, tp->snd_nxt, TH_ACK); + tp->last_ack_sent = tp->rcv_nxt; + } } } else { m_freem(m); diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.h b/sys/netinet/tcp_stacks/rack_bbr_common.h index 49ec5c9ce4fa..9a711253d978 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.h +++ b/sys/netinet/tcp_stacks/rack_bbr_common.h @@ -119,8 +119,9 @@ void ctf_do_drop(struct mbuf *m, struct tcpcb *tp); int -ctf_process_rst(struct mbuf *m, struct tcphdr *th, - struct socket *so, struct tcpcb *tp); +__ctf_process_rst(struct mbuf *m, struct tcphdr *th, + struct socket *so, struct tcpcb *tp, uint32_t *ts, uint32_t *cnt); +#define ctf_process_rst(m, t, s, p) __ctf_process_rst(m, t, s, p, NULL, NULL) void ctf_challenge_ack(struct mbuf *m, struct tcphdr *th, From nobody Wed Nov 17 15:10:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E12B0189589A; Wed, 17 Nov 2021 15:10: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 4HvRDn62C3z3HlZ; Wed, 17 Nov 2021 15:10:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFBCE22E6F; Wed, 17 Nov 2021 15:10: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 1AHFA1rx036259; Wed, 17 Nov 2021 15:10:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHFA1b9036257; Wed, 17 Nov 2021 15:10:01 GMT (envelope-from git) Date: Wed, 17 Nov 2021 15:10:01 GMT Message-Id: <202111171510.1AHFA1b9036257@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: 2e946f870558 - main - Fix ZFS module build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e946f8705581f2e9370e98a657bead36582fb2a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=2e946f8705581f2e9370e98a657bead36582fb2a commit 2e946f8705581f2e9370e98a657bead36582fb2a Author: Allan Jude AuthorDate: 2021-11-17 15:07:05 +0000 Commit: Allan Jude CommitDate: 2021-11-17 15:07:05 +0000 Fix ZFS module build resolves: link_elf_obj: symbol abd_checksum_edonr_native undefined The required module-build bits were originally identified in the upstream pull request: https://github.com/openzfs/zfs/pull/12735 But were missed when the code was imported (since they are not committed upstream). X-MFC-With: dae1713419a6, 09cd63416051 Submitted by: freqlabs Sponsored by: Klara Inc. --- sys/modules/zfs/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 983f0aa0e994..54d53c87a7c5 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -8,6 +8,7 @@ KMOD= zfs .PATH: ${SRCDIR}/avl \ ${SRCDIR}/lua \ ${SRCDIR}/nvpair \ + ${SRCDIR}/icp/algs/edonr \ ${SRCDIR}/os/freebsd/spl \ ${SRCDIR}/os/freebsd/zfs \ ${SRCDIR}/unicode \ @@ -44,6 +45,9 @@ SRCS= vnode_if.h device_if.h bus_if.h # avl SRCS+= avl.c +# icp +SRCS+= edonr.c + #lua SRCS+= lapi.c \ lauxlib.c \ @@ -191,6 +195,7 @@ SRCS+= abd.c \ dsl_scan.c \ dsl_synctask.c \ dsl_userhold.c \ + edonr_zfs.c \ fm.c \ gzip.c \ lzjb.c \ @@ -313,6 +318,7 @@ CFLAGS.dmu_traverse.c= -Wno-cast-qual CFLAGS.dsl_dir.c= -Wno-cast-qual CFLAGS.dsl_deadlist.c= -Wno-cast-qual CFLAGS.dsl_prop.c= -Wno-cast-qual +CFLAGS.edonr.c= -Wno-cast-qual CFLAGS.fm.c= -Wno-cast-qual CFLAGS.lz4.c= -Wno-cast-qual CFLAGS.spa.c= -Wno-cast-qual From nobody Wed Nov 17 17:52:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BF7D518A70BF; Wed, 17 Nov 2021 17:52: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 4HvVrT1dp0z3CwX; Wed, 17 Nov 2021 17:52:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1916525659; Wed, 17 Nov 2021 17:52: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 1AHHqeXw059494; Wed, 17 Nov 2021 17:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHHqelL059493; Wed, 17 Nov 2021 17:52:40 GMT (envelope-from git) Date: Wed, 17 Nov 2021 17:52:40 GMT Message-Id: <202111171752.1AHHqelL059493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Guangyuan Yang Subject: git: 8406182dbeb9 - main - bridge(4): Fix spelling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ygy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8406182dbeb972698775e2468902bc5f6e593d72 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ygy (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8406182dbeb972698775e2468902bc5f6e593d72 commit 8406182dbeb972698775e2468902bc5f6e593d72 Author: Tom Marcoen AuthorDate: 2021-11-17 17:47:33 +0000 Commit: Guangyuan Yang CommitDate: 2021-11-17 17:52:30 +0000 bridge(4): Fix spelling PR: 237725 MFC after: 3 days --- share/man/man4/bridge.4 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4 index 7e5376556c57..c79e5da69837 100644 --- a/share/man/man4/bridge.4 +++ b/share/man/man4/bridge.4 @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 1, 2020 +.Dd November 17, 2021 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -96,20 +96,20 @@ If .Xr sysctl 8 node .Va net.link.bridge.inherit_mac -has non-zero value, a newly created bridge will inherit its MAC address -from its first member instead of choosing a random link-level address. -This provides a more predictable bridge MAC without any -additional configuration, but currently this feature is known -to break some L2 protocols, for example PPPoE that is provided -by +has a non-zero value, the newly created bridge will inherit the MAC +address from its first member instead of choosing a random link-level +address. +This will provide more predictable bridge MAC addresses without any +additional configuration, but currently this feature is known to break +some L2 protocols, for example PPPoE that is provided by .Xr ng_pppoe 4 and .Xr ppp 8 . -Currently this feature is considered experimental and is turned off +Currently this feature is considered as experimental and is turned off by default. .Pp A bridge can be used to provide several services, such as a simple -802.11-to-Ethernet bridge for wireless hosts, and traffic isolation. +802.11-to-Ethernet bridge for wireless hosts, or traffic isolation. .Pp A bridge works like a switch, forwarding traffic from one interface to another. @@ -130,7 +130,7 @@ The MTU of the first member interface to be added is used as the bridge MTU. All additional members are required to have exactly the same MTU value. .Pp The TOE, TSO, TXCSUM and TXCSUM6 capabilities on all interfaces added to the -bridge are disabled if any of the interfaces doesn't support/enable them. +bridge are disabled if any of the interfaces do not support/enable them. The LRO capability is always disabled. All the capabilities are restored when the interface is removed from the bridge. Changing capabilities at run-time may cause NIC reinit and a link flap. @@ -180,7 +180,7 @@ This situation is clearly against the description in Section 5, RFC 4007. Although it works in most cases, -it can cause some counterintuitive or undesirable behavior in some +it can cause some counterintuitive or undesirable behaviour in some edge cases when both, the .Nm interface and one of the member interfaces, have an IPv6 address @@ -198,7 +198,7 @@ interface has IPv6 addresses, IPv6 addresses on the member interface will be automatically removed before the interface is added. .Pp -This behavior can be disabled by setting +This behaviour can be disabled by setting .Xr sysctl 8 variable .Va net.link.bridge.allow_llz_overlap From nobody Wed Nov 17 18:51:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3BA311895212; Wed, 17 Nov 2021 18:51: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 4HvX891HMzz3nHQ; Wed, 17 Nov 2021 18:51:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C45B262AD; Wed, 17 Nov 2021 18:51: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 1AHIpKMs038211; Wed, 17 Nov 2021 18:51:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHIpK7X038210; Wed, 17 Nov 2021 18:51:20 GMT (envelope-from git) Date: Wed, 17 Nov 2021 18:51:20 GMT Message-Id: <202111171851.1AHIpK7X038210@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: 8a693ccf86f9 - main - Export symbols from opensolaris.ko and dtrace.ko List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8a693ccf86f90469910c5b2425ddb8a75e298487 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8a693ccf86f90469910c5b2425ddb8a75e298487 commit 8a693ccf86f90469910c5b2425ddb8a75e298487 Author: Mark Johnston AuthorDate: 2021-11-17 16:01:59 +0000 Commit: Mark Johnston CommitDate: 2021-11-17 18:51:10 +0000 Export symbols from opensolaris.ko and dtrace.ko Both modules provide many symbols used by various DTrace provider modules, so just export everything. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/modules/dtrace/dtrace/Makefile | 4 +--- sys/modules/opensolaris/Makefile | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile index 55f9f4f66f36..712e10331a38 100644 --- a/sys/modules/dtrace/dtrace/Makefile +++ b/sys/modules/dtrace/dtrace/Makefile @@ -49,9 +49,7 @@ CFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/common/util \ -I${SYSDIR} -DDIS_MEM -EXPORT_SYMS= dtrace_register \ - dtrace_unregister \ - dtrace_probe_lookup +EXPORT_SYMS= YES dtrace_asm.o: assym.inc diff --git a/sys/modules/opensolaris/Makefile b/sys/modules/opensolaris/Makefile index 536b9637cd3c..7010485b0ee7 100644 --- a/sys/modules/opensolaris/Makefile +++ b/sys/modules/opensolaris/Makefile @@ -27,7 +27,7 @@ SRCS+= opensolaris_atomic.c CFLAGS+= ${OPENZFS_CFLAGS} -EXPORT_SYMS= cpu_core +EXPORT_SYMS= YES IGNORE_PRAGMA= 1 From nobody Wed Nov 17 20:08:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A3FB118A5401 for ; Wed, 17 Nov 2021 20:08:47 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (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 4HvYsW3t3Qz4khZ for ; Wed, 17 Nov 2021 20:08:47 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-lf1-x12b.google.com with SMTP id y26so14072460lfa.11 for ; Wed, 17 Nov 2021 12:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=e97sq6wMyLFYhcGHCUuH1iMaUELMEx4HXqcNa3EoOX8=; b=6uz1Nr2efSe3LZZ/Su9Dsh0BQEuSWMOp+71OhpG9tvnoR4AuumUuxRd/ReLM1mVUSn xLsdbm0p5PKt24TzrfDcky9nkHOwHskQ++dYiGvsu4+VxlZ13AQUXsQ+105tQ0tcZww5 KA6fY6oj0Zm88ylptqQQjcrwlREQ0zix+vpd07YeXos+22INWDNklTGswHqNFpWNCQkn oZ3hsSQDni4EC7EHTT0Y/W+R9TWsCOPHGeyH3jb8BxQf/4H/CPb8PMD7dFFrVRxMSOwf 5tjpEmo5/e1ieW2J9QHpPfrR6sT/TXkxZz7eVpPgw6O81xMU7x1CjNmIjt29WJVAE+tP D7Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=e97sq6wMyLFYhcGHCUuH1iMaUELMEx4HXqcNa3EoOX8=; b=heivP5pvAa8MeCkEGjuuX9bTRgjQ0pai6OAtz97m+UDqSnvuKV86x1ADwmJkmrKtfO hhA2bn4eTSFqp0uXv/Cc0I6IM032iGUkOItfjdO6PD5DXL5gV1Lrew4U6sFnMw5tm3Ad S/CdSb34XaPS9+MX0V+yGnBr0HZy2DO09vC7VE25wkNkt6bBVmEuSm/g/4HE96KabbSV 9DOta8LZyr0bawwvul9Og7QpnaYP+cv307cL+TARlDJmzOoJPYnyedvfOXzi66hUm3/f jsYngMqyotgCOSiv15txuwX5yrTlN8CVdtdV7kO3M9ADcKYVCUVZ7DumLB5fGLji0E1D 3Rig== X-Gm-Message-State: AOAM530fF3dZiMGoVzoh2slr2eIATjudyqv7xECtEKB9vQOH0cvavkQ5 gD2zOHKEogxjDq4dBLM3W5p8XxSJnL4zeNdVQOyH5IU2FqupDw== X-Google-Smtp-Source: ABdhPJygOa0ODnNlLprGs+/t9o4wIHsS4oTJlvcQ6/nHjag6XsNLdIlsvsFVDFgx4LoMf6oCItkRO7sc3htBVXj7Fwo= X-Received: by 2002:a05:651c:113b:: with SMTP id e27mr10630992ljo.474.1637179725287; Wed, 17 Nov 2021 12:08:45 -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: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> <20211117054034.jr6wdl5o42dv2kb6@mutt-hbsd> In-Reply-To: <20211117054034.jr6wdl5o42dv2kb6@mutt-hbsd> From: Marcin Wojtas Date: Wed, 17 Nov 2021 21:08:34 +0100 Message-ID: Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables To: Shawn Webb Cc: Kubilay Kocak , Marcin Wojtas , src-committers , 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: 4HvYsW3t3Qz4khZ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, =C5=9Br., 17 lis 2021 o 06:40 Shawn Webb napis= a=C5=82(a): > > On Wed, Nov 17, 2021 at 10:42:12AM +1100, Kubilay Kocak wrote: > > On 17/11/2021 9:26 am, Marcin Wojtas wrote: > > > The branch main has been updated by mw: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Db014e0f15bc73d80ef49b6= 4fd1f8c29f469467cb > > > > > > commit b014e0f15bc73d80ef49b64fd1f8c29f469467cb > > > Author: Marcin Wojtas > > > AuthorDate: 2021-10-24 14:53:06 +0000 > > > Commit: Marcin Wojtas > > > CommitDate: 2021-11-16 22:16:09 +0000 > > > > > > Enable ASLR by default for 64-bit executables > > > Address Space Layout Randomization (ASLR) is an exploit mitigati= on > > > technique implemented in the majority of modern operating system= s. > > > It involves randomly positioning the base address of an executab= le > > > and the position of libraries, heap, and stack, in a process's a= ddress > > > space. Although over the years ASLR proved to not guarantee full= OS > > > security on its own, this mechanism can make exploitation more d= ifficult. > > > Tests on the tier 1 64-bit architectures demonstrated that the A= SLR is > > > stable and does not result in noticeable performance degradation= , > > > therefore it should be safe to enable this mechanism by default. > > > Moreover its effectiveness is increased for PIE (Position Indepe= ndent > > > Executable) binaries. Thanks to commit 9a227a2fd642 ("Enable PIE= by > > > default on 64-bit architectures"), building from src is not nece= ssary > > > to have PIE binaries. It is enough to control usage of ASLR in t= he > > > OS solely by setting the appropriate sysctls. > > > This patch toggles the kernel settings to use address map random= ization > > > for PIE & non-PIE 64-bit binaries. It also disables SBRK, in ord= er > > > to allow utilization of the bss grow region for mappings. The la= tter > > > has no effect if ASLR is disabled, so apply it to all architectu= res. > > > As for the drawbacks, a consequence of using the ASLR is more > > > significant VM fragmentation, hence the issues may be encountere= d > > > in the systems with a limited address space in high memory consu= mption > > > cases, such as buildworld. As a result, although the tests on 32= -bit > > > architectures with ASLR enabled were mostly on par with what was > > > observed on 64-bit ones, the defaults for the former are not cha= nged > > > at this time. Also, for the sake of safety keep the feature disa= bled > > > for 32-bit executables on 64-bit machines, too. > > > The committed change affects the overall OS operation, so the > > > following should be taken into consideration: > > > * Address space fragmentation. > > > * A changed ABI due to modified layout of address space. > > > * More complicated debugging due to: > > > * Non-reproducible address space layout between runs. > > > * Some debuggers automatically disable ASLR for spawned proces= ses, > > > making target's environment different between debug and > > > non-debug runs. > > > In order to confirm/rule-out the dependency of any encountered i= ssue > > > on ASLR it is strongly advised to re-run the test with the featu= re > > > disabled - it can be done by setting the following sysctls > > > in the /etc/sysctl.conf file: > > > kern.elf64.aslr.enable=3D0 > > > kern.elf64.aslr.pie_enable=3D0 > > > Co-developed by: Dawid Gorecki > > > Reviewed by: emaste, kib > > > Obtained from: Semihalf > > > Sponsored by: Stormshield > > > MFC after: 1 month > > > Differential revision: https://reviews.freebsd.org/D27666 > > > --- > > > sys/kern/imgact_elf.c | 20 +++++++++++++++++--- > > > 1 file changed, 17 insertions(+), 3 deletions(-) > > > > > > diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c > > > index 898f0f66a532..38ad61d8720b 100644 > > > --- a/sys/kern/imgact_elf.c > > > +++ b/sys/kern/imgact_elf.c > > > @@ -161,19 +161,33 @@ SYSCTL_NODE(__CONCAT(_kern_elf, __ELF_WORD_SIZE= ), OID_AUTO, aslr, > > > ""); > > > #define ASLR_NODE_OID __CONCAT(__CONCAT(_kern_elf, __ELF_WORD_S= IZE), _aslr) > > > -static int __elfN(aslr_enabled) =3D 0; > > > +/* > > > + * While for 64-bit machines ASLR works properly, there are > > > + * still some problems when using 32-bit architectures. For this > > > + * reason ASLR is only enabled by default when running native > > > + * 64-bit non-PIE executables. > > > + */ > > > +static int __elfN(aslr_enabled) =3D __ELF_WORD_SIZE =3D=3D 64; > > > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, enable, CTLFLAG_RWTUN, > > > &__elfN(aslr_enabled), 0, > > > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) > > > ": enable address map randomization"); > > > -static int __elfN(pie_aslr_enabled) =3D 0; > > > +/* > > > + * Enable ASLR only for 64-bit PIE binaries by default. > > > + */ > > > +static int __elfN(pie_aslr_enabled) =3D __ELF_WORD_SIZE =3D=3D 64; > > > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, pie_enable, CTLFLAG_RWTUN, > > > &__elfN(pie_aslr_enabled), 0, > > > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) > > > ": enable address map randomization for PIE binaries"); > > > > The current description seems ambiguous with respect to the added comme= nt. > > If the sysctl (=3D1) applies ASLR "only" for PIE binaries, where the = =3D0 > > (sysctl disabled) case applies it unconditionally, a better description > > might be: > > > > "Enable address map randomization only for PIE binaries" > > > > What is the actual/correct behaviour of the control? > > It also doesn't make much sense to toggle AS{L}R for the different > parts of an executable image. AS{L}R is an "all or nothing" thing. > Really, there should be only a single toggle with four modes: > > 1. AS{L}R force disable > 2. AS{L}R opt out > 3. AS{L}R opt in > 4. AS{L}R force enable > I think a single knob can simplify the situation, I'd need to take a look if that's easily achievable. What's the use case of the opt in/out options? Best regards, Marcin > HardenedBSD has found that users get confused or are unsure of having > too many toggles. "What happens when I do ?" In this case, you'd > probably have to have deeper knowledge of how FreeBSD's AS{L}R is > implemented. Having a single sysctl knob makes life easier for users > and reduces implementation complexity. > > Thanks, > > -- > Shawn Webb > Cofounder / Security Engineer > HardenedBSD > > https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/0= 3A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc From nobody Wed Nov 17 20:17:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C8BA81851910 for ; Wed, 17 Nov 2021 20:18:03 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ4C50Zdz4p47 for ; Wed, 17 Nov 2021 20:18:03 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-lf1-x131.google.com with SMTP id bi37so14263810lfb.5 for ; Wed, 17 Nov 2021 12:18:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=5rw6P1RfbBgDaUtUsqc8ozYyaIm5KorLPBjSlDVeFK4=; b=tBwFPEDkGqHDJiUbg7XWz0fBMtONcKdCYoBTKPCX9L3RiSE+Y9/C35tGN7gOw+aQHr W2CJ6I4lVty14LFMUp1hWy551kDhaL0YD4In0kLUxKjjJnU3QRXl7TUTTU3V4xZnrQAT DqAoBaeH6WKX3zJbOaq+86KU6EuO5H0KvHuRAniRUPooqDY3ByGjRQRl7sM0wyHsgAjA s/Rs2an0uXoXXus+uSQDKlZaixGkvtGLebZCORWGKXqfqMH8ozcH2SZ+vgHIhmjhxv5o /FZEoGSJhZb26gy3Xm2KDvnrEV9NpMgeq4rXNhBPXcykkpa6zgGm8N4qwQ1j+50nWT2B bFGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=5rw6P1RfbBgDaUtUsqc8ozYyaIm5KorLPBjSlDVeFK4=; b=uBckbQlVzMOgCunOGLM1tE9+l76PctJ2Q57KyWq/xfI3ciJFZjxiXYPcmQUPmx9ltu rY66nuzU78hnCOa+qU9ql1rIyr/WZNFDwN1qocozDcMwH8xZ2JSJviuggN5DvMwFvFDH Nk/WUhZVfBGL6tIw0T7s2z82ozWe8s/Od2ht05GEm2IpthKzisPMSLeJChK5MlfejBWX CJ6VC76xeLmYLXXdbZuKBEm+xwduvQ0xhUkdN5bmY7ZsSjGsNknVaNLtpl7PWYVl3J3e RGCgTov3yzhxYXPVXi7v3Pm4xODo6vbRI0R30fHPXT5VPGd5hsYpXtmO6lzkRTXYe7ji wYkw== X-Gm-Message-State: AOAM531w2iuUjYsnXYnd6sOG/hBnBSRdGCgIBrf4MnWjWyVRg04P8jMa KZ+WElmtc2J5YjzvN+K8evSdomzTmk3IT0bLyCG8xQ== X-Google-Smtp-Source: ABdhPJyaDgBMYArEFttQ4a4DKrOmM/NSzmtoNV42g0zX16iYxsYp9oahyAdR8PM7xTrd9vbwlHgm5zCvHOc6H2Od1I0= X-Received: by 2002:a05:6512:2348:: with SMTP id p8mr18693719lfu.428.1637180282322; Wed, 17 Nov 2021 12:18:02 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> In-Reply-To: From: Marcin Wojtas Date: Wed, 17 Nov 2021 21:17:51 +0100 Message-ID: Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables To: Kubilay Kocak Cc: Marcin Wojtas , src-committers , 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: 4HvZ4C50Zdz4p47 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, =C5=9Br., 17 lis 2021 o 00:42 Kubilay Kocak napisa=C5= =82(a): > > On 17/11/2021 9:26 am, Marcin Wojtas wrote: > > The branch main has been updated by mw: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Db014e0f15bc73d80ef49b64f= d1f8c29f469467cb > > > > commit b014e0f15bc73d80ef49b64fd1f8c29f469467cb > > Author: Marcin Wojtas > > AuthorDate: 2021-10-24 14:53:06 +0000 > > Commit: Marcin Wojtas > > CommitDate: 2021-11-16 22:16:09 +0000 > > > > Enable ASLR by default for 64-bit executables > > > > Address Space Layout Randomization (ASLR) is an exploit mitigation > > technique implemented in the majority of modern operating systems. > > It involves randomly positioning the base address of an executable > > and the position of libraries, heap, and stack, in a process's add= ress > > space. Although over the years ASLR proved to not guarantee full O= S > > security on its own, this mechanism can make exploitation more dif= ficult. > > > > Tests on the tier 1 64-bit architectures demonstrated that the ASL= R is > > stable and does not result in noticeable performance degradation, > > therefore it should be safe to enable this mechanism by default. > > Moreover its effectiveness is increased for PIE (Position Independ= ent > > Executable) binaries. Thanks to commit 9a227a2fd642 ("Enable PIE b= y > > default on 64-bit architectures"), building from src is not necess= ary > > to have PIE binaries. It is enough to control usage of ASLR in the > > OS solely by setting the appropriate sysctls. > > > > This patch toggles the kernel settings to use address map randomiz= ation > > for PIE & non-PIE 64-bit binaries. It also disables SBRK, in order > > to allow utilization of the bss grow region for mappings. The latt= er > > has no effect if ASLR is disabled, so apply it to all architecture= s. > > > > As for the drawbacks, a consequence of using the ASLR is more > > significant VM fragmentation, hence the issues may be encountered > > in the systems with a limited address space in high memory consump= tion > > cases, such as buildworld. As a result, although the tests on 32-b= it > > architectures with ASLR enabled were mostly on par with what was > > observed on 64-bit ones, the defaults for the former are not chang= ed > > at this time. Also, for the sake of safety keep the feature disabl= ed > > for 32-bit executables on 64-bit machines, too. > > > > The committed change affects the overall OS operation, so the > > following should be taken into consideration: > > * Address space fragmentation. > > * A changed ABI due to modified layout of address space. > > * More complicated debugging due to: > > * Non-reproducible address space layout between runs. > > * Some debuggers automatically disable ASLR for spawned processe= s, > > making target's environment different between debug and > > non-debug runs. > > > > In order to confirm/rule-out the dependency of any encountered iss= ue > > on ASLR it is strongly advised to re-run the test with the feature > > disabled - it can be done by setting the following sysctls > > in the /etc/sysctl.conf file: > > kern.elf64.aslr.enable=3D0 > > kern.elf64.aslr.pie_enable=3D0 > > > > Co-developed by: Dawid Gorecki > > Reviewed by: emaste, kib > > Obtained from: Semihalf > > Sponsored by: Stormshield > > MFC after: 1 month > > Differential revision: https://reviews.freebsd.org/D27666 > > --- > > sys/kern/imgact_elf.c | 20 +++++++++++++++++--- > > 1 file changed, 17 insertions(+), 3 deletions(-) > > > > diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c > > index 898f0f66a532..38ad61d8720b 100644 > > --- a/sys/kern/imgact_elf.c > > +++ b/sys/kern/imgact_elf.c > > @@ -161,19 +161,33 @@ SYSCTL_NODE(__CONCAT(_kern_elf, __ELF_WORD_SIZE),= OID_AUTO, aslr, > > ""); > > #define ASLR_NODE_OID __CONCAT(__CONCAT(_kern_elf, __ELF_WORD_S= IZE), _aslr) > > > > -static int __elfN(aslr_enabled) =3D 0; > > +/* > > + * While for 64-bit machines ASLR works properly, there are > > + * still some problems when using 32-bit architectures. For this > > + * reason ASLR is only enabled by default when running native > > + * 64-bit non-PIE executables. > > + */ > > +static int __elfN(aslr_enabled) =3D __ELF_WORD_SIZE =3D=3D 64; > > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, enable, CTLFLAG_RWTUN, > > &__elfN(aslr_enabled), 0, > > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) > > ": enable address map randomization"); > > > > -static int __elfN(pie_aslr_enabled) =3D 0; > > +/* > > + * Enable ASLR only for 64-bit PIE binaries by default. > > + */ > > +static int __elfN(pie_aslr_enabled) =3D __ELF_WORD_SIZE =3D=3D 64; > > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, pie_enable, CTLFLAG_RWTUN, > > &__elfN(pie_aslr_enabled), 0, > > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) > > ": enable address map randomization for PIE binaries"); > > The current description seems ambiguous with respect to the added > comment. If the sysctl (=3D1) applies ASLR "only" for PIE binaries, where > the =3D0 (sysctl disabled) case applies it unconditionally, a better > description might be: > > "Enable address map randomization only for PIE binaries" > > What is the actual/correct behaviour of the control? > The lower comment gets probably more context when read read together with the one preceding `aslr_enabled` variable. According to `man security`: kern.elf64.aslr.enable 64bit binaries ASLR control. kern.elf64.aslr.pie_enable 64bit PIE binaries ASLR control. So both are enabled by setting to 1 and responsible for the different kind of binaries. > Might aslr_enabled_pie_only also be a better OID name? Perhaps not worth > the churn, but long term it would be great if OID names reflected what > they are/do, rather than what they're not/don't do. > I agree that aslr_enable + pie_aslr_enable is somewhat confusing. And if it's confusing for the kernel developers, we cannot expect it's easier for the end users. > > -static int __elfN(aslr_honor_sbrk) =3D 1; > > +/* > > + * Sbrk is now deprecated and it can be assumed, that in most > > + * cases it will not be used anyway. This setting is valid only > > + * for the ASLR enabled and allows for utilizing the bss grow region. > > + */ > > +static int __elfN(aslr_honor_sbrk) =3D 0; > > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, honor_sbrk, CTLFLAG_RW, > > &__elfN(aslr_honor_sbrk), 0, > > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": assume sbrk is used"= ); > > > > Can we add (DEPRECATED) to the control description, and/or otherwise > mark the control as deprecated if the sysctl framework supports an > attribute marking them as such? > Do you mean the SBRK is deprecated or the tunable itself? Best regards, Marcin From nobody Wed Nov 17 20:22:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 90B4B1853E79; Wed, 17 Nov 2021 20:22: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 4HvZ8p2YYFz4qkc; Wed, 17 Nov 2021 20:22:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 261ED2783F; Wed, 17 Nov 2021 20:22: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 1AHKM2CZ059186; Wed, 17 Nov 2021 20:22:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKM2E6059185; Wed, 17 Nov 2021 20:22:02 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:02 GMT Message-Id: <202111172022.1AHKM2E6059185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 1739de97af19 - main - makesyscalls: make strip_abi_prefix more robust List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1739de97af19d2eb726becd38758fc7a06dcc6e9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1739de97af19d2eb726becd38758fc7a06dcc6e9 commit 1739de97af19d2eb726becd38758fc7a06dcc6e9 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:21 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:21 +0000 makesyscalls: make strip_abi_prefix more robust Allow strip_abi_prefix() to be called with nil and return nil in that case. This simplifies handling of RESERVED entries. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 7824a533e4d5..a390be8b6154 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -352,6 +352,9 @@ end local function strip_abi_prefix(funcname) local abiprefix = config["abi_func_prefix"] local stripped_name + if funcname == nil then + return nil + end if abiprefix ~= "" and funcname:find("^" .. abiprefix) then stripped_name = funcname:gsub("^" .. abiprefix, "") else From nobody Wed Nov 17 20:22:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7BF4A18542A9; Wed, 17 Nov 2021 20:22: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 4HvZ8r5WZPz4qq7; Wed, 17 Nov 2021 20:22:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6700D277F6; Wed, 17 Nov 2021 20:22: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 1AHKM4mD059234; Wed, 17 Nov 2021 20:22:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKM4po059233; Wed, 17 Nov 2021 20:22:04 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:04 GMT Message-Id: <202111172022.1AHKM4po059233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: b64f3dc26cbc - main - syscalls: [gs]etitimer takes an int which List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b64f3dc26cbc7a55c4c839cfde4f876684563507 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b64f3dc26cbc7a55c4c839cfde4f876684563507 commit b64f3dc26cbc7a55c4c839cfde4f876684563507 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:21 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:21 +0000 syscalls: [gs]etitimer takes an int which Match the function decleration which takes an int not a signed int. No functional change as the range of valid values is 0-2. Obtained from: CheriBSD Reviewed by: kevans --- sys/kern/syscalls.master | 4 ++-- sys/kern/systrace_args.c | 8 ++++---- sys/sys/sysproto.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 39992e9c7430..a69b99cb0693 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -545,7 +545,7 @@ } 83 AUE_SETITIMER STD|CAPENABLED { int setitimer( - u_int which, + int which, _In_ const struct itimerval *itv, _Out_opt_ struct itimerval *oitv ); @@ -560,7 +560,7 @@ } 86 AUE_GETITIMER STD|CAPENABLED { int getitimer( - u_int which, + int which, _Out_ struct itimerval *itv ); } diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index de96b132824b..55788649de4f 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -499,7 +499,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* setitimer */ case 83: { struct setitimer_args *p = params; - uarg[0] = p->which; /* u_int */ + iarg[0] = p->which; /* int */ uarg[1] = (intptr_t)p->itv; /* const struct itimerval * */ uarg[2] = (intptr_t)p->oitv; /* struct itimerval * */ *n_args = 3; @@ -515,7 +515,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* getitimer */ case 86: { struct getitimer_args *p = params; - uarg[0] = p->which; /* u_int */ + iarg[0] = p->which; /* int */ uarg[1] = (intptr_t)p->itv; /* struct itimerval * */ *n_args = 2; break; @@ -4180,7 +4180,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 83: switch (ndx) { case 0: - p = "u_int"; + p = "int"; break; case 1: p = "userland const struct itimerval *"; @@ -4206,7 +4206,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 86: switch (ndx) { case 0: - p = "u_int"; + p = "int"; break; case 1: p = "userland struct itimerval *"; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index d29620ac2d7f..b6b33df7b9cc 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -299,7 +299,7 @@ struct setpgid_args { char pgid_l_[PADL_(int)]; int pgid; char pgid_r_[PADR_(int)]; }; struct setitimer_args { - char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; + char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)]; char itv_l_[PADL_(const struct itimerval *)]; const struct itimerval * itv; char itv_r_[PADR_(const struct itimerval *)]; char oitv_l_[PADL_(struct itimerval *)]; struct itimerval * oitv; char oitv_r_[PADR_(struct itimerval *)]; }; @@ -310,7 +310,7 @@ struct swapon_args { char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; }; struct getitimer_args { - char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; + char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)]; char itv_l_[PADL_(struct itimerval *)]; struct itimerval * itv; char itv_r_[PADR_(struct itimerval *)]; }; struct getdtablesize_args { From nobody Wed Nov 17 20:22:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DEF911854036; Wed, 17 Nov 2021 20:22: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 4HvZ8q3N1bz4qSC; Wed, 17 Nov 2021 20:22:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4063E27899; Wed, 17 Nov 2021 20:22: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 1AHKM3RX059210; Wed, 17 Nov 2021 20:22:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKM3IJ059209; Wed, 17 Nov 2021 20:22:03 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:03 GMT Message-Id: <202111172022.1AHKM3IJ059209@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: b7fd86118fb5 - main - syscalls: sprinkle in const values List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7fd86118fb5d41f61fdfa003d11e9367770ff0a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b7fd86118fb5d41f61fdfa003d11e9367770ff0a commit b7fd86118fb5d41f61fdfa003d11e9367770ff0a Author: Brooks Davis AuthorDate: 2021-11-17 20:12:21 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:21 +0000 syscalls: sprinkle in const values Add missing const qualifiers to a number of syscall arguments. Obtained from: CheriBSD Reviewed by: kevans --- sys/kern/syscalls.master | 32 ++++++++++++------------ sys/kern/systrace_args.c | 64 ++++++++++++++++++++++++------------------------ sys/kern/vfs_syscalls.c | 10 ++++---- sys/sys/syscallsubr.h | 13 +++++----- sys/sys/sysproto.h | 32 ++++++++++++------------ 5 files changed, 76 insertions(+), 75 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 2c50bbe543ca..39992e9c7430 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -244,7 +244,7 @@ 28 AUE_SENDMSG STD|CAPENABLED { int sendmsg( int s, - _In_ struct msghdr *msg, + _In_ const struct msghdr *msg, int flags ); } @@ -388,7 +388,7 @@ } 53 AUE_SIGALTSTACK STD|CAPENABLED { int sigaltstack( - _In_opt_ stack_t *ss, + _In_opt_ const stack_t *ss, _Out_opt_ stack_t *oss ); } @@ -501,7 +501,7 @@ } 74 AUE_MPROTECT STD|CAPENABLED { int mprotect( - _In_ void *addr, + _In_ const void *addr, size_t len, int prot ); @@ -531,7 +531,7 @@ 80 AUE_SETGROUPS STD { int setgroups( int gidsetsize, - _In_reads_(gidsetsize) gid_t *gidset + _In_reads_(gidsetsize) const gid_t *gidset ); } 81 AUE_GETPGRP STD|CAPENABLED { @@ -546,7 +546,7 @@ 83 AUE_SETITIMER STD|CAPENABLED { int setitimer( u_int which, - _In_ struct itimerval *itv, + _In_ const struct itimerval *itv, _Out_opt_ struct itimerval *oitv ); } @@ -771,8 +771,8 @@ } 122 AUE_SETTIMEOFDAY STD { int settimeofday( - _In_ struct timeval *tv, - _In_opt_ struct timezone *tzp + _In_ const struct timeval *tv, + _In_opt_ const struct timezone *tzp ); } 123 AUE_FCHOWN STD|CAPENABLED { @@ -878,13 +878,13 @@ 138 AUE_UTIMES STD { int utimes( _In_z_ const char *path, - _In_ struct timeval *tptr + _In_ const struct timeval *tptr ); } 139 AUE_NULL OBSOL 4.2 sigreturn 140 AUE_ADJTIME STD { int adjtime( - _In_ struct timeval *delta, + _In_ const struct timeval *delta, _Out_opt_ struct timeval *olddelta ); } @@ -1219,7 +1219,7 @@ 206 AUE_FUTIMES STD|CAPENABLED { int futimes( int fd, - _In_reads_(2) struct timeval *tptr + _In_reads_(2) const struct timeval *tptr ); } 207 AUE_GETPGID STD|CAPENABLED { @@ -1480,7 +1480,7 @@ 276 AUE_LUTIMES STD { int lutimes( _In_z_ const char *path, - _In_ struct timeval *tptr + _In_ const struct timeval *tptr ); } 277 AUE_NULL OBSOL netbsd_msync @@ -2492,7 +2492,7 @@ int sd, _In_reads_bytes_(mlen) void *msg, int mlen, - _In_reads_bytes_(tolen) struct sockaddr *to, + _In_reads_bytes_(tolen) const struct sockaddr *to, __socklen_t tolen, _In_opt_ struct sctp_sndrcvinfo *sinfo, int flags @@ -2503,7 +2503,7 @@ int sd, _In_reads_(iovlen) struct iovec *iov, int iovlen, - _In_reads_bytes_(tolen) struct sockaddr *to, + _In_reads_bytes_(tolen) const struct sockaddr *to, __socklen_t tolen, _In_opt_ struct sctp_sndrcvinfo *sinfo, int flags @@ -2666,7 +2666,7 @@ int futimesat( int fd, _In_z_ const char *path, - _In_reads_(2) struct timeval *times + _In_reads_(2) const struct timeval *times ); } 495 AUE_LINKAT STD|CAPENABLED { @@ -3017,14 +3017,14 @@ 546 AUE_FUTIMES STD|CAPENABLED { int futimens( int fd, - _In_reads_(2) struct timespec *times + _In_reads_(2) const struct timespec *times ); } 547 AUE_FUTIMESAT STD|CAPENABLED { int utimensat( int fd, _In_z_ const char *path, - _In_reads_(2) struct timespec *times, + _In_reads_(2) const struct timespec *times, int flag ); } diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 8e34456d2fb2..de96b132824b 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -188,7 +188,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 28: { struct sendmsg_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t)p->msg; /* struct msghdr * */ + uarg[1] = (intptr_t)p->msg; /* const struct msghdr * */ iarg[2] = p->flags; /* int */ *n_args = 3; break; @@ -336,7 +336,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* sigaltstack */ case 53: { struct sigaltstack_args *p = params; - uarg[0] = (intptr_t)p->ss; /* stack_t * */ + uarg[0] = (intptr_t)p->ss; /* const stack_t * */ uarg[1] = (intptr_t)p->oss; /* stack_t * */ *n_args = 2; break; @@ -443,7 +443,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* mprotect */ case 74: { struct mprotect_args *p = params; - uarg[0] = (intptr_t)p->addr; /* void * */ + uarg[0] = (intptr_t)p->addr; /* const void * */ uarg[1] = p->len; /* size_t */ iarg[2] = p->prot; /* int */ *n_args = 3; @@ -479,7 +479,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 80: { struct setgroups_args *p = params; iarg[0] = p->gidsetsize; /* int */ - uarg[1] = (intptr_t)p->gidset; /* gid_t * */ + uarg[1] = (intptr_t)p->gidset; /* const gid_t * */ *n_args = 2; break; } @@ -500,7 +500,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 83: { struct setitimer_args *p = params; uarg[0] = p->which; /* u_int */ - uarg[1] = (intptr_t)p->itv; /* struct itimerval * */ + uarg[1] = (intptr_t)p->itv; /* const struct itimerval * */ uarg[2] = (intptr_t)p->oitv; /* struct itimerval * */ *n_args = 3; break; @@ -671,8 +671,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* settimeofday */ case 122: { struct settimeofday_args *p = params; - uarg[0] = (intptr_t)p->tv; /* struct timeval * */ - uarg[1] = (intptr_t)p->tzp; /* struct timezone * */ + uarg[0] = (intptr_t)p->tv; /* const struct timeval * */ + uarg[1] = (intptr_t)p->tzp; /* const struct timezone * */ *n_args = 2; break; } @@ -782,14 +782,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 138: { struct utimes_args *p = params; uarg[0] = (intptr_t)p->path; /* const char * */ - uarg[1] = (intptr_t)p->tptr; /* struct timeval * */ + uarg[1] = (intptr_t)p->tptr; /* const struct timeval * */ *n_args = 2; break; } /* adjtime */ case 140: { struct adjtime_args *p = params; - uarg[0] = (intptr_t)p->delta; /* struct timeval * */ + uarg[0] = (intptr_t)p->delta; /* const struct timeval * */ uarg[1] = (intptr_t)p->olddelta; /* struct timeval * */ *n_args = 2; break; @@ -1004,7 +1004,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 206: { struct futimes_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->tptr; /* struct timeval * */ + uarg[1] = (intptr_t)p->tptr; /* const struct timeval * */ *n_args = 2; break; } @@ -1332,7 +1332,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 276: { struct lutimes_args *p = params; uarg[0] = (intptr_t)p->path; /* const char * */ - uarg[1] = (intptr_t)p->tptr; /* struct timeval * */ + uarg[1] = (intptr_t)p->tptr; /* const struct timeval * */ *n_args = 2; break; } @@ -2476,7 +2476,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->sd; /* int */ uarg[1] = (intptr_t)p->msg; /* void * */ iarg[2] = p->mlen; /* int */ - uarg[3] = (intptr_t)p->to; /* struct sockaddr * */ + uarg[3] = (intptr_t)p->to; /* const struct sockaddr * */ iarg[4] = p->tolen; /* __socklen_t */ uarg[5] = (intptr_t)p->sinfo; /* struct sctp_sndrcvinfo * */ iarg[6] = p->flags; /* int */ @@ -2489,7 +2489,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->sd; /* int */ uarg[1] = (intptr_t)p->iov; /* struct iovec * */ iarg[2] = p->iovlen; /* int */ - uarg[3] = (intptr_t)p->to; /* struct sockaddr * */ + uarg[3] = (intptr_t)p->to; /* const struct sockaddr * */ iarg[4] = p->tolen; /* __socklen_t */ uarg[5] = (intptr_t)p->sinfo; /* struct sctp_sndrcvinfo * */ iarg[6] = p->flags; /* int */ @@ -2675,7 +2675,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct futimesat_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->path; /* const char * */ - uarg[2] = (intptr_t)p->times; /* struct timeval * */ + uarg[2] = (intptr_t)p->times; /* const struct timeval * */ *n_args = 3; break; } @@ -3105,7 +3105,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 546: { struct futimens_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->times; /* struct timespec * */ + uarg[1] = (intptr_t)p->times; /* const struct timespec * */ *n_args = 2; break; } @@ -3114,7 +3114,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct utimensat_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->path; /* const char * */ - uarg[2] = (intptr_t)p->times; /* struct timespec * */ + uarg[2] = (intptr_t)p->times; /* const struct timespec * */ iarg[3] = p->flag; /* int */ *n_args = 4; break; @@ -3693,7 +3693,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct msghdr *"; + p = "userland const struct msghdr *"; break; case 2: p = "int"; @@ -3924,7 +3924,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 53: switch (ndx) { case 0: - p = "userland stack_t *"; + p = "userland const stack_t *"; break; case 1: p = "userland stack_t *"; @@ -4090,7 +4090,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 74: switch (ndx) { case 0: - p = "userland void *"; + p = "userland const void *"; break; case 1: p = "size_t"; @@ -4154,7 +4154,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland gid_t *"; + p = "userland const gid_t *"; break; default: break; @@ -4183,7 +4183,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "u_int"; break; case 1: - p = "userland struct itimerval *"; + p = "userland const struct itimerval *"; break; case 2: p = "userland struct itimerval *"; @@ -4475,10 +4475,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 122: switch (ndx) { case 0: - p = "userland struct timeval *"; + p = "userland const struct timeval *"; break; case 1: - p = "userland struct timezone *"; + p = "userland const struct timezone *"; break; default: break; @@ -4665,7 +4665,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 1: - p = "userland struct timeval *"; + p = "userland const struct timeval *"; break; default: break; @@ -4675,7 +4675,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 140: switch (ndx) { case 0: - p = "userland struct timeval *"; + p = "userland const struct timeval *"; break; case 1: p = "userland struct timeval *"; @@ -5032,7 +5032,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct timeval *"; + p = "userland const struct timeval *"; break; default: break; @@ -5521,7 +5521,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 1: - p = "userland struct timeval *"; + p = "userland const struct timeval *"; break; default: break; @@ -7431,7 +7431,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 3: - p = "userland struct sockaddr *"; + p = "userland const struct sockaddr *"; break; case 4: p = "__socklen_t"; @@ -7459,7 +7459,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 3: - p = "userland struct sockaddr *"; + p = "userland const struct sockaddr *"; break; case 4: p = "__socklen_t"; @@ -7808,7 +7808,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 2: - p = "userland struct timeval *"; + p = "userland const struct timeval *"; break; default: break; @@ -8569,7 +8569,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct timespec *"; + p = "userland const struct timespec *"; break; default: break; @@ -8585,7 +8585,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 2: - p = "userland struct timespec *"; + p = "userland const struct timespec *"; break; case 3: p = "int"; diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index cedadc55b87f..4357669786f8 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3242,7 +3242,7 @@ sys_futimesat(struct thread *td, struct futimesat_args *uap) int kern_utimesat(struct thread *td, int fd, const char *path, - enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg) + enum uio_seg pathseg, const struct timeval *tptr, enum uio_seg tptrseg) { struct nameidata nd; struct timespec ts[2]; @@ -3280,7 +3280,7 @@ sys_lutimes(struct thread *td, struct lutimes_args *uap) int kern_lutimes(struct thread *td, const char *path, enum uio_seg pathseg, - struct timeval *tptr, enum uio_seg tptrseg) + const struct timeval *tptr, enum uio_seg tptrseg) { struct timespec ts[2]; struct nameidata nd; @@ -3314,7 +3314,7 @@ sys_futimes(struct thread *td, struct futimes_args *uap) } int -kern_futimes(struct thread *td, int fd, struct timeval *tptr, +kern_futimes(struct thread *td, int fd, const struct timeval *tptr, enum uio_seg tptrseg) { struct timespec ts[2]; @@ -3348,7 +3348,7 @@ sys_futimens(struct thread *td, struct futimens_args *uap) } int -kern_futimens(struct thread *td, int fd, struct timespec *tptr, +kern_futimens(struct thread *td, int fd, const struct timespec *tptr, enum uio_seg tptrseg) { struct timespec ts[2]; @@ -3386,7 +3386,7 @@ sys_utimensat(struct thread *td, struct utimensat_args *uap) int kern_utimensat(struct thread *td, int fd, const char *path, - enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg, + enum uio_seg pathseg, const struct timespec *tptr, enum uio_seg tptrseg, int flag) { struct nameidata nd; diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index ecd0da74329f..a10c84cd2ab7 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -147,9 +147,9 @@ int kern_fstat(struct thread *td, int fd, struct stat *sbp); int kern_fstatfs(struct thread *td, int fd, struct statfs *buf); int kern_fsync(struct thread *td, int fd, bool fullsync); int kern_ftruncate(struct thread *td, int fd, off_t length); -int kern_futimes(struct thread *td, int fd, struct timeval *tptr, +int kern_futimes(struct thread *td, int fd, const struct timeval *tptr, enum uio_seg tptrseg); -int kern_futimens(struct thread *td, int fd, struct timespec *tptr, +int kern_futimens(struct thread *td, int fd, const struct timespec *tptr, enum uio_seg tptrseg); int kern_getdirentries(struct thread *td, int fd, char *buf, size_t count, off_t *basep, ssize_t *residp, enum uio_seg bufseg); @@ -189,7 +189,7 @@ int kern_linkat(struct thread *td, int fd1, int fd2, const char *path1, int kern_listen(struct thread *td, int s, int backlog); int kern_lseek(struct thread *td, int fd, off_t offset, int whence); int kern_lutimes(struct thread *td, const char *path, enum uio_seg pathseg, - struct timeval *tptr, enum uio_seg tptrseg); + const struct timeval *tptr, enum uio_seg tptrseg); int kern_madvise(struct thread *td, uintptr_t addr, size_t len, int behav); int kern_mincore(struct thread *td, uintptr_t addr, size_t len, char *vec); int kern_minherit(struct thread *td, uintptr_t addr, size_t len, @@ -333,10 +333,11 @@ int kern_truncate(struct thread *td, const char *path, int kern_funlinkat(struct thread *td, int dfd, const char *path, int fd, enum uio_seg pathseg, int flag, ino_t oldinum); int kern_utimesat(struct thread *td, int fd, const char *path, - enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); + enum uio_seg pathseg, const struct timeval *tptr, + enum uio_seg tptrseg); int kern_utimensat(struct thread *td, int fd, const char *path, - enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg, - int flag); + enum uio_seg pathseg, const struct timespec *tptr, + enum uio_seg tptrseg, int flag); int kern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rup); int kern_wait6(struct thread *td, enum idtype idtype, id_t id, int *status, diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 5aadd3f0990b..d29620ac2d7f 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -127,7 +127,7 @@ struct recvmsg_args { }; struct sendmsg_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char msg_l_[PADL_(struct msghdr *)]; struct msghdr * msg; char msg_r_[PADR_(struct msghdr *)]; + char msg_l_[PADL_(const struct msghdr *)]; const struct msghdr * msg; char msg_r_[PADR_(const struct msghdr *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct recvfrom_args { @@ -213,7 +213,7 @@ struct osigpending_args { register_t dummy; }; struct sigaltstack_args { - char ss_l_[PADL_(stack_t *)]; stack_t * ss; char ss_r_[PADR_(stack_t *)]; + char ss_l_[PADL_(const stack_t *)]; const stack_t * ss; char ss_r_[PADR_(const stack_t *)]; char oss_l_[PADL_(stack_t *)]; stack_t * oss; char oss_r_[PADR_(stack_t *)]; }; struct ioctl_args { @@ -269,7 +269,7 @@ struct munmap_args { char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; }; struct mprotect_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; }; @@ -289,7 +289,7 @@ struct getgroups_args { }; struct setgroups_args { char gidsetsize_l_[PADL_(int)]; int gidsetsize; char gidsetsize_r_[PADR_(int)]; - char gidset_l_[PADL_(gid_t *)]; gid_t * gidset; char gidset_r_[PADR_(gid_t *)]; + char gidset_l_[PADL_(const gid_t *)]; const gid_t * gidset; char gidset_r_[PADR_(const gid_t *)]; }; struct getpgrp_args { register_t dummy; @@ -300,7 +300,7 @@ struct setpgid_args { }; struct setitimer_args { char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; - char itv_l_[PADL_(struct itimerval *)]; struct itimerval * itv; char itv_r_[PADR_(struct itimerval *)]; + char itv_l_[PADL_(const struct itimerval *)]; const struct itimerval * itv; char itv_r_[PADR_(const struct itimerval *)]; char oitv_l_[PADL_(struct itimerval *)]; struct itimerval * oitv; char oitv_r_[PADR_(struct itimerval *)]; }; struct owait_args { @@ -396,8 +396,8 @@ struct writev_args { char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; }; struct settimeofday_args { - char tv_l_[PADL_(struct timeval *)]; struct timeval * tv; char tv_r_[PADR_(struct timeval *)]; - char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)]; + char tv_l_[PADL_(const struct timeval *)]; const struct timeval * tv; char tv_r_[PADR_(const struct timeval *)]; + char tzp_l_[PADL_(const struct timezone *)]; const struct timezone * tzp; char tzp_r_[PADR_(const struct timezone *)]; }; struct fchown_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -455,10 +455,10 @@ struct rmdir_args { }; struct utimes_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char tptr_l_[PADL_(struct timeval *)]; struct timeval * tptr; char tptr_r_[PADR_(struct timeval *)]; + char tptr_l_[PADL_(const struct timeval *)]; const struct timeval * tptr; char tptr_r_[PADR_(const struct timeval *)]; }; struct adjtime_args { - char delta_l_[PADL_(struct timeval *)]; struct timeval * delta; char delta_r_[PADR_(struct timeval *)]; + char delta_l_[PADL_(const struct timeval *)]; const struct timeval * delta; char delta_r_[PADR_(const struct timeval *)]; char olddelta_l_[PADL_(struct timeval *)]; struct timeval * olddelta; char olddelta_r_[PADR_(struct timeval *)]; }; struct ogethostid_args { @@ -576,7 +576,7 @@ struct undelete_args { }; struct futimes_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char tptr_l_[PADL_(struct timeval *)]; struct timeval * tptr; char tptr_r_[PADR_(struct timeval *)]; + char tptr_l_[PADL_(const struct timeval *)]; const struct timeval * tptr; char tptr_r_[PADR_(const struct timeval *)]; }; struct getpgid_args { char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)]; @@ -720,7 +720,7 @@ struct lchmod_args { }; struct lutimes_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char tptr_l_[PADL_(struct timeval *)]; struct timeval * tptr; char tptr_r_[PADR_(struct timeval *)]; + char tptr_l_[PADL_(const struct timeval *)]; const struct timeval * tptr; char tptr_r_[PADR_(const struct timeval *)]; }; struct preadv_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -1320,7 +1320,7 @@ struct sctp_generic_sendmsg_args { char sd_l_[PADL_(int)]; int sd; char sd_r_[PADR_(int)]; char msg_l_[PADL_(void *)]; void * msg; char msg_r_[PADR_(void *)]; char mlen_l_[PADL_(int)]; int mlen; char mlen_r_[PADR_(int)]; - char to_l_[PADL_(struct sockaddr *)]; struct sockaddr * to; char to_r_[PADR_(struct sockaddr *)]; + char to_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * to; char to_r_[PADR_(const struct sockaddr *)]; char tolen_l_[PADL_(__socklen_t)]; __socklen_t tolen; char tolen_r_[PADR_(__socklen_t)]; char sinfo_l_[PADL_(struct sctp_sndrcvinfo *)]; struct sctp_sndrcvinfo * sinfo; char sinfo_r_[PADR_(struct sctp_sndrcvinfo *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -1329,7 +1329,7 @@ struct sctp_generic_sendmsg_iov_args { char sd_l_[PADL_(int)]; int sd; char sd_r_[PADR_(int)]; char iov_l_[PADL_(struct iovec *)]; struct iovec * iov; char iov_r_[PADR_(struct iovec *)]; char iovlen_l_[PADL_(int)]; int iovlen; char iovlen_r_[PADR_(int)]; - char to_l_[PADL_(struct sockaddr *)]; struct sockaddr * to; char to_r_[PADR_(struct sockaddr *)]; + char to_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * to; char to_r_[PADR_(const struct sockaddr *)]; char tolen_l_[PADL_(__socklen_t)]; __socklen_t tolen; char tolen_r_[PADR_(__socklen_t)]; char sinfo_l_[PADL_(struct sctp_sndrcvinfo *)]; struct sctp_sndrcvinfo * sinfo; char sinfo_r_[PADR_(struct sctp_sndrcvinfo *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -1439,7 +1439,7 @@ struct fexecve_args { struct futimesat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char times_l_[PADL_(struct timeval *)]; struct timeval * times; char times_r_[PADR_(struct timeval *)]; + char times_l_[PADL_(const struct timeval *)]; const struct timeval * times; char times_r_[PADR_(const struct timeval *)]; }; struct linkat_args { char fd1_l_[PADL_(int)]; int fd1; char fd1_r_[PADR_(int)]; @@ -1679,12 +1679,12 @@ struct ppoll_args { }; struct futimens_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; + char times_l_[PADL_(const struct timespec *)]; const struct timespec * times; char times_r_[PADR_(const struct timespec *)]; }; struct utimensat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; + char times_l_[PADL_(const struct timespec *)]; const struct timespec * times; char times_r_[PADR_(const struct timespec *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; struct fdatasync_args { From nobody Wed Nov 17 20:22:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D9E381854409; Wed, 17 Nov 2021 20:22: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 4HvZ8v39JTz4qf3; Wed, 17 Nov 2021 20:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE50327840; Wed, 17 Nov 2021 20:22: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 1AHKM6WY059283; Wed, 17 Nov 2021 20:22:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKM6FR059282; Wed, 17 Nov 2021 20:22:06 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:06 GMT Message-Id: <202111172022.1AHKM6FR059282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: f503288262e5 - main - syscalls: fix type of osendmsg List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f503288262e53d068d397fe8681c5cc52760e332 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f503288262e53d068d397fe8681c5cc52760e332 commit f503288262e53d068d397fe8681c5cc52760e332 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:22 +0000 syscalls: fix type of osendmsg osendmsg takes an struct omsghdr * not a void *. Reviewed by: kevans --- sys/kern/syscalls.master | 2 +- sys/sys/sysproto.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 2ffefdef04a3..bacf76a94437 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -728,7 +728,7 @@ 114 AUE_SENDMSG COMPAT|CAPENABLED { int sendmsg( int s, - _In_ const void *msg, + _In_ const struct omsghdr *msg, int flags ); } diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index c95fed5a0f3c..ee1517573afa 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -2353,7 +2353,7 @@ struct orecvmsg_args { }; struct osendmsg_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char msg_l_[PADL_(const void *)]; const void * msg; char msg_r_[PADR_(const void *)]; + char msg_l_[PADL_(const struct omsghdr *)]; const struct omsghdr * msg; char msg_r_[PADR_(const struct omsghdr *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct otruncate_args { From nobody Wed Nov 17 20:22:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0952F185425B; Wed, 17 Nov 2021 20:22: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 4HvZ8t4Sm9z4qs3; Wed, 17 Nov 2021 20:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A10C2789A; Wed, 17 Nov 2021 20: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 1AHKM5FA059258; Wed, 17 Nov 2021 20: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 1AHKM5UL059257; Wed, 17 Nov 2021 20:22:05 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:05 GMT Message-Id: <202111172022.1AHKM5UL059257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 2385f4d1728b - main - syscalls: use __socklen_t as appropriate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2385f4d1728b327172c3a4a944f984bd91625a6f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=2385f4d1728b327172c3a4a944f984bd91625a6f commit 2385f4d1728b327172c3a4a944f984bd91625a6f Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:22 +0000 syscalls: use __socklen_t as appropriate No functional change as __socklen_t is an int. Obtained from: CheriBSD Reviewed by: kevans --- sys/kern/syscalls.master | 22 +++++++++++----------- sys/kern/systrace_args.c | 28 ++++++++++++++-------------- sys/sys/sysproto.h | 18 +++++++++--------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index a69b99cb0693..2ffefdef04a3 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -628,14 +628,14 @@ int connect( int s, _In_reads_bytes_(namelen) const struct sockaddr *name, - int namelen + __socklen_t namelen ); } 99 AUE_ACCEPT COMPAT|CAPENABLED { int accept( int s, _Out_writes_bytes_opt_(*anamelen) struct sockaddr *name, - int *anamelen + __socklen_t *anamelen ); } 100 AUE_GETPRIORITY STD|CAPENABLED { @@ -669,7 +669,7 @@ int bind( int s, _In_reads_bytes_(namelen) const struct sockaddr *name, - int namelen + __socklen_t namelen ); } 105 AUE_SETSOCKOPT STD|CAPENABLED { @@ -678,7 +678,7 @@ int level, int name, _In_reads_bytes_opt_(valsize) const void *val, - int valsize + __socklen_t valsize ); } 106 AUE_LISTEN STD|CAPENABLED { @@ -751,7 +751,7 @@ int level, int name, _Out_writes_bytes_opt_(*avalsize) void *val, - _Inout_ int *avalsize + _Inout_ __socklen_t *avalsize ); } 119 AUE_NULL RESERVED @@ -795,7 +795,7 @@ size_t len, int flags, _Out_writes_bytes_(*fromlenaddr) struct sockaddr *from, - _Inout_ int *fromlenaddr + _Inout_ __socklen_t *fromlenaddr ); } recvfrom recvfrom_args int 126 AUE_SETREUID STD|CAPENABLED { @@ -847,7 +847,7 @@ size_t len, int flags, _In_reads_bytes_opt_(tolen) const struct sockaddr *to, - int tolen + __socklen_t tolen ); } 134 AUE_SHUTDOWN STD|CAPENABLED { @@ -892,7 +892,7 @@ int getpeername( int fdes, _Out_writes_bytes_(*alen) struct sockaddr *asa, - _Inout_opt_ int *alen + _Inout_opt_ __socklen_t *alen ); } 142 AUE_SYSCTL COMPAT|CAPENABLED { @@ -939,7 +939,7 @@ int getsockname( int fdec, _Out_writes_bytes_(*alen) struct sockaddr *asa, - _Inout_ int *alen + _Inout_ __socklen_t *alen ); } getsockname getsockname_args int 151-153 AUE_NULL RESERVED @@ -2960,7 +2960,7 @@ int fd, int s, _In_reads_bytes_(namelen) const struct sockaddr *name, - int namelen + __socklen_t namelen ); } 539 AUE_CONNECTAT STD|CAPENABLED { @@ -2968,7 +2968,7 @@ int fd, int s, _In_reads_bytes_(namelen) const struct sockaddr *name, - int namelen + __socklen_t namelen ); } 540 AUE_CHFLAGSAT STD|CAPENABLED { diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 55788649de4f..ab8e4d0d49d3 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -583,7 +583,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct connect_args *p = params; iarg[0] = p->s; /* int */ uarg[1] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[2] = p->namelen; /* int */ + iarg[2] = p->namelen; /* __socklen_t */ *n_args = 3; break; } @@ -600,7 +600,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct bind_args *p = params; iarg[0] = p->s; /* int */ uarg[1] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[2] = p->namelen; /* int */ + iarg[2] = p->namelen; /* __socklen_t */ *n_args = 3; break; } @@ -611,7 +611,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[1] = p->level; /* int */ iarg[2] = p->name; /* int */ uarg[3] = (intptr_t)p->val; /* const void * */ - iarg[4] = p->valsize; /* int */ + iarg[4] = p->valsize; /* __socklen_t */ *n_args = 5; break; } @@ -646,7 +646,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[1] = p->level; /* int */ iarg[2] = p->name; /* int */ uarg[3] = (intptr_t)p->val; /* void * */ - uarg[4] = (intptr_t)p->avalsize; /* int * */ + uarg[4] = (intptr_t)p->avalsize; /* __socklen_t * */ *n_args = 5; break; } @@ -741,7 +741,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[2] = p->len; /* size_t */ iarg[3] = p->flags; /* int */ uarg[4] = (intptr_t)p->to; /* const struct sockaddr * */ - iarg[5] = p->tolen; /* int */ + iarg[5] = p->tolen; /* __socklen_t */ *n_args = 6; break; } @@ -3032,7 +3032,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ uarg[2] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[3] = p->namelen; /* int */ + iarg[3] = p->namelen; /* __socklen_t */ *n_args = 4; break; } @@ -3042,7 +3042,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ uarg[2] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[3] = p->namelen; /* int */ + iarg[3] = p->namelen; /* __socklen_t */ *n_args = 4; break; } @@ -4321,7 +4321,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 2: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -4350,7 +4350,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 2: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -4372,7 +4372,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const void *"; break; case 4: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -4433,7 +4433,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland void *"; break; case 4: - p = "userland int *"; + p = "userland __socklen_t *"; break; default: break; @@ -4597,7 +4597,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 5: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -8438,7 +8438,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 3: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -8457,7 +8457,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 3: - p = "int"; + p = "__socklen_t"; break; default: break; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index b6b33df7b9cc..c95fed5a0f3c 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -348,7 +348,7 @@ struct socket_args { struct connect_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char name_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * name; char name_r_[PADR_(const struct sockaddr *)]; - char namelen_l_[PADL_(int)]; int namelen; char namelen_r_[PADR_(int)]; + char namelen_l_[PADL_(__socklen_t)]; __socklen_t namelen; char namelen_r_[PADR_(__socklen_t)]; }; struct getpriority_args { char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)]; @@ -357,14 +357,14 @@ struct getpriority_args { struct bind_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char name_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * name; char name_r_[PADR_(const struct sockaddr *)]; - char namelen_l_[PADL_(int)]; int namelen; char namelen_r_[PADR_(int)]; + char namelen_l_[PADL_(__socklen_t)]; __socklen_t namelen; char namelen_r_[PADR_(__socklen_t)]; }; struct setsockopt_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char level_l_[PADL_(int)]; int level; char level_r_[PADR_(int)]; char name_l_[PADL_(int)]; int name; char name_r_[PADR_(int)]; char val_l_[PADL_(const void *)]; const void * val; char val_r_[PADR_(const void *)]; - char valsize_l_[PADL_(int)]; int valsize; char valsize_r_[PADR_(int)]; + char valsize_l_[PADL_(__socklen_t)]; __socklen_t valsize; char valsize_r_[PADR_(__socklen_t)]; }; struct listen_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; @@ -383,7 +383,7 @@ struct getsockopt_args { char level_l_[PADL_(int)]; int level; char level_r_[PADR_(int)]; char name_l_[PADL_(int)]; int name; char name_r_[PADR_(int)]; char val_l_[PADL_(void *)]; void * val; char val_r_[PADR_(void *)]; - char avalsize_l_[PADL_(int *)]; int * avalsize; char avalsize_r_[PADR_(int *)]; + char avalsize_l_[PADL_(__socklen_t *)]; __socklen_t * avalsize; char avalsize_r_[PADR_(__socklen_t *)]; }; struct readv_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -434,7 +434,7 @@ struct sendto_args { char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; char to_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * to; char to_r_[PADR_(const struct sockaddr *)]; - char tolen_l_[PADL_(int)]; int tolen; char tolen_r_[PADR_(int)]; + char tolen_l_[PADL_(__socklen_t)]; __socklen_t tolen; char tolen_r_[PADR_(__socklen_t)]; }; struct shutdown_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; @@ -1638,13 +1638,13 @@ struct bindat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char name_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * name; char name_r_[PADR_(const struct sockaddr *)]; - char namelen_l_[PADL_(int)]; int namelen; char namelen_r_[PADR_(int)]; + char namelen_l_[PADL_(__socklen_t)]; __socklen_t namelen; char namelen_r_[PADR_(__socklen_t)]; }; struct connectat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char name_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * name; char name_r_[PADR_(const struct sockaddr *)]; - char namelen_l_[PADL_(int)]; int namelen; char namelen_r_[PADR_(int)]; + char namelen_l_[PADL_(__socklen_t)]; __socklen_t namelen; char namelen_r_[PADR_(__socklen_t)]; }; struct chflagsat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -2311,7 +2311,7 @@ struct osethostname_args { struct oaccept_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char name_l_[PADL_(struct sockaddr *)]; struct sockaddr * name; char name_r_[PADR_(struct sockaddr *)]; - char anamelen_l_[PADL_(int *)]; int * anamelen; char anamelen_r_[PADR_(int *)]; + char anamelen_l_[PADL_(__socklen_t *)]; __socklen_t * anamelen; char anamelen_r_[PADR_(__socklen_t *)]; }; struct osend_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; @@ -2367,7 +2367,7 @@ struct oftruncate_args { struct ogetpeername_args { char fdes_l_[PADL_(int)]; int fdes; char fdes_r_[PADR_(int)]; char asa_l_[PADL_(struct sockaddr *)]; struct sockaddr * asa; char asa_r_[PADR_(struct sockaddr *)]; - char alen_l_[PADL_(int *)]; int * alen; char alen_r_[PADR_(int *)]; + char alen_l_[PADL_(__socklen_t *)]; __socklen_t * alen; char alen_r_[PADR_(__socklen_t *)]; }; struct osethostid_args { char hostid_l_[PADL_(long)]; long hostid; char hostid_r_[PADR_(long)]; From nobody Wed Nov 17 20:22:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F286E1854457; Wed, 17 Nov 2021 20:22: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 4HvZ8x1LCgz4qn4; Wed, 17 Nov 2021 20:22:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D13BD27368; Wed, 17 Nov 2021 20:22: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 1AHKM7Zx059313; Wed, 17 Nov 2021 20:22:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKM7Ib059312; Wed, 17 Nov 2021 20:22:07 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:07 GMT Message-Id: <202111172022.1AHKM7Ib059312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 85d1d2a675c8 - main - syscalls: use struct siginfo rather than siginfo_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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 85d1d2a675c83d02591a96819c726fd597750d79 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=85d1d2a675c83d02591a96819c726fd597750d79 commit 85d1d2a675c83d02591a96819c726fd597750d79 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:22 +0000 syscalls: use struct siginfo rather than siginfo_t This allows freebsd32 to use struct siginfo32 with an automatable conversion. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 8 ++++---- sys/compat/freebsd32/freebsd32_systrace_args.c | 16 ++++++++-------- sys/compat/freebsd32/syscalls.master | 8 ++++---- sys/kern/syscalls.master | 6 +++--- sys/kern/systrace_args.c | 12 ++++++------ sys/sys/sysproto.h | 6 +++--- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 2ddd5f472ccf..29bde63f4cec 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -297,12 +297,12 @@ struct freebsd32_jail_args { }; struct freebsd32_sigtimedwait_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)]; }; struct freebsd32_sigwaitinfo_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; }; struct freebsd32_aio_waitcomplete_args { char aiocbp_l_[PADL_(struct aiocb32 **)]; struct aiocb32 ** aiocbp; char aiocbp_r_[PADR_(struct aiocb32 **)]; @@ -604,7 +604,7 @@ struct freebsd32_wait6_args { char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; char wrusage_l_[PADL_(struct wrusage32 *)]; struct wrusage32 * wrusage; char wrusage_r_[PADR_(struct wrusage32 *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; }; #else struct freebsd32_posix_fallocate_args { @@ -629,7 +629,7 @@ struct freebsd32_wait6_args { char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; char wrusage_l_[PADL_(struct wrusage32 *)]; struct wrusage32 * wrusage; char wrusage_r_[PADR_(struct wrusage32 *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; }; #endif struct freebsd32_cap_ioctls_limit_args { diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 96a67aef6255..64e500aaad25 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1593,7 +1593,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 345: { struct freebsd32_sigtimedwait_args *p = params; uarg[0] = (intptr_t)p->set; /* const sigset_t * */ - uarg[1] = (intptr_t)p->info; /* siginfo_t * */ + uarg[1] = (intptr_t)p->info; /* struct siginfo32 * */ uarg[2] = (intptr_t)p->timeout; /* const struct timespec * */ *n_args = 3; break; @@ -1602,7 +1602,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 346: { struct freebsd32_sigwaitinfo_args *p = params; uarg[0] = (intptr_t)p->set; /* const sigset_t * */ - uarg[1] = (intptr_t)p->info; /* siginfo_t * */ + uarg[1] = (intptr_t)p->info; /* struct siginfo32 * */ *n_args = 2; break; } @@ -2916,7 +2916,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[4] = (intptr_t)p->status; /* int * */ iarg[5] = p->options; /* int */ uarg[6] = (intptr_t)p->wrusage; /* struct wrusage32 * */ - uarg[7] = (intptr_t)p->info; /* siginfo_t * */ + uarg[7] = (intptr_t)p->info; /* struct siginfo32 * */ *n_args = 8; break; } @@ -2953,7 +2953,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[3] = (intptr_t)p->status; /* int * */ iarg[4] = p->options; /* int */ uarg[5] = (intptr_t)p->wrusage; /* struct wrusage32 * */ - uarg[6] = (intptr_t)p->info; /* siginfo_t * */ + uarg[6] = (intptr_t)p->info; /* struct siginfo32 * */ *n_args = 7; break; } @@ -5929,7 +5929,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const sigset_t *"; break; case 1: - p = "userland siginfo_t *"; + p = "userland struct siginfo32 *"; break; case 2: p = "userland const struct timespec *"; @@ -5945,7 +5945,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const sigset_t *"; break; case 1: - p = "userland siginfo_t *"; + p = "userland struct siginfo32 *"; break; default: break; @@ -8298,7 +8298,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct wrusage32 *"; break; case 7: - p = "userland siginfo_t *"; + p = "userland struct siginfo32 *"; break; default: break; @@ -8374,7 +8374,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct wrusage32 *"; break; case 6: - p = "userland siginfo_t *"; + p = "userland struct siginfo32 *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index c76e6b426b2e..1cf37d777c25 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -627,10 +627,10 @@ 344 AUE_SIGRETURN COMPAT4 { int freebsd32_sigreturn( \ const struct freebsd4_freebsd32_ucontext *sigcntxp); } 345 AUE_SIGWAIT STD { int freebsd32_sigtimedwait(const sigset_t *set, \ - siginfo_t *info, \ + struct siginfo32 *info, \ const struct timespec *timeout); } 346 AUE_NULL STD { int freebsd32_sigwaitinfo(const sigset_t *set, \ - siginfo_t *info); } + struct siginfo32 *info); } 347 AUE_ACL_GET_FILE NOPROTO { int __acl_get_file(const char *path, \ acl_type_t type, struct acl *aclp); } 348 AUE_ACL_SET_FILE NOPROTO { int __acl_set_file(const char *path, \ @@ -1036,7 +1036,7 @@ uint32_t id1, uint32_t id2, \ int *status, int options, \ struct wrusage32 *wrusage, \ - siginfo_t *info); } + struct siginfo32 *info); } #else 530 AUE_POSIX_FALLOCATE STD { int freebsd32_posix_fallocate(int fd,\ uint32_t offset1, uint32_t offset2,\ @@ -1049,7 +1049,7 @@ uint32_t id1, uint32_t id2, \ int *status, int options, \ struct wrusage32 *wrusage, \ - siginfo_t *info); } + struct siginfo32 *info); } #endif 533 AUE_CAP_RIGHTS_LIMIT NOPROTO { \ int cap_rights_limit(int fd, \ diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index bacf76a94437..a4dcac75b2b3 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1783,14 +1783,14 @@ 345 AUE_SIGWAIT STD|CAPENABLED { int sigtimedwait( _In_ const sigset_t *set, - _Out_opt_ siginfo_t *info, + _Out_opt_ struct siginfo *info, _In_opt_ const struct timespec *timeout ); } 346 AUE_NULL STD|CAPENABLED { int sigwaitinfo( _In_ const sigset_t *set, - _Out_opt_ siginfo_t *info + _Out_opt_ struct siginfo *info ); } 347 AUE_ACL_GET_FILE STD { @@ -2920,7 +2920,7 @@ _Out_opt_ int *status, int options, _Out_opt_ struct __wrusage *wrusage, - _Out_opt_ siginfo_t *info + _Out_opt_ struct siginfo *info ); } 533 AUE_CAP_RIGHTS_LIMIT STD|CAPENABLED { diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index ab8e4d0d49d3..140dbea1474e 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -1638,7 +1638,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 345: { struct sigtimedwait_args *p = params; uarg[0] = (intptr_t)p->set; /* const sigset_t * */ - uarg[1] = (intptr_t)p->info; /* siginfo_t * */ + uarg[1] = (intptr_t)p->info; /* struct siginfo * */ uarg[2] = (intptr_t)p->timeout; /* const struct timespec * */ *n_args = 3; break; @@ -1647,7 +1647,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 346: { struct sigwaitinfo_args *p = params; uarg[0] = (intptr_t)p->set; /* const sigset_t * */ - uarg[1] = (intptr_t)p->info; /* siginfo_t * */ + uarg[1] = (intptr_t)p->info; /* struct siginfo * */ *n_args = 2; break; } @@ -2980,7 +2980,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[2] = (intptr_t)p->status; /* int * */ iarg[3] = p->options; /* int */ uarg[4] = (intptr_t)p->wrusage; /* struct __wrusage * */ - uarg[5] = (intptr_t)p->info; /* siginfo_t * */ + uarg[5] = (intptr_t)p->info; /* struct siginfo * */ *n_args = 6; break; } @@ -5996,7 +5996,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const sigset_t *"; break; case 1: - p = "userland siginfo_t *"; + p = "userland struct siginfo *"; break; case 2: p = "userland const struct timespec *"; @@ -6012,7 +6012,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const sigset_t *"; break; case 1: - p = "userland siginfo_t *"; + p = "userland struct siginfo *"; break; default: break; @@ -8348,7 +8348,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct __wrusage *"; break; case 5: - p = "userland siginfo_t *"; + p = "userland struct siginfo *"; break; default: break; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index ee1517573afa..64d38cbff42f 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -872,12 +872,12 @@ struct sigpending_args { }; struct sigtimedwait_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo *)]; struct siginfo * info; char info_r_[PADR_(struct siginfo *)]; char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)]; }; struct sigwaitinfo_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo *)]; struct siginfo * info; char info_r_[PADR_(struct siginfo *)]; }; struct __acl_get_file_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; @@ -1610,7 +1610,7 @@ struct wait6_args { char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; char wrusage_l_[PADL_(struct __wrusage *)]; struct __wrusage * wrusage; char wrusage_r_[PADR_(struct __wrusage *)]; - char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; + char info_l_[PADL_(struct siginfo *)]; struct siginfo * info; char info_r_[PADR_(struct siginfo *)]; }; struct cap_rights_limit_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; From nobody Wed Nov 17 20:22:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 826A51854618; Wed, 17 Nov 2021 20:22: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 4HvZ8z3CY2z4qlm; Wed, 17 Nov 2021 20:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E1912736A; Wed, 17 Nov 2021 20:22: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 1AHKM9lg059361; Wed, 17 Nov 2021 20:22:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKM9lC059360; Wed, 17 Nov 2021 20:22:09 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:09 GMT Message-Id: <202111172022.1AHKM9lC059360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6de7c05379b8 - main - freebsd32: name the ucontext struct __ucontext32 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6de7c05379b8e89be9dfbff7dc74ceb936ef7960 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6de7c05379b8e89be9dfbff7dc74ceb936ef7960 commit 6de7c05379b8e89be9dfbff7dc74ceb936ef7960 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:22 +0000 freebsd32: name the ucontext struct __ucontext32 This matches the default ABI's struct __ucontext. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 10 +++++----- sys/compat/freebsd32/freebsd32_systrace_args.c | 20 ++++++++++---------- sys/compat/freebsd32/syscalls.master | 10 +++++----- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 9b67675e3e05..7701d6ac0b26 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -340,17 +340,17 @@ struct freebsd32_sigaction_args { char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)]; }; struct freebsd32_sigreturn_args { - char sigcntxp_l_[PADL_(const struct freebsd32_ucontext *)]; const struct freebsd32_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd32_ucontext *)]; + char sigcntxp_l_[PADL_(const struct __ucontext32 *)]; const struct __ucontext32 * sigcntxp; char sigcntxp_r_[PADR_(const struct __ucontext32 *)]; }; struct freebsd32_getcontext_args { - char ucp_l_[PADL_(struct freebsd32_ucontext *)]; struct freebsd32_ucontext * ucp; char ucp_r_[PADR_(struct freebsd32_ucontext *)]; + char ucp_l_[PADL_(struct __ucontext32 *)]; struct __ucontext32 * ucp; char ucp_r_[PADR_(struct __ucontext32 *)]; }; struct freebsd32_setcontext_args { - char ucp_l_[PADL_(const struct freebsd32_ucontext *)]; const struct freebsd32_ucontext * ucp; char ucp_r_[PADR_(const struct freebsd32_ucontext *)]; + char ucp_l_[PADL_(const struct __ucontext32 *)]; const struct __ucontext32 * ucp; char ucp_r_[PADR_(const struct __ucontext32 *)]; }; struct freebsd32_swapcontext_args { - char oucp_l_[PADL_(struct freebsd32_ucontext *)]; struct freebsd32_ucontext * oucp; char oucp_r_[PADR_(struct freebsd32_ucontext *)]; - char ucp_l_[PADL_(const struct freebsd32_ucontext *)]; const struct freebsd32_ucontext * ucp; char ucp_r_[PADR_(const struct freebsd32_ucontext *)]; + char oucp_l_[PADL_(struct __ucontext32 *)]; struct __ucontext32 * oucp; char oucp_r_[PADR_(struct __ucontext32 *)]; + char ucp_l_[PADL_(const struct __ucontext32 *)]; const struct __ucontext32 * ucp; char ucp_r_[PADR_(const struct __ucontext32 *)]; }; struct freebsd32_ksem_timedwait_args { char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 64e500aaad25..8cc005c47ef2 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1956,29 +1956,29 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_sigreturn */ case 417: { struct freebsd32_sigreturn_args *p = params; - uarg[0] = (intptr_t)p->sigcntxp; /* const struct freebsd32_ucontext * */ + uarg[0] = (intptr_t)p->sigcntxp; /* const struct __ucontext32 * */ *n_args = 1; break; } /* freebsd32_getcontext */ case 421: { struct freebsd32_getcontext_args *p = params; - uarg[0] = (intptr_t)p->ucp; /* struct freebsd32_ucontext * */ + uarg[0] = (intptr_t)p->ucp; /* struct __ucontext32 * */ *n_args = 1; break; } /* freebsd32_setcontext */ case 422: { struct freebsd32_setcontext_args *p = params; - uarg[0] = (intptr_t)p->ucp; /* const struct freebsd32_ucontext * */ + uarg[0] = (intptr_t)p->ucp; /* const struct __ucontext32 * */ *n_args = 1; break; } /* freebsd32_swapcontext */ case 423: { struct freebsd32_swapcontext_args *p = params; - uarg[0] = (intptr_t)p->oucp; /* struct freebsd32_ucontext * */ - uarg[1] = (intptr_t)p->ucp; /* const struct freebsd32_ucontext * */ + uarg[0] = (intptr_t)p->oucp; /* struct __ucontext32 * */ + uarg[1] = (intptr_t)p->ucp; /* const struct __ucontext32 * */ *n_args = 2; break; } @@ -6566,7 +6566,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 417: switch (ndx) { case 0: - p = "userland const struct freebsd32_ucontext *"; + p = "userland const struct __ucontext32 *"; break; default: break; @@ -6576,7 +6576,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 421: switch (ndx) { case 0: - p = "userland struct freebsd32_ucontext *"; + p = "userland struct __ucontext32 *"; break; default: break; @@ -6586,7 +6586,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 422: switch (ndx) { case 0: - p = "userland const struct freebsd32_ucontext *"; + p = "userland const struct __ucontext32 *"; break; default: break; @@ -6596,10 +6596,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 423: switch (ndx) { case 0: - p = "userland struct freebsd32_ucontext *"; + p = "userland struct __ucontext32 *"; break; case 1: - p = "userland const struct freebsd32_ucontext *"; + p = "userland const struct __ucontext32 *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 2d3be2e971ce..e8927b05c24f 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -763,17 +763,17 @@ struct sigaction32 *act, \ struct sigaction32 *oact); } 417 AUE_SIGRETURN STD { int freebsd32_sigreturn( \ - const struct freebsd32_ucontext *sigcntxp); } + const struct __ucontext32 *sigcntxp); } 418 AUE_NULL UNIMPL __xstat 419 AUE_NULL UNIMPL __xfstat 420 AUE_NULL UNIMPL __xlstat 421 AUE_NULL STD { int freebsd32_getcontext( \ - struct freebsd32_ucontext *ucp); } + struct __ucontext32 *ucp); } 422 AUE_NULL STD { int freebsd32_setcontext( \ - const struct freebsd32_ucontext *ucp); } + const struct __ucontext32 *ucp); } 423 AUE_NULL STD { int freebsd32_swapcontext( \ - struct freebsd32_ucontext *oucp, \ - const struct freebsd32_ucontext *ucp); } + struct __ucontext32 *oucp, \ + const struct __ucontext32 *ucp); } 424 AUE_SWAPOFF UNIMPL swapoff 425 AUE_ACL_GET_LINK NOPROTO { int __acl_get_link(const char *path, \ acl_type_t type, struct acl *aclp); } From nobody Wed Nov 17 20:22:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AC5B7185450C; Wed, 17 Nov 2021 20:22: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 4HvZ8x6bkXz4qlh; Wed, 17 Nov 2021 20:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3462276C1; Wed, 17 Nov 2021 20:22: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 1AHKM8n9059337; Wed, 17 Nov 2021 20:22:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKM8hp059336; Wed, 17 Nov 2021 20:22:08 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:08 GMT Message-Id: <202111172022.1AHKM8hp059336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 5fdbd21d08e8 - main - freebsd32: rename freebsd4_freebsd32_sigreturn arg List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fdbd21d08e80c028e50319370a8b08e4be5bf4d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5fdbd21d08e80c028e50319370a8b08e4be5bf4d commit 5fdbd21d08e80c028e50319370a8b08e4be5bf4d Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:22 +0000 freebsd32: rename freebsd4_freebsd32_sigreturn arg Rename struct freebsd4_freebsd32_ucontext to struct freebsd4_ucontext32 allowing conversion from the default ABI's struct freebsd4_ucontext by appending "32". This has no practical effect as this type does not actually exist. Give freebsd4_freebsd32_sigreturn an ANSI C prototype. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 2 +- sys/compat/freebsd32/syscalls.master | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 29bde63f4cec..9b67675e3e05 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -1044,7 +1044,7 @@ struct freebsd4_freebsd32_sigaction_args { char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)]; }; struct freebsd4_freebsd32_sigreturn_args { - char sigcntxp_l_[PADL_(const struct freebsd4_freebsd32_ucontext *)]; const struct freebsd4_freebsd32_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd4_freebsd32_ucontext *)]; + char sigcntxp_l_[PADL_(const struct freebsd4_ucontext32 *)]; const struct freebsd4_ucontext32 * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd4_ucontext32 *)]; }; #ifdef PAD64_REQUIRED #else diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 1cf37d777c25..2d3be2e971ce 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -625,7 +625,7 @@ struct sigaction32 *oact); } 343 AUE_SIGPENDING NOPROTO { int sigpending(sigset_t *set); } 344 AUE_SIGRETURN COMPAT4 { int freebsd32_sigreturn( \ - const struct freebsd4_freebsd32_ucontext *sigcntxp); } + const struct freebsd4_ucontext32 *sigcntxp); } 345 AUE_SIGWAIT STD { int freebsd32_sigtimedwait(const sigset_t *set, \ struct siginfo32 *info, \ const struct timespec *timeout); } From nobody Wed Nov 17 20:22:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 439D218545A9; Wed, 17 Nov 2021 20:22: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 4HvZ905p5Jz4qnF; Wed, 17 Nov 2021 20:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4771A276C2; Wed, 17 Nov 2021 20:22: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 1AHKMBJo059385; Wed, 17 Nov 2021 20:22:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMBNF059384; Wed, 17 Nov 2021 20:22:11 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:11 GMT Message-Id: <202111172022.1AHKMBNF059384@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 43227e4c834f - main - freebsd32: prototype gssd_syscall() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43227e4c834fc4b4859df49a6f6f7542a2a236e3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=43227e4c834fc4b4859df49a6f6f7542a2a236e3 commit 43227e4c834fc4b4859df49a6f6f7542a2a236e3 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:22 +0000 freebsd32: prototype gssd_syscall() Nothing about the interface should prevent this from working so go ahead and prototype it for consistency. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_syscall.h | 1 + sys/compat/freebsd32/freebsd32_syscalls.c | 2 +- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 22 ++++++++++++++++++++++ sys/compat/freebsd32/syscalls.master | 2 +- 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 124e8b0e05e7..321a72fb744a 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -430,6 +430,7 @@ #define FREEBSD32_SYS_symlinkat 502 #define FREEBSD32_SYS_unlinkat 503 #define FREEBSD32_SYS_posix_openpt 504 +#define FREEBSD32_SYS_gssd_syscall 505 #define FREEBSD32_SYS_freebsd32_jail_get 506 #define FREEBSD32_SYS_freebsd32_jail_set 507 #define FREEBSD32_SYS_jail_remove 508 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index f0ae365ddf3d..e7da47e3d7fe 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -527,7 +527,7 @@ const char *freebsd32_syscallnames[] = { "symlinkat", /* 502 = symlinkat */ "unlinkat", /* 503 = unlinkat */ "posix_openpt", /* 504 = posix_openpt */ - "#505", /* 505 = gssd_syscall */ + "gssd_syscall", /* 505 = gssd_syscall */ "freebsd32_jail_get", /* 506 = freebsd32_jail_get */ "freebsd32_jail_set", /* 507 = freebsd32_jail_set */ "jail_remove", /* 508 = jail_remove */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index c48e7b1f3c9a..ebf1c02e3a8a 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -580,7 +580,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(symlinkat_args), .sy_call = (sy_call_t *)sys_symlinkat, .sy_auevent = AUE_SYMLINKAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 502 = symlinkat */ { .sy_narg = AS(unlinkat_args), .sy_call = (sy_call_t *)sys_unlinkat, .sy_auevent = AUE_UNLINKAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 503 = unlinkat */ { .sy_narg = AS(posix_openpt_args), .sy_call = (sy_call_t *)sys_posix_openpt, .sy_auevent = AUE_POSIX_OPENPT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 504 = posix_openpt */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 505 = gssd_syscall */ + { .sy_narg = AS(gssd_syscall_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 505 = gssd_syscall */ { .sy_narg = AS(freebsd32_jail_get_args), .sy_call = (sy_call_t *)freebsd32_jail_get, .sy_auevent = AUE_JAIL_GET, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 506 = freebsd32_jail_get */ { .sy_narg = AS(freebsd32_jail_set_args), .sy_call = (sy_call_t *)freebsd32_jail_set, .sy_auevent = AUE_JAIL_SET, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 507 = freebsd32_jail_set */ { .sy_narg = AS(jail_remove_args), .sy_call = (sy_call_t *)sys_jail_remove, .sy_auevent = AUE_JAIL_REMOVE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 508 = jail_remove */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 8cc005c47ef2..bc4c7ce4f36f 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2697,6 +2697,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 1; break; } + /* gssd_syscall */ + case 505: { + struct gssd_syscall_args *p = params; + uarg[0] = (intptr_t)p->path; /* char * */ + *n_args = 1; + break; + } /* freebsd32_jail_get */ case 506: { struct freebsd32_jail_get_args *p = params; @@ -7902,6 +7909,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* gssd_syscall */ + case 505: + switch (ndx) { + case 0: + p = "userland char *"; + break; + default: + break; + }; + break; /* freebsd32_jail_get */ case 506: switch (ndx) { @@ -10767,6 +10784,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* gssd_syscall */ + case 505: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* freebsd32_jail_get */ case 506: if (ndx == 0 || ndx == 1) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index e8927b05c24f..4a0b6f80125d 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -977,7 +977,7 @@ int flag); } 504 AUE_POSIX_OPENPT NOPROTO { int posix_openpt(int flags); } ; 505 is initialised by the kgssapi code, if present. -505 AUE_NULL UNIMPL gssd_syscall +505 AUE_NULL NOPROTO|NOSTD { int gssd_syscall(char *path); } 506 AUE_JAIL_GET STD { int freebsd32_jail_get(struct iovec32 *iovp, \ unsigned int iovcnt, int flags); } 507 AUE_JAIL_SET STD { int freebsd32_jail_set(struct iovec32 *iovp, \ From nobody Wed Nov 17 20:22:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A2B38185478B; Wed, 17 Nov 2021 20:22: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 4HvZ915MTLz4qnM; Wed, 17 Nov 2021 20:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 67A6E27841; Wed, 17 Nov 2021 20:22: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 1AHKMCQ7059409; Wed, 17 Nov 2021 20:22:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMCPH059408; Wed, 17 Nov 2021 20:22:12 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:12 GMT Message-Id: <202111172022.1AHKMCPH059408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: a944d28d0edf - main - freebsd32: sprinkle in missing consts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a944d28d0edf7ceb1bef4d789dfa4e8e18331658 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a944d28d0edf7ceb1bef4d789dfa4e8e18331658 commit a944d28d0edf7ceb1bef4d789dfa4e8e18331658 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:22 +0000 freebsd32: sprinkle in missing consts A number of syscalls have missing consts on their arguments relative to the default syscalls.master. Also, use timespec32 and timeval32 where appropriate. No functional change. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 2 +- sys/compat/freebsd32/freebsd32_proto.h | 34 +++++----- sys/compat/freebsd32/freebsd32_systrace_args.c | 88 +++++++++++++------------- sys/compat/freebsd32/syscalls.master | 49 +++++++------- 4 files changed, 87 insertions(+), 86 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 4375d88fdb93..12d125132883 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1227,7 +1227,7 @@ freebsd32_copyiniov(struct iovec32 *iovp32, u_int iovcnt, struct iovec **iovp, } static int -freebsd32_copyinmsghdr(struct msghdr32 *msg32, struct msghdr *msg) +freebsd32_copyinmsghdr(const struct msghdr32 *msg32, struct msghdr *msg) { struct msghdr32 m32; int error; diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 7701d6ac0b26..0882731d656d 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -56,7 +56,7 @@ struct freebsd32_recvmsg_args { }; struct freebsd32_sendmsg_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char msg_l_[PADL_(struct msghdr32 *)]; struct msghdr32 * msg; char msg_r_[PADR_(struct msghdr32 *)]; + char msg_l_[PADL_(const struct msghdr32 *)]; const struct msghdr32 * msg; char msg_r_[PADR_(const struct msghdr32 *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct freebsd32_recvfrom_args { @@ -74,7 +74,7 @@ struct ofreebsd32_sigpending_args { register_t dummy; }; struct freebsd32_sigaltstack_args { - char ss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * ss; char ss_r_[PADR_(struct sigaltstack32 *)]; + char ss_l_[PADL_(const struct sigaltstack32 *)]; const struct sigaltstack32 * ss; char ss_r_[PADR_(const struct sigaltstack32 *)]; char oss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * oss; char oss_r_[PADR_(struct sigaltstack32 *)]; }; struct freebsd32_ioctl_args { @@ -88,13 +88,13 @@ struct freebsd32_execve_args { char envv_l_[PADL_(uint32_t *)]; uint32_t * envv; char envv_r_[PADR_(uint32_t *)]; }; struct freebsd32_mprotect_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; }; struct freebsd32_setitimer_args { char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; - char itv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * itv; char itv_r_[PADR_(struct itimerval32 *)]; + char itv_l_[PADL_(const struct itimerval32 *)]; const struct itimerval32 * itv; char itv_r_[PADR_(const struct itimerval32 *)]; char oitv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * oitv; char oitv_r_[PADR_(struct itimerval32 *)]; }; struct freebsd32_getitimer_args { @@ -132,15 +132,15 @@ struct freebsd32_writev_args { char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; }; struct freebsd32_settimeofday_args { - char tv_l_[PADL_(struct timeval32 *)]; struct timeval32 * tv; char tv_r_[PADR_(struct timeval32 *)]; - char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)]; + char tv_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * tv; char tv_r_[PADR_(const struct timeval32 *)]; + char tzp_l_[PADL_(const struct timezone *)]; const struct timezone * tzp; char tzp_r_[PADR_(const struct timezone *)]; }; struct freebsd32_utimes_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; + char tptr_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * tptr; char tptr_r_[PADR_(const struct timeval32 *)]; }; struct freebsd32_adjtime_args { - char delta_l_[PADL_(struct timeval32 *)]; struct timeval32 * delta; char delta_r_[PADR_(struct timeval32 *)]; + char delta_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * delta; char delta_r_[PADR_(const struct timeval32 *)]; char olddelta_l_[PADL_(struct timeval32 *)]; struct timeval32 * olddelta; char olddelta_r_[PADR_(struct timeval32 *)]; }; struct freebsd32_sysarch_args { @@ -181,11 +181,11 @@ struct freebsd32___sysctl_args { }; struct freebsd32_futimes_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; + char tptr_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * tptr; char tptr_r_[PADR_(const struct timeval32 *)]; }; struct freebsd32_msgsnd_args { char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; - char msgp_l_[PADL_(void *)]; void * msgp; char msgp_r_[PADR_(void *)]; + char msgp_l_[PADL_(const void *)]; const void * msgp; char msgp_r_[PADR_(const void *)]; char msgsz_l_[PADL_(size_t)]; size_t msgsz; char msgsz_r_[PADR_(size_t)]; char msgflg_l_[PADL_(int)]; int msgflg; char msgflg_r_[PADR_(int)]; }; @@ -253,7 +253,7 @@ struct freebsd32_lio_listio_args { }; struct freebsd32_lutimes_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; + char tptr_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * tptr; char tptr_r_[PADR_(const struct timeval32 *)]; }; struct freebsd32_preadv_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -298,7 +298,7 @@ struct freebsd32_jail_args { struct freebsd32_sigtimedwait_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; - char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)]; + char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; }; struct freebsd32_sigwaitinfo_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; @@ -336,7 +336,7 @@ struct freebsd32_ksem_open_args { }; struct freebsd32_sigaction_args { char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; - char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)]; + char act_l_[PADL_(const struct sigaction32 *)]; const struct sigaction32 * act; char act_r_[PADR_(const struct sigaction32 *)]; char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)]; }; struct freebsd32_sigreturn_args { @@ -542,7 +542,7 @@ struct freebsd32_fexecve_args { struct freebsd32_futimesat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char times_l_[PADL_(struct timeval *)]; struct timeval * times; char times_r_[PADR_(struct timeval *)]; + char times_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * times; char times_r_[PADR_(const struct timeval32 *)]; }; struct freebsd32_jail_get_args { char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; @@ -671,12 +671,12 @@ struct freebsd32_ppoll_args { }; struct freebsd32_futimens_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; + char times_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * times; char times_r_[PADR_(const struct timespec32 *)]; }; struct freebsd32_utimensat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; + char times_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * times; char times_r_[PADR_(const struct timespec32 *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; struct freebsd32_fstat_args { @@ -1040,7 +1040,7 @@ struct freebsd4_freebsd32_sendfile_args { }; struct freebsd4_freebsd32_sigaction_args { char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; - char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)]; + char act_l_[PADL_(const struct sigaction32 *)]; const struct sigaction32 * act; char act_r_[PADR_(const struct sigaction32 *)]; char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)]; }; struct freebsd4_freebsd32_sigreturn_args { diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index bc4c7ce4f36f..4fce6797062c 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -191,7 +191,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 28: { struct freebsd32_sendmsg_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t)p->msg; /* struct msghdr32 * */ + uarg[1] = (intptr_t)p->msg; /* const struct msghdr32 * */ iarg[2] = p->flags; /* int */ *n_args = 3; break; @@ -339,7 +339,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_sigaltstack */ case 53: { struct freebsd32_sigaltstack_args *p = params; - uarg[0] = (intptr_t)p->ss; /* struct sigaltstack32 * */ + uarg[0] = (intptr_t)p->ss; /* const struct sigaltstack32 * */ uarg[1] = (intptr_t)p->oss; /* struct sigaltstack32 * */ *n_args = 2; break; @@ -446,7 +446,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_mprotect */ case 74: { struct freebsd32_mprotect_args *p = params; - uarg[0] = (intptr_t)p->addr; /* void * */ + uarg[0] = (intptr_t)p->addr; /* const void * */ uarg[1] = p->len; /* size_t */ iarg[2] = p->prot; /* int */ *n_args = 3; @@ -482,7 +482,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 80: { struct setgroups_args *p = params; uarg[0] = p->gidsetsize; /* u_int */ - uarg[1] = (intptr_t)p->gidset; /* gid_t * */ + uarg[1] = (intptr_t)p->gidset; /* const gid_t * */ *n_args = 2; break; } @@ -503,7 +503,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 83: { struct freebsd32_setitimer_args *p = params; uarg[0] = p->which; /* u_int */ - uarg[1] = (intptr_t)p->itv; /* struct itimerval32 * */ + uarg[1] = (intptr_t)p->itv; /* const struct itimerval32 * */ uarg[2] = (intptr_t)p->oitv; /* struct itimerval32 * */ *n_args = 3; break; @@ -674,8 +674,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_settimeofday */ case 122: { struct freebsd32_settimeofday_args *p = params; - uarg[0] = (intptr_t)p->tv; /* struct timeval32 * */ - uarg[1] = (intptr_t)p->tzp; /* struct timezone * */ + uarg[0] = (intptr_t)p->tv; /* const struct timeval32 * */ + uarg[1] = (intptr_t)p->tzp; /* const struct timezone * */ *n_args = 2; break; } @@ -785,14 +785,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 138: { struct freebsd32_utimes_args *p = params; uarg[0] = (intptr_t)p->path; /* const char * */ - uarg[1] = (intptr_t)p->tptr; /* struct timeval32 * */ + uarg[1] = (intptr_t)p->tptr; /* const struct timeval32 * */ *n_args = 2; break; } /* freebsd32_adjtime */ case 140: { struct freebsd32_adjtime_args *p = params; - uarg[0] = (intptr_t)p->delta; /* struct timeval32 * */ + uarg[0] = (intptr_t)p->delta; /* const struct timeval32 * */ uarg[1] = (intptr_t)p->olddelta; /* struct timeval32 * */ *n_args = 2; break; @@ -974,7 +974,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 206: { struct freebsd32_futimes_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->tptr; /* struct timeval32 * */ + uarg[1] = (intptr_t)p->tptr; /* const struct timeval32 * */ *n_args = 2; break; } @@ -1074,7 +1074,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 226: { struct freebsd32_msgsnd_args *p = params; iarg[0] = p->msqid; /* int */ - uarg[1] = (intptr_t)p->msgp; /* void * */ + uarg[1] = (intptr_t)p->msgp; /* const void * */ uarg[2] = p->msgsz; /* size_t */ iarg[3] = p->msgflg; /* int */ *n_args = 4; @@ -1095,7 +1095,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 228: { struct shmat_args *p = params; iarg[0] = p->shmid; /* int */ - uarg[1] = (intptr_t)p->shmaddr; /* void * */ + uarg[1] = (intptr_t)p->shmaddr; /* const void * */ iarg[2] = p->shmflg; /* int */ *n_args = 3; break; @@ -1103,7 +1103,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* shmdt */ case 230: { struct shmdt_args *p = params; - uarg[0] = (intptr_t)p->shmaddr; /* void * */ + uarg[0] = (intptr_t)p->shmaddr; /* const void * */ *n_args = 1; break; } @@ -1296,7 +1296,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 276: { struct freebsd32_lutimes_args *p = params; uarg[0] = (intptr_t)p->path; /* const char * */ - uarg[1] = (intptr_t)p->tptr; /* struct timeval32 * */ + uarg[1] = (intptr_t)p->tptr; /* const struct timeval32 * */ *n_args = 2; break; } @@ -1594,7 +1594,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct freebsd32_sigtimedwait_args *p = params; uarg[0] = (intptr_t)p->set; /* const sigset_t * */ uarg[1] = (intptr_t)p->info; /* struct siginfo32 * */ - uarg[2] = (intptr_t)p->timeout; /* const struct timespec * */ + uarg[2] = (intptr_t)p->timeout; /* const struct timespec32 * */ *n_args = 3; break; } @@ -1948,7 +1948,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 416: { struct freebsd32_sigaction_args *p = params; iarg[0] = p->sig; /* int */ - uarg[1] = (intptr_t)p->act; /* struct sigaction32 * */ + uarg[1] = (intptr_t)p->act; /* const struct sigaction32 * */ uarg[2] = (intptr_t)p->oact; /* struct sigaction32 * */ *n_args = 3; break; @@ -2314,7 +2314,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->sd; /* int */ uarg[1] = (intptr_t)p->msg; /* void * */ iarg[2] = p->mlen; /* int */ - uarg[3] = (intptr_t)p->to; /* struct sockaddr * */ + uarg[3] = (intptr_t)p->to; /* const struct sockaddr * */ iarg[4] = p->tolen; /* __socklen_t */ uarg[5] = (intptr_t)p->sinfo; /* struct sctp_sndrcvinfo * */ iarg[6] = p->flags; /* int */ @@ -2327,7 +2327,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->sd; /* int */ uarg[1] = (intptr_t)p->iov; /* struct iovec * */ iarg[2] = p->iovlen; /* int */ - uarg[3] = (intptr_t)p->to; /* struct sockaddr * */ + uarg[3] = (intptr_t)p->to; /* const struct sockaddr * */ iarg[4] = p->tolen; /* __socklen_t */ uarg[5] = (intptr_t)p->sinfo; /* struct sctp_sndrcvinfo * */ iarg[6] = p->flags; /* int */ @@ -2609,7 +2609,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct freebsd32_futimesat_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->path; /* const char * */ - uarg[2] = (intptr_t)p->times; /* struct timeval * */ + uarg[2] = (intptr_t)p->times; /* const struct timeval32 * */ *n_args = 3; break; } @@ -2700,7 +2700,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* gssd_syscall */ case 505: { struct gssd_syscall_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ + uarg[0] = (intptr_t)p->path; /* const char * */ *n_args = 1; break; } @@ -3102,7 +3102,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 546: { struct freebsd32_futimens_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->times; /* struct timespec * */ + uarg[1] = (intptr_t)p->times; /* const struct timespec32 * */ *n_args = 2; break; } @@ -3111,7 +3111,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct freebsd32_utimensat_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->path; /* const char * */ - uarg[2] = (intptr_t)p->times; /* struct timespec * */ + uarg[2] = (intptr_t)p->times; /* const struct timespec32 * */ iarg[3] = p->flag; /* int */ *n_args = 4; break; @@ -3711,7 +3711,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct msghdr32 *"; + p = "userland const struct msghdr32 *"; break; case 2: p = "int"; @@ -3942,7 +3942,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 53: switch (ndx) { case 0: - p = "userland struct sigaltstack32 *"; + p = "userland const struct sigaltstack32 *"; break; case 1: p = "userland struct sigaltstack32 *"; @@ -4108,7 +4108,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 74: switch (ndx) { case 0: - p = "userland void *"; + p = "userland const void *"; break; case 1: p = "size_t"; @@ -4172,7 +4172,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "u_int"; break; case 1: - p = "userland gid_t *"; + p = "userland const gid_t *"; break; default: break; @@ -4201,7 +4201,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "u_int"; break; case 1: - p = "userland struct itimerval32 *"; + p = "userland const struct itimerval32 *"; break; case 2: p = "userland struct itimerval32 *"; @@ -4493,10 +4493,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 122: switch (ndx) { case 0: - p = "userland struct timeval32 *"; + p = "userland const struct timeval32 *"; break; case 1: - p = "userland struct timezone *"; + p = "userland const struct timezone *"; break; default: break; @@ -4683,7 +4683,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 1: - p = "userland struct timeval32 *"; + p = "userland const struct timeval32 *"; break; default: break; @@ -4693,7 +4693,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 140: switch (ndx) { case 0: - p = "userland struct timeval32 *"; + p = "userland const struct timeval32 *"; break; case 1: p = "userland struct timeval32 *"; @@ -4995,7 +4995,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct timeval32 *"; + p = "userland const struct timeval32 *"; break; default: break; @@ -5109,7 +5109,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland void *"; + p = "userland const void *"; break; case 2: p = "size_t"; @@ -5150,7 +5150,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland void *"; + p = "userland const void *"; break; case 2: p = "int"; @@ -5163,7 +5163,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 230: switch (ndx) { case 0: - p = "userland void *"; + p = "userland const void *"; break; default: break; @@ -5477,7 +5477,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 1: - p = "userland struct timeval32 *"; + p = "userland const struct timeval32 *"; break; default: break; @@ -5939,7 +5939,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct siginfo32 *"; break; case 2: - p = "userland const struct timespec *"; + p = "userland const struct timespec32 *"; break; default: break; @@ -6560,7 +6560,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct sigaction32 *"; + p = "userland const struct sigaction32 *"; break; case 2: p = "userland struct sigaction32 *"; @@ -7174,7 +7174,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 3: - p = "userland struct sockaddr *"; + p = "userland const struct sockaddr *"; break; case 4: p = "__socklen_t"; @@ -7202,7 +7202,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 3: - p = "userland struct sockaddr *"; + p = "userland const struct sockaddr *"; break; case 4: p = "__socklen_t"; @@ -7750,7 +7750,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 2: - p = "userland struct timeval *"; + p = "userland const struct timeval32 *"; break; default: break; @@ -7913,7 +7913,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 505: switch (ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -8644,7 +8644,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct timespec *"; + p = "userland const struct timespec32 *"; break; default: break; @@ -8660,7 +8660,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 2: - p = "userland struct timespec *"; + p = "userland const struct timespec32 *"; break; case 3: p = "int"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 4a0b6f80125d..8cb962e90bce 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -107,8 +107,8 @@ caddr_t addr, int data); } 27 AUE_RECVMSG STD { int freebsd32_recvmsg(int s, struct msghdr32 *msg, \ int flags); } -28 AUE_SENDMSG STD { int freebsd32_sendmsg(int s, struct msghdr32 *msg, \ - int flags); } +28 AUE_SENDMSG STD { int freebsd32_sendmsg(int s, \ + const struct msghdr32 *msg, int flags); } 29 AUE_RECVFROM STD { int freebsd32_recvfrom(int s, void *buf, \ uint32_t len, int flags, \ struct sockaddr *from, \ @@ -150,7 +150,7 @@ 51 AUE_ACCT NOPROTO { int acct(const char *path); } 52 AUE_SIGPENDING COMPAT { int freebsd32_sigpending(void); } 53 AUE_SIGALTSTACK STD { int freebsd32_sigaltstack( \ - struct sigaltstack32 *ss, \ + const struct sigaltstack32 *ss, \ struct sigaltstack32 *oss); } 54 AUE_IOCTL STD { int freebsd32_ioctl(int fd, uint32_t com, \ struct md_ioctl32 *data); } @@ -180,7 +180,7 @@ int prot, int flags, int fd, int32_t pos); } 72 AUE_O_VADVISE COMPAT11|NOPROTO { int vadvise(int anom); } 73 AUE_MUNMAP NOPROTO { int munmap(void *addr, size_t len); } -74 AUE_MPROTECT STD { int freebsd32_mprotect(void *addr, \ +74 AUE_MPROTECT STD { int freebsd32_mprotect(const void *addr, \ size_t len, int prot); } 75 AUE_MADVISE NOPROTO { int madvise(void *addr, size_t len, \ int behav); } @@ -191,11 +191,11 @@ 79 AUE_GETGROUPS NOPROTO { int getgroups(u_int gidsetsize, \ gid_t *gidset); } 80 AUE_SETGROUPS NOPROTO { int setgroups(u_int gidsetsize, \ - gid_t *gidset); } + const gid_t *gidset); } 81 AUE_GETPGRP NOPROTO { int getpgrp(void); } 82 AUE_SETPGRP NOPROTO { int setpgid(int pid, int pgid); } 83 AUE_SETITIMER STD { int freebsd32_setitimer(u_int which, \ - struct itimerval32 *itv, \ + const struct itimerval32 *itv, \ struct itimerval32 *oitv); } 84 AUE_NULL OBSOL owait ; XXX implement @@ -258,8 +258,8 @@ 121 AUE_WRITEV STD { int freebsd32_writev(int fd, \ struct iovec32 *iovp, u_int iovcnt); } 122 AUE_SETTIMEOFDAY STD { int freebsd32_settimeofday( \ - struct timeval32 *tv, \ - struct timezone *tzp); } + const struct timeval32 *tv, \ + const struct timezone *tzp); } 123 AUE_FCHOWN NOPROTO { int fchown(int fd, int uid, int gid); } 124 AUE_FCHMOD NOPROTO { int fchmod(int fd, mode_t mode); } 125 AUE_RECVFROM OBSOL orecvfrom @@ -282,10 +282,10 @@ 136 AUE_MKDIR NOPROTO { int mkdir(const char *path, mode_t mode); } 137 AUE_RMDIR NOPROTO { int rmdir(const char *path); } 138 AUE_UTIMES STD { int freebsd32_utimes(const char *path, \ - struct timeval32 *tptr); } + const struct timeval32 *tptr); } 139 AUE_NULL OBSOL 4.2 sigreturn 140 AUE_ADJTIME STD { int freebsd32_adjtime( \ - struct timeval32 *delta, \ + const struct timeval32 *delta, \ struct timeval32 *olddelta); } 141 AUE_GETPEERNAME OBSOL ogetpeername 142 AUE_SYSCTL OBSOL ogethostid @@ -398,7 +398,7 @@ size_t len); } 205 AUE_UNDELETE NOPROTO { int undelete(const char *path); } 206 AUE_FUTIMES STD { int freebsd32_futimes(int fd, \ - struct timeval32 *tptr); } + const struct timeval32 *tptr); } 207 AUE_GETPGID NOPROTO { int getpgid(pid_t pid); } 208 AUE_NULL UNIMPL nosys 209 AUE_POLL NOPROTO { int poll(struct pollfd *fds, u_int nfds, \ @@ -430,16 +430,16 @@ int msqid, int cmd, \ struct msqid_ds32_old *buf); } 225 AUE_MSGGET NOSTD|NOPROTO { int msgget(key_t key, int msgflg); } -226 AUE_MSGSND NOSTD { int freebsd32_msgsnd(int msqid, void *msgp, \ +226 AUE_MSGSND NOSTD { int freebsd32_msgsnd(int msqid, const void *msgp, \ size_t msgsz, int msgflg); } 227 AUE_MSGRCV NOSTD { int freebsd32_msgrcv(int msqid, void *msgp, \ size_t msgsz, long msgtyp, int msgflg); } -228 AUE_SHMAT NOSTD|NOPROTO { void *shmat(int shmid, void *shmaddr, \ +228 AUE_SHMAT NOSTD|NOPROTO { void *shmat(int shmid, const void *shmaddr, \ int shmflg); } 229 AUE_SHMCTL COMPAT7|NOSTD { int freebsd32_shmctl( \ int shmid, int cmd, \ struct shmid_ds32_old *buf); } -230 AUE_SHMDT NOSTD|NOPROTO { int shmdt(void *shmaddr); } +230 AUE_SHMDT NOSTD|NOPROTO { int shmdt(const void *shmaddr); } 231 AUE_SHMGET NOSTD|NOPROTO { int shmget(key_t key, int size, \ int shmflg); } ; @@ -513,7 +513,7 @@ 274 AUE_LCHMOD NOPROTO { int lchmod(const char *path, mode_t mode); } 275 AUE_NULL OBSOL netbsd_lchown 276 AUE_LUTIMES STD { int freebsd32_lutimes(const char *path, \ - struct timeval32 *tptr); } + const struct timeval32 *tptr); } 277 AUE_NULL OBSOL netbsd_msync 278 AUE_STAT COMPAT11|NOPROTO { int nstat(const char *path, \ struct nstat *ub); } @@ -621,14 +621,14 @@ const sigset_t *set, sigset_t *oset); } 341 AUE_SIGSUSPEND NOPROTO { int sigsuspend(const sigset_t *sigmask); } 342 AUE_SIGACTION COMPAT4 { int freebsd32_sigaction(int sig, \ - struct sigaction32 *act, \ + const struct sigaction32 *act, \ struct sigaction32 *oact); } 343 AUE_SIGPENDING NOPROTO { int sigpending(sigset_t *set); } 344 AUE_SIGRETURN COMPAT4 { int freebsd32_sigreturn( \ const struct freebsd4_ucontext32 *sigcntxp); } 345 AUE_SIGWAIT STD { int freebsd32_sigtimedwait(const sigset_t *set, \ struct siginfo32 *info, \ - const struct timespec *timeout); } + const struct timespec32 *timeout); } 346 AUE_NULL STD { int freebsd32_sigwaitinfo(const sigset_t *set, \ struct siginfo32 *info); } 347 AUE_ACL_GET_FILE NOPROTO { int __acl_get_file(const char *path, \ @@ -760,7 +760,7 @@ const char *attrname); } 415 AUE_NULL UNIMPL __mac_execve 416 AUE_SIGACTION STD { int freebsd32_sigaction(int sig, \ - struct sigaction32 *act, \ + const struct sigaction32 *act, \ struct sigaction32 *oact); } 417 AUE_SIGRETURN STD { int freebsd32_sigreturn( \ const struct __ucontext32 *sigcntxp); } @@ -863,10 +863,10 @@ 471 AUE_SCTP_PEELOFF NOPROTO|NOSTD { int sctp_peeloff(int sd, uint32_t name); } 472 AUE_SCTP_GENERIC_SENDMSG NOPROTO|NOSTD { int sctp_generic_sendmsg( \ int sd, void *msg, int mlen, \ - struct sockaddr *to, __socklen_t tolen, \ + const struct sockaddr *to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } 473 AUE_SCTP_GENERIC_SENDMSG_IOV NOPROTO|NOSTD { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ - struct sockaddr *to, __socklen_t tolen, \ + const struct sockaddr *to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } 474 AUE_SCTP_GENERIC_RECVMSG NOPROTO|NOSTD { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ struct sockaddr * from, __socklen_t *fromlenaddr, \ @@ -955,7 +955,7 @@ int flag); } 494 AUE_FUTIMESAT STD { int freebsd32_futimesat(int fd, \ const char *path, \ - struct timeval *times); } + const struct timeval32 *times); } 495 AUE_LINKAT NOPROTO { int linkat(int fd1, const char *path1, \ int fd2, const char *path2, int flag); } 496 AUE_MKDIRAT NOPROTO { int mkdirat(int fd, const char *path, \ @@ -977,7 +977,7 @@ int flag); } 504 AUE_POSIX_OPENPT NOPROTO { int posix_openpt(int flags); } ; 505 is initialised by the kgssapi code, if present. -505 AUE_NULL NOPROTO|NOSTD { int gssd_syscall(char *path); } +505 AUE_NULL NOPROTO|NOSTD { int gssd_syscall(const char *path); } 506 AUE_JAIL_GET STD { int freebsd32_jail_get(struct iovec32 *iovp, \ unsigned int iovcnt, int flags); } 507 AUE_JAIL_SET STD { int freebsd32_jail_set(struct iovec32 *iovp, \ @@ -1092,10 +1092,11 @@ u_int nfds, const struct timespec32 *ts, \ const sigset_t *set); } 546 AUE_FUTIMES STD { int freebsd32_futimens(int fd, \ - struct timespec *times); } + const struct timespec32 *times); } 547 AUE_FUTIMESAT STD { int freebsd32_utimensat(int fd, \ const char *path, \ - struct timespec *times, int flag); } + const struct timespec32 *times, \ + int flag); } 548 AUE_NULL OBSOL numa_getaffinity 549 AUE_NULL OBSOL numa_setaffinity 550 AUE_FSYNC NOPROTO { int fdatasync(int fd); } From nobody Wed Nov 17 20:22:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B17FF18545CE; Wed, 17 Nov 2021 20:22: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 4HvZ924T9mz4qyQ; Wed, 17 Nov 2021 20:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9371B27A06; Wed, 17 Nov 2021 20:22: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 1AHKMD6f059439; Wed, 17 Nov 2021 20:22:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMDrw059438; Wed, 17 Nov 2021 20:22:13 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:13 GMT Message-Id: <202111172022.1AHKMDrw059438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8ba369ed7400 - main - freebsd32: [gs]etitimer's which arg is an int List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ba369ed74007a52be045e4c40a1131e4842222e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8ba369ed74007a52be045e4c40a1131e4842222e commit 8ba369ed74007a52be045e4c40a1131e4842222e Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:22 +0000 freebsd32: [gs]etitimer's which arg is an int Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 4 ++-- sys/compat/freebsd32/freebsd32_systrace_args.c | 8 ++++---- sys/compat/freebsd32/syscalls.master | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 0882731d656d..d358244c5d32 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -93,12 +93,12 @@ struct freebsd32_mprotect_args { char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; }; struct freebsd32_setitimer_args { - char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; + char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)]; char itv_l_[PADL_(const struct itimerval32 *)]; const struct itimerval32 * itv; char itv_r_[PADR_(const struct itimerval32 *)]; char oitv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * oitv; char oitv_r_[PADR_(struct itimerval32 *)]; }; struct freebsd32_getitimer_args { - char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; + char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)]; char itv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * itv; char itv_r_[PADR_(struct itimerval32 *)]; }; struct freebsd32_fcntl_args { diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 4fce6797062c..d22304859af1 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -502,7 +502,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_setitimer */ case 83: { struct freebsd32_setitimer_args *p = params; - uarg[0] = p->which; /* u_int */ + iarg[0] = p->which; /* int */ uarg[1] = (intptr_t)p->itv; /* const struct itimerval32 * */ uarg[2] = (intptr_t)p->oitv; /* struct itimerval32 * */ *n_args = 3; @@ -518,7 +518,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_getitimer */ case 86: { struct freebsd32_getitimer_args *p = params; - uarg[0] = p->which; /* u_int */ + iarg[0] = p->which; /* int */ uarg[1] = (intptr_t)p->itv; /* struct itimerval32 * */ *n_args = 2; break; @@ -4198,7 +4198,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 83: switch (ndx) { case 0: - p = "u_int"; + p = "int"; break; case 1: p = "userland const struct itimerval32 *"; @@ -4224,7 +4224,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 86: switch (ndx) { case 0: - p = "u_int"; + p = "int"; break; case 1: p = "userland struct itimerval32 *"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 8cb962e90bce..328858071949 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -194,13 +194,13 @@ const gid_t *gidset); } 81 AUE_GETPGRP NOPROTO { int getpgrp(void); } 82 AUE_SETPGRP NOPROTO { int setpgid(int pid, int pgid); } -83 AUE_SETITIMER STD { int freebsd32_setitimer(u_int which, \ +83 AUE_SETITIMER STD { int freebsd32_setitimer(int which, \ const struct itimerval32 *itv, \ struct itimerval32 *oitv); } 84 AUE_NULL OBSOL owait ; XXX implement 85 AUE_SWAPON NOPROTO { int swapon(const char *name); } -86 AUE_GETITIMER STD { int freebsd32_getitimer(u_int which, \ +86 AUE_GETITIMER STD { int freebsd32_getitimer(int which, \ struct itimerval32 *itv); } 87 AUE_O_GETHOSTNAME OBSOL ogethostname 88 AUE_O_SETHOSTNAME OBSOL osethostname From nobody Wed Nov 17 20:22:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8EB8D18542B7; Wed, 17 Nov 2021 20:22: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 4HvZ942Z6Hz4qfp; Wed, 17 Nov 2021 20:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A98222736B; Wed, 17 Nov 2021 20:22: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 1AHKMEiV059463; Wed, 17 Nov 2021 20:22:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMEYd059462; Wed, 17 Nov 2021 20:22:14 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:14 GMT Message-Id: <202111172022.1AHKMEYd059462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 70c9698f4037 - main - freebsd32: match ioctl type to default ABI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70c9698f4037bbae2c51d7b628433e6835450448 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=70c9698f4037bbae2c51d7b628433e6835450448 commit 70c9698f4037bbae2c51d7b628433e6835450448 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:22 +0000 freebsd32: match ioctl type to default ABI The command is a u_long and unsigned integers do not require special handling. The data argument isn't a special structure, just use char *. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_ioctl.c | 2 +- sys/compat/freebsd32/freebsd32_proto.h | 4 ++-- sys/compat/freebsd32/freebsd32_systrace_args.c | 8 ++++---- sys/compat/freebsd32/syscalls.master | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_ioctl.c b/sys/compat/freebsd32/freebsd32_ioctl.c index b3ed457f7132..4818a410586a 100644 --- a/sys/compat/freebsd32/freebsd32_ioctl.c +++ b/sys/compat/freebsd32/freebsd32_ioctl.c @@ -85,7 +85,7 @@ freebsd32_ioctl_memrange(struct thread *td, break; default: - panic("%s: unknown MEMRANGE %#x", __func__, uap->com); + panic("%s: unknown MEMRANGE %#lx", __func__, uap->com); } if ((error = fo_ioctl(fp, com, (caddr_t)&mro, td->td_ucred, td)) != 0) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index d358244c5d32..22b60cfc51bf 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -79,8 +79,8 @@ struct freebsd32_sigaltstack_args { }; struct freebsd32_ioctl_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char com_l_[PADL_(uint32_t)]; uint32_t com; char com_r_[PADR_(uint32_t)]; - char data_l_[PADL_(struct md_ioctl32 *)]; struct md_ioctl32 * data; char data_r_[PADR_(struct md_ioctl32 *)]; + char com_l_[PADL_(u_long)]; u_long com; char com_r_[PADR_(u_long)]; + char data_l_[PADL_(char *)]; char * data; char data_r_[PADR_(char *)]; }; struct freebsd32_execve_args { char fname_l_[PADL_(const char *)]; const char * fname; char fname_r_[PADR_(const char *)]; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index d22304859af1..6b3178f755e9 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -348,8 +348,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 54: { struct freebsd32_ioctl_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = p->com; /* uint32_t */ - uarg[2] = (intptr_t)p->data; /* struct md_ioctl32 * */ + uarg[1] = p->com; /* u_long */ + uarg[2] = (intptr_t)p->data; /* char * */ *n_args = 3; break; } @@ -3958,10 +3958,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "uint32_t"; + p = "u_long"; break; case 2: - p = "userland struct md_ioctl32 *"; + p = "userland char *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 328858071949..3fd815f62127 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -152,8 +152,8 @@ 53 AUE_SIGALTSTACK STD { int freebsd32_sigaltstack( \ const struct sigaltstack32 *ss, \ struct sigaltstack32 *oss); } -54 AUE_IOCTL STD { int freebsd32_ioctl(int fd, uint32_t com, \ - struct md_ioctl32 *data); } +54 AUE_IOCTL STD { int freebsd32_ioctl(int fd, u_long com, \ + char *data); } 55 AUE_REBOOT NOPROTO { int reboot(int opt); } 56 AUE_REVOKE NOPROTO { int revoke(const char *path); } 57 AUE_SYMLINK NOPROTO { int symlink(const char *path, \ From nobody Wed Nov 17 20:22:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9C4C818546E7; Wed, 17 Nov 2021 20:22: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 4HvZ9516wGz4qyb; Wed, 17 Nov 2021 20:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D908727A07; Wed, 17 Nov 2021 20:22: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 1AHKMFqj059487; Wed, 17 Nov 2021 20:22:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMFhW059486; Wed, 17 Nov 2021 20:22:15 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:15 GMT Message-Id: <202111172022.1AHKMFhW059486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: ddae7b9aaa6c - main - freebsd32: use size_t where the default ABI does List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddae7b9aaa6c0f0ff747c029246ab0c5ad795d1c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ddae7b9aaa6c0f0ff747c029246ab0c5ad795d1c commit ddae7b9aaa6c0f0ff747c029246ab0c5ad795d1c Author: Brooks Davis AuthorDate: 2021-11-17 20:12:23 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:23 +0000 freebsd32: use size_t where the default ABI does While the caller will never pass a larger value, we can use size_t due to it being unsigned. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 4 ++-- sys/compat/freebsd32/freebsd32_systrace_args.c | 16 ++++++++-------- sys/compat/freebsd32/syscalls.master | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 22b60cfc51bf..def4391848b2 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -62,7 +62,7 @@ struct freebsd32_sendmsg_args { struct freebsd32_recvfrom_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; - char len_l_[PADL_(uint32_t)]; uint32_t len; char len_r_[PADR_(uint32_t)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; char from_l_[PADL_(struct sockaddr *)]; struct sockaddr * from; char from_r_[PADR_(struct sockaddr *)]; char fromlenaddr_l_[PADL_(uint32_t)]; uint32_t fromlenaddr; char fromlenaddr_r_[PADR_(uint32_t)]; @@ -177,7 +177,7 @@ struct freebsd32___sysctl_args { char old_l_[PADL_(void *)]; void * old; char old_r_[PADR_(void *)]; char oldlenp_l_[PADL_(uint32_t *)]; uint32_t * oldlenp; char oldlenp_r_[PADR_(uint32_t *)]; char new_l_[PADL_(const void *)]; const void * new; char new_r_[PADR_(const void *)]; - char newlen_l_[PADL_(uint32_t)]; uint32_t newlen; char newlen_r_[PADR_(uint32_t)]; + char newlen_l_[PADL_(size_t)]; size_t newlen; char newlen_r_[PADR_(size_t)]; }; struct freebsd32_futimes_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 6b3178f755e9..61a8e2e82a57 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -201,7 +201,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct freebsd32_recvfrom_args *p = params; iarg[0] = p->s; /* int */ uarg[1] = (intptr_t)p->buf; /* void * */ - uarg[2] = p->len; /* uint32_t */ + uarg[2] = p->len; /* size_t */ iarg[3] = p->flags; /* int */ uarg[4] = (intptr_t)p->from; /* struct sockaddr * */ uarg[5] = p->fromlenaddr; /* uint32_t */ @@ -943,7 +943,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[2] = (intptr_t)p->old; /* void * */ uarg[3] = (intptr_t)p->oldlenp; /* uint32_t * */ uarg[4] = (intptr_t)p->new; /* const void * */ - uarg[5] = p->newlen; /* uint32_t */ + uarg[5] = p->newlen; /* size_t */ *n_args = 6; break; } @@ -1058,7 +1058,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct semop_args *p = params; iarg[0] = p->semid; /* int */ uarg[1] = (intptr_t)p->sops; /* struct sembuf * */ - uarg[2] = p->nsops; /* u_int */ + uarg[2] = p->nsops; /* size_t */ *n_args = 3; break; } @@ -1111,7 +1111,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 231: { struct shmget_args *p = params; iarg[0] = p->key; /* key_t */ - iarg[1] = p->size; /* int */ + uarg[1] = p->size; /* size_t */ iarg[2] = p->shmflg; /* int */ *n_args = 3; break; @@ -3730,7 +3730,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland void *"; break; case 2: - p = "uint32_t"; + p = "size_t"; break; case 3: p = "int"; @@ -4946,7 +4946,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const void *"; break; case 5: - p = "uint32_t"; + p = "size_t"; break; default: break; @@ -5083,7 +5083,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct sembuf *"; break; case 2: - p = "u_int"; + p = "size_t"; break; default: break; @@ -5176,7 +5176,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "key_t"; break; case 1: - p = "int"; + p = "size_t"; break; case 2: p = "int"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 3fd815f62127..de85234343c1 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -110,7 +110,7 @@ 28 AUE_SENDMSG STD { int freebsd32_sendmsg(int s, \ const struct msghdr32 *msg, int flags); } 29 AUE_RECVFROM STD { int freebsd32_recvfrom(int s, void *buf, \ - uint32_t len, int flags, \ + size_t len, int flags, \ struct sockaddr *from, \ uint32_t fromlenaddr); } 30 AUE_ACCEPT NOPROTO { int accept(int s, struct sockaddr *name, \ @@ -391,7 +391,7 @@ 202 AUE_SYSCTL STD { int freebsd32___sysctl(int *name, \ u_int namelen, void *old, \ uint32_t *oldlenp, const void *new, \ - uint32_t newlen); } + size_t newlen); } 203 AUE_MLOCK NOPROTO { int mlock(const void *addr, \ size_t len); } 204 AUE_MUNLOCK NOPROTO { int munlock(const void *addr, \ @@ -424,7 +424,7 @@ 221 AUE_SEMGET NOSTD|NOPROTO { int semget(key_t key, int nsems, \ int semflg); } 222 AUE_SEMOP NOSTD|NOPROTO { int semop(int semid, \ - struct sembuf *sops, u_int nsops); } + struct sembuf *sops, size_t nsops); } 223 AUE_NULL OBSOL semconfig 224 AUE_MSGCTL COMPAT7|NOSTD { int freebsd32_msgctl( \ int msqid, int cmd, \ @@ -440,7 +440,7 @@ int shmid, int cmd, \ struct shmid_ds32_old *buf); } 230 AUE_SHMDT NOSTD|NOPROTO { int shmdt(const void *shmaddr); } -231 AUE_SHMGET NOSTD|NOPROTO { int shmget(key_t key, int size, \ +231 AUE_SHMGET NOSTD|NOPROTO { int shmget(key_t key, size_t size, \ int shmflg); } ; 232 AUE_NULL STD { int freebsd32_clock_gettime(clockid_t clock_id, \ From nobody Wed Nov 17 20:22:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EF99918545FF; Wed, 17 Nov 2021 20:22: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 4HvZ960Vylz4r6f; Wed, 17 Nov 2021 20:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08358276C4; Wed, 17 Nov 2021 20:22: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 1AHKMGoY059511; Wed, 17 Nov 2021 20:22:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMGvd059510; Wed, 17 Nov 2021 20:22:16 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:16 GMT Message-Id: <202111172022.1AHKMGvd059510@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 9946c920a426 - main - freebsd32: wait6 and procctl take idtype_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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9946c920a4267e5bef322239fa8484e715baca4c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9946c920a4267e5bef322239fa8484e715baca4c commit 9946c920a4267e5bef322239fa8484e715baca4c Author: Brooks Davis AuthorDate: 2021-11-17 20:12:23 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:23 +0000 freebsd32: wait6 and procctl take idtype_t Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 8 ++++---- sys/compat/freebsd32/freebsd32_systrace_args.c | 16 ++++++++-------- sys/compat/freebsd32/syscalls.master | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index def4391848b2..caccf13f02ec 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -597,7 +597,7 @@ struct freebsd32_posix_fadvise_args { char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)]; }; struct freebsd32_wait6_args { - char idtype_l_[PADL_(int)]; int idtype; char idtype_r_[PADR_(int)]; + char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; @@ -623,7 +623,7 @@ struct freebsd32_posix_fadvise_args { char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)]; }; struct freebsd32_wait6_args { - char idtype_l_[PADL_(int)]; int idtype; char idtype_r_[PADR_(int)]; + char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; @@ -647,7 +647,7 @@ struct freebsd32_aio_mlock_args { }; #ifdef PAD64_REQUIRED struct freebsd32_procctl_args { - char idtype_l_[PADL_(int)]; int idtype; char idtype_r_[PADR_(int)]; + char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; @@ -656,7 +656,7 @@ struct freebsd32_procctl_args { }; #else struct freebsd32_procctl_args { - char idtype_l_[PADL_(int)]; int idtype; char idtype_r_[PADR_(int)]; + char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char com_l_[PADL_(int)]; int com; char com_r_[PADR_(int)]; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 61a8e2e82a57..6764f370d4c9 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2916,7 +2916,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_wait6 */ case 532: { struct freebsd32_wait6_args *p = params; - iarg[0] = p->idtype; /* int */ + iarg[0] = p->idtype; /* idtype_t */ iarg[1] = p->pad; /* int */ uarg[2] = p->id1; /* uint32_t */ uarg[3] = p->id2; /* uint32_t */ @@ -2954,7 +2954,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_wait6 */ case 532: { struct freebsd32_wait6_args *p = params; - iarg[0] = p->idtype; /* int */ + iarg[0] = p->idtype; /* idtype_t */ uarg[1] = p->id1; /* uint32_t */ uarg[2] = p->id2; /* uint32_t */ uarg[3] = (intptr_t)p->status; /* int * */ @@ -3066,7 +3066,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_procctl */ case 544: { struct freebsd32_procctl_args *p = params; - iarg[0] = p->idtype; /* int */ + iarg[0] = p->idtype; /* idtype_t */ iarg[1] = p->pad; /* int */ uarg[2] = p->id1; /* uint32_t */ uarg[3] = p->id2; /* uint32_t */ @@ -3079,7 +3079,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_procctl */ case 544: { struct freebsd32_procctl_args *p = params; - iarg[0] = p->idtype; /* int */ + iarg[0] = p->idtype; /* idtype_t */ uarg[1] = p->id1; /* uint32_t */ uarg[2] = p->id2; /* uint32_t */ iarg[3] = p->com; /* int */ @@ -8294,7 +8294,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 532: switch (ndx) { case 0: - p = "int"; + p = "idtype_t"; break; case 1: p = "int"; @@ -8373,7 +8373,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 532: switch (ndx) { case 0: - p = "int"; + p = "idtype_t"; break; case 1: p = "uint32_t"; @@ -8573,7 +8573,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 544: switch (ndx) { case 0: - p = "int"; + p = "idtype_t"; break; case 1: p = "int"; @@ -8599,7 +8599,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 544: switch (ndx) { case 0: - p = "int"; + p = "idtype_t"; break; case 1: p = "uint32_t"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index de85234343c1..ca1a42cf4fad 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -1032,7 +1032,7 @@ uint32_t offset1, uint32_t offset2,\ uint32_t len1, uint32_t len2, \ int advice); } -532 AUE_WAIT6 STD { int freebsd32_wait6(int idtype, int pad, \ +532 AUE_WAIT6 STD { int freebsd32_wait6(idtype_t idtype, int pad, \ uint32_t id1, uint32_t id2, \ int *status, int options, \ struct wrusage32 *wrusage, \ @@ -1045,7 +1045,7 @@ uint32_t offset1, uint32_t offset2,\ uint32_t len1, uint32_t len2, \ int advice); } -532 AUE_WAIT6 STD { int freebsd32_wait6(int idtype, \ +532 AUE_WAIT6 STD { int freebsd32_wait6(idtype_t idtype, \ uint32_t id1, uint32_t id2, \ int *status, int options, \ struct wrusage32 *wrusage, \ @@ -1080,11 +1080,11 @@ 543 AUE_AIO_MLOCK STD { int freebsd32_aio_mlock( \ struct aiocb32 *aiocbp); } #ifdef PAD64_REQUIRED -544 AUE_PROCCTL STD { int freebsd32_procctl(int idtype, int pad, \ +544 AUE_PROCCTL STD { int freebsd32_procctl(idtype_t idtype, int pad, \ uint32_t id1, uint32_t id2, int com, \ void *data); } #else -544 AUE_PROCCTL STD { int freebsd32_procctl(int idtype, \ +544 AUE_PROCCTL STD { int freebsd32_procctl(idtype_t idtype, \ uint32_t id1, uint32_t id2, int com, \ void *data); } #endif From nobody Wed Nov 17 20:22:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C01F718549A9; Wed, 17 Nov 2021 20:22: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 4HvZ9769JGz4r1x; Wed, 17 Nov 2021 20:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F92927845; Wed, 17 Nov 2021 20:22: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 1AHKMIn3059535; Wed, 17 Nov 2021 20:22:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMIte059534; Wed, 17 Nov 2021 20:22:18 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:18 GMT Message-Id: <202111172022.1AHKMIte059534@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 381f6804ec6a - main - freebsd32: fix type of olstat arg List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 381f6804ec6afd65871b59a7e94cac090e1d00df Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=381f6804ec6afd65871b59a7e94cac090e1d00df commit 381f6804ec6afd65871b59a7e94cac090e1d00df Author: Brooks Davis AuthorDate: 2021-11-17 20:12:23 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:23 +0000 freebsd32: fix type of olstat arg Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 2 +- sys/compat/freebsd32/syscalls.master | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index caccf13f02ec..102e574bdd2a 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -918,7 +918,7 @@ struct ofreebsd32_stat_args { }; struct ofreebsd32_lstat_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char ub_l_[PADL_(struct ostat *)]; struct ostat * ub; char ub_r_[PADR_(struct ostat *)]; + char ub_l_[PADL_(struct ostat32 *)]; struct ostat32 * ub; char ub_r_[PADR_(struct ostat32 *)]; }; struct ofreebsd32_sigaction_args { char signum_l_[PADL_(int)]; int signum; char signum_r_[PADR_(int)]; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index ca1a42cf4fad..b6ed5a7c6a21 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -130,7 +130,7 @@ struct ostat32 *ub); } 39 AUE_GETPPID NOPROTO { pid_t getppid(void); } 40 AUE_LSTAT COMPAT { int freebsd32_lstat(const char *path, \ - struct ostat *ub); } + struct ostat32 *ub); } 41 AUE_DUP NOPROTO { int dup(u_int fd); } 42 AUE_PIPE COMPAT10 { int freebsd32_pipe(void); } 43 AUE_GETEGID NOPROTO { gid_t getegid(void); } From nobody Wed Nov 17 20:22:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DC93518548D5; Wed, 17 Nov 2021 20:22: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 4HvZ982k8Vz4qrX; Wed, 17 Nov 2021 20:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45C9527A80; Wed, 17 Nov 2021 20:22: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 1AHKMJT1059565; Wed, 17 Nov 2021 20:22:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMJSR059564; Wed, 17 Nov 2021 20:22:19 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:19 GMT Message-Id: <202111172022.1AHKMJSR059564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 2e89f95d6ae4 - main - freebsd32: fix types on statfs syscalls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e89f95d6ae4e2f0f226589512d0efa88c95aa84 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=2e89f95d6ae4e2f0f226589512d0efa88c95aa84 commit 2e89f95d6ae4e2f0f226589512d0efa88c95aa84 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:23 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:23 +0000 freebsd32: fix types on statfs syscalls Rename struct statfs32 to struct ostatfs32 to mirror struct ostatfs. These structs are use for COMPAT4 support. Stop using struct statfs32 for modern implementations as struct statfs uses fixed-width types and it the same on all architectures. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32.h | 12 ++++++------ sys/compat/freebsd32/freebsd32_misc.c | 18 +++++++++--------- sys/compat/freebsd32/freebsd32_proto.h | 8 ++++---- sys/compat/freebsd32/freebsd32_systrace_args.c | 16 ++++++++-------- sys/compat/freebsd32/syscalls.master | 16 ++++++++-------- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 8a14a42db813..1a5475595d76 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -115,11 +115,11 @@ struct umutex32 { __uint32_t m_spare[2]; }; -#define FREEBSD4_MFSNAMELEN 16 -#define FREEBSD4_MNAMELEN (88 - 2 * sizeof(int32_t)) +#define FREEBSD4_OMFSNAMELEN 16 +#define FREEBSD4_OMNAMELEN (88 - 2 * sizeof(int32_t)) /* 4.x version */ -struct statfs32 { +struct ostatfs32 { int32_t f_spare2; int32_t f_bsize; int32_t f_iosize; @@ -134,12 +134,12 @@ struct statfs32 { int32_t f_flags; int32_t f_syncwrites; int32_t f_asyncwrites; - char f_fstypename[FREEBSD4_MFSNAMELEN]; - char f_mntonname[FREEBSD4_MNAMELEN]; + char f_fstypename[FREEBSD4_OMFSNAMELEN]; + char f_mntonname[FREEBSD4_OMNAMELEN]; int32_t f_syncreads; int32_t f_asyncreads; int16_t f_spares1; - char f_mntfromname[FREEBSD4_MNAMELEN]; + char f_mntfromname[FREEBSD4_OMNAMELEN]; int16_t f_spares2 __packed; int32_t f_spare[2]; }; diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 12d125132883..867c957f010a 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -154,7 +154,7 @@ CTASSERT(sizeof(struct timespec32) == 8); CTASSERT(sizeof(struct itimerval32) == 16); CTASSERT(sizeof(struct bintime32) == 12); #endif -CTASSERT(sizeof(struct statfs32) == 256); +CTASSERT(sizeof(struct ostatfs32) == 256); #ifdef __amd64__ CTASSERT(sizeof(struct rusage32) == 72); #endif @@ -260,7 +260,7 @@ freebsd32_wait6(struct thread *td, struct freebsd32_wait6_args *uap) #ifdef COMPAT_FREEBSD4 static void -copy_statfs(struct statfs *in, struct statfs32 *out) +copy_statfs(struct statfs *in, struct ostatfs32 *out) { statfs_scale_blocks(in, INT32_MAX); @@ -281,11 +281,11 @@ copy_statfs(struct statfs *in, struct statfs32 *out) strlcpy(out->f_fstypename, in->f_fstypename, MFSNAMELEN); strlcpy(out->f_mntonname, - in->f_mntonname, min(MNAMELEN, FREEBSD4_MNAMELEN)); + in->f_mntonname, min(MNAMELEN, FREEBSD4_OMNAMELEN)); out->f_syncreads = MIN(in->f_syncreads, INT32_MAX); out->f_asyncreads = MIN(in->f_asyncreads, INT32_MAX); strlcpy(out->f_mntfromname, - in->f_mntfromname, min(MNAMELEN, FREEBSD4_MNAMELEN)); + in->f_mntfromname, min(MNAMELEN, FREEBSD4_OMNAMELEN)); } #endif @@ -295,11 +295,11 @@ freebsd4_freebsd32_getfsstat(struct thread *td, struct freebsd4_freebsd32_getfsstat_args *uap) { struct statfs *buf, *sp; - struct statfs32 stat32; + struct ostatfs32 stat32; size_t count, size, copycount; int error; - count = uap->bufsize / sizeof(struct statfs32); + count = uap->bufsize / sizeof(struct ostatfs32); size = count * sizeof(struct statfs); error = kern_getfsstat(td, &buf, size, &count, UIO_SYSSPACE, uap->mode); if (size > 0) { @@ -1828,7 +1828,7 @@ freebsd32_adjtime(struct thread *td, struct freebsd32_adjtime_args *uap) int freebsd4_freebsd32_statfs(struct thread *td, struct freebsd4_freebsd32_statfs_args *uap) { - struct statfs32 s32; + struct ostatfs32 s32; struct statfs *sp; int error; @@ -1847,7 +1847,7 @@ freebsd4_freebsd32_statfs(struct thread *td, struct freebsd4_freebsd32_statfs_ar int freebsd4_freebsd32_fstatfs(struct thread *td, struct freebsd4_freebsd32_fstatfs_args *uap) { - struct statfs32 s32; + struct ostatfs32 s32; struct statfs *sp; int error; @@ -1866,7 +1866,7 @@ freebsd4_freebsd32_fstatfs(struct thread *td, struct freebsd4_freebsd32_fstatfs_ int freebsd4_freebsd32_fhstatfs(struct thread *td, struct freebsd4_freebsd32_fhstatfs_args *uap) { - struct statfs32 s32; + struct ostatfs32 s32; struct statfs *sp; fhandle_t fh; int error; diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 102e574bdd2a..673618de8771 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -1012,21 +1012,21 @@ int ofreebsd32_getdirentries(struct thread *, struct ofreebsd32_getdirentries_ar #define PAD64_REQUIRED #endif struct freebsd4_freebsd32_getfsstat_args { - char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)]; + char buf_l_[PADL_(struct ostatfs32 *)]; struct ostatfs32 * buf; char buf_r_[PADR_(struct ostatfs32 *)]; char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)]; char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; }; struct freebsd4_freebsd32_statfs_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)]; + char buf_l_[PADL_(struct ostatfs32 *)]; struct ostatfs32 * buf; char buf_r_[PADR_(struct ostatfs32 *)]; }; struct freebsd4_freebsd32_fstatfs_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)]; + char buf_l_[PADL_(struct ostatfs32 *)]; struct ostatfs32 * buf; char buf_r_[PADR_(struct ostatfs32 *)]; }; struct freebsd4_freebsd32_fhstatfs_args { char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; - char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)]; + char buf_l_[PADL_(struct ostatfs32 *)]; struct ostatfs32 * buf; char buf_r_[PADR_(struct ostatfs32 *)]; }; struct freebsd4_freebsd32_sendfile_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 6764f370d4c9..5532ba1b942e 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -3163,7 +3163,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 555: { struct statfs_args *p = params; uarg[0] = (intptr_t)p->path; /* const char * */ - uarg[1] = (intptr_t)p->buf; /* struct statfs32 * */ + uarg[1] = (intptr_t)p->buf; /* struct statfs * */ *n_args = 2; break; } @@ -3171,14 +3171,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 556: { struct fstatfs_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->buf; /* struct statfs32 * */ + uarg[1] = (intptr_t)p->buf; /* struct statfs * */ *n_args = 2; break; } /* getfsstat */ case 557: { struct getfsstat_args *p = params; - uarg[0] = (intptr_t)p->buf; /* struct statfs32 * */ + uarg[0] = (intptr_t)p->buf; /* struct statfs * */ iarg[1] = p->bufsize; /* long */ iarg[2] = p->mode; /* int */ *n_args = 3; @@ -3188,7 +3188,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 558: { struct fhstatfs_args *p = params; uarg[0] = (intptr_t)p->u_fhp; /* const struct fhandle * */ - uarg[1] = (intptr_t)p->buf; /* struct statfs32 * */ + uarg[1] = (intptr_t)p->buf; /* struct statfs * */ *n_args = 2; break; } @@ -8750,7 +8750,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 1: - p = "userland struct statfs32 *"; + p = "userland struct statfs *"; break; default: break; @@ -8763,7 +8763,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct statfs32 *"; + p = "userland struct statfs *"; break; default: break; @@ -8773,7 +8773,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 557: switch (ndx) { case 0: - p = "userland struct statfs32 *"; + p = "userland struct statfs *"; break; case 1: p = "long"; @@ -8792,7 +8792,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct fhandle *"; break; case 1: - p = "userland struct statfs32 *"; + p = "userland struct statfs *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index b6ed5a7c6a21..bc836ae676c4 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -91,7 +91,7 @@ 16 AUE_CHOWN NOPROTO { int chown(const char *path, int uid, int gid); } 17 AUE_NULL NOPROTO { void *break(char *nsize); } 18 AUE_GETFSSTAT COMPAT4 { int freebsd32_getfsstat( \ - struct statfs32 *buf, long bufsize, \ + struct ostatfs32 *buf, long bufsize, \ int mode); } 19 AUE_LSEEK COMPAT { int freebsd32_lseek(int fd, int offset, \ int whence); } @@ -314,9 +314,9 @@ 156 AUE_GETDIRENTRIES COMPAT { int freebsd32_getdirentries(int fd, \ char *buf, u_int count, uint32_t *basep); } 157 AUE_STATFS COMPAT4 { int freebsd32_statfs(const char *path, \ - struct statfs32 *buf); } + struct ostatfs32 *buf); } 158 AUE_FSTATFS COMPAT4 { int freebsd32_fstatfs(int fd, \ - struct statfs32 *buf); } + struct ostatfs32 *buf); } 159 AUE_NULL UNIMPL nosys 160 AUE_LGETFH UNIMPL lgetfh 161 AUE_NFS_GETFH NOPROTO { int getfh(const char *fname, \ @@ -544,7 +544,7 @@ 296 AUE_NULL UNIMPL nosys 297 AUE_FHSTATFS COMPAT4 { int freebsd32_fhstatfs( \ const struct fhandle *u_fhp, \ - struct statfs32 *buf); } + struct ostatfs32 *buf); } 298 AUE_FHOPEN NOPROTO { int fhopen(const struct fhandle *u_fhp, \ int flags); } 299 AUE_FHSTAT COMPAT11 { int freebsd32_fhstat( \ @@ -1112,12 +1112,12 @@ int fd, char *buf, size_t count, \ off_t *basep); } 555 AUE_STATFS NOPROTO { int statfs(const char *path, \ - struct statfs32 *buf); } -556 AUE_FSTATFS NOPROTO { int fstatfs(int fd, struct statfs32 *buf); } -557 AUE_GETFSSTAT NOPROTO { int getfsstat(struct statfs32 *buf, \ + struct statfs *buf); } +556 AUE_FSTATFS NOPROTO { int fstatfs(int fd, struct statfs *buf); } +557 AUE_GETFSSTAT NOPROTO { int getfsstat(struct statfs *buf, \ long bufsize, int mode); } 558 AUE_FHSTATFS NOPROTO { int fhstatfs(const struct fhandle *u_fhp, \ - struct statfs32 *buf); } + struct statfs *buf); } #ifdef PAD64_REQUIRED 559 AUE_MKNODAT STD { int freebsd32_mknodat(int fd, \ const char *path, mode_t mode, \ From nobody Wed Nov 17 20:22:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D3EE71854BA9; Wed, 17 Nov 2021 20:22:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9C2R6Kz4r4n; Wed, 17 Nov 2021 20:22:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 909EE2736F; Wed, 17 Nov 2021 20:22: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 1AHKMLBv059613; Wed, 17 Nov 2021 20:22:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMLJ4059612; Wed, 17 Nov 2021 20:22:21 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:21 GMT Message-Id: <202111172022.1AHKMLJ4059612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6dcd7db176f8 - main - freebsd32: fix type size of pointer array 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6dcd7db176f8ca4372e215f015636cfea7d4e52a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6dcd7db176f8ca4372e215f015636cfea7d4e52a commit 6dcd7db176f8ca4372e215f015636cfea7d4e52a Author: Brooks Davis AuthorDate: 2021-11-17 20:12:23 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:23 +0000 freebsd32: fix type size of pointer array args Make pointers to arrays of pointers `uint32_t *` so the sizes of the array elements are correct. In an ideal world we'd use something like __ptr32 annotations instead. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 8 ++++---- sys/compat/freebsd32/freebsd32_systrace_args.c | 16 ++++++++-------- sys/compat/freebsd32/syscalls.master | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 673618de8771..34ba0974c9b9 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -247,7 +247,7 @@ struct freebsd32_aio_write_args { }; struct freebsd32_lio_listio_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; - char acb_list_l_[PADL_(struct aiocb32 * const *)]; struct aiocb32 * const * acb_list; char acb_list_r_[PADR_(struct aiocb32 * const *)]; + char acb_list_l_[PADL_(uint32_t *)]; uint32_t * acb_list; char acb_list_r_[PADR_(uint32_t *)]; char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; char sig_l_[PADL_(struct sigevent32 *)]; struct sigevent32 * sig; char sig_r_[PADR_(struct sigevent32 *)]; }; @@ -281,7 +281,7 @@ struct freebsd32_aio_return_args { char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; }; struct freebsd32_aio_suspend_args { - char aiocbp_l_[PADL_(struct aiocb32 * const *)]; struct aiocb32 * const * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 * const *)]; + char aiocbp_l_[PADL_(uint32_t *)]; uint32_t * aiocbp; char aiocbp_r_[PADR_(uint32_t *)]; char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; }; @@ -305,7 +305,7 @@ struct freebsd32_sigwaitinfo_args { char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; }; struct freebsd32_aio_waitcomplete_args { - char aiocbp_l_[PADL_(struct aiocb32 **)]; struct aiocb32 ** aiocbp; char aiocbp_r_[PADR_(struct aiocb32 **)]; + char aiocbp_l_[PADL_(uint32_t *)]; uint32_t * aiocbp; char aiocbp_r_[PADR_(uint32_t *)]; char timeout_l_[PADL_(struct timespec32 *)]; struct timespec32 * timeout; char timeout_r_[PADR_(struct timespec32 *)]; }; struct freebsd32_nmount_args { @@ -1130,7 +1130,7 @@ struct freebsd6_freebsd32_aio_write_args { }; struct freebsd6_freebsd32_lio_listio_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; - char acb_list_l_[PADL_(struct oaiocb32 * const *)]; struct oaiocb32 * const * acb_list; char acb_list_r_[PADR_(struct oaiocb32 * const *)]; + char acb_list_l_[PADL_(uint32_t *)]; uint32_t * acb_list; char acb_list_r_[PADR_(uint32_t *)]; char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; char sig_l_[PADL_(struct osigevent32 *)]; struct osigevent32 * sig; char sig_r_[PADR_(struct osigevent32 *)]; }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 0315b0b3f142..ffeae23fc3a3 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1278,7 +1278,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 257: { struct freebsd32_lio_listio_args *p = params; iarg[0] = p->mode; /* int */ - uarg[1] = (intptr_t)p->acb_list; /* struct aiocb32 * const * */ + uarg[1] = (intptr_t)p->acb_list; /* uint32_t * */ iarg[2] = p->nent; /* int */ uarg[3] = (intptr_t)p->sig; /* struct sigevent32 * */ *n_args = 4; @@ -1437,7 +1437,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_aio_suspend */ case 315: { struct freebsd32_aio_suspend_args *p = params; - uarg[0] = (intptr_t)p->aiocbp; /* struct aiocb32 * const * */ + uarg[0] = (intptr_t)p->aiocbp; /* uint32_t * */ iarg[1] = p->nent; /* int */ uarg[2] = (intptr_t)p->timeout; /* const struct timespec32 * */ *n_args = 3; @@ -1721,7 +1721,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_aio_waitcomplete */ case 359: { struct freebsd32_aio_waitcomplete_args *p = params; - uarg[0] = (intptr_t)p->aiocbp; /* struct aiocb32 ** */ + uarg[0] = (intptr_t)p->aiocbp; /* uint32_t * */ uarg[1] = (intptr_t)p->timeout; /* struct timespec32 * */ *n_args = 2; break; @@ -2271,7 +2271,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct abort2_args *p = params; uarg[0] = (intptr_t)p->why; /* const char * */ iarg[1] = p->nargs; /* int */ - uarg[2] = (intptr_t)p->args; /* void ** */ + uarg[2] = (intptr_t)p->args; /* uint32_t * */ *n_args = 3; break; } @@ -5445,7 +5445,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct aiocb32 * const *"; + p = "userland uint32_t *"; break; case 2: p = "int"; @@ -5702,7 +5702,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 315: switch (ndx) { case 0: - p = "userland struct aiocb32 * const *"; + p = "userland uint32_t *"; break; case 1: p = "int"; @@ -6166,7 +6166,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 359: switch (ndx) { case 0: - p = "userland struct aiocb32 **"; + p = "userland uint32_t *"; break; case 1: p = "userland struct timespec32 *"; @@ -7100,7 +7100,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 2: - p = "userland void **"; + p = "userland uint32_t *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index ac0ece71ef5b..81ed039a4195 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -491,7 +491,7 @@ 256 AUE_AIO_WRITE STD { int freebsd32_aio_write( \ struct aiocb32 *aiocbp); } 257 AUE_LIO_LISTIO STD { int freebsd32_lio_listio(int mode, \ - struct aiocb32 * const *acb_list, \ + uint32_t *acb_list, \ int nent, struct sigevent32 *sig); } 258 AUE_NULL UNIMPL nosys 259 AUE_NULL UNIMPL nosys @@ -572,7 +572,7 @@ 314 AUE_AIO_RETURN STD { int freebsd32_aio_return( \ struct aiocb32 *aiocbp); } 315 AUE_AIO_SUSPEND STD { int freebsd32_aio_suspend( \ - struct aiocb32 * const * aiocbp, int nent, \ + uint32_t * aiocbp, int nent, \ const struct timespec32 *timeout); } 316 AUE_AIO_CANCEL NOPROTO { int aio_cancel(int fd, \ struct aiocb *aiocbp); } @@ -583,7 +583,7 @@ 319 AUE_AIO_WRITE COMPAT6 { int freebsd32_aio_write( \ struct oaiocb32 *aiocbp); } 320 AUE_LIO_LISTIO COMPAT6 { int freebsd32_lio_listio(int mode, \ - struct oaiocb32 * const *acb_list, \ + uint32_t *acb_list, \ int nent, struct osigevent32 *sig); } 321 AUE_NULL NOPROTO { int yield(void); } 322 AUE_NULL OBSOL thr_sleep @@ -662,7 +662,7 @@ const char *path, int attrnamespace, \ const char *attrname); } 359 AUE_AIO_WAITCOMPLETE STD { int freebsd32_aio_waitcomplete( \ - struct aiocb32 **aiocbp, \ + uint32_t *aiocbp, \ struct timespec32 *timeout); } 360 AUE_GETRESUID NOPROTO { int getresuid(uid_t *ruid, uid_t *euid, \ uid_t *suid); } @@ -850,7 +850,7 @@ 461 AUE_MQ_NOTIFY NOSTD { int freebsd32_kmq_notify(int mqd, \ const struct sigevent32 *sigev); } 462 AUE_MQ_UNLINK NOPROTO|NOSTD { int kmq_unlink(const char *path); } -463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); } +463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, uint32_t *args); } 464 AUE_NULL NOPROTO { int thr_set_name(int32_t id, const char *name); } 465 AUE_AIO_FSYNC STD { int freebsd32_aio_fsync(int op, \ struct aiocb32 *aiocbp); } From nobody Wed Nov 17 20:22:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F27441854B22; Wed, 17 Nov 2021 20:22: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 4HvZ994VCVz4qrc; Wed, 17 Nov 2021 20:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 73865276C5; Wed, 17 Nov 2021 20:22: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 1AHKMKVX059589; Wed, 17 Nov 2021 20:22:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMKcW059588; Wed, 17 Nov 2021 20:22:20 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:20 GMT Message-Id: <202111172022.1AHKMKcW059588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 465b80c04a77 - main - freebsd32: thread IDs are int32_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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 465b80c04a7765a5ccccafddc8eec5f9444f62cf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=465b80c04a7765a5ccccafddc8eec5f9444f62cf commit 465b80c04a7765a5ccccafddc8eec5f9444f62cf Author: Brooks Davis AuthorDate: 2021-11-17 20:12:23 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:23 +0000 freebsd32: thread IDs are int32_t Thread IDs are of type long which means int32_t on 32-bit systems. While this detail is handled without compat functions, expose it here as code to generate prototypes from the default syscalls.master will do so. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_systrace_args.c | 24 ++++++++++++------------ sys/compat/freebsd32/syscalls.master | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 5532ba1b942e..0315b0b3f142 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2028,21 +2028,21 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* thr_exit */ case 431: { struct thr_exit_args *p = params; - uarg[0] = (intptr_t)p->state; /* long * */ + uarg[0] = (intptr_t)p->state; /* int32_t * */ *n_args = 1; break; } /* thr_self */ case 432: { struct thr_self_args *p = params; - uarg[0] = (intptr_t)p->id; /* long * */ + uarg[0] = (intptr_t)p->id; /* int32_t * */ *n_args = 1; break; } /* thr_kill */ case 433: { struct thr_kill_args *p = params; - iarg[0] = p->id; /* long */ + iarg[0] = p->id; /* int32_t */ iarg[1] = p->sig; /* int */ *n_args = 2; break; @@ -2102,7 +2102,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* thr_wake */ case 443: { struct thr_wake_args *p = params; - iarg[0] = p->id; /* long */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } @@ -2278,7 +2278,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* thr_set_name */ case 464: { struct thr_set_name_args *p = params; - iarg[0] = p->id; /* long */ + iarg[0] = p->id; /* int32_t */ uarg[1] = (intptr_t)p->name; /* const char * */ *n_args = 2; break; @@ -2486,7 +2486,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 481: { struct thr_kill2_args *p = params; iarg[0] = p->pid; /* pid_t */ - iarg[1] = p->id; /* long */ + iarg[1] = p->id; /* int32_t */ iarg[2] = p->sig; /* int */ *n_args = 3; break; @@ -6690,7 +6690,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 431: switch (ndx) { case 0: - p = "userland long *"; + p = "userland int32_t *"; break; default: break; @@ -6700,7 +6700,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 432: switch (ndx) { case 0: - p = "userland long *"; + p = "userland int32_t *"; break; default: break; @@ -6710,7 +6710,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 433: switch (ndx) { case 0: - p = "long"; + p = "int32_t"; break; case 1: p = "int"; @@ -6813,7 +6813,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 443: switch (ndx) { case 0: - p = "long"; + p = "int32_t"; break; default: break; @@ -7110,7 +7110,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 464: switch (ndx) { case 0: - p = "long"; + p = "int32_t"; break; case 1: p = "userland const char *"; @@ -7519,7 +7519,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "pid_t"; break; case 1: - p = "long"; + p = "int32_t"; break; case 2: p = "int"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index bc836ae676c4..ac0ece71ef5b 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -786,9 +786,9 @@ 429 AUE_SIGWAIT NOPROTO { int sigwait(const sigset_t *set, \ int *sig); } 430 AUE_THR_CREATE UNIMPL thr_create; -431 AUE_THR_EXIT NOPROTO { void thr_exit(long *state); } -432 AUE_NULL NOPROTO { int thr_self(long *id); } -433 AUE_THR_KILL NOPROTO { int thr_kill(long id, int sig); } +431 AUE_THR_EXIT NOPROTO { void thr_exit(int32_t *state); } +432 AUE_NULL NOPROTO { int thr_self(int32_t *id); } +433 AUE_THR_KILL NOPROTO { int thr_kill(int32_t id, int sig); } 434 AUE_NULL COMPAT10 { int freebsd32_umtx_lock( \ struct umtx *umtx); } 435 AUE_NULL COMPAT10 { int freebsd32_umtx_unlock( \ @@ -808,7 +808,7 @@ const struct timespec32 *abstime); } 442 AUE_NULL STD { int freebsd32_thr_suspend( \ const struct timespec32 *timeout); } -443 AUE_NULL NOPROTO { int thr_wake(long id); } +443 AUE_NULL NOPROTO { int thr_wake(int32_t id); } 444 AUE_MODUNLOAD NOPROTO { int kldunloadf(int fileid, int flags); } 445 AUE_AUDIT NOPROTO { int audit(const void *record, \ u_int length); } @@ -851,7 +851,7 @@ const struct sigevent32 *sigev); } 462 AUE_MQ_UNLINK NOPROTO|NOSTD { int kmq_unlink(const char *path); } 463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); } -464 AUE_NULL NOPROTO { int thr_set_name(long id, const char *name); } +464 AUE_NULL NOPROTO { int thr_set_name(int32_t id, const char *name); } 465 AUE_AIO_FSYNC STD { int freebsd32_aio_fsync(int op, \ struct aiocb32 *aiocbp); } 466 AUE_RTPRIO NOPROTO { int rtprio_thread(int function, \ @@ -912,7 +912,7 @@ 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ uint32_t length1, uint32_t length2); } #endif -481 AUE_THR_KILL2 NOPROTO { int thr_kill2(pid_t pid, long id, int sig); } +481 AUE_THR_KILL2 NOPROTO { int thr_kill2(pid_t pid, int32_t id, int sig); } 482 AUE_SHMOPEN COMPAT12|NOPROTO { int shm_open( \ const char *path, int flags, mode_t mode); } 483 AUE_SHMUNLINK NOPROTO { int shm_unlink(const char *path); } From nobody Wed Nov 17 20:22:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E791A1854C1F; Wed, 17 Nov 2021 20:22: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 4HvZ9D6Jb0z4r0H; Wed, 17 Nov 2021 20:22:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA5A727A83; Wed, 17 Nov 2021 20:22: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 1AHKMM0C059637; Wed, 17 Nov 2021 20:22:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMMV4059636; Wed, 17 Nov 2021 20:22:22 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:22 GMT Message-Id: <202111172022.1AHKMMV4059636@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e5b099765058 - main - freebsd32: add a union semun_old32 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5b0997650582504139835fdaad07d166127e5fc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e5b0997650582504139835fdaad07d166127e5fc commit e5b0997650582504139835fdaad07d166127e5fc Author: Brooks Davis AuthorDate: 2021-11-17 20:12:23 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:23 +0000 freebsd32: add a union semun_old32 Use this for COMPAT7 support. In practice it's the same as union semun32 since the pointers become uint32_t's the it's more symetric and is the logical thing to generate from semun_old. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_ipc.h | 6 ++++++ sys/compat/freebsd32/freebsd32_proto.h | 2 +- sys/compat/freebsd32/syscalls.master | 2 +- sys/kern/sysv_sem.c | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_ipc.h b/sys/compat/freebsd32/freebsd32_ipc.h index ac469585cafe..d1fa7f1cf8ca 100644 --- a/sys/compat/freebsd32/freebsd32_ipc.h +++ b/sys/compat/freebsd32/freebsd32_ipc.h @@ -181,6 +181,12 @@ struct shmid_ds32_old { uint32_t shm_internal; }; +union semun_old32 { + int val; + uint32_t buf; + uint32_t array; +}; + void freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, struct ipc_perm *ip); void freebsd32_ipcperm_old_out(struct ipc_perm *ip, diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 34ba0974c9b9..c3a7dd241c47 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -1171,7 +1171,7 @@ struct freebsd7_freebsd32_semctl_args { char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char arg_l_[PADL_(union semun32 *)]; union semun32 * arg; char arg_r_[PADR_(union semun32 *)]; + char arg_l_[PADL_(union semun_old32 *)]; union semun_old32 * arg; char arg_r_[PADR_(union semun_old32 *)]; }; struct freebsd7_freebsd32_msgctl_args { char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 81ed039a4195..d9feba7aef0e 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -420,7 +420,7 @@ 220 AUE_SEMCTL COMPAT7|NOSTD { int freebsd32_semctl( \ int semid, int semnum, \ - int cmd, union semun32 *arg); } + int cmd, union semun_old32 *arg); } 221 AUE_SEMGET NOSTD|NOPROTO { int semget(key_t key, int nsems, \ int semflg); } 222 AUE_SEMOP NOSTD|NOPROTO { int semop(int semid, \ diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index dd8925246d1e..274226481fa7 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1870,7 +1870,7 @@ freebsd7_freebsd32_semctl(struct thread *td, struct semid_ds32_old dsbuf32; struct semid_ds dsbuf; union semun semun; - union semun32 arg; + union semun_old32 arg; register_t rval; int error; From nobody Wed Nov 17 20:22:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 914971854DE5; Wed, 17 Nov 2021 20:22: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 4HvZ9G3f1rz4r95; Wed, 17 Nov 2021 20:22:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D954427849; Wed, 17 Nov 2021 20:22: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 1AHKMN7X059661; Wed, 17 Nov 2021 20:22:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMNOQ059660; Wed, 17 Nov 2021 20:22:23 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:23 GMT Message-Id: <202111172022.1AHKMNOQ059660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 5d0d686940e4 - main - freebsd32: struct kld32_file_stat -> struct kld_file_stat32 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d0d686940e48fbfbbbbe7db548cf227a13973bc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5d0d686940e48fbfbbbbe7db548cf227a13973bc commit 5d0d686940e48fbfbbbbe7db548cf227a13973bc Author: Brooks Davis AuthorDate: 2021-11-17 20:12:23 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:23 +0000 freebsd32: struct kld32_file_stat -> struct kld_file_stat32 Follow common convention and put the `32` on the end of the struct name. This is a step toward generating freebsd32 syscall files from sys/kern/syscalls.master. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32.h | 4 ++-- sys/compat/freebsd32/freebsd32_misc.c | 6 +++--- sys/compat/freebsd32/freebsd32_proto.h | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 4 ++-- sys/compat/freebsd32/syscalls.master | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 1a5475595d76..b2f99949f920 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -384,7 +384,7 @@ struct kinfo_sigtramp32 { uint32_t ksigtramp_spare[4]; }; -struct kld32_file_stat_1 { +struct kld_file_stat_1_32 { int version; /* set to sizeof(struct kld_file_stat_1) */ char name[MAXPATHLEN]; int refs; @@ -393,7 +393,7 @@ struct kld32_file_stat_1 { uint32_t size; /* size in bytes */ }; -struct kld32_file_stat { +struct kld_file_stat32 { int version; /* set to sizeof(struct kld_file_stat) */ char name[MAXPATHLEN]; int refs; diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 867c957f010a..da7fd1939324 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -3534,14 +3534,14 @@ int freebsd32_kldstat(struct thread *td, struct freebsd32_kldstat_args *uap) { struct kld_file_stat *stat; - struct kld32_file_stat *stat32; + struct kld_file_stat32 *stat32; int error, version; if ((error = copyin(&uap->stat->version, &version, sizeof(version))) != 0) return (error); - if (version != sizeof(struct kld32_file_stat_1) && - version != sizeof(struct kld32_file_stat)) + if (version != sizeof(struct kld_file_stat_1_32) && + version != sizeof(struct kld_file_stat32)) return (EINVAL); stat = malloc(sizeof(*stat), M_TEMP, M_WAITOK | M_ZERO); diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index c3a7dd241c47..a2682289407b 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -275,7 +275,7 @@ struct freebsd32_modstat_args { }; struct freebsd32_kldstat_args { char fileid_l_[PADL_(int)]; int fileid; char fileid_r_[PADR_(int)]; - char stat_l_[PADL_(struct kld32_file_stat *)]; struct kld32_file_stat * stat; char stat_r_[PADR_(struct kld32_file_stat *)]; + char stat_l_[PADL_(struct kld_file_stat32 *)]; struct kld_file_stat32 * stat; char stat_r_[PADR_(struct kld_file_stat32 *)]; }; struct freebsd32_aio_return_args { char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index ffeae23fc3a3..fdac5c495468 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1391,7 +1391,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 308: { struct freebsd32_kldstat_args *p = params; iarg[0] = p->fileid; /* int */ - uarg[1] = (intptr_t)p->stat; /* struct kld32_file_stat * */ + uarg[1] = (intptr_t)p->stat; /* struct kld_file_stat32 * */ *n_args = 2; break; } @@ -5630,7 +5630,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct kld32_file_stat *"; + p = "userland struct kld_file_stat32 *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index d9feba7aef0e..1a4bf7b30e7b 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -561,7 +561,7 @@ 306 AUE_NULL NOPROTO { int kldfind(const char *file); } 307 AUE_NULL NOPROTO { int kldnext(int fileid); } 308 AUE_NULL STD { int freebsd32_kldstat(int fileid, \ - struct kld32_file_stat *stat); } + struct kld_file_stat32 *stat); } 309 AUE_NULL NOPROTO { int kldfirstmod(int fileid); } 310 AUE_GETSID NOPROTO { int getsid(pid_t pid); } 311 AUE_SETRESUID NOPROTO { int setresuid(uid_t ruid, uid_t euid, \ From nobody Wed Nov 17 20:22:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 40CAF1854DED; Wed, 17 Nov 2021 20: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 4HvZ9H49znz4qpH; Wed, 17 Nov 2021 20:22:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A953277F8; Wed, 17 Nov 2021 20:22: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 1AHKMO3b059691; Wed, 17 Nov 2021 20:22:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMOCL059690; Wed, 17 Nov 2021 20:22:24 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:24 GMT Message-Id: <202111172022.1AHKMOCL059690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 3b0cd7e50346 - main - freebsd32: rename old SysV IPC types List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b0cd7e50346662540811f772c97d370af30c9c9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=3b0cd7e50346662540811f772c97d370af30c9c9 commit 3b0cd7e50346662540811f772c97d370af30c9c9 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:23 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:23 +0000 freebsd32: rename old SysV IPC types Move the 32 from ...32_old to ..._old32 to aid automatic generation. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_ipc.h | 18 +++++++++--------- sys/compat/freebsd32/freebsd32_proto.h | 4 ++-- sys/compat/freebsd32/syscalls.master | 4 ++-- sys/kern/sysv_ipc.c | 4 ++-- sys/kern/sysv_msg.c | 2 +- sys/kern/sysv_sem.c | 2 +- sys/kern/sysv_shm.c | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_ipc.h b/sys/compat/freebsd32/freebsd32_ipc.h index d1fa7f1cf8ca..6c34445e363b 100644 --- a/sys/compat/freebsd32/freebsd32_ipc.h +++ b/sys/compat/freebsd32/freebsd32_ipc.h @@ -130,7 +130,7 @@ struct shminfo32 { #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -struct ipc_perm32_old { +struct ipc_perm_old32 { uint16_t cuid; uint16_t cgid; uint16_t uid; @@ -140,8 +140,8 @@ struct ipc_perm32_old { uint32_t key; }; -struct semid_ds32_old { - struct ipc_perm32_old sem_perm; +struct semid_ds_old32 { + struct ipc_perm_old32 sem_perm; uint32_t __sem_base; unsigned short sem_nsems; int32_t sem_otime; @@ -151,8 +151,8 @@ struct semid_ds32_old { int32_t sem_pad3[4]; }; -struct msqid_ds32_old { - struct ipc_perm32_old msg_perm; +struct msqid_ds_old32 { + struct ipc_perm_old32 msg_perm; uint32_t __msg_first; uint32_t __msg_last; uint32_t msg_cbytes; @@ -169,8 +169,8 @@ struct msqid_ds32_old { int32_t msg_pad4[4]; }; -struct shmid_ds32_old { - struct ipc_perm32_old shm_perm; +struct shmid_ds_old32 { + struct ipc_perm_old32 shm_perm; int32_t shm_segsz; pid_t shm_lpid; pid_t shm_cpid; @@ -187,10 +187,10 @@ union semun_old32 { uint32_t array; }; -void freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, +void freebsd32_ipcperm_old_in(struct ipc_perm_old32 *ip32, struct ipc_perm *ip); void freebsd32_ipcperm_old_out(struct ipc_perm *ip, - struct ipc_perm32_old *ip32); + struct ipc_perm_old32 *ip32); #endif void freebsd32_ipcperm_in(struct ipc_perm32 *ip32, struct ipc_perm *ip); diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index a2682289407b..f261967fff76 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -1176,12 +1176,12 @@ struct freebsd7_freebsd32_semctl_args { struct freebsd7_freebsd32_msgctl_args { char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char buf_l_[PADL_(struct msqid_ds32_old *)]; struct msqid_ds32_old * buf; char buf_r_[PADR_(struct msqid_ds32_old *)]; + char buf_l_[PADL_(struct msqid_ds_old32 *)]; struct msqid_ds_old32 * buf; char buf_r_[PADR_(struct msqid_ds_old32 *)]; }; struct freebsd7_freebsd32_shmctl_args { char shmid_l_[PADL_(int)]; int shmid; char shmid_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char buf_l_[PADL_(struct shmid_ds32_old *)]; struct shmid_ds32_old * buf; char buf_r_[PADR_(struct shmid_ds32_old *)]; + char buf_l_[PADL_(struct shmid_ds_old32 *)]; struct shmid_ds_old32 * buf; char buf_r_[PADR_(struct shmid_ds_old32 *)]; }; #ifdef PAD64_REQUIRED #else diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 1a4bf7b30e7b..779af9704345 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -428,7 +428,7 @@ 223 AUE_NULL OBSOL semconfig 224 AUE_MSGCTL COMPAT7|NOSTD { int freebsd32_msgctl( \ int msqid, int cmd, \ - struct msqid_ds32_old *buf); } + struct msqid_ds_old32 *buf); } 225 AUE_MSGGET NOSTD|NOPROTO { int msgget(key_t key, int msgflg); } 226 AUE_MSGSND NOSTD { int freebsd32_msgsnd(int msqid, const void *msgp, \ size_t msgsz, int msgflg); } @@ -438,7 +438,7 @@ int shmflg); } 229 AUE_SHMCTL COMPAT7|NOSTD { int freebsd32_shmctl( \ int shmid, int cmd, \ - struct shmid_ds32_old *buf); } + struct shmid_ds_old32 *buf); } 230 AUE_SHMDT NOSTD|NOPROTO { int shmdt(const void *shmaddr); } 231 AUE_SHMGET NOSTD|NOPROTO { int shmget(key_t key, size_t size, \ int shmflg); } diff --git a/sys/kern/sysv_ipc.c b/sys/kern/sysv_ipc.c index 884ea9a7111f..4a7d79ad23b3 100644 --- a/sys/kern/sysv_ipc.c +++ b/sys/kern/sysv_ipc.c @@ -196,7 +196,7 @@ ipcperm_new2old(struct ipc_perm *new, struct ipc_perm_old *old) #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) void -freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, struct ipc_perm *ip) +freebsd32_ipcperm_old_in(struct ipc_perm_old32 *ip32, struct ipc_perm *ip) { CP(*ip32, *ip, cuid); @@ -209,7 +209,7 @@ freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, struct ipc_perm *ip) } void -freebsd32_ipcperm_old_out(struct ipc_perm *ip, struct ipc_perm32_old *ip32) +freebsd32_ipcperm_old_out(struct ipc_perm *ip, struct ipc_perm_old32 *ip32) { CP(*ip, *ip32, cuid); diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index 435235f0384d..917c89315401 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -1704,7 +1704,7 @@ freebsd7_freebsd32_msgctl(struct thread *td, struct freebsd7_freebsd32_msgctl_args *uap) { struct msqid_ds msqbuf; - struct msqid_ds32_old msqbuf32; + struct msqid_ds_old32 msqbuf32; int error; if (uap->cmd == IPC_SET) { diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index 274226481fa7..5c8b2b069d35 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1867,7 +1867,7 @@ int freebsd7_freebsd32_semctl(struct thread *td, struct freebsd7_freebsd32_semctl_args *uap) { - struct semid_ds32_old dsbuf32; + struct semid_ds_old32 dsbuf32; struct semid_ds dsbuf; union semun semun; union semun_old32 arg; diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 2e7ae927dcc3..7ba6c1187bc7 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1431,7 +1431,7 @@ freebsd7_freebsd32_shmctl(struct thread *td, struct shminfo shminfo; } u; union { - struct shmid_ds32_old shmid_ds32; + struct shmid_ds_old32 shmid_ds32; struct shm_info32 shm_info32; struct shminfo32 shminfo32; } u32; From nobody Wed Nov 17 20:22:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8A1AC1854E54; Wed, 17 Nov 2021 20:22: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 4HvZ9K54X0z4r9R; Wed, 17 Nov 2021 20:22:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33B7A2784A; Wed, 17 Nov 2021 20:22: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 1AHKMQap059715; Wed, 17 Nov 2021 20:22:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMQoH059714; Wed, 17 Nov 2021 20:22:26 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:26 GMT Message-Id: <202111172022.1AHKMQoH059714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: f1a14110892e - main - freebsd32: rename fstat argument to match default abi List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1a14110892eae6a431bb82da55409be82273bad Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f1a14110892eae6a431bb82da55409be82273bad commit f1a14110892eae6a431bb82da55409be82273bad Author: Brooks Davis AuthorDate: 2021-11-17 20:12:24 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:24 +0000 freebsd32: rename fstat argument to match default abi Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 2 +- sys/compat/freebsd32/freebsd32_proto.h | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 2 +- sys/compat/freebsd32/syscalls.master | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index da7fd1939324..902543144dd4 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2231,7 +2231,7 @@ freebsd32_fstat(struct thread *td, struct freebsd32_fstat_args *uap) if (error) return (error); copy_stat(&ub, &ub32); - error = copyout(&ub32, uap->ub, sizeof(ub32)); + error = copyout(&ub32, uap->sb, sizeof(ub32)); return (error); } diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index f261967fff76..42be42ebc113 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -681,7 +681,7 @@ struct freebsd32_utimensat_args { }; struct freebsd32_fstat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)]; + char sb_l_[PADL_(struct stat32 *)]; struct stat32 * sb; char sb_r_[PADR_(struct stat32 *)]; }; struct freebsd32_fstatat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index fdac5c495468..26829259cd0e 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -3127,7 +3127,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 551: { struct freebsd32_fstat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->ub; /* struct stat32 * */ + uarg[1] = (intptr_t)p->sb; /* struct stat32 * */ *n_args = 2; break; } diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 779af9704345..23c34350a67d 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -1101,7 +1101,7 @@ 549 AUE_NULL OBSOL numa_setaffinity 550 AUE_FSYNC NOPROTO { int fdatasync(int fd); } 551 AUE_FSTAT STD { int freebsd32_fstat(int fd, \ - struct stat32 *ub); } + struct stat32 *sb); } 552 AUE_FSTATAT STD { int freebsd32_fstatat(int fd, \ const char *path, struct stat32 *buf, \ int flag); } From nobody Wed Nov 17 20:22:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0F31318550B1; Wed, 17 Nov 2021 20:22: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 4HvZ9M0r00z4r2t; Wed, 17 Nov 2021 20:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C02B27A85; Wed, 17 Nov 2021 20:22: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 1AHKMRcl059739; Wed, 17 Nov 2021 20:22:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMRTa059738; Wed, 17 Nov 2021 20:22:27 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:27 GMT Message-Id: <202111172022.1AHKMRTa059738@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: d35a771660ad - main - freebsd32: sync _umtx_op args with default ABI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d35a771660adc8dd9966168d9032cda65f24052a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d35a771660adc8dd9966168d9032cda65f24052a commit d35a771660adc8dd9966168d9032cda65f24052a Author: Brooks Davis AuthorDate: 2021-11-17 20:12:24 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:24 +0000 freebsd32: sync _umtx_op args with default ABI Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 2 +- sys/compat/freebsd32/syscalls.master | 2 +- sys/kern/kern_umtx.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 42be42ebc113..a66253b589ca 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -363,7 +363,7 @@ struct freebsd32__umtx_op_args { char obj_l_[PADL_(void *)]; void * obj; char obj_r_[PADR_(void *)]; char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; char val_l_[PADL_(u_long)]; u_long val; char val_r_[PADR_(u_long)]; - char uaddr_l_[PADL_(void *)]; void * uaddr; char uaddr_r_[PADR_(void *)]; + char uaddr1_l_[PADL_(void *)]; void * uaddr1; char uaddr1_r_[PADR_(void *)]; char uaddr2_l_[PADL_(void *)]; void * uaddr2; char uaddr2_r_[PADR_(void *)]; }; struct freebsd32_thr_new_args { diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 26829259cd0e..abeaaeb23534 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2188,7 +2188,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[0] = (intptr_t)p->obj; /* void * */ iarg[1] = p->op; /* int */ uarg[2] = p->val; /* u_long */ - uarg[3] = (intptr_t)p->uaddr; /* void * */ + uarg[3] = (intptr_t)p->uaddr1; /* void * */ uarg[4] = (intptr_t)p->uaddr2; /* void * */ *n_args = 5; break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 23c34350a67d..22e7a376d2be 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -826,7 +826,7 @@ u_int length); } 453 AUE_AUDITCTL NOPROTO { int auditctl(const char *path); } 454 AUE_NULL STD { int freebsd32__umtx_op(void *obj, int op,\ - u_long val, void *uaddr, \ + u_long val, void *uaddr1, \ void *uaddr2); } 455 AUE_THR_NEW STD { int freebsd32_thr_new( \ struct thr_param32 *param, \ diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index c738cf178866..5e3ab095facc 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -4874,7 +4874,7 @@ int freebsd32__umtx_op(struct thread *td, struct freebsd32__umtx_op_args *uap) { - return (kern__umtx_op(td, uap->obj, uap->op, uap->val, uap->uaddr, + return (kern__umtx_op(td, uap->obj, uap->op, uap->val, uap->uaddr1, uap->uaddr2, &umtx_native_ops32)); } #endif /* COMPAT_FREEBSD32 */ From nobody Wed Nov 17 20:22:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C2B4C1854F61; Wed, 17 Nov 2021 20:22: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 4HvZ9N4ZFBz4r0m; Wed, 17 Nov 2021 20:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82C1B2784B; Wed, 17 Nov 2021 20: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 1AHKMSYr059763; Wed, 17 Nov 2021 20: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 1AHKMS1u059762; Wed, 17 Nov 2021 20:22:28 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:28 GMT Message-Id: <202111172022.1AHKMS1u059762@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 0ebea13928f3 - main - freebsd32: include `__` in semctl names List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ebea13928f3170fe95eb5715522aaf43b45fc47 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0ebea13928f3170fe95eb5715522aaf43b45fc47 commit 0ebea13928f3170fe95eb5715522aaf43b45fc47 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:24 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:24 +0000 freebsd32: include `__` in semctl names This mirrors sys/kern/syscall.master and will simplify generation of freebsd32 files. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 12 ++++++------ sys/compat/freebsd32/freebsd32_syscall.h | 4 ++-- sys/compat/freebsd32/freebsd32_syscalls.c | 4 ++-- sys/compat/freebsd32/freebsd32_sysent.c | 4 ++-- sys/compat/freebsd32/freebsd32_systrace_args.c | 8 ++++---- sys/compat/freebsd32/syscalls.master | 4 ++-- sys/kern/sysv_sem.c | 14 +++++++------- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index a66253b589ca..1d538f9dcac8 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -554,7 +554,7 @@ struct freebsd32_jail_set_args { char iovcnt_l_[PADL_(unsigned int)]; unsigned int iovcnt; char iovcnt_r_[PADR_(unsigned int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; -struct freebsd32_semctl_args { +struct freebsd32___semctl_args { char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; @@ -862,7 +862,7 @@ int freebsd32_fexecve(struct thread *, struct freebsd32_fexecve_args *); int freebsd32_futimesat(struct thread *, struct freebsd32_futimesat_args *); int freebsd32_jail_get(struct thread *, struct freebsd32_jail_get_args *); int freebsd32_jail_set(struct thread *, struct freebsd32_jail_set_args *); -int freebsd32_semctl(struct thread *, struct freebsd32_semctl_args *); +int freebsd32___semctl(struct thread *, struct freebsd32___semctl_args *); int freebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *); int freebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *); int freebsd32_pselect(struct thread *, struct freebsd32_pselect_args *); @@ -1167,7 +1167,7 @@ int freebsd6_freebsd32_lio_listio(struct thread *, struct freebsd6_freebsd32_lio #if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif -struct freebsd7_freebsd32_semctl_args { +struct freebsd7_freebsd32___semctl_args { char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; @@ -1198,7 +1198,7 @@ struct freebsd7_freebsd32_shmctl_args { #ifdef PAD64_REQUIRED #else #endif -int freebsd7_freebsd32_semctl(struct thread *, struct freebsd7_freebsd32_semctl_args *); +int freebsd7_freebsd32___semctl(struct thread *, struct freebsd7_freebsd32___semctl_args *); int freebsd7_freebsd32_msgctl(struct thread *, struct freebsd7_freebsd32_msgctl_args *); int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_args *); @@ -1391,7 +1391,7 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd6_freebsd32_ftruncate AUE_FTRUNCATE #define FREEBSD32_SYS_AUE_freebsd32___sysctl AUE_SYSCTL #define FREEBSD32_SYS_AUE_freebsd32_futimes AUE_FUTIMES -#define FREEBSD32_SYS_AUE_freebsd7_freebsd32_semctl AUE_SEMCTL +#define FREEBSD32_SYS_AUE_freebsd7_freebsd32___semctl AUE_SEMCTL #define FREEBSD32_SYS_AUE_freebsd7_freebsd32_msgctl AUE_MSGCTL #define FREEBSD32_SYS_AUE_freebsd32_msgsnd AUE_MSGSND #define FREEBSD32_SYS_AUE_freebsd32_msgrcv AUE_MSGRCV @@ -1475,7 +1475,7 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_futimesat AUE_FUTIMESAT #define FREEBSD32_SYS_AUE_freebsd32_jail_get AUE_JAIL_GET #define FREEBSD32_SYS_AUE_freebsd32_jail_set AUE_JAIL_SET -#define FREEBSD32_SYS_AUE_freebsd32_semctl AUE_SEMCTL +#define FREEBSD32_SYS_AUE_freebsd32___semctl AUE_SEMCTL #define FREEBSD32_SYS_AUE_freebsd32_msgctl AUE_MSGCTL #define FREEBSD32_SYS_AUE_freebsd32_shmctl AUE_SHMCTL #define FREEBSD32_SYS_AUE_freebsd32_pselect AUE_SELECT diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 321a72fb744a..83c5d1f9d3a4 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -195,7 +195,7 @@ #define FREEBSD32_SYS_freebsd32_futimes 206 #define FREEBSD32_SYS_getpgid 207 #define FREEBSD32_SYS_poll 209 -#define FREEBSD32_SYS_freebsd7_freebsd32_semctl 220 +#define FREEBSD32_SYS_freebsd7_freebsd32___semctl 220 #define FREEBSD32_SYS_semget 221 #define FREEBSD32_SYS_semop 222 /* 223 is obsolete semconfig */ @@ -435,7 +435,7 @@ #define FREEBSD32_SYS_freebsd32_jail_set 507 #define FREEBSD32_SYS_jail_remove 508 #define FREEBSD32_SYS_freebsd12_closefrom 509 -#define FREEBSD32_SYS_freebsd32_semctl 510 +#define FREEBSD32_SYS_freebsd32___semctl 510 #define FREEBSD32_SYS_freebsd32_msgctl 511 #define FREEBSD32_SYS_freebsd32_shmctl 512 #define FREEBSD32_SYS_lpathconf 513 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index e7da47e3d7fe..9d9600b2b2e9 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -229,7 +229,7 @@ const char *freebsd32_syscallnames[] = { "lkmnosys", /* 217 = lkmnosys */ "lkmnosys", /* 218 = lkmnosys */ "lkmnosys", /* 219 = lkmnosys */ - "compat7.freebsd32_semctl", /* 220 = freebsd7 freebsd32_semctl */ + "compat7.freebsd32___semctl", /* 220 = freebsd7 freebsd32___semctl */ "semget", /* 221 = semget */ "semop", /* 222 = semop */ "obs_semconfig", /* 223 = obsolete semconfig */ @@ -532,7 +532,7 @@ const char *freebsd32_syscallnames[] = { "freebsd32_jail_set", /* 507 = freebsd32_jail_set */ "jail_remove", /* 508 = jail_remove */ "compat12.closefrom", /* 509 = freebsd12 closefrom */ - "freebsd32_semctl", /* 510 = freebsd32_semctl */ + "freebsd32___semctl", /* 510 = freebsd32___semctl */ "freebsd32_msgctl", /* 511 = freebsd32_msgctl */ "freebsd32_shmctl", /* 512 = freebsd32_shmctl */ "lpathconf", /* 513 = lpathconf */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index ebf1c02e3a8a..26bd67a88d74 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -282,7 +282,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(nosys_args), .sy_call = (sy_call_t *)lkmnosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 217 = lkmnosys */ { .sy_narg = AS(nosys_args), .sy_call = (sy_call_t *)lkmnosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 218 = lkmnosys */ { .sy_narg = AS(nosys_args), .sy_call = (sy_call_t *)lkmnosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 219 = lkmnosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 220 = freebsd7 freebsd32_semctl */ + { .sy_narg = 0, .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 220 = freebsd7 freebsd32___semctl */ { .sy_narg = AS(semget_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 221 = semget */ { .sy_narg = AS(semop_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 222 = semop */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 223 = obsolete semconfig */ @@ -585,7 +585,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_jail_set_args), .sy_call = (sy_call_t *)freebsd32_jail_set, .sy_auevent = AUE_JAIL_SET, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 507 = freebsd32_jail_set */ { .sy_narg = AS(jail_remove_args), .sy_call = (sy_call_t *)sys_jail_remove, .sy_auevent = AUE_JAIL_REMOVE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 508 = jail_remove */ { compat12(AS(freebsd12_closefrom_args),closefrom), .sy_auevent = AUE_CLOSEFROM, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 509 = freebsd12 closefrom */ - { .sy_narg = AS(freebsd32_semctl_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 510 = freebsd32_semctl */ + { .sy_narg = AS(freebsd32___semctl_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 510 = freebsd32___semctl */ { .sy_narg = AS(freebsd32_msgctl_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 511 = freebsd32_msgctl */ { .sy_narg = AS(freebsd32_shmctl_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 512 = freebsd32_shmctl */ { .sy_narg = AS(lpathconf_args), .sy_call = (sy_call_t *)sys_lpathconf, .sy_auevent = AUE_LPATHCONF, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 513 = lpathconf */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index abeaaeb23534..3a5bd3b9a9a8 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2729,9 +2729,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 1; break; } - /* freebsd32_semctl */ + /* freebsd32___semctl */ case 510: { - struct freebsd32_semctl_args *p = params; + struct freebsd32___semctl_args *p = params; iarg[0] = p->semid; /* int */ iarg[1] = p->semnum; /* int */ iarg[2] = p->cmd; /* int */ @@ -7961,7 +7961,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* freebsd32_semctl */ + /* freebsd32___semctl */ case 510: switch (ndx) { case 0: @@ -10804,7 +10804,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* freebsd32_semctl */ + /* freebsd32___semctl */ case 510: if (ndx == 0 || ndx == 1) p = "int"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 22e7a376d2be..c72fb54df0a1 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -418,7 +418,7 @@ 218 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int 219 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int -220 AUE_SEMCTL COMPAT7|NOSTD { int freebsd32_semctl( \ +220 AUE_SEMCTL COMPAT7|NOSTD { int freebsd32___semctl( \ int semid, int semnum, \ int cmd, union semun_old32 *arg); } 221 AUE_SEMGET NOSTD|NOPROTO { int semget(key_t key, int nsems, \ @@ -984,7 +984,7 @@ unsigned int iovcnt, int flags); } 508 AUE_JAIL_REMOVE NOPROTO { int jail_remove(int jid); } 509 AUE_CLOSEFROM COMPAT12|NOPROTO { int closefrom(int lowfd); } -510 AUE_SEMCTL NOSTD { int freebsd32_semctl(int semid, int semnum, \ +510 AUE_SEMCTL NOSTD { int freebsd32___semctl(int semid, int semnum, \ int cmd, union semun32 *arg); } 511 AUE_MSGCTL NOSTD { int freebsd32_msgctl(int msqid, int cmd, \ struct msqid_ds32 *buf); } diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index 5c8b2b069d35..b55ef00c9c70 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -254,13 +254,13 @@ static struct syscall_helper_data sem_syscalls[] = { #include static struct syscall_helper_data sem32_syscalls[] = { - SYSCALL32_INIT_HELPER(freebsd32_semctl), + SYSCALL32_INIT_HELPER(freebsd32___semctl), SYSCALL32_INIT_HELPER_COMPAT(semget), SYSCALL32_INIT_HELPER_COMPAT(semop), SYSCALL32_INIT_HELPER(freebsd32_semsys), #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) - SYSCALL32_INIT_HELPER(freebsd7_freebsd32_semctl), + SYSCALL32_INIT_HELPER(freebsd7_freebsd32___semctl), #endif SYSCALL_INIT_LAST }; @@ -1851,8 +1851,8 @@ freebsd32_semsys(struct thread *td, struct freebsd32_semsys_args *uap) AUDIT_ARG_SVIPC_WHICH(uap->which); switch (uap->which) { case 0: - return (freebsd7_freebsd32_semctl(td, - (struct freebsd7_freebsd32_semctl_args *)&uap->a2)); + return (freebsd7_freebsd32___semctl(td, + (struct freebsd7_freebsd32___semctl_args *)&uap->a2)); default: return (sys_semsys(td, (struct semsys_args *)uap)); } @@ -1864,8 +1864,8 @@ freebsd32_semsys(struct thread *td, struct freebsd32_semsys_args *uap) #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) int -freebsd7_freebsd32_semctl(struct thread *td, - struct freebsd7_freebsd32_semctl_args *uap) +freebsd7_freebsd32___semctl(struct thread *td, + struct freebsd7_freebsd32___semctl_args *uap) { struct semid_ds_old32 dsbuf32; struct semid_ds dsbuf; @@ -1937,7 +1937,7 @@ freebsd7_freebsd32_semctl(struct thread *td, #endif int -freebsd32_semctl(struct thread *td, struct freebsd32_semctl_args *uap) +freebsd32___semctl(struct thread *td, struct freebsd32___semctl_args *uap) { struct semid_ds32 dsbuf32; struct semid_ds dsbuf; From nobody Wed Nov 17 20:22:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CF74D1855188; Wed, 17 Nov 2021 20:22: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 4HvZ9P1CXZz4r37; Wed, 17 Nov 2021 20:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 955042784D; Wed, 17 Nov 2021 20:22: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 1AHKMT81059787; Wed, 17 Nov 2021 20:22:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMTBp059786; Wed, 17 Nov 2021 20:22:29 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:29 GMT Message-Id: <202111172022.1AHKMTBp059786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: b35c2bca9fc9 - main - freebsd32: rename struct wrusage32 to struct __wrusage32 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b35c2bca9fc9d2ecdde53435045eb453bf7ecbbc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b35c2bca9fc9d2ecdde53435045eb453bf7ecbbc commit b35c2bca9fc9d2ecdde53435045eb453bf7ecbbc Author: Brooks Davis AuthorDate: 2021-11-17 20:12:24 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:24 +0000 freebsd32: rename struct wrusage32 to struct __wrusage32 This matches struct __wrusage Reviewed by: kevans --- sys/compat/freebsd32/freebsd32.h | 2 +- sys/compat/freebsd32/freebsd32_misc.c | 2 +- sys/compat/freebsd32/freebsd32_proto.h | 4 ++-- sys/compat/freebsd32/freebsd32_systrace_args.c | 8 ++++---- sys/compat/freebsd32/syscalls.master | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index b2f99949f920..6f219d0f733f 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -84,7 +84,7 @@ struct rusage32 { int32_t ru_nivcsw; }; -struct wrusage32 { +struct __wrusage32 { struct rusage32 wru_self; struct rusage32 wru_children; }; diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 902543144dd4..d9298890aaf1 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -225,7 +225,7 @@ freebsd32_wait4(struct thread *td, struct freebsd32_wait4_args *uap) int freebsd32_wait6(struct thread *td, struct freebsd32_wait6_args *uap) { - struct wrusage32 wru32; + struct __wrusage32 wru32; struct __wrusage wru, *wrup; struct siginfo32 si32; struct __siginfo si, *sip; diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 1d538f9dcac8..d5b5bf28e739 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -603,7 +603,7 @@ struct freebsd32_wait6_args { char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; - char wrusage_l_[PADL_(struct wrusage32 *)]; struct wrusage32 * wrusage; char wrusage_r_[PADR_(struct wrusage32 *)]; + char wrusage_l_[PADL_(struct __wrusage32 *)]; struct __wrusage32 * wrusage; char wrusage_r_[PADR_(struct __wrusage32 *)]; char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; }; #else @@ -628,7 +628,7 @@ struct freebsd32_wait6_args { char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; - char wrusage_l_[PADL_(struct wrusage32 *)]; struct wrusage32 * wrusage; char wrusage_r_[PADR_(struct wrusage32 *)]; + char wrusage_l_[PADL_(struct __wrusage32 *)]; struct __wrusage32 * wrusage; char wrusage_r_[PADR_(struct __wrusage32 *)]; char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; }; #endif diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 3a5bd3b9a9a8..7544c55bd499 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2922,7 +2922,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[3] = p->id2; /* uint32_t */ uarg[4] = (intptr_t)p->status; /* int * */ iarg[5] = p->options; /* int */ - uarg[6] = (intptr_t)p->wrusage; /* struct wrusage32 * */ + uarg[6] = (intptr_t)p->wrusage; /* struct __wrusage32 * */ uarg[7] = (intptr_t)p->info; /* struct siginfo32 * */ *n_args = 8; break; @@ -2959,7 +2959,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[2] = p->id2; /* uint32_t */ uarg[3] = (intptr_t)p->status; /* int * */ iarg[4] = p->options; /* int */ - uarg[5] = (intptr_t)p->wrusage; /* struct wrusage32 * */ + uarg[5] = (intptr_t)p->wrusage; /* struct __wrusage32 * */ uarg[6] = (intptr_t)p->info; /* struct siginfo32 * */ *n_args = 7; break; @@ -8312,7 +8312,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 6: - p = "userland struct wrusage32 *"; + p = "userland struct __wrusage32 *"; break; case 7: p = "userland struct siginfo32 *"; @@ -8388,7 +8388,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 5: - p = "userland struct wrusage32 *"; + p = "userland struct __wrusage32 *"; break; case 6: p = "userland struct siginfo32 *"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index c72fb54df0a1..59da4d40eae4 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -1035,7 +1035,7 @@ 532 AUE_WAIT6 STD { int freebsd32_wait6(idtype_t idtype, int pad, \ uint32_t id1, uint32_t id2, \ int *status, int options, \ - struct wrusage32 *wrusage, \ + struct __wrusage32 *wrusage, \ struct siginfo32 *info); } #else 530 AUE_POSIX_FALLOCATE STD { int freebsd32_posix_fallocate(int fd,\ @@ -1048,7 +1048,7 @@ 532 AUE_WAIT6 STD { int freebsd32_wait6(idtype_t idtype, \ uint32_t id1, uint32_t id2, \ int *status, int options, \ - struct wrusage32 *wrusage, \ + struct __wrusage32 *wrusage, \ struct siginfo32 *info); } #endif 533 AUE_CAP_RIGHTS_LIMIT NOPROTO { \ From nobody Wed Nov 17 20:22:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 62BCD18550C8; Wed, 17 Nov 2021 20:22: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 4HvZ9P4SRbz4r0s; Wed, 17 Nov 2021 20:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB96927A86; Wed, 17 Nov 2021 20:22: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 1AHKMUMV059817; Wed, 17 Nov 2021 20:22:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMUau059816; Wed, 17 Nov 2021 20:22:30 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:30 GMT Message-Id: <202111172022.1AHKMUau059816@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: ab3ccb758329 - main - freebsd32: rename fstat() stat buffer 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab3ccb758329e439a888884da7a6c4d065963936 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ab3ccb758329e439a888884da7a6c4d065963936 commit ab3ccb758329e439a888884da7a6c4d065963936 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:24 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:24 +0000 freebsd32: rename fstat() stat buffer argument Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 4 ++-- sys/compat/freebsd32/freebsd32_proto.h | 4 ++-- sys/compat/freebsd32/syscalls.master | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index d9298890aaf1..aed78f93c334 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2247,7 +2247,7 @@ ofreebsd32_fstat(struct thread *td, struct ofreebsd32_fstat_args *uap) if (error) return (error); copy_ostat(&ub, &ub32); - error = copyout(&ub32, uap->ub, sizeof(ub32)); + error = copyout(&ub32, uap->sb, sizeof(ub32)); return (error); } #endif @@ -2406,7 +2406,7 @@ freebsd11_freebsd32_fstat(struct thread *td, return (error); error = freebsd11_cvtstat32(&sb, &sb32); if (error == 0) - error = copyout(&sb32, uap->ub, sizeof (sb32)); + error = copyout(&sb32, uap->sb, sizeof (sb32)); return (error); } diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index d5b5bf28e739..ea3a9cae46e2 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -931,7 +931,7 @@ struct ofreebsd32_sigprocmask_args { }; struct ofreebsd32_fstat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char ub_l_[PADL_(struct ostat32 *)]; struct ostat32 * ub; char ub_r_[PADR_(struct ostat32 *)]; + char sb_l_[PADL_(struct ostat32 *)]; struct ostat32 * sb; char sb_r_[PADR_(struct ostat32 *)]; }; struct ofreebsd32_getpagesize_args { char dummy_l_[PADL_(int32_t)]; int32_t dummy; char dummy_r_[PADR_(int32_t)]; @@ -1249,7 +1249,7 @@ struct freebsd11_freebsd32_stat_args { }; struct freebsd11_freebsd32_fstat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char ub_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * ub; char ub_r_[PADR_(struct freebsd11_stat32 *)]; + char sb_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * sb; char sb_r_[PADR_(struct freebsd11_stat32 *)]; }; struct freebsd11_freebsd32_lstat_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 59da4d40eae4..46438927043b 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -165,7 +165,7 @@ 60 AUE_UMASK NOPROTO { int umask(mode_t newmask); } 61 AUE_CHROOT NOPROTO { int chroot(const char *path); } 62 AUE_FSTAT COMPAT { int freebsd32_fstat(int fd, \ - struct ostat32 *ub); } + struct ostat32 *sb); } 63 AUE_NULL OBSOL ogetkerninfo 64 AUE_NULL COMPAT { int freebsd32_getpagesize( \ int32_t dummy); } @@ -361,7 +361,7 @@ 188 AUE_STAT COMPAT11 { int freebsd32_stat(const char *path, \ struct freebsd11_stat32 *ub); } 189 AUE_FSTAT COMPAT11 { int freebsd32_fstat(int fd, \ - struct freebsd11_stat32 *ub); } + struct freebsd11_stat32 *sb); } 190 AUE_LSTAT COMPAT11 { int freebsd32_lstat(const char *path, \ struct freebsd11_stat32 *ub); } 191 AUE_PATHCONF NOPROTO { int pathconf(const char *path, int name); } From nobody Wed Nov 17 20:22:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 46CB41855066; Wed, 17 Nov 2021 20:22: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 4HvZ9R36YXz4qv7; Wed, 17 Nov 2021 20:22:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDF5727373; Wed, 17 Nov 2021 20:22: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 1AHKMVC4059841; Wed, 17 Nov 2021 20:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMVYW059840; Wed, 17 Nov 2021 20:22:31 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:31 GMT Message-Id: <202111172022.1AHKMVYW059840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 5b5a48c787b8 - main - freebsd32: simplify memrange translation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b5a48c787b8a4655e9782bd8ac392a79aeae1a6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5b5a48c787b8a4655e9782bd8ac392a79aeae1a6 commit 5b5a48c787b8a4655e9782bd8ac392a79aeae1a6 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:24 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:24 +0000 freebsd32: simplify memrange translation Assume we've been passed a valid argument and use _IOC_NEWTYPE to translate the command as we do elsewhere. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_ioctl.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_ioctl.c b/sys/compat/freebsd32/freebsd32_ioctl.c index 4818a410586a..957c546d4daf 100644 --- a/sys/compat/freebsd32/freebsd32_ioctl.c +++ b/sys/compat/freebsd32/freebsd32_ioctl.c @@ -74,19 +74,7 @@ freebsd32_ioctl_memrange(struct thread *td, CP(mro32, mro, mo_arg[0]); CP(mro32, mro, mo_arg[1]); - com = 0; - switch (uap->com) { - case MEMRANGE_GET32: - com = MEMRANGE_GET; - break; - - case MEMRANGE_SET32: - com = MEMRANGE_SET; - break; - - default: - panic("%s: unknown MEMRANGE %#lx", __func__, uap->com); - } + com = _IOC_NEWTYPE(uap->com, struct mem_range_op); if ((error = fo_ioctl(fp, com, (caddr_t)&mro, td->td_ucred, td)) != 0) return (error); From nobody Wed Nov 17 20:22:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3D81F1855147; Wed, 17 Nov 2021 20:22: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 4HvZ9R4ntjz4qv8; Wed, 17 Nov 2021 20:22:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02F7A276C8; Wed, 17 Nov 2021 20:22: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 1AHKMWF4059865; Wed, 17 Nov 2021 20:22:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMWPP059864; Wed, 17 Nov 2021 20:22:32 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:32 GMT Message-Id: <202111172022.1AHKMWPP059864@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: ad5826670451 - main - freebsd32: remove redundant no-arg syscalls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad58266704513b89140501ade9e48793a67cc1f1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ad58266704513b89140501ade9e48793a67cc1f1 commit ad58266704513b89140501ade9e48793a67cc1f1 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:24 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:24 +0000 freebsd32: remove redundant no-arg syscalls pipe requires no special handling. ofreebsd32_sigpending did differ from osigpending in that it acted on the siglist rather than the sigqueue, but this appears to be an oversight in 3fbdb3c21524d9d95278ada1d61b4d1e6bee654b. ogetpagesize could theoretically have ABI-dependent results, but in practice does not. If it does it would be easy handle in the central implementation and be the least of the problems in changing the value of PAGE_SIZE. Reviewed by: kevans --- sys/amd64/ia32/ia32_misc.c | 11 ----------- sys/arm64/arm64/freebsd32_machdep.c | 14 -------------- sys/compat/freebsd32/freebsd32_misc.c | 23 ----------------------- sys/compat/freebsd32/freebsd32_proto.h | 15 --------------- sys/compat/freebsd32/freebsd32_syscall.h | 6 +++--- sys/compat/freebsd32/freebsd32_syscalls.c | 6 +++--- sys/compat/freebsd32/freebsd32_sysent.c | 6 +++--- sys/compat/freebsd32/syscalls.master | 7 +++---- 8 files changed, 12 insertions(+), 76 deletions(-) diff --git a/sys/amd64/ia32/ia32_misc.c b/sys/amd64/ia32/ia32_misc.c index 6307ede32047..153b54b51a76 100644 --- a/sys/amd64/ia32/ia32_misc.c +++ b/sys/amd64/ia32/ia32_misc.c @@ -69,14 +69,3 @@ freebsd32_sysarch(struct thread *td, struct freebsd32_sysarch_args *uap) return (sysarch(td, &uap1)); } } - -#ifdef COMPAT_43 -int -ofreebsd32_getpagesize(struct thread *td, - struct ofreebsd32_getpagesize_args *uap) -{ - - td->td_retval[0] = IA32_PAGE_SIZE; - return (0); -} -#endif diff --git a/sys/arm64/arm64/freebsd32_machdep.c b/sys/arm64/arm64/freebsd32_machdep.c index b1e070feb4f6..cab778747113 100644 --- a/sys/arm64/arm64/freebsd32_machdep.c +++ b/sys/arm64/arm64/freebsd32_machdep.c @@ -411,20 +411,6 @@ freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) } #ifdef COMPAT_43 -/* - * COMPAT_FREEBSD32 assumes we have this system call when COMPAT_43 is defined. - * FreeBSD/arm provies a similar getpagesize() syscall. - */ -#define ARM32_PAGE_SIZE 4096 -int -ofreebsd32_getpagesize(struct thread *td, - struct ofreebsd32_getpagesize_args *uap) -{ - - td->td_retval[0] = ARM32_PAGE_SIZE; - return (0); -} - /* * Mirror the osigreturn definition in kern_sig.c for !i386 platforms. This * mirrors what's connected to the FreeBSD/arm syscall. diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index aed78f93c334..a0a7f1936fc9 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -320,14 +320,6 @@ freebsd4_freebsd32_getfsstat(struct thread *td, } #endif -#ifdef COMPAT_FREEBSD10 -int -freebsd10_freebsd32_pipe(struct thread *td, - struct freebsd10_freebsd32_pipe_args *uap) { - return (freebsd10_pipe(td, (struct freebsd10_pipe_args*)uap)); -} -#endif - int freebsd32_sigaltstack(struct thread *td, struct freebsd32_sigaltstack_args *uap) @@ -2740,21 +2732,6 @@ ofreebsd32_sigprocmask(struct thread *td, return (error); } -int -ofreebsd32_sigpending(struct thread *td, - struct ofreebsd32_sigpending_args *uap) -{ - struct proc *p = td->td_proc; - sigset_t siglist; - - PROC_LOCK(p); - siglist = p->p_siglist; - SIGSETOR(siglist, td->td_siglist); - PROC_UNLOCK(p); - SIG2OSIG(siglist, td->td_retval[0]); - return (0); -} - struct sigvec32 { u_int32_t sv_handler; int sv_mask; diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index ea3a9cae46e2..02a199acf1df 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -67,12 +67,6 @@ struct freebsd32_recvfrom_args { char from_l_[PADL_(struct sockaddr *)]; struct sockaddr * from; char from_r_[PADR_(struct sockaddr *)]; char fromlenaddr_l_[PADL_(uint32_t)]; uint32_t fromlenaddr; char fromlenaddr_r_[PADR_(uint32_t)]; }; -struct freebsd10_freebsd32_pipe_args { - register_t dummy; -}; -struct ofreebsd32_sigpending_args { - register_t dummy; -}; struct freebsd32_sigaltstack_args { char ss_l_[PADL_(const struct sigaltstack32 *)]; const struct sigaltstack32 * ss; char ss_r_[PADR_(const struct sigaltstack32 *)]; char oss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * oss; char oss_r_[PADR_(struct sigaltstack32 *)]; @@ -933,9 +927,6 @@ struct ofreebsd32_fstat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char sb_l_[PADL_(struct ostat32 *)]; struct ostat32 * sb; char sb_r_[PADR_(struct ostat32 *)]; }; -struct ofreebsd32_getpagesize_args { - char dummy_l_[PADL_(int32_t)]; int32_t dummy; char dummy_r_[PADR_(int32_t)]; -}; struct ofreebsd32_mmap_args { char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; @@ -991,9 +982,7 @@ int ofreebsd32_stat(struct thread *, struct ofreebsd32_stat_args *); int ofreebsd32_lstat(struct thread *, struct ofreebsd32_lstat_args *); int ofreebsd32_sigaction(struct thread *, struct ofreebsd32_sigaction_args *); int ofreebsd32_sigprocmask(struct thread *, struct ofreebsd32_sigprocmask_args *); -int ofreebsd32_sigpending(struct thread *, struct ofreebsd32_sigpending_args *); int ofreebsd32_fstat(struct thread *, struct ofreebsd32_fstat_args *); -int ofreebsd32_getpagesize(struct thread *, struct ofreebsd32_getpagesize_args *); int ofreebsd32_mmap(struct thread *, struct ofreebsd32_mmap_args *); int ofreebsd32_sigreturn(struct thread *, struct ofreebsd32_sigreturn_args *); int ofreebsd32_sigvec(struct thread *, struct ofreebsd32_sigvec_args *); @@ -1231,7 +1220,6 @@ struct freebsd10_freebsd32_umtx_unlock_args { #ifdef PAD64_REQUIRED #else #endif -int freebsd10_freebsd32_pipe(struct thread *, struct freebsd10_freebsd32_pipe_args *); int freebsd10_freebsd32_umtx_lock(struct thread *, struct freebsd10_freebsd32_umtx_lock_args *); int freebsd10_freebsd32_umtx_unlock(struct thread *, struct freebsd10_freebsd32_umtx_unlock_args *); @@ -1343,15 +1331,12 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_recvfrom AUE_RECVFROM #define FREEBSD32_SYS_AUE_ofreebsd32_stat AUE_STAT #define FREEBSD32_SYS_AUE_ofreebsd32_lstat AUE_LSTAT -#define FREEBSD32_SYS_AUE_freebsd10_freebsd32_pipe AUE_PIPE #define FREEBSD32_SYS_AUE_ofreebsd32_sigaction AUE_SIGACTION #define FREEBSD32_SYS_AUE_ofreebsd32_sigprocmask AUE_SIGPROCMASK -#define FREEBSD32_SYS_AUE_ofreebsd32_sigpending AUE_SIGPENDING #define FREEBSD32_SYS_AUE_freebsd32_sigaltstack AUE_SIGALTSTACK #define FREEBSD32_SYS_AUE_freebsd32_ioctl AUE_IOCTL #define FREEBSD32_SYS_AUE_freebsd32_execve AUE_EXECVE #define FREEBSD32_SYS_AUE_ofreebsd32_fstat AUE_FSTAT -#define FREEBSD32_SYS_AUE_ofreebsd32_getpagesize AUE_NULL #define FREEBSD32_SYS_AUE_ofreebsd32_mmap AUE_MMAP #define FREEBSD32_SYS_AUE_freebsd32_mprotect AUE_MPROTECT #define FREEBSD32_SYS_AUE_freebsd32_setitimer AUE_SETITIMER diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 83c5d1f9d3a4..a52565f6803d 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -47,7 +47,7 @@ #define FREEBSD32_SYS_getppid 39 /* 40 is old freebsd32_lstat */ #define FREEBSD32_SYS_dup 41 -#define FREEBSD32_SYS_freebsd10_freebsd32_pipe 42 +#define FREEBSD32_SYS_freebsd10_pipe 42 #define FREEBSD32_SYS_getegid 43 #define FREEBSD32_SYS_profil 44 #define FREEBSD32_SYS_ktrace 45 @@ -57,7 +57,7 @@ #define FREEBSD32_SYS_getlogin 49 #define FREEBSD32_SYS_setlogin 50 #define FREEBSD32_SYS_acct 51 - /* 52 is old freebsd32_sigpending */ + /* 52 is old sigpending */ #define FREEBSD32_SYS_freebsd32_sigaltstack 53 #define FREEBSD32_SYS_freebsd32_ioctl 54 #define FREEBSD32_SYS_reboot 55 @@ -69,7 +69,7 @@ #define FREEBSD32_SYS_chroot 61 /* 62 is old freebsd32_fstat */ /* 63 is obsolete ogetkerninfo */ - /* 64 is old freebsd32_getpagesize */ + /* 64 is old getpagesize */ #define FREEBSD32_SYS_msync 65 #define FREEBSD32_SYS_vfork 66 /* 67 is obsolete vread */ diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 9d9600b2b2e9..4a7fa66babb0 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -51,7 +51,7 @@ const char *freebsd32_syscallnames[] = { "getppid", /* 39 = getppid */ "compat.freebsd32_lstat", /* 40 = old freebsd32_lstat */ "dup", /* 41 = dup */ - "compat10.freebsd32_pipe", /* 42 = freebsd10 freebsd32_pipe */ + "compat10.pipe", /* 42 = freebsd10 pipe */ "getegid", /* 43 = getegid */ "profil", /* 44 = profil */ "ktrace", /* 45 = ktrace */ @@ -61,7 +61,7 @@ const char *freebsd32_syscallnames[] = { "getlogin", /* 49 = getlogin */ "setlogin", /* 50 = setlogin */ "acct", /* 51 = acct */ - "compat.freebsd32_sigpending", /* 52 = old freebsd32_sigpending */ + "compat.sigpending", /* 52 = old sigpending */ "freebsd32_sigaltstack", /* 53 = freebsd32_sigaltstack */ "freebsd32_ioctl", /* 54 = freebsd32_ioctl */ "reboot", /* 55 = reboot */ @@ -73,7 +73,7 @@ const char *freebsd32_syscallnames[] = { "chroot", /* 61 = chroot */ "compat.freebsd32_fstat", /* 62 = old freebsd32_fstat */ "obs_ogetkerninfo", /* 63 = obsolete ogetkerninfo */ - "compat.freebsd32_getpagesize", /* 64 = old freebsd32_getpagesize */ + "compat.getpagesize", /* 64 = old getpagesize */ "msync", /* 65 = msync */ "vfork", /* 66 = vfork */ "obs_vread", /* 67 = obsolete vread */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 26bd67a88d74..1eff33290dbb 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -104,7 +104,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getppid, .sy_auevent = AUE_GETPPID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 39 = getppid */ { compat(AS(ofreebsd32_lstat_args),freebsd32_lstat), .sy_auevent = AUE_LSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 40 = old freebsd32_lstat */ { .sy_narg = AS(dup_args), .sy_call = (sy_call_t *)sys_dup, .sy_auevent = AUE_DUP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 41 = dup */ - { compat10(0,freebsd32_pipe), .sy_auevent = AUE_PIPE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 42 = freebsd10 freebsd32_pipe */ + { compat10(0,pipe), .sy_auevent = AUE_PIPE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 42 = freebsd10 pipe */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getegid, .sy_auevent = AUE_GETEGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 43 = getegid */ { .sy_narg = AS(profil_args), .sy_call = (sy_call_t *)sys_profil, .sy_auevent = AUE_PROFILE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 44 = profil */ { .sy_narg = AS(ktrace_args), .sy_call = (sy_call_t *)sys_ktrace, .sy_auevent = AUE_KTRACE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 45 = ktrace */ @@ -114,7 +114,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(getlogin_args), .sy_call = (sy_call_t *)sys_getlogin, .sy_auevent = AUE_GETLOGIN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 49 = getlogin */ { .sy_narg = AS(setlogin_args), .sy_call = (sy_call_t *)sys_setlogin, .sy_auevent = AUE_SETLOGIN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 50 = setlogin */ { .sy_narg = AS(acct_args), .sy_call = (sy_call_t *)sys_acct, .sy_auevent = AUE_ACCT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 51 = acct */ - { compat(0,freebsd32_sigpending), .sy_auevent = AUE_SIGPENDING, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 52 = old freebsd32_sigpending */ + { compat(0,sigpending), .sy_auevent = AUE_SIGPENDING, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 52 = old sigpending */ { .sy_narg = AS(freebsd32_sigaltstack_args), .sy_call = (sy_call_t *)freebsd32_sigaltstack, .sy_auevent = AUE_SIGALTSTACK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 53 = freebsd32_sigaltstack */ { .sy_narg = AS(freebsd32_ioctl_args), .sy_call = (sy_call_t *)freebsd32_ioctl, .sy_auevent = AUE_IOCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 54 = freebsd32_ioctl */ { .sy_narg = AS(reboot_args), .sy_call = (sy_call_t *)sys_reboot, .sy_auevent = AUE_REBOOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 55 = reboot */ @@ -126,7 +126,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(chroot_args), .sy_call = (sy_call_t *)sys_chroot, .sy_auevent = AUE_CHROOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 61 = chroot */ { compat(AS(ofreebsd32_fstat_args),freebsd32_fstat), .sy_auevent = AUE_FSTAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 62 = old freebsd32_fstat */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 63 = obsolete ogetkerninfo */ - { compat(AS(ofreebsd32_getpagesize_args),freebsd32_getpagesize), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 64 = old freebsd32_getpagesize */ + { compat(0,getpagesize), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 64 = old getpagesize */ { .sy_narg = AS(msync_args), .sy_call = (sy_call_t *)sys_msync, .sy_auevent = AUE_MSYNC, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 65 = msync */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_vfork, .sy_auevent = AUE_VFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 66 = vfork */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 67 = obsolete vread */ diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 46438927043b..88aad1d180a5 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -132,7 +132,7 @@ 40 AUE_LSTAT COMPAT { int freebsd32_lstat(const char *path, \ struct ostat32 *ub); } 41 AUE_DUP NOPROTO { int dup(u_int fd); } -42 AUE_PIPE COMPAT10 { int freebsd32_pipe(void); } +42 AUE_PIPE COMPAT10|NOPROTO { int pipe(void); } 43 AUE_GETEGID NOPROTO { gid_t getegid(void); } 44 AUE_PROFILE NOPROTO { int profil(char *samples, size_t size, \ size_t offset, u_int scale); } @@ -148,7 +148,7 @@ u_int namelen); } 50 AUE_SETLOGIN NOPROTO { int setlogin(const char *namebuf); } 51 AUE_ACCT NOPROTO { int acct(const char *path); } -52 AUE_SIGPENDING COMPAT { int freebsd32_sigpending(void); } +52 AUE_SIGPENDING COMPAT|NOPROTO { int sigpending(void); } 53 AUE_SIGALTSTACK STD { int freebsd32_sigaltstack( \ const struct sigaltstack32 *ss, \ struct sigaltstack32 *oss); } @@ -167,8 +167,7 @@ 62 AUE_FSTAT COMPAT { int freebsd32_fstat(int fd, \ struct ostat32 *sb); } 63 AUE_NULL OBSOL ogetkerninfo -64 AUE_NULL COMPAT { int freebsd32_getpagesize( \ - int32_t dummy); } +64 AUE_NULL COMPAT|NOPROTO { int getpagesize(void); } 65 AUE_MSYNC NOPROTO { int msync(void *addr, size_t len, \ int flags); } 66 AUE_VFORK NOPROTO { int vfork(void); } From nobody Wed Nov 17 20:22:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9491518550EC; Wed, 17 Nov 2021 20:22: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 4HvZ9T0qSQz4r18; Wed, 17 Nov 2021 20:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F1E027A0E; Wed, 17 Nov 2021 20:22: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 1AHKMYpu059889; Wed, 17 Nov 2021 20:22:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMYCL059888; Wed, 17 Nov 2021 20:22:34 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:34 GMT Message-Id: <202111172022.1AHKMYCL059888@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: dbb47e9264da - main - freebsd32: remove freebsd32_recvfrom List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dbb47e9264da2e11d60cea466a77cf008a387428 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=dbb47e9264da2e11d60cea466a77cf008a387428 commit dbb47e9264da2e11d60cea466a77cf008a387428 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:24 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:24 +0000 freebsd32: remove freebsd32_recvfrom The freebsd32_recvfrom() serves no purpose as no arguments require translation. The prototype was mis-declared and the implementation contained (relatively harmless) errors. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 31 -------------------------- sys/compat/freebsd32/freebsd32_proto.h | 10 --------- sys/compat/freebsd32/freebsd32_syscall.h | 2 +- sys/compat/freebsd32/freebsd32_syscalls.c | 2 +- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 12 +++++----- sys/compat/freebsd32/syscalls.master | 4 ++-- 7 files changed, 11 insertions(+), 52 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index a0a7f1936fc9..08abd7ac26c8 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1603,37 +1603,6 @@ out: return (error); } -int -freebsd32_recvfrom(struct thread *td, - struct freebsd32_recvfrom_args *uap) -{ - struct msghdr msg; - struct iovec aiov; - int error; - - if (uap->fromlenaddr) { - error = copyin(PTRIN(uap->fromlenaddr), &msg.msg_namelen, - sizeof(msg.msg_namelen)); - if (error) - return (error); - } else { - msg.msg_namelen = 0; - } - - msg.msg_name = PTRIN(uap->from); - msg.msg_iov = &aiov; - msg.msg_iovlen = 1; - aiov.iov_base = PTRIN(uap->buf); - aiov.iov_len = uap->len; - msg.msg_control = NULL; - msg.msg_flags = uap->flags; - error = kern_recvit(td, uap->s, &msg, UIO_USERSPACE, NULL); - if (error == 0 && uap->fromlenaddr) - error = copyout(&msg.msg_namelen, PTRIN(uap->fromlenaddr), - sizeof (msg.msg_namelen)); - return (error); -} - int freebsd32_settimeofday(struct thread *td, struct freebsd32_settimeofday_args *uap) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 02a199acf1df..74410d1d0698 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -59,14 +59,6 @@ struct freebsd32_sendmsg_args { char msg_l_[PADL_(const struct msghdr32 *)]; const struct msghdr32 * msg; char msg_r_[PADR_(const struct msghdr32 *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; -struct freebsd32_recvfrom_args { - char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; - char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; - char from_l_[PADL_(struct sockaddr *)]; struct sockaddr * from; char from_r_[PADR_(struct sockaddr *)]; - char fromlenaddr_l_[PADL_(uint32_t)]; uint32_t fromlenaddr; char fromlenaddr_r_[PADR_(uint32_t)]; -}; struct freebsd32_sigaltstack_args { char ss_l_[PADL_(const struct sigaltstack32 *)]; const struct sigaltstack32 * ss; char ss_r_[PADR_(const struct sigaltstack32 *)]; char oss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * oss; char oss_r_[PADR_(struct sigaltstack32 *)]; @@ -759,7 +751,6 @@ int freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *); int freebsd32_ptrace(struct thread *, struct freebsd32_ptrace_args *); int freebsd32_recvmsg(struct thread *, struct freebsd32_recvmsg_args *); int freebsd32_sendmsg(struct thread *, struct freebsd32_sendmsg_args *); -int freebsd32_recvfrom(struct thread *, struct freebsd32_recvfrom_args *); int freebsd32_sigaltstack(struct thread *, struct freebsd32_sigaltstack_args *); int freebsd32_ioctl(struct thread *, struct freebsd32_ioctl_args *); int freebsd32_execve(struct thread *, struct freebsd32_execve_args *); @@ -1328,7 +1319,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_ptrace AUE_PTRACE #define FREEBSD32_SYS_AUE_freebsd32_recvmsg AUE_RECVMSG #define FREEBSD32_SYS_AUE_freebsd32_sendmsg AUE_SENDMSG -#define FREEBSD32_SYS_AUE_freebsd32_recvfrom AUE_RECVFROM #define FREEBSD32_SYS_AUE_ofreebsd32_stat AUE_STAT #define FREEBSD32_SYS_AUE_ofreebsd32_lstat AUE_LSTAT #define FREEBSD32_SYS_AUE_ofreebsd32_sigaction AUE_SIGACTION diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index a52565f6803d..316d3bfd5857 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -34,7 +34,7 @@ #define FREEBSD32_SYS_freebsd32_ptrace 26 #define FREEBSD32_SYS_freebsd32_recvmsg 27 #define FREEBSD32_SYS_freebsd32_sendmsg 28 -#define FREEBSD32_SYS_freebsd32_recvfrom 29 +#define FREEBSD32_SYS_recvfrom 29 #define FREEBSD32_SYS_accept 30 #define FREEBSD32_SYS_getpeername 31 #define FREEBSD32_SYS_getsockname 32 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 4a7fa66babb0..cd990811c0da 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -38,7 +38,7 @@ const char *freebsd32_syscallnames[] = { "freebsd32_ptrace", /* 26 = freebsd32_ptrace */ "freebsd32_recvmsg", /* 27 = freebsd32_recvmsg */ "freebsd32_sendmsg", /* 28 = freebsd32_sendmsg */ - "freebsd32_recvfrom", /* 29 = freebsd32_recvfrom */ + "recvfrom", /* 29 = recvfrom */ "accept", /* 30 = accept */ "getpeername", /* 31 = getpeername */ "getsockname", /* 32 = getsockname */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 1eff33290dbb..20c6d7a3e8a7 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -91,7 +91,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_ptrace_args), .sy_call = (sy_call_t *)freebsd32_ptrace, .sy_auevent = AUE_PTRACE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 26 = freebsd32_ptrace */ { .sy_narg = AS(freebsd32_recvmsg_args), .sy_call = (sy_call_t *)freebsd32_recvmsg, .sy_auevent = AUE_RECVMSG, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 27 = freebsd32_recvmsg */ { .sy_narg = AS(freebsd32_sendmsg_args), .sy_call = (sy_call_t *)freebsd32_sendmsg, .sy_auevent = AUE_SENDMSG, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 28 = freebsd32_sendmsg */ - { .sy_narg = AS(freebsd32_recvfrom_args), .sy_call = (sy_call_t *)freebsd32_recvfrom, .sy_auevent = AUE_RECVFROM, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 29 = freebsd32_recvfrom */ + { .sy_narg = AS(recvfrom_args), .sy_call = (sy_call_t *)sys_recvfrom, .sy_auevent = AUE_RECVFROM, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 29 = recvfrom */ { .sy_narg = AS(accept_args), .sy_call = (sy_call_t *)sys_accept, .sy_auevent = AUE_ACCEPT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 30 = accept */ { .sy_narg = AS(getpeername_args), .sy_call = (sy_call_t *)sys_getpeername, .sy_auevent = AUE_GETPEERNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 31 = getpeername */ { .sy_narg = AS(getsockname_args), .sy_call = (sy_call_t *)sys_getsockname, .sy_auevent = AUE_GETSOCKNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 32 = getsockname */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 7544c55bd499..e06efa75b025 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -196,15 +196,15 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } - /* freebsd32_recvfrom */ + /* recvfrom */ case 29: { - struct freebsd32_recvfrom_args *p = params; + struct recvfrom_args *p = params; iarg[0] = p->s; /* int */ uarg[1] = (intptr_t)p->buf; /* void * */ uarg[2] = p->len; /* size_t */ iarg[3] = p->flags; /* int */ uarg[4] = (intptr_t)p->from; /* struct sockaddr * */ - uarg[5] = p->fromlenaddr; /* uint32_t */ + uarg[5] = (intptr_t)p->fromlenaddr; /* __socklen_t * */ *n_args = 6; break; } @@ -3720,7 +3720,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* freebsd32_recvfrom */ + /* recvfrom */ case 29: switch (ndx) { case 0: @@ -3739,7 +3739,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct sockaddr *"; break; case 5: - p = "uint32_t"; + p = "userland __socklen_t *"; break; default: break; @@ -9360,7 +9360,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* freebsd32_recvfrom */ + /* recvfrom */ case 29: if (ndx == 0 || ndx == 1) p = "int"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 88aad1d180a5..f3c506e856b5 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -109,10 +109,10 @@ int flags); } 28 AUE_SENDMSG STD { int freebsd32_sendmsg(int s, \ const struct msghdr32 *msg, int flags); } -29 AUE_RECVFROM STD { int freebsd32_recvfrom(int s, void *buf, \ +29 AUE_RECVFROM NOPROTO { int recvfrom(int s, void *buf, \ size_t len, int flags, \ struct sockaddr *from, \ - uint32_t fromlenaddr); } + __socklen_t *fromlenaddr); } 30 AUE_ACCEPT NOPROTO { int accept(int s, struct sockaddr *name, \ int *anamelen); } 31 AUE_GETPEERNAME NOPROTO { int getpeername(int fdes, \ From nobody Wed Nov 17 20:22:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3155E185538D; Wed, 17 Nov 2021 20:22:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9V5X3wz4rBT; Wed, 17 Nov 2021 20:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 78B8627277; Wed, 17 Nov 2021 20:22: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 1AHKMaRV059943; Wed, 17 Nov 2021 20:22:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMapM059942; Wed, 17 Nov 2021 20:22:36 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:36 GMT Message-Id: <202111172022.1AHKMapM059942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 25fec55b8695 - main - freebsd32: remove freebsd11_freebsd32_getdents List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25fec55b86959541fc93d49dffb2e2c549d1de88 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=25fec55b86959541fc93d49dffb2e2c549d1de88 commit 25fec55b86959541fc93d49dffb2e2c549d1de88 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:25 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:25 +0000 freebsd32: remove freebsd11_freebsd32_getdents It's exactly the same as freebsd11_getdents. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 13 ------------- sys/compat/freebsd32/freebsd32_proto.h | 7 ------- sys/compat/freebsd32/freebsd32_syscall.h | 2 +- sys/compat/freebsd32/freebsd32_syscalls.c | 2 +- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- sys/compat/freebsd32/syscalls.master | 2 +- 6 files changed, 4 insertions(+), 24 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index c7c6036e81e8..e2fb6fae1aa9 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1942,19 +1942,6 @@ freebsd11_freebsd32_getdirentries(struct thread *td, } return (error); } - -int -freebsd11_freebsd32_getdents(struct thread *td, - struct freebsd11_freebsd32_getdents_args *uap) -{ - struct freebsd11_freebsd32_getdirentries_args ap; - - ap.fd = uap->fd; - ap.buf = uap->buf; - ap.count = uap->count; - ap.basep = NULL; - return (freebsd11_freebsd32_getdirentries(td, &ap)); -} #endif /* COMPAT_FREEBSD11 */ #ifdef COMPAT_FREEBSD6 diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 659339eb3715..92d1408a539f 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -1223,11 +1223,6 @@ struct freebsd11_freebsd32_getdirentries_args { char count_l_[PADL_(u_int)]; u_int count; char count_r_[PADR_(u_int)]; char basep_l_[PADL_(int32_t *)]; int32_t * basep; char basep_r_[PADR_(int32_t *)]; }; -struct freebsd11_freebsd32_getdents_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; - char count_l_[PADL_(int)]; int count; char count_r_[PADR_(int)]; -}; struct freebsd11_freebsd32_fhstat_args { char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; char sb_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * sb; char sb_r_[PADR_(struct freebsd11_stat32 *)]; @@ -1265,7 +1260,6 @@ int freebsd11_freebsd32_stat(struct thread *, struct freebsd11_freebsd32_stat_ar int freebsd11_freebsd32_fstat(struct thread *, struct freebsd11_freebsd32_fstat_args *); int freebsd11_freebsd32_lstat(struct thread *, struct freebsd11_freebsd32_lstat_args *); int freebsd11_freebsd32_getdirentries(struct thread *, struct freebsd11_freebsd32_getdirentries_args *); -int freebsd11_freebsd32_getdents(struct thread *, struct freebsd11_freebsd32_getdents_args *); int freebsd11_freebsd32_fhstat(struct thread *, struct freebsd11_freebsd32_fhstat_args *); int freebsd11_freebsd32_kevent(struct thread *, struct freebsd11_freebsd32_kevent_args *); int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fstatat_args *); @@ -1362,7 +1356,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_aio_read AUE_AIO_READ #define FREEBSD32_SYS_AUE_freebsd32_aio_write AUE_AIO_WRITE #define FREEBSD32_SYS_AUE_freebsd32_lio_listio AUE_LIO_LISTIO -#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_getdents AUE_O_GETDENTS #define FREEBSD32_SYS_AUE_freebsd32_lutimes AUE_LUTIMES #define FREEBSD32_SYS_AUE_freebsd32_preadv AUE_PREADV #define FREEBSD32_SYS_AUE_freebsd32_pwritev AUE_PWRITEV diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index d263e7f4f7e7..e97827d96169 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -229,7 +229,7 @@ #define FREEBSD32_SYS_freebsd32_aio_read 255 #define FREEBSD32_SYS_freebsd32_aio_write 256 #define FREEBSD32_SYS_freebsd32_lio_listio 257 -#define FREEBSD32_SYS_freebsd11_freebsd32_getdents 272 +#define FREEBSD32_SYS_freebsd11_getdents 272 #define FREEBSD32_SYS_lchmod 274 /* 275 is obsolete netbsd_lchown */ #define FREEBSD32_SYS_freebsd32_lutimes 276 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 9d5c19a06774..13ed9e9dd591 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -281,7 +281,7 @@ const char *freebsd32_syscallnames[] = { "#269", /* 269 = nosys */ "#270", /* 270 = nosys */ "#271", /* 271 = nosys */ - "compat11.freebsd32_getdents", /* 272 = freebsd11 freebsd32_getdents */ + "compat11.getdents", /* 272 = freebsd11 getdents */ "#273", /* 273 = nosys */ "lchmod", /* 274 = lchmod */ "obs_netbsd_lchown", /* 275 = obsolete netbsd_lchown */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 285ec61747a0..0a2fffabdeaf 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -334,7 +334,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 269 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 270 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 271 = nosys */ - { compat11(AS(freebsd11_freebsd32_getdents_args),freebsd32_getdents), .sy_auevent = AUE_O_GETDENTS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 272 = freebsd11 freebsd32_getdents */ + { compat11(AS(freebsd11_getdents_args),getdents), .sy_auevent = AUE_O_GETDENTS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 272 = freebsd11 getdents */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 273 = nosys */ { .sy_narg = AS(lchmod_args), .sy_call = (sy_call_t *)sys_lchmod, .sy_auevent = AUE_LCHMOD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 274 = lchmod */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 275 = obsolete netbsd_lchown */ diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index a88568b620d8..0408c7ecf265 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -505,7 +505,7 @@ 269 AUE_NULL UNIMPL nosys 270 AUE_NULL UNIMPL nosys 271 AUE_NULL UNIMPL nosys -272 AUE_O_GETDENTS COMPAT11 { int freebsd32_getdents(int fd, char *buf, \ +272 AUE_O_GETDENTS COMPAT11|NOPROTO { int getdents(int fd, char *buf, \ int count); } 273 AUE_NULL UNIMPL nosys 274 AUE_LCHMOD NOPROTO { int lchmod(const char *path, mode_t mode); } From nobody Wed Nov 17 20:22:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 357C8185540D; Wed, 17 Nov 2021 20:22:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9W1g93z4r5t; Wed, 17 Nov 2021 20:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9FD3827A88; Wed, 17 Nov 2021 20:22: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 1AHKMboN059967; Wed, 17 Nov 2021 20:22:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMbWV059966; Wed, 17 Nov 2021 20:22:37 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:37 GMT Message-Id: <202111172022.1AHKMbWV059966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 91301e6ea54a - main - freebsd32: don't implement kldsym List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91301e6ea54abe2c163c4b502e5116e1f9a0ad2a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=91301e6ea54abe2c163c4b502e5116e1f9a0ad2a commit 91301e6ea54abe2c163c4b502e5116e1f9a0ad2a Author: Brooks Davis AuthorDate: 2021-11-17 20:12:25 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:25 +0000 freebsd32: don't implement kldsym Previously we fell back to sys_kldsym, but because we'd always mismatch on the version field we'd return EINVAL. A freebsd32 implementation is impossible with the current ABI as there simply isn't space to store a kernel virtual address in a uint32_t. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_syscall.h | 1 - sys/compat/freebsd32/freebsd32_syscalls.c | 2 +- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 30 -------------------------- sys/compat/freebsd32/syscalls.master | 3 +-- 5 files changed, 3 insertions(+), 35 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index e97827d96169..71055205093a 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -279,7 +279,6 @@ #define FREEBSD32_SYS_freebsd32_sched_rr_get_interval 334 #define FREEBSD32_SYS_utrace 335 /* 336 is freebsd4 freebsd32_sendfile */ -#define FREEBSD32_SYS_kldsym 337 #define FREEBSD32_SYS_freebsd32_jail 338 #define FREEBSD32_SYS_sigprocmask 340 #define FREEBSD32_SYS_sigsuspend 341 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 13ed9e9dd591..3a2a515b9dc5 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -346,7 +346,7 @@ const char *freebsd32_syscallnames[] = { "freebsd32_sched_rr_get_interval", /* 334 = freebsd32_sched_rr_get_interval */ "utrace", /* 335 = utrace */ "compat4.freebsd32_sendfile", /* 336 = freebsd4 freebsd32_sendfile */ - "kldsym", /* 337 = kldsym */ + "#337", /* 337 = kldsym */ "freebsd32_jail", /* 338 = freebsd32_jail */ "#339", /* 339 = pioctl */ "sigprocmask", /* 340 = sigprocmask */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 0a2fffabdeaf..806d0437884a 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -399,7 +399,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_sched_rr_get_interval_args), .sy_call = (sy_call_t *)freebsd32_sched_rr_get_interval, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 334 = freebsd32_sched_rr_get_interval */ { .sy_narg = AS(utrace_args), .sy_call = (sy_call_t *)sys_utrace, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 335 = utrace */ { compat4(AS(freebsd4_freebsd32_sendfile_args),freebsd32_sendfile), .sy_auevent = AUE_SENDFILE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 336 = freebsd4 freebsd32_sendfile */ - { .sy_narg = AS(kldsym_args), .sy_call = (sy_call_t *)sys_kldsym, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 337 = kldsym */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 337 = kldsym */ { .sy_narg = AS(freebsd32_jail_args), .sy_call = (sy_call_t *)freebsd32_jail, .sy_auevent = AUE_JAIL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 338 = freebsd32_jail */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 339 = pioctl */ { .sy_narg = AS(sigprocmask_args), .sy_call = (sy_call_t *)sys_sigprocmask, .sy_auevent = AUE_SIGPROCMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 340 = sigprocmask */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index e06efa75b025..21d59a5fdfd9 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1550,15 +1550,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 2; break; } - /* kldsym */ - case 337: { - struct kldsym_args *p = params; - iarg[0] = p->fileid; /* int */ - iarg[1] = p->cmd; /* int */ - uarg[2] = (intptr_t)p->data; /* void * */ - *n_args = 3; - break; - } /* freebsd32_jail */ case 338: { struct freebsd32_jail_args *p = params; @@ -5867,22 +5858,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* kldsym */ - case 337: - switch (ndx) { - case 0: - p = "int"; - break; - case 1: - p = "int"; - break; - case 2: - p = "userland void *"; - break; - default: - break; - }; - break; /* freebsd32_jail */ case 338: switch (ndx) { @@ -10151,11 +10126,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* kldsym */ - case 337: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* freebsd32_jail */ case 338: if (ndx == 0 || ndx == 1) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 0408c7ecf265..c9cac48f7ac4 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -611,8 +611,7 @@ uint32_t offset1, uint32_t offset2, \ size_t nbytes, struct sf_hdtr32 *hdtr, \ off_t *sbytes, int flags); } -337 AUE_NULL NOPROTO { int kldsym(int fileid, int cmd, \ - void *data); } +337 AUE_NULL UNIMPL kldsym 338 AUE_JAIL STD { int freebsd32_jail(struct jail32 *jail); } 339 AUE_NULL UNIMPL pioctl 340 AUE_SIGPROCMASK NOPROTO { int sigprocmask(int how, \ From nobody Wed Nov 17 20:22:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 357F3185531B; Wed, 17 Nov 2021 20:22:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9V5BMCz4rG0; Wed, 17 Nov 2021 20:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BFF027A87; Wed, 17 Nov 2021 20:22: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 1AHKMZRI059913; Wed, 17 Nov 2021 20:22:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMZn1059912; Wed, 17 Nov 2021 20:22:35 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:35 GMT Message-Id: <202111172022.1AHKMZn1059912@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 1de34945f440 - main - freebsd32: remove redundent osig*() implementations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1de34945f4403f67cc502ca6a9091ea3adf263b2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1de34945f4403f67cc502ca6a9091ea3adf263b2 commit 1de34945f4403f67cc502ca6a9091ea3adf263b2 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:25 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:25 +0000 freebsd32: remove redundent osig*() implementations ofreebsd32_sigprocmask, ofreebsd32_sigblock, ofreebsd32_sigsetmask, and ofreebsd32_sigsuspend were all duplicates of the default ABI versions and there are no type concerns as all arguments are the same. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 47 ------------------------------- sys/compat/freebsd32/freebsd32_proto.h | 21 -------------- sys/compat/freebsd32/freebsd32_syscall.h | 8 +++--- sys/compat/freebsd32/freebsd32_syscalls.c | 8 +++--- sys/compat/freebsd32/freebsd32_sysent.c | 8 +++--- sys/compat/freebsd32/syscalls.master | 9 +++--- 6 files changed, 16 insertions(+), 85 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 08abd7ac26c8..c7c6036e81e8 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2688,19 +2688,6 @@ ofreebsd32_sigaction(struct thread *td, return (error); } -int -ofreebsd32_sigprocmask(struct thread *td, - struct ofreebsd32_sigprocmask_args *uap) -{ - sigset_t set, oset; - int error; - - OSIG2SIG(uap->mask, set); - error = kern_sigprocmask(td, uap->how, &set, &oset, SIGPROCMASK_OLD); - SIG2OSIG(oset, td->td_retval[0]); - return (error); -} - struct sigvec32 { u_int32_t sv_handler; int sv_mask; @@ -2741,40 +2728,6 @@ ofreebsd32_sigvec(struct thread *td, return (error); } -int -ofreebsd32_sigblock(struct thread *td, - struct ofreebsd32_sigblock_args *uap) -{ - sigset_t set, oset; - - OSIG2SIG(uap->mask, set); - kern_sigprocmask(td, SIG_BLOCK, &set, &oset, 0); - SIG2OSIG(oset, td->td_retval[0]); - return (0); -} - -int -ofreebsd32_sigsetmask(struct thread *td, - struct ofreebsd32_sigsetmask_args *uap) -{ - sigset_t set, oset; - - OSIG2SIG(uap->mask, set); - kern_sigprocmask(td, SIG_SETMASK, &set, &oset, 0); - SIG2OSIG(oset, td->td_retval[0]); - return (0); -} - -int -ofreebsd32_sigsuspend(struct thread *td, - struct ofreebsd32_sigsuspend_args *uap) -{ - sigset_t mask; - - OSIG2SIG(uap->mask, mask); - return (kern_sigsuspend(td, mask)); -} - struct sigstack32 { u_int32_t ss_sp; int ss_onstack; diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 74410d1d0698..659339eb3715 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -910,10 +910,6 @@ struct ofreebsd32_sigaction_args { char nsa_l_[PADL_(struct osigaction32 *)]; struct osigaction32 * nsa; char nsa_r_[PADR_(struct osigaction32 *)]; char osa_l_[PADL_(struct osigaction32 *)]; struct osigaction32 * osa; char osa_r_[PADR_(struct osigaction32 *)]; }; -struct ofreebsd32_sigprocmask_args { - char how_l_[PADL_(int)]; int how; char how_r_[PADR_(int)]; - char mask_l_[PADL_(osigset_t)]; osigset_t mask; char mask_r_[PADR_(osigset_t)]; -}; struct ofreebsd32_fstat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char sb_l_[PADL_(struct ostat32 *)]; struct ostat32 * sb; char sb_r_[PADR_(struct ostat32 *)]; @@ -934,15 +930,6 @@ struct ofreebsd32_sigvec_args { char nsv_l_[PADL_(struct sigvec32 *)]; struct sigvec32 * nsv; char nsv_r_[PADR_(struct sigvec32 *)]; char osv_l_[PADL_(struct sigvec32 *)]; struct sigvec32 * osv; char osv_r_[PADR_(struct sigvec32 *)]; }; -struct ofreebsd32_sigblock_args { - char mask_l_[PADL_(int)]; int mask; char mask_r_[PADR_(int)]; -}; -struct ofreebsd32_sigsetmask_args { - char mask_l_[PADL_(int)]; int mask; char mask_r_[PADR_(int)]; -}; -struct ofreebsd32_sigsuspend_args { - char mask_l_[PADL_(int)]; int mask; char mask_r_[PADR_(int)]; -}; struct ofreebsd32_sigstack_args { char nss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * nss; char nss_r_[PADR_(struct sigstack32 *)]; char oss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * oss; char oss_r_[PADR_(struct sigstack32 *)]; @@ -972,14 +959,10 @@ int ofreebsd32_lseek(struct thread *, struct ofreebsd32_lseek_args *); int ofreebsd32_stat(struct thread *, struct ofreebsd32_stat_args *); int ofreebsd32_lstat(struct thread *, struct ofreebsd32_lstat_args *); int ofreebsd32_sigaction(struct thread *, struct ofreebsd32_sigaction_args *); -int ofreebsd32_sigprocmask(struct thread *, struct ofreebsd32_sigprocmask_args *); int ofreebsd32_fstat(struct thread *, struct ofreebsd32_fstat_args *); int ofreebsd32_mmap(struct thread *, struct ofreebsd32_mmap_args *); int ofreebsd32_sigreturn(struct thread *, struct ofreebsd32_sigreturn_args *); int ofreebsd32_sigvec(struct thread *, struct ofreebsd32_sigvec_args *); -int ofreebsd32_sigblock(struct thread *, struct ofreebsd32_sigblock_args *); -int ofreebsd32_sigsetmask(struct thread *, struct ofreebsd32_sigsetmask_args *); -int ofreebsd32_sigsuspend(struct thread *, struct ofreebsd32_sigsuspend_args *); int ofreebsd32_sigstack(struct thread *, struct ofreebsd32_sigstack_args *); int ofreebsd32_getdirentries(struct thread *, struct ofreebsd32_getdirentries_args *); @@ -1322,7 +1305,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_ofreebsd32_stat AUE_STAT #define FREEBSD32_SYS_AUE_ofreebsd32_lstat AUE_LSTAT #define FREEBSD32_SYS_AUE_ofreebsd32_sigaction AUE_SIGACTION -#define FREEBSD32_SYS_AUE_ofreebsd32_sigprocmask AUE_SIGPROCMASK #define FREEBSD32_SYS_AUE_freebsd32_sigaltstack AUE_SIGALTSTACK #define FREEBSD32_SYS_AUE_freebsd32_ioctl AUE_IOCTL #define FREEBSD32_SYS_AUE_freebsd32_execve AUE_EXECVE @@ -1335,9 +1317,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_select AUE_SELECT #define FREEBSD32_SYS_AUE_ofreebsd32_sigreturn AUE_SIGRETURN #define FREEBSD32_SYS_AUE_ofreebsd32_sigvec AUE_O_SIGVEC -#define FREEBSD32_SYS_AUE_ofreebsd32_sigblock AUE_O_SIGBLOCK -#define FREEBSD32_SYS_AUE_ofreebsd32_sigsetmask AUE_O_SIGSETMASK -#define FREEBSD32_SYS_AUE_ofreebsd32_sigsuspend AUE_SIGSUSPEND #define FREEBSD32_SYS_AUE_ofreebsd32_sigstack AUE_O_SIGSTACK #define FREEBSD32_SYS_AUE_freebsd32_gettimeofday AUE_GETTIMEOFDAY #define FREEBSD32_SYS_AUE_freebsd32_getrusage AUE_GETRUSAGE diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 316d3bfd5857..d263e7f4f7e7 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -53,7 +53,7 @@ #define FREEBSD32_SYS_ktrace 45 /* 46 is old freebsd32_sigaction */ #define FREEBSD32_SYS_getgid 47 - /* 48 is old freebsd32_sigprocmask */ + /* 48 is old sigprocmask */ #define FREEBSD32_SYS_getlogin 49 #define FREEBSD32_SYS_setlogin 50 #define FREEBSD32_SYS_acct 51 @@ -112,9 +112,9 @@ #define FREEBSD32_SYS_listen 106 /* 107 is obsolete vtimes */ /* 108 is old freebsd32_sigvec */ - /* 109 is old freebsd32_sigblock */ - /* 110 is old freebsd32_sigsetmask */ - /* 111 is old freebsd32_sigsuspend */ + /* 109 is old sigblock */ + /* 110 is old sigsetmask */ + /* 111 is old sigsuspend */ /* 112 is old freebsd32_sigstack */ /* 113 is obsolete orecvmsg */ /* 114 is obsolete osendmsg */ diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index cd990811c0da..9d5c19a06774 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -57,7 +57,7 @@ const char *freebsd32_syscallnames[] = { "ktrace", /* 45 = ktrace */ "compat.freebsd32_sigaction", /* 46 = old freebsd32_sigaction */ "getgid", /* 47 = getgid */ - "compat.freebsd32_sigprocmask", /* 48 = old freebsd32_sigprocmask */ + "compat.sigprocmask", /* 48 = old sigprocmask */ "getlogin", /* 49 = getlogin */ "setlogin", /* 50 = setlogin */ "acct", /* 51 = acct */ @@ -118,9 +118,9 @@ const char *freebsd32_syscallnames[] = { "listen", /* 106 = listen */ "obs_vtimes", /* 107 = obsolete vtimes */ "compat.freebsd32_sigvec", /* 108 = old freebsd32_sigvec */ - "compat.freebsd32_sigblock", /* 109 = old freebsd32_sigblock */ - "compat.freebsd32_sigsetmask", /* 110 = old freebsd32_sigsetmask */ - "compat.freebsd32_sigsuspend", /* 111 = old freebsd32_sigsuspend */ + "compat.sigblock", /* 109 = old sigblock */ + "compat.sigsetmask", /* 110 = old sigsetmask */ + "compat.sigsuspend", /* 111 = old sigsuspend */ "compat.freebsd32_sigstack", /* 112 = old freebsd32_sigstack */ "obs_orecvmsg", /* 113 = obsolete orecvmsg */ "obs_osendmsg", /* 114 = obsolete osendmsg */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 20c6d7a3e8a7..285ec61747a0 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -110,7 +110,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(ktrace_args), .sy_call = (sy_call_t *)sys_ktrace, .sy_auevent = AUE_KTRACE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 45 = ktrace */ { compat(AS(ofreebsd32_sigaction_args),freebsd32_sigaction), .sy_auevent = AUE_SIGACTION, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 46 = old freebsd32_sigaction */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getgid, .sy_auevent = AUE_GETGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 47 = getgid */ - { compat(AS(ofreebsd32_sigprocmask_args),freebsd32_sigprocmask), .sy_auevent = AUE_SIGPROCMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 48 = old freebsd32_sigprocmask */ + { compat(AS(osigprocmask_args),sigprocmask), .sy_auevent = AUE_SIGPROCMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 48 = old sigprocmask */ { .sy_narg = AS(getlogin_args), .sy_call = (sy_call_t *)sys_getlogin, .sy_auevent = AUE_GETLOGIN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 49 = getlogin */ { .sy_narg = AS(setlogin_args), .sy_call = (sy_call_t *)sys_setlogin, .sy_auevent = AUE_SETLOGIN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 50 = setlogin */ { .sy_narg = AS(acct_args), .sy_call = (sy_call_t *)sys_acct, .sy_auevent = AUE_ACCT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 51 = acct */ @@ -171,9 +171,9 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(listen_args), .sy_call = (sy_call_t *)sys_listen, .sy_auevent = AUE_LISTEN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 106 = listen */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 107 = obsolete vtimes */ { compat(AS(ofreebsd32_sigvec_args),freebsd32_sigvec), .sy_auevent = AUE_O_SIGVEC, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 108 = old freebsd32_sigvec */ - { compat(AS(ofreebsd32_sigblock_args),freebsd32_sigblock), .sy_auevent = AUE_O_SIGBLOCK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 109 = old freebsd32_sigblock */ - { compat(AS(ofreebsd32_sigsetmask_args),freebsd32_sigsetmask), .sy_auevent = AUE_O_SIGSETMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 110 = old freebsd32_sigsetmask */ - { compat(AS(ofreebsd32_sigsuspend_args),freebsd32_sigsuspend), .sy_auevent = AUE_SIGSUSPEND, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 111 = old freebsd32_sigsuspend */ + { compat(AS(osigblock_args),sigblock), .sy_auevent = AUE_O_SIGBLOCK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 109 = old sigblock */ + { compat(AS(osigsetmask_args),sigsetmask), .sy_auevent = AUE_O_SIGSETMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 110 = old sigsetmask */ + { compat(AS(osigsuspend_args),sigsuspend), .sy_auevent = AUE_SIGSUSPEND, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 111 = old sigsuspend */ { compat(AS(ofreebsd32_sigstack_args),freebsd32_sigstack), .sy_auevent = AUE_O_SIGSTACK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 112 = old freebsd32_sigstack */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 113 = obsolete orecvmsg */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 114 = obsolete osendmsg */ diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index f3c506e856b5..a88568b620d8 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -142,8 +142,7 @@ struct osigaction32 *nsa, \ struct osigaction32 *osa); } 47 AUE_GETGID NOPROTO { gid_t getgid(void); } -48 AUE_SIGPROCMASK COMPAT { int freebsd32_sigprocmask(int how, \ - osigset_t mask); } +48 AUE_SIGPROCMASK COMPAT|NOPROTO { int sigprocmask(int how, osigset_t mask); } 49 AUE_GETLOGIN NOPROTO { int getlogin(char *namebuf, \ u_int namelen); } 50 AUE_SETLOGIN NOPROTO { int setlogin(const char *namebuf); } @@ -235,9 +234,9 @@ 108 AUE_O_SIGVEC COMPAT { int freebsd32_sigvec(int signum, \ struct sigvec32 *nsv, \ struct sigvec32 *osv); } -109 AUE_O_SIGBLOCK COMPAT { int freebsd32_sigblock(int mask); } -110 AUE_O_SIGSETMASK COMPAT { int freebsd32_sigsetmask( int mask); } -111 AUE_SIGSUSPEND COMPAT { int freebsd32_sigsuspend( int mask); } +109 AUE_O_SIGBLOCK COMPAT|NOPROTO { int sigblock(int mask); } +110 AUE_O_SIGSETMASK COMPAT|NOPROTO { int sigsetmask(int mask); } +111 AUE_SIGSUSPEND COMPAT|NOPROTO { int sigsuspend( int mask); } 112 AUE_O_SIGSTACK COMPAT { int freebsd32_sigstack( \ struct sigstack32 *nss, \ struct sigstack32 *oss); } From nobody Wed Nov 17 20:22:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C033418551BF; Wed, 17 Nov 2021 20:22: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 4HvZ9Y1rfCz4r3d; Wed, 17 Nov 2021 20:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C86D927374; Wed, 17 Nov 2021 20:22: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 1AHKMceh059991; Wed, 17 Nov 2021 20:22:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMchM059990; Wed, 17 Nov 2021 20:22:38 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:38 GMT Message-Id: <202111172022.1AHKMchM059990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 7bd795650f5c - main - freebsd32: enable trivial syscalls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bd795650f5c5310819755f1f0428bfe693c8515 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=7bd795650f5c5310819755f1f0428bfe693c8515 commit 7bd795650f5c5310819755f1f0428bfe693c8515 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:25 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:25 +0000 freebsd32: enable trivial syscalls These syscalls require no translation. They were simply missing from compat/freebsd32/syscalls.master. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_syscall.h | 36 +++++++++--------- sys/compat/freebsd32/freebsd32_syscalls.c | 38 +++++++++---------- sys/compat/freebsd32/freebsd32_sysent.c | 38 +++++++++---------- sys/compat/freebsd32/freebsd32_systrace_args.c | 44 ++++++++++++++++++++++ sys/compat/freebsd32/syscalls.master | 51 ++++++++++++++++---------- 5 files changed, 133 insertions(+), 74 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 71055205093a..2e65581b5a27 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -13,7 +13,7 @@ #define FREEBSD32_SYS_open 5 #define FREEBSD32_SYS_close 6 #define FREEBSD32_SYS_freebsd32_wait4 7 - /* 8 is obsolete old creat */ + /* 8 is old creat */ #define FREEBSD32_SYS_link 9 #define FREEBSD32_SYS_unlink 10 /* 11 is obsolete execv */ @@ -89,11 +89,11 @@ #define FREEBSD32_SYS_getpgrp 81 #define FREEBSD32_SYS_setpgid 82 #define FREEBSD32_SYS_freebsd32_setitimer 83 - /* 84 is obsolete owait */ + /* 84 is old wait */ #define FREEBSD32_SYS_swapon 85 #define FREEBSD32_SYS_freebsd32_getitimer 86 - /* 87 is obsolete ogethostname */ - /* 88 is obsolete osethostname */ + /* 87 is old gethostname */ + /* 88 is old sethostname */ #define FREEBSD32_SYS_getdtablesize 89 #define FREEBSD32_SYS_dup2 90 #define FREEBSD32_SYS_freebsd32_fcntl 92 @@ -102,10 +102,10 @@ #define FREEBSD32_SYS_setpriority 96 #define FREEBSD32_SYS_socket 97 #define FREEBSD32_SYS_connect 98 - /* 99 is obsolete oaccept */ + /* 99 is old accept */ #define FREEBSD32_SYS_getpriority 100 - /* 101 is obsolete osend */ - /* 102 is obsolete orecv */ + /* 101 is old send */ + /* 102 is old recv */ /* 103 is old freebsd32_sigreturn */ #define FREEBSD32_SYS_bind 104 #define FREEBSD32_SYS_setsockopt 105 @@ -143,23 +143,23 @@ #define FREEBSD32_SYS_freebsd32_utimes 138 /* 139 is obsolete 4.2 sigreturn */ #define FREEBSD32_SYS_freebsd32_adjtime 140 - /* 141 is obsolete ogetpeername */ - /* 142 is obsolete ogethostid */ + /* 141 is old getpeername */ + /* 142 is old gethostid */ /* 143 is obsolete sethostid */ - /* 144 is obsolete getrlimit */ - /* 145 is obsolete setrlimit */ - /* 146 is obsolete killpg */ + /* 144 is old getrlimit */ + /* 145 is old setrlimit */ + /* 146 is old killpg */ #define FREEBSD32_SYS_setsid 147 #define FREEBSD32_SYS_quotactl 148 - /* 149 is obsolete oquota */ - /* 150 is obsolete ogetsockname */ + /* 149 is old quota */ + /* 150 is old getsockname */ /* 156 is old freebsd32_getdirentries */ /* 157 is freebsd4 freebsd32_statfs */ /* 158 is freebsd4 freebsd32_fstatfs */ #define FREEBSD32_SYS_getfh 161 - /* 162 is obsolete getdomainname */ - /* 163 is obsolete setdomainname */ - /* 164 is obsolete uname */ + /* 162 is freebsd4 getdomainname */ + /* 163 is freebsd4 setdomainname */ + /* 164 is freebsd4 uname */ #define FREEBSD32_SYS_freebsd32_sysarch 165 #define FREEBSD32_SYS_rtprio 166 #define FREEBSD32_SYS_freebsd32_semsys 169 @@ -167,6 +167,7 @@ #define FREEBSD32_SYS_freebsd32_shmsys 171 /* 173 is freebsd6 freebsd32_pread */ /* 174 is freebsd6 freebsd32_pwrite */ +#define FREEBSD32_SYS_setfib 175 #define FREEBSD32_SYS_freebsd32_ntp_adjtime 176 #define FREEBSD32_SYS_setgid 181 #define FREEBSD32_SYS_setegid 182 @@ -347,6 +348,7 @@ #define FREEBSD32_SYS_freebsd32_getcontext 421 #define FREEBSD32_SYS_freebsd32_setcontext 422 #define FREEBSD32_SYS_freebsd32_swapcontext 423 +#define FREEBSD32_SYS_swapoff 424 #define FREEBSD32_SYS___acl_get_link 425 #define FREEBSD32_SYS___acl_set_link 426 #define FREEBSD32_SYS___acl_delete_link 427 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 3a2a515b9dc5..f2ef4bf97563 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -17,7 +17,7 @@ const char *freebsd32_syscallnames[] = { "open", /* 5 = open */ "close", /* 6 = close */ "freebsd32_wait4", /* 7 = freebsd32_wait4 */ - "obs_old", /* 8 = obsolete old creat */ + "compat.creat", /* 8 = old creat */ "link", /* 9 = link */ "unlink", /* 10 = unlink */ "obs_execv", /* 11 = obsolete execv */ @@ -93,11 +93,11 @@ const char *freebsd32_syscallnames[] = { "getpgrp", /* 81 = getpgrp */ "setpgid", /* 82 = setpgid */ "freebsd32_setitimer", /* 83 = freebsd32_setitimer */ - "obs_owait", /* 84 = obsolete owait */ + "compat.wait", /* 84 = old wait */ "swapon", /* 85 = swapon */ "freebsd32_getitimer", /* 86 = freebsd32_getitimer */ - "obs_ogethostname", /* 87 = obsolete ogethostname */ - "obs_osethostname", /* 88 = obsolete osethostname */ + "compat.gethostname", /* 87 = old gethostname */ + "compat.sethostname", /* 88 = old sethostname */ "getdtablesize", /* 89 = getdtablesize */ "dup2", /* 90 = dup2 */ "#91", /* 91 = getdopt */ @@ -108,10 +108,10 @@ const char *freebsd32_syscallnames[] = { "setpriority", /* 96 = setpriority */ "socket", /* 97 = socket */ "connect", /* 98 = connect */ - "obs_oaccept", /* 99 = obsolete oaccept */ + "compat.accept", /* 99 = old accept */ "getpriority", /* 100 = getpriority */ - "obs_osend", /* 101 = obsolete osend */ - "obs_orecv", /* 102 = obsolete orecv */ + "compat.send", /* 101 = old send */ + "compat.recv", /* 102 = old recv */ "compat.freebsd32_sigreturn", /* 103 = old freebsd32_sigreturn */ "bind", /* 104 = bind */ "setsockopt", /* 105 = setsockopt */ @@ -150,16 +150,16 @@ const char *freebsd32_syscallnames[] = { "freebsd32_utimes", /* 138 = freebsd32_utimes */ "obs_4.2", /* 139 = obsolete 4.2 sigreturn */ "freebsd32_adjtime", /* 140 = freebsd32_adjtime */ - "obs_ogetpeername", /* 141 = obsolete ogetpeername */ - "obs_ogethostid", /* 142 = obsolete ogethostid */ + "compat.getpeername", /* 141 = old getpeername */ + "compat.gethostid", /* 142 = old gethostid */ "obs_sethostid", /* 143 = obsolete sethostid */ - "obs_getrlimit", /* 144 = obsolete getrlimit */ - "obs_setrlimit", /* 145 = obsolete setrlimit */ - "obs_killpg", /* 146 = obsolete killpg */ + "compat.getrlimit", /* 144 = old getrlimit */ + "compat.setrlimit", /* 145 = old setrlimit */ + "compat.killpg", /* 146 = old killpg */ "setsid", /* 147 = setsid */ "quotactl", /* 148 = quotactl */ - "obs_oquota", /* 149 = obsolete oquota */ - "obs_ogetsockname", /* 150 = obsolete ogetsockname */ + "compat.quota", /* 149 = old quota */ + "compat.getsockname", /* 150 = old getsockname */ "#151", /* 151 = sem_lock */ "#152", /* 152 = sem_wakeup */ "#153", /* 153 = asyncdaemon */ @@ -171,9 +171,9 @@ const char *freebsd32_syscallnames[] = { "#159", /* 159 = nosys */ "#160", /* 160 = lgetfh */ "getfh", /* 161 = getfh */ - "obs_getdomainname", /* 162 = obsolete getdomainname */ - "obs_setdomainname", /* 163 = obsolete setdomainname */ - "obs_uname", /* 164 = obsolete uname */ + "compat4.getdomainname", /* 162 = freebsd4 getdomainname */ + "compat4.setdomainname", /* 163 = freebsd4 setdomainname */ + "compat4.uname", /* 164 = freebsd4 uname */ "freebsd32_sysarch", /* 165 = freebsd32_sysarch */ "rtprio", /* 166 = rtprio */ "#167", /* 167 = nosys */ @@ -184,7 +184,7 @@ const char *freebsd32_syscallnames[] = { "#172", /* 172 = nosys */ "compat6.freebsd32_pread", /* 173 = freebsd6 freebsd32_pread */ "compat6.freebsd32_pwrite", /* 174 = freebsd6 freebsd32_pwrite */ - "#175", /* 175 = nosys */ + "setfib", /* 175 = setfib */ "freebsd32_ntp_adjtime", /* 176 = freebsd32_ntp_adjtime */ "#177", /* 177 = sfork */ "#178", /* 178 = getdescriptor */ @@ -433,7 +433,7 @@ const char *freebsd32_syscallnames[] = { "freebsd32_getcontext", /* 421 = freebsd32_getcontext */ "freebsd32_setcontext", /* 422 = freebsd32_setcontext */ "freebsd32_swapcontext", /* 423 = freebsd32_swapcontext */ - "#424", /* 424 = swapoff */ + "swapoff", /* 424 = swapoff */ "__acl_get_link", /* 425 = __acl_get_link */ "__acl_set_link", /* 426 = __acl_set_link */ "__acl_delete_link", /* 427 = __acl_delete_link */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 806d0437884a..4e5e91c372ff 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -70,7 +70,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(open_args), .sy_call = (sy_call_t *)sys_open, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 5 = open */ { .sy_narg = AS(close_args), .sy_call = (sy_call_t *)sys_close, .sy_auevent = AUE_CLOSE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 6 = close */ { .sy_narg = AS(freebsd32_wait4_args), .sy_call = (sy_call_t *)freebsd32_wait4, .sy_auevent = AUE_WAIT4, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 7 = freebsd32_wait4 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 8 = obsolete old creat */ + { compat(AS(ocreat_args),creat), .sy_auevent = AUE_CREAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 8 = old creat */ { .sy_narg = AS(link_args), .sy_call = (sy_call_t *)sys_link, .sy_auevent = AUE_LINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 9 = link */ { .sy_narg = AS(unlink_args), .sy_call = (sy_call_t *)sys_unlink, .sy_auevent = AUE_UNLINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 10 = unlink */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 11 = obsolete execv */ @@ -146,11 +146,11 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getpgrp, .sy_auevent = AUE_GETPGRP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 81 = getpgrp */ { .sy_narg = AS(setpgid_args), .sy_call = (sy_call_t *)sys_setpgid, .sy_auevent = AUE_SETPGRP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 82 = setpgid */ { .sy_narg = AS(freebsd32_setitimer_args), .sy_call = (sy_call_t *)freebsd32_setitimer, .sy_auevent = AUE_SETITIMER, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 83 = freebsd32_setitimer */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 84 = obsolete owait */ + { compat(0,wait), .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 84 = old wait */ { .sy_narg = AS(swapon_args), .sy_call = (sy_call_t *)sys_swapon, .sy_auevent = AUE_SWAPON, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 85 = swapon */ { .sy_narg = AS(freebsd32_getitimer_args), .sy_call = (sy_call_t *)freebsd32_getitimer, .sy_auevent = AUE_GETITIMER, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 86 = freebsd32_getitimer */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 87 = obsolete ogethostname */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 88 = obsolete osethostname */ + { compat(AS(ogethostname_args),gethostname), .sy_auevent = AUE_O_GETHOSTNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 87 = old gethostname */ + { compat(AS(osethostname_args),sethostname), .sy_auevent = AUE_O_SETHOSTNAME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 88 = old sethostname */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getdtablesize, .sy_auevent = AUE_GETDTABLESIZE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 89 = getdtablesize */ { .sy_narg = AS(dup2_args), .sy_call = (sy_call_t *)sys_dup2, .sy_auevent = AUE_DUP2, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 90 = dup2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 91 = getdopt */ @@ -161,10 +161,10 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(setpriority_args), .sy_call = (sy_call_t *)sys_setpriority, .sy_auevent = AUE_SETPRIORITY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 96 = setpriority */ { .sy_narg = AS(socket_args), .sy_call = (sy_call_t *)sys_socket, .sy_auevent = AUE_SOCKET, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 97 = socket */ { .sy_narg = AS(connect_args), .sy_call = (sy_call_t *)sys_connect, .sy_auevent = AUE_CONNECT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 98 = connect */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 99 = obsolete oaccept */ + { compat(AS(oaccept_args),accept), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 99 = old accept */ { .sy_narg = AS(getpriority_args), .sy_call = (sy_call_t *)sys_getpriority, .sy_auevent = AUE_GETPRIORITY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 100 = getpriority */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 101 = obsolete osend */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 102 = obsolete orecv */ + { compat(AS(osend_args),send), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 101 = old send */ + { compat(AS(orecv_args),recv), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 102 = old recv */ { compat(AS(ofreebsd32_sigreturn_args),freebsd32_sigreturn), .sy_auevent = AUE_SIGRETURN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 103 = old freebsd32_sigreturn */ { .sy_narg = AS(bind_args), .sy_call = (sy_call_t *)sys_bind, .sy_auevent = AUE_BIND, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 104 = bind */ { .sy_narg = AS(setsockopt_args), .sy_call = (sy_call_t *)sys_setsockopt, .sy_auevent = AUE_SETSOCKOPT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 105 = setsockopt */ @@ -203,16 +203,16 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_utimes_args), .sy_call = (sy_call_t *)freebsd32_utimes, .sy_auevent = AUE_UTIMES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 138 = freebsd32_utimes */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 139 = obsolete 4.2 sigreturn */ { .sy_narg = AS(freebsd32_adjtime_args), .sy_call = (sy_call_t *)freebsd32_adjtime, .sy_auevent = AUE_ADJTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 140 = freebsd32_adjtime */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 141 = obsolete ogetpeername */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 142 = obsolete ogethostid */ + { compat(AS(ogetpeername_args),getpeername), .sy_auevent = AUE_GETPEERNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 141 = old getpeername */ + { compat(0,gethostid), .sy_auevent = AUE_SYSCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 142 = old gethostid */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 143 = obsolete sethostid */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 144 = obsolete getrlimit */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 145 = obsolete setrlimit */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 146 = obsolete killpg */ + { compat(AS(ogetrlimit_args),getrlimit), .sy_auevent = AUE_GETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 144 = old getrlimit */ + { compat(AS(osetrlimit_args),setrlimit), .sy_auevent = AUE_SETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 145 = old setrlimit */ + { compat(AS(okillpg_args),killpg), .sy_auevent = AUE_KILLPG, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 146 = old killpg */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_setsid, .sy_auevent = AUE_SETSID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 147 = setsid */ { .sy_narg = AS(quotactl_args), .sy_call = (sy_call_t *)sys_quotactl, .sy_auevent = AUE_QUOTACTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 148 = quotactl */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 149 = obsolete oquota */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 150 = obsolete ogetsockname */ + { compat(0,quota), .sy_auevent = AUE_O_QUOTA, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 149 = old quota */ + { compat(0,getsockname), .sy_auevent = AUE_GETSOCKNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 150 = old getsockname */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 151 = sem_lock */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 152 = sem_wakeup */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 153 = asyncdaemon */ @@ -224,9 +224,9 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 159 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 160 = lgetfh */ { .sy_narg = AS(getfh_args), .sy_call = (sy_call_t *)sys_getfh, .sy_auevent = AUE_NFS_GETFH, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 161 = getfh */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 162 = obsolete getdomainname */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 163 = obsolete setdomainname */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 164 = obsolete uname */ + { compat4(AS(freebsd4_getdomainname_args),getdomainname), .sy_auevent = AUE_SYSCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 162 = freebsd4 getdomainname */ + { compat4(AS(freebsd4_setdomainname_args),setdomainname), .sy_auevent = AUE_SYSCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 163 = freebsd4 setdomainname */ + { compat4(AS(freebsd4_uname_args),uname), .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 164 = freebsd4 uname */ { .sy_narg = AS(freebsd32_sysarch_args), .sy_call = (sy_call_t *)freebsd32_sysarch, .sy_auevent = AUE_SYSARCH, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 165 = freebsd32_sysarch */ { .sy_narg = AS(rtprio_args), .sy_call = (sy_call_t *)sys_rtprio, .sy_auevent = AUE_RTPRIO, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 166 = rtprio */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 167 = nosys */ @@ -237,7 +237,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 172 = nosys */ { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), .sy_auevent = AUE_PREAD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 173 = freebsd6 freebsd32_pread */ { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), .sy_auevent = AUE_PWRITE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 174 = freebsd6 freebsd32_pwrite */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 175 = nosys */ + { .sy_narg = AS(setfib_args), .sy_call = (sy_call_t *)sys_setfib, .sy_auevent = AUE_SETFIB, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 175 = setfib */ { .sy_narg = AS(freebsd32_ntp_adjtime_args), .sy_call = (sy_call_t *)freebsd32_ntp_adjtime, .sy_auevent = AUE_NTP_ADJTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 176 = freebsd32_ntp_adjtime */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 177 = sfork */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 178 = getdescriptor */ @@ -486,7 +486,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_getcontext_args), .sy_call = (sy_call_t *)freebsd32_getcontext, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 421 = freebsd32_getcontext */ { .sy_narg = AS(freebsd32_setcontext_args), .sy_call = (sy_call_t *)freebsd32_setcontext, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 422 = freebsd32_setcontext */ { .sy_narg = AS(freebsd32_swapcontext_args), .sy_call = (sy_call_t *)freebsd32_swapcontext, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 423 = freebsd32_swapcontext */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 424 = swapoff */ + { .sy_narg = AS(swapoff_args), .sy_call = (sy_call_t *)sys_swapoff, .sy_auevent = AUE_SWAPOFF, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 424 = swapoff */ { .sy_narg = AS(__acl_get_link_args), .sy_call = (sy_call_t *)sys___acl_get_link, .sy_auevent = AUE_ACL_GET_LINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 425 = __acl_get_link */ { .sy_narg = AS(__acl_set_link_args), .sy_call = (sy_call_t *)sys___acl_set_link, .sy_auevent = AUE_ACL_SET_LINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 426 = __acl_set_link */ { .sy_narg = AS(__acl_delete_link_args), .sy_call = (sy_call_t *)sys___acl_delete_link, .sy_auevent = AUE_ACL_DELETE_LINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 427 = __acl_delete_link */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 21d59a5fdfd9..69e510fddc0a 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -870,6 +870,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 4; break; } + /* setfib */ + case 175: { + struct setfib_args *p = params; + iarg[0] = p->fibnum; /* int */ + *n_args = 1; + break; + } /* freebsd32_ntp_adjtime */ case 176: { struct freebsd32_ntp_adjtime_args *p = params; @@ -1973,6 +1980,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 2; break; } + /* swapoff */ + case 424: { + struct swapoff_args *p = params; + uarg[0] = (intptr_t)p->name; /* const char * */ + *n_args = 1; + break; + } /* __acl_get_link */ case 425: { struct __acl_get_link_args *p = params; @@ -4823,6 +4837,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* setfib */ + case 175: + switch (ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; /* freebsd32_ntp_adjtime */ case 176: switch (ndx) { @@ -6587,6 +6611,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* swapoff */ + case 424: + switch (ndx) { + case 0: + p = "userland const char *"; + break; + default: + break; + }; + break; /* __acl_get_link */ case 425: switch (ndx) { @@ -9721,6 +9755,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* setfib */ + case 175: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* freebsd32_ntp_adjtime */ case 176: if (ndx == 0 || ndx == 1) @@ -10368,6 +10407,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* swapoff */ + case 424: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* __acl_get_link */ case 425: if (ndx == 0 || ndx == 1) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index c9cac48f7ac4..4dce7def6b4a 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -78,7 +78,8 @@ 6 AUE_CLOSE NOPROTO { int close(int fd); } 7 AUE_WAIT4 STD { int freebsd32_wait4(int pid, int *status, \ int options, struct rusage32 *rusage); } -8 AUE_CREAT OBSOL old creat +8 AUE_CREAT COMPAT|NOPROTO { int creat(const char *path, \ + int mode); } 9 AUE_LINK NOPROTO { int link(const char *path, \ const char *link); } 10 AUE_UNLINK NOPROTO { int unlink(const char *path); } @@ -195,13 +196,15 @@ 83 AUE_SETITIMER STD { int freebsd32_setitimer(int which, \ const struct itimerval32 *itv, \ struct itimerval32 *oitv); } -84 AUE_NULL OBSOL owait +84 AUE_NULL COMPAT|NOPROTO { int wait(void); } ; XXX implement 85 AUE_SWAPON NOPROTO { int swapon(const char *name); } 86 AUE_GETITIMER STD { int freebsd32_getitimer(int which, \ struct itimerval32 *itv); } -87 AUE_O_GETHOSTNAME OBSOL ogethostname -88 AUE_O_SETHOSTNAME OBSOL osethostname +87 AUE_O_GETHOSTNAME COMPAT|NOPROTO { int gethostname( \ + char *hostname, u_int len); } +88 AUE_O_SETHOSTNAME COMPAT|NOPROTO { int sethostname( \ + char *hostname, u_int len); } 89 AUE_GETDTABLESIZE NOPROTO { int getdtablesize(void); } 90 AUE_DUP2 NOPROTO { int dup2(u_int from, u_int to); } 91 AUE_NULL UNIMPL getdopt @@ -219,10 +222,14 @@ 98 AUE_CONNECT NOPROTO { int connect(int s, \ const struct sockaddr *name, \ int namelen); } -99 AUE_NULL OBSOL oaccept +99 AUE_NULL COMPAT|NOPROTO { int accept(int s, \ + struct sockaddr *name, \ + __socklen_t *anamelen); } 100 AUE_GETPRIORITY NOPROTO { int getpriority(int which, int who); } -101 AUE_NULL OBSOL osend -102 AUE_NULL OBSOL orecv +101 AUE_NULL COMPAT|NOPROTO { int send(int s, const void *buf, \ + int len, int flags); } +102 AUE_NULL COMPAT|NOPROTO { int recv(int s, void *buf, int len, \ + int flags); } 103 AUE_SIGRETURN COMPAT { int freebsd32_sigreturn( \ struct ia32_sigcontext3 *sigcntxp); } 104 AUE_BIND NOPROTO { int bind(int s, const struct sockaddr *name, \ @@ -285,17 +292,21 @@ 140 AUE_ADJTIME STD { int freebsd32_adjtime( \ const struct timeval32 *delta, \ struct timeval32 *olddelta); } -141 AUE_GETPEERNAME OBSOL ogetpeername -142 AUE_SYSCTL OBSOL ogethostid +141 AUE_GETPEERNAME COMPAT|NOPROTO { int getpeername(int fdes, \ + struct sockaddr *asa, \ + __socklen_t *alen); } +142 AUE_SYSCTL COMPAT|NOPROTO { long gethostid(void); } 143 AUE_SYSCTL OBSOL sethostid -144 AUE_GETRLIMIT OBSOL getrlimit -145 AUE_SETRLIMIT OBSOL setrlimit -146 AUE_KILLPG OBSOL killpg +144 AUE_GETRLIMIT COMPAT|NOPROTO { int getrlimit(u_int which, \ + struct orlimit *rlp); } +145 AUE_SETRLIMIT COMPAT|NOPROTO { int setrlimit(u_int which, \ + struct orlimit *rlp); } +146 AUE_KILLPG COMPAT|NOPROTO { int killpg(int pgid, int signum); } 147 AUE_SETSID NOPROTO { int setsid(void); } 148 AUE_QUOTACTL NOPROTO { int quotactl(const char *path, int cmd, \ int uid, void *arg); } -149 AUE_O_QUOTA OBSOL oquota -150 AUE_GETSOCKNAME OBSOL ogetsockname +149 AUE_O_QUOTA COMPAT|NOPROTO { int quota(void); } +150 AUE_GETSOCKNAME COMPAT|NOPROTO getsockname ; Syscalls 151-180 inclusive are reserved for vendor-specific ; system calls. (This includes various calls added for compatibity @@ -319,9 +330,11 @@ 160 AUE_LGETFH UNIMPL lgetfh 161 AUE_NFS_GETFH NOPROTO { int getfh(const char *fname, \ struct fhandle *fhp); } -162 AUE_SYSCTL OBSOL getdomainname -163 AUE_SYSCTL OBSOL setdomainname -164 AUE_NULL OBSOL uname +162 AUE_SYSCTL COMPAT4|NOPROTO { int getdomainname(char *domainname, \ + int len); } +163 AUE_SYSCTL COMPAT4|NOPROTO { int setdomainname(char *domainname, \ + int len); } +164 AUE_NULL COMPAT4|NOPROTO { int uname(struct utsname *name); } 165 AUE_SYSARCH STD { int freebsd32_sysarch(int op, char *parms); } 166 AUE_RTPRIO NOPROTO { int rtprio(int function, pid_t pid, \ struct rtprio *rtp); } @@ -340,7 +353,7 @@ 174 AUE_PWRITE COMPAT6 { ssize_t freebsd32_pwrite(int fd, \ const void *buf, size_t nbyte, int pad, \ uint32_t offset1, uint32_t offset2); } -175 AUE_NULL UNIMPL nosys +175 AUE_SETFIB NOPROTO { int setfib(int fibnum); } 176 AUE_NTP_ADJTIME STD { int freebsd32_ntp_adjtime( \ struct timex32 *tp); } 177 AUE_NULL UNIMPL sfork (BSD/OS 2.x) @@ -771,7 +784,7 @@ 423 AUE_NULL STD { int freebsd32_swapcontext( \ struct __ucontext32 *oucp, \ const struct __ucontext32 *ucp); } -424 AUE_SWAPOFF UNIMPL swapoff +424 AUE_SWAPOFF NOPROTO { int swapoff(const char *name); } 425 AUE_ACL_GET_LINK NOPROTO { int __acl_get_link(const char *path, \ acl_type_t type, struct acl *aclp); } 426 AUE_ACL_SET_LINK NOPROTO { int __acl_set_link(const char *path, \ From nobody Wed Nov 17 20:22:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9B1DB18552BB; Wed, 17 Nov 2021 20:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9Y4vxLz4rMB; Wed, 17 Nov 2021 20:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E386B277FB; Wed, 17 Nov 2021 20:22: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 1AHKMdFi060015; Wed, 17 Nov 2021 20:22:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMdNe060014; Wed, 17 Nov 2021 20:22:39 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:39 GMT Message-Id: <202111172022.1AHKMdNe060014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e3e811a3f824 - main - freebsd32: add feed foward clock syscalls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3e811a3f824ad839e9c33ae8c0e3d2165fc1911 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e3e811a3f824ad839e9c33ae8c0e3d2165fc1911 commit e3e811a3f824ad839e9c33ae8c0e3d2165fc1911 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:25 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:25 +0000 freebsd32: add feed foward clock syscalls These are required when supporting i386 because time_t is 32-bit which reduces struct bintime to 12-bytes when combined with the fact that 64-bit integers only requiring 32-bit alignment on i386. Reusing the default ABI version resulted in 4-byte overreads or overwrites to userspace. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32.h | 23 +++++++ sys/compat/freebsd32/freebsd32_misc.c | 84 ++++++++++++++++++++++++++ sys/compat/freebsd32/freebsd32_proto.h | 10 +++ sys/compat/freebsd32/freebsd32_syscall.h | 4 +- sys/compat/freebsd32/freebsd32_syscalls.c | 4 +- sys/compat/freebsd32/freebsd32_sysent.c | 4 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 24 ++++---- sys/compat/freebsd32/syscalls.master | 8 +-- 8 files changed, 139 insertions(+), 22 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 6f219d0f733f..65e4726b3de6 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -35,6 +35,7 @@ #include #include #include +#include /* * i386 is the only arch with a 32-bit time_t @@ -65,6 +66,28 @@ struct bintime32 { uint32_t frac[2]; }; +struct ffclock_estimate32 { + struct bintime32 update_time; + ffcounter update_ffcount; + ffcounter leapsec_next; + uint64_t period; + uint32_t errb_abs; + uint32_t errb_rate; + uint32_t status; + int16_t leapsec_total; + int8_t leapsec; + int8_t _pad; +} +#if defined(__amd64__) +__attribute__((packed)) +#endif +; +#if defined(__amd64__) +_Static_assert(sizeof(struct ffclock_estimate32) == 52, "ffclock_estimate32 size"); +#else +_Static_assert(sizeof(struct ffclock_estimate32) == 56, "ffclock_estimate32 size"); +#endif + struct rusage32 { struct timeval32 ru_utime; struct timeval32 ru_stime; diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index e2fb6fae1aa9..528180dbd063 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -29,6 +29,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_ffclock.h" #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ktrace.h" @@ -61,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -91,6 +93,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef KTRACE #include #endif @@ -3741,6 +3744,87 @@ freebsd32_ntp_adjtime(struct thread *td, struct freebsd32_ntp_adjtime_args *uap) return (error); } +#ifdef FFCLOCK +extern struct mtx ffclock_mtx; +extern struct ffclock_estimate ffclock_estimate; +extern int8_t ffclock_updated; + +int +freebsd32_ffclock_setestimate(struct thread *td, + struct freebsd32_ffclock_setestimate_args *uap) +{ + struct ffclock_estimate cest; + struct ffclock_estimate32 cest32; + int error; + + /* Reuse of PRIV_CLOCK_SETTIME. */ + if ((error = priv_check(td, PRIV_CLOCK_SETTIME)) != 0) + return (error); + + if ((error = copyin(uap->cest, &cest32, + sizeof(struct ffclock_estimate32))) != 0) + return (error); + + CP(cest.update_time, cest32.update_time, sec); + memcpy(&cest.update_time.frac, &cest32.update_time.frac, sizeof(uint64_t)); + CP(cest, cest32, update_ffcount); + CP(cest, cest32, leapsec_next); + CP(cest, cest32, period); + CP(cest, cest32, errb_abs); + CP(cest, cest32, errb_rate); + CP(cest, cest32, status); + CP(cest, cest32, leapsec_total); + CP(cest, cest32, leapsec); + + mtx_lock(&ffclock_mtx); + memcpy(&ffclock_estimate, &cest, sizeof(struct ffclock_estimate)); + ffclock_updated++; + mtx_unlock(&ffclock_mtx); + return (error); +} + +int +freebsd32_ffclock_getestimate(struct thread *td, + struct freebsd32_ffclock_getestimate_args *uap) +{ + struct ffclock_estimate cest; + struct ffclock_estimate32 cest32; + int error; + + mtx_lock(&ffclock_mtx); + memcpy(&cest, &ffclock_estimate, sizeof(struct ffclock_estimate)); + mtx_unlock(&ffclock_mtx); + + CP(cest32.update_time, cest.update_time, sec); + memcpy(&cest32.update_time.frac, &cest.update_time.frac, sizeof(uint64_t)); + CP(cest32, cest, update_ffcount); + CP(cest32, cest, leapsec_next); + CP(cest32, cest, period); + CP(cest32, cest, errb_abs); + CP(cest32, cest, errb_rate); + CP(cest32, cest, status); + CP(cest32, cest, leapsec_total); + CP(cest32, cest, leapsec); + + error = copyout(&cest32, uap->cest, sizeof(struct ffclock_estimate32)); + return (error); +} +#else /* !FFCLOCK */ +int +freebsd32_ffclock_setestimate(struct thread *td, + struct freebsd32_ffclock_setestimate_args *uap) +{ + return (ENOSYS); +} + +int +freebsd32_ffclock_getestimate(struct thread *td, + struct freebsd32_ffclock_getestimate_args *uap) +{ + return (ENOSYS); +} +#endif /* FFCLOCK */ + int freebsd32_fspacectl(struct thread *td, struct freebsd32_fspacectl_args *uap) { diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 92d1408a539f..aab791780818 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -213,6 +213,12 @@ struct freebsd32_nanosleep_args { char rqtp_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * rqtp; char rqtp_r_[PADR_(const struct timespec32 *)]; char rmtp_l_[PADL_(struct timespec32 *)]; struct timespec32 * rmtp; char rmtp_r_[PADR_(struct timespec32 *)]; }; +struct freebsd32_ffclock_setestimate_args { + char cest_l_[PADL_(struct ffclock_estimate32 *)]; struct ffclock_estimate32 * cest; char cest_r_[PADR_(struct ffclock_estimate32 *)]; +}; +struct freebsd32_ffclock_getestimate_args { + char cest_l_[PADL_(struct ffclock_estimate32 *)]; struct ffclock_estimate32 * cest; char cest_r_[PADR_(struct ffclock_estimate32 *)]; +}; struct freebsd32_clock_nanosleep_args { char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -782,6 +788,8 @@ int freebsd32_ktimer_create(struct thread *, struct freebsd32_ktimer_create_args int freebsd32_ktimer_settime(struct thread *, struct freebsd32_ktimer_settime_args *); int freebsd32_ktimer_gettime(struct thread *, struct freebsd32_ktimer_gettime_args *); int freebsd32_nanosleep(struct thread *, struct freebsd32_nanosleep_args *); +int freebsd32_ffclock_setestimate(struct thread *, struct freebsd32_ffclock_setestimate_args *); +int freebsd32_ffclock_getestimate(struct thread *, struct freebsd32_ffclock_getestimate_args *); int freebsd32_clock_nanosleep(struct thread *, struct freebsd32_clock_nanosleep_args *); int freebsd32_clock_getcpuclockid2(struct thread *, struct freebsd32_clock_getcpuclockid2_args *); int freebsd32_aio_read(struct thread *, struct freebsd32_aio_read_args *); @@ -1351,6 +1359,8 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_ktimer_settime AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_ktimer_gettime AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_nanosleep AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_ffclock_setestimate AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_ffclock_getestimate AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_clock_nanosleep AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_clock_getcpuclockid2 AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_aio_read AUE_AIO_READ diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 2e65581b5a27..169615446373 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -218,8 +218,8 @@ #define FREEBSD32_SYS_ktimer_getoverrun 239 #define FREEBSD32_SYS_freebsd32_nanosleep 240 #define FREEBSD32_SYS_ffclock_getcounter 241 -#define FREEBSD32_SYS_ffclock_setestimate 242 -#define FREEBSD32_SYS_ffclock_getestimate 243 +#define FREEBSD32_SYS_freebsd32_ffclock_setestimate 242 +#define FREEBSD32_SYS_freebsd32_ffclock_getestimate 243 #define FREEBSD32_SYS_freebsd32_clock_nanosleep 244 #define FREEBSD32_SYS_freebsd32_clock_getcpuclockid2 247 #define FREEBSD32_SYS_minherit 250 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index f2ef4bf97563..8277b29843f0 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -251,8 +251,8 @@ const char *freebsd32_syscallnames[] = { "ktimer_getoverrun", /* 239 = ktimer_getoverrun */ "freebsd32_nanosleep", /* 240 = freebsd32_nanosleep */ "ffclock_getcounter", /* 241 = ffclock_getcounter */ - "ffclock_setestimate", /* 242 = ffclock_setestimate */ - "ffclock_getestimate", /* 243 = ffclock_getestimate */ + "freebsd32_ffclock_setestimate", /* 242 = freebsd32_ffclock_setestimate */ + "freebsd32_ffclock_getestimate", /* 243 = freebsd32_ffclock_getestimate */ "freebsd32_clock_nanosleep", /* 244 = freebsd32_clock_nanosleep */ "#245", /* 245 = nosys */ "#246", /* 246 = nosys */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 4e5e91c372ff..808e01fd3afd 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -304,8 +304,8 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(ktimer_getoverrun_args), .sy_call = (sy_call_t *)sys_ktimer_getoverrun, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 239 = ktimer_getoverrun */ { .sy_narg = AS(freebsd32_nanosleep_args), .sy_call = (sy_call_t *)freebsd32_nanosleep, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 240 = freebsd32_nanosleep */ { .sy_narg = AS(ffclock_getcounter_args), .sy_call = (sy_call_t *)sys_ffclock_getcounter, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 241 = ffclock_getcounter */ - { .sy_narg = AS(ffclock_setestimate_args), .sy_call = (sy_call_t *)sys_ffclock_setestimate, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 242 = ffclock_setestimate */ - { .sy_narg = AS(ffclock_getestimate_args), .sy_call = (sy_call_t *)sys_ffclock_getestimate, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 243 = ffclock_getestimate */ + { .sy_narg = AS(freebsd32_ffclock_setestimate_args), .sy_call = (sy_call_t *)freebsd32_ffclock_setestimate, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 242 = freebsd32_ffclock_setestimate */ + { .sy_narg = AS(freebsd32_ffclock_getestimate_args), .sy_call = (sy_call_t *)freebsd32_ffclock_getestimate, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 243 = freebsd32_ffclock_getestimate */ { .sy_narg = AS(freebsd32_clock_nanosleep_args), .sy_call = (sy_call_t *)freebsd32_clock_nanosleep, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 244 = freebsd32_clock_nanosleep */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 245 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 246 = nosys */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 69e510fddc0a..f4695b07d422 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1203,17 +1203,17 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 1; break; } - /* ffclock_setestimate */ + /* freebsd32_ffclock_setestimate */ case 242: { - struct ffclock_setestimate_args *p = params; - uarg[0] = (intptr_t)p->cest; /* struct ffclock_estimate * */ + struct freebsd32_ffclock_setestimate_args *p = params; + uarg[0] = (intptr_t)p->cest; /* struct ffclock_estimate32 * */ *n_args = 1; break; } - /* ffclock_getestimate */ + /* freebsd32_ffclock_getestimate */ case 243: { - struct ffclock_getestimate_args *p = params; - uarg[0] = (intptr_t)p->cest; /* struct ffclock_estimate * */ + struct freebsd32_ffclock_getestimate_args *p = params; + uarg[0] = (intptr_t)p->cest; /* struct ffclock_estimate32 * */ *n_args = 1; break; } @@ -5330,21 +5330,21 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* ffclock_setestimate */ + /* freebsd32_ffclock_setestimate */ case 242: switch (ndx) { case 0: - p = "userland struct ffclock_estimate *"; + p = "userland struct ffclock_estimate32 *"; break; default: break; }; break; - /* ffclock_getestimate */ + /* freebsd32_ffclock_getestimate */ case 243: switch (ndx) { case 0: - p = "userland struct ffclock_estimate *"; + p = "userland struct ffclock_estimate32 *"; break; default: break; @@ -9947,12 +9947,12 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* ffclock_setestimate */ + /* freebsd32_ffclock_setestimate */ case 242: if (ndx == 0 || ndx == 1) p = "int"; break; - /* ffclock_getestimate */ + /* freebsd32_ffclock_getestimate */ case 243: if (ndx == 0 || ndx == 1) p = "int"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 4dce7def6b4a..90b93fbd64e8 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -475,10 +475,10 @@ const struct timespec32 *rqtp, \ struct timespec32 *rmtp); } 241 AUE_NULL NOPROTO { int ffclock_getcounter(ffcounter *ffcount); } -242 AUE_NULL NOPROTO { int ffclock_setestimate( \ - struct ffclock_estimate *cest); } -243 AUE_NULL NOPROTO { int ffclock_getestimate( \ - struct ffclock_estimate *cest); } +242 AUE_NULL STD { int freebsd32_ffclock_setestimate( \ + struct ffclock_estimate32 *cest); } +243 AUE_NULL STD { int freebsd32_ffclock_getestimate( \ + struct ffclock_estimate32 *cest); } 244 AUE_NULL STD { int freebsd32_clock_nanosleep( \ clockid_t clock_id, int flags, \ const struct timespec32 *rqtp, \ From nobody Wed Nov 17 20:22:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1A36C18552C5; Wed, 17 Nov 2021 20:22:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9b6yp0z4rDV; Wed, 17 Nov 2021 20:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C89827A10; Wed, 17 Nov 2021 20:22: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 1AHKMf5Y060039; Wed, 17 Nov 2021 20:22:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMfTs060038; Wed, 17 Nov 2021 20:22:41 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:41 GMT Message-Id: <202111172022.1AHKMfTs060038@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e02f64d9b88c - main - freebsd32: add real abort2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e02f64d9b88ce33313755f4a94c46a7839a23f10 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e02f64d9b88ce33313755f4a94c46a7839a23f10 commit e02f64d9b88ce33313755f4a94c46a7839a23f10 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:25 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:25 +0000 freebsd32: add real abort2 Previously, the code would copy twice as many pointers as specified and print pairs of them a single 64-bit pointer. abort2 doesn't return so make the return type void freebsd32_abort2 is in it's own file with a 2-clause BSD license based on a discussion with Wojciech many years ago. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_abort2.c | 69 ++++++++++++++++++++++++++ sys/compat/freebsd32/freebsd32_proto.h | 7 +++ sys/compat/freebsd32/freebsd32_syscall.h | 2 +- sys/compat/freebsd32/freebsd32_syscalls.c | 2 +- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 10 ++-- sys/compat/freebsd32/syscalls.master | 2 +- sys/conf/files | 1 + sys/kern/kern_exit.c | 52 ++++++++++++++----- sys/sys/syscallsubr.h | 2 + 10 files changed, 127 insertions(+), 22 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_abort2.c b/sys/compat/freebsd32/freebsd32_abort2.c new file mode 100644 index 000000000000..615dd5e95345 --- /dev/null +++ b/sys/compat/freebsd32/freebsd32_abort2.c @@ -0,0 +1,69 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2005 Wojciech A. Koszek + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include + +int +freebsd32_abort2(struct thread *td, struct freebsd32_abort2_args *uap) +{ + void *uargs[16]; + void *uargsp; + uint32_t *uargsptr; + uint32_t ptr; + int i, nargs; + + nargs = uap->nargs; + if (nargs < 0 || nargs > nitems(uargs)) + nargs = -1; + uargsp = NULL; + if (nargs > 0) { + if (uap->args != NULL) { + uargsptr = uap->args; + for (i = 0; i < nargs; i++) { + if (fueword32(uargsptr + i, &ptr) != 0) { + nargs = -1; + break; + } else + uargs[i] = (void *)(uintptr_t)ptr; + } + if (nargs > 0) + uargsp = &uargs; + } else + nargs = -1; + } + return (kern_abort2(td, uap->why, nargs, uargsp)); +} diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index aab791780818..f86fb5dfa96f 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -396,6 +396,11 @@ struct freebsd32_kmq_notify_args { char mqd_l_[PADL_(int)]; int mqd; char mqd_r_[PADR_(int)]; char sigev_l_[PADL_(const struct sigevent32 *)]; const struct sigevent32 * sigev; char sigev_r_[PADR_(const struct sigevent32 *)]; }; +struct freebsd32_abort2_args { + char why_l_[PADL_(const char *)]; const char * why; char why_r_[PADR_(const char *)]; + char nargs_l_[PADL_(int)]; int nargs; char nargs_r_[PADR_(int)]; + char args_l_[PADL_(uint32_t *)]; uint32_t * args; char args_r_[PADR_(uint32_t *)]; +}; struct freebsd32_aio_fsync_args { char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; @@ -827,6 +832,7 @@ int freebsd32_kmq_setattr(struct thread *, struct freebsd32_kmq_setattr_args *); int freebsd32_kmq_timedreceive(struct thread *, struct freebsd32_kmq_timedreceive_args *); int freebsd32_kmq_timedsend(struct thread *, struct freebsd32_kmq_timedsend_args *); int freebsd32_kmq_notify(struct thread *, struct freebsd32_kmq_notify_args *); +int freebsd32_abort2(struct thread *, struct freebsd32_abort2_args *); int freebsd32_aio_fsync(struct thread *, struct freebsd32_aio_fsync_args *); #ifdef PAD64_REQUIRED int freebsd32_pread(struct thread *, struct freebsd32_pread_args *); @@ -1409,6 +1415,7 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_kmq_timedreceive AUE_MQ_TIMEDRECEIVE #define FREEBSD32_SYS_AUE_freebsd32_kmq_timedsend AUE_MQ_TIMEDSEND #define FREEBSD32_SYS_AUE_freebsd32_kmq_notify AUE_MQ_NOTIFY +#define FREEBSD32_SYS_AUE_freebsd32_abort2 AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_aio_fsync AUE_AIO_FSYNC #define FREEBSD32_SYS_AUE_freebsd32_pread AUE_PREAD #define FREEBSD32_SYS_AUE_freebsd32_pwrite AUE_PWRITE diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 169615446373..c57cce7c5343 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -386,7 +386,7 @@ #define FREEBSD32_SYS_freebsd32_kmq_timedsend 460 #define FREEBSD32_SYS_freebsd32_kmq_notify 461 #define FREEBSD32_SYS_kmq_unlink 462 -#define FREEBSD32_SYS_abort2 463 +#define FREEBSD32_SYS_freebsd32_abort2 463 #define FREEBSD32_SYS_thr_set_name 464 #define FREEBSD32_SYS_freebsd32_aio_fsync 465 #define FREEBSD32_SYS_rtprio_thread 466 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 8277b29843f0..4ab6adb56b4a 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -472,7 +472,7 @@ const char *freebsd32_syscallnames[] = { "freebsd32_kmq_timedsend", /* 460 = freebsd32_kmq_timedsend */ "freebsd32_kmq_notify", /* 461 = freebsd32_kmq_notify */ "kmq_unlink", /* 462 = kmq_unlink */ - "abort2", /* 463 = abort2 */ + "freebsd32_abort2", /* 463 = freebsd32_abort2 */ "thr_set_name", /* 464 = thr_set_name */ "freebsd32_aio_fsync", /* 465 = freebsd32_aio_fsync */ "rtprio_thread", /* 466 = rtprio_thread */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 808e01fd3afd..c25ee1edaab7 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -525,7 +525,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_kmq_timedsend_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_ABSENT }, /* 460 = freebsd32_kmq_timedsend */ { .sy_narg = AS(freebsd32_kmq_notify_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_ABSENT }, /* 461 = freebsd32_kmq_notify */ { .sy_narg = AS(kmq_unlink_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 462 = kmq_unlink */ - { .sy_narg = AS(abort2_args), .sy_call = (sy_call_t *)sys_abort2, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 463 = abort2 */ + { .sy_narg = AS(freebsd32_abort2_args), .sy_call = (sy_call_t *)freebsd32_abort2, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 463 = freebsd32_abort2 */ { .sy_narg = AS(thr_set_name_args), .sy_call = (sy_call_t *)sys_thr_set_name, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 464 = thr_set_name */ { .sy_narg = AS(freebsd32_aio_fsync_args), .sy_call = (sy_call_t *)freebsd32_aio_fsync, .sy_auevent = AUE_AIO_FSYNC, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 465 = freebsd32_aio_fsync */ { .sy_narg = AS(rtprio_thread_args), .sy_call = (sy_call_t *)sys_rtprio_thread, .sy_auevent = AUE_RTPRIO, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 466 = rtprio_thread */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index f4695b07d422..98fb1dea15a8 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2271,9 +2271,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 1; break; } - /* abort2 */ + /* freebsd32_abort2 */ case 463: { - struct abort2_args *p = params; + struct freebsd32_abort2_args *p = params; uarg[0] = (intptr_t)p->why; /* const char * */ iarg[1] = p->nargs; /* int */ uarg[2] = (intptr_t)p->args; /* uint32_t * */ @@ -7099,7 +7099,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* abort2 */ + /* freebsd32_abort2 */ case 463: switch (ndx) { case 0: @@ -10582,10 +10582,10 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* abort2 */ + /* freebsd32_abort2 */ case 463: if (ndx == 0 || ndx == 1) - p = "int"; + p = "void"; break; /* thr_set_name */ case 464: diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 90b93fbd64e8..a85b72c7fb6e 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -860,7 +860,7 @@ 461 AUE_MQ_NOTIFY NOSTD { int freebsd32_kmq_notify(int mqd, \ const struct sigevent32 *sigev); } 462 AUE_MQ_UNLINK NOPROTO|NOSTD { int kmq_unlink(const char *path); } -463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, uint32_t *args); } +463 AUE_NULL STD { void freebsd32_abort2(const char *why, int nargs, uint32_t *args); } 464 AUE_NULL NOPROTO { int thr_set_name(int32_t id, const char *name); } 465 AUE_AIO_FSYNC STD { int freebsd32_aio_fsync(int op, \ struct aiocb32 *aiocbp); } diff --git a/sys/conf/files b/sys/conf/files index aceaac1bd95e..8854d827bcc3 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -379,6 +379,7 @@ cddl/dev/fbt/fbt.c optional dtrace_fbt | dtraceall compile-with "${FBT_C} cddl/dev/systrace/systrace.c optional dtrace_systrace | dtraceall compile-with "${CDDL_C}" cddl/dev/prototype.c optional dtrace_prototype | dtraceall compile-with "${CDDL_C}" fs/nfsclient/nfs_clkdtrace.c optional dtnfscl nfscl | dtraceall nfscl compile-with "${CDDL_C}" +compat/freebsd32/freebsd32_abort2.c optional compat_freebsd32 compat/freebsd32/freebsd32_capability.c optional compat_freebsd32 compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 14be2425511d..2f1cfb2a25d2 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -735,10 +735,41 @@ struct abort2_args { int sys_abort2(struct thread *td, struct abort2_args *uap) +{ + void *uargs[16]; + void **uargsp; + int error, nargs; + + nargs = uap->nargs; + if (nargs < 0 || nargs > nitems(uargs)) + nargs = -1; + uargsp = NULL; + if (nargs > 0) { + if (uap->args != NULL) { + error = copyin(uap->args, uargs, + nargs * sizeof(void *)); + if (error != 0) + nargs = -1; + else + uargsp = uargs; + } else + nargs = -1; + } + return (kern_abort2(td, uap->why, nargs, uargsp)); +} + +/* + * kern_abort2() + * Arguments: + * why - user pointer to why + * nargs - number of arguments copied or -1 if an error occured in copying + * args - pointer to an array of pointers in kernel format + */ +int +kern_abort2(struct thread *td, const char *why, int nargs, void **uargs) { struct proc *p = td->td_proc; struct sbuf *sb; - void *uargs[16]; int error, i, sig; /* @@ -756,29 +787,24 @@ sys_abort2(struct thread *td, struct abort2_args *uap) */ sig = SIGKILL; /* Prevent from DoSes from user-space. */ - if (uap->nargs < 0 || uap->nargs > 16) + if (nargs == -1) goto out; - if (uap->nargs > 0) { - if (uap->args == NULL) - goto out; - error = copyin(uap->args, uargs, uap->nargs * sizeof(void *)); - if (error != 0) - goto out; - } + KASSERT(nargs >= 0 && nargs <= 16, ("called with too many args (%d)", + nargs)); /* * Limit size of 'reason' string to 128. Will fit even when * maximal number of arguments was chosen to be logged. */ - if (uap->why != NULL) { - error = sbuf_copyin(sb, uap->why, 128); + if (why != NULL) { + error = sbuf_copyin(sb, why, 128); if (error < 0) goto out; } else { sbuf_printf(sb, "(null)"); } - if (uap->nargs > 0) { + if (nargs > 0) { sbuf_printf(sb, "("); - for (i = 0;i < uap->nargs; i++) + for (i = 0;i < nargs; i++) sbuf_printf(sb, "%s%p", i == 0 ? "" : ", ", uargs[i]); sbuf_printf(sb, ")"); } diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index a10c84cd2ab7..5032df4be874 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -81,6 +81,8 @@ struct mmap_req { int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, size_t buflen, size_t path_max); +int kern_abort2(struct thread *td, const char *why, int nargs, + void **uargs); int kern_accept(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, struct file **fp); int kern_accept4(struct thread *td, int s, struct sockaddr **name, From nobody Wed Nov 17 20:22:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 71F2918552EB; Wed, 17 Nov 2021 20:22: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 4HvZ9c3760z4r6G; Wed, 17 Nov 2021 20:22:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40E04276C9; Wed, 17 Nov 2021 20:22: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 1AHKMgDI060068; Wed, 17 Nov 2021 20:22:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMgE5060067; Wed, 17 Nov 2021 20:22:42 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:42 GMT Message-Id: <202111172022.1AHKMgE5060067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: f089a2f3d1a7 - main - freebsd32: add stubs for ofreebsd32_(send|recv)msg List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f089a2f3d1a7830d6efc2b32fdf3279db4b33280 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f089a2f3d1a7830d6efc2b32fdf3279db4b33280 commit f089a2f3d1a7830d6efc2b32fdf3279db4b33280 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:25 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:25 +0000 freebsd32: add stubs for ofreebsd32_(send|recv)msg The upcoming change to generate freebsd32 generated files from sys/kern/syscalls.master doesn't have a way to handle disabling this one without disabling the non-COMPAT counterpart so just add a stub for now. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 17 +++++++++++++++++ sys/compat/freebsd32/freebsd32_proto.h | 14 ++++++++++++++ sys/compat/freebsd32/freebsd32_syscall.h | 4 ++-- sys/compat/freebsd32/freebsd32_syscalls.c | 4 ++-- sys/compat/freebsd32/freebsd32_sysent.c | 4 ++-- sys/compat/freebsd32/syscalls.master | 6 ++++-- 6 files changed, 41 insertions(+), 8 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 528180dbd063..4e69dc99b3b2 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1458,6 +1458,14 @@ freebsd32_recvmsg(struct thread *td, struct freebsd32_recvmsg_args *uap) return (error); } +#ifdef COMPAT_43 +int +ofreebsd32_recvmsg(struct thread *td, struct ofreebsd32_recvmsg_args *uap) +{ + return (ENOSYS); +} +#endif + /* * Copy-in the array of control messages constructed using alignment * and padding suitable for a 32-bit environment and construct an @@ -1606,6 +1614,15 @@ out: return (error); } +#ifdef COMPAT_43 +int +ofreebsd32_sendmsg(struct thread *td, struct ofreebsd32_sendmsg_args *uap) +{ + return (ENOSYS); +} +#endif + + int freebsd32_settimeofday(struct thread *td, struct freebsd32_settimeofday_args *uap) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index f86fb5dfa96f..701c4494b628 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -948,6 +948,16 @@ struct ofreebsd32_sigstack_args { char nss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * nss; char nss_r_[PADR_(struct sigstack32 *)]; char oss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * oss; char oss_r_[PADR_(struct sigstack32 *)]; }; +struct ofreebsd32_recvmsg_args { + char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; + char msg_l_[PADL_(struct omsghdr32 *)]; struct omsghdr32 * msg; char msg_r_[PADR_(struct omsghdr32 *)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; +}; +struct ofreebsd32_sendmsg_args { + char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; + char msg_l_[PADL_(const struct omsghdr32 *)]; const struct omsghdr32 * msg; char msg_r_[PADR_(const struct omsghdr32 *)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; +}; struct ofreebsd32_getdirentries_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; @@ -978,6 +988,8 @@ int ofreebsd32_mmap(struct thread *, struct ofreebsd32_mmap_args *); int ofreebsd32_sigreturn(struct thread *, struct ofreebsd32_sigreturn_args *); int ofreebsd32_sigvec(struct thread *, struct ofreebsd32_sigvec_args *); int ofreebsd32_sigstack(struct thread *, struct ofreebsd32_sigstack_args *); +int ofreebsd32_recvmsg(struct thread *, struct ofreebsd32_recvmsg_args *); +int ofreebsd32_sendmsg(struct thread *, struct ofreebsd32_sendmsg_args *); int ofreebsd32_getdirentries(struct thread *, struct ofreebsd32_getdirentries_args *); #endif /* COMPAT_43 */ @@ -1326,6 +1338,8 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_ofreebsd32_sigreturn AUE_SIGRETURN #define FREEBSD32_SYS_AUE_ofreebsd32_sigvec AUE_O_SIGVEC #define FREEBSD32_SYS_AUE_ofreebsd32_sigstack AUE_O_SIGSTACK +#define FREEBSD32_SYS_AUE_ofreebsd32_recvmsg AUE_RECVMSG +#define FREEBSD32_SYS_AUE_ofreebsd32_sendmsg AUE_SENDMSG #define FREEBSD32_SYS_AUE_freebsd32_gettimeofday AUE_GETTIMEOFDAY #define FREEBSD32_SYS_AUE_freebsd32_getrusage AUE_GETRUSAGE #define FREEBSD32_SYS_AUE_freebsd32_readv AUE_READV diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index c57cce7c5343..312c136aa074 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -116,8 +116,8 @@ /* 110 is old sigsetmask */ /* 111 is old sigsuspend */ /* 112 is old freebsd32_sigstack */ - /* 113 is obsolete orecvmsg */ - /* 114 is obsolete osendmsg */ + /* 113 is old freebsd32_recvmsg */ + /* 114 is old freebsd32_sendmsg */ /* 115 is obsolete vtrace */ #define FREEBSD32_SYS_freebsd32_gettimeofday 116 #define FREEBSD32_SYS_freebsd32_getrusage 117 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 4ab6adb56b4a..31887661f39b 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -122,8 +122,8 @@ const char *freebsd32_syscallnames[] = { "compat.sigsetmask", /* 110 = old sigsetmask */ "compat.sigsuspend", /* 111 = old sigsuspend */ "compat.freebsd32_sigstack", /* 112 = old freebsd32_sigstack */ - "obs_orecvmsg", /* 113 = obsolete orecvmsg */ - "obs_osendmsg", /* 114 = obsolete osendmsg */ + "compat.freebsd32_recvmsg", /* 113 = old freebsd32_recvmsg */ + "compat.freebsd32_sendmsg", /* 114 = old freebsd32_sendmsg */ "obs_vtrace", /* 115 = obsolete vtrace */ "freebsd32_gettimeofday", /* 116 = freebsd32_gettimeofday */ "freebsd32_getrusage", /* 117 = freebsd32_getrusage */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index c25ee1edaab7..dc700fca2a10 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -175,8 +175,8 @@ struct sysent freebsd32_sysent[] = { { compat(AS(osigsetmask_args),sigsetmask), .sy_auevent = AUE_O_SIGSETMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 110 = old sigsetmask */ { compat(AS(osigsuspend_args),sigsuspend), .sy_auevent = AUE_SIGSUSPEND, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 111 = old sigsuspend */ { compat(AS(ofreebsd32_sigstack_args),freebsd32_sigstack), .sy_auevent = AUE_O_SIGSTACK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 112 = old freebsd32_sigstack */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 113 = obsolete orecvmsg */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 114 = obsolete osendmsg */ + { compat(AS(ofreebsd32_recvmsg_args),freebsd32_recvmsg), .sy_auevent = AUE_RECVMSG, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 113 = old freebsd32_recvmsg */ + { compat(AS(ofreebsd32_sendmsg_args),freebsd32_sendmsg), .sy_auevent = AUE_SENDMSG, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 114 = old freebsd32_sendmsg */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 115 = obsolete vtrace */ { .sy_narg = AS(freebsd32_gettimeofday_args), .sy_call = (sy_call_t *)freebsd32_gettimeofday, .sy_auevent = AUE_GETTIMEOFDAY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 116 = freebsd32_gettimeofday */ { .sy_narg = AS(freebsd32_getrusage_args), .sy_call = (sy_call_t *)freebsd32_getrusage, .sy_auevent = AUE_GETRUSAGE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 117 = freebsd32_getrusage */ diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index a85b72c7fb6e..c4f94cab1add 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -247,8 +247,10 @@ 112 AUE_O_SIGSTACK COMPAT { int freebsd32_sigstack( \ struct sigstack32 *nss, \ struct sigstack32 *oss); } -113 AUE_NULL OBSOL orecvmsg -114 AUE_NULL OBSOL osendmsg +113 AUE_RECVMSG COMPAT { int freebsd32_recvmsg(int s, \ + struct omsghdr32 *msg, int flags); } +114 AUE_SENDMSG COMPAT { int freebsd32_sendmsg(int s, \ + const struct omsghdr32 *msg, int flags); } 115 AUE_NULL OBSOL vtrace 116 AUE_GETTIMEOFDAY STD { int freebsd32_gettimeofday( \ struct timeval32 *tp, \ From nobody Wed Nov 17 20:22:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 737351855517; Wed, 17 Nov 2021 20:22: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 4HvZ9d2Vffz4rDc; Wed, 17 Nov 2021 20:22:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C0A4277FC; Wed, 17 Nov 2021 20:22: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 1AHKMhba060093; Wed, 17 Nov 2021 20:22:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMhNc060092; Wed, 17 Nov 2021 20:22:43 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:43 GMT Message-Id: <202111172022.1AHKMhNc060092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: d257e57d18e6 - main - freebsd32: add missing pads to preadv and pwritev List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d257e57d18e6d1569fc255aa7a43981f6c8068fb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d257e57d18e6d1569fc255aa7a43981f6c8068fb commit d257e57d18e6d1569fc255aa7a43981f6c8068fb Author: Brooks Davis AuthorDate: 2021-11-17 20:12:25 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:25 +0000 freebsd32: add missing pads to preadv and pwritev Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 47 +++++++++++++ sys/compat/freebsd32/freebsd32_syscall.h | 2 + sys/compat/freebsd32/freebsd32_syscalls.c | 5 ++ sys/compat/freebsd32/freebsd32_sysent.c | 5 ++ sys/compat/freebsd32/freebsd32_systrace_args.c | 93 ++++++++++++++++++++++++++ sys/compat/freebsd32/syscalls.master | 13 ++++ 6 files changed, 165 insertions(+) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 701c4494b628..6c1dc013835d 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -247,20 +247,39 @@ struct freebsd32_lutimes_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char tptr_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * tptr; char tptr_r_[PADR_(const struct timeval32 *)]; }; +#ifdef PAD64_REQUIRED struct freebsd32_preadv_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; struct freebsd32_pwritev_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; + char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; + char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; + char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; +}; +#else +struct freebsd32_preadv_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; +struct freebsd32_pwritev_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; + char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; + char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; + char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; +}; +#endif struct freebsd32_modstat_args { char modid_l_[PADL_(int)]; int modid; char modid_r_[PADR_(int)]; char stat_l_[PADL_(struct module_stat32 *)]; struct module_stat32 * stat; char stat_r_[PADR_(struct module_stat32 *)]; @@ -801,8 +820,13 @@ int freebsd32_aio_read(struct thread *, struct freebsd32_aio_read_args *); int freebsd32_aio_write(struct thread *, struct freebsd32_aio_write_args *); int freebsd32_lio_listio(struct thread *, struct freebsd32_lio_listio_args *); int freebsd32_lutimes(struct thread *, struct freebsd32_lutimes_args *); +#ifdef PAD64_REQUIRED int freebsd32_preadv(struct thread *, struct freebsd32_preadv_args *); int freebsd32_pwritev(struct thread *, struct freebsd32_pwritev_args *); +#else +int freebsd32_preadv(struct thread *, struct freebsd32_preadv_args *); +int freebsd32_pwritev(struct thread *, struct freebsd32_pwritev_args *); +#endif int freebsd32_modstat(struct thread *, struct freebsd32_modstat_args *); int freebsd32_kldstat(struct thread *, struct freebsd32_kldstat_args *); int freebsd32_aio_return(struct thread *, struct freebsd32_aio_return_args *); @@ -979,6 +1003,9 @@ struct ofreebsd32_getdirentries_args { #ifdef PAD64_REQUIRED #else #endif +#ifdef PAD64_REQUIRED +#else +#endif int ofreebsd32_lseek(struct thread *, struct ofreebsd32_lseek_args *); int ofreebsd32_stat(struct thread *, struct ofreebsd32_stat_args *); int ofreebsd32_lstat(struct thread *, struct ofreebsd32_lstat_args *); @@ -1013,6 +1040,9 @@ struct freebsd4_freebsd32_fstatfs_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(struct ostatfs32 *)]; struct ostatfs32 * buf; char buf_r_[PADR_(struct ostatfs32 *)]; }; +#ifdef PAD64_REQUIRED +#else +#endif struct freebsd4_freebsd32_fhstatfs_args { char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; char buf_l_[PADL_(struct ostatfs32 *)]; struct ostatfs32 * buf; char buf_r_[PADR_(struct ostatfs32 *)]; @@ -1111,6 +1141,9 @@ struct freebsd6_freebsd32_ftruncate_args { char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; }; +#ifdef PAD64_REQUIRED +#else +#endif struct freebsd6_freebsd32_aio_read_args { char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)]; }; @@ -1187,6 +1220,9 @@ struct freebsd7_freebsd32_shmctl_args { #ifdef PAD64_REQUIRED #else #endif +#ifdef PAD64_REQUIRED +#else +#endif int freebsd7_freebsd32___semctl(struct thread *, struct freebsd7_freebsd32___semctl_args *); int freebsd7_freebsd32_msgctl(struct thread *, struct freebsd7_freebsd32_msgctl_args *); int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_args *); @@ -1199,6 +1235,9 @@ int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_ #if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif +#ifdef PAD64_REQUIRED +#else +#endif struct freebsd10_freebsd32_umtx_lock_args { char umtx_l_[PADL_(struct umtx *)]; struct umtx * umtx; char umtx_r_[PADR_(struct umtx *)]; }; @@ -1249,6 +1288,9 @@ struct freebsd11_freebsd32_getdirentries_args { char count_l_[PADL_(u_int)]; u_int count; char count_r_[PADR_(u_int)]; char basep_l_[PADL_(int32_t *)]; int32_t * basep; char basep_r_[PADR_(int32_t *)]; }; +#ifdef PAD64_REQUIRED +#else +#endif struct freebsd11_freebsd32_fhstat_args { char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; char sb_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * sb; char sb_r_[PADR_(struct freebsd11_stat32 *)]; @@ -1313,6 +1355,9 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #ifdef PAD64_REQUIRED #else #endif +#ifdef PAD64_REQUIRED +#else +#endif #endif /* COMPAT_FREEBSD12 */ @@ -1389,6 +1434,8 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_lutimes AUE_LUTIMES #define FREEBSD32_SYS_AUE_freebsd32_preadv AUE_PREADV #define FREEBSD32_SYS_AUE_freebsd32_pwritev AUE_PWRITEV +#define FREEBSD32_SYS_AUE_freebsd32_preadv AUE_PREADV +#define FREEBSD32_SYS_AUE_freebsd32_pwritev AUE_PWRITEV #define FREEBSD32_SYS_AUE_freebsd4_freebsd32_fhstatfs AUE_FHSTATFS #define FREEBSD32_SYS_AUE_freebsd11_freebsd32_fhstat AUE_FHSTAT #define FREEBSD32_SYS_AUE_freebsd32_modstat AUE_NULL diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 312c136aa074..426221bf94eb 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -239,6 +239,8 @@ #define FREEBSD32_SYS_freebsd11_nfstat 279 #define FREEBSD32_SYS_freebsd11_nlstat 280 #define FREEBSD32_SYS_freebsd32_preadv 289 +#define FREEBSD32_SYS_freebsd32_pwritev 290 +#define FREEBSD32_SYS_freebsd32_preadv 289 #define FREEBSD32_SYS_freebsd32_pwritev 290 /* 297 is freebsd4 freebsd32_fhstatfs */ #define FREEBSD32_SYS_fhopen 298 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 31887661f39b..1630992680a2 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -298,8 +298,13 @@ const char *freebsd32_syscallnames[] = { "#286", /* 286 = nosys */ "#287", /* 287 = nosys */ "#288", /* 288 = nosys */ +#ifdef PAD64_REQUIRED "freebsd32_preadv", /* 289 = freebsd32_preadv */ "freebsd32_pwritev", /* 290 = freebsd32_pwritev */ +#else + "freebsd32_preadv", /* 289 = freebsd32_preadv */ + "freebsd32_pwritev", /* 290 = freebsd32_pwritev */ +#endif "#291", /* 291 = nosys */ "#292", /* 292 = nosys */ "#293", /* 293 = nosys */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index dc700fca2a10..76d402de3f5e 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -351,8 +351,13 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 286 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 287 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 288 = nosys */ +#ifdef PAD64_REQUIRED { .sy_narg = AS(freebsd32_preadv_args), .sy_call = (sy_call_t *)freebsd32_preadv, .sy_auevent = AUE_PREADV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 289 = freebsd32_preadv */ { .sy_narg = AS(freebsd32_pwritev_args), .sy_call = (sy_call_t *)freebsd32_pwritev, .sy_auevent = AUE_PWRITEV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 290 = freebsd32_pwritev */ +#else + { .sy_narg = AS(freebsd32_preadv_args), .sy_call = (sy_call_t *)freebsd32_preadv, .sy_auevent = AUE_PREADV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 289 = freebsd32_preadv */ + { .sy_narg = AS(freebsd32_pwritev_args), .sy_call = (sy_call_t *)freebsd32_pwritev, .sy_auevent = AUE_PWRITEV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 290 = freebsd32_pwritev */ +#endif { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 291 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 292 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 293 = nosys */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 98fb1dea15a8..f61641e3ab24 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1307,6 +1307,32 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 2; break; } +#ifdef PAD64_REQUIRED + /* freebsd32_preadv */ + case 289: { + struct freebsd32_preadv_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t)p->iovp; /* struct iovec32 * */ + uarg[2] = p->iovcnt; /* u_int */ + iarg[3] = p->_pad; /* int */ + uarg[4] = p->offset1; /* uint32_t */ + uarg[5] = p->offset2; /* uint32_t */ + *n_args = 6; + break; + } + /* freebsd32_pwritev */ + case 290: { + struct freebsd32_pwritev_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t)p->iovp; /* struct iovec32 * */ + uarg[2] = p->iovcnt; /* u_int */ + iarg[3] = p->_pad; /* int */ + uarg[4] = p->offset1; /* uint32_t */ + uarg[5] = p->offset2; /* uint32_t */ + *n_args = 6; + break; + } +#else /* freebsd32_preadv */ case 289: { struct freebsd32_preadv_args *p = params; @@ -1329,6 +1355,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 5; break; } +#endif /* fhopen */ case 298: { struct fhopen_args *p = params; @@ -5498,6 +5525,58 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; +#ifdef PAD64_REQUIRED + /* freebsd32_preadv */ + case 289: + switch (ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland struct iovec32 *"; + break; + case 2: + p = "u_int"; + break; + case 3: + p = "int"; + break; + case 4: + p = "uint32_t"; + break; + case 5: + p = "uint32_t"; + break; + default: + break; + }; + break; + /* freebsd32_pwritev */ + case 290: + switch (ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland struct iovec32 *"; + break; + case 2: + p = "u_int"; + break; + case 3: + p = "int"; + break; + case 4: + p = "uint32_t"; + break; + case 5: + p = "uint32_t"; + break; + default: + break; + }; + break; +#else /* freebsd32_preadv */ case 289: switch (ndx) { @@ -5542,6 +5621,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; +#endif /* fhopen */ case 298: switch (ndx) { @@ -10009,6 +10089,18 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; +#ifdef PAD64_REQUIRED + /* freebsd32_preadv */ + case 289: + if (ndx == 0 || ndx == 1) + p = "ssize_t"; + break; + /* freebsd32_pwritev */ + case 290: + if (ndx == 0 || ndx == 1) + p = "ssize_t"; + break; +#else /* freebsd32_preadv */ case 289: if (ndx == 0 || ndx == 1) @@ -10019,6 +10111,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "ssize_t"; break; +#endif /* fhopen */ case 298: if (ndx == 0 || ndx == 1) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index c4f94cab1add..410499e57609 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -541,14 +541,27 @@ 286 AUE_NULL UNIMPL nosys 287 AUE_NULL UNIMPL nosys 288 AUE_NULL UNIMPL nosys +#ifdef PAD64_REQUIRED 289 AUE_PREADV STD { ssize_t freebsd32_preadv(int fd, \ struct iovec32 *iovp, \ u_int iovcnt, \ + int _pad, \ uint32_t offset1, uint32_t offset2); } 290 AUE_PWRITEV STD { ssize_t freebsd32_pwritev(int fd, \ + struct iovec32 *iovp, \ + u_int iovcnt, \ + int _pad, \ + uint32_t offset1, uint32_t offset2); } +#else +289 AUE_PREADV STD { ssize_t freebsd32_preadv(int fd, \ struct iovec32 *iovp, \ u_int iovcnt, \ uint32_t offset1, uint32_t offset2); } +290 AUE_PWRITEV STD { ssize_t freebsd32_pwritev(int fd, \ + struct iovec32 *iovp, \ + u_int iovcnt, \ + uint32_t offset1, uint32_t offset2); } +#endif 291 AUE_NULL UNIMPL nosys 292 AUE_NULL UNIMPL nosys 293 AUE_NULL UNIMPL nosys From nobody Wed Nov 17 20:22:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4A6CF18553CC; Wed, 17 Nov 2021 20:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9f6fsbz4rPq; Wed, 17 Nov 2021 20:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8605127A89; Wed, 17 Nov 2021 20:22: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 1AHKMj10060141; Wed, 17 Nov 2021 20:22:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMj4a060140; Wed, 17 Nov 2021 20:22:45 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:45 GMT Message-Id: <202111172022.1AHKMj4a060140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 2b9d052d3eeb - main - freebsd32: fix getfsstat sign extension bugs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b9d052d3eeb9ffd1094dc5165eff555b9fd6bc3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=2b9d052d3eeb9ffd1094dc5165eff555b9fd6bc3 commit 2b9d052d3eeb9ffd1094dc5165eff555b9fd6bc3 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: fix getfsstat sign extension bugs Add freebsd32 versions of getfsstat and freebsd11_getfsstat so that bufsize is properly sign-extended if a negative value is passed. Reject negative values before passing to kern_getfsstat as a size_t. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 25 +++++++++++++++++++++++++ sys/compat/freebsd32/freebsd32_proto.h | 14 ++++++++++++++ sys/compat/freebsd32/freebsd32_syscall.h | 4 ++-- sys/compat/freebsd32/freebsd32_syscalls.c | 4 ++-- sys/compat/freebsd32/freebsd32_sysent.c | 4 ++-- sys/compat/freebsd32/freebsd32_systrace_args.c | 8 ++++---- sys/compat/freebsd32/syscalls.master | 4 ++-- sys/kern/vfs_syscalls.c | 19 ++++++++++++++----- sys/sys/syscallsubr.h | 2 ++ 9 files changed, 67 insertions(+), 17 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index a165b47b2928..5bff0cea845e 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -292,6 +292,21 @@ copy_statfs(struct statfs *in, struct ostatfs32 *out) } #endif +int +freebsd32_getfsstat(struct thread *td, struct freebsd32_getfsstat_args *uap) +{ + size_t count; + int error; + + if (uap->bufsize < 0 || uap->bufsize > SIZE_MAX) + return (EINVAL); + error = kern_getfsstat(td, &uap->buf, uap->bufsize, &count, + UIO_USERSPACE, uap->mode); + if (error == 0) + td->td_retval[0] = count; + return (error); +} + #ifdef COMPAT_FREEBSD4 int freebsd4_freebsd32_getfsstat(struct thread *td, @@ -323,6 +338,16 @@ freebsd4_freebsd32_getfsstat(struct thread *td, } #endif +#ifdef COMPAT_FREEBSD11 +int +freebsd11_freebsd32_getfsstat(struct thread *td, + struct freebsd11_freebsd32_getfsstat_args *uap) +{ + return(kern_freebsd11_getfsstat(td, uap->buf, uap->bufsize, + uap->mode)); +} +#endif + int freebsd32_sigaltstack(struct thread *td, struct freebsd32_sigaltstack_args *uap) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index ae3abe22dda4..50733c35d51b 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -709,6 +709,11 @@ struct freebsd32_fhstat_args { char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; char sb_l_[PADL_(struct stat32 *)]; struct stat32 * sb; char sb_r_[PADR_(struct stat32 *)]; }; +struct freebsd32_getfsstat_args { + char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)]; + char bufsize_l_[PADL_(int32_t)]; int32_t bufsize; char bufsize_r_[PADR_(int32_t)]; + char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; +}; #ifdef PAD64_REQUIRED struct freebsd32_mknodat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -912,6 +917,7 @@ int freebsd32_utimensat(struct thread *, struct freebsd32_utimensat_args *); int freebsd32_fstat(struct thread *, struct freebsd32_fstat_args *); int freebsd32_fstatat(struct thread *, struct freebsd32_fstatat_args *); int freebsd32_fhstat(struct thread *, struct freebsd32_fhstat_args *); +int freebsd32_getfsstat(struct thread *, struct freebsd32_getfsstat_args *); #ifdef PAD64_REQUIRED int freebsd32_mknodat(struct thread *, struct freebsd32_mknodat_args *); #else @@ -1317,6 +1323,11 @@ struct freebsd11_freebsd32_kevent_args { char nevents_l_[PADL_(int)]; int nevents; char nevents_r_[PADR_(int)]; char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; }; +struct freebsd11_freebsd32_getfsstat_args { + char buf_l_[PADL_(struct freebsd11_statfs *)]; struct freebsd11_statfs * buf; char buf_r_[PADR_(struct freebsd11_statfs *)]; + char bufsize_l_[PADL_(int32_t)]; int32_t bufsize; char bufsize_r_[PADR_(int32_t)]; + char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; +}; #ifdef PAD64_REQUIRED #else #endif @@ -1344,6 +1355,7 @@ int freebsd11_freebsd32_lstat(struct thread *, struct freebsd11_freebsd32_lstat_ int freebsd11_freebsd32_getdirentries(struct thread *, struct freebsd11_freebsd32_getdirentries_args *); int freebsd11_freebsd32_fhstat(struct thread *, struct freebsd11_freebsd32_fhstat_args *); int freebsd11_freebsd32_kevent(struct thread *, struct freebsd11_freebsd32_kevent_args *); +int freebsd11_freebsd32_getfsstat(struct thread *, struct freebsd11_freebsd32_getfsstat_args *); int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fstatat_args *); #endif /* COMPAT_FREEBSD11 */ @@ -1474,6 +1486,7 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd11_freebsd32_kevent AUE_KEVENT #define FREEBSD32_SYS_AUE_freebsd32_nmount AUE_NMOUNT #define FREEBSD32_SYS_AUE_freebsd32_sendfile AUE_SENDFILE +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_getfsstat AUE_GETFSSTAT #define FREEBSD32_SYS_AUE_freebsd32_ksem_init AUE_SEMINIT #define FREEBSD32_SYS_AUE_freebsd32_ksem_open AUE_SEMOPEN #define FREEBSD32_SYS_AUE_freebsd32_sigaction AUE_SIGACTION @@ -1538,6 +1551,7 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_fstat AUE_FSTAT #define FREEBSD32_SYS_AUE_freebsd32_fstatat AUE_FSTATAT #define FREEBSD32_SYS_AUE_freebsd32_fhstat AUE_FHSTAT +#define FREEBSD32_SYS_AUE_freebsd32_getfsstat AUE_GETFSSTAT #define FREEBSD32_SYS_AUE_freebsd32_mknodat AUE_MKNODAT #define FREEBSD32_SYS_AUE_freebsd32_mknodat AUE_MKNODAT #define FREEBSD32_SYS_AUE_freebsd32_kevent AUE_KEVENT diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 05dfb299e332..4f4e8ac9caf6 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -329,7 +329,7 @@ #define FREEBSD32_SYS_lchflags 391 #define FREEBSD32_SYS_uuidgen 392 #define FREEBSD32_SYS_freebsd32_sendfile 393 -#define FREEBSD32_SYS_freebsd11_getfsstat 395 +#define FREEBSD32_SYS_freebsd11_freebsd32_getfsstat 395 #define FREEBSD32_SYS_freebsd11_statfs 396 #define FREEBSD32_SYS_freebsd11_fstatfs 397 #define FREEBSD32_SYS_freebsd11_fhstatfs 398 @@ -488,7 +488,7 @@ #define FREEBSD32_SYS_getdirentries 554 #define FREEBSD32_SYS_statfs 555 #define FREEBSD32_SYS_fstatfs 556 -#define FREEBSD32_SYS_getfsstat 557 +#define FREEBSD32_SYS_freebsd32_getfsstat 557 #define FREEBSD32_SYS_fhstatfs 558 #define FREEBSD32_SYS_freebsd32_mknodat 559 #define FREEBSD32_SYS_freebsd32_mknodat 559 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 3206e069e85d..7af646c17e3e 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -409,7 +409,7 @@ const char *freebsd32_syscallnames[] = { "uuidgen", /* 392 = uuidgen */ "freebsd32_sendfile", /* 393 = freebsd32_sendfile */ "#394", /* 394 = mac_syscall */ - "compat11.getfsstat", /* 395 = freebsd11 getfsstat */ + "compat11.freebsd32_getfsstat", /* 395 = freebsd11 freebsd32_getfsstat */ "compat11.statfs", /* 396 = freebsd11 statfs */ "compat11.fstatfs", /* 397 = freebsd11 fstatfs */ "compat11.fhstatfs", /* 398 = freebsd11 fhstatfs */ @@ -594,7 +594,7 @@ const char *freebsd32_syscallnames[] = { "getdirentries", /* 554 = getdirentries */ "statfs", /* 555 = statfs */ "fstatfs", /* 556 = fstatfs */ - "getfsstat", /* 557 = getfsstat */ + "freebsd32_getfsstat", /* 557 = freebsd32_getfsstat */ "fhstatfs", /* 558 = fhstatfs */ #ifdef PAD64_REQUIRED "freebsd32_mknodat", /* 559 = freebsd32_mknodat */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 12fecbee75ab..1960cddc0542 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -462,7 +462,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(uuidgen_args), .sy_call = (sy_call_t *)sys_uuidgen, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 392 = uuidgen */ { .sy_narg = AS(freebsd32_sendfile_args), .sy_call = (sy_call_t *)freebsd32_sendfile, .sy_auevent = AUE_SENDFILE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 393 = freebsd32_sendfile */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 394 = mac_syscall */ - { compat11(AS(freebsd11_getfsstat_args),getfsstat), .sy_auevent = AUE_GETFSSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 395 = freebsd11 getfsstat */ + { compat11(AS(freebsd11_freebsd32_getfsstat_args),freebsd32_getfsstat), .sy_auevent = AUE_GETFSSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 395 = freebsd11 freebsd32_getfsstat */ { compat11(AS(freebsd11_statfs_args),statfs), .sy_auevent = AUE_STATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 396 = freebsd11 statfs */ { compat11(AS(freebsd11_fstatfs_args),fstatfs), .sy_auevent = AUE_FSTATFS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 397 = freebsd11 fstatfs */ { compat11(AS(freebsd11_fhstatfs_args),fhstatfs), .sy_auevent = AUE_FHSTATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 398 = freebsd11 fhstatfs */ @@ -647,7 +647,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(getdirentries_args), .sy_call = (sy_call_t *)sys_getdirentries, .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 554 = getdirentries */ { .sy_narg = AS(statfs_args), .sy_call = (sy_call_t *)sys_statfs, .sy_auevent = AUE_STATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 555 = statfs */ { .sy_narg = AS(fstatfs_args), .sy_call = (sy_call_t *)sys_fstatfs, .sy_auevent = AUE_FSTATFS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 556 = fstatfs */ - { .sy_narg = AS(getfsstat_args), .sy_call = (sy_call_t *)sys_getfsstat, .sy_auevent = AUE_GETFSSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 557 = getfsstat */ + { .sy_narg = AS(freebsd32_getfsstat_args), .sy_call = (sy_call_t *)freebsd32_getfsstat, .sy_auevent = AUE_GETFSSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 557 = freebsd32_getfsstat */ { .sy_narg = AS(fhstatfs_args), .sy_call = (sy_call_t *)sys_fhstatfs, .sy_auevent = AUE_FHSTATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 558 = fhstatfs */ #ifdef PAD64_REQUIRED { .sy_narg = AS(freebsd32_mknodat_args), .sy_call = (sy_call_t *)freebsd32_mknodat, .sy_auevent = AUE_MKNODAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 559 = freebsd32_mknodat */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 6ba992bed5c9..6727bd8e5c76 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -3207,9 +3207,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 2; break; } - /* getfsstat */ + /* freebsd32_getfsstat */ case 557: { - struct getfsstat_args *p = params; + struct freebsd32_getfsstat_args *p = params; uarg[0] = (intptr_t)p->buf; /* struct statfs * */ iarg[1] = p->bufsize; /* int32_t */ iarg[2] = p->mode; /* int */ @@ -8858,7 +8858,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* getfsstat */ + /* freebsd32_getfsstat */ case 557: switch (ndx) { case 0: @@ -11149,7 +11149,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* getfsstat */ + /* freebsd32_getfsstat */ case 557: if (ndx == 0 || ndx == 1) p = "int"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 2bcf84d3baf7..3734219fba30 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -746,7 +746,7 @@ size_t nbytes, struct sf_hdtr32 *hdtr, \ off_t *sbytes, int flags); } 394 AUE_NULL UNIMPL mac_syscall -395 AUE_GETFSSTAT COMPAT11|NOPROTO { int getfsstat( \ +395 AUE_GETFSSTAT COMPAT11 { int freebsd32_getfsstat( \ struct freebsd11_statfs *buf, \ int32_t bufsize, int mode); } 396 AUE_STATFS COMPAT11|NOPROTO { int statfs(const char *path, \ @@ -1140,7 +1140,7 @@ 555 AUE_STATFS NOPROTO { int statfs(const char *path, \ struct statfs *buf); } 556 AUE_FSTATFS NOPROTO { int fstatfs(int fd, struct statfs *buf); } -557 AUE_GETFSSTAT NOPROTO { int getfsstat(struct statfs *buf, \ +557 AUE_GETFSSTAT STD { int freebsd32_getfsstat(struct statfs *buf, \ int32_t bufsize, int mode); } 558 AUE_FHSTATFS NOPROTO { int fhstatfs(const struct fhandle *u_fhp, \ struct statfs *buf); } diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 4357669786f8..1cffe903aef3 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -789,25 +789,34 @@ freebsd11_fstatfs(struct thread *td, struct freebsd11_fstatfs_args *uap) */ int freebsd11_getfsstat(struct thread *td, struct freebsd11_getfsstat_args *uap) +{ + return (kern_freebsd11_getfsstat(td, uap->buf, uap->bufsize, uap->mode)); +} + +int +kern_freebsd11_getfsstat(struct thread *td, struct freebsd11_statfs * ubuf, + long bufsize, int mode) { struct freebsd11_statfs osb; struct statfs *buf, *sp; size_t count, size; int error; - count = uap->bufsize / sizeof(struct ostatfs); + if (bufsize < 0) + return (EINVAL); + + count = bufsize / sizeof(struct ostatfs); size = count * sizeof(struct statfs); - error = kern_getfsstat(td, &buf, size, &count, UIO_SYSSPACE, - uap->mode); + error = kern_getfsstat(td, &buf, size, &count, UIO_SYSSPACE, mode); if (error == 0) td->td_retval[0] = count; if (size > 0) { sp = buf; while (count > 0 && error == 0) { freebsd11_cvtstatfs(sp, &osb); - error = copyout(&osb, uap->buf, sizeof(osb)); + error = copyout(&osb, ubuf, sizeof(osb)); sp++; - uap->buf++; + ubuf++; count--; } free(buf, M_STATFS); diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 5032df4be874..24d2a199a272 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -145,6 +145,8 @@ int kern_fhopen(struct thread *td, const struct fhandle *u_fhp, int flags); int kern_fhstat(struct thread *td, fhandle_t fh, struct stat *buf); int kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf); int kern_fpathconf(struct thread *td, int fd, int name, long *valuep); +int kern_freebsd11_getfsstat(struct thread *td, + struct freebsd11_statfs *ubuf, long bufsize, int mode); int kern_fstat(struct thread *td, int fd, struct stat *sbp); int kern_fstatfs(struct thread *td, int fd, struct statfs *buf); int kern_fsync(struct thread *td, int fd, bool fullsync); From nobody Wed Nov 17 20:22:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2A4FA18554F6; Wed, 17 Nov 2021 20:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9f4ssRz4rMd; Wed, 17 Nov 2021 20:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7AE392789F; Wed, 17 Nov 2021 20:22: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 1AHKMieZ060117; Wed, 17 Nov 2021 20:22:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMipp060116; Wed, 17 Nov 2021 20:22:44 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:44 GMT Message-Id: <202111172022.1AHKMipp060116@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: f19e3fd20601 - main - freebsd32: signed long corrections List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f19e3fd20601f0ff7fa3261fee339b46276b3d90 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f19e3fd20601f0ff7fa3261fee339b46276b3d90 commit f19e3fd20601f0ff7fa3261fee339b46276b3d90 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: signed long corrections Syscalls that take signed longs need to treat the 32-bit versions as signed int so that sign extension happens correctly. Improve decleration quality and add a few minimal syscall implementations. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 27 ++++++++++++++++++++++++++ sys/compat/freebsd32/freebsd32_proto.h | 25 ++++++++++++++++++++---- sys/compat/freebsd32/freebsd32_syscall.h | 6 +++--- sys/compat/freebsd32/freebsd32_syscalls.c | 6 +++--- sys/compat/freebsd32/freebsd32_sysent.c | 6 +++--- sys/compat/freebsd32/freebsd32_systrace_args.c | 8 ++++---- sys/compat/freebsd32/syscalls.master | 21 ++++++++++---------- 7 files changed, 72 insertions(+), 27 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 4e69dc99b3b2..a165b47b2928 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1913,6 +1913,14 @@ freebsd32_truncate(struct thread *td, struct freebsd32_truncate_args *uap) PAIR32TO64(off_t, uap->length))); } +#ifdef COMPAT_43 +int +ofreebsd32_truncate(struct thread *td, struct ofreebsd32_truncate_args *uap) +{ + return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length)); +} +#endif + int freebsd32_ftruncate(struct thread *td, struct freebsd32_ftruncate_args *uap) { @@ -1921,6 +1929,12 @@ freebsd32_ftruncate(struct thread *td, struct freebsd32_ftruncate_args *uap) } #ifdef COMPAT_43 +int +ofreebsd32_ftruncate(struct thread *td, struct ofreebsd32_ftruncate_args *uap) +{ + return (kern_ftruncate(td, uap->fd, uap->length)); +} + int ofreebsd32_getdirentries(struct thread *td, struct ofreebsd32_getdirentries_args *uap) @@ -3842,6 +3856,19 @@ freebsd32_ffclock_getestimate(struct thread *td, } #endif /* FFCLOCK */ +#ifdef COMPAT_43 +int +ofreebsd32_sethostid(struct thread *td, struct ofreebsd32_sethostid_args *uap) +{ + int name[] = { CTL_KERN, KERN_HOSTID }; + long hostid; + + hostid = uap->hostid; + return (kernel_sysctl(td, name, nitems(name), NULL, NULL, &hostid, + sizeof(hostid), NULL, 0)); +} +#endif + int freebsd32_fspacectl(struct thread *td, struct freebsd32_fspacectl_args *uap) { diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 6c1dc013835d..ae3abe22dda4 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -179,7 +179,7 @@ struct freebsd32_msgrcv_args { char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; char msgp_l_[PADL_(void *)]; void * msgp; char msgp_r_[PADR_(void *)]; char msgsz_l_[PADL_(size_t)]; size_t msgsz; char msgsz_r_[PADR_(size_t)]; - char msgtyp_l_[PADL_(long)]; long msgtyp; char msgtyp_r_[PADR_(long)]; + char msgtyp_l_[PADL_(int32_t)]; int32_t msgtyp; char msgtyp_r_[PADR_(int32_t)]; char msgflg_l_[PADL_(int)]; int msgflg; char msgflg_r_[PADR_(int)]; }; struct freebsd32_clock_gettime_args { @@ -932,7 +932,7 @@ int freebsd32_fspacectl(struct thread *, struct freebsd32_fspacectl_args *); #endif struct ofreebsd32_lseek_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char offset_l_[PADL_(int)]; int offset; char offset_r_[PADR_(int)]; + char offset_l_[PADL_(int32_t)]; int32_t offset; char offset_r_[PADR_(int32_t)]; char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct ofreebsd32_stat_args { @@ -982,11 +982,22 @@ struct ofreebsd32_sendmsg_args { char msg_l_[PADL_(const struct omsghdr32 *)]; const struct omsghdr32 * msg; char msg_r_[PADR_(const struct omsghdr32 *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; +struct ofreebsd32_truncate_args { + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char length_l_[PADL_(int32_t)]; int32_t length; char length_r_[PADR_(int32_t)]; +}; +struct ofreebsd32_ftruncate_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char length_l_[PADL_(int32_t)]; int32_t length; char length_r_[PADR_(int32_t)]; +}; +struct ofreebsd32_sethostid_args { + char hostid_l_[PADL_(int32_t)]; int32_t hostid; char hostid_r_[PADR_(int32_t)]; +}; struct ofreebsd32_getdirentries_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; char count_l_[PADL_(u_int)]; u_int count; char count_r_[PADR_(u_int)]; - char basep_l_[PADL_(uint32_t *)]; uint32_t * basep; char basep_r_[PADR_(uint32_t *)]; + char basep_l_[PADL_(int32_t *)]; int32_t * basep; char basep_r_[PADR_(int32_t *)]; }; #ifdef PAD64_REQUIRED #else @@ -1017,6 +1028,9 @@ int ofreebsd32_sigvec(struct thread *, struct ofreebsd32_sigvec_args *); int ofreebsd32_sigstack(struct thread *, struct ofreebsd32_sigstack_args *); int ofreebsd32_recvmsg(struct thread *, struct ofreebsd32_recvmsg_args *); int ofreebsd32_sendmsg(struct thread *, struct ofreebsd32_sendmsg_args *); +int ofreebsd32_truncate(struct thread *, struct ofreebsd32_truncate_args *); +int ofreebsd32_ftruncate(struct thread *, struct ofreebsd32_ftruncate_args *); +int ofreebsd32_sethostid(struct thread *, struct ofreebsd32_sethostid_args *); int ofreebsd32_getdirentries(struct thread *, struct ofreebsd32_getdirentries_args *); #endif /* COMPAT_43 */ @@ -1029,7 +1043,7 @@ int ofreebsd32_getdirentries(struct thread *, struct ofreebsd32_getdirentries_ar #endif struct freebsd4_freebsd32_getfsstat_args { char buf_l_[PADL_(struct ostatfs32 *)]; struct ostatfs32 * buf; char buf_r_[PADR_(struct ostatfs32 *)]; - char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)]; + char bufsize_l_[PADL_(int32_t)]; int32_t bufsize; char bufsize_r_[PADR_(int32_t)]; char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; }; struct freebsd4_freebsd32_statfs_args { @@ -1390,8 +1404,11 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_readv AUE_READV #define FREEBSD32_SYS_AUE_freebsd32_writev AUE_WRITEV #define FREEBSD32_SYS_AUE_freebsd32_settimeofday AUE_SETTIMEOFDAY +#define FREEBSD32_SYS_AUE_ofreebsd32_truncate AUE_TRUNCATE +#define FREEBSD32_SYS_AUE_ofreebsd32_ftruncate AUE_FTRUNCATE #define FREEBSD32_SYS_AUE_freebsd32_utimes AUE_UTIMES #define FREEBSD32_SYS_AUE_freebsd32_adjtime AUE_ADJTIME +#define FREEBSD32_SYS_AUE_ofreebsd32_sethostid AUE_SYSCTL #define FREEBSD32_SYS_AUE_ofreebsd32_getdirentries AUE_GETDIRENTRIES #define FREEBSD32_SYS_AUE_freebsd4_freebsd32_statfs AUE_STATFS #define FREEBSD32_SYS_AUE_freebsd4_freebsd32_fstatfs AUE_FSTATFS diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 426221bf94eb..05dfb299e332 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -131,8 +131,8 @@ #define FREEBSD32_SYS_setreuid 126 #define FREEBSD32_SYS_setregid 127 #define FREEBSD32_SYS_rename 128 - /* 129 is old truncate */ - /* 130 is old ftruncate */ + /* 129 is old freebsd32_truncate */ + /* 130 is old freebsd32_ftruncate */ #define FREEBSD32_SYS_flock 131 #define FREEBSD32_SYS_mkfifo 132 #define FREEBSD32_SYS_sendto 133 @@ -145,7 +145,7 @@ #define FREEBSD32_SYS_freebsd32_adjtime 140 /* 141 is old getpeername */ /* 142 is old gethostid */ - /* 143 is obsolete sethostid */ + /* 143 is old freebsd32_sethostid */ /* 144 is old getrlimit */ /* 145 is old setrlimit */ /* 146 is old killpg */ diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 1630992680a2..3206e069e85d 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -138,8 +138,8 @@ const char *freebsd32_syscallnames[] = { "setreuid", /* 126 = setreuid */ "setregid", /* 127 = setregid */ "rename", /* 128 = rename */ - "compat.truncate", /* 129 = old truncate */ - "compat.ftruncate", /* 130 = old ftruncate */ + "compat.freebsd32_truncate", /* 129 = old freebsd32_truncate */ + "compat.freebsd32_ftruncate", /* 130 = old freebsd32_ftruncate */ "flock", /* 131 = flock */ "mkfifo", /* 132 = mkfifo */ "sendto", /* 133 = sendto */ @@ -152,7 +152,7 @@ const char *freebsd32_syscallnames[] = { "freebsd32_adjtime", /* 140 = freebsd32_adjtime */ "compat.getpeername", /* 141 = old getpeername */ "compat.gethostid", /* 142 = old gethostid */ - "obs_sethostid", /* 143 = obsolete sethostid */ + "compat.freebsd32_sethostid", /* 143 = old freebsd32_sethostid */ "compat.getrlimit", /* 144 = old getrlimit */ "compat.setrlimit", /* 145 = old setrlimit */ "compat.killpg", /* 146 = old killpg */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 76d402de3f5e..12fecbee75ab 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -191,8 +191,8 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(setreuid_args), .sy_call = (sy_call_t *)sys_setreuid, .sy_auevent = AUE_SETREUID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 126 = setreuid */ { .sy_narg = AS(setregid_args), .sy_call = (sy_call_t *)sys_setregid, .sy_auevent = AUE_SETREGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 127 = setregid */ { .sy_narg = AS(rename_args), .sy_call = (sy_call_t *)sys_rename, .sy_auevent = AUE_RENAME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 128 = rename */ - { compat(AS(otruncate_args),truncate), .sy_auevent = AUE_TRUNCATE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 129 = old truncate */ - { compat(AS(oftruncate_args),ftruncate), .sy_auevent = AUE_FTRUNCATE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 130 = old ftruncate */ + { compat(AS(ofreebsd32_truncate_args),freebsd32_truncate), .sy_auevent = AUE_TRUNCATE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 129 = old freebsd32_truncate */ + { compat(AS(ofreebsd32_ftruncate_args),freebsd32_ftruncate), .sy_auevent = AUE_FTRUNCATE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 130 = old freebsd32_ftruncate */ { .sy_narg = AS(flock_args), .sy_call = (sy_call_t *)sys_flock, .sy_auevent = AUE_FLOCK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 131 = flock */ { .sy_narg = AS(mkfifo_args), .sy_call = (sy_call_t *)sys_mkfifo, .sy_auevent = AUE_MKFIFO, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 132 = mkfifo */ { .sy_narg = AS(sendto_args), .sy_call = (sy_call_t *)sys_sendto, .sy_auevent = AUE_SENDTO, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 133 = sendto */ @@ -205,7 +205,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_adjtime_args), .sy_call = (sy_call_t *)freebsd32_adjtime, .sy_auevent = AUE_ADJTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 140 = freebsd32_adjtime */ { compat(AS(ogetpeername_args),getpeername), .sy_auevent = AUE_GETPEERNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 141 = old getpeername */ { compat(0,gethostid), .sy_auevent = AUE_SYSCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 142 = old gethostid */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 143 = obsolete sethostid */ + { compat(AS(ofreebsd32_sethostid_args),freebsd32_sethostid), .sy_auevent = AUE_SYSCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 143 = old freebsd32_sethostid */ { compat(AS(ogetrlimit_args),getrlimit), .sy_auevent = AUE_GETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 144 = old getrlimit */ { compat(AS(osetrlimit_args),setrlimit), .sy_auevent = AUE_SETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 145 = old setrlimit */ { compat(AS(okillpg_args),killpg), .sy_auevent = AUE_KILLPG, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 146 = old killpg */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index f61641e3ab24..6ba992bed5c9 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1093,7 +1093,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->msqid; /* int */ uarg[1] = (intptr_t)p->msgp; /* void * */ uarg[2] = p->msgsz; /* size_t */ - iarg[3] = p->msgtyp; /* long */ + iarg[3] = p->msgtyp; /* int32_t */ iarg[4] = p->msgflg; /* int */ *n_args = 5; break; @@ -3211,7 +3211,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 557: { struct getfsstat_args *p = params; uarg[0] = (intptr_t)p->buf; /* struct statfs * */ - iarg[1] = p->bufsize; /* long */ + iarg[1] = p->bufsize; /* int32_t */ iarg[2] = p->mode; /* int */ *n_args = 3; break; @@ -5176,7 +5176,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "size_t"; break; case 3: - p = "long"; + p = "int32_t"; break; case 4: p = "int"; @@ -8865,7 +8865,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct statfs *"; break; case 1: - p = "long"; + p = "int32_t"; break; case 2: p = "int"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 410499e57609..2bcf84d3baf7 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -92,9 +92,9 @@ 16 AUE_CHOWN NOPROTO { int chown(const char *path, int uid, int gid); } 17 AUE_NULL NOPROTO { void *break(char *nsize); } 18 AUE_GETFSSTAT COMPAT4 { int freebsd32_getfsstat( \ - struct ostatfs32 *buf, long bufsize, \ + struct ostatfs32 *buf, int32_t bufsize, \ int mode); } -19 AUE_LSEEK COMPAT { int freebsd32_lseek(int fd, int offset, \ +19 AUE_LSEEK COMPAT { int freebsd32_lseek(int fd, int32_t offset, \ int whence); } 20 AUE_GETPID NOPROTO { pid_t getpid(void); } 21 AUE_MOUNT NOPROTO { int mount(const char *type, \ @@ -274,9 +274,10 @@ 127 AUE_SETREGID NOPROTO { int setregid(int rgid, int egid); } 128 AUE_RENAME NOPROTO { int rename(const char *from, \ const char *to); } -129 AUE_TRUNCATE COMPAT|NOPROTO { int truncate(const char *path, \ - int length); } -130 AUE_FTRUNCATE COMPAT|NOPROTO { int ftruncate(int fd, int length); } +129 AUE_TRUNCATE COMPAT { int freebsd32_truncate(const char *path, \ + int32_t length); } +130 AUE_FTRUNCATE COMPAT { int freebsd32_ftruncate(int fd, \ + int32_t length); } 131 AUE_FLOCK NOPROTO { int flock(int fd, int how); } 132 AUE_MKFIFO NOPROTO { int mkfifo(const char *path, mode_t mode); } 133 AUE_SENDTO NOPROTO { int sendto(int s, const void *buf, \ @@ -298,7 +299,7 @@ struct sockaddr *asa, \ __socklen_t *alen); } 142 AUE_SYSCTL COMPAT|NOPROTO { long gethostid(void); } -143 AUE_SYSCTL OBSOL sethostid +143 AUE_SYSCTL COMPAT { int freebsd32_sethostid(int32_t hostid); } 144 AUE_GETRLIMIT COMPAT|NOPROTO { int getrlimit(u_int which, \ struct orlimit *rlp); } 145 AUE_SETRLIMIT COMPAT|NOPROTO { int setrlimit(u_int which, \ @@ -323,7 +324,7 @@ ; XXX this is a problem!!! 155 AUE_NFS_SVC UNIMPL nfssvc 156 AUE_GETDIRENTRIES COMPAT { int freebsd32_getdirentries(int fd, \ - char *buf, u_int count, uint32_t *basep); } + char *buf, u_int count, int32_t *basep); } 157 AUE_STATFS COMPAT4 { int freebsd32_statfs(const char *path, \ struct ostatfs32 *buf); } 158 AUE_FSTATFS COMPAT4 { int freebsd32_fstatfs(int fd, \ @@ -446,7 +447,7 @@ 226 AUE_MSGSND NOSTD { int freebsd32_msgsnd(int msqid, const void *msgp, \ size_t msgsz, int msgflg); } 227 AUE_MSGRCV NOSTD { int freebsd32_msgrcv(int msqid, void *msgp, \ - size_t msgsz, long msgtyp, int msgflg); } + size_t msgsz, int32_t msgtyp, int msgflg); } 228 AUE_SHMAT NOSTD|NOPROTO { void *shmat(int shmid, const void *shmaddr, \ int shmflg); } 229 AUE_SHMCTL COMPAT7|NOSTD { int freebsd32_shmctl( \ @@ -747,7 +748,7 @@ 394 AUE_NULL UNIMPL mac_syscall 395 AUE_GETFSSTAT COMPAT11|NOPROTO { int getfsstat( \ struct freebsd11_statfs *buf, \ - long bufsize, int mode); } + int32_t bufsize, int mode); } 396 AUE_STATFS COMPAT11|NOPROTO { int statfs(const char *path, \ struct statfs *buf); } 397 AUE_FSTATFS COMPAT11|NOPROTO { int fstatfs(int fd, \ @@ -1140,7 +1141,7 @@ struct statfs *buf); } 556 AUE_FSTATFS NOPROTO { int fstatfs(int fd, struct statfs *buf); } 557 AUE_GETFSSTAT NOPROTO { int getfsstat(struct statfs *buf, \ - long bufsize, int mode); } + int32_t bufsize, int mode); } 558 AUE_FHSTATFS NOPROTO { int fhstatfs(const struct fhandle *u_fhp, \ struct statfs *buf); } #ifdef PAD64_REQUIRED From nobody Wed Nov 17 20:22:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 07955185569B; Wed, 17 Nov 2021 20:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9h6xN5z4rC5; Wed, 17 Nov 2021 20:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC17D27377; Wed, 17 Nov 2021 20:22: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 1AHKMkvQ060165; Wed, 17 Nov 2021 20:22:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMkWG060164; Wed, 17 Nov 2021 20:22:46 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:46 GMT Message-Id: <202111172022.1AHKMkWG060164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 158dcd7395ad - main - freebsd32: have sigqueue take a 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 158dcd7395ad894ca5c62e5a66cc5c1b067a0fe6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=158dcd7395ad894ca5c62e5a66cc5c1b067a0fe6 commit 158dcd7395ad894ca5c62e5a66cc5c1b067a0fe6 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: have sigqueue take a void * This matches the default ABI and we work around issues with union sigval by extracting the bottom 32-bits in a manual handler. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 2 +- sys/compat/freebsd32/freebsd32_proto.h | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 4 ++-- sys/compat/freebsd32/syscalls.master | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 5bff0cea845e..eab217283197 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -3082,7 +3082,7 @@ freebsd32_sigqueue(struct thread *td, struct freebsd32_sigqueue_args *uap) * more common. */ bzero(&sv, sizeof(sv)); - sv.sival_int = uap->value; + sv.sival_int = (uint32_t)(uint64_t)uap->value; return (kern_sigqueue(td, uap->pid, uap->signum, &sv)); } diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 50733c35d51b..9025871780aa 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -384,7 +384,7 @@ struct freebsd32_thr_new_args { struct freebsd32_sigqueue_args { char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)]; char signum_l_[PADL_(int)]; int signum; char signum_r_[PADR_(int)]; - char value_l_[PADL_(int)]; int value; char value_r_[PADR_(int)]; + char value_l_[PADL_(void *)]; void * value; char value_r_[PADR_(void *)]; }; struct freebsd32_kmq_open_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 6727bd8e5c76..971a7a4ca416 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2238,7 +2238,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct freebsd32_sigqueue_args *p = params; iarg[0] = p->pid; /* pid_t */ iarg[1] = p->signum; /* int */ - iarg[2] = p->value; /* int */ + uarg[2] = (intptr_t)p->value; /* void * */ *n_args = 3; break; } @@ -7071,7 +7071,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 2: - p = "int"; + p = "userland void *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 3734219fba30..8a4f9b56b7d5 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -858,7 +858,7 @@ struct thr_param32 *param, \ int param_size); } 456 AUE_NULL STD { int freebsd32_sigqueue(pid_t pid, \ - int signum, int value); } + int signum, void *value); } 457 AUE_MQ_OPEN NOSTD { int freebsd32_kmq_open( \ const char *path, int flags, mode_t mode, \ const struct mq_attr32 *attr); } From nobody Wed Nov 17 20:22:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A4E541855613; Wed, 17 Nov 2021 20:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ9j3crNz4rK5; Wed, 17 Nov 2021 20:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF68C27850; Wed, 17 Nov 2021 20:22: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 1AHKMlqY060192; Wed, 17 Nov 2021 20:22:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMllB060190; Wed, 17 Nov 2021 20:22:47 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:47 GMT Message-Id: <202111172022.1AHKMllB060190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: a016320dfb4e - main - freebsd32: rename 32-bit compat pads to _pad List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a016320dfb4e2363deeee658ac931220ec517cad Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a016320dfb4e2363deeee658ac931220ec517cad commit a016320dfb4e2363deeee658ac931220ec517cad Author: Brooks Davis AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: rename 32-bit compat pads to _pad Some 32-bit architectures pass 64-bit values in aligned register pairs (a0,a1), (a2,a3) etc. In freebsd32 we add these pads explicitly from compat code. We also sometimes add pads in the default ABI. Differentiate the two by making the freebsd32 ones int _pad. In a future commit the 32-bit ones will be automatically generated. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 24 ++++++++++++------------ sys/compat/freebsd32/freebsd32_systrace_args.c | 24 ++++++++++++------------ sys/compat/freebsd32/syscalls.master | 24 ++++++++++++------------ 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 9025871780aa..a7a38e39dccc 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -429,7 +429,7 @@ struct freebsd32_pread_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; @@ -437,7 +437,7 @@ struct freebsd32_pwrite_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; @@ -447,26 +447,26 @@ struct freebsd32_mmap_args { char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char pos1_l_[PADL_(uint32_t)]; uint32_t pos1; char pos1_r_[PADR_(uint32_t)]; char pos2_l_[PADL_(uint32_t)]; uint32_t pos2; char pos2_r_[PADR_(uint32_t)]; }; struct freebsd32_lseek_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct freebsd32_truncate_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; }; struct freebsd32_ftruncate_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; }; @@ -514,7 +514,7 @@ struct freebsd32_ftruncate_args { #ifdef PAD64_REQUIRED struct freebsd32_cpuset_setid_args { char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char setid_l_[PADL_(cpusetid_t)]; cpusetid_t setid; char setid_r_[PADR_(cpusetid_t)]; @@ -597,7 +597,7 @@ struct freebsd32_pselect_args { #ifdef PAD64_REQUIRED struct freebsd32_posix_fallocate_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; char len1_l_[PADL_(uint32_t)]; uint32_t len1; char len1_r_[PADR_(uint32_t)]; @@ -605,7 +605,7 @@ struct freebsd32_posix_fallocate_args { }; struct freebsd32_posix_fadvise_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; char len1_l_[PADL_(uint32_t)]; uint32_t len1; char len1_r_[PADR_(uint32_t)]; @@ -614,7 +614,7 @@ struct freebsd32_posix_fadvise_args { }; struct freebsd32_wait6_args { char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; @@ -664,7 +664,7 @@ struct freebsd32_aio_mlock_args { #ifdef PAD64_REQUIRED struct freebsd32_procctl_args { char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char com_l_[PADL_(int)]; int com; char com_r_[PADR_(int)]; @@ -719,7 +719,7 @@ struct freebsd32_mknodat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char dev1_l_[PADL_(uint32_t)]; uint32_t dev1; char dev1_r_[PADR_(uint32_t)]; char dev2_l_[PADL_(uint32_t)]; uint32_t dev2; char dev2_r_[PADR_(uint32_t)]; }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 971a7a4ca416..611a59f1328e 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2386,7 +2386,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->buf; /* void * */ uarg[2] = p->nbyte; /* size_t */ - iarg[3] = p->pad; /* int */ + iarg[3] = p->_pad; /* int */ uarg[4] = p->offset1; /* uint32_t */ uarg[5] = p->offset2; /* uint32_t */ *n_args = 6; @@ -2398,7 +2398,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->buf; /* const void * */ uarg[2] = p->nbyte; /* size_t */ - iarg[3] = p->pad; /* int */ + iarg[3] = p->_pad; /* int */ uarg[4] = p->offset1; /* uint32_t */ uarg[5] = p->offset2; /* uint32_t */ *n_args = 6; @@ -2412,7 +2412,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[2] = p->prot; /* int */ iarg[3] = p->flags; /* int */ iarg[4] = p->fd; /* int */ - iarg[5] = p->pad; /* int */ + iarg[5] = p->_pad; /* int */ uarg[6] = p->pos1; /* uint32_t */ uarg[7] = p->pos2; /* uint32_t */ *n_args = 8; @@ -2422,7 +2422,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 478: { struct freebsd32_lseek_args *p = params; iarg[0] = p->fd; /* int */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->offset1; /* uint32_t */ uarg[3] = p->offset2; /* uint32_t */ iarg[4] = p->whence; /* int */ @@ -2433,7 +2433,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 479: { struct freebsd32_truncate_args *p = params; uarg[0] = (intptr_t)p->path; /* const char * */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->length1; /* uint32_t */ uarg[3] = p->length2; /* uint32_t */ *n_args = 4; @@ -2443,7 +2443,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 480: { struct freebsd32_ftruncate_args *p = params; iarg[0] = p->fd; /* int */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->length1; /* uint32_t */ uarg[3] = p->length2; /* uint32_t */ *n_args = 4; @@ -2542,7 +2542,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 485: { struct freebsd32_cpuset_setid_args *p = params; iarg[0] = p->which; /* cpuwhich_t */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->id1; /* uint32_t */ uarg[3] = p->id2; /* uint32_t */ iarg[4] = p->setid; /* cpusetid_t */ @@ -2924,7 +2924,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 530: { struct freebsd32_posix_fallocate_args *p = params; iarg[0] = p->fd; /* int */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->offset1; /* uint32_t */ uarg[3] = p->offset2; /* uint32_t */ uarg[4] = p->len1; /* uint32_t */ @@ -2936,7 +2936,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 531: { struct freebsd32_posix_fadvise_args *p = params; iarg[0] = p->fd; /* int */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->offset1; /* uint32_t */ uarg[3] = p->offset2; /* uint32_t */ uarg[4] = p->len1; /* uint32_t */ @@ -2949,7 +2949,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 532: { struct freebsd32_wait6_args *p = params; iarg[0] = p->idtype; /* idtype_t */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->id1; /* uint32_t */ uarg[3] = p->id2; /* uint32_t */ uarg[4] = (intptr_t)p->status; /* int * */ @@ -3099,7 +3099,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 544: { struct freebsd32_procctl_args *p = params; iarg[0] = p->idtype; /* idtype_t */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->id1; /* uint32_t */ uarg[3] = p->id2; /* uint32_t */ iarg[4] = p->com; /* int */ @@ -3231,7 +3231,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->path; /* const char * */ iarg[2] = p->mode; /* mode_t */ - iarg[3] = p->pad; /* int */ + iarg[3] = p->_pad; /* int */ uarg[4] = p->dev1; /* uint32_t */ uarg[5] = p->dev2; /* uint32_t */ *n_args = 6; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 8a4f9b56b7d5..cb40aa8418e7 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -900,25 +900,25 @@ #ifdef PAD64_REQUIRED 475 AUE_PREAD STD { ssize_t freebsd32_pread(int fd, \ void *buf,size_t nbyte, \ - int pad, \ + int _pad, \ uint32_t offset1, uint32_t offset2); } 476 AUE_PWRITE STD { ssize_t freebsd32_pwrite(int fd, \ const void *buf, size_t nbyte, \ - int pad, \ + int _pad, \ uint32_t offset1, uint32_t offset2); } 477 AUE_MMAP STD { void *freebsd32_mmap(void *addr, \ size_t len, int prot, int flags, int fd, \ - int pad, \ + int _pad, \ uint32_t pos1, uint32_t pos2); } 478 AUE_LSEEK STD { off_t freebsd32_lseek(int fd, \ - int pad, \ + int _pad, \ uint32_t offset1, uint32_t offset2, \ int whence); } 479 AUE_TRUNCATE STD { int freebsd32_truncate(const char *path, \ - int pad, \ + int _pad, \ uint32_t length1, uint32_t length2); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ - int pad, \ + int _pad, \ uint32_t length1, uint32_t length2); } #else 475 AUE_PREAD STD { ssize_t freebsd32_pread(int fd, \ @@ -945,7 +945,7 @@ 484 AUE_NULL NOPROTO { int cpuset(cpusetid_t *setid); } #ifdef PAD64_REQUIRED 485 AUE_NULL STD { int freebsd32_cpuset_setid(cpuwhich_t which, \ - int pad, \ + int _pad, \ uint32_t id1, uint32_t id2, \ cpusetid_t setid); } #else @@ -1050,15 +1050,15 @@ size_t outbuflen); } #ifdef PAD64_REQUIRED 530 AUE_POSIX_FALLOCATE STD { int freebsd32_posix_fallocate(int fd, \ - int pad, \ + int _pad, \ uint32_t offset1, uint32_t offset2,\ uint32_t len1, uint32_t len2); } 531 AUE_POSIX_FADVISE STD { int freebsd32_posix_fadvise(int fd, \ - int pad, \ + int _pad, \ uint32_t offset1, uint32_t offset2,\ uint32_t len1, uint32_t len2, \ int advice); } -532 AUE_WAIT6 STD { int freebsd32_wait6(idtype_t idtype, int pad, \ +532 AUE_WAIT6 STD { int freebsd32_wait6(idtype_t idtype, int _pad, \ uint32_t id1, uint32_t id2, \ int *status, int options, \ struct __wrusage32 *wrusage, \ @@ -1106,7 +1106,7 @@ 543 AUE_AIO_MLOCK STD { int freebsd32_aio_mlock( \ struct aiocb32 *aiocbp); } #ifdef PAD64_REQUIRED -544 AUE_PROCCTL STD { int freebsd32_procctl(idtype_t idtype, int pad, \ +544 AUE_PROCCTL STD { int freebsd32_procctl(idtype_t idtype, int _pad, \ uint32_t id1, uint32_t id2, int com, \ void *data); } #else @@ -1147,7 +1147,7 @@ #ifdef PAD64_REQUIRED 559 AUE_MKNODAT STD { int freebsd32_mknodat(int fd, \ const char *path, mode_t mode, \ - int pad, uint32_t dev1, uint32_t dev2); } + int _pad, uint32_t dev1, uint32_t dev2); } #else 559 AUE_MKNODAT STD { int freebsd32_mknodat(int fd, \ const char *path, mode_t mode, \ From nobody Wed Nov 17 20:22:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 625E0185580E; Wed, 17 Nov 2021 20:22: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 4HvZ9k2rG8z4rCD; Wed, 17 Nov 2021 20:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2492127378; Wed, 17 Nov 2021 20:22: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 1AHKMoRn060243; Wed, 17 Nov 2021 20:22:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMouA060242; Wed, 17 Nov 2021 20:22:50 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:50 GMT Message-Id: <202111172022.1AHKMouA060242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: aef154d3f24f - main - freebsd32: use __socklen_t consistently List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aef154d3f24f167b834d2f9d135b3d4ff8f7d812 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=aef154d3f24f167b834d2f9d135b3d4ff8f7d812 commit aef154d3f24f167b834d2f9d135b3d4ff8f7d812 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: use __socklen_t consistently Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_systrace_args.c | 40 +++++++++++++------------- sys/compat/freebsd32/syscalls.master | 20 ++++++------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 611a59f1328e..1d39fc026802 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -213,7 +213,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct accept_args *p = params; iarg[0] = p->s; /* int */ uarg[1] = (intptr_t)p->name; /* struct sockaddr * */ - uarg[2] = (intptr_t)p->anamelen; /* int * */ + uarg[2] = (intptr_t)p->anamelen; /* __socklen_t * */ *n_args = 3; break; } @@ -222,7 +222,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct getpeername_args *p = params; iarg[0] = p->fdes; /* int */ uarg[1] = (intptr_t)p->asa; /* struct sockaddr * */ - uarg[2] = (intptr_t)p->alen; /* int * */ + uarg[2] = (intptr_t)p->alen; /* __socklen_t * */ *n_args = 3; break; } @@ -231,7 +231,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct getsockname_args *p = params; iarg[0] = p->fdes; /* int */ uarg[1] = (intptr_t)p->asa; /* struct sockaddr * */ - uarg[2] = (intptr_t)p->alen; /* int * */ + uarg[2] = (intptr_t)p->alen; /* __socklen_t * */ *n_args = 3; break; } @@ -586,7 +586,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct connect_args *p = params; iarg[0] = p->s; /* int */ uarg[1] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[2] = p->namelen; /* int */ + iarg[2] = p->namelen; /* __socklen_t */ *n_args = 3; break; } @@ -603,7 +603,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct bind_args *p = params; iarg[0] = p->s; /* int */ uarg[1] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[2] = p->namelen; /* int */ + iarg[2] = p->namelen; /* __socklen_t */ *n_args = 3; break; } @@ -614,7 +614,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[1] = p->level; /* int */ iarg[2] = p->name; /* int */ uarg[3] = (intptr_t)p->val; /* const void * */ - iarg[4] = p->valsize; /* int */ + iarg[4] = p->valsize; /* __socklen_t */ *n_args = 5; break; } @@ -649,7 +649,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[1] = p->level; /* int */ iarg[2] = p->name; /* int */ uarg[3] = (intptr_t)p->val; /* void * */ - uarg[4] = (intptr_t)p->avalsize; /* int * */ + uarg[4] = (intptr_t)p->avalsize; /* __socklen_t * */ *n_args = 5; break; } @@ -744,7 +744,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[2] = p->len; /* size_t */ iarg[3] = p->flags; /* int */ uarg[4] = (intptr_t)p->to; /* const struct sockaddr * */ - iarg[5] = p->tolen; /* int */ + iarg[5] = p->tolen; /* __socklen_t */ *n_args = 6; break; } @@ -3045,7 +3045,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ uarg[2] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[3] = p->namelen; /* int */ + iarg[3] = p->namelen; /* __socklen_t */ *n_args = 4; break; } @@ -3055,7 +3055,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ uarg[2] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[3] = p->namelen; /* int */ + iarg[3] = p->namelen; /* __socklen_t */ *n_args = 4; break; } @@ -3787,7 +3787,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct sockaddr *"; break; case 2: - p = "userland int *"; + p = "userland __socklen_t *"; break; default: break; @@ -3803,7 +3803,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct sockaddr *"; break; case 2: - p = "userland int *"; + p = "userland __socklen_t *"; break; default: break; @@ -3819,7 +3819,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct sockaddr *"; break; case 2: - p = "userland int *"; + p = "userland __socklen_t *"; break; default: break; @@ -4371,7 +4371,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 2: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -4400,7 +4400,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 2: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -4422,7 +4422,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const void *"; break; case 4: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -4483,7 +4483,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland void *"; break; case 4: - p = "userland int *"; + p = "userland __socklen_t *"; break; default: break; @@ -4647,7 +4647,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 5: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -8571,7 +8571,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 3: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -8590,7 +8590,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 3: - p = "int"; + p = "__socklen_t"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 517c0aa6ebbd..5167cdfb5574 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -115,13 +115,13 @@ struct sockaddr *from, \ __socklen_t *fromlenaddr); } 30 AUE_ACCEPT NOPROTO { int accept(int s, struct sockaddr *name, \ - int *anamelen); } + __socklen_t *anamelen); } 31 AUE_GETPEERNAME NOPROTO { int getpeername(int fdes, \ struct sockaddr *asa, \ - int *alen); } + __socklen_t *alen); } 32 AUE_GETSOCKNAME NOPROTO { int getsockname(int fdes, \ struct sockaddr *asa, \ - int *alen); } + __socklen_t *alen); } 33 AUE_ACCESS NOPROTO { int access(const char *path, int amode); } 34 AUE_CHFLAGS NOPROTO { int chflags(const char *path, u_long flags); } 35 AUE_FCHFLAGS NOPROTO { int fchflags(int fd, u_long flags); } @@ -221,7 +221,7 @@ int protocol); } 98 AUE_CONNECT NOPROTO { int connect(int s, \ const struct sockaddr *name, \ - int namelen); } + __socklen_t namelen); } 99 AUE_NULL COMPAT|NOPROTO { int accept(int s, \ struct sockaddr *name, \ __socklen_t *anamelen); } @@ -233,9 +233,9 @@ 103 AUE_SIGRETURN COMPAT { int freebsd32_sigreturn( \ struct ia32_sigcontext3 *sigcntxp); } 104 AUE_BIND NOPROTO { int bind(int s, const struct sockaddr *name, \ - int namelen); } + __socklen_t namelen); } 105 AUE_SETSOCKOPT NOPROTO { int setsockopt(int s, int level, \ - int name, const void *val, int valsize); } + int name, const void *val, __socklen_t valsize); } 106 AUE_LISTEN NOPROTO { int listen(int s, int backlog); } 107 AUE_NULL OBSOL vtimes 108 AUE_O_SIGVEC COMPAT { int freebsd32_sigvec(int signum, \ @@ -258,7 +258,7 @@ 117 AUE_GETRUSAGE STD { int freebsd32_getrusage(int who, \ struct rusage32 *rusage); } 118 AUE_GETSOCKOPT NOPROTO { int getsockopt(int s, int level, \ - int name, void *val, int *avalsize); } + int name, void *val, __socklen_t *avalsize); } 119 AUE_NULL RESERVED 120 AUE_READV STD { int freebsd32_readv(int fd, \ struct iovec32 *iovp, u_int iovcnt); } @@ -283,7 +283,7 @@ 133 AUE_SENDTO NOPROTO { int sendto(int s, const void *buf, \ size_t len, int flags, \ const struct sockaddr *to, \ - int tolen); } + __socklen_t tolen); } 134 AUE_SHUTDOWN NOPROTO { int shutdown(int s, int how); } 135 AUE_SOCKETPAIR NOPROTO { int socketpair(int domain, int type, \ int protocol, int *rsv); } @@ -1088,10 +1088,10 @@ uint32_t *fcntlrightsp); } 538 AUE_BINDAT NOPROTO { int bindat(int fd, int s, \ const struct sockaddr *name, \ - int namelen); } + __socklen_t namelen); } 539 AUE_CONNECTAT NOPROTO { int connectat(int fd, int s, \ const struct sockaddr *name, \ - int namelen); } + __socklen_t namelen); } 540 AUE_CHFLAGSAT NOPROTO { int chflagsat(int fd, const char *path, \ u_long flags, int atflag); } 541 AUE_ACCEPT NOPROTO { int accept4(int s, \ From nobody Wed Nov 17 20:22:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 795161855630; Wed, 17 Nov 2021 20:22: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 4HvZ9l444Rz4rN1; Wed, 17 Nov 2021 20:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F418E277FD; Wed, 17 Nov 2021 20:22: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 1AHKMmrY060219; Wed, 17 Nov 2021 20:22:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMmnt060218; Wed, 17 Nov 2021 20:22:48 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:48 GMT Message-Id: <202111172022.1AHKMmnt060218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 738ec2ed66d9 - main - freebsd32: tag RESERVED syscalls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 738ec2ed66d97f03ab01e6966964143317f01264 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=738ec2ed66d97f03ab01e6966964143317f01264 commit 738ec2ed66d97f03ab01e6966964143317f01264 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: tag RESERVED syscalls This reduces diffs when generating freebsd32 files from the default ABI's syscalls.master. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_syscalls.c | 116 ++++++++++++++--------------- sys/compat/freebsd32/freebsd32_sysent.c | 116 ++++++++++++++--------------- sys/compat/freebsd32/syscalls.master | 120 +++++++++++++++--------------- 3 files changed, 174 insertions(+), 178 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 7af646c17e3e..be0bb7e87dcb 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -100,10 +100,10 @@ const char *freebsd32_syscallnames[] = { "compat.sethostname", /* 88 = old sethostname */ "getdtablesize", /* 89 = getdtablesize */ "dup2", /* 90 = dup2 */ - "#91", /* 91 = getdopt */ + "#91", /* 91 = reserved for local use */ "freebsd32_fcntl", /* 92 = freebsd32_fcntl */ "freebsd32_select", /* 93 = freebsd32_select */ - "#94", /* 94 = setdopt */ + "#94", /* 94 = reserved for local use */ "fsync", /* 95 = fsync */ "setpriority", /* 96 = setpriority */ "socket", /* 97 = socket */ @@ -128,7 +128,7 @@ const char *freebsd32_syscallnames[] = { "freebsd32_gettimeofday", /* 116 = freebsd32_gettimeofday */ "freebsd32_getrusage", /* 117 = freebsd32_getrusage */ "getsockopt", /* 118 = getsockopt */ - "#119", /* 119 = resuba */ + "#119", /* 119 = reserved for local use */ "freebsd32_readv", /* 120 = freebsd32_readv */ "freebsd32_writev", /* 121 = freebsd32_writev */ "freebsd32_settimeofday", /* 122 = freebsd32_settimeofday */ @@ -160,15 +160,15 @@ const char *freebsd32_syscallnames[] = { "quotactl", /* 148 = quotactl */ "compat.quota", /* 149 = old quota */ "compat.getsockname", /* 150 = old getsockname */ - "#151", /* 151 = sem_lock */ - "#152", /* 152 = sem_wakeup */ - "#153", /* 153 = asyncdaemon */ + "#151", /* 151 = reserved for local use */ + "#152", /* 152 = reserved for local use */ + "#153", /* 153 = reserved for local use */ "#154", /* 154 = nlm_syscall */ "#155", /* 155 = nfssvc */ "compat.freebsd32_getdirentries", /* 156 = old freebsd32_getdirentries */ "compat4.freebsd32_statfs", /* 157 = freebsd4 freebsd32_statfs */ "compat4.freebsd32_fstatfs", /* 158 = freebsd4 freebsd32_fstatfs */ - "#159", /* 159 = nosys */ + "#159", /* 159 = reserved for local use */ "#160", /* 160 = lgetfh */ "getfh", /* 161 = getfh */ "compat4.getdomainname", /* 162 = freebsd4 getdomainname */ @@ -176,20 +176,20 @@ const char *freebsd32_syscallnames[] = { "compat4.uname", /* 164 = freebsd4 uname */ "freebsd32_sysarch", /* 165 = freebsd32_sysarch */ "rtprio", /* 166 = rtprio */ - "#167", /* 167 = nosys */ - "#168", /* 168 = nosys */ + "#167", /* 167 = reserved for local use */ + "#168", /* 168 = reserved for local use */ "freebsd32_semsys", /* 169 = freebsd32_semsys */ "freebsd32_msgsys", /* 170 = freebsd32_msgsys */ "freebsd32_shmsys", /* 171 = freebsd32_shmsys */ - "#172", /* 172 = nosys */ + "#172", /* 172 = reserved for local use */ "compat6.freebsd32_pread", /* 173 = freebsd6 freebsd32_pread */ "compat6.freebsd32_pwrite", /* 174 = freebsd6 freebsd32_pwrite */ "setfib", /* 175 = setfib */ "freebsd32_ntp_adjtime", /* 176 = freebsd32_ntp_adjtime */ - "#177", /* 177 = sfork */ - "#178", /* 178 = getdescriptor */ - "#179", /* 179 = setdescriptor */ - "#180", /* 180 = nosys */ + "#177", /* 177 = reserved for local use */ + "#178", /* 178 = reserved for local use */ + "#179", /* 179 = reserved for local use */ + "#180", /* 180 = reserved for local use */ "setgid", /* 181 = setgid */ "setegid", /* 182 = setegid */ "seteuid", /* 183 = seteuid */ @@ -202,7 +202,7 @@ const char *freebsd32_syscallnames[] = { "compat11.freebsd32_lstat", /* 190 = freebsd11 freebsd32_lstat */ "pathconf", /* 191 = pathconf */ "fpathconf", /* 192 = fpathconf */ - "#193", /* 193 = nosys */ + "#193", /* 193 = reserved for local use */ "getrlimit", /* 194 = getrlimit */ "setrlimit", /* 195 = setrlimit */ "compat11.freebsd32_getdirentries", /* 196 = freebsd11 freebsd32_getdirentries */ @@ -217,7 +217,7 @@ const char *freebsd32_syscallnames[] = { "undelete", /* 205 = undelete */ "freebsd32_futimes", /* 206 = freebsd32_futimes */ "getpgid", /* 207 = getpgid */ - "#208", /* 208 = nosys */ + "#208", /* 208 = reserved for local use */ "poll", /* 209 = poll */ "lkmnosys", /* 210 = lkmnosys */ "lkmnosys", /* 211 = lkmnosys */ @@ -254,11 +254,11 @@ const char *freebsd32_syscallnames[] = { "freebsd32_ffclock_setestimate", /* 242 = freebsd32_ffclock_setestimate */ "freebsd32_ffclock_getestimate", /* 243 = freebsd32_ffclock_getestimate */ "freebsd32_clock_nanosleep", /* 244 = freebsd32_clock_nanosleep */ - "#245", /* 245 = nosys */ - "#246", /* 246 = nosys */ + "#245", /* 245 = reserved for local use */ + "#246", /* 246 = reserved for local use */ "freebsd32_clock_getcpuclockid2", /* 247 = freebsd32_clock_getcpuclockid2 */ "#248", /* 248 = ntp_gettime */ - "#249", /* 249 = nosys */ + "#249", /* 249 = reserved for local use */ "minherit", /* 250 = minherit */ "rfork", /* 251 = rfork */ "obs_openbsd_poll", /* 252 = obsolete openbsd_poll */ @@ -267,22 +267,22 @@ const char *freebsd32_syscallnames[] = { "freebsd32_aio_read", /* 255 = freebsd32_aio_read */ "freebsd32_aio_write", /* 256 = freebsd32_aio_write */ "freebsd32_lio_listio", /* 257 = freebsd32_lio_listio */ - "#258", /* 258 = nosys */ - "#259", /* 259 = nosys */ - "#260", /* 260 = nosys */ - "#261", /* 261 = nosys */ - "#262", /* 262 = nosys */ - "#263", /* 263 = nosys */ - "#264", /* 264 = nosys */ - "#265", /* 265 = nosys */ - "#266", /* 266 = nosys */ - "#267", /* 267 = nosys */ - "#268", /* 268 = nosys */ - "#269", /* 269 = nosys */ - "#270", /* 270 = nosys */ - "#271", /* 271 = nosys */ + "#258", /* 258 = reserved for local use */ + "#259", /* 259 = reserved for local use */ + "#260", /* 260 = reserved for local use */ + "#261", /* 261 = reserved for local use */ + "#262", /* 262 = reserved for local use */ + "#263", /* 263 = reserved for local use */ + "#264", /* 264 = reserved for local use */ + "#265", /* 265 = reserved for local use */ + "#266", /* 266 = reserved for local use */ + "#267", /* 267 = reserved for local use */ + "#268", /* 268 = reserved for local use */ + "#269", /* 269 = reserved for local use */ + "#270", /* 270 = reserved for local use */ + "#271", /* 271 = reserved for local use */ "compat11.getdents", /* 272 = freebsd11 getdents */ - "#273", /* 273 = nosys */ + "#273", /* 273 = reserved for local use */ "lchmod", /* 274 = lchmod */ "obs_netbsd_lchown", /* 275 = obsolete netbsd_lchown */ "freebsd32_lutimes", /* 276 = freebsd32_lutimes */ @@ -290,14 +290,14 @@ const char *freebsd32_syscallnames[] = { "compat11.nstat", /* 278 = freebsd11 nstat */ "compat11.nfstat", /* 279 = freebsd11 nfstat */ "compat11.nlstat", /* 280 = freebsd11 nlstat */ - "#281", /* 281 = nosys */ - "#282", /* 282 = nosys */ - "#283", /* 283 = nosys */ - "#284", /* 284 = nosys */ - "#285", /* 285 = nosys */ - "#286", /* 286 = nosys */ - "#287", /* 287 = nosys */ - "#288", /* 288 = nosys */ + "#281", /* 281 = reserved for local use */ + "#282", /* 282 = reserved for local use */ + "#283", /* 283 = reserved for local use */ + "#284", /* 284 = reserved for local use */ + "#285", /* 285 = reserved for local use */ + "#286", /* 286 = reserved for local use */ + "#287", /* 287 = reserved for local use */ + "#288", /* 288 = reserved for local use */ #ifdef PAD64_REQUIRED "freebsd32_preadv", /* 289 = freebsd32_preadv */ "freebsd32_pwritev", /* 290 = freebsd32_pwritev */ @@ -305,12 +305,12 @@ const char *freebsd32_syscallnames[] = { "freebsd32_preadv", /* 289 = freebsd32_preadv */ "freebsd32_pwritev", /* 290 = freebsd32_pwritev */ #endif - "#291", /* 291 = nosys */ - "#292", /* 292 = nosys */ - "#293", /* 293 = nosys */ - "#294", /* 294 = nosys */ - "#295", /* 295 = nosys */ - "#296", /* 296 = nosys */ + "#291", /* 291 = reserved for local use */ + "#292", /* 292 = reserved for local use */ + "#293", /* 293 = reserved for local use */ + "#294", /* 294 = reserved for local use */ + "#295", /* 295 = reserved for local use */ + "#296", /* 296 = reserved for local use */ "compat4.freebsd32_fhstatfs", /* 297 = freebsd4 freebsd32_fhstatfs */ "fhopen", /* 298 = fhopen */ "compat11.freebsd32_fhstat", /* 299 = freebsd11 freebsd32_fhstat */ @@ -384,7 +384,7 @@ const char *freebsd32_syscallnames[] = { "obs___cap_get_file", /* 367 = obsolete __cap_get_file */ "obs___cap_set_fd", /* 368 = obsolete __cap_set_fd */ "obs___cap_set_file", /* 369 = obsolete __cap_set_file */ - "#370", /* 370 = nosys */ + "#370", /* 370 = reserved for local use */ "extattr_set_fd", /* 371 = extattr_set_fd */ "extattr_get_fd", /* 372 = extattr_get_fd */ "extattr_delete_fd", /* 373 = extattr_delete_fd */ @@ -413,7 +413,7 @@ const char *freebsd32_syscallnames[] = { "compat11.statfs", /* 396 = freebsd11 statfs */ "compat11.fstatfs", /* 397 = freebsd11 fstatfs */ "compat11.fhstatfs", /* 398 = freebsd11 fhstatfs */ - "#399", /* 399 = nosys */ + "#399", /* 399 = reserved for local use */ "ksem_close", /* 400 = ksem_close */ "ksem_post", /* 401 = ksem_post */ "ksem_wait", /* 402 = ksem_wait */ @@ -432,9 +432,9 @@ const char *freebsd32_syscallnames[] = { "#415", /* 415 = __mac_execve */ "freebsd32_sigaction", /* 416 = freebsd32_sigaction */ "freebsd32_sigreturn", /* 417 = freebsd32_sigreturn */ - "#418", /* 418 = __xstat */ - "#419", /* 419 = __xfstat */ - "#420", /* 420 = __xlstat */ + "#418", /* 418 = reserved for local use */ + "#419", /* 419 = reserved for local use */ + "#420", /* 420 = reserved for local use */ "freebsd32_getcontext", /* 421 = freebsd32_getcontext */ "freebsd32_setcontext", /* 422 = freebsd32_setcontext */ "freebsd32_swapcontext", /* 423 = freebsd32_swapcontext */ @@ -481,10 +481,10 @@ const char *freebsd32_syscallnames[] = { "thr_set_name", /* 464 = thr_set_name */ "freebsd32_aio_fsync", /* 465 = freebsd32_aio_fsync */ "rtprio_thread", /* 466 = rtprio_thread */ - "#467", /* 467 = nosys */ - "#468", /* 468 = nosys */ - "#469", /* 469 = __getpath_fromfd */ - "#470", /* 470 = __getpath_fromaddr */ + "#467", /* 467 = reserved for local use */ + "#468", /* 468 = reserved for local use */ + "#469", /* 469 = reserved for local use */ + "#470", /* 470 = reserved for local use */ "sctp_peeloff", /* 471 = sctp_peeloff */ "sctp_generic_sendmsg", /* 472 = sctp_generic_sendmsg */ "sctp_generic_sendmsg_iov", /* 473 = sctp_generic_sendmsg_iov */ @@ -548,7 +548,7 @@ const char *freebsd32_syscallnames[] = { "pdfork", /* 518 = pdfork */ "pdkill", /* 519 = pdkill */ "pdgetpid", /* 520 = pdgetpid */ - "#521", /* 521 = pdwait4 */ + "#521", /* 521 = reserved for local use */ "freebsd32_pselect", /* 522 = freebsd32_pselect */ "getloginclass", /* 523 = getloginclass */ "setloginclass", /* 524 = setloginclass */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 1960cddc0542..0f17ff400668 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -153,10 +153,10 @@ struct sysent freebsd32_sysent[] = { { compat(AS(osethostname_args),sethostname), .sy_auevent = AUE_O_SETHOSTNAME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 88 = old sethostname */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getdtablesize, .sy_auevent = AUE_GETDTABLESIZE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 89 = getdtablesize */ { .sy_narg = AS(dup2_args), .sy_call = (sy_call_t *)sys_dup2, .sy_auevent = AUE_DUP2, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 90 = dup2 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 91 = getdopt */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 91 = reserved for local use */ { .sy_narg = AS(freebsd32_fcntl_args), .sy_call = (sy_call_t *)freebsd32_fcntl, .sy_auevent = AUE_FCNTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 92 = freebsd32_fcntl */ { .sy_narg = AS(freebsd32_select_args), .sy_call = (sy_call_t *)freebsd32_select, .sy_auevent = AUE_SELECT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 93 = freebsd32_select */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 94 = setdopt */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 94 = reserved for local use */ { .sy_narg = AS(fsync_args), .sy_call = (sy_call_t *)sys_fsync, .sy_auevent = AUE_FSYNC, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 95 = fsync */ { .sy_narg = AS(setpriority_args), .sy_call = (sy_call_t *)sys_setpriority, .sy_auevent = AUE_SETPRIORITY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 96 = setpriority */ { .sy_narg = AS(socket_args), .sy_call = (sy_call_t *)sys_socket, .sy_auevent = AUE_SOCKET, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 97 = socket */ @@ -181,7 +181,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_gettimeofday_args), .sy_call = (sy_call_t *)freebsd32_gettimeofday, .sy_auevent = AUE_GETTIMEOFDAY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 116 = freebsd32_gettimeofday */ { .sy_narg = AS(freebsd32_getrusage_args), .sy_call = (sy_call_t *)freebsd32_getrusage, .sy_auevent = AUE_GETRUSAGE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 117 = freebsd32_getrusage */ { .sy_narg = AS(getsockopt_args), .sy_call = (sy_call_t *)sys_getsockopt, .sy_auevent = AUE_GETSOCKOPT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 118 = getsockopt */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 119 = resuba */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 119 = reserved for local use */ { .sy_narg = AS(freebsd32_readv_args), .sy_call = (sy_call_t *)freebsd32_readv, .sy_auevent = AUE_READV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 120 = freebsd32_readv */ { .sy_narg = AS(freebsd32_writev_args), .sy_call = (sy_call_t *)freebsd32_writev, .sy_auevent = AUE_WRITEV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 121 = freebsd32_writev */ { .sy_narg = AS(freebsd32_settimeofday_args), .sy_call = (sy_call_t *)freebsd32_settimeofday, .sy_auevent = AUE_SETTIMEOFDAY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 122 = freebsd32_settimeofday */ @@ -213,15 +213,15 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(quotactl_args), .sy_call = (sy_call_t *)sys_quotactl, .sy_auevent = AUE_QUOTACTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 148 = quotactl */ { compat(0,quota), .sy_auevent = AUE_O_QUOTA, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 149 = old quota */ { compat(0,getsockname), .sy_auevent = AUE_GETSOCKNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 150 = old getsockname */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 151 = sem_lock */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 152 = sem_wakeup */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 153 = asyncdaemon */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 151 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 152 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 153 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 154 = nlm_syscall */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 155 = nfssvc */ { compat(AS(ofreebsd32_getdirentries_args),freebsd32_getdirentries), .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 156 = old freebsd32_getdirentries */ { compat4(AS(freebsd4_freebsd32_statfs_args),freebsd32_statfs), .sy_auevent = AUE_STATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 157 = freebsd4 freebsd32_statfs */ { compat4(AS(freebsd4_freebsd32_fstatfs_args),freebsd32_fstatfs), .sy_auevent = AUE_FSTATFS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 158 = freebsd4 freebsd32_fstatfs */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 159 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 159 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 160 = lgetfh */ { .sy_narg = AS(getfh_args), .sy_call = (sy_call_t *)sys_getfh, .sy_auevent = AUE_NFS_GETFH, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 161 = getfh */ { compat4(AS(freebsd4_getdomainname_args),getdomainname), .sy_auevent = AUE_SYSCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 162 = freebsd4 getdomainname */ @@ -229,20 +229,20 @@ struct sysent freebsd32_sysent[] = { { compat4(AS(freebsd4_uname_args),uname), .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 164 = freebsd4 uname */ { .sy_narg = AS(freebsd32_sysarch_args), .sy_call = (sy_call_t *)freebsd32_sysarch, .sy_auevent = AUE_SYSARCH, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 165 = freebsd32_sysarch */ { .sy_narg = AS(rtprio_args), .sy_call = (sy_call_t *)sys_rtprio, .sy_auevent = AUE_RTPRIO, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 166 = rtprio */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 167 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 168 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 167 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 168 = reserved for local use */ { .sy_narg = AS(freebsd32_semsys_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 169 = freebsd32_semsys */ { .sy_narg = AS(freebsd32_msgsys_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 170 = freebsd32_msgsys */ { .sy_narg = AS(freebsd32_shmsys_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 171 = freebsd32_shmsys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 172 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 172 = reserved for local use */ { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), .sy_auevent = AUE_PREAD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 173 = freebsd6 freebsd32_pread */ { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), .sy_auevent = AUE_PWRITE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 174 = freebsd6 freebsd32_pwrite */ { .sy_narg = AS(setfib_args), .sy_call = (sy_call_t *)sys_setfib, .sy_auevent = AUE_SETFIB, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 175 = setfib */ { .sy_narg = AS(freebsd32_ntp_adjtime_args), .sy_call = (sy_call_t *)freebsd32_ntp_adjtime, .sy_auevent = AUE_NTP_ADJTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 176 = freebsd32_ntp_adjtime */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 177 = sfork */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 178 = getdescriptor */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 179 = setdescriptor */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 180 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 177 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 178 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 179 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 180 = reserved for local use */ { .sy_narg = AS(setgid_args), .sy_call = (sy_call_t *)sys_setgid, .sy_auevent = AUE_SETGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 181 = setgid */ { .sy_narg = AS(setegid_args), .sy_call = (sy_call_t *)sys_setegid, .sy_auevent = AUE_SETEGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 182 = setegid */ { .sy_narg = AS(seteuid_args), .sy_call = (sy_call_t *)sys_seteuid, .sy_auevent = AUE_SETEUID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 183 = seteuid */ @@ -255,7 +255,7 @@ struct sysent freebsd32_sysent[] = { { compat11(AS(freebsd11_freebsd32_lstat_args),freebsd32_lstat), .sy_auevent = AUE_LSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 190 = freebsd11 freebsd32_lstat */ { .sy_narg = AS(pathconf_args), .sy_call = (sy_call_t *)sys_pathconf, .sy_auevent = AUE_PATHCONF, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 191 = pathconf */ { .sy_narg = AS(fpathconf_args), .sy_call = (sy_call_t *)sys_fpathconf, .sy_auevent = AUE_FPATHCONF, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 192 = fpathconf */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 193 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 193 = reserved for local use */ { .sy_narg = AS(__getrlimit_args), .sy_call = (sy_call_t *)sys_getrlimit, .sy_auevent = AUE_GETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 194 = getrlimit */ { .sy_narg = AS(__setrlimit_args), .sy_call = (sy_call_t *)sys_setrlimit, .sy_auevent = AUE_SETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 195 = setrlimit */ { compat11(AS(freebsd11_freebsd32_getdirentries_args),freebsd32_getdirentries), .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 196 = freebsd11 freebsd32_getdirentries */ @@ -270,7 +270,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(undelete_args), .sy_call = (sy_call_t *)sys_undelete, .sy_auevent = AUE_UNDELETE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 205 = undelete */ { .sy_narg = AS(freebsd32_futimes_args), .sy_call = (sy_call_t *)freebsd32_futimes, .sy_auevent = AUE_FUTIMES, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 206 = freebsd32_futimes */ { .sy_narg = AS(getpgid_args), .sy_call = (sy_call_t *)sys_getpgid, .sy_auevent = AUE_GETPGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 207 = getpgid */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 208 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 208 = reserved for local use */ { .sy_narg = AS(poll_args), .sy_call = (sy_call_t *)sys_poll, .sy_auevent = AUE_POLL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 209 = poll */ { .sy_narg = AS(nosys_args), .sy_call = (sy_call_t *)lkmnosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 210 = lkmnosys */ { .sy_narg = AS(nosys_args), .sy_call = (sy_call_t *)lkmnosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 211 = lkmnosys */ @@ -307,11 +307,11 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_ffclock_setestimate_args), .sy_call = (sy_call_t *)freebsd32_ffclock_setestimate, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 242 = freebsd32_ffclock_setestimate */ { .sy_narg = AS(freebsd32_ffclock_getestimate_args), .sy_call = (sy_call_t *)freebsd32_ffclock_getestimate, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 243 = freebsd32_ffclock_getestimate */ { .sy_narg = AS(freebsd32_clock_nanosleep_args), .sy_call = (sy_call_t *)freebsd32_clock_nanosleep, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 244 = freebsd32_clock_nanosleep */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 245 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 246 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 245 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 246 = reserved for local use */ { .sy_narg = AS(freebsd32_clock_getcpuclockid2_args), .sy_call = (sy_call_t *)freebsd32_clock_getcpuclockid2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 247 = freebsd32_clock_getcpuclockid2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 248 = ntp_gettime */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 249 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 249 = reserved for local use */ { .sy_narg = AS(minherit_args), .sy_call = (sy_call_t *)sys_minherit, .sy_auevent = AUE_MINHERIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 250 = minherit */ { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 252 = obsolete openbsd_poll */ @@ -320,22 +320,22 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_aio_read_args), .sy_call = (sy_call_t *)freebsd32_aio_read, .sy_auevent = AUE_AIO_READ, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 255 = freebsd32_aio_read */ { .sy_narg = AS(freebsd32_aio_write_args), .sy_call = (sy_call_t *)freebsd32_aio_write, .sy_auevent = AUE_AIO_WRITE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 256 = freebsd32_aio_write */ { .sy_narg = AS(freebsd32_lio_listio_args), .sy_call = (sy_call_t *)freebsd32_lio_listio, .sy_auevent = AUE_LIO_LISTIO, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 257 = freebsd32_lio_listio */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 258 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 259 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 260 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 261 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 262 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 263 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 264 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 265 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 266 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 267 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 268 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 269 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 270 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 271 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 258 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 259 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 260 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 261 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 262 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 263 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 264 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 265 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 266 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 267 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 268 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 269 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 270 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 271 = reserved for local use */ { compat11(AS(freebsd11_getdents_args),getdents), .sy_auevent = AUE_O_GETDENTS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 272 = freebsd11 getdents */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 273 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 273 = reserved for local use */ { .sy_narg = AS(lchmod_args), .sy_call = (sy_call_t *)sys_lchmod, .sy_auevent = AUE_LCHMOD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 274 = lchmod */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 275 = obsolete netbsd_lchown */ { .sy_narg = AS(freebsd32_lutimes_args), .sy_call = (sy_call_t *)freebsd32_lutimes, .sy_auevent = AUE_LUTIMES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 276 = freebsd32_lutimes */ @@ -343,14 +343,14 @@ struct sysent freebsd32_sysent[] = { { compat11(AS(freebsd11_nstat_args),nstat), .sy_auevent = AUE_STAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 278 = freebsd11 nstat */ { compat11(AS(freebsd11_nfstat_args),nfstat), .sy_auevent = AUE_FSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 279 = freebsd11 nfstat */ { compat11(AS(freebsd11_nlstat_args),nlstat), .sy_auevent = AUE_LSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 280 = freebsd11 nlstat */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 281 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 282 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 283 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 284 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 285 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 286 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 287 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 288 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 281 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 282 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 283 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 284 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 285 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 286 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 287 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 288 = reserved for local use */ #ifdef PAD64_REQUIRED { .sy_narg = AS(freebsd32_preadv_args), .sy_call = (sy_call_t *)freebsd32_preadv, .sy_auevent = AUE_PREADV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 289 = freebsd32_preadv */ { .sy_narg = AS(freebsd32_pwritev_args), .sy_call = (sy_call_t *)freebsd32_pwritev, .sy_auevent = AUE_PWRITEV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 290 = freebsd32_pwritev */ @@ -358,12 +358,12 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_preadv_args), .sy_call = (sy_call_t *)freebsd32_preadv, .sy_auevent = AUE_PREADV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 289 = freebsd32_preadv */ { .sy_narg = AS(freebsd32_pwritev_args), .sy_call = (sy_call_t *)freebsd32_pwritev, .sy_auevent = AUE_PWRITEV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 290 = freebsd32_pwritev */ #endif - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 291 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 292 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 293 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 294 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 295 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 296 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 291 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 292 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 293 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 294 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 295 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 296 = reserved for local use */ { compat4(AS(freebsd4_freebsd32_fhstatfs_args),freebsd32_fhstatfs), .sy_auevent = AUE_FHSTATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 297 = freebsd4 freebsd32_fhstatfs */ { .sy_narg = AS(fhopen_args), .sy_call = (sy_call_t *)sys_fhopen, .sy_auevent = AUE_FHOPEN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 298 = fhopen */ { compat11(AS(freebsd11_freebsd32_fhstat_args),freebsd32_fhstat), .sy_auevent = AUE_FHSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 299 = freebsd11 freebsd32_fhstat */ @@ -437,7 +437,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 367 = obsolete __cap_get_file */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 368 = obsolete __cap_set_fd */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 369 = obsolete __cap_set_file */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 370 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 370 = reserved for local use */ { .sy_narg = AS(extattr_set_fd_args), .sy_call = (sy_call_t *)sys_extattr_set_fd, .sy_auevent = AUE_EXTATTR_SET_FD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 371 = extattr_set_fd */ { .sy_narg = AS(extattr_get_fd_args), .sy_call = (sy_call_t *)sys_extattr_get_fd, .sy_auevent = AUE_EXTATTR_GET_FD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 372 = extattr_get_fd */ { .sy_narg = AS(extattr_delete_fd_args), .sy_call = (sy_call_t *)sys_extattr_delete_fd, .sy_auevent = AUE_EXTATTR_DELETE_FD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 373 = extattr_delete_fd */ @@ -466,7 +466,7 @@ struct sysent freebsd32_sysent[] = { { compat11(AS(freebsd11_statfs_args),statfs), .sy_auevent = AUE_STATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 396 = freebsd11 statfs */ { compat11(AS(freebsd11_fstatfs_args),fstatfs), .sy_auevent = AUE_FSTATFS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 397 = freebsd11 fstatfs */ { compat11(AS(freebsd11_fhstatfs_args),fhstatfs), .sy_auevent = AUE_FHSTATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 398 = freebsd11 fhstatfs */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 399 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 399 = reserved for local use */ { .sy_narg = AS(ksem_close_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 400 = ksem_close */ { .sy_narg = AS(ksem_post_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 401 = ksem_post */ { .sy_narg = AS(ksem_wait_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 402 = ksem_wait */ @@ -485,9 +485,9 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 415 = __mac_execve */ { .sy_narg = AS(freebsd32_sigaction_args), .sy_call = (sy_call_t *)freebsd32_sigaction, .sy_auevent = AUE_SIGACTION, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 416 = freebsd32_sigaction */ { .sy_narg = AS(freebsd32_sigreturn_args), .sy_call = (sy_call_t *)freebsd32_sigreturn, .sy_auevent = AUE_SIGRETURN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 417 = freebsd32_sigreturn */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 418 = __xstat */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 419 = __xfstat */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 420 = __xlstat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 418 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 419 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 420 = reserved for local use */ { .sy_narg = AS(freebsd32_getcontext_args), .sy_call = (sy_call_t *)freebsd32_getcontext, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 421 = freebsd32_getcontext */ { .sy_narg = AS(freebsd32_setcontext_args), .sy_call = (sy_call_t *)freebsd32_setcontext, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 422 = freebsd32_setcontext */ { .sy_narg = AS(freebsd32_swapcontext_args), .sy_call = (sy_call_t *)freebsd32_swapcontext, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 423 = freebsd32_swapcontext */ @@ -534,10 +534,10 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(thr_set_name_args), .sy_call = (sy_call_t *)sys_thr_set_name, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 464 = thr_set_name */ { .sy_narg = AS(freebsd32_aio_fsync_args), .sy_call = (sy_call_t *)freebsd32_aio_fsync, .sy_auevent = AUE_AIO_FSYNC, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 465 = freebsd32_aio_fsync */ { .sy_narg = AS(rtprio_thread_args), .sy_call = (sy_call_t *)sys_rtprio_thread, .sy_auevent = AUE_RTPRIO, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 466 = rtprio_thread */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 467 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 468 = nosys */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 469 = __getpath_fromfd */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 470 = __getpath_fromaddr */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 467 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 468 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 469 = reserved for local use */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 470 = reserved for local use */ { .sy_narg = AS(sctp_peeloff_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_ABSENT }, /* 471 = sctp_peeloff */ { .sy_narg = AS(sctp_generic_sendmsg_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_ABSENT }, /* 472 = sctp_generic_sendmsg */ { .sy_narg = AS(sctp_generic_sendmsg_iov_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_ABSENT }, /* 473 = sctp_generic_sendmsg_iov */ @@ -601,7 +601,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(pdfork_args), .sy_call = (sy_call_t *)sys_pdfork, .sy_auevent = AUE_PDFORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 518 = pdfork */ { .sy_narg = AS(pdkill_args), .sy_call = (sy_call_t *)sys_pdkill, .sy_auevent = AUE_PDKILL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 519 = pdkill */ { .sy_narg = AS(pdgetpid_args), .sy_call = (sy_call_t *)sys_pdgetpid, .sy_auevent = AUE_PDGETPID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 520 = pdgetpid */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 521 = pdwait4 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 521 = reserved for local use */ { .sy_narg = AS(freebsd32_pselect_args), .sy_call = (sy_call_t *)freebsd32_pselect, .sy_auevent = AUE_SELECT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 522 = freebsd32_pselect */ { .sy_narg = AS(getloginclass_args), .sy_call = (sy_call_t *)sys_getloginclass, .sy_auevent = AUE_GETLOGINCLASS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 523 = getloginclass */ { .sy_narg = AS(setloginclass_args), .sy_call = (sy_call_t *)sys_setloginclass, .sy_auevent = AUE_SETLOGINCLASS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 524 = setloginclass */ diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index cb40aa8418e7..517c0aa6ebbd 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -207,13 +207,13 @@ char *hostname, u_int len); } 89 AUE_GETDTABLESIZE NOPROTO { int getdtablesize(void); } 90 AUE_DUP2 NOPROTO { int dup2(u_int from, u_int to); } -91 AUE_NULL UNIMPL getdopt +91 AUE_NULL RESERVED 92 AUE_FCNTL STD { int freebsd32_fcntl(int fd, int cmd, \ int arg); } 93 AUE_SELECT STD { int freebsd32_select(int nd, fd_set *in, \ fd_set *ou, fd_set *ex, \ struct timeval32 *tv); } -94 AUE_NULL UNIMPL setdopt +94 AUE_NULL RESERVED 95 AUE_FSYNC NOPROTO { int fsync(int fd); } 96 AUE_SETPRIORITY NOPROTO { int setpriority(int which, int who, \ int prio); } @@ -259,7 +259,7 @@ struct rusage32 *rusage); } 118 AUE_GETSOCKOPT NOPROTO { int getsockopt(int s, int level, \ int name, void *val, int *avalsize); } -119 AUE_NULL UNIMPL resuba (BSD/OS 2.x) +119 AUE_NULL RESERVED 120 AUE_READV STD { int freebsd32_readv(int fd, \ struct iovec32 *iovp, u_int iovcnt); } 121 AUE_WRITEV STD { int freebsd32_writev(int fd, \ @@ -311,13 +311,9 @@ 149 AUE_O_QUOTA COMPAT|NOPROTO { int quota(void); } 150 AUE_GETSOCKNAME COMPAT|NOPROTO getsockname -; Syscalls 151-180 inclusive are reserved for vendor-specific -; system calls. (This includes various calls added for compatibity -; with other Unix variants.) -; Some of these calls are now supported by BSD... -151 AUE_NULL UNIMPL sem_lock (BSD/OS 2.x) -152 AUE_NULL UNIMPL sem_wakeup (BSD/OS 2.x) -153 AUE_NULL UNIMPL asyncdaemon (BSD/OS 2.x) +151 AUE_NULL RESERVED +152 AUE_NULL RESERVED +153 AUE_NULL RESERVED ; 154 is initialised by the NLM code, if present. 154 AUE_NULL UNIMPL nlm_syscall ; 155 is initialized by the NFS code, if present. @@ -329,7 +325,7 @@ struct ostatfs32 *buf); } 158 AUE_FSTATFS COMPAT4 { int freebsd32_fstatfs(int fd, \ struct ostatfs32 *buf); } -159 AUE_NULL UNIMPL nosys +159 AUE_NULL RESERVED 160 AUE_LGETFH UNIMPL lgetfh 161 AUE_NFS_GETFH NOPROTO { int getfh(const char *fname, \ struct fhandle *fhp); } @@ -341,15 +337,15 @@ 165 AUE_SYSARCH STD { int freebsd32_sysarch(int op, char *parms); } 166 AUE_RTPRIO NOPROTO { int rtprio(int function, pid_t pid, \ struct rtprio *rtp); } -167 AUE_NULL UNIMPL nosys -168 AUE_NULL UNIMPL nosys +167 AUE_NULL RESERVED +168 AUE_NULL RESERVED 169 AUE_SEMSYS NOSTD { int freebsd32_semsys(int which, int a2, \ int a3, int a4, int a5); } 170 AUE_MSGSYS NOSTD { int freebsd32_msgsys(int which, int a2, \ int a3, int a4, int a5, int a6); } 171 AUE_SHMSYS NOSTD { int freebsd32_shmsys(uint32_t which, uint32_t a2, \ uint32_t a3, uint32_t a4); } -172 AUE_NULL UNIMPL nosys +172 AUE_NULL RESERVED 173 AUE_PREAD COMPAT6 { ssize_t freebsd32_pread(int fd, void *buf, \ size_t nbyte, int pad, \ uint32_t offset1, uint32_t offset2); } @@ -359,10 +355,10 @@ 175 AUE_SETFIB NOPROTO { int setfib(int fibnum); } 176 AUE_NTP_ADJTIME STD { int freebsd32_ntp_adjtime( \ struct timex32 *tp); } -177 AUE_NULL UNIMPL sfork (BSD/OS 2.x) -178 AUE_NULL UNIMPL getdescriptor (BSD/OS 2.x) -179 AUE_NULL UNIMPL setdescriptor (BSD/OS 2.x) -180 AUE_NULL UNIMPL nosys +177 AUE_NULL RESERVED +178 AUE_NULL RESERVED +179 AUE_NULL RESERVED +180 AUE_NULL RESERVED ; Syscalls 181-199 are used by/reserved for BSD 181 AUE_SETGID NOPROTO { int setgid(gid_t gid); } @@ -380,7 +376,7 @@ struct freebsd11_stat32 *ub); } 191 AUE_PATHCONF NOPROTO { int pathconf(const char *path, int name); } 192 AUE_FPATHCONF NOPROTO { int fpathconf(int fd, int name); } -193 AUE_NULL UNIMPL nosys +193 AUE_NULL RESERVED 194 AUE_GETRLIMIT NOPROTO { int getrlimit(u_int which, \ struct rlimit *rlp); } getrlimit \ __getrlimit_args int @@ -414,7 +410,7 @@ 206 AUE_FUTIMES STD { int freebsd32_futimes(int fd, \ const struct timeval32 *tptr); } 207 AUE_GETPGID NOPROTO { int getpgid(pid_t pid); } -208 AUE_NULL UNIMPL nosys +208 AUE_NULL RESERVED 209 AUE_POLL NOPROTO { int poll(struct pollfd *fds, u_int nfds, \ int timeout); } @@ -486,13 +482,13 @@ clockid_t clock_id, int flags, \ const struct timespec32 *rqtp, \ struct timespec32 *rmtp); } -245 AUE_NULL UNIMPL nosys -246 AUE_NULL UNIMPL nosys +245 AUE_NULL RESERVED +246 AUE_NULL RESERVED 247 AUE_NULL STD { int freebsd32_clock_getcpuclockid2(\ uint32_t id1, uint32_t id2,\ int which, clockid_t *clock_id); } 248 AUE_NULL UNIMPL ntp_gettime -249 AUE_NULL UNIMPL nosys +249 AUE_NULL RESERVED 250 AUE_MINHERIT NOPROTO { int minherit(void *addr, size_t len, \ int inherit); } 251 AUE_RFORK NOPROTO { int rfork(int flags); } @@ -507,23 +503,23 @@ 257 AUE_LIO_LISTIO STD { int freebsd32_lio_listio(int mode, \ uint32_t *acb_list, \ int nent, struct sigevent32 *sig); } -258 AUE_NULL UNIMPL nosys -259 AUE_NULL UNIMPL nosys -260 AUE_NULL UNIMPL nosys -261 AUE_NULL UNIMPL nosys -262 AUE_NULL UNIMPL nosys -263 AUE_NULL UNIMPL nosys -264 AUE_NULL UNIMPL nosys -265 AUE_NULL UNIMPL nosys -266 AUE_NULL UNIMPL nosys -267 AUE_NULL UNIMPL nosys -268 AUE_NULL UNIMPL nosys -269 AUE_NULL UNIMPL nosys -270 AUE_NULL UNIMPL nosys -271 AUE_NULL UNIMPL nosys +258 AUE_NULL RESERVED +259 AUE_NULL RESERVED +260 AUE_NULL RESERVED +261 AUE_NULL RESERVED +262 AUE_NULL RESERVED +263 AUE_NULL RESERVED +264 AUE_NULL RESERVED +265 AUE_NULL RESERVED +266 AUE_NULL RESERVED +267 AUE_NULL RESERVED +268 AUE_NULL RESERVED +269 AUE_NULL RESERVED +270 AUE_NULL RESERVED +271 AUE_NULL RESERVED 272 AUE_O_GETDENTS COMPAT11|NOPROTO { int getdents(int fd, char *buf, \ int count); } -273 AUE_NULL UNIMPL nosys +273 AUE_NULL RESERVED 274 AUE_LCHMOD NOPROTO { int lchmod(const char *path, mode_t mode); } 275 AUE_NULL OBSOL netbsd_lchown 276 AUE_LUTIMES STD { int freebsd32_lutimes(const char *path, \ @@ -534,14 +530,14 @@ 279 AUE_FSTAT COMPAT11|NOPROTO { int nfstat(int fd, struct nstat *sb); } 280 AUE_LSTAT COMPAT11|NOPROTO { int nlstat(const char *path, \ struct nstat *ub); } -281 AUE_NULL UNIMPL nosys -282 AUE_NULL UNIMPL nosys -283 AUE_NULL UNIMPL nosys -284 AUE_NULL UNIMPL nosys -285 AUE_NULL UNIMPL nosys -286 AUE_NULL UNIMPL nosys -287 AUE_NULL UNIMPL nosys -288 AUE_NULL UNIMPL nosys +281 AUE_NULL RESERVED +282 AUE_NULL RESERVED +283 AUE_NULL RESERVED +284 AUE_NULL RESERVED +285 AUE_NULL RESERVED +286 AUE_NULL RESERVED +287 AUE_NULL RESERVED +288 AUE_NULL RESERVED #ifdef PAD64_REQUIRED 289 AUE_PREADV STD { ssize_t freebsd32_preadv(int fd, \ struct iovec32 *iovp, \ @@ -563,12 +559,12 @@ u_int iovcnt, \ uint32_t offset1, uint32_t offset2); } #endif -291 AUE_NULL UNIMPL nosys -292 AUE_NULL UNIMPL nosys -293 AUE_NULL UNIMPL nosys -294 AUE_NULL UNIMPL nosys -295 AUE_NULL UNIMPL nosys -296 AUE_NULL UNIMPL nosys +291 AUE_NULL RESERVED +292 AUE_NULL RESERVED +293 AUE_NULL RESERVED +294 AUE_NULL RESERVED +295 AUE_NULL RESERVED +296 AUE_NULL RESERVED 297 AUE_FHSTATFS COMPAT4 { int freebsd32_fhstatfs( \ const struct fhandle *u_fhp, \ struct ostatfs32 *buf); } @@ -708,7 +704,7 @@ 367 AUE_NULL OBSOL __cap_get_file 368 AUE_NULL OBSOL __cap_set_fd 369 AUE_NULL OBSOL __cap_set_file -370 AUE_NULL UNIMPL nosys +370 AUE_NULL RESERVED 371 AUE_EXTATTR_SET_FD NOPROTO { ssize_t extattr_set_fd(int fd, \ int attrnamespace, const char *attrname, \ void *data, size_t nbytes); } @@ -756,7 +752,7 @@ 398 AUE_FHSTATFS COMPAT11|NOPROTO { int fhstatfs( \ const struct fhandle *u_fhp, \ struct freebsd11_statfs *buf); } -399 AUE_NULL UNIMPL nosys +399 AUE_NULL RESERVED 400 AUE_SEMCLOSE NOSTD|NOPROTO { int ksem_close(semid_t id); } 401 AUE_SEMPOST NOSTD|NOPROTO { int ksem_post(semid_t id); } 402 AUE_SEMWAIT NOSTD|NOPROTO { int ksem_wait(semid_t id); } @@ -790,9 +786,9 @@ struct sigaction32 *oact); } 417 AUE_SIGRETURN STD { int freebsd32_sigreturn( \ const struct __ucontext32 *sigcntxp); } -418 AUE_NULL UNIMPL __xstat -419 AUE_NULL UNIMPL __xfstat -420 AUE_NULL UNIMPL __xlstat +418 AUE_NULL RESERVED +419 AUE_NULL RESERVED +420 AUE_NULL RESERVED 421 AUE_NULL STD { int freebsd32_getcontext( \ struct __ucontext32 *ucp); } 422 AUE_NULL STD { int freebsd32_setcontext( \ @@ -882,10 +878,10 @@ struct aiocb32 *aiocbp); } 466 AUE_RTPRIO NOPROTO { int rtprio_thread(int function, \ lwpid_t lwpid, struct rtprio *rtp); } -467 AUE_NULL UNIMPL nosys -468 AUE_NULL UNIMPL nosys -469 AUE_NULL UNIMPL __getpath_fromfd -470 AUE_NULL UNIMPL __getpath_fromaddr +467 AUE_NULL RESERVED +468 AUE_NULL RESERVED +469 AUE_NULL RESERVED +470 AUE_NULL RESERVED 471 AUE_SCTP_PEELOFF NOPROTO|NOSTD { int sctp_peeloff(int sd, uint32_t name); } 472 AUE_SCTP_GENERIC_SENDMSG NOPROTO|NOSTD { int sctp_generic_sendmsg( \ int sd, void *msg, int mlen, \ @@ -1025,7 +1021,7 @@ 518 AUE_PDFORK NOPROTO { int pdfork(int *fdp, int flags); } 519 AUE_PDKILL NOPROTO { int pdkill(int fd, int signum); } 520 AUE_PDGETPID NOPROTO { int pdgetpid(int fd, pid_t *pidp); } -521 AUE_PDWAIT UNIMPL pdwait4 +521 AUE_PDWAIT RESERVED 522 AUE_SELECT STD { int freebsd32_pselect(int nd, fd_set *in, \ fd_set *ou, fd_set *ex, \ const struct timespec32 *ts, \ From nobody Wed Nov 17 20:22:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3488A1855748; Wed, 17 Nov 2021 20:22: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 4HvZ9n4PyQz4rF9; Wed, 17 Nov 2021 20:22:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44EE427A12; Wed, 17 Nov 2021 20:22: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 1AHKMpjJ060267; Wed, 17 Nov 2021 20:22:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMpdg060266; Wed, 17 Nov 2021 20:22:51 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:51 GMT Message-Id: <202111172022.1AHKMpdg060266@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 1a7a780bf443 - main - freebsd32: update unimplemented syscall comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a7a780bf443eb97a784585fab5183f485a03d7a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1a7a780bf443eb97a784585fab5183f485a03d7a commit 1a7a780bf443eb97a784585fab5183f485a03d7a Author: Brooks Davis AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: update unimplemented syscall comments These were out of sync with sys/kern/syscalls.master Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_syscalls.c | 6 +++--- sys/compat/freebsd32/freebsd32_sysent.c | 6 +++--- sys/compat/freebsd32/syscalls.master | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index be0bb7e87dcb..18291066c7d6 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -353,7 +353,7 @@ const char *freebsd32_syscallnames[] = { "compat4.freebsd32_sendfile", /* 336 = freebsd4 freebsd32_sendfile */ "#337", /* 337 = kldsym */ "freebsd32_jail", /* 338 = freebsd32_jail */ - "#339", /* 339 = pioctl */ + "#339", /* 339 = nnpfs_syscall */ "sigprocmask", /* 340 = sigprocmask */ "sigsuspend", /* 341 = sigsuspend */ "compat4.freebsd32_sigaction", /* 342 = freebsd4 freebsd32_sigaction */ @@ -391,7 +391,7 @@ const char *freebsd32_syscallnames[] = { "__setugid", /* 374 = __setugid */ "obs_nfsclnt", /* 375 = obsolete nfsclnt */ "eaccess", /* 376 = eaccess */ - "#377", /* 377 = afs_syscall */ + "#377", /* 377 = afs3_syscall */ "freebsd32_nmount", /* 378 = freebsd32_nmount */ "obs_kse_exit", /* 379 = obsolete kse_exit */ "obs_kse_wakeup", /* 380 = obsolete kse_wakeup */ @@ -444,7 +444,7 @@ const char *freebsd32_syscallnames[] = { "__acl_delete_link", /* 427 = __acl_delete_link */ "__acl_aclcheck_link", /* 428 = __acl_aclcheck_link */ "sigwait", /* 429 = sigwait */ - "#430", /* 430 = thr_create; */ + "#430", /* 430 = thr_create */ "thr_exit", /* 431 = thr_exit */ "thr_self", /* 432 = thr_self */ "thr_kill", /* 433 = thr_kill */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 0f17ff400668..570995e35893 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -406,7 +406,7 @@ struct sysent freebsd32_sysent[] = { { compat4(AS(freebsd4_freebsd32_sendfile_args),freebsd32_sendfile), .sy_auevent = AUE_SENDFILE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 336 = freebsd4 freebsd32_sendfile */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 337 = kldsym */ { .sy_narg = AS(freebsd32_jail_args), .sy_call = (sy_call_t *)freebsd32_jail, .sy_auevent = AUE_JAIL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 338 = freebsd32_jail */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 339 = pioctl */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 339 = nnpfs_syscall */ { .sy_narg = AS(sigprocmask_args), .sy_call = (sy_call_t *)sys_sigprocmask, .sy_auevent = AUE_SIGPROCMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 340 = sigprocmask */ { .sy_narg = AS(sigsuspend_args), .sy_call = (sy_call_t *)sys_sigsuspend, .sy_auevent = AUE_SIGSUSPEND, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 341 = sigsuspend */ { compat4(AS(freebsd4_freebsd32_sigaction_args),freebsd32_sigaction), .sy_auevent = AUE_SIGACTION, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 342 = freebsd4 freebsd32_sigaction */ @@ -444,7 +444,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(__setugid_args), .sy_call = (sy_call_t *)sys___setugid, .sy_auevent = AUE_SETUGID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 374 = __setugid */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 375 = obsolete nfsclnt */ { .sy_narg = AS(eaccess_args), .sy_call = (sy_call_t *)sys_eaccess, .sy_auevent = AUE_EACCESS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 376 = eaccess */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 377 = afs_syscall */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 377 = afs3_syscall */ { .sy_narg = AS(freebsd32_nmount_args), .sy_call = (sy_call_t *)freebsd32_nmount, .sy_auevent = AUE_NMOUNT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 378 = freebsd32_nmount */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 379 = obsolete kse_exit */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 380 = obsolete kse_wakeup */ @@ -497,7 +497,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(__acl_delete_link_args), .sy_call = (sy_call_t *)sys___acl_delete_link, .sy_auevent = AUE_ACL_DELETE_LINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 427 = __acl_delete_link */ { .sy_narg = AS(__acl_aclcheck_link_args), .sy_call = (sy_call_t *)sys___acl_aclcheck_link, .sy_auevent = AUE_ACL_CHECK_LINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 428 = __acl_aclcheck_link */ { .sy_narg = AS(sigwait_args), .sy_call = (sy_call_t *)sys_sigwait, .sy_auevent = AUE_SIGWAIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 429 = sigwait */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 430 = thr_create; */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 430 = thr_create */ { .sy_narg = AS(thr_exit_args), .sy_call = (sy_call_t *)sys_thr_exit, .sy_auevent = AUE_THR_EXIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 431 = thr_exit */ { .sy_narg = AS(thr_self_args), .sy_call = (sy_call_t *)sys_thr_self, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 432 = thr_self */ { .sy_narg = AS(thr_kill_args), .sy_call = (sy_call_t *)sys_thr_kill, .sy_auevent = AUE_THR_KILL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 433 = thr_kill */ diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 5167cdfb5574..f4b71ab1f3c4 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -638,7 +638,7 @@ off_t *sbytes, int flags); } 337 AUE_NULL UNIMPL kldsym 338 AUE_JAIL STD { int freebsd32_jail(struct jail32 *jail); } -339 AUE_NULL UNIMPL pioctl +339 AUE_NULL UNIMPL nnpfs_syscall 340 AUE_SIGPROCMASK NOPROTO { int sigprocmask(int how, \ const sigset_t *set, sigset_t *oset); } 341 AUE_SIGSUSPEND NOPROTO { int sigsuspend(const sigset_t *sigmask); } @@ -717,7 +717,7 @@ 374 AUE_SETUGID NOPROTO { int __setugid(int flag); } 375 AUE_NULL OBSOL nfsclnt 376 AUE_EACCESS NOPROTO { int eaccess(const char *path, int amode); } -377 AUE_NULL UNIMPL afs_syscall +377 AUE_NULL UNIMPL afs3_syscall 378 AUE_NMOUNT STD { int freebsd32_nmount(struct iovec32 *iovp, \ unsigned int iovcnt, int flags); } 379 AUE_NULL OBSOL kse_exit @@ -807,7 +807,7 @@ acl_type_t type, struct acl *aclp); } 429 AUE_SIGWAIT NOPROTO { int sigwait(const sigset_t *set, \ int *sig); } -430 AUE_THR_CREATE UNIMPL thr_create; +430 AUE_THR_CREATE UNIMPL thr_create 431 AUE_THR_EXIT NOPROTO { void thr_exit(int32_t *state); } 432 AUE_NULL NOPROTO { int thr_self(int32_t *id); } 433 AUE_THR_KILL NOPROTO { int thr_kill(int32_t id, int sig); } From nobody Wed Nov 17 20:22:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EFF7A1855777; Wed, 17 Nov 2021 20:22: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 4HvZ9q4Zgsz4rHK; Wed, 17 Nov 2021 20:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B6F2276CA; Wed, 17 Nov 2021 20:22: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 1AHKMr2i060317; Wed, 17 Nov 2021 20:22:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMr1c060316; Wed, 17 Nov 2021 20:22:53 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:53 GMT Message-Id: <202111172022.1AHKMr1c060316@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 67fb0300ae06 - main - freebsd32: sync return types with default ABI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67fb0300ae06a48afd4ce5d96465ee7b1845d46d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=67fb0300ae06a48afd4ce5d96465ee7b1845d46d commit 67fb0300ae06a48afd4ce5d96465ee7b1845d46d Author: Brooks Davis AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: sync return types with default ABI This consists of int -> ssize_t where required and one int -> mode_t. As a rule, return types are informative rather than functional as the actual return is in a register. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_systrace_args.c | 16 ++++++++-------- sys/compat/freebsd32/syscalls.master | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index c7221993837a..dc383154066e 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -9442,17 +9442,17 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* freebsd32_recvmsg */ case 27: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* freebsd32_sendmsg */ case 28: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* recvfrom */ case 29: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* accept */ case 30: @@ -9565,7 +9565,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* umask */ case 60: if (ndx == 0 || ndx == 1) - p = "int"; + p = "mode_t"; break; /* chroot */ case 61: @@ -9766,7 +9766,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* sendto */ case 133: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* shutdown */ case 134: @@ -9960,7 +9960,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* freebsd32_msgrcv */ case 227: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* shmat */ case 228: @@ -10185,7 +10185,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* freebsd32_aio_return */ case 314: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* freebsd32_aio_suspend */ case 315: @@ -10351,7 +10351,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* freebsd32_aio_waitcomplete */ case 359: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* getresuid */ case 360: diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index b5b63b37bfbc..a8f5a58878a7 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -106,11 +106,11 @@ 25 AUE_GETEUID NOPROTO { uid_t geteuid(void); } 26 AUE_PTRACE STD { int freebsd32_ptrace(int req, pid_t pid, \ caddr_t addr, int data); } -27 AUE_RECVMSG STD { int freebsd32_recvmsg(int s, struct msghdr32 *msg, \ +27 AUE_RECVMSG STD { ssize_t freebsd32_recvmsg(int s, struct msghdr32 *msg, \ int flags); } -28 AUE_SENDMSG STD { int freebsd32_sendmsg(int s, \ +28 AUE_SENDMSG STD { ssize_t freebsd32_sendmsg(int s, \ const struct msghdr32 *msg, int flags); } -29 AUE_RECVFROM NOPROTO { int recvfrom(int s, void *buf, \ +29 AUE_RECVFROM NOPROTO { ssize_t recvfrom(int s, void *buf, \ size_t len, int flags, \ struct sockaddr *from, \ __socklen_t *fromlenaddr); } @@ -162,7 +162,7 @@ size_t count); } 59 AUE_EXECVE STD { int freebsd32_execve(const char *fname, \ uint32_t *argv, uint32_t *envv); } -60 AUE_UMASK NOPROTO { int umask(mode_t newmask); } +60 AUE_UMASK NOPROTO { mode_t umask(mode_t newmask); } 61 AUE_CHROOT NOPROTO { int chroot(const char *path); } 62 AUE_FSTAT COMPAT { int freebsd32_fstat(int fd, \ struct ostat32 *sb); } @@ -280,7 +280,7 @@ int32_t length); } 131 AUE_FLOCK NOPROTO { int flock(int fd, int how); } 132 AUE_MKFIFO NOPROTO { int mkfifo(const char *path, mode_t mode); } -133 AUE_SENDTO NOPROTO { int sendto(int s, const void *buf, \ +133 AUE_SENDTO NOPROTO { ssize_t sendto(int s, const void *buf, \ size_t len, int flags, \ const struct sockaddr *to, \ __socklen_t tolen); } @@ -442,7 +442,7 @@ 225 AUE_MSGGET NOSTD|NOPROTO { int msgget(key_t key, int msgflg); } 226 AUE_MSGSND NOSTD { int freebsd32_msgsnd(int msqid, const void *msgp, \ size_t msgsz, int msgflg); } -227 AUE_MSGRCV NOSTD { int freebsd32_msgrcv(int msqid, void *msgp, \ +227 AUE_MSGRCV NOSTD { ssize_t freebsd32_msgrcv(int msqid, void *msgp, \ size_t msgsz, int32_t msgtyp, int msgflg); } 228 AUE_SHMAT NOSTD|NOPROTO { void *shmat(int shmid, const void *shmaddr, \ int shmflg); } @@ -592,7 +592,7 @@ 312 AUE_SETRESGID NOPROTO { int setresgid(gid_t rgid, gid_t egid, \ gid_t sgid); } 313 AUE_NULL OBSOL signanosleep -314 AUE_AIO_RETURN STD { int freebsd32_aio_return( \ +314 AUE_AIO_RETURN STD { ssize_t freebsd32_aio_return( \ struct aiocb32 *aiocbp); } 315 AUE_AIO_SUSPEND STD { int freebsd32_aio_suspend( \ uint32_t * aiocbp, int nent, \ @@ -683,7 +683,7 @@ 358 AUE_EXTATTR_DELETE_FILE NOPROTO { int extattr_delete_file( \ const char *path, int attrnamespace, \ const char *attrname); } -359 AUE_AIO_WAITCOMPLETE STD { int freebsd32_aio_waitcomplete( \ +359 AUE_AIO_WAITCOMPLETE STD { ssize_t freebsd32_aio_waitcomplete( \ uint32_t *aiocbp, \ struct timespec32 *timeout); } 360 AUE_GETRESUID NOPROTO { int getresuid(uid_t *ruid, uid_t *euid, \ From nobody Wed Nov 17 20:22:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 19D1E18557E1; Wed, 17 Nov 2021 20:22: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 4HvZ9q4Lb7z4rHG; Wed, 17 Nov 2021 20:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FF4127278; Wed, 17 Nov 2021 20:22: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 1AHKMqU0060291; Wed, 17 Nov 2021 20:22:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMqra060290; Wed, 17 Nov 2021 20:22:52 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:52 GMT Message-Id: <202111172022.1AHKMqra060290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 265a4b8341ab - main - freebsd32: semid_t -> int32_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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 265a4b8341abbabd43b3a293c76dc5209fa9f7da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=265a4b8341abbabd43b3a293c76dc5209fa9f7da commit 265a4b8341abbabd43b3a293c76dc5209fa9f7da Author: Brooks Davis AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: semid_t -> int32_t semid_t is historically an intptr_t so it should be an int32_t. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 6 ++--- sys/compat/freebsd32/freebsd32_systrace_args.c | 36 +++++++++++++------------- sys/compat/freebsd32/syscalls.master | 18 ++++++------- sys/kern/uipc_sem.c | 4 +-- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index a7a38e39dccc..50a71a28c607 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -335,11 +335,11 @@ struct freebsd32_sendfile_args { char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct freebsd32_ksem_init_args { - char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char idp_l_[PADL_(int32_t *)]; int32_t * idp; char idp_r_[PADR_(int32_t *)]; char value_l_[PADL_(unsigned int)]; unsigned int value; char value_r_[PADR_(unsigned int)]; }; struct freebsd32_ksem_open_args { - char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char idp_l_[PADL_(int32_t *)]; int32_t * idp; char idp_r_[PADR_(int32_t *)]; char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; char oflag_l_[PADL_(int)]; int oflag; char oflag_r_[PADR_(int)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; @@ -364,7 +364,7 @@ struct freebsd32_swapcontext_args { char ucp_l_[PADL_(const struct __ucontext32 *)]; const struct __ucontext32 * ucp; char ucp_r_[PADR_(const struct __ucontext32 *)]; }; struct freebsd32_ksem_timedwait_args { - char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; + char id_l_[PADL_(int32_t)]; int32_t id; char id_r_[PADR_(int32_t)]; char abstime_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * abstime; char abstime_r_[PADR_(const struct timespec32 *)]; }; struct freebsd32_thr_suspend_args { diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 1d39fc026802..c7221993837a 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1872,35 +1872,35 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* ksem_close */ case 400: { struct ksem_close_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } /* ksem_post */ case 401: { struct ksem_post_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } /* ksem_wait */ case 402: { struct ksem_wait_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } /* ksem_trywait */ case 403: { struct ksem_trywait_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } /* freebsd32_ksem_init */ case 404: { struct freebsd32_ksem_init_args *p = params; - uarg[0] = (intptr_t)p->idp; /* semid_t * */ + uarg[0] = (intptr_t)p->idp; /* int32_t * */ uarg[1] = p->value; /* unsigned int */ *n_args = 2; break; @@ -1908,7 +1908,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_ksem_open */ case 405: { struct freebsd32_ksem_open_args *p = params; - uarg[0] = (intptr_t)p->idp; /* semid_t * */ + uarg[0] = (intptr_t)p->idp; /* int32_t * */ uarg[1] = (intptr_t)p->name; /* const char * */ iarg[2] = p->oflag; /* int */ iarg[3] = p->mode; /* mode_t */ @@ -1926,7 +1926,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* ksem_getvalue */ case 407: { struct ksem_getvalue_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ uarg[1] = (intptr_t)p->val; /* int * */ *n_args = 2; break; @@ -1934,7 +1934,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* ksem_destroy */ case 408: { struct ksem_destroy_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } @@ -2119,7 +2119,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_ksem_timedwait */ case 441: { struct freebsd32_ksem_timedwait_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ uarg[1] = (intptr_t)p->abstime; /* const struct timespec32 * */ *n_args = 2; break; @@ -6468,7 +6468,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 400: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; default: break; @@ -6478,7 +6478,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 401: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; default: break; @@ -6488,7 +6488,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 402: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; default: break; @@ -6498,7 +6498,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 403: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; default: break; @@ -6508,7 +6508,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 404: switch (ndx) { case 0: - p = "userland semid_t *"; + p = "userland int32_t *"; break; case 1: p = "unsigned int"; @@ -6521,7 +6521,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 405: switch (ndx) { case 0: - p = "userland semid_t *"; + p = "userland int32_t *"; break; case 1: p = "userland const char *"; @@ -6553,7 +6553,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 407: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; case 1: p = "userland int *"; @@ -6566,7 +6566,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 408: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; default: break; @@ -6879,7 +6879,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 441: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; case 1: p = "userland const struct timespec32 *"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index f4b71ab1f3c4..b5b63b37bfbc 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -753,19 +753,19 @@ const struct fhandle *u_fhp, \ struct freebsd11_statfs *buf); } 399 AUE_NULL RESERVED -400 AUE_SEMCLOSE NOSTD|NOPROTO { int ksem_close(semid_t id); } -401 AUE_SEMPOST NOSTD|NOPROTO { int ksem_post(semid_t id); } -402 AUE_SEMWAIT NOSTD|NOPROTO { int ksem_wait(semid_t id); } -403 AUE_SEMTRYWAIT NOSTD|NOPROTO { int ksem_trywait(semid_t id); } -404 AUE_SEMINIT NOSTD { int freebsd32_ksem_init(semid_t *idp, \ +400 AUE_SEMCLOSE NOSTD|NOPROTO { int ksem_close(int32_t id); } +401 AUE_SEMPOST NOSTD|NOPROTO { int ksem_post(int32_t id); } +402 AUE_SEMWAIT NOSTD|NOPROTO { int ksem_wait(int32_t id); } +403 AUE_SEMTRYWAIT NOSTD|NOPROTO { int ksem_trywait(int32_t id); } +404 AUE_SEMINIT NOSTD { int freebsd32_ksem_init(int32_t *idp, \ unsigned int value); } -405 AUE_SEMOPEN NOSTD { int freebsd32_ksem_open(semid_t *idp, \ +405 AUE_SEMOPEN NOSTD { int freebsd32_ksem_open(int32_t *idp, \ const char *name, int oflag, \ mode_t mode, unsigned int value); } 406 AUE_SEMUNLINK NOSTD|NOPROTO { int ksem_unlink(const char *name); } -407 AUE_SEMGETVALUE NOSTD|NOPROTO { int ksem_getvalue(semid_t id, \ +407 AUE_SEMGETVALUE NOSTD|NOPROTO { int ksem_getvalue(int32_t id, \ int *val); } -408 AUE_SEMDESTROY NOSTD|NOPROTO { int ksem_destroy(semid_t id); } +408 AUE_SEMDESTROY NOSTD|NOPROTO { int ksem_destroy(int32_t id); } 409 AUE_NULL UNIMPL __mac_get_pid 410 AUE_NULL UNIMPL __mac_get_link 411 AUE_NULL UNIMPL __mac_set_link @@ -826,7 +826,7 @@ const char *path, int attrnamespace, \ void *data, size_t nbytes); } 440 AUE_NULL OBSOL kse_switchin -441 AUE_SEMWAIT NOSTD { int freebsd32_ksem_timedwait(semid_t id, \ +441 AUE_SEMWAIT NOSTD { int freebsd32_ksem_timedwait(int32_t id, \ const struct timespec32 *abstime); } 442 AUE_NULL STD { int freebsd32_thr_suspend( \ const struct timespec32 *timeout); } diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c index e7c7a04f5c54..22930834f330 100644 --- a/sys/kern/uipc_sem.c +++ b/sys/kern/uipc_sem.c @@ -970,7 +970,7 @@ int freebsd32_ksem_init(struct thread *td, struct freebsd32_ksem_init_args *uap) { - return (ksem_create(td, NULL, uap->idp, S_IRWXU | S_IRWXG, uap->value, + return (ksem_create(td, NULL, (semid_t *)uap->idp, S_IRWXU | S_IRWXG, uap->value, 0, 1)); } @@ -980,7 +980,7 @@ freebsd32_ksem_open(struct thread *td, struct freebsd32_ksem_open_args *uap) if ((uap->oflag & ~(O_CREAT | O_EXCL)) != 0) return (EINVAL); - return (ksem_create(td, uap->name, uap->idp, uap->mode, uap->value, + return (ksem_create(td, uap->name, (semid_t *)uap->idp, uap->mode, uap->value, uap->oflag, 1)); } From nobody Wed Nov 17 20:22:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C79B21855986; Wed, 17 Nov 2021 20:22: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 4HvZ9t1KjPz4rQY; Wed, 17 Nov 2021 20:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DAE727A8B; Wed, 17 Nov 2021 20:22: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 1AHKMs0C060345; Wed, 17 Nov 2021 20:22:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMsG9060344; Wed, 17 Nov 2021 20:22:54 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:54 GMT Message-Id: <202111172022.1AHKMsG9060344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 572be9c8aea8 - main - freebsd32: sync some audit types with default ABI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 572be9c8aea81e97613c34570e873540e2ac086f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=572be9c8aea81e97613c34570e873540e2ac086f commit 572be9c8aea81e97613c34570e873540e2ac086f Author: Brooks Davis AuthorDate: 2021-11-17 20:12:27 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:27 +0000 freebsd32: sync some audit types with default ABI Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 4 ++-- sys/compat/freebsd32/freebsd32_sysent.c | 16 ++++++++-------- sys/compat/freebsd32/syscalls.master | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 50a71a28c607..113a6e704052 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -1407,8 +1407,8 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_fcntl AUE_FCNTL #define FREEBSD32_SYS_AUE_freebsd32_select AUE_SELECT #define FREEBSD32_SYS_AUE_ofreebsd32_sigreturn AUE_SIGRETURN -#define FREEBSD32_SYS_AUE_ofreebsd32_sigvec AUE_O_SIGVEC -#define FREEBSD32_SYS_AUE_ofreebsd32_sigstack AUE_O_SIGSTACK +#define FREEBSD32_SYS_AUE_ofreebsd32_sigvec AUE_NULL +#define FREEBSD32_SYS_AUE_ofreebsd32_sigstack AUE_NULL #define FREEBSD32_SYS_AUE_ofreebsd32_recvmsg AUE_RECVMSG #define FREEBSD32_SYS_AUE_ofreebsd32_sendmsg AUE_SENDMSG #define FREEBSD32_SYS_AUE_freebsd32_gettimeofday AUE_GETTIMEOFDAY diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 570995e35893..fa167fb60707 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -146,11 +146,11 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getpgrp, .sy_auevent = AUE_GETPGRP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 81 = getpgrp */ { .sy_narg = AS(setpgid_args), .sy_call = (sy_call_t *)sys_setpgid, .sy_auevent = AUE_SETPGRP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 82 = setpgid */ { .sy_narg = AS(freebsd32_setitimer_args), .sy_call = (sy_call_t *)freebsd32_setitimer, .sy_auevent = AUE_SETITIMER, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 83 = freebsd32_setitimer */ - { compat(0,wait), .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 84 = old wait */ + { compat(0,wait), .sy_auevent = AUE_WAIT4, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 84 = old wait */ { .sy_narg = AS(swapon_args), .sy_call = (sy_call_t *)sys_swapon, .sy_auevent = AUE_SWAPON, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 85 = swapon */ { .sy_narg = AS(freebsd32_getitimer_args), .sy_call = (sy_call_t *)freebsd32_getitimer, .sy_auevent = AUE_GETITIMER, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 86 = freebsd32_getitimer */ - { compat(AS(ogethostname_args),gethostname), .sy_auevent = AUE_O_GETHOSTNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 87 = old gethostname */ - { compat(AS(osethostname_args),sethostname), .sy_auevent = AUE_O_SETHOSTNAME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 88 = old sethostname */ + { compat(AS(ogethostname_args),gethostname), .sy_auevent = AUE_SYSCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 87 = old gethostname */ + { compat(AS(osethostname_args),sethostname), .sy_auevent = AUE_SYSCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 88 = old sethostname */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getdtablesize, .sy_auevent = AUE_GETDTABLESIZE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 89 = getdtablesize */ { .sy_narg = AS(dup2_args), .sy_call = (sy_call_t *)sys_dup2, .sy_auevent = AUE_DUP2, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 90 = dup2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 91 = reserved for local use */ @@ -161,20 +161,20 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(setpriority_args), .sy_call = (sy_call_t *)sys_setpriority, .sy_auevent = AUE_SETPRIORITY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 96 = setpriority */ { .sy_narg = AS(socket_args), .sy_call = (sy_call_t *)sys_socket, .sy_auevent = AUE_SOCKET, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 97 = socket */ { .sy_narg = AS(connect_args), .sy_call = (sy_call_t *)sys_connect, .sy_auevent = AUE_CONNECT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 98 = connect */ - { compat(AS(oaccept_args),accept), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 99 = old accept */ + { compat(AS(oaccept_args),accept), .sy_auevent = AUE_ACCEPT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 99 = old accept */ { .sy_narg = AS(getpriority_args), .sy_call = (sy_call_t *)sys_getpriority, .sy_auevent = AUE_GETPRIORITY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 100 = getpriority */ - { compat(AS(osend_args),send), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 101 = old send */ - { compat(AS(orecv_args),recv), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 102 = old recv */ + { compat(AS(osend_args),send), .sy_auevent = AUE_SEND, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 101 = old send */ + { compat(AS(orecv_args),recv), .sy_auevent = AUE_RECV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 102 = old recv */ { compat(AS(ofreebsd32_sigreturn_args),freebsd32_sigreturn), .sy_auevent = AUE_SIGRETURN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 103 = old freebsd32_sigreturn */ { .sy_narg = AS(bind_args), .sy_call = (sy_call_t *)sys_bind, .sy_auevent = AUE_BIND, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 104 = bind */ { .sy_narg = AS(setsockopt_args), .sy_call = (sy_call_t *)sys_setsockopt, .sy_auevent = AUE_SETSOCKOPT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 105 = setsockopt */ { .sy_narg = AS(listen_args), .sy_call = (sy_call_t *)sys_listen, .sy_auevent = AUE_LISTEN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 106 = listen */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 107 = obsolete vtimes */ - { compat(AS(ofreebsd32_sigvec_args),freebsd32_sigvec), .sy_auevent = AUE_O_SIGVEC, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 108 = old freebsd32_sigvec */ + { compat(AS(ofreebsd32_sigvec_args),freebsd32_sigvec), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 108 = old freebsd32_sigvec */ { compat(AS(osigblock_args),sigblock), .sy_auevent = AUE_O_SIGBLOCK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 109 = old sigblock */ { compat(AS(osigsetmask_args),sigsetmask), .sy_auevent = AUE_O_SIGSETMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 110 = old sigsetmask */ { compat(AS(osigsuspend_args),sigsuspend), .sy_auevent = AUE_SIGSUSPEND, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 111 = old sigsuspend */ - { compat(AS(ofreebsd32_sigstack_args),freebsd32_sigstack), .sy_auevent = AUE_O_SIGSTACK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 112 = old freebsd32_sigstack */ + { compat(AS(ofreebsd32_sigstack_args),freebsd32_sigstack), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 112 = old freebsd32_sigstack */ { compat(AS(ofreebsd32_recvmsg_args),freebsd32_recvmsg), .sy_auevent = AUE_RECVMSG, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 113 = old freebsd32_recvmsg */ { compat(AS(ofreebsd32_sendmsg_args),freebsd32_sendmsg), .sy_auevent = AUE_SENDMSG, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 114 = old freebsd32_sendmsg */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 115 = obsolete vtrace */ diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index a8f5a58878a7..6b2d9fe4fae0 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -196,14 +196,14 @@ 83 AUE_SETITIMER STD { int freebsd32_setitimer(int which, \ const struct itimerval32 *itv, \ struct itimerval32 *oitv); } -84 AUE_NULL COMPAT|NOPROTO { int wait(void); } +84 AUE_WAIT4 COMPAT|NOPROTO { int wait(void); } ; XXX implement 85 AUE_SWAPON NOPROTO { int swapon(const char *name); } 86 AUE_GETITIMER STD { int freebsd32_getitimer(int which, \ struct itimerval32 *itv); } -87 AUE_O_GETHOSTNAME COMPAT|NOPROTO { int gethostname( \ +87 AUE_SYSCTL COMPAT|NOPROTO { int gethostname( \ char *hostname, u_int len); } -88 AUE_O_SETHOSTNAME COMPAT|NOPROTO { int sethostname( \ +88 AUE_SYSCTL COMPAT|NOPROTO { int sethostname( \ char *hostname, u_int len); } 89 AUE_GETDTABLESIZE NOPROTO { int getdtablesize(void); } 90 AUE_DUP2 NOPROTO { int dup2(u_int from, u_int to); } @@ -222,13 +222,13 @@ 98 AUE_CONNECT NOPROTO { int connect(int s, \ const struct sockaddr *name, \ __socklen_t namelen); } -99 AUE_NULL COMPAT|NOPROTO { int accept(int s, \ +99 AUE_ACCEPT COMPAT|NOPROTO { int accept(int s, \ struct sockaddr *name, \ __socklen_t *anamelen); } 100 AUE_GETPRIORITY NOPROTO { int getpriority(int which, int who); } -101 AUE_NULL COMPAT|NOPROTO { int send(int s, const void *buf, \ +101 AUE_SEND COMPAT|NOPROTO { int send(int s, const void *buf, \ int len, int flags); } -102 AUE_NULL COMPAT|NOPROTO { int recv(int s, void *buf, int len, \ +102 AUE_RECV COMPAT|NOPROTO { int recv(int s, void *buf, int len, \ int flags); } 103 AUE_SIGRETURN COMPAT { int freebsd32_sigreturn( \ struct ia32_sigcontext3 *sigcntxp); } @@ -238,13 +238,13 @@ int name, const void *val, __socklen_t valsize); } 106 AUE_LISTEN NOPROTO { int listen(int s, int backlog); } 107 AUE_NULL OBSOL vtimes -108 AUE_O_SIGVEC COMPAT { int freebsd32_sigvec(int signum, \ +108 AUE_NULL COMPAT { int freebsd32_sigvec(int signum, \ struct sigvec32 *nsv, \ struct sigvec32 *osv); } 109 AUE_O_SIGBLOCK COMPAT|NOPROTO { int sigblock(int mask); } 110 AUE_O_SIGSETMASK COMPAT|NOPROTO { int sigsetmask(int mask); } 111 AUE_SIGSUSPEND COMPAT|NOPROTO { int sigsuspend( int mask); } -112 AUE_O_SIGSTACK COMPAT { int freebsd32_sigstack( \ +112 AUE_NULL COMPAT { int freebsd32_sigstack( \ struct sigstack32 *nss, \ struct sigstack32 *oss); } 113 AUE_RECVMSG COMPAT { int freebsd32_recvmsg(int s, \ From nobody Wed Nov 17 21:45:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 77A661896AD0; Wed, 17 Nov 2021 21:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hvc1h0QDPz4cBG; Wed, 17 Nov 2021 21:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4892AD6; Wed, 17 Nov 2021 21:45: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 1AHLjxU4067929; Wed, 17 Nov 2021 21:45:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHLjx5I067928; Wed, 17 Nov 2021 21:45:59 GMT (envelope-from git) Date: Wed, 17 Nov 2021 21:45:59 GMT Message-Id: <202111172145.1AHLjx5I067928@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: 201d0ebee321 - main - libarchive: cherry-pick bugfix from vendor List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 201d0ebee321fb1a5501e17a4f150aa211020c5c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=201d0ebee321fb1a5501e17a4f150aa211020c5c commit 201d0ebee321fb1a5501e17a4f150aa211020c5c Author: Martin Matuska AuthorDate: 2021-11-17 21:21:19 +0000 Commit: Martin Matuska CommitDate: 2021-11-17 21:28:45 +0000 libarchive: cherry-pick bugfix from vendor Vendor commit message (ede459d2e): archive_write_disk_posix: fix writing fflags broken in 8a1bd5c The fixup list was erroneously assumed to be directories only. Only in the case of critical file flags modification (e.g. SF_IMMUTABLE on BSD systems), other file types (e.g. regular files or symbolic links) may be added to the fixup list. We still need to verify that we are writing to the correct file type, so compare the archive entry file type with the file type of the file to be modified. Fixes vendor issue #1617: Immutable flag no longer preserved during tar extraction on FreeBSD MFC after: 3 days Reported by: markjdb Libarchive commit: ede459d2ebb879f5eedb6f7abea203be0b334230 --- .../libarchive/archive_write_disk_posix.c | 87 +++++++++++++++++++--- 1 file changed, 75 insertions(+), 12 deletions(-) diff --git a/contrib/libarchive/libarchive/archive_write_disk_posix.c b/contrib/libarchive/libarchive/archive_write_disk_posix.c index a554679bfd10..1aa00840bf4c 100644 --- a/contrib/libarchive/libarchive/archive_write_disk_posix.c +++ b/contrib/libarchive/libarchive/archive_write_disk_posix.c @@ -173,6 +173,7 @@ struct fixup_entry { struct fixup_entry *next; struct archive_acl acl; mode_t mode; + __LA_MODE_T filetype; int64_t atime; int64_t birthtime; int64_t mtime; @@ -357,6 +358,7 @@ struct archive_write_disk { static int la_opendirat(int, const char *); static int la_mktemp(struct archive_write_disk *); +static int la_verify_filetype(mode_t, __LA_MODE_T); static void fsobj_error(int *, struct archive_string *, int, const char *, const char *); static int check_symlinks_fsobj(char *, int *, struct archive_string *, @@ -464,6 +466,39 @@ la_opendirat(int fd, const char *path) { #endif } +static int +la_verify_filetype(mode_t mode, __LA_MODE_T filetype) { + int ret = 0; + + switch (filetype) { + case AE_IFREG: + ret = (S_ISREG(mode)); + break; + case AE_IFDIR: + ret = (S_ISDIR(mode)); + break; + case AE_IFLNK: + ret = (S_ISLNK(mode)); + break; + case AE_IFSOCK: + ret = (S_ISSOCK(mode)); + break; + case AE_IFCHR: + ret = (S_ISCHR(mode)); + break; + case AE_IFBLK: + ret = (S_ISBLK(mode)); + break; + case AE_IFIFO: + ret = (S_ISFIFO(mode)); + break; + default: + break; + } + + return (ret); +} + static int lazy_stat(struct archive_write_disk *a) { @@ -822,6 +857,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_MODE_BASE; fe->mode = a->mode; } @@ -832,6 +868,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->mode = a->mode; fe->fixup |= TODO_TIMES; if (archive_entry_atime_is_set(entry)) { @@ -865,6 +902,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_ACLS; archive_acl_copy(&fe->acl, archive_entry_acl(entry)); } @@ -877,6 +915,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->mac_metadata = malloc(metadata_size); if (fe->mac_metadata != NULL) { memcpy(fe->mac_metadata, metadata, @@ -891,6 +930,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_FFLAGS; /* TODO: Complete this.. defer fflags from below. */ } @@ -2463,7 +2503,7 @@ _archive_write_disk_close(struct archive *_a) struct fixup_entry *next, *p; struct stat st; char *c; - int fd, ret; + int fd, ret, openflags; archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA, @@ -2490,32 +2530,53 @@ _archive_write_disk_close(struct archive *_a) if (p->fixup == 0) goto skip_fixup_entry; else { - fd = open(p->name, O_BINARY | O_NOFOLLOW | O_RDONLY + /* + * We need to verify if the type of the file + * we are going to open matches the file type + * of the fixup entry. + */ + openflags = O_BINARY | O_NOFOLLOW | O_RDONLY + | O_CLOEXEC; #if defined(O_DIRECTORY) - | O_DIRECTORY + if (p->filetype == AE_IFDIR) + openflags |= O_DIRECTORY; #endif - | O_CLOEXEC); + fd = open(p->name, openflags); + +#if defined(O_DIRECTORY) /* - ` * If we don't support O_DIRECTORY, - * or open() has failed, we must stat() - * to verify that we are opening a directory + * If we support O_DIRECTORY and open was + * successful we can skip the file type check + * for directories. For other file types + * we need to verify via fstat() or lstat() */ -#if defined(O_DIRECTORY) - if (fd == -1) { + if (fd == -1 || p->filetype != AE_IFDIR) { +#if HAVE_FSTAT + if (fd > 0 && ( + fstat(fd, &st) != 0 || + la_verify_filetype(st.st_mode, + p->filetype) == 0)) { + goto skip_fixup_entry; + } else +#endif if (lstat(p->name, &st) != 0 || - !S_ISDIR(st.st_mode)) { + la_verify_filetype(st.st_mode, + p->filetype) == 0) { goto skip_fixup_entry; } } #else #if HAVE_FSTAT if (fd > 0 && ( - fstat(fd, &st) != 0 || !S_ISDIR(st.st_mode))) { + fstat(fd, &st) != 0 || + la_verify_filetype(st.st_mode, + p->filetype) == 0)) { goto skip_fixup_entry; } else #endif if (lstat(p->name, &st) != 0 || - !S_ISDIR(st.st_mode)) { + la_verify_filetype(st.st_mode, + p->filetype) == 0) { goto skip_fixup_entry; } #endif @@ -2689,6 +2750,7 @@ new_fixup(struct archive_write_disk *a, const char *pathname) fe->next = a->fixup_list; a->fixup_list = fe; fe->fixup = 0; + fe->filetype = 0; fe->name = strdup(pathname); return (fe); } @@ -3811,6 +3873,7 @@ set_fflags(struct archive_write_disk *a) le = current_fixup(a, a->name); if (le == NULL) return (ARCHIVE_FATAL); + le->filetype = archive_entry_filetype(a->entry); le->fixup |= TODO_FFLAGS; le->fflags_set = set; /* Store the mode if it's not already there. */ From nobody Wed Nov 17 22:04:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CE19B18A0A81; Wed, 17 Nov 2021 22:04:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvcRQ2hXDz4jnf; Wed, 17 Nov 2021 22:04:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1AHM4g2x042133 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 18 Nov 2021 00:04:46 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1AHM4g2x042133 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1AHM4gYj042131; Thu, 18 Nov 2021 00:04:42 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 18 Nov 2021 00:04:42 +0200 From: Konstantin Belousov To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b7fd86118fb5 - main - syscalls: sprinkle in const values Message-ID: References: <202111172022.1AHKM3IJ059209@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: <202111172022.1AHKM3IJ059209@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4HvcRQ2hXDz4jnf X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 17, 2021 at 08:22:03PM +0000, Brooks Davis wrote: > The branch main has been updated by brooks: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b7fd86118fb5d41f61fdfa003d11e9367770ff0a > > commit b7fd86118fb5d41f61fdfa003d11e9367770ff0a > Author: Brooks Davis > AuthorDate: 2021-11-17 20:12:21 +0000 > Commit: Brooks Davis > CommitDate: 2021-11-17 20:12:21 +0000 > > syscalls: sprinkle in const values > > Add missing const qualifiers to a number of syscall arguments. > > Obtained from: CheriBSD > > Reviewed by: kevans > --- > sys/kern/syscalls.master | 32 ++++++++++++------------ > sys/kern/systrace_args.c | 64 ++++++++++++++++++++++++------------------------ > sys/kern/vfs_syscalls.c | 10 ++++---- > sys/sys/syscallsubr.h | 13 +++++----- > sys/sys/sysproto.h | 32 ++++++++++++------------ :( > @@ -501,7 +501,7 @@ > } > 74 AUE_MPROTECT STD|CAPENABLED { > int mprotect( > - _In_ void *addr, > + _In_ const void *addr, > size_t len, > int prot > ); You did not marked addr for munmap(2) as const, but did this for mprotect(2). I believe that this is the right interpretation for munmap, but not for mprotect due to PROT_NONE. Or at least it should be consistent WRT allowed side effects on access. From nobody Wed Nov 17 22:44:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 68368188B536 for ; Wed, 17 Nov 2021 22:44:45 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvdKR6gmBz4vTW for ; Wed, 17 Nov 2021 22:44:43 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id AD6B320F08 for ; Wed, 17 Nov 2021 22:44:41 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f48.google.com with SMTP id i13so3174579qvm.1 for ; Wed, 17 Nov 2021 14:44:41 -0800 (PST) X-Gm-Message-State: AOAM532mNdol3w0x2Qjrt4WnAcz6GZXW4wbuvhgrcTYVVd7GZUHLn83H M8nfgej5btzVI2RVRn79esZ3aqRL/t20P37ZtPM= X-Received: by 2002:a05:6214:763:: with SMTP id f3mt44012914qvz.49.1637189081083; Wed, 17 Nov 2021 14:44: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 References: <202111032055.1A3KtLQX071805@gitrepo.freebsd.org> In-Reply-To: <202111032055.1A3KtLQX071805@gitrepo.freebsd.org> From: Kyle Evans Date: Wed, 17 Nov 2021 16:44:29 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 589aed00e36c - main - sched: separate out schedinit_ap() Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 3, 2021 at 3:55 PM Kyle Evans wrote: > > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=589aed00e36c22733d3fd9c9016deccf074830b1 > > commit 589aed00e36c22733d3fd9c9016deccf074830b1 > Author: Kyle Evans > AuthorDate: 2021-11-02 18:06:47 +0000 > Commit: Kyle Evans > CommitDate: 2021-11-03 20:54:59 +0000 > > sched: separate out schedinit_ap() > > schedinit_ap() sets up an AP for a later call to sched_throw(NULL). > > Currently, ULE sets up some pcpu bits and fixes the idlethread lock with > a call to sched_throw(NULL); this results in a window where curthread is > setup in platforms' init_secondary(), but it has the wrong td_lock. > Typical platform AP startup procedure looks something like: > > - Setup curthread > - ... other stuff, including cpu_initclocks_ap() > - Signal smp_started > - sched_throw(NULL) to enter the scheduler > > cpu_initclocks_ap() may have callouts to process (e.g., nvme) and > attempt to sched_add() for this AP, but this attempt fails because > of the noted violated assumption leading to locking heartburn in > sched_setpreempt(). > > Interrupts are still disabled until cpu_throw() so we're not really at > risk of being preempted -- just let the scheduler in on it a little > earlier as part of setting up curthread. > What's the general consensus on potential out-of-tree archs maintained on stable branches? I'd like to MFC this at least to stable/13 to avoid it being in the way of the nvme change that spurred it, and I'm trying to decide if it should have something like this added to make it safe: diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 217d685b8587..f07f5e91d8f3 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -2995,6 +2995,11 @@ sched_throw(struct thread *td) tdq = TDQ_SELF(); if (__predict_false(td == NULL)) { + if (tdq == NULL || PCPU_GET(idlethread)->td_lock != + TDQ_LOCKPTR(tdq)) { + schedinit_ap(); + tdq = TDQ_SELF(); + } TDQ_LOCK(tdq); /* Correct spinlock nesting. */ spinlock_exit(); > sys/arm/arm/mp_machdep.c | 1 + > sys/arm64/arm64/mp_machdep.c | 1 + > sys/kern/sched_4bsd.c | 7 +++++++ > sys/kern/sched_ule.c | 29 ++++++++++++++++++++++------- > sys/mips/mips/mp_machdep.c | 1 + > sys/powerpc/aim/mp_cpudep.c | 2 ++ > sys/powerpc/booke/mp_cpudep.c | 2 ++ > sys/riscv/riscv/mp_machdep.c | 1 + > sys/sys/sched.h | 5 +++++ > sys/x86/x86/mp_x86.c | 1 + > 10 files changed, 43 insertions(+), 7 deletions(-) > > diff --git a/sys/arm/arm/mp_machdep.c b/sys/arm/arm/mp_machdep.c > index 6368f7b72da9..4089af5929eb 100644 > --- a/sys/arm/arm/mp_machdep.c > +++ b/sys/arm/arm/mp_machdep.c > @@ -182,6 +182,7 @@ init_secondary(int cpu) > pc->pc_curthread = pc->pc_idlethread; > pc->pc_curpcb = pc->pc_idlethread->td_pcb; > set_curthread(pc->pc_idlethread); > + schedinit_ap(); > #ifdef VFP > vfp_init(); > #endif > diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c > index 15e05ef46262..b42f65b9e399 100644 > --- a/sys/arm64/arm64/mp_machdep.c > +++ b/sys/arm64/arm64/mp_machdep.c > @@ -255,6 +255,7 @@ init_secondary(uint64_t cpu) > /* Initialize curthread */ > KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); > pcpup->pc_curthread = pcpup->pc_idlethread; > + schedinit_ap(); > > /* Initialize curpmap to match TTBR0's current setting. */ > pmap0 = vmspace_pmap(&vmspace0); > diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c > index ddd65b94f0ff..6ba41eb80dcc 100644 > --- a/sys/kern/sched_4bsd.c > +++ b/sys/kern/sched_4bsd.c > @@ -678,6 +678,13 @@ schedinit(void) > mtx_init(&sched_lock, "sched lock", NULL, MTX_SPIN); > } > > +void > +schedinit_ap(void) > +{ > + > + /* Nothing needed. */ > +} > + > int > sched_runnable(void) > { > diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c > index 1b9473b93773..ce7ce4cd2bd8 100644 > --- a/sys/kern/sched_ule.c > +++ b/sys/kern/sched_ule.c > @@ -1743,6 +1743,26 @@ schedinit(void) > ts0->ts_cpu = curcpu; /* set valid CPU number */ > } > > +/* > + * schedinit_ap() is needed prior to calling sched_throw(NULL) to ensure that > + * the pcpu requirements are met for any calls in the period between curthread > + * initialization and sched_throw(). One can safely add threads to the queue > + * before sched_throw(), for instance, as long as the thread lock is setup > + * correctly. > + * > + * TDQ_SELF() relies on the below sched pcpu setting; it may be used only > + * after schedinit_ap(). > + */ > +void > +schedinit_ap(void) > +{ > + > +#ifdef SMP > + PCPU_SET(sched, DPCPU_PTR(tdq)); > +#endif > + PCPU_GET(idlethread)->td_lock = TDQ_LOCKPTR(TDQ_SELF()); > +} > + > /* > * This is only somewhat accurate since given many processes of the same > * priority they will switch when their slices run out, which will be > @@ -2973,19 +2993,14 @@ sched_throw(struct thread *td) > struct thread *newtd; > struct tdq *tdq; > > + tdq = TDQ_SELF(); > if (__predict_false(td == NULL)) { > -#ifdef SMP > - PCPU_SET(sched, DPCPU_PTR(tdq)); > -#endif > - /* Correct spinlock nesting and acquire the correct lock. */ > - tdq = TDQ_SELF(); > TDQ_LOCK(tdq); > + /* Correct spinlock nesting. */ > spinlock_exit(); > PCPU_SET(switchtime, cpu_ticks()); > PCPU_SET(switchticks, ticks); > - PCPU_GET(idlethread)->td_lock = TDQ_LOCKPTR(tdq); > } else { > - tdq = TDQ_SELF(); > THREAD_LOCK_ASSERT(td, MA_OWNED); > THREAD_LOCKPTR_ASSERT(td, TDQ_LOCKPTR(tdq)); > tdq_load_rem(tdq, td); > diff --git a/sys/mips/mips/mp_machdep.c b/sys/mips/mips/mp_machdep.c > index 1a5a023db381..dc089db1d189 100644 > --- a/sys/mips/mips/mp_machdep.c > +++ b/sys/mips/mips/mp_machdep.c > @@ -311,6 +311,7 @@ smp_init_secondary(u_int32_t cpuid) > /* Initialize curthread. */ > KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); > PCPU_SET(curthread, PCPU_GET(idlethread)); > + schedinit_ap(); > > mtx_lock_spin(&ap_boot_mtx); > > diff --git a/sys/powerpc/aim/mp_cpudep.c b/sys/powerpc/aim/mp_cpudep.c > index 33aae520c4b2..a73246487683 100644 > --- a/sys/powerpc/aim/mp_cpudep.c > +++ b/sys/powerpc/aim/mp_cpudep.c > @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > > #include > @@ -134,6 +135,7 @@ cpudep_ap_bootstrap(void) > #endif > pcpup->pc_curpcb = pcpup->pc_curthread->td_pcb; > sp = pcpup->pc_curpcb->pcb_sp; > + schedinit_ap(); > > return (sp); > } > diff --git a/sys/powerpc/booke/mp_cpudep.c b/sys/powerpc/booke/mp_cpudep.c > index c07e8c06ce05..709578d8e1b4 100644 > --- a/sys/powerpc/booke/mp_cpudep.c > +++ b/sys/powerpc/booke/mp_cpudep.c > @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > > #include > @@ -85,6 +86,7 @@ cpudep_ap_bootstrap() > #endif > pcpup->pc_curpcb = pcpup->pc_curthread->td_pcb; > sp = pcpup->pc_curpcb->pcb_sp; > + schedinit_ap(); > > /* XXX shouldn't the pcb_sp be checked/forced for alignment here?? */ > > diff --git a/sys/riscv/riscv/mp_machdep.c b/sys/riscv/riscv/mp_machdep.c > index 1dadf19ce51f..57d5606a3b88 100644 > --- a/sys/riscv/riscv/mp_machdep.c > +++ b/sys/riscv/riscv/mp_machdep.c > @@ -248,6 +248,7 @@ init_secondary(uint64_t hart) > /* Initialize curthread */ > KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); > pcpup->pc_curthread = pcpup->pc_idlethread; > + schedinit_ap(); > > /* > * Identify current CPU. This is necessary to setup > diff --git a/sys/sys/sched.h b/sys/sys/sched.h > index 64651ffa9c90..8041a2bc12d4 100644 > --- a/sys/sys/sched.h > +++ b/sys/sys/sched.h > @@ -226,6 +226,11 @@ SYSINIT(name, SI_SUB_LAST, SI_ORDER_MIDDLE, name ## _add_proc, NULL); > * Fixup scheduler state for proc0 and thread0 > */ > void schedinit(void); > + > +/* > + * Fixup scheduler state for secondary APs > + */ > +void schedinit_ap(void); > #endif /* _KERNEL */ > > /* POSIX 1003.1b Process Scheduling */ > diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c > index ca1125886619..1fac244cbed7 100644 > --- a/sys/x86/x86/mp_x86.c > +++ b/sys/x86/x86/mp_x86.c > @@ -1040,6 +1040,7 @@ init_secondary_tail(void) > /* Initialize curthread. */ > KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); > PCPU_SET(curthread, PCPU_GET(idlethread)); > + schedinit_ap(); > > mtx_lock_spin(&ap_boot_mtx); > From nobody Wed Nov 17 23:10:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D973C18964CB; Wed, 17 Nov 2021 23:10:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hvdv54gY0z3JBW; Wed, 17 Nov 2021 23:10:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1AHNAHuB059197 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 18 Nov 2021 01:10:20 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1AHNAHuB059197 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1AHNAHUi059196; Thu, 18 Nov 2021 01:10:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 18 Nov 2021 01:10:17 +0200 From: Konstantin Belousov To: Kyle Evans Cc: src-committers , "" , dev-commits-src-main@freebsd.org Subject: Re: git: 589aed00e36c - main - sched: separate out schedinit_ap() Message-ID: References: <202111032055.1A3KtLQX071805@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4Hvdv54gY0z3JBW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 17, 2021 at 04:44:29PM -0600, Kyle Evans wrote: > On Wed, Nov 3, 2021 at 3:55 PM Kyle Evans wrote: > > > > The branch main has been updated by kevans: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=589aed00e36c22733d3fd9c9016deccf074830b1 > > > > commit 589aed00e36c22733d3fd9c9016deccf074830b1 > > Author: Kyle Evans > > AuthorDate: 2021-11-02 18:06:47 +0000 > > Commit: Kyle Evans > > CommitDate: 2021-11-03 20:54:59 +0000 > > > > sched: separate out schedinit_ap() > > > > schedinit_ap() sets up an AP for a later call to sched_throw(NULL). > > > > Currently, ULE sets up some pcpu bits and fixes the idlethread lock with > > a call to sched_throw(NULL); this results in a window where curthread is > > setup in platforms' init_secondary(), but it has the wrong td_lock. > > Typical platform AP startup procedure looks something like: > > > > - Setup curthread > > - ... other stuff, including cpu_initclocks_ap() > > - Signal smp_started > > - sched_throw(NULL) to enter the scheduler > > > > cpu_initclocks_ap() may have callouts to process (e.g., nvme) and > > attempt to sched_add() for this AP, but this attempt fails because > > of the noted violated assumption leading to locking heartburn in > > sched_setpreempt(). > > > > Interrupts are still disabled until cpu_throw() so we're not really at > > risk of being preempted -- just let the scheduler in on it a little > > earlier as part of setting up curthread. > > > > What's the general consensus on potential out-of-tree archs maintained > on stable branches? I'd like to MFC this at least to stable/13 to > avoid it being in the way of the nvme change that spurred it, and I'm > trying to decide if it should have something like this added to make > it safe: I do not believe that we even think of guaranteeing this level of source stability. > > diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c > index 217d685b8587..f07f5e91d8f3 100644 > --- a/sys/kern/sched_ule.c > +++ b/sys/kern/sched_ule.c > @@ -2995,6 +2995,11 @@ sched_throw(struct thread *td) > > tdq = TDQ_SELF(); > if (__predict_false(td == NULL)) { > + if (tdq == NULL || PCPU_GET(idlethread)->td_lock != > + TDQ_LOCKPTR(tdq)) { > + schedinit_ap(); > + tdq = TDQ_SELF(); > + } > TDQ_LOCK(tdq); > /* Correct spinlock nesting. */ > spinlock_exit(); > From nobody Wed Nov 17 23:25:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 68486189F92E; Wed, 17 Nov 2021 23:25:59 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (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 4HvfF31HVLz3PQ1; Wed, 17 Nov 2021 23:25:59 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io1-xd34.google.com with SMTP id k22so5459945iol.13; Wed, 17 Nov 2021 15:25:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rL3B2qtiGMYxOdKmuEJjVpVBWQ3xEU3MTYRsDUwAKLU=; b=lMqV103ldmjilVbshFlAZaokyoWMXF5jqF83p15P0Df23END9Nl9ZQ/eB5F+HrZq/f 6NnHPJDJ7iKxvYpaZydnSwKfy3M20/H5JMC/4EVvMTKsXDsMgD2P22VFygwWYDFjeCGc 2AP6wrqc4B0JcnFaFIQiq05aO9WhbW+bCYRc4PLYXNLc6z+PrK27veIjozWvZMOTyB5y TGdOOaNYuLED/vIqdYSz1zU26kq/3JNGVkcfDge81KIvxVd5n3QOI95P8+GlEXqKfU38 PvKRxpfmvSBiosplyO8/GMpkHJUmyEyx43K2rfZ/BhHYO3tFUknPgSxBieM9AOcGaGJA 8nnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=rL3B2qtiGMYxOdKmuEJjVpVBWQ3xEU3MTYRsDUwAKLU=; b=oibVAijvuj9NbKxa3f0yjVTToIKjeFguRPtRzPIXsVf4wYIbRf2G70XjIE3Eoe61RF oD36QPcSz2FOB0CQAVTjV7jsPTH3dLa0L3Dk1cBMLdwMyDiZePtajR7k5XzvidWRiZM1 XduNUci5ng2MUthzl2+HYXyjGVNavhV+/x/4u8atRnudFdktL2ata8XFGMEMVfu28AJ9 CQFUEB9XVtZC55e1dqaUaGqAW3TjUcMw+YQ/SSpmHE4ZqtxMTKiiPBhy2BuajZI9siV/ /w5sKRiQD8WxEMgFUQKIRal38j+8n97iOKavT/z81n/k/oJfR66FLJWtKswULHn6Pn8R 63FQ== X-Gm-Message-State: AOAM531WF2k7SDKWBhh1PQk28GCJDblpoMyQj05fVb0QIg4Ddu8lwZfK ooef9cu42zLyd1AK4W35YgE= X-Google-Smtp-Source: ABdhPJzXMrbfn3fwqnIpMIJW5cnZunxep8hJN5k9+bEDsIdnko88ycJenaFe8dDS0B4bUwslMu6Ddg== X-Received: by 2002:a6b:b2c1:: with SMTP id b184mr13958136iof.24.1637191558445; Wed, 17 Nov 2021 15:25:58 -0800 (PST) Received: from nuc ([142.126.186.191]) by smtp.gmail.com with ESMTPSA id x10sm978676ilv.72.2021.11.17.15.25.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Nov 2021 15:25:57 -0800 (PST) Sender: Mark Johnston Date: Wed, 17 Nov 2021 18:25:55 -0500 From: Mark Johnston To: Konstantin Belousov Cc: Kyle Evans , src-committers , "" , dev-commits-src-main@freebsd.org Subject: Re: git: 589aed00e36c - main - sched: separate out schedinit_ap() Message-ID: References: <202111032055.1A3KtLQX071805@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: 4HvfF31HVLz3PQ1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 18, 2021 at 01:10:17AM +0200, Konstantin Belousov wrote: > On Wed, Nov 17, 2021 at 04:44:29PM -0600, Kyle Evans wrote: > > On Wed, Nov 3, 2021 at 3:55 PM Kyle Evans wrote: > > > > > > The branch main has been updated by kevans: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=589aed00e36c22733d3fd9c9016deccf074830b1 > > > > > > commit 589aed00e36c22733d3fd9c9016deccf074830b1 > > > Author: Kyle Evans > > > AuthorDate: 2021-11-02 18:06:47 +0000 > > > Commit: Kyle Evans > > > CommitDate: 2021-11-03 20:54:59 +0000 > > > > > > sched: separate out schedinit_ap() > > > > > > schedinit_ap() sets up an AP for a later call to sched_throw(NULL). > > > > > > Currently, ULE sets up some pcpu bits and fixes the idlethread lock with > > > a call to sched_throw(NULL); this results in a window where curthread is > > > setup in platforms' init_secondary(), but it has the wrong td_lock. > > > Typical platform AP startup procedure looks something like: > > > > > > - Setup curthread > > > - ... other stuff, including cpu_initclocks_ap() > > > - Signal smp_started > > > - sched_throw(NULL) to enter the scheduler > > > > > > cpu_initclocks_ap() may have callouts to process (e.g., nvme) and > > > attempt to sched_add() for this AP, but this attempt fails because > > > of the noted violated assumption leading to locking heartburn in > > > sched_setpreempt(). > > > > > > Interrupts are still disabled until cpu_throw() so we're not really at > > > risk of being preempted -- just let the scheduler in on it a little > > > earlier as part of setting up curthread. > > > > > > > What's the general consensus on potential out-of-tree archs maintained > > on stable branches? I'd like to MFC this at least to stable/13 to > > avoid it being in the way of the nvme change that spurred it, and I'm > > trying to decide if it should have something like this added to make > > it safe: > I do not believe that we even think of guaranteeing this level of source > stability. At first I assumed this was referencing sparc64, but that is not present in stable/13 either. I believe stable/13 and main support the same set of platforms, in which case I agree that we shouldn't bother with trying to provide extra compatibility, and I think it's probably not necessary to merge this to 12. > > > > diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c > > index 217d685b8587..f07f5e91d8f3 100644 > > --- a/sys/kern/sched_ule.c > > +++ b/sys/kern/sched_ule.c > > @@ -2995,6 +2995,11 @@ sched_throw(struct thread *td) > > > > tdq = TDQ_SELF(); > > if (__predict_false(td == NULL)) { > > + if (tdq == NULL || PCPU_GET(idlethread)->td_lock != > > + TDQ_LOCKPTR(tdq)) { > > + schedinit_ap(); > > + tdq = TDQ_SELF(); > > + } > > TDQ_LOCK(tdq); > > /* Correct spinlock nesting. */ > > spinlock_exit(); > > > From nobody Thu Nov 18 00:04:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2D4C7188AE88; Thu, 18 Nov 2021 00:04: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 4Hvg5T0RYnz3qKg; Thu, 18 Nov 2021 00:04:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E01542A22; Thu, 18 Nov 2021 00:04: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 1AI04SML054609; Thu, 18 Nov 2021 00:04:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI04SQ3054608; Thu, 18 Nov 2021 00:04:28 GMT (envelope-from git) Date: Thu, 18 Nov 2021 00:04:28 GMT Message-Id: <202111180004.1AI04SQ3054608@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: b928e924f74b - main - rtld-elf: Use _get_tp in __tls_get_addr for aarch64 and riscv64. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b928e924f74b0b8f882a9b735611421a93113640 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b928e924f74b0b8f882a9b735611421a93113640 commit b928e924f74b0b8f882a9b735611421a93113640 Author: John Baldwin AuthorDate: 2021-11-17 23:50:55 +0000 Commit: John Baldwin CommitDate: 2021-11-17 23:50:55 +0000 rtld-elf: Use _get_tp in __tls_get_addr for aarch64 and riscv64. Reviewed by: kib Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33047 --- libexec/rtld-elf/aarch64/reloc.c | 9 +++------ libexec/rtld-elf/riscv/reloc.c | 8 +++----- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c index 8cc66c87d698..f697e4a03054 100644 --- a/libexec/rtld-elf/aarch64/reloc.c +++ b/libexec/rtld-elf/aarch64/reloc.c @@ -534,11 +534,8 @@ allocate_initial_tls(Obj_Entry *objs) void * __tls_get_addr(tls_index* ti) { - char *p; - void *_tp; + Elf_Addr **dtvp; - __asm __volatile("mrs %0, tpidr_el0" : "=r" (_tp)); - p = tls_get_addr_common((Elf_Addr **)(_tp), ti->ti_module, ti->ti_offset); - - return (p); + dtvp = _get_tp(); + return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset)); } diff --git a/libexec/rtld-elf/riscv/reloc.c b/libexec/rtld-elf/riscv/reloc.c index 1e749206e9b9..70db8379ade5 100644 --- a/libexec/rtld-elf/riscv/reloc.c +++ b/libexec/rtld-elf/riscv/reloc.c @@ -406,13 +406,11 @@ allocate_initial_tls(Obj_Entry *objs) void * __tls_get_addr(tls_index* ti) { - char *_tp; + Elf_Addr **dtvp; void *p; - __asm __volatile("mv %0, tp" : "=r" (_tp)); - - p = tls_get_addr_common((Elf_Addr**)((Elf_Addr)_tp - TLS_TP_OFFSET - - TLS_TCB_SIZE), ti->ti_module, ti->ti_offset); + dtvp = _get_tp(); + p = tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset); return ((char*)p + TLS_DTV_OFFSET); } From nobody Thu Nov 18 00:04:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 72832188AE98; Thu, 18 Nov 2021 00: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 4Hvg5V1tmjz3qMT; Thu, 18 Nov 2021 00:04:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F7C9286A; Thu, 18 Nov 2021 00: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 1AI04Tkt054633; Thu, 18 Nov 2021 00:04:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI04Two054632; Thu, 18 Nov 2021 00:04:29 GMT (envelope-from git) Date: Thu, 18 Nov 2021 00:04:29 GMT Message-Id: <202111180004.1AI04Two054632@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: a8d885296a9d - main - linux_linkat: Don't invert AT_* 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8d885296a9dc517e731723081c83d97d2aa598f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a8d885296a9dc517e731723081c83d97d2aa598f commit a8d885296a9dc517e731723081c83d97d2aa598f Author: John Baldwin AuthorDate: 2021-11-17 23:51:06 +0000 Commit: John Baldwin CommitDate: 2021-11-17 23:51:06 +0000 linux_linkat: Don't invert AT_* flags. Reviewed by: kib Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33048 --- sys/compat/linux/linux_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index a1146c6a195a..a076c849aec8 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1170,9 +1170,9 @@ linux_linkat(struct thread *td, struct linux_linkat_args *args) if (args->flag & ~(LINUX_AT_SYMLINK_FOLLOW | LINUX_AT_EMPTY_PATH)) return (EINVAL); - flag = (args->flag & LINUX_AT_SYMLINK_FOLLOW) == 0 ? AT_SYMLINK_FOLLOW : + flag = (args->flag & LINUX_AT_SYMLINK_FOLLOW) != 0 ? AT_SYMLINK_FOLLOW : 0; - flag |= (args->flag & LINUX_AT_EMPTY_PATH) == 0 ? AT_EMPTY_PATH : 0; + flag |= (args->flag & LINUX_AT_EMPTY_PATH) != 0 ? AT_EMPTY_PATH : 0; olddfd = (args->olddfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->olddfd; newdfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd; From nobody Thu Nov 18 00:04:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0A8E4188ADCB; Thu, 18 Nov 2021 00:04:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hvg5W2sl7z3qXK; Thu, 18 Nov 2021 00:04:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 38B3228D3; Thu, 18 Nov 2021 00: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 1AI04Vqx054657; Thu, 18 Nov 2021 00: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 1AI04VOj054656; Thu, 18 Nov 2021 00:04:31 GMT (envelope-from git) Date: Thu, 18 Nov 2021 00:04:31 GMT Message-Id: <202111180004.1AI04VOj054656@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: 8b2ce7a3bbd0 - main - linux_name_to_handle_at: Support AT_EMPTY_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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b2ce7a3bbd0a754d31ff3943d918b4c84c831a3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8b2ce7a3bbd0a754d31ff3943d918b4c84c831a3 commit 8b2ce7a3bbd0a754d31ff3943d918b4c84c831a3 Author: John Baldwin AuthorDate: 2021-11-17 23:51:18 +0000 Commit: John Baldwin CommitDate: 2021-11-17 23:51:18 +0000 linux_name_to_handle_at: Support AT_EMPTY_PATH. Reviewed by: kib Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33050 --- sys/compat/linux/linux_file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index a076c849aec8..bda843286b26 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -282,9 +282,6 @@ linux_name_to_handle_at(struct thread *td, if (args->flags & ~valid_flags) return (EINVAL); - if (args->flags & LINUX_AT_EMPTY_PATH) - /* XXX: not supported yet */ - return (EOPNOTSUPP); fd = args->dirfd; if (fd == LINUX_AT_FDCWD) @@ -293,6 +290,8 @@ linux_name_to_handle_at(struct thread *td, bsd_flags = 0; if (!(args->flags & LINUX_AT_SYMLINK_FOLLOW)) bsd_flags |= AT_SYMLINK_NOFOLLOW; + if ((args->flags & LINUX_AT_EMPTY_PATH) != 0) + bsd_flags |= AT_EMPTY_PATH; if (!LUSECONVPATH(td)) { error = kern_getfhat(td, bsd_flags, fd, args->name, From nobody Thu Nov 18 00:04:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DE1E6188AF26; Thu, 18 Nov 2021 00:04: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 4Hvg5Y0dkvz3qQ7; Thu, 18 Nov 2021 00:04:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 568AD286B; Thu, 18 Nov 2021 00:04: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 1AI04WxL054681; Thu, 18 Nov 2021 00:04:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI04WLP054680; Thu, 18 Nov 2021 00:04:32 GMT (envelope-from git) Date: Thu, 18 Nov 2021 00:04:32 GMT Message-Id: <202111180004.1AI04WLP054680@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: 1962164584a9 - main - imgact_elf: Use bool instead of boolean_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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1962164584a91078418afcd7c979afef13df8c4d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1962164584a91078418afcd7c979afef13df8c4d commit 1962164584a91078418afcd7c979afef13df8c4d Author: Alex Richardson AuthorDate: 2021-11-17 23:51:29 +0000 Commit: John Baldwin CommitDate: 2021-11-17 23:51:29 +0000 imgact_elf: Use bool instead of boolean_t. Reviewed by: kib Obtained from: CheriBSD Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33051 --- sys/kern/imgact_elf.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 38ad61d8720b..0751c25bd47d 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -97,8 +97,8 @@ static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp); static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel); static bool kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel); -static boolean_t __elfN(check_note)(struct image_params *imgp, - Elf_Brandnote *checknote, int32_t *osrel, boolean_t *has_fctl0, +static bool __elfN(check_note)(struct image_params *imgp, + Elf_Brandnote *checknote, int32_t *osrel, bool *has_fctl0, uint32_t *fctl0); static vm_prot_t __elfN(trans_prot)(Elf_Word); static Elf_Word __elfN(untrans_prot)(vm_prot_t); @@ -326,7 +326,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp, { const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; Elf_Brandinfo *bi, *bi_m; - boolean_t ret, has_fctl0; + bool ret, has_fctl0; int i, interp_name_len; interp_name_len = interp != NULL ? strlen(interp) + 1 : 0; @@ -2495,20 +2495,20 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) } } -static boolean_t +static bool __elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote, const char *note_vendor, const Elf_Phdr *pnote, - boolean_t (*cb)(const Elf_Note *, void *, boolean_t *), void *cb_arg) + bool (*cb)(const Elf_Note *, void *, bool *), void *cb_arg) { const Elf_Note *note, *note0, *note_end; const char *note_name; char *buf; int i, error; - boolean_t res; + bool res; /* We need some limit, might as well use PAGE_SIZE. */ if (pnote == NULL || pnote->p_filesz > PAGE_SIZE) - return (FALSE); + return (false); ASSERT_VOP_LOCKED(imgp->vp, "parse_notes"); if (pnote->p_offset > PAGE_SIZE || pnote->p_filesz > PAGE_SIZE - pnote->p_offset) { @@ -2557,7 +2557,7 @@ nextnote: roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE)); } retf: - res = FALSE; + res = false; ret: free(buf, M_TEMP); return (res); @@ -2568,8 +2568,8 @@ struct brandnote_cb_arg { int32_t *osrel; }; -static boolean_t -brandnote_cb(const Elf_Note *note, void *arg0, boolean_t *res) +static bool +brandnote_cb(const Elf_Note *note, void *arg0, bool *res) { struct brandnote_cb_arg *arg; @@ -2581,9 +2581,9 @@ brandnote_cb(const Elf_Note *note, void *arg0, boolean_t *res) */ *res = (arg->brandnote->flags & BN_TRANSLATE_OSREL) != 0 && arg->brandnote->trans_osrel != NULL ? - arg->brandnote->trans_osrel(note, arg->osrel) : TRUE; + arg->brandnote->trans_osrel(note, arg->osrel) : true; - return (TRUE); + return (true); } static Elf_Note fctl_note = { @@ -2593,12 +2593,12 @@ static Elf_Note fctl_note = { }; struct fctl_cb_arg { - boolean_t *has_fctl0; + bool *has_fctl0; uint32_t *fctl0; }; -static boolean_t -note_fctl_cb(const Elf_Note *note, void *arg0, boolean_t *res) +static bool +note_fctl_cb(const Elf_Note *note, void *arg0, bool *res) { struct fctl_cb_arg *arg; const Elf32_Word *desc; @@ -2608,10 +2608,10 @@ note_fctl_cb(const Elf_Note *note, void *arg0, boolean_t *res) p = (uintptr_t)(note + 1); p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE); desc = (const Elf32_Word *)p; - *arg->has_fctl0 = TRUE; + *arg->has_fctl0 = true; *arg->fctl0 = desc[0]; - *res = TRUE; - return (TRUE); + *res = true; + return (true); } /* @@ -2620,9 +2620,9 @@ note_fctl_cb(const Elf_Note *note, void *arg0, boolean_t *res) * OSABI-note. Only the first page of the image is searched, the same * as for headers. */ -static boolean_t +static bool __elfN(check_note)(struct image_params *imgp, Elf_Brandnote *brandnote, - int32_t *osrel, boolean_t *has_fctl0, uint32_t *fctl0) + int32_t *osrel, bool *has_fctl0, uint32_t *fctl0) { const Elf_Phdr *phdr; const Elf_Ehdr *hdr; @@ -2648,10 +2648,10 @@ __elfN(check_note)(struct image_params *imgp, Elf_Brandnote *brandnote, note_fctl_cb, &f_arg)) break; } - return (TRUE); + return (true); } } - return (FALSE); + return (false); } From nobody Thu Nov 18 00:04:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 981CF188ACD0; Thu, 18 Nov 2021 00:04: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 4Hvg5Z5J1Xz3qQD; Thu, 18 Nov 2021 00:04:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 790E42949; Thu, 18 Nov 2021 00:04: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 1AI04XJ2054705; Thu, 18 Nov 2021 00:04:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI04XXP054704; Thu, 18 Nov 2021 00:04:33 GMT (envelope-from git) Date: Thu, 18 Nov 2021 00:04:33 GMT Message-Id: <202111180004.1AI04XXP054704@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: 4082b189d2ce - main - elf*_brand_inuse: Change return type to 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4082b189d2ce00674439226c9d5a8bdcafd23d01 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4082b189d2ce00674439226c9d5a8bdcafd23d01 commit 4082b189d2ce00674439226c9d5a8bdcafd23d01 Author: Alex Richardson AuthorDate: 2021-11-17 23:51:40 +0000 Commit: John Baldwin CommitDate: 2021-11-17 23:51:40 +0000 elf*_brand_inuse: Change return type to bool. Reviewed by: kib Obtained from: CheriBSD Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33052 --- sys/kern/imgact_elf.c | 6 +++--- sys/sys/imgact_elf.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 0751c25bd47d..c7c131da184c 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -302,16 +302,16 @@ __elfN(remove_brand_entry)(Elf_Brandinfo *entry) return (0); } -int +bool __elfN(brand_inuse)(Elf_Brandinfo *entry) { struct proc *p; - int rval = FALSE; + bool rval = false; sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { if (p->p_sysent == entry->sysvec) { - rval = TRUE; + rval = true; break; } } diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index 294f17c87b6f..67b95207ec33 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -112,7 +112,7 @@ struct sseg_closure { size_t size; /* Total size of all writable segments. */ }; -int __elfN(brand_inuse)(Elf_Brandinfo *entry); +bool __elfN(brand_inuse)(Elf_Brandinfo *entry); int __elfN(insert_brand_entry)(Elf_Brandinfo *entry); int __elfN(remove_brand_entry)(Elf_Brandinfo *entry); int __elfN(freebsd_fixup)(uintptr_t *, struct image_params *); From nobody Thu Nov 18 00:04:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 750C2188B75E; Thu, 18 Nov 2021 00:04: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 4Hvg602cN6z3qtD; Thu, 18 Nov 2021 00:04:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDDCA294A; Thu, 18 Nov 2021 00:04: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 1AI04tR4054864; Thu, 18 Nov 2021 00:04:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI04to0054863; Thu, 18 Nov 2021 00:04:55 GMT (envelope-from git) Date: Thu, 18 Nov 2021 00:04:55 GMT Message-Id: <202111180004.1AI04to0054863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 53f057b3f46b - releng/12.3 - 12.3: update to RC2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.3 X-Git-Reftype: branch X-Git-Commit: 53f057b3f46bb5ae9941591fba7066b3a8f53d4e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.3 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=53f057b3f46bb5ae9941591fba7066b3a8f53d4e commit 53f057b3f46bb5ae9941591fba7066b3a8f53d4e Author: Glen Barber AuthorDate: 2021-11-18 00:04:36 +0000 Commit: Glen Barber CommitDate: 2021-11-18 00:04:36 +0000 12.3: update to RC2 Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index b6c4ba9491e6..e6ab77045930 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -49,7 +49,7 @@ TYPE="FreeBSD" REVISION="12.3" -BRANCH="RC1" +BRANCH="RC2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Thu Nov 18 00:21:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3CBAA1893FB1; Thu, 18 Nov 2021 00:21: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 4HvgT70zjTz4SJ2; Thu, 18 Nov 2021 00:21:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02A4E2D8D; Thu, 18 Nov 2021 00:21: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 1AI0LULa080707; Thu, 18 Nov 2021 00:21:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI0LUQO080706; Thu, 18 Nov 2021 00:21:30 GMT (envelope-from git) Date: Thu, 18 Nov 2021 00:21:30 GMT Message-Id: <202111180021.1AI0LUQO080706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: ca826694e3b0 - stable/12 - nfscl: Fix a race between Setattr of size and Lookup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ca826694e3b08133b9e16744e1178863cfc4c16b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=ca826694e3b08133b9e16744e1178863cfc4c16b commit ca826694e3b08133b9e16744e1178863cfc4c16b Author: Rick Macklem AuthorDate: 2021-10-30 23:35:02 +0000 Commit: Rick Macklem CommitDate: 2021-11-17 23:07:11 +0000 nfscl: Fix a race between Setattr of size and Lookup PR#259071 provides a test program that fails for the NFS client. Testing with it, there appears to be a race between Lookup and VOPs like Setattr-of-size, where Lookup ends up loading stale attributes (including what might be the wrong file size) into the NFS vnode's attribute cache. The race occurs when the modifying VOP (which holds a lock on the vnode), blocks the acquisition of the vnode in Lookup, after the RPC (with now potentially stale attributes). Here's what seems to happen: Child Parent does stat(), which does VOP_LOOKUP(), doing the Lookup RPC with the directory vnode locked, acquiring file attributes valid at this point in time blocks waiting for locked file does ftruncate(), which vnode does VOP_SETATTR() of Size, changing the file's size while holding an exclusive lock on the file's vnode releases the vnode lock acquires file vnode and fills in now stale attributes including the old wrong Size does a read() which returns wrong data size This patch fixes the problem by saving a timestamp in the NFS vnode in the VOPs that modify the file (Setattr-of-size, Allocate). Then lookup/readdirplus compares that timestamp with the time just before starting the RPC after it has acquired the file's vnode. If the modifying RPC occurred during the Lookup, the attributes in the RPC reply are discarded, since they might be stale. With this patch the test program works as expected. Note that the test program does not fail on a July stable/12, although this race is in the NFS client code. I suspect a fairly recent change to the name caching code exposed this bug. PR: 259071 (cherry picked from commit 2be417843a04f25e631e99d5188eb2652b13d80d) --- sys/fs/nfsclient/nfs_clrpcops.c | 29 ++++++++++++++-- sys/fs/nfsclient/nfs_clvnops.c | 73 +++++++++++++++++++++++++++++++++++++---- sys/fs/nfsclient/nfsnode.h | 1 + 3 files changed, 93 insertions(+), 10 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 50f26a5d70c3..d6072bf2523e 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -3308,7 +3308,8 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, nfsattrbit_t attrbits, dattrbits; size_t tresid; u_int32_t *tl2 = NULL, rderr; - struct timespec dctime; + struct timespec dctime, ts; + bool attr_ok; KASSERT(uiop->uio_iovcnt == 1 && (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, @@ -3488,6 +3489,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, *tl = txdr_unsigned(NFSV4OP_GETATTR); (void) nfsrv_putattrbit(nd, &dattrbits); } + nanouptime(&ts); error = nfscl_request(nd, vp, p, cred, stuff); if (error) return (error); @@ -3641,6 +3643,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, ncookie.lval[1]; if (nfhp != NULL) { + attr_ok = true; if (NFSRV_CMPFH(nfhp->nfh_fh, nfhp->nfh_len, dnp->n_fhp->nfh_fh, dnp->n_fhp->nfh_len)) { VREF(vp); @@ -3670,12 +3673,32 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, if (!error) { newvp = NFSTOV(np); unlocknewvp = 1; + /* + * If n_localmodtime >= time before RPC, + * then a file modification operation, + * such as VOP_SETATTR() of size, has + * occurred while the Lookup RPC and + * acquisition of the vnode happened. As + * such, the attributes might be stale, + * with possibly an incorrect size. + */ + NFSLOCKNODE(np); + if (timespecisset( + &np->n_localmodtime) && + timespeccmp(&np->n_localmodtime, + &ts, >=)) { + NFSCL_DEBUG(4, "nfsrpc_readdirplus:" + " localmod stale attributes\n"); + attr_ok = false; + } + NFSUNLOCKNODE(np); } } nfhp = NULL; if (newvp != NULLVP) { - error = nfscl_loadattrcache(&newvp, - &nfsva, NULL, NULL, 0, 0); + if (attr_ok) + error = nfscl_loadattrcache(&newvp, + &nfsva, NULL, NULL, 0, 0); if (error) { if (unlocknewvp) vput(newvp); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index ffa8e41ec578..b4cbde91c664 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -962,6 +962,7 @@ nfs_setattr(struct vop_setattr_args *ap) struct vattr *vap = ap->a_vap; int error = 0; u_quad_t tsize; + struct timespec ts; #ifndef nolint tsize = (u_quad_t)0; @@ -1053,11 +1054,18 @@ nfs_setattr(struct vop_setattr_args *ap) NFSUNLOCKNODE(np); } error = nfs_setattrrpc(vp, vap, ap->a_cred, td); - if (error && vap->va_size != VNOVAL) { - NFSLOCKNODE(np); - np->n_size = np->n_vattr.na_size = tsize; - vnode_pager_setsize(vp, tsize); - NFSUNLOCKNODE(np); + if (vap->va_size != VNOVAL) { + if (error == 0) { + nanouptime(&ts); + NFSLOCKNODE(np); + np->n_localmodtime = ts; + NFSUNLOCKNODE(np); + } else { + NFSLOCKNODE(np); + np->n_size = np->n_vattr.na_size = tsize; + vnode_pager_setsize(vp, tsize); + NFSUNLOCKNODE(np); + } } return (error); } @@ -1114,8 +1122,8 @@ nfs_lookup(struct vop_lookup_args *ap) struct nfsfh *nfhp; struct nfsvattr dnfsva, nfsva; struct vattr vattr; - struct timespec nctime; - + struct timespec nctime, ts; + *vpp = NULLVP; if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) @@ -1219,6 +1227,7 @@ nfs_lookup(struct vop_lookup_args *ap) error = 0; newvp = NULLVP; NFSINCRGLOBAL(nfsstatsv1.lookupcache_misses); + nanouptime(&ts); error = nfsrpc_lookup(dvp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_cred, td, &dnfsva, &nfsva, &nfhp, &attrflag, &dattrflag, NULL); @@ -1285,6 +1294,22 @@ nfs_lookup(struct vop_lookup_args *ap) if (error) return (error); newvp = NFSTOV(np); + /* + * If n_localmodtime >= time before RPC, then + * a file modification operation, such as + * VOP_SETATTR() of size, has occurred while + * the Lookup RPC and acquisition of the vnode + * happened. As such, the attributes might + * be stale, with possibly an incorrect size. + */ + NFSLOCKNODE(np); + if (timespecisset(&np->n_localmodtime) && + timespeccmp(&np->n_localmodtime, &ts, >=)) { + NFSCL_DEBUG(4, "nfs_lookup: rename localmod " + "stale attributes\n"); + attrflag = 0; + } + NFSUNLOCKNODE(np); if (attrflag) (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); @@ -1344,6 +1369,22 @@ nfs_lookup(struct vop_lookup_args *ap) if (error) return (error); newvp = NFSTOV(np); + /* + * If n_localmodtime >= time before RPC, then + * a file modification operation, such as + * VOP_SETATTR() of size, has occurred while + * the Lookup RPC and acquisition of the vnode + * happened. As such, the attributes might + * be stale, with possibly an incorrect size. + */ + NFSLOCKNODE(np); + if (timespecisset(&np->n_localmodtime) && + timespeccmp(&np->n_localmodtime, &ts, >=)) { + NFSCL_DEBUG(4, "nfs_lookup: localmod " + "stale attributes\n"); + attrflag = 0; + } + NFSUNLOCKNODE(np); if (attrflag) (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); @@ -2561,7 +2602,9 @@ nfs_lookitup(struct vnode *dvp, char *name, int len, struct ucred *cred, struct componentname cn; int error = 0, attrflag, dattrflag; u_int hash; + struct timespec ts; + nanouptime(&ts); error = nfsrpc_lookup(dvp, name, len, cred, td, &dnfsva, &nfsva, &nfhp, &attrflag, &dattrflag, NULL); if (dattrflag) @@ -2622,6 +2665,22 @@ printf("replace=%s\n",nnn); if (error) return (error); newvp = NFSTOV(np); + /* + * If n_localmodtime >= time before RPC, then + * a file modification operation, such as + * VOP_SETATTR() of size, has occurred while + * the Lookup RPC and acquisition of the vnode + * happened. As such, the attributes might + * be stale, with possibly an incorrect size. + */ + NFSLOCKNODE(np); + if (timespecisset(&np->n_localmodtime) && + timespeccmp(&np->n_localmodtime, &ts, >=)) { + NFSCL_DEBUG(4, "nfs_lookitup: localmod " + "stale attributes\n"); + attrflag = 0; + } + NFSUNLOCKNODE(np); } if (!attrflag && *npp == NULL) { if (newvp == dvp) diff --git a/sys/fs/nfsclient/nfsnode.h b/sys/fs/nfsclient/nfsnode.h index 66a2de31551a..c3ddcafa9d6f 100644 --- a/sys/fs/nfsclient/nfsnode.h +++ b/sys/fs/nfsclient/nfsnode.h @@ -128,6 +128,7 @@ struct nfsnode { u_int64_t n_change; /* old Change attribute */ struct nfsv4node *n_v4; /* extra V4 stuff */ struct ucred *n_writecred; /* Cred. for putpages */ + struct timespec n_localmodtime; /* Last local modify */ }; #define n_atim n_un1.nf_atim From nobody Thu Nov 18 00:55:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F2A3F185531B; Thu, 18 Nov 2021 00: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 4HvhDv6Ytkz4fF7; Thu, 18 Nov 2021 00:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1AF1342E; Thu, 18 Nov 2021 00:55: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 1AI0txk0021653; Thu, 18 Nov 2021 00: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 1AI0txB0021652; Thu, 18 Nov 2021 00:55:59 GMT (envelope-from git) Date: Thu, 18 Nov 2021 00:55:59 GMT Message-Id: <202111180055.1AI0txB0021652@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: 5bd64640f779 - stable/13 - start_init: use 'p' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5bd64640f7797e0938c567e5fe98f4809d345310 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5bd64640f7797e0938c567e5fe98f4809d345310 commit 5bd64640f7797e0938c567e5fe98f4809d345310 Author: Konstantin Belousov AuthorDate: 2021-11-14 20:47:59 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-18 00:32:32 +0000 start_init: use 'p' (cherry picked from commit 8660813153d02e9e681ae083edc7f1d574cb62ca) --- sys/kern/init_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index e46f8f74c83d..4def00f8a018 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -766,7 +766,7 @@ start_init(void *dummy) */ KASSERT((td->td_pflags & TDP_EXECVMSPC) == 0, ("nested execve")); - oldvmspace = td->td_proc->p_vmspace; + oldvmspace = p->p_vmspace; error = kern_execve(td, &args, NULL, oldvmspace); KASSERT(error != 0, ("kern_execve returned success, not EJUSTRETURN")); From nobody Thu Nov 18 01:01:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 45A661888DE4; Thu, 18 Nov 2021 01:01: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 4HvhLv6pv7z4hV0; Thu, 18 Nov 2021 01:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B40CA33B6; Thu, 18 Nov 2021 01:01: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 1AI11BAP034533; Thu, 18 Nov 2021 01:01:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI11BEZ034532; Thu, 18 Nov 2021 01:01:11 GMT (envelope-from git) Date: Thu, 18 Nov 2021 01:01:11 GMT Message-Id: <202111180101.1AI11BEZ034532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: d472d0358e8f - stable/12 - nfscl: Add setting n_localmodtime to the Write RPC 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d472d0358e8fe27c1b1050564cdbd9082bd06a05 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=d472d0358e8fe27c1b1050564cdbd9082bd06a05 commit d472d0358e8fe27c1b1050564cdbd9082bd06a05 Author: Rick Macklem AuthorDate: 2021-10-31 00:08:28 +0000 Commit: Rick Macklem CommitDate: 2021-11-18 00:19:50 +0000 nfscl: Add setting n_localmodtime to the Write RPC code Similar to commit 2be417843a, I believe there could be a race between the NFS client VOP_LOOKUP() and file Writing that could result in stale file attributes being loaded into the NFS vnode by VOP_LOOKUP(). I have not been able to reproduce a failure due to this race, but I believe that there are two possibilities: The Lookup RPC happens while VOP_WRITE() is being executed and loads stale file attributes after VOP_WRITE() returns when it has already completed the Write/Commit RPC(s). --> For this case, setting the local modify timestamp at the end of VOP_WRITE() should ensure that stale file attributes are not loaded. The Lookup RPC occurs after VOP_WRITE() has returned, while asynchronous Write/Commit RPCs are in progress and then is blocked by the vnode held by VOP_OPEN/VOP_CLOSE/VOP_FSYNC which will flush writes via ncl_flush() or ncl_vinvalbuf(), clearing the NMODIFIED flag (which indicates Writes-in-progress). The VOP_LOOKUP() then acquires the NFS vnode lock and fills in stale file attributes. --> Setting the local modify timestamp in ncl_flsuh() and ncl_vinvalbuf() when they clear NMODIFIED should ensure that stale file attributes are not loaded. This patch does the above. PR: 259071 (cherry picked from commit 50dcff0816e5e4aa94f51ce27da5121e49902996) --- sys/fs/nfsclient/nfs_clbio.c | 18 +++++++++++++++--- sys/fs/nfsclient/nfs_clvnops.c | 7 +++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 52eb879caafb..90d98da478b4 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -907,6 +907,7 @@ ncl_write(struct vop_write_args *ap) int bp_cached, n, on, error = 0, error1, save2, wouldcommit; size_t orig_resid, local_resid; off_t orig_size, tmp_off; + struct timespec ts; KASSERT(uio->uio_rw == UIO_WRITE, ("ncl_write mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, @@ -1284,7 +1285,12 @@ again: break; } while (uio->uio_resid > 0 && n > 0); - if (error != 0) { + if (error == 0) { + nanouptime(&ts); + NFSLOCKNODE(np); + np->n_localmodtime = ts; + NFSUNLOCKNODE(np); + } else { if (ioflag & IO_UNIT) { VATTR_NULL(&vattr); vattr.va_size = orig_size; @@ -1356,6 +1362,7 @@ ncl_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg) struct nfsmount *nmp = VFSTONFS(vp->v_mount); int error = 0, slpflag, slptimeo; bool old_lock; + struct timespec ts; ASSERT_VOP_LOCKED(vp, "ncl_vinvalbuf"); @@ -1400,16 +1407,21 @@ ncl_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg) } if (NFSHASPNFS(nmp)) { nfscl_layoutcommit(vp, td); + nanouptime(&ts); /* * Invalidate the attribute cache, since writes to a DS * won't update the size attribute. */ NFSLOCKNODE(np); np->n_attrstamp = 0; - } else + } else { + nanouptime(&ts); NFSLOCKNODE(np); - if (np->n_directio_asyncwr == 0) + } + if (np->n_directio_asyncwr == 0 && (np->n_flag & NMODIFIED) != 0) { + np->n_localmodtime = ts; np->n_flag &= ~NMODIFIED; + } NFSUNLOCKNODE(np); out: ncl_excl_finish(vp, old_lock); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index b4cbde91c664..e37827deb723 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -2841,6 +2841,7 @@ ncl_flush(struct vnode *vp, int waitfor, struct thread *td, #endif struct buf *bvec_on_stack[NFS_COMMITBVECSIZ]; u_int bvecsize = 0, bveccount; + struct timespec ts; if (called_from_renewthread != 0) slptimeo = hz; @@ -3164,6 +3165,12 @@ done: vn_printf(vp, "ncl_flush failed"); error = called_from_renewthread != 0 ? EIO : EBUSY; } + if (error == 0) { + nanouptime(&ts); + NFSLOCKNODE(np); + np->n_localmodtime = ts; + NFSUNLOCKNODE(np); + } return (error); } From nobody Thu Nov 18 01:02:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9B0741889889; Thu, 18 Nov 2021 01:02: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 4HvhNQ3vYPz4jNK; Thu, 18 Nov 2021 01:02:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6745237AB; Thu, 18 Nov 2021 01:02: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 1AI12UnW035715; Thu, 18 Nov 2021 01:02:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI12U1X035714; Thu, 18 Nov 2021 01:02:30 GMT (envelope-from git) Date: Thu, 18 Nov 2021 01:02:30 GMT Message-Id: <202111180102.1AI12U1X035714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: fea4a9aff120 - main - fspacectl: remove unneeded freebsd32 wrapper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fea4a9aff120f704eb9b348c0279cb75bb715d77 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=fea4a9aff120f704eb9b348c0279cb75bb715d77 commit fea4a9aff120f704eb9b348c0279cb75bb715d77 Author: Brooks Davis AuthorDate: 2021-11-18 01:02:06 +0000 Commit: Brooks Davis CommitDate: 2021-11-18 01:02:06 +0000 fspacectl: remove unneeded freebsd32 wrapper fspacectl(2) does not require special handling on freebsd32. The presence of off_t in a struct does not cause it's size to change between the native ABI and the 32-bit ABI supported by freebsd32 because off_t is always int64_t on BSD systems. Further, byte order only requires handling for paired argument or return registers. (32-byte alignment of 64-bit objects on i386 can require special handling, but that situtation does not apply here.) Reviewed by: kib, khng, emaste, delphij Differential Revision: https://reviews.freebsd.org/D32994 --- sys/compat/freebsd32/freebsd32.h | 5 ---- sys/compat/freebsd32/freebsd32_misc.c | 34 -------------------------- sys/compat/freebsd32/freebsd32_proto.h | 9 ------- sys/compat/freebsd32/freebsd32_syscall.h | 2 +- sys/compat/freebsd32/freebsd32_syscalls.c | 2 +- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 16 ++++++------ sys/compat/freebsd32/syscalls.master | 6 ++--- 8 files changed, 14 insertions(+), 62 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 65e4726b3de6..e5bb253aef78 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -458,9 +458,4 @@ struct ptrace_coredump32 { uint32_t pc_limit1, pc_limit2; }; -struct spacectl_range32 { - uint32_t r_offset1, r_offset2; - uint32_t r_len1, r_len2; -}; - #endif /* !_COMPAT_FREEBSD32_FREEBSD32_H_ */ diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index eab217283197..69ae3a1cd85d 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -3893,37 +3893,3 @@ ofreebsd32_sethostid(struct thread *td, struct ofreebsd32_sethostid_args *uap) sizeof(hostid), NULL, 0)); } #endif - -int -freebsd32_fspacectl(struct thread *td, struct freebsd32_fspacectl_args *uap) -{ - struct spacectl_range rqsr, rmsr; - struct spacectl_range32 rqsr32, rmsr32; - int error, cerror; - - error = copyin(uap->rqsr, &rqsr32, sizeof(rqsr32)); - if (error != 0) - return (error); - rqsr.r_offset = PAIR32TO64(off_t, rqsr32.r_offset); - rqsr.r_len = PAIR32TO64(off_t, rqsr32.r_len); - - error = kern_fspacectl(td, uap->fd, uap->cmd, &rqsr, uap->flags, - &rmsr); - if (uap->rmsr != NULL) { -#if BYTE_ORDER == LITTLE_ENDIAN - rmsr32.r_offset1 = rmsr.r_offset; - rmsr32.r_offset2 = rmsr.r_offset >> 32; - rmsr32.r_len1 = rmsr.r_len; - rmsr32.r_len2 = rmsr.r_len >> 32; -#else - rmsr32.r_offset1 = rmsr.r_offset >> 32; - rmsr32.r_offset2 = rmsr.r_offset; - rmsr32.r_len1 = rmsr.r_len >> 32; - rmsr32.r_len2 = rmsr.r_len; -#endif - cerror = copyout(&rmsr32, uap->rmsr, sizeof(rmsr32)); - if (error == 0) - error = cerror; - } - return (error); -} diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 113a6e704052..9e95d74621da 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -772,13 +772,6 @@ struct freebsd32_aio_writev_args { struct freebsd32_aio_readv_args { char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; }; -struct freebsd32_fspacectl_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char rqsr_l_[PADL_(const struct spacectl_range32 *)]; const struct spacectl_range32 * rqsr; char rqsr_r_[PADR_(const struct spacectl_range32 *)]; - char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; - char rmsr_l_[PADL_(struct spacectl_range32 *)]; struct spacectl_range32 * rmsr; char rmsr_r_[PADR_(struct spacectl_range32 *)]; -}; #if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif @@ -929,7 +922,6 @@ int freebsd32_cpuset_setdomain(struct thread *, struct freebsd32_cpuset_setdomai int freebsd32___sysctlbyname(struct thread *, struct freebsd32___sysctlbyname_args *); int freebsd32_aio_writev(struct thread *, struct freebsd32_aio_writev_args *); int freebsd32_aio_readv(struct thread *, struct freebsd32_aio_readv_args *); -int freebsd32_fspacectl(struct thread *, struct freebsd32_fspacectl_args *); #ifdef COMPAT_43 @@ -1560,7 +1552,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32___sysctlbyname AUE_SYSCTL #define FREEBSD32_SYS_AUE_freebsd32_aio_writev AUE_AIO_WRITEV #define FREEBSD32_SYS_AUE_freebsd32_aio_readv AUE_AIO_READV -#define FREEBSD32_SYS_AUE_freebsd32_fspacectl AUE_FSPACECTL #undef PAD_ #undef PADL_ diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 4f4e8ac9caf6..ac9f042c3061 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -512,6 +512,6 @@ #define FREEBSD32_SYS___specialfd 577 #define FREEBSD32_SYS_freebsd32_aio_writev 578 #define FREEBSD32_SYS_freebsd32_aio_readv 579 -#define FREEBSD32_SYS_freebsd32_fspacectl 580 +#define FREEBSD32_SYS_fspacectl 580 #define FREEBSD32_SYS_sched_getcpu 581 #define FREEBSD32_SYS_MAXSYSCALL 582 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 18291066c7d6..95153d6a94b5 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -621,6 +621,6 @@ const char *freebsd32_syscallnames[] = { "__specialfd", /* 577 = __specialfd */ "freebsd32_aio_writev", /* 578 = freebsd32_aio_writev */ "freebsd32_aio_readv", /* 579 = freebsd32_aio_readv */ - "freebsd32_fspacectl", /* 580 = freebsd32_fspacectl */ + "fspacectl", /* 580 = fspacectl */ "sched_getcpu", /* 581 = sched_getcpu */ }; diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index fa167fb60707..69457336de93 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -674,6 +674,6 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(__specialfd_args), .sy_call = (sy_call_t *)sys___specialfd, .sy_auevent = AUE_SPECIALFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 577 = __specialfd */ { .sy_narg = AS(freebsd32_aio_writev_args), .sy_call = (sy_call_t *)freebsd32_aio_writev, .sy_auevent = AUE_AIO_WRITEV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 578 = freebsd32_aio_writev */ { .sy_narg = AS(freebsd32_aio_readv_args), .sy_call = (sy_call_t *)freebsd32_aio_readv, .sy_auevent = AUE_AIO_READV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 579 = freebsd32_aio_readv */ - { .sy_narg = AS(freebsd32_fspacectl_args), .sy_call = (sy_call_t *)freebsd32_fspacectl, .sy_auevent = AUE_FSPACECTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 580 = freebsd32_fspacectl */ + { .sy_narg = AS(fspacectl_args), .sy_call = (sy_call_t *)sys_fspacectl, .sy_auevent = AUE_FSPACECTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 580 = fspacectl */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_sched_getcpu, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 581 = sched_getcpu */ }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index dc383154066e..fb52e939ef79 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -3446,14 +3446,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 1; break; } - /* freebsd32_fspacectl */ + /* fspacectl */ case 580: { - struct freebsd32_fspacectl_args *p = params; + struct fspacectl_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->cmd; /* int */ - uarg[2] = (intptr_t)p->rqsr; /* const struct spacectl_range32 * */ + uarg[2] = (intptr_t)p->rqsr; /* const struct spacectl_range * */ iarg[3] = p->flags; /* int */ - uarg[4] = (intptr_t)p->rmsr; /* struct spacectl_range32 * */ + uarg[4] = (intptr_t)p->rmsr; /* struct spacectl_range * */ *n_args = 5; break; } @@ -9305,7 +9305,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* freebsd32_fspacectl */ + /* fspacectl */ case 580: switch (ndx) { case 0: @@ -9315,13 +9315,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 2: - p = "userland const struct spacectl_range32 *"; + p = "userland const struct spacectl_range *"; break; case 3: p = "int"; break; case 4: - p = "userland struct spacectl_range32 *"; + p = "userland struct spacectl_range *"; break; default: break; @@ -11272,7 +11272,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* freebsd32_fspacectl */ + /* fspacectl */ case 580: if (ndx == 0 || ndx == 1) p = "int"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 6b2d9fe4fae0..9dd902df04af 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -1199,10 +1199,10 @@ struct aiocb32 *aiocbp); } 579 AUE_AIO_READV STD { int freebsd32_aio_readv( \ struct aiocb32 *aiocbp); } -580 AUE_FSPACECTL STD { int freebsd32_fspacectl(int fd, \ +580 AUE_FSPACECTL NOPROTO { int fspacectl(int fd, \ int cmd, \ - const struct spacectl_range32 *rqsr, \ + const struct spacectl_range *rqsr, \ int flags, \ - struct spacectl_range32 *rmsr); } + struct spacectl_range *rmsr); } 581 AUE_NULL NOPROTO { int sched_getcpu(void); } ; vim: syntax=off From nobody Thu Nov 18 01:42:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 60080189E109; Thu, 18 Nov 2021 01:42:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvjGp0QFMz4xFH; Thu, 18 Nov 2021 01:42:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1AI1gXg3097449 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 18 Nov 2021 03:42:36 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1AI1gXg3097449 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1AI1gXRe097448; Thu, 18 Nov 2021 03:42:33 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 18 Nov 2021 03:42:33 +0200 From: Konstantin Belousov To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fea4a9aff120 - main - fspacectl: remove unneeded freebsd32 wrapper Message-ID: References: <202111180102.1AI12U1X035714@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: <202111180102.1AI12U1X035714@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4HvjGp0QFMz4xFH X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 18, 2021 at 01:02:30AM +0000, Brooks Davis wrote: > The branch main has been updated by brooks: > > URL: https://cgit.FreeBSD.org/src/commit/?id=fea4a9aff120f704eb9b348c0279cb75bb715d77 > > commit fea4a9aff120f704eb9b348c0279cb75bb715d77 > Author: Brooks Davis > AuthorDate: 2021-11-18 01:02:06 +0000 > Commit: Brooks Davis > CommitDate: 2021-11-18 01:02:06 +0000 > > fspacectl: remove unneeded freebsd32 wrapper > > fspacectl(2) does not require special handling on freebsd32. The > presence of off_t in a struct does not cause it's size to change > between the native ABI and the 32-bit ABI supported by freebsd32 > because off_t is always int64_t on BSD systems. Further, byte > order only requires handling for paired argument or return registers. > > (32-byte alignment of 64-bit objects on i386 can require special > handling, but that situtation does not apply here.) > > Reviewed by: kib, khng, emaste, delphij > Differential Revision: https://reviews.freebsd.org/D32994 > --- > sys/compat/freebsd32/freebsd32.h | 5 ---- > sys/compat/freebsd32/freebsd32_misc.c | 34 -------------------------- > sys/compat/freebsd32/freebsd32_proto.h | 9 ------- > sys/compat/freebsd32/freebsd32_syscall.h | 2 +- > sys/compat/freebsd32/freebsd32_syscalls.c | 2 +- > sys/compat/freebsd32/freebsd32_sysent.c | 2 +- > sys/compat/freebsd32/freebsd32_systrace_args.c | 16 ++++++------ > sys/compat/freebsd32/syscalls.master | 6 ++--- > 8 files changed, 14 insertions(+), 62 deletions(-) > > diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h > index 65e4726b3de6..e5bb253aef78 100644 > --- a/sys/compat/freebsd32/freebsd32.h > +++ b/sys/compat/freebsd32/freebsd32.h > @@ -458,9 +458,4 @@ struct ptrace_coredump32 { > uint32_t pc_limit1, pc_limit2; > }; > > -struct spacectl_range32 { > - uint32_t r_offset1, r_offset2; > - uint32_t r_len1, r_len2; > -}; > - > #endif /* !_COMPAT_FREEBSD32_FREEBSD32_H_ */ > diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c > index eab217283197..69ae3a1cd85d 100644 > --- a/sys/compat/freebsd32/freebsd32_misc.c > +++ b/sys/compat/freebsd32/freebsd32_misc.c > @@ -3893,37 +3893,3 @@ ofreebsd32_sethostid(struct thread *td, struct ofreebsd32_sethostid_args *uap) > sizeof(hostid), NULL, 0)); > } > #endif > - > -int > -freebsd32_fspacectl(struct thread *td, struct freebsd32_fspacectl_args *uap) > -{ > - struct spacectl_range rqsr, rmsr; > - struct spacectl_range32 rqsr32, rmsr32; > - int error, cerror; > - > - error = copyin(uap->rqsr, &rqsr32, sizeof(rqsr32)); > - if (error != 0) > - return (error); > - rqsr.r_offset = PAIR32TO64(off_t, rqsr32.r_offset); > - rqsr.r_len = PAIR32TO64(off_t, rqsr32.r_len); > - > - error = kern_fspacectl(td, uap->fd, uap->cmd, &rqsr, uap->flags, > - &rmsr); > - if (uap->rmsr != NULL) { > -#if BYTE_ORDER == LITTLE_ENDIAN > - rmsr32.r_offset1 = rmsr.r_offset; > - rmsr32.r_offset2 = rmsr.r_offset >> 32; > - rmsr32.r_len1 = rmsr.r_len; > - rmsr32.r_len2 = rmsr.r_len >> 32; > -#else > - rmsr32.r_offset1 = rmsr.r_offset >> 32; > - rmsr32.r_offset2 = rmsr.r_offset; > - rmsr32.r_len1 = rmsr.r_len >> 32; > - rmsr32.r_len2 = rmsr.r_len; > -#endif > - cerror = copyout(&rmsr32, uap->rmsr, sizeof(rmsr32)); > - if (error == 0) > - error = cerror; > - } > - return (error); > -} > diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h > index 113a6e704052..9e95d74621da 100644 > --- a/sys/compat/freebsd32/freebsd32_proto.h > +++ b/sys/compat/freebsd32/freebsd32_proto.h > @@ -772,13 +772,6 @@ struct freebsd32_aio_writev_args { > struct freebsd32_aio_readv_args { > char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; > }; > -struct freebsd32_fspacectl_args { > - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; > - char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; > - char rqsr_l_[PADL_(const struct spacectl_range32 *)]; const struct spacectl_range32 * rqsr; char rqsr_r_[PADR_(const struct spacectl_range32 *)]; > - char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; > - char rmsr_l_[PADL_(struct spacectl_range32 *)]; struct spacectl_range32 * rmsr; char rmsr_r_[PADR_(struct spacectl_range32 *)]; > -}; > #if !defined(PAD64_REQUIRED) && !defined(__amd64__) > #define PAD64_REQUIRED > #endif > @@ -929,7 +922,6 @@ int freebsd32_cpuset_setdomain(struct thread *, struct freebsd32_cpuset_setdomai > int freebsd32___sysctlbyname(struct thread *, struct freebsd32___sysctlbyname_args *); > int freebsd32_aio_writev(struct thread *, struct freebsd32_aio_writev_args *); > int freebsd32_aio_readv(struct thread *, struct freebsd32_aio_readv_args *); > -int freebsd32_fspacectl(struct thread *, struct freebsd32_fspacectl_args *); > > #ifdef COMPAT_43 > > @@ -1560,7 +1552,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta > #define FREEBSD32_SYS_AUE_freebsd32___sysctlbyname AUE_SYSCTL > #define FREEBSD32_SYS_AUE_freebsd32_aio_writev AUE_AIO_WRITEV > #define FREEBSD32_SYS_AUE_freebsd32_aio_readv AUE_AIO_READV > -#define FREEBSD32_SYS_AUE_freebsd32_fspacectl AUE_FSPACECTL > > #undef PAD_ > #undef PADL_ > diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h > index 4f4e8ac9caf6..ac9f042c3061 100644 > --- a/sys/compat/freebsd32/freebsd32_syscall.h > +++ b/sys/compat/freebsd32/freebsd32_syscall.h > @@ -512,6 +512,6 @@ > #define FREEBSD32_SYS___specialfd 577 > #define FREEBSD32_SYS_freebsd32_aio_writev 578 > #define FREEBSD32_SYS_freebsd32_aio_readv 579 > -#define FREEBSD32_SYS_freebsd32_fspacectl 580 > +#define FREEBSD32_SYS_fspacectl 580 > #define FREEBSD32_SYS_sched_getcpu 581 > #define FREEBSD32_SYS_MAXSYSCALL 582 > diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c > index 18291066c7d6..95153d6a94b5 100644 > --- a/sys/compat/freebsd32/freebsd32_syscalls.c > +++ b/sys/compat/freebsd32/freebsd32_syscalls.c > @@ -621,6 +621,6 @@ const char *freebsd32_syscallnames[] = { > "__specialfd", /* 577 = __specialfd */ > "freebsd32_aio_writev", /* 578 = freebsd32_aio_writev */ > "freebsd32_aio_readv", /* 579 = freebsd32_aio_readv */ > - "freebsd32_fspacectl", /* 580 = freebsd32_fspacectl */ > + "fspacectl", /* 580 = fspacectl */ > "sched_getcpu", /* 581 = sched_getcpu */ > }; > diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c > index fa167fb60707..69457336de93 100644 > --- a/sys/compat/freebsd32/freebsd32_sysent.c > +++ b/sys/compat/freebsd32/freebsd32_sysent.c > @@ -674,6 +674,6 @@ struct sysent freebsd32_sysent[] = { > { .sy_narg = AS(__specialfd_args), .sy_call = (sy_call_t *)sys___specialfd, .sy_auevent = AUE_SPECIALFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 577 = __specialfd */ > { .sy_narg = AS(freebsd32_aio_writev_args), .sy_call = (sy_call_t *)freebsd32_aio_writev, .sy_auevent = AUE_AIO_WRITEV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 578 = freebsd32_aio_writev */ > { .sy_narg = AS(freebsd32_aio_readv_args), .sy_call = (sy_call_t *)freebsd32_aio_readv, .sy_auevent = AUE_AIO_READV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 579 = freebsd32_aio_readv */ > - { .sy_narg = AS(freebsd32_fspacectl_args), .sy_call = (sy_call_t *)freebsd32_fspacectl, .sy_auevent = AUE_FSPACECTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 580 = freebsd32_fspacectl */ > + { .sy_narg = AS(fspacectl_args), .sy_call = (sy_call_t *)sys_fspacectl, .sy_auevent = AUE_FSPACECTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 580 = fspacectl */ > { .sy_narg = 0, .sy_call = (sy_call_t *)sys_sched_getcpu, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 581 = sched_getcpu */ > }; > diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c > index dc383154066e..fb52e939ef79 100644 > --- a/sys/compat/freebsd32/freebsd32_systrace_args.c > +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c > @@ -3446,14 +3446,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) > *n_args = 1; > break; > } > - /* freebsd32_fspacectl */ > + /* fspacectl */ > case 580: { > - struct freebsd32_fspacectl_args *p = params; > + struct fspacectl_args *p = params; > iarg[0] = p->fd; /* int */ > iarg[1] = p->cmd; /* int */ > - uarg[2] = (intptr_t)p->rqsr; /* const struct spacectl_range32 * */ > + uarg[2] = (intptr_t)p->rqsr; /* const struct spacectl_range * */ > iarg[3] = p->flags; /* int */ > - uarg[4] = (intptr_t)p->rmsr; /* struct spacectl_range32 * */ > + uarg[4] = (intptr_t)p->rmsr; /* struct spacectl_range * */ > *n_args = 5; > break; > } > @@ -9305,7 +9305,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) > break; > }; > break; > - /* freebsd32_fspacectl */ > + /* fspacectl */ > case 580: > switch (ndx) { > case 0: > @@ -9315,13 +9315,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) > p = "int"; > break; > case 2: > - p = "userland const struct spacectl_range32 *"; > + p = "userland const struct spacectl_range *"; > break; > case 3: > p = "int"; > break; > case 4: > - p = "userland struct spacectl_range32 *"; > + p = "userland struct spacectl_range *"; > break; > default: > break; > @@ -11272,7 +11272,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) > if (ndx == 0 || ndx == 1) > p = "int"; > break; > - /* freebsd32_fspacectl */ > + /* fspacectl */ > case 580: > if (ndx == 0 || ndx == 1) > p = "int"; > diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master > index 6b2d9fe4fae0..9dd902df04af 100644 > --- a/sys/compat/freebsd32/syscalls.master > +++ b/sys/compat/freebsd32/syscalls.master > @@ -1199,10 +1199,10 @@ > struct aiocb32 *aiocbp); } > 579 AUE_AIO_READV STD { int freebsd32_aio_readv( \ > struct aiocb32 *aiocbp); } > -580 AUE_FSPACECTL STD { int freebsd32_fspacectl(int fd, \ > +580 AUE_FSPACECTL NOPROTO { int fspacectl(int fd, \ > int cmd, \ > - const struct spacectl_range32 *rqsr, \ > + const struct spacectl_range *rqsr, \ > int flags, \ > - struct spacectl_range32 *rmsr); } > + struct spacectl_range *rmsr); } > 581 AUE_NULL NOPROTO { int sched_getcpu(void); } > ; vim: syntax=off Could you please not commit generated files together with the true source changes? From nobody Thu Nov 18 03:04:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 409E118A516E; Thu, 18 Nov 2021 03:04: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 4Hvl4g1Jfxz3N7n; Thu, 18 Nov 2021 03:04:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0DF41556C; Thu, 18 Nov 2021 03:04: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 1AI3428Y095745; Thu, 18 Nov 2021 03:04:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI342le095744; Thu, 18 Nov 2021 03:04:02 GMT (envelope-from git) Date: Thu, 18 Nov 2021 03:04:02 GMT Message-Id: <202111180304.1AI342le095744@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: 4fdc5b8494b4 - main - g_vfs_close(): vp is unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4fdc5b8494b46007549b1932c64e11cf634599a1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4fdc5b8494b46007549b1932c64e11cf634599a1 commit 4fdc5b8494b46007549b1932c64e11cf634599a1 Author: Konstantin Belousov AuthorDate: 2021-11-18 03:02:59 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-18 03:02:59 +0000 g_vfs_close(): vp is unused Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/geom/geom_vfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c index ab068d7c85d5..592062b8b12a 100644 --- a/sys/geom/geom_vfs.c +++ b/sys/geom/geom_vfs.c @@ -302,13 +302,11 @@ g_vfs_close(struct g_consumer *cp) { struct g_geom *gp; struct g_vfs_softc *sc; - struct vnode *vp; g_topology_assert(); gp = cp->geom; sc = gp->softc; - vp = cp->private; bufobj_invalbuf(sc->sc_bo, V_SAVE, 0, 0); sc->sc_bo->bo_private = cp->private; gp->softc = NULL; From nobody Thu Nov 18 05:32:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4329718A5D53; Thu, 18 Nov 2021 05:32:59 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvpNW0zszz4sy8; Thu, 18 Nov 2021 05:32:59 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 012F7242CA; Thu, 18 Nov 2021 05:32:59 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f171.google.com with SMTP id m25so4960509qtq.13; Wed, 17 Nov 2021 21:32:58 -0800 (PST) X-Gm-Message-State: AOAM531g3zfo8Ivs6guDz4+LoX5CXlFq19OzeK+R8vIuKEjvbkpWF0JL Vdo3P9SRRWxtuhNTQMmMfQg6iygwdrT1E527jTw= X-Google-Smtp-Source: ABdhPJxrYFpQ57bnpubdkGswwPpvUqiSoxwM+x4xa5E+Bm9R1moOZDB7GOV+0ub4bCB5zP11aicuNs+pxfrh6sHsufc= X-Received: by 2002:a05:622a:144f:: with SMTP id v15mr22704828qtx.340.1637213578473; Wed, 17 Nov 2021 21:32:58 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202111032055.1A3KtLQX071805@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Wed, 17 Nov 2021 23:32:47 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 589aed00e36c - main - sched: separate out schedinit_ap() To: Mark Johnston Cc: Konstantin Belousov , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 17, 2021 at 5:25 PM Mark Johnston wrote: > > On Thu, Nov 18, 2021 at 01:10:17AM +0200, Konstantin Belousov wrote: > > On Wed, Nov 17, 2021 at 04:44:29PM -0600, Kyle Evans wrote: > > > On Wed, Nov 3, 2021 at 3:55 PM Kyle Evans wrote: > > > > > > > > The branch main has been updated by kevans: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=589aed00e36c22733d3fd9c9016deccf074830b1 > > > > > > > > commit 589aed00e36c22733d3fd9c9016deccf074830b1 > > > > Author: Kyle Evans > > > > AuthorDate: 2021-11-02 18:06:47 +0000 > > > > Commit: Kyle Evans > > > > CommitDate: 2021-11-03 20:54:59 +0000 > > > > > > > > sched: separate out schedinit_ap() > > > > > > > > schedinit_ap() sets up an AP for a later call to sched_throw(NULL). > > > > > > > > Currently, ULE sets up some pcpu bits and fixes the idlethread lock with > > > > a call to sched_throw(NULL); this results in a window where curthread is > > > > setup in platforms' init_secondary(), but it has the wrong td_lock. > > > > Typical platform AP startup procedure looks something like: > > > > > > > > - Setup curthread > > > > - ... other stuff, including cpu_initclocks_ap() > > > > - Signal smp_started > > > > - sched_throw(NULL) to enter the scheduler > > > > > > > > cpu_initclocks_ap() may have callouts to process (e.g., nvme) and > > > > attempt to sched_add() for this AP, but this attempt fails because > > > > of the noted violated assumption leading to locking heartburn in > > > > sched_setpreempt(). > > > > > > > > Interrupts are still disabled until cpu_throw() so we're not really at > > > > risk of being preempted -- just let the scheduler in on it a little > > > > earlier as part of setting up curthread. > > > > > > > > > > What's the general consensus on potential out-of-tree archs maintained > > > on stable branches? I'd like to MFC this at least to stable/13 to > > > avoid it being in the way of the nvme change that spurred it, and I'm > > > trying to decide if it should have something like this added to make > > > it safe: > > I do not believe that we even think of guaranteeing this level of source > > stability. > > At first I assumed this was referencing sparc64, but that is not present > in stable/13 either. I believe stable/13 and main support the same set > of platforms, in which case I agree that we shouldn't bother with trying > to provide extra compatibility, and I think it's probably not necessary > to merge this to 12. Thanks, folks! This was mainly for theoretical scenarios like some downstream maintaining, e.g., ia64 on their own stable/13. This is also trivial to fix for such a scenario, though, and the breakage would be obvious. Agreed re: stable/12; imp didn't seem to have much appetite for merging his nvme changes back that far (while stable/13 was within scope), so I'm not inclined to go that far either. Thanks! Kyle Evans From nobody Thu Nov 18 06:47:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 829AA1835A08; Thu, 18 Nov 2021 06:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hvr2l3CHBz3pYx; Thu, 18 Nov 2021 06:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E6F910892; Thu, 18 Nov 2021 06:47: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 1AI6lhkv088010; Thu, 18 Nov 2021 06:47:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI6lhXU088009; Thu, 18 Nov 2021 06:47:43 GMT (envelope-from git) Date: Thu, 18 Nov 2021 06:47:43 GMT Message-Id: <202111180647.1AI6lhXU088009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 05514f66684c - stable/13 - bsdinstall: Fix mirror selection List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 05514f66684cdf30e23933566f798dff5d26c5cf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=05514f66684cdf30e23933566f798dff5d26c5cf commit 05514f66684cdf30e23933566f798dff5d26c5cf Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-10 15:39:09 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-18 06:46:25 +0000 bsdinstall: Fix mirror selection This is a follow-up to 2697622687708bffd4c3dcfc44f0c977a78e506d, which fixed 2 out of 3 broken uses of the mirrorselect script. Reviewed by: emaste Approved by: emaste (src) MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D32927 (cherry picked from commit 4042b356a00e12d6888a4e15e2373453804c5121) --- usr.sbin/bsdinstall/scripts/jail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index ecfbb78357d9..13a6de0846a9 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -95,7 +95,7 @@ FETCH_DISTRIBUTIONS=`echo $FETCH_DISTRIBUTIONS` # Trim white space if [ -n "$FETCH_DISTRIBUTIONS" -a -z "$BSDINSTALL_DISTSITE" ]; then exec 3>&1 - BSDINSTALL_DISTSITE=`bsdinstall mirrorselect 2>&1 1>&3` + BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&3) MIRROR_BUTTON=$? exec 3>&- test $MIRROR_BUTTON -eq 0 || error "No mirror selected" From nobody Thu Nov 18 07:09:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A4DB11888DA8; Thu, 18 Nov 2021 07: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 4HvrX84DGZz3vvw; Thu, 18 Nov 2021 07:09:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71B90107EB; Thu, 18 Nov 2021 07: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 1AI79i3X015624; Thu, 18 Nov 2021 07: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 1AI79iNR015623; Thu, 18 Nov 2021 07:09:44 GMT (envelope-from git) Date: Thu, 18 Nov 2021 07:09:44 GMT Message-Id: <202111180709.1AI79iNR015623@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: c6d3831e5492 - stable/12 - bsdinstall: Fix mirror selection List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c6d3831e54921c55c8297f5fcccf31f62b8bf324 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c6d3831e54921c55c8297f5fcccf31f62b8bf324 commit c6d3831e54921c55c8297f5fcccf31f62b8bf324 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-10 15:39:09 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-18 07:09:00 +0000 bsdinstall: Fix mirror selection This is a follow-up to 2697622687708bffd4c3dcfc44f0c977a78e506d, which fixed 2 out of 3 broken uses of the mirrorselect script. Reviewed by: emaste Approved by: emaste (src) MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D32927 (cherry picked from commit 4042b356a00e12d6888a4e15e2373453804c5121) --- usr.sbin/bsdinstall/scripts/jail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index ecfbb78357d9..13a6de0846a9 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -95,7 +95,7 @@ FETCH_DISTRIBUTIONS=`echo $FETCH_DISTRIBUTIONS` # Trim white space if [ -n "$FETCH_DISTRIBUTIONS" -a -z "$BSDINSTALL_DISTSITE" ]; then exec 3>&1 - BSDINSTALL_DISTSITE=`bsdinstall mirrorselect 2>&1 1>&3` + BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&3) MIRROR_BUTTON=$? exec 3>&- test $MIRROR_BUTTON -eq 0 || error "No mirror selected" From nobody Thu Nov 18 08:47:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3146A189342C; Thu, 18 Nov 2021 08:47:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvthP0qSgz3CWD; Thu, 18 Nov 2021 08:47:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC07B12120; Thu, 18 Nov 2021 08:47: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 1AI8l0CC047240; Thu, 18 Nov 2021 08:47:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI8l0JP047239; Thu, 18 Nov 2021 08:47:00 GMT (envelope-from git) Date: Thu, 18 Nov 2021 08:47:00 GMT Message-Id: <202111180847.1AI8l0JP047239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Roger Pau Monn=C3=A9?= Subject: git: 50d7d967bbfd - main - xen/privcmd: fix MMAP_RESOURCE ioctl to copy out results List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50d7d967bbfdcaf38bfac1c3bcc985a31fed26ab Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=50d7d967bbfdcaf38bfac1c3bcc985a31fed26ab commit 50d7d967bbfdcaf38bfac1c3bcc985a31fed26ab Author: Roger Pau Monné AuthorDate: 2021-11-17 10:48:35 +0000 Commit: Roger Pau Monné CommitDate: 2021-11-18 08:46:44 +0000 xen/privcmd: fix MMAP_RESOURCE ioctl to copy out results The current definition for the MMAP_RESOURCE ioctl was wrong as it didn't copy back the result to the caller. Fix the definition and also remove the bogus attempt to copy the result in the implementation. Note such copy back is only needed when querying the size of a resource. Sponsored by: Citrix Systems R&D --- sys/dev/xen/privcmd/privcmd.c | 8 +++----- sys/xen/privcmd.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/xen/privcmd/privcmd.c b/sys/dev/xen/privcmd/privcmd.c index 0ef6737df64f..763c2f471c4f 100644 --- a/sys/dev/xen/privcmd/privcmd.c +++ b/sys/dev/xen/privcmd/privcmd.c @@ -426,12 +426,10 @@ mmap_out: if (mmap->addr == 0 && mmap->num == 0) { error = HYPERVISOR_memory_op(XENMEM_acquire_resource, &adq); - if (error != 0) { + if (error != 0) error = xen_translate_error(error); - break; - } - error = copyout(&adq.nr_frames, &mmap->num, - sizeof(mmap->num)); + else + mmap->num = adq.nr_frames; break; } diff --git a/sys/xen/privcmd.h b/sys/xen/privcmd.h index 55a1cdc86471..605ba018ac34 100644 --- a/sys/xen/privcmd.h +++ b/sys/xen/privcmd.h @@ -79,7 +79,7 @@ struct ioctl_privcmd_dmop { #define IOCTL_PRIVCMD_MMAPBATCH \ _IOWR('E', 1, struct ioctl_privcmd_mmapbatch) #define IOCTL_PRIVCMD_MMAP_RESOURCE \ - _IOW('E', 2, struct ioctl_privcmd_mmapresource) + _IOWR('E', 2, struct ioctl_privcmd_mmapresource) #define IOCTL_PRIVCMD_DM_OP \ _IOW('E', 3, struct ioctl_privcmd_dmop) #define IOCTL_PRIVCMD_RESTRICT \ From nobody Thu Nov 18 08:54:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A20631896934; Thu, 18 Nov 2021 08: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 4HvtsG49Dgz3FjP; Thu, 18 Nov 2021 08:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B55C12394; Thu, 18 Nov 2021 08:54: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 1AI8sg7B060703; Thu, 18 Nov 2021 08: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 1AI8sgu9060702; Thu, 18 Nov 2021 08:54:42 GMT (envelope-from git) Date: Thu, 18 Nov 2021 08:54:42 GMT Message-Id: <202111180854.1AI8sgu9060702@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: 0dff875fa9bc - main - ipfw: remove unnecessary TCP related 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0dff875fa9bccf85ba5b885fd3a6011115aa4416 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0dff875fa9bccf85ba5b885fd3a6011115aa4416 commit 0dff875fa9bccf85ba5b885fd3a6011115aa4416 Author: Gleb Smirnoff AuthorDate: 2021-11-18 08:53:15 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-18 08:54:28 +0000 ipfw: remove unnecessary TCP related includes --- sys/netpfil/ipfw/ip_fw_dynamic.c | 2 +- sys/netpfil/ipfw/ip_fw_log.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_dynamic.c b/sys/netpfil/ipfw/ip_fw_dynamic.c index a76e8b1ac667..00b54fa463ac 100644 --- a/sys/netpfil/ipfw/ip_fw_dynamic.c +++ b/sys/netpfil/ipfw/ip_fw_dynamic.c @@ -59,8 +59,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include /* IN6_ARE_ADDR_EQUAL */ #ifdef INET6 diff --git a/sys/netpfil/ipfw/ip_fw_log.c b/sys/netpfil/ipfw/ip_fw_log.c index 78412b5db702..3e375b06cd76 100644 --- a/sys/netpfil/ipfw/ip_fw_log.c +++ b/sys/netpfil/ipfw/ip_fw_log.c @@ -56,8 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include #include From nobody Thu Nov 18 08:54:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BCC491896B2E; Thu, 18 Nov 2021 08: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 4HvtsH4sxlz3FVD; Thu, 18 Nov 2021 08:54:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8764F12331; Thu, 18 Nov 2021 08: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 1AI8sh6c060727; Thu, 18 Nov 2021 08:54:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AI8sh38060726; Thu, 18 Nov 2021 08:54:43 GMT (envelope-from git) Date: Thu, 18 Nov 2021 08:54:43 GMT Message-Id: <202111180854.1AI8sh38060726@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: 3850d1837bf7 - main - in6_rmx: remove unnecessary TCP 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3850d1837bf715527f8b7d9bf4caae5e728626da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3850d1837bf715527f8b7d9bf4caae5e728626da commit 3850d1837bf715527f8b7d9bf4caae5e728626da Author: Gleb Smirnoff AuthorDate: 2021-11-18 08:53:42 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-18 08:54:29 +0000 in6_rmx: remove unnecessary TCP includes --- sys/netinet6/in6_rmx.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c index 54136f9983b2..d1c0a83d0002 100644 --- a/sys/netinet6/in6_rmx.c +++ b/sys/netinet6/in6_rmx.c @@ -93,11 +93,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include - static int rib6_preadd(u_int fibnum, const struct sockaddr *addr, const struct sockaddr *mask, struct nhop_object *nh) From nobody Thu Nov 18 13:57:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2BD9A189D245; Thu, 18 Nov 2021 13:57: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 4Hw1Z568lXz4WWY; Thu, 18 Nov 2021 13:57:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9762A16380; Thu, 18 Nov 2021 13:57: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 1AIDv1Dt059783; Thu, 18 Nov 2021 13:57:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIDv1Vo059782; Thu, 18 Nov 2021 13:57:01 GMT (envelope-from git) Date: Thu, 18 Nov 2021 13:57:01 GMT Message-Id: <202111181357.1AIDv1Vo059782@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: 5bb3134a8c21 - main - Fix some modules to export more used 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/main X-Git-Reftype: branch X-Git-Commit: 5bb3134a8c21cb87b30e135ef168483f0333dabb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5bb3134a8c21cb87b30e135ef168483f0333dabb commit 5bb3134a8c21cb87b30e135ef168483f0333dabb Author: Konstantin Belousov AuthorDate: 2021-11-07 08:42:24 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-18 13:56:23 +0000 Fix some modules to export more used symbols and remove non-present symbols that are now reported by kmod_syms.awk. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32878 --- sys/modules/aic7xxx/ahc/Makefile | 2 ++ sys/modules/alq/Makefile | 2 ++ sys/modules/amdsmn/Makefile | 2 ++ sys/modules/amr/Makefile | 2 ++ sys/modules/ata/atacore/Makefile | 2 ++ sys/modules/ata/atapci/Makefile | 2 ++ sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile | 2 ++ sys/modules/ath_hal/Makefile | 2 ++ sys/modules/backlight/Makefile | 2 ++ sys/modules/bhnd/Makefile | 4 +++- sys/modules/bhnd/bhndb/Makefile | 2 ++ sys/modules/bridgestp/Makefile | 2 ++ sys/modules/ctl/Makefile | 2 ++ sys/modules/cxgbe/if_cxgbe/Makefile | 2 ++ sys/modules/dcons/Makefile | 2 ++ sys/modules/efirt/Makefile | 2 ++ sys/modules/evdev/Makefile | 2 ++ sys/modules/exca/Makefile | 2 ++ sys/modules/firewire/firewire/Makefile | 2 ++ sys/modules/firmware/Makefile | 2 ++ sys/modules/geom/geom_flashmap/Makefile | 2 ++ sys/modules/gpio/gpiobus/Makefile | 2 ++ sys/modules/hid/hconf/Makefile | 2 ++ sys/modules/hid/hid/Makefile | 2 ++ sys/modules/hid/hidbus/Makefile | 2 ++ sys/modules/hid/hidmap/Makefile | 2 ++ sys/modules/hyperv/vmbus/Makefile | 2 ++ sys/modules/i2c/iicbb/Makefile | 2 ++ sys/modules/i2c/iicbus/Makefile | 2 ++ sys/modules/i2c/mux/iicmux/Makefile | 2 ++ sys/modules/i2c/smbus/Makefile | 2 ++ sys/modules/ibcore/Makefile | 2 ++ sys/modules/if_gif/Makefile | 2 ++ sys/modules/if_infiniband/Makefile | 2 ++ sys/modules/iflib/Makefile | 2 ++ sys/modules/ipfw/Makefile | 2 ++ sys/modules/iscsi/Makefile | 2 ++ sys/modules/ixl/Makefile | 2 ++ sys/modules/kgssapi/Makefile | 2 ++ sys/modules/krpc/Makefile | 2 ++ sys/modules/libalias/libalias/Makefile | 2 ++ sys/modules/linux/Makefile | 2 ++ sys/modules/linux64/Makefile | 2 ++ sys/modules/linux_common/Makefile | 4 ++-- sys/modules/linuxkpi/Makefile | 2 ++ sys/modules/mfi/Makefile | 2 ++ sys/modules/mii/Makefile | 8 +------- sys/modules/mlx4/Makefile | 2 ++ sys/modules/mlx5/Makefile | 2 ++ sys/modules/mlxfw/Makefile | 2 ++ sys/modules/netgraph/atm/atmbase/Makefile | 2 ++ sys/modules/netgraph/bluetooth/bluetooth/Makefile | 2 ++ sys/modules/netgraph/bluetooth/socket/Makefile | 2 ++ sys/modules/netgraph/netgraph/Makefile | 2 ++ sys/modules/nfscommon/Makefile | 2 ++ sys/modules/nfssvc/Makefile | 2 ++ sys/modules/ntb/ntb/Makefile | 2 ++ sys/modules/ntb/ntb_transport/Makefile | 2 ++ sys/modules/nvme/Makefile | 2 ++ sys/modules/ow/owc/Makefile | 2 ++ sys/modules/pf/Makefile | 2 ++ sys/modules/ppbus/Makefile | 7 +++++-- sys/modules/procfs/Makefile | 2 +- sys/modules/pseudofs/Makefile | 5 ++--- sys/modules/pwm/pwmbus/Makefile | 2 ++ sys/modules/rc4/Makefile | 2 ++ sys/modules/rtwn/Makefile | 2 ++ sys/modules/sdhci/Makefile | 2 ++ sys/modules/sound/driver/sbc/Makefile | 2 ++ sys/modules/sound/driver/spicds/Makefile | 2 ++ sys/modules/spi/spibus/Makefile | 2 ++ sys/modules/spigen/Makefile | 2 ++ sys/modules/superio/Makefile | 2 ++ sys/modules/sysvipc/sysvmsg/Makefile | 2 ++ sys/modules/sysvipc/sysvsem/Makefile | 2 ++ sys/modules/sysvipc/sysvshm/Makefile | 2 ++ sys/modules/toecore/Makefile | 2 ++ sys/modules/ufs/Makefile | 2 ++ sys/modules/usb/ucom/Makefile | 2 ++ sys/modules/usb/uether/Makefile | 2 ++ sys/modules/usb/uhid/Makefile | 2 ++ sys/modules/usb/usb/Makefile | 2 ++ sys/modules/virtio/virtio/Makefile | 2 ++ sys/modules/wlan/Makefile | 2 ++ sys/modules/xdr/Makefile | 2 ++ sys/modules/xz/Makefile | 2 ++ 86 files changed, 174 insertions(+), 16 deletions(-) diff --git a/sys/modules/aic7xxx/ahc/Makefile b/sys/modules/aic7xxx/ahc/Makefile index 41bf2d70c9a2..57451e77f2a1 100644 --- a/sys/modules/aic7xxx/ahc/Makefile +++ b/sys/modules/aic7xxx/ahc/Makefile @@ -52,4 +52,6 @@ cleanfirmware: clean CLEANFILES= ${GENSRCS} .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/alq/Makefile b/sys/modules/alq/Makefile index 911eeca73880..858f2a55ded7 100644 --- a/sys/modules/alq/Makefile +++ b/sys/modules/alq/Makefile @@ -4,4 +4,6 @@ KMOD= alq SRCS= opt_mac.h vnode_if.h kern_alq.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/amdsmn/Makefile b/sys/modules/amdsmn/Makefile index 1f030270e792..0e5e1b182548 100644 --- a/sys/modules/amdsmn/Makefile +++ b/sys/modules/amdsmn/Makefile @@ -5,4 +5,6 @@ KMOD= amdsmn SRCS= amdsmn.c bus_if.h device_if.h pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/amr/Makefile b/sys/modules/amr/Makefile index 1ee2ece51a16..a17ed246b8c7 100644 --- a/sys/modules/amr/Makefile +++ b/sys/modules/amr/Makefile @@ -16,4 +16,6 @@ SRCS= amr.c amr_pci.c amr_disk.c device_if.h bus_if.h pci_if.h # Debugging #CFLAGS+= -DAMR_DEBUG=3 +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ata/atacore/Makefile b/sys/modules/ata/atacore/Makefile index 9ecd03ed0ba5..f0cd0b4349d3 100644 --- a/sys/modules/ata/atacore/Makefile +++ b/sys/modules/ata/atacore/Makefile @@ -6,4 +6,6 @@ KMOD= ata SRCS= ata-all.c ata_if.c ata-lowlevel.c SRCS+= ata_if.h bus_if.h device_if.h opt_cam.h pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ata/atapci/Makefile b/sys/modules/ata/atapci/Makefile index 5aaa265000cf..bc00b57728ee 100644 --- a/sys/modules/ata/atapci/Makefile +++ b/sys/modules/ata/atapci/Makefile @@ -8,4 +8,6 @@ KMOD= atapci SRCS= ata-pci.c ata-dma.c ata-sata.c SRCS+= ata_if.h bus_if.h device_if.h pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile b/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile index 7e44778bc165..52e806366d0e 100644 --- a/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile +++ b/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile @@ -6,4 +6,6 @@ KMOD= atasiliconimage SRCS= ata-siliconimage.c SRCS+= ata_if.h bus_if.h device_if.h pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ath_hal/Makefile b/sys/modules/ath_hal/Makefile index 6b604c6e9dbb..902c32a95b19 100644 --- a/sys/modules/ath_hal/Makefile +++ b/sys/modules/ath_hal/Makefile @@ -44,4 +44,6 @@ CFLAGS+= -I. -I${SRCTOP}/sys/contrib/dev/ath/ath_hal/ .include +EXPORT_SYMS= YES + CWARNFLAGS.ah_regdomain.c= ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} diff --git a/sys/modules/backlight/Makefile b/sys/modules/backlight/Makefile index 1c49d7b55138..31de4e804127 100644 --- a/sys/modules/backlight/Makefile +++ b/sys/modules/backlight/Makefile @@ -10,4 +10,6 @@ SRCS+= bus_if.h \ backlight_if.h \ backlight_if.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/bhnd/Makefile b/sys/modules/bhnd/Makefile index 18e5ad4c2149..54a72a11e28d 100644 --- a/sys/modules/bhnd/Makefile +++ b/sys/modules/bhnd/Makefile @@ -22,7 +22,7 @@ SRCS+= opt_platform.h SRCS+= bhnd_sprom_chipc.c \ bhnd_pmu_chipc.c - + SRCS+= bhnd_pwrctl.c \ bhnd_pwrctl_subr.c \ bhnd_pwrctl_if.c \ @@ -71,5 +71,7 @@ SUBDIR= bcma \ siba \ siba_bhndb +EXPORT_SYMS= YES + .include .include diff --git a/sys/modules/bhnd/bhndb/Makefile b/sys/modules/bhnd/bhndb/Makefile index 87ac5ef231bd..12fcde7e049f 100644 --- a/sys/modules/bhnd/bhndb/Makefile +++ b/sys/modules/bhnd/bhndb/Makefile @@ -15,4 +15,6 @@ SRCS+= bhnd_bus_if.h \ SRCS+= device_if.h bus_if.h pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/bridgestp/Makefile b/sys/modules/bridgestp/Makefile index 0bfd0caa1880..47a28cb8e7cd 100644 --- a/sys/modules/bridgestp/Makefile +++ b/sys/modules/bridgestp/Makefile @@ -5,4 +5,6 @@ KMOD= bridgestp SRCS= bridgestp.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ctl/Makefile b/sys/modules/ctl/Makefile index 49ba041ce224..5ff72216b329 100644 --- a/sys/modules/ctl/Makefile +++ b/sys/modules/ctl/Makefile @@ -28,4 +28,6 @@ SRCS+= opt_cam.h MFILES= kern/bus_if.m kern/device_if.m +EXPORT_SYMS= YES + .include diff --git a/sys/modules/cxgbe/if_cxgbe/Makefile b/sys/modules/cxgbe/if_cxgbe/Makefile index f64e53c91a7a..7210d4e8835e 100644 --- a/sys/modules/cxgbe/if_cxgbe/Makefile +++ b/sys/modules/cxgbe/if_cxgbe/Makefile @@ -44,4 +44,6 @@ SRCS+= fastlz.c CFLAGS+= -I${CXGBE} +EXPORT_SYMS= YES + .include diff --git a/sys/modules/dcons/Makefile b/sys/modules/dcons/Makefile index be27ee22dae0..bdc86609c16c 100644 --- a/sys/modules/dcons/Makefile +++ b/sys/modules/dcons/Makefile @@ -17,4 +17,6 @@ opt_ddb.h: CFLAGS+= -I${SRCTOP}/sys +EXPORT_SYMS= YES + .include diff --git a/sys/modules/efirt/Makefile b/sys/modules/efirt/Makefile index 58f4f9673c2e..4d6e89bc5d07 100644 --- a/sys/modules/efirt/Makefile +++ b/sys/modules/efirt/Makefile @@ -17,4 +17,6 @@ efirt_support.o: efirt_support.S assym.inc ${.IMPSRC} -o ${.TARGET} .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/evdev/Makefile b/sys/modules/evdev/Makefile index 7bea12e3277f..5888825f4773 100644 --- a/sys/modules/evdev/Makefile +++ b/sys/modules/evdev/Makefile @@ -6,4 +6,6 @@ KMOD= evdev SRCS= cdev.c evdev.c evdev_mt.c evdev_utils.c SRCS+= opt_evdev.h bus_if.h device_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/exca/Makefile b/sys/modules/exca/Makefile index 5135ff24adb3..3b51f87b2827 100644 --- a/sys/modules/exca/Makefile +++ b/sys/modules/exca/Makefile @@ -5,4 +5,6 @@ KMOD= exca SRCS= exca.c device_if.h bus_if.h power_if.h card_if.h pccarddevs.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/firewire/firewire/Makefile b/sys/modules/firewire/firewire/Makefile index 72fa049d4326..9ce806ae96d1 100644 --- a/sys/modules/firewire/firewire/Makefile +++ b/sys/modules/firewire/firewire/Makefile @@ -11,4 +11,6 @@ SRCS = bus_if.h device_if.h pci_if.h \ iec13213.h iec68113.h \ fwcrom.c fwdev.c fwmem.c fwmem.h fwdma.c fwdma.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/firmware/Makefile b/sys/modules/firmware/Makefile index 7a9eb4522970..5b74a9dce24c 100644 --- a/sys/modules/firmware/Makefile +++ b/sys/modules/firmware/Makefile @@ -5,4 +5,6 @@ KMOD= firmware SRCS= subr_firmware.c vnode_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/geom/geom_flashmap/Makefile b/sys/modules/geom/geom_flashmap/Makefile index 8b56c145ea51..47e3d6105371 100644 --- a/sys/modules/geom/geom_flashmap/Makefile +++ b/sys/modules/geom/geom_flashmap/Makefile @@ -5,4 +5,6 @@ KMOD= geom_flashmap SRCS= geom_flashmap.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/gpio/gpiobus/Makefile b/sys/modules/gpio/gpiobus/Makefile index 458d56d8b935..6dc40a2a9d65 100644 --- a/sys/modules/gpio/gpiobus/Makefile +++ b/sys/modules/gpio/gpiobus/Makefile @@ -42,4 +42,6 @@ SRCS+= ofw_gpiobus.c CFLAGS+= -I. -I${SRCTOP}/sys/dev/gpio/ +EXPORT_SYMS= YES + .include diff --git a/sys/modules/hid/hconf/Makefile b/sys/modules/hid/hconf/Makefile index 0ac8d969cd71..182d1d9fdf63 100644 --- a/sys/modules/hid/hconf/Makefile +++ b/sys/modules/hid/hconf/Makefile @@ -7,4 +7,6 @@ SRCS= hconf.c SRCS+= opt_hid.h SRCS+= bus_if.h device_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/hid/hid/Makefile b/sys/modules/hid/hid/Makefile index 81fc6c671ed2..749df79beff2 100644 --- a/sys/modules/hid/hid/Makefile +++ b/sys/modules/hid/hid/Makefile @@ -7,4 +7,6 @@ SRCS= hid.c hid_if.c SRCS+= opt_hid.h SRCS+= bus_if.h device_if.h hid_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/hid/hidbus/Makefile b/sys/modules/hid/hidbus/Makefile index e233e3e06f07..c2a452e1e9f2 100644 --- a/sys/modules/hid/hidbus/Makefile +++ b/sys/modules/hid/hidbus/Makefile @@ -6,4 +6,6 @@ KMOD= hidbus SRCS= hidbus.c SRCS+= bus_if.h device_if.h hid_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/hid/hidmap/Makefile b/sys/modules/hid/hidmap/Makefile index 00e7099b287b..e0c1c086e098 100644 --- a/sys/modules/hid/hidmap/Makefile +++ b/sys/modules/hid/hidmap/Makefile @@ -7,4 +7,6 @@ SRCS= hidmap.c SRCS+= opt_hid.h SRCS+= bus_if.h device_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/hyperv/vmbus/Makefile b/sys/modules/hyperv/vmbus/Makefile index 47a83e76204a..0aa489d8fa26 100644 --- a/sys/modules/hyperv/vmbus/Makefile +++ b/sys/modules/hyperv/vmbus/Makefile @@ -35,4 +35,6 @@ vmbus_vector.o: CFLAGS+= -I${SRCTOP}/sys/dev/hyperv/include \ -I${SRCTOP}/sys/dev/hyperv/vmbus +EXPORT_SYMS= YES + .include diff --git a/sys/modules/i2c/iicbb/Makefile b/sys/modules/i2c/iicbb/Makefile index c7737f09e8b9..9b74a5da39d6 100644 --- a/sys/modules/i2c/iicbb/Makefile +++ b/sys/modules/i2c/iicbb/Makefile @@ -10,4 +10,6 @@ KMOD = iicbb SRCS = device_if.h bus_if.h iicbus_if.h \ iicbb_if.h iicbb_if.c iicbb.c ${ofw_bus_if} opt_platform.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/i2c/iicbus/Makefile b/sys/modules/i2c/iicbus/Makefile index 8923615ecada..c6d2822bc20d 100644 --- a/sys/modules/i2c/iicbus/Makefile +++ b/sys/modules/i2c/iicbus/Makefile @@ -24,4 +24,6 @@ SRCS+= acpi_iicbus.c opt_acpi.h acpi_if.h SRCS+= ofw_iicbus.c ofw_bus_if.h .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/i2c/mux/iicmux/Makefile b/sys/modules/i2c/mux/iicmux/Makefile index 1d642bf3e5ae..b3f52c6c926e 100644 --- a/sys/modules/i2c/mux/iicmux/Makefile +++ b/sys/modules/i2c/mux/iicmux/Makefile @@ -16,4 +16,6 @@ SRCS+= \ SRCS+= ofw_bus_if.h .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/i2c/smbus/Makefile b/sys/modules/i2c/smbus/Makefile index b5e78f223b89..0e25b78c6e4f 100644 --- a/sys/modules/i2c/smbus/Makefile +++ b/sys/modules/i2c/smbus/Makefile @@ -5,4 +5,6 @@ KMOD = smbus SRCS = device_if.h bus_if.h smbus_if.h smbus_if.c \ smbconf.h smbconf.c smbus.h smbus.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ibcore/Makefile b/sys/modules/ibcore/Makefile index 951f0abab453..d3fc9096f315 100644 --- a/sys/modules/ibcore/Makefile +++ b/sys/modules/ibcore/Makefile @@ -52,6 +52,8 @@ CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -DINET6 -DINET -DCONFIG_INFINIBAND_USER_MEM +EXPORT_SYMS= YES + .include CWARNFLAGS+= -Wno-cast-qual -Wno-pointer-arith -Wno-redundant-decls diff --git a/sys/modules/if_gif/Makefile b/sys/modules/if_gif/Makefile index 5799a350c8ae..639aed0d94a5 100644 --- a/sys/modules/if_gif/Makefile +++ b/sys/modules/if_gif/Makefile @@ -10,4 +10,6 @@ SRCS= if_gif.c opt_inet.h opt_inet6.h SRCS.INET=in_gif.c SRCS.INET6=in6_gif.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/if_infiniband/Makefile b/sys/modules/if_infiniband/Makefile index ca5e7e3f44db..6593cd7d0574 100644 --- a/sys/modules/if_infiniband/Makefile +++ b/sys/modules/if_infiniband/Makefile @@ -7,4 +7,6 @@ SRCS= if_infiniband.c \ opt_inet.h \ opt_inet6.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/iflib/Makefile b/sys/modules/iflib/Makefile index e86fd7e82dd6..f598db2743dd 100644 --- a/sys/modules/iflib/Makefile +++ b/sys/modules/iflib/Makefile @@ -11,4 +11,6 @@ SRCS+= ifdi_if.c SRCS+= device_if.h bus_if.h pci_if.h pci_iov_if.h ifdi_if.h SRCS+= opt_acpi.h opt_inet.h opt_inet6.h opt_sched.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ipfw/Makefile b/sys/modules/ipfw/Makefile index 274b1b1e6cf5..81822a3e2b1e 100644 --- a/sys/modules/ipfw/Makefile +++ b/sys/modules/ipfw/Makefile @@ -19,4 +19,6 @@ CFLAGS+= -DIPFIREWALL -I${SRCTOP}/sys/contrib/ck/include #CFLAGS+= -DIPFIREWALL_DEFAULT_TO_ACCEPT # +EXPORT_SYMS= YES + .include diff --git a/sys/modules/iscsi/Makefile b/sys/modules/iscsi/Makefile index 9b150f5c2213..e74f8ff132e2 100644 --- a/sys/modules/iscsi/Makefile +++ b/sys/modules/iscsi/Makefile @@ -22,4 +22,6 @@ CFLAGS+=-DICL_KERNEL_PROXY MFILES= kern/bus_if.m kern/device_if.m dev/iscsi/icl_conn_if.m +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ixl/Makefile b/sys/modules/ixl/Makefile index 2b524e974404..fb2fcf6574ac 100644 --- a/sys/modules/ixl/Makefile +++ b/sys/modules/ixl/Makefile @@ -22,4 +22,6 @@ SRCS += i40e_common.c i40e_nvm.c i40e_adminq.c i40e_lan_hmc.c i40e_hmc.c i40e # CFLAGS += -DIXL_IW # SRCS += ixl_iw.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/kgssapi/Makefile b/sys/modules/kgssapi/Makefile index a720cdd6a487..a21524cb419a 100644 --- a/sys/modules/kgssapi/Makefile +++ b/sys/modules/kgssapi/Makefile @@ -51,4 +51,6 @@ gssd_xdr.c: $S/kgssapi/gssd.x gssd_clnt.c: $S/kgssapi/gssd.x RPCGEN_CPP=${CPP:Q} rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/krpc/Makefile b/sys/modules/krpc/Makefile index 72adceac32ce..e8946f0ba4ef 100644 --- a/sys/modules/krpc/Makefile +++ b/sys/modules/krpc/Makefile @@ -55,4 +55,6 @@ rpctlssd_xdr.c: $S/rpc/rpcsec_tls/rpctlssd.x rpctlssd_clnt.c: $S/rpc/rpcsec_tls/rpctlssd.x RPCGEN_CPP=${CPP:Q} rpcgen -lM $S/rpc/rpcsec_tls/rpctlssd.x | grep -v string.h > rpctlssd_clnt.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/libalias/libalias/Makefile b/sys/modules/libalias/libalias/Makefile index 655e67bebb5e..4da69ea972b0 100644 --- a/sys/modules/libalias/libalias/Makefile +++ b/sys/modules/libalias/libalias/Makefile @@ -5,4 +5,6 @@ KMOD= libalias SRCS= alias.c alias_db.c alias_proxy.c alias_util.c alias_mod.c alias_sctp.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index d2822a20c67a..089187ca7cff 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -113,4 +113,6 @@ linux${SFX}_genassym.o: offset.inc .warning Building Linuxulator outside of a kernel does not make sense .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index 17192b4f18aa..e2a408f49bad 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -85,4 +85,6 @@ linux_genassym.o: offset.inc .warning Building Linuxulator outside of a kernel does not make sense .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile index c7d139e2fb9a..9197ba9454bc 100644 --- a/sys/modules/linux_common/Makefile +++ b/sys/modules/linux_common/Makefile @@ -9,8 +9,6 @@ SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \ EXPORT_SYMS= EXPORT_SYMS+= linux_emul_path -EXPORT_SYMS+= linux_ioctl_register_handler -EXPORT_SYMS+= linux_ioctl_unregister_handler EXPORT_SYMS+= linux_get_osname EXPORT_SYMS+= linux_get_osrelease @@ -18,4 +16,6 @@ EXPORT_SYMS+= linux_get_osrelease .warning Building Linuxulator outside of a kernel does not make sense .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index e1b1eab6ab09..6905166440aa 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -39,4 +39,6 @@ SRCS+= ${LINUXKPI_GENSRCS} CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include +EXPORT_SYMS= YES + .include diff --git a/sys/modules/mfi/Makefile b/sys/modules/mfi/Makefile index 53f4164add7b..7a17f9b0f4fa 100644 --- a/sys/modules/mfi/Makefile +++ b/sys/modules/mfi/Makefile @@ -15,4 +15,6 @@ SRCS+= device_if.h bus_if.h pci_if.h #CFLAGS += -DMFI_DEBUG +EXPORT_SYMS= YES + .include diff --git a/sys/modules/mii/Makefile b/sys/modules/mii/Makefile index 5709af97b720..348c9b7b2845 100644 --- a/sys/modules/mii/Makefile +++ b/sys/modules/mii/Makefile @@ -13,12 +13,6 @@ SRCS+= smscphy.c tdkphy.c truephy.c SRCS+= ukphy.c ukphy_subr.c SRCS+= xmphy.c -EXPORT_SYMS= mii_attach \ - mii_bitbang_readreg \ - mii_bitbang_sync \ - mii_bitbang_writereg \ - mii_mediachg \ - mii_pollstat \ - mii_tick +EXPORT_SYMS= YES .include diff --git a/sys/modules/mlx4/Makefile b/sys/modules/mlx4/Makefile index cb140a59854f..96818c2ef3d0 100644 --- a/sys/modules/mlx4/Makefile +++ b/sys/modules/mlx4/Makefile @@ -30,6 +30,8 @@ CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +EXPORT_SYMS= YES + .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith diff --git a/sys/modules/mlx5/Makefile b/sys/modules/mlx5/Makefile index aa07fb82a25d..c9eccde7d610 100644 --- a/sys/modules/mlx5/Makefile +++ b/sys/modules/mlx5/Makefile @@ -51,6 +51,8 @@ SRCS+= \ mlx5fpga_ipsec.c .endif +EXPORT_SYMS= YES + .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} diff --git a/sys/modules/mlxfw/Makefile b/sys/modules/mlxfw/Makefile index 1facd983fd3d..5980a49dabee 100644 --- a/sys/modules/mlxfw/Makefile +++ b/sys/modules/mlxfw/Makefile @@ -15,4 +15,6 @@ CFLAGS+= \ -I${SRCTOP}/sys/contrib/xz-embedded/freebsd \ -I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz +EXPORT_SYMS= YES + .include diff --git a/sys/modules/netgraph/atm/atmbase/Makefile b/sys/modules/netgraph/atm/atmbase/Makefile index f495cdbbda78..68959693811e 100644 --- a/sys/modules/netgraph/atm/atmbase/Makefile +++ b/sys/modules/netgraph/atm/atmbase/Makefile @@ -15,4 +15,6 @@ SRCS= ngatmbase.c unimsg_common.c straddr.c \ CFLAGS+= -I${LIBBASE} # -DNGATM_DEBUG +EXPORT_SYMS= YES + .include diff --git a/sys/modules/netgraph/bluetooth/bluetooth/Makefile b/sys/modules/netgraph/bluetooth/bluetooth/Makefile index 2e25d8e37cb5..eb6c64b7ae65 100644 --- a/sys/modules/netgraph/bluetooth/bluetooth/Makefile +++ b/sys/modules/netgraph/bluetooth/bluetooth/Makefile @@ -8,4 +8,6 @@ CFLAGS+= -I${SRCTOP}/sys/netgraph/bluetooth/include KMOD= ng_bluetooth SRCS= ng_bluetooth.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/netgraph/bluetooth/socket/Makefile b/sys/modules/netgraph/bluetooth/socket/Makefile index 36bc4e9fbd0f..1b0e913b1cf8 100644 --- a/sys/modules/netgraph/bluetooth/socket/Makefile +++ b/sys/modules/netgraph/bluetooth/socket/Makefile @@ -13,4 +13,6 @@ SRCS= ng_btsocket.c \ ng_btsocket_rfcomm.c \ ng_btsocket_sco.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/netgraph/netgraph/Makefile b/sys/modules/netgraph/netgraph/Makefile index a34d6164c908..48adf319d718 100644 --- a/sys/modules/netgraph/netgraph/Makefile +++ b/sys/modules/netgraph/netgraph/Makefile @@ -4,4 +4,6 @@ KMOD= netgraph SRCS= ng_base.c ng_parse.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/nfscommon/Makefile b/sys/modules/nfscommon/Makefile index cc2d48c1b1bc..08d6351bd89b 100644 --- a/sys/modules/nfscommon/Makefile +++ b/sys/modules/nfscommon/Makefile @@ -14,4 +14,6 @@ SRCS= vnode_if.h \ opt_nfs.h \ opt_ufs.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/nfssvc/Makefile b/sys/modules/nfssvc/Makefile index ff9462c685f7..f59b63459fc2 100644 --- a/sys/modules/nfssvc/Makefile +++ b/sys/modules/nfssvc/Makefile @@ -5,4 +5,6 @@ KMOD= nfssvc SRCS= nfs_nfssvc.c \ opt_nfs.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ntb/ntb/Makefile b/sys/modules/ntb/ntb/Makefile index ec6421ac7b66..f318ff0f88b9 100644 --- a/sys/modules/ntb/ntb/Makefile +++ b/sys/modules/ntb/ntb/Makefile @@ -6,4 +6,6 @@ KMOD = ntb SRCS = ntb.c ntb_if.c SRCS += device_if.h bus_if.h ntb_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ntb/ntb_transport/Makefile b/sys/modules/ntb/ntb_transport/Makefile index df39148f64da..f7094a29d6b4 100644 --- a/sys/modules/ntb/ntb_transport/Makefile +++ b/sys/modules/ntb/ntb_transport/Makefile @@ -6,4 +6,6 @@ KMOD = ntb_transport SRCS = ntb_transport.c SRCS += device_if.h bus_if.h ntb_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/nvme/Makefile b/sys/modules/nvme/Makefile index 1fb4604fc33a..7aad95d55e60 100644 --- a/sys/modules/nvme/Makefile +++ b/sys/modules/nvme/Makefile @@ -23,4 +23,6 @@ SRCS = nvme.c \ opt_nvme.h \ pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ow/owc/Makefile b/sys/modules/ow/owc/Makefile index 909c2382ad7d..78da808c82bc 100644 --- a/sys/modules/ow/owc/Makefile +++ b/sys/modules/ow/owc/Makefile @@ -7,4 +7,6 @@ SRCS= owc_gpiobus.c SRCS+= gpio_if.h gpiobus_if.h owll_if.h ofw_bus_if.h bus_if.h device_if.h SRCS+= opt_platform.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/pf/Makefile b/sys/modules/pf/Makefile index fbf5e0cbfa89..e2663b9748a8 100644 --- a/sys/modules/pf/Makefile +++ b/sys/modules/pf/Makefile @@ -23,4 +23,6 @@ opt_global.h: .endif .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ppbus/Makefile b/sys/modules/ppbus/Makefile index 6b29f6985236..b2ebb2430936 100644 --- a/sys/modules/ppbus/Makefile +++ b/sys/modules/ppbus/Makefile @@ -7,7 +7,7 @@ SRCS= bus_if.h device_if.h ppbus_if.h ppbus_if.c \ opt_ppb_1284.h \ ppb_1284.c ppb_base.c ppb_msq.c ppbconf.c -EXPORT_SYMS= ppb_attach_device \ +EXPORT_SYMS= \ ppb_request_bus \ ppb_release_bus \ ppb_get_status \ @@ -17,6 +17,9 @@ EXPORT_SYMS= ppb_attach_device \ ppb_get_epp_protocol \ ppb_set_mode \ ppb_get_mode \ - ppb_write + ppb_write \ + ppb_lock + +EXPORT_SYMS= YES .include diff --git a/sys/modules/procfs/Makefile b/sys/modules/procfs/Makefile index 282b200e5a60..ee41bb8b116d 100644 --- a/sys/modules/procfs/Makefile +++ b/sys/modules/procfs/Makefile @@ -18,11 +18,11 @@ SRCS+= procfs_type.c SRCS+= procfs.c EXPORT_SYMS= -EXPORT_SYMS+= procfs_attr EXPORT_SYMS+= procfs_candebug EXPORT_SYMS+= procfs_docurproc EXPORT_SYMS+= procfs_doprocfile EXPORT_SYMS+= procfs_doprocmem EXPORT_SYMS+= procfs_notsystem +EXPORT_SYMS+= procfs_attr_rw .include diff --git a/sys/modules/pseudofs/Makefile b/sys/modules/pseudofs/Makefile index 45afba941428..eb083cd31d77 100644 --- a/sys/modules/pseudofs/Makefile +++ b/sys/modules/pseudofs/Makefile @@ -10,7 +10,8 @@ SRCS= opt_pseudofs.h \ pseudofs_vncache.c \ pseudofs_vnops.c -EXPORT_SYMS= pfs_mount \ +EXPORT_SYMS= pfs_cmount \ + pfs_mount \ pfs_unmount \ pfs_root \ pfs_statfs \ @@ -19,8 +20,6 @@ EXPORT_SYMS= pfs_mount \ pfs_create_dir \ pfs_create_file \ pfs_create_link \ - pfs_disable \ - pfs_enable \ pfs_destroy .if !defined(KERNBUILDDIR) diff --git a/sys/modules/pwm/pwmbus/Makefile b/sys/modules/pwm/pwmbus/Makefile index 3cf56697f200..1b3c9f3077c3 100644 --- a/sys/modules/pwm/pwmbus/Makefile +++ b/sys/modules/pwm/pwmbus/Makefile @@ -17,4 +17,6 @@ SRCS+= \ pwmbus_if.c \ pwmbus_if.h \ +EXPORT_SYMS= YES + .include diff --git a/sys/modules/rc4/Makefile b/sys/modules/rc4/Makefile index 21d2d85856a1..23cf6480d56b 100644 --- a/sys/modules/rc4/Makefile +++ b/sys/modules/rc4/Makefile @@ -5,4 +5,6 @@ KMOD= rc4 SRCS= rc4.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/rtwn/Makefile b/sys/modules/rtwn/Makefile index 465187e19f35..8f72a28a1e05 100644 --- a/sys/modules/rtwn/Makefile +++ b/sys/modules/rtwn/Makefile @@ -47,4 +47,6 @@ opt_rtwn.h: @echo "#define RTWN_WITHOUT_UCODE 1" >> ${.TARGET} .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/sdhci/Makefile b/sys/modules/sdhci/Makefile index 158ed4cd945a..9d8269d86109 100644 --- a/sys/modules/sdhci/Makefile +++ b/sys/modules/sdhci/Makefile @@ -5,4 +5,6 @@ KMOD= sdhci SRCS= sdhci.c sdhci.h sdhci_if.c sdhci_if.h device_if.h bus_if.h mmcbr_if.h opt_mmccam.h opt_cam.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/sound/driver/sbc/Makefile b/sys/modules/sound/driver/sbc/Makefile index d7894d644e6a..bde54a077696 100644 --- a/sys/modules/sound/driver/sbc/Makefile +++ b/sys/modules/sound/driver/sbc/Makefile @@ -6,4 +6,6 @@ KMOD= snd_sbc SRCS= device_if.h bus_if.h isa_if.h pci_if.h SRCS+= sbc.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/sound/driver/spicds/Makefile b/sys/modules/sound/driver/spicds/Makefile index 87ab0bbf8b55..f271dae20b2e 100644 --- a/sys/modules/sound/driver/spicds/Makefile +++ b/sys/modules/sound/driver/spicds/Makefile @@ -6,4 +6,6 @@ KMOD= snd_spicds SRCS= device_if.h bus_if.h isa_if.h pci_if.h SRCS+= spicds.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/spi/spibus/Makefile b/sys/modules/spi/spibus/Makefile index 7832c870ca68..01386d39e118 100644 --- a/sys/modules/spi/spibus/Makefile +++ b/sys/modules/spi/spibus/Makefile @@ -17,4 +17,6 @@ SRCS+= \ spibus_if.c \ spibus_if.h \ +EXPORT_SYMS= YES + .include diff --git a/sys/modules/spigen/Makefile b/sys/modules/spigen/Makefile index 401b69a7ed98..5ff4805399b3 100644 --- a/sys/modules/spigen/Makefile +++ b/sys/modules/spigen/Makefile @@ -16,4 +16,6 @@ SRCS+= \ SRCS+= ofw_bus_if.h .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/superio/Makefile b/sys/modules/superio/Makefile index 86585a45cc25..064c39863566 100644 --- a/sys/modules/superio/Makefile +++ b/sys/modules/superio/Makefile @@ -6,4 +6,6 @@ KMOD= superio SRCS= superio.c SRCS+= device_if.h bus_if.h isa_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/sysvipc/sysvmsg/Makefile b/sys/modules/sysvipc/sysvmsg/Makefile index 8cd9d2008b9a..84cbc70cde48 100644 --- a/sys/modules/sysvipc/sysvmsg/Makefile +++ b/sys/modules/sysvipc/sysvmsg/Makefile @@ -5,4 +5,6 @@ KMOD= sysvmsg SRCS= sysv_msg.c opt_sysvipc.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/sysvipc/sysvsem/Makefile b/sys/modules/sysvipc/sysvsem/Makefile index 186e7ed94f4b..89509341c2e5 100644 --- a/sys/modules/sysvipc/sysvsem/Makefile *** 131 LINES SKIPPED *** From nobody Thu Nov 18 13:57:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 359D6189D33D; Thu, 18 Nov 2021 13:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hw1Z65yKLz4Wmw; Thu, 18 Nov 2021 13:57:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4BE015F77; Thu, 18 Nov 2021 13:57: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 1AIDv2G5059807; Thu, 18 Nov 2021 13:57:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIDv2AL059806; Thu, 18 Nov 2021 13:57:02 GMT (envelope-from git) Date: Thu, 18 Nov 2021 13:57:02 GMT Message-Id: <202111181357.1AIDv2AL059806@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: a7e4eb142298 - main - Kernel linkers: some style List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a7e4eb14229845c0857caf91bc3364f9e7075b00 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a7e4eb14229845c0857caf91bc3364f9e7075b00 commit a7e4eb14229845c0857caf91bc3364f9e7075b00 Author: Konstantin Belousov AuthorDate: 2021-11-07 09:03:45 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-18 13:56:23 +0000 Kernel linkers: some style Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D32878 --- sys/kern/link_elf.c | 10 +++++----- sys/kern/link_elf_obj.c | 36 ++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index 2faaa003380a..4114bd46f0c0 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -1596,12 +1596,12 @@ static int link_elf_search_symbol(linker_file_t lf, caddr_t value, c_linker_sym_t *sym, long *diffp) { - elf_file_t ef = (elf_file_t) lf; - u_long off = (uintptr_t) (void *) value; + elf_file_t ef = (elf_file_t)lf; + u_long off = (uintptr_t) (void *)value; u_long diff = off; u_long st_value; - const Elf_Sym* es; - const Elf_Sym* best = NULL; + const Elf_Sym *es; + const Elf_Sym *best = NULL; int i; for (i = 0, es = ef->ddbsymtab; i < ef->ddbsymcnt; i++, es++) { @@ -1711,7 +1711,7 @@ link_elf_each_function_nameval(linker_file_t file, { linker_symval_t symval; elf_file_t ef = (elf_file_t)file; - const Elf_Sym* symp; + const Elf_Sym *symp; int i, error; /* Exhaustive search */ diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 91852939e5e8..5c6db11e1937 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -1421,7 +1421,7 @@ link_elf_lookup_symbol(linker_file_t lf, const char *name, c_linker_sym_t *sym) return 0; } } - return ENOENT; + return (ENOENT); } static int @@ -1442,17 +1442,17 @@ link_elf_symbol_values(linker_file_t lf, c_linker_sym_t sym, val = ((caddr_t (*)(void))val)(); symval->value = val; symval->size = es->st_size; - return 0; + return (0); } - return ENOENT; + return (ENOENT); } static int link_elf_search_symbol(linker_file_t lf, caddr_t value, c_linker_sym_t *sym, long *diffp) { - elf_file_t ef = (elf_file_t) lf; - u_long off = (uintptr_t) (void *) value; + elf_file_t ef = (elf_file_t)lf; + u_long off = (uintptr_t)(void *)value; u_long diff = off; u_long st_value; const Elf_Sym *es; @@ -1480,7 +1480,7 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value, *diffp = diff; *sym = (c_linker_sym_t) best; - return 0; + return (0); } /* @@ -1779,25 +1779,21 @@ link_elf_reloc_local(linker_file_t lf, bool ifuncs) static long link_elf_symtab_get(linker_file_t lf, const Elf_Sym **symtab) { - elf_file_t ef = (elf_file_t)lf; - - *symtab = ef->ddbsymtab; - - if (*symtab == NULL) - return (0); + elf_file_t ef = (elf_file_t)lf; - return (ef->ddbsymcnt); + *symtab = ef->ddbsymtab; + if (*symtab == NULL) + return (0); + return (ef->ddbsymcnt); } static long link_elf_strtab_get(linker_file_t lf, caddr_t *strtab) { - elf_file_t ef = (elf_file_t)lf; - - *strtab = ef->ddbstrtab; - - if (*strtab == NULL) - return (0); + elf_file_t ef = (elf_file_t)lf; - return (ef->ddbstrcnt); + *strtab = ef->ddbstrtab; + if (*strtab == NULL) + return (0); + return (ef->ddbstrcnt); } From nobody Thu Nov 18 13:57:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 712FD189D438; Thu, 18 Nov 2021 13:57: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 4Hw1Z80l3Xz4Wl1; Thu, 18 Nov 2021 13:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6CFD16381; Thu, 18 Nov 2021 13:57: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 1AIDv3MN059831; Thu, 18 Nov 2021 13:57:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIDv3oO059830; Thu, 18 Nov 2021 13:57:03 GMT (envelope-from git) Date: Thu, 18 Nov 2021 13:57:03 GMT Message-Id: <202111181357.1AIDv3oO059830@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: 0d7a6199b61d - main - kmod_syms.awk: fix removal of the export list from the symbol table List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d7a6199b61d55caf0a682ef072bdd107472ab49 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0d7a6199b61d55caf0a682ef072bdd107472ab49 commit 0d7a6199b61d55caf0a682ef072bdd107472ab49 Author: Konstantin Belousov AuthorDate: 2021-11-07 09:00:07 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-18 13:56:24 +0000 kmod_syms.awk: fix removal of the export list from the symbol table Print some warning when export is requested for non-existing symbol. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32878 --- sys/conf/kmod_syms.awk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/conf/kmod_syms.awk b/sys/conf/kmod_syms.awk index 677d813507ee..8691d2e0b989 100644 --- a/sys/conf/kmod_syms.awk +++ b/sys/conf/kmod_syms.awk @@ -2,6 +2,7 @@ # Read global symbols from object file. BEGIN { + modname = ARGV[1] while ("${NM:='nm'} -g " ARGV[1] | getline) { if (match($0, /^[^[:space:]]+ [^AU] (.*)$/)) { syms[$3] = $2 @@ -12,7 +13,12 @@ BEGIN { # De-list symbols from the export list. { - delete syms[$0] + smbl = $0 + if (!(smbl in syms)) { + printf "Symbol %s is not present in %s\n", \ + smbl, modname > "/dev/stderr" + } + delete syms[smbl] } # Strip commons, make everything else local. From nobody Thu Nov 18 14:57:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C07C1189AFA1; Thu, 18 Nov 2021 14:57: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 4Hw2vh53gMz4qy4; Thu, 18 Nov 2021 14:57:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87D1616EDF; Thu, 18 Nov 2021 14:57: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 1AIEvKb2039286; Thu, 18 Nov 2021 14:57:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIEvKte039285; Thu, 18 Nov 2021 14:57:20 GMT (envelope-from git) Date: Thu, 18 Nov 2021 14:57:20 GMT Message-Id: <202111181457.1AIEvKte039285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: b8135ed67ce8 - main - top.1: Fix a typo in description of H interactive command List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8135ed67ce86e40fa7b46653ff54c769f2e7c98 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b8135ed67ce86e40fa7b46653ff54c769f2e7c98 commit b8135ed67ce86e40fa7b46653ff54c769f2e7c98 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 12:50:56 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-18 14:56:46 +0000 top.1: Fix a typo in description of H interactive command B is listed as an interactive command to toggle the display of threads. This is a typo introduced during the conversion of the manual page to mdoc. Fixes: 9d6cce02a78c967e69b603d503545c4b43d7765f MFC after: 3 days --- usr.bin/top/top.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 42282bebdafe..b6d429cd251d 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd September 21, 2019 +.Dd November 18, 2021 .Dt TOP 1 .Os .Sh NAME @@ -287,7 +287,7 @@ If the pid specified is simply \*(lq+\*(rq, then show all processes. .It e Display a list of system errors (if any) generated by the last command. -.It B H +.It H Toggle the display of threads. .It i or I Toggle the display of idle processes. From nobody Thu Nov 18 14:57:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 12DE1189B017; Thu, 18 Nov 2021 14:57: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 4Hw2vj6qrJz4qqZ; Thu, 18 Nov 2021 14:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA7DC16E66; Thu, 18 Nov 2021 14:57: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 1AIEvLol039310; Thu, 18 Nov 2021 14:57:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIEvLux039309; Thu, 18 Nov 2021 14:57:21 GMT (envelope-from git) Date: Thu, 18 Nov 2021 14:57:21 GMT Message-Id: <202111181457.1AIEvLux039309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 112539041590 - main - top.1: Sort options alphabetically List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 112539041590259a9d1e34999a80dc607c69f4db Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=112539041590259a9d1e34999a80dc607c69f4db commit 112539041590259a9d1e34999a80dc607c69f4db Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 13:11:23 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-18 14:56:47 +0000 top.1: Sort options alphabetically While here, add a short sentence introducing the options. MFC after: 3 days --- usr.bin/top/top.1 | 155 +++++++++++++++++++++++++++--------------------------- 1 file changed, 77 insertions(+), 78 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index b6d429cd251d..5989831fe8a9 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -7,14 +7,14 @@ .Nd display and update information about the top cpu processes .Sh SYNOPSIS .Nm -.Op Fl CHIPSTabijnpqtuvxz -.Op Fl J Ar jail -.Op Fl U Ar uid +.Op Fl abCHIijnPpqSTtuvxz .Op Fl d Ar count +.Op Fl J Ar jail .Op Fl m Ar cpu|io -.Op Fl s Ar time .Op Fl o Ar field .Op Fl p Ar pid +.Op Fl s Ar time +.Op Fl U Ar uid .Op Ar number .Sh DESCRIPTION .Nm @@ -43,22 +43,9 @@ If the output of .Nm is redirected to a file, it acts as if it were being run on a dumb terminal. -.Bl -tag -width indent -compact -.It Fl C -Toggle CPU display mode. -By default top displays the weighted CPU percentage in the WCPU column -(this is the same value that -.Xr ps 1 -displays as CPU). -Each time -.Fl C -flag is passed it toggles between \*(lqraw cpu\*(rq mode -and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or -the \*(lqWCPU\*(rq column respectively. -.It Fl S -Show system processes in the display. -Normally, system processes such as the pager and the swapper are not shown. -This option makes them visible. +.Pp +The options are as follows: +.Bl -tag -width indent .It Fl a Display command names derived from the argv[] vector, rather than real executable name. @@ -75,9 +62,34 @@ In this mode, all input from the terminal is ignored. Interrupt characters (such as ^C and ^\e) still have an effect. This is the default on a dumb terminal, or when the output is not a terminal. +.It Fl C +Toggle CPU display mode. +By default top displays the weighted CPU percentage in the WCPU column +(this is the same value that +.Xr ps 1 +displays as CPU). +Each time +.Fl C +flag is passed it toggles between \*(lqraw cpu\*(rq mode +and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or +the \*(lqWCPU\*(rq column respectively. +.It Fl d Ar count +Show only +.Ar count +displays, then exit. +A display is considered to be one update of the +screen. +The default is 1 for dumb terminals. +Note that for +.Ar count += 1 +no information is available about the percentage of time spent by the CPU in every state. .It Fl H Display each thread for a multithreaded process individually. By default a single summary line is displayed for each process. +.It Fl I +Do not display idle processes. +By default, top displays both active and idle processes. .It Fl i Use \*(lqinteractive\*(rq mode. In this mode, any input is immediately @@ -90,19 +102,23 @@ screen will immediately be updated, even if the command was not understood. This mode is the default when standard output is an intelligent terminal. -.It Fl I -Do not display idle processes. -By default, top displays both active and idle processes. +.It Fl J Ar jail +Show only those processes owned by +.Ar jail . +This may be either the +.Ar jid +or +.Ar name +of the jail. +Use +0 +to limit to host processes. +Using this option implies +.Fl j . .It Fl j Display the .Xr jail 8 ID. -.It Fl T -Toggle displaying thread ID (tid) instead of process id (pid). -.It Fl t -Do not display the -.Nm -process itself. .It Fl m Ar display Display either 'cpu' or 'io' statistics. Default is 'cpu'. @@ -110,8 +126,19 @@ Default is 'cpu'. Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq mode. +.It Fl o Ar field +Sort the process display area on the specified field. +The field name +is the name of the column as seen in the output, but in lower case: +\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, +\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, +\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, +\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. .It Fl P Display per-cpu CPU usage statistics. +.It Fl p Ar pid +Show only the process +.Ar pid . .It Fl q Renice .Nm @@ -119,6 +146,26 @@ to -20 so that it will run faster. This can be used when the system is being very sluggish to improve the possibility of discovering the problem. This option can only be used by root. +.It Fl S +Show system processes in the display. +Normally, system processes such as the pager and the swapper are not shown. +This option makes them visible. +.It Fl s Ar time +Set the delay between screen updates to +.Ar time +seconds, which may be fractional. +The default delay between updates is 1 second. +.It Fl T +Toggle displaying thread ID (tid) instead of process id (pid). +.It Fl t +Do not display the +.Nm +process itself. +.It Fl U Ar username +Show only those processes owned by +.Ar username . +This option currently only accepts usernames and will not understand +uid numbers. .It Fl u Do not map uid numbers to usernames. Normally, @@ -133,52 +180,6 @@ Write version number information to stderr then exit immediately. Display approximate swap usage for each process. .It Fl z Do not display the system idle process. -.It Fl d Ar count -Show only -.Ar count -displays, then exit. -A display is considered to be one update of the -screen. -The default is 1 for dumb terminals. -Note that for -.Ar count -= 1 -no information is available about the percentage of time spent by the CPU in every state. -.It Fl s Ar time -Set the delay between screen updates to -.Ar time -seconds, which may be fractional. -The default delay between updates is 1 second. -.It Fl o Ar field -Sort the process display area on the specified field. -The field name -is the name of the column as seen in the output, but in lower case: -\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, -\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, -\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, -\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. -.It Fl p Ar pid -Show only the process -.Ar pid . -.It Fl J Ar jail -Show only those processes owned by -.Ar jail . -This may be either the -.Ar jid -or -.Ar name -of the jail. -Use -0 -to limit to host processes. -Using this option implies -.Fl j . -.Pp -.It Fl U Ar username -Show only those processes owned by -.Ar username . -This option currently only accepts usernames and will not understand -uid numbers. .El .Pp Both @@ -238,9 +239,7 @@ Quit .Nm .It d Change the number of displays to show (prompt for new number). -Remember that the next display counts as one, so typing -.It d1 -will make +Remember that the next display counts as one, so typing 'd1' will make .Nm show one final display and then immediately exit. .It / From nobody Thu Nov 18 14:57:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A1667189B021; Thu, 18 Nov 2021 14:57: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 4Hw2vl1Fnzz4r1Z; Thu, 18 Nov 2021 14:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D126216AE7; Thu, 18 Nov 2021 14:57: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 1AIEvMmW039334; Thu, 18 Nov 2021 14:57:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIEvMT5039333; Thu, 18 Nov 2021 14:57:22 GMT (envelope-from git) Date: Thu, 18 Nov 2021 14:57:22 GMT Message-Id: <202111181457.1AIEvMT5039333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 82d0f865ee9a - main - top: Sort flags in usage message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82d0f865ee9a93213876c14342b147e31b7ade0d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=82d0f865ee9a93213876c14342b147e31b7ade0d commit 82d0f865ee9a93213876c14342b147e31b7ade0d Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 13:21:34 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-18 14:56:47 +0000 top: Sort flags in usage message While here, fix the indentation of the second line in the message. MFC after: 3 days --- usr.bin/top/top.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index 08248911e99a..68b7bdf1dfb5 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -465,8 +465,8 @@ main(int argc, const char *argv[]) default: errx(1, -"[-abCHIijnPqStuvwz] [-d count] [-m io | cpu] [-o field] [-p pid]\n" -" [-s time] [-J jail] [-U username] [number]"); +"[-abCHIijnPqStuvwz] [-d count] [-J jail] [-m cpu | io] [-o field]\n" +" [-p pid] [-s time] [-U username] [number]"); } } From nobody Thu Nov 18 14:57:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4809D189B116; Thu, 18 Nov 2021 14:57: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 4Hw2vm4q7dz4r4F; Thu, 18 Nov 2021 14:57:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAC0316F72; Thu, 18 Nov 2021 14:57: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 1AIEvNuZ039365; Thu, 18 Nov 2021 14:57:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIEvNFI039364; Thu, 18 Nov 2021 14:57:23 GMT (envelope-from git) Date: Thu, 18 Nov 2021 14:57:23 GMT Message-Id: <202111181457.1AIEvNFI039364@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: c947fc5fae31 - main - top.1: Improve description of -m List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c947fc5fae31c5935a57abcaa76f40fc8950ce59 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c947fc5fae31c5935a57abcaa76f40fc8950ce59 commit c947fc5fae31c5935a57abcaa76f40fc8950ce59 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 14:31:48 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-18 14:56:48 +0000 top.1: Improve description of -m Describe -m argument as "mode" instead of "display". MFC after: 3 days --- usr.bin/top/top.1 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 5989831fe8a9..892ee8307e27 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -10,7 +10,7 @@ .Op Fl abCHIijnPpqSTtuvxz .Op Fl d Ar count .Op Fl J Ar jail -.Op Fl m Ar cpu|io +.Op Fl m Ar mode .Op Fl o Ar field .Op Fl p Ar pid .Op Fl s Ar time @@ -119,9 +119,15 @@ Using this option implies Display the .Xr jail 8 ID. -.It Fl m Ar display -Display either 'cpu' or 'io' statistics. -Default is 'cpu'. +.It Fl m Ar mode +Display statistics in the specified +.Ar mode . +Available modes are +.Cm cpu +and +.Cm io . +Default is +.Cm cpu . .It Fl n Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq From nobody Thu Nov 18 14:57:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 055F5189AED7; Thu, 18 Nov 2021 14:57:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hw2vn2sQ5z4r92; Thu, 18 Nov 2021 14:57:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21B9916E67; Thu, 18 Nov 2021 14:57: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 1AIEvP14039389; Thu, 18 Nov 2021 14:57:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIEvP4q039388; Thu, 18 Nov 2021 14:57:25 GMT (envelope-from git) Date: Thu, 18 Nov 2021 14:57:25 GMT Message-Id: <202111181457.1AIEvP4q039388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 01e3140571ba - main - top.1: Use the Dq macros instead of \*lq and \*rq List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01e3140571bab1a7283e33669de171865cdb8028 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=01e3140571bab1a7283e33669de171865cdb8028 commit 01e3140571bab1a7283e33669de171865cdb8028 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 14:55:27 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-18 14:56:49 +0000 top.1: Use the Dq macros instead of \*lq and \*rq MFC after: 3 days --- usr.bin/top/top.1 | 144 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 107 insertions(+), 37 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 892ee8307e27..3aff7012f3d8 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -35,9 +35,13 @@ processes will be displayed instead of the default. makes a distinction between terminals that support advanced capabilities and those that do not. This distinction affects the choice of defaults for certain options. -In the remainder of this document, an \*(lqintelligent\*(rq terminal is one that +In the remainder of this document, an +.Dq intelligent +terminal is one that supports cursor addressing, clear screen, and clear to end of line. -Conversely, a \*(lqdumb\*(rq terminal is one that does not support such +Conversely, a +.Dq dumb +terminal is one that does not support such features. If the output of .Nm @@ -57,7 +61,9 @@ Non-printable characters in the command line are encoded in C-style backslash sequences or a three digit octal sequences. .It Fl b -Use \*(lqbatch\*(rq mode. +Use +.Dq batch +mode. In this mode, all input from the terminal is ignored. Interrupt characters (such as ^C and ^\e) still have an effect. @@ -70,9 +76,15 @@ By default top displays the weighted CPU percentage in the WCPU column displays as CPU). Each time .Fl C -flag is passed it toggles between \*(lqraw cpu\*(rq mode -and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or -the \*(lqWCPU\*(rq column respectively. +flag is passed it toggles between +.Dq raw cpu +mode and +.Dq weighted cpu +mode, showing the +.Dq CPU +or the +.Dq WCPU +column respectively. .It Fl d Ar count Show only .Ar count @@ -91,10 +103,13 @@ By default a single summary line is displayed for each process. Do not display idle processes. By default, top displays both active and idle processes. .It Fl i -Use \*(lqinteractive\*(rq mode. +Use +.Dq interactive +mode. In this mode, any input is immediately read for processing. -See the section on \*(lqInteractive Mode\*(rq +See the section on +.Dq Interactive Mode for an explanation of which keys perform what functions. After the command is processed, the @@ -129,17 +144,32 @@ and Default is .Cm cpu . .It Fl n -Use \*(lqnon-interactive\*(rq mode. -This is identical to \*(lqbatch\*(rq +Use +.Dq non-interactive +mode. +This is identical to +.Dq batch mode. .It Fl o Ar field Sort the process display area on the specified field. The field name is the name of the column as seen in the output, but in lower case: -\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, -\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, -\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, -\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. +.Dq cpu , +.Dq size , +.Dq res , +.Dq time , +.Dq pri , +.Dq threads , +.Dq total , +.Dq read , +.Dq write , +.Dq fault , +.Dq vcsw , +.Dq ivcsw , +.Dq jid , +.Dq swap , +or +.Dq pid . .It Fl P Display per-cpu CPU usage statistics. .It Fl p Ar pid @@ -176,7 +206,9 @@ uid numbers. Do not map uid numbers to usernames. Normally, .Nm -will read as much of the file \*(lq/etc/passwd\*(rq as is necessary to map +will read as much of the file +.Pa /etc/passwd +as is necessary to map all the user id numbers it encounters into login names. This option disables all that, while possibly decreasing execution time. The uid numbers are displayed instead of the names. @@ -192,23 +224,29 @@ Both .Ar count and .Ar number -fields can be specified as \*(lqinfinite\*(rq, indicating that they can +fields can be specified as +.Dq infinite , +indicating that they can stretch as far as possible. This is accomplished by using any proper prefix of the keywords -\*(lqinfinity\*(rq, -\*(lqmaximum\*(rq, +.Dq infinity , +.Dq maximum , or -\*(lqall\*(rq. +.Dq all . Boolean flags are toggles. A second specification of any of these options will negate the first. .Sh "INTERACTIVE MODE" When .Nm -is running in \*(lqinteractive mode\*(rq, it reads commands from the +is running in +.Dq interactive mode , +it reads commands from the terminal and acts upon them accordingly. In this mode, the terminal is -put in \*(lqCBREAK\*(rq, so that a character will be +put in +.Dq CBREAK , +so that a character will be processed as soon as it is typed. Almost always, a key will be pressed when @@ -265,30 +303,45 @@ Toggle the display of system processes. .It a Toggle the display of process titles. .It k -Send a signal (\*(lqkill\*(rq by default) to a list of processes. +Send a signal +.Pq SIGKILL by default +to a list of processes. This acts similarly to the command .Xr kill 1 . .It r -Change the priority (the \*(lqnice\*(rq) of a list of processes. +Change the priority +.Pq the Dq nice +of a list of processes. This acts similarly to .Xr renice 8 . .It u Display only processes owned by a specific set of usernames (prompt for username). -If the username specified is simply \*(lq+\*(rq or \*(lq-\*(rq, +If the username specified is simply +.Dq + +or +.Dq - , then processes belonging to all users will be displayed. Usernames can be added -to and removed from the set by prepending them with \*(lq+\*(rq and -\*(lq-\*(rq, respectively. +to and removed from the set by prepending them with +.Dq + +and +.Dq - , +respectively. .It o Change the order in which the display is sorted. The sort key names include -\*(lqcpu\*(rq, \*(lqres\*(rq, \*(lqsize\*(rq, -\*(lqtime\*(rq. +.Dq cpu , +.Dq res , +.Dq size , +and +.Dq time. The default is cpu. .It p Display a specific process (prompt for pid). -If the pid specified is simply \*(lq+\*(rq, then show all processes. +If the pid specified is simply +.Dq + , +then show all processes. .It e Display a list of system errors (if any) generated by the last command. @@ -302,7 +355,9 @@ Toggle the display of ID. .It J Display only processes owned by a specific jail (prompt for jail). -If the jail specified is simply \*(lq+\*(rq, then processes belonging +If the jail specified is simply +.Dq + , +then processes belonging to all jails and the host will be displayed. This will also enable the display of JID. .It P @@ -351,10 +406,18 @@ SIZE is the total size of the process (text, data, and stack), RES is the current amount of resident memory, SWAP is the approximate amount of swap, if enabled (SIZE, RES and SWAP are given in kilobytes), -STATE is the current state (one of \*(lqSTART\*(rq, \*(lqRUN\*(rq -(shown as \*(lqCPUn\*(rq on SMP systems), \*(lqSLEEP\*(rq, \*(lqSTOP\*(rq, -\*(lqZOMB\*(rq, \*(lqWAIT\*(rq, \*(lqLOCK\*(rq or the event on which the -process waits), +STATE is the current state (one of +.Dq START , +.Dq RUN +(shown as +.Dq CPUn +on SMP systems), +.Dq SLEEP , +.Dq STOP , +.Dq ZOMB , +.Dq WAIT , +.Dq LOCK , +or the event on which the process waits), C is the processor number on which the process is executing (visible only on SMP systems), TIME is the number of system and user cpu seconds that the process has used, @@ -365,12 +428,19 @@ displays as CPU), CPU is the raw percentage and is the field that is sorted to determine the order of the processes, and COMMAND is the name of the command that the process is currently running -(if the process is swapped out, this column is marked \*(lq\*(rq). +(if the process is swapped out, this column is marked +.Dq ) . .Pp -If a process is in the \*(lqSLEEP\*(rq or \*(lqLOCK\*(rq state, +If a process is in the +.Dq SLEEP +or +.Dq LOCK +state, the state column will report the name of the event or lock on which the process is waiting. -Lock names are prefixed with an asterisk \*(lq*\*(rq while sleep events +Lock names are prefixed with an asterisk +.Dq * +while sleep events are not. .Sh DESCRIPTION OF MEMORY .Bd -literal From nobody Thu Nov 18 14:57:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F3732189BA4F; Thu, 18 Nov 2021 14:57: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 4Hw2wF6G69z4rHf; Thu, 18 Nov 2021 14:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC1AB16E68; Thu, 18 Nov 2021 14:57: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 1AIEvnDP039570; Thu, 18 Nov 2021 14:57:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIEvncO039569; Thu, 18 Nov 2021 14:57:49 GMT (envelope-from git) Date: Thu, 18 Nov 2021 14:57:49 GMT Message-Id: <202111181457.1AIEvncO039569@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: 63f44132810d - main - Cirrus-CI: build with LLVM 13 package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 63f44132810d2b15178503cb738866f6e8533aee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=63f44132810d2b15178503cb738866f6e8533aee commit 63f44132810d2b15178503cb738866f6e8533aee Author: Ed Maste AuthorDate: 2021-11-17 02:42:51 +0000 Commit: Ed Maste CommitDate: 2021-11-18 14:57:33 +0000 Cirrus-CI: build with LLVM 13 package As of 28a41182c08e the base system uses Clang/LLVM 13. Follow along in Cirrus-CI (which uses a packaged toolchain for speed). Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index d34f189f0db0..ad8ad8e52532 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -23,7 +23,7 @@ task: TARGET_ARCH: aarch64 timeout_in: 120m install_script: - - sh .cirrus-ci/pkg-install.sh qemu llvm12 + - sh .cirrus-ci/pkg-install.sh qemu llvm13 setup_script: - uname -a - df -m @@ -32,9 +32,9 @@ task: - mkdir -p /usr/obj/$(pwd -P) - chown user:user /usr/obj/$(pwd -P) script: - - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=llvm12 WITHOUT_TOOLCHAIN=yes buildworld buildkernel" + - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=llvm13 WITHOUT_TOOLCHAIN=yes buildworld buildkernel" package_script: - - su user -c "make CROSS_TOOLCHAIN=llvm12 WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages" + - su user -c "make CROSS_TOOLCHAIN=llvm13 WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages" test_script: - sh tools/boot/ci-qemu-test.sh post_script: From nobody Thu Nov 18 15:03:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EA751189F6DF; Thu, 18 Nov 2021 15:03: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 4Hw32H6GxVz4vlR; Thu, 18 Nov 2021 15:03:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B715617304; Thu, 18 Nov 2021 15:03: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 1AIF33Sv053063; Thu, 18 Nov 2021 15:03:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIF33b6053062; Thu, 18 Nov 2021 15:03:03 GMT (envelope-from git) Date: Thu, 18 Nov 2021 15:03:03 GMT Message-Id: <202111181503.1AIF33b6053062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f7c526ab3f23 - main - net80211: radiotap add another define List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7c526ab3f23e5663cb8477c3dfb41a89de2d4cd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f7c526ab3f23e5663cb8477c3dfb41a89de2d4cd commit f7c526ab3f23e5663cb8477c3dfb41a89de2d4cd Author: Bjoern A. Zeeb AuthorDate: 2021-11-18 14:57:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-18 14:59:04 +0000 net80211: radiotap add another define Add a define needed by latest iwlwifi-next. Sponsored by: The FreeBSD Foundation --- sys/net80211/ieee80211_radiotap.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h index bee1c633b53c..1babd80d4b0e 100644 --- a/sys/net80211/ieee80211_radiotap.h +++ b/sys/net80211/ieee80211_radiotap.h @@ -433,6 +433,7 @@ struct ieee80211_radiotap_he { #define IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE4 0xF000 #define IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE 0x00C0 +#define IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_UNKNOWN 0x0 #define IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_1X 0x1 #define IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_2X 0x2 #define IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_4X 0x3 From nobody Thu Nov 18 15:19:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7FE1618892B8; Thu, 18 Nov 2021 15:20:19 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hw3QB4tVfz3HQP; Thu, 18 Nov 2021 15:20:18 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f45.google.com with SMTP id f9so8316699ioo.11; Thu, 18 Nov 2021 07:20:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PJXeYQcdkrtfS80B6LhZIZP+ucuDySBao1lTOnHa42M=; b=B3R/47WPXcieK3IA9PDScWYgTzMcHSBXz9Sil+DkVfxt2KN2kV3477t+gNf4mWKSQR DIYPpHe5SzvkHjufJg9PmsqxV7ksj336IcJp6sOpzAtxwmES9X2SkbgPz1pjcErBnWZV 9wH5oMnVe02oPnDRvtViHDDrLWExf8raIjvSRc5+ubMG3IN+HCbp3bgN9pVnvI7BoUeo Vz1GstnbnsrnRXXRij1E59IEJptK0xgM91l8n27yjdedZ8gaPcFYGbukyufPaxfOyJ8a G1f8fkV4+mL1STK1SSaQMLyCSXROBhMJk2iAtuCyY13UToA1XxaO/UHurSeLHOHwee65 ebsA== X-Gm-Message-State: AOAM532tWJYAFY1U+5d0LmuCgJirWGkqhT7MRobM3x3NI3a+1hpIeDjX nNeTO75cHmMf9b749hxcTnDmhbtNDImhBfLUHSeLytHG X-Google-Smtp-Source: ABdhPJxHYlUfI0XugZ7Zq7FG15Z0I3LF+KUUiA/ENk3VzTDRwo6bZfxNsNQgUdJmaRD0clo1wB45houdm4BIqJAdeZg= X-Received: by 2002:a05:6638:2656:: with SMTP id n22mr21512258jat.35.1637248811631; Thu, 18 Nov 2021 07:20:11 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Thu, 18 Nov 2021 10:19:52 -0500 Message-ID: Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables To: Kubilay Kocak Cc: Marcin Wojtas , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Hw3QB4tVfz3HQP X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.45 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[carpeddiem]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-0.995]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.45:from]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.45:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Tue, 16 Nov 2021 at 18:42, Kubilay Kocak wrote: > > The current description seems ambiguous with respect to the added > comment. If the sysctl (=1) applies ASLR "only" for PIE binaries, where > the =0 (sysctl disabled) case applies it unconditionally, a better > description might be: > > "Enable address map randomization only for PIE binaries" The "only" is in a confusing spot there. For ET_EXEC ELF objects (traditional binaries) randomization is controlled by aslr_enable. For ET_DYN ELF objects (PIE binaries) randomization is controlled by pie_aslr_enable. > Might aslr_enabled_pie_only also be a better OID name? Perhaps not worth > the churn, but long term it would be great if OID names reflected what > they are/do, rather than what they're not/don't do. That's true, and I think aslr_enable_pie may be a better name. I don't see how "they're not/don't do" applies here though. > > +static int __elfN(aslr_honor_sbrk) = 0; > > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, honor_sbrk, CTLFLAG_RW, > > &__elfN(aslr_honor_sbrk), 0, > > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": assume sbrk is used"); > > > > Can we add (DEPRECATED) to the control description, and/or otherwise > mark the control as deprecated if the sysctl framework supports an > attribute marking them as such? The sbrk system call is deprecated, not the sysctl node. From nobody Thu Nov 18 15:28:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 323B3188DBE3; Thu, 18 Nov 2021 15:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hw3b80rXgz3LPH; Thu, 18 Nov 2021 15:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F08C117240; Thu, 18 Nov 2021 15:28: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 1AIFS3ob080240; Thu, 18 Nov 2021 15:28:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIFS3sB080239; Thu, 18 Nov 2021 15:28:03 GMT (envelope-from git) Date: Thu, 18 Nov 2021 15:28:03 GMT Message-Id: <202111181528.1AIFS3sB080239@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: e87a6f3ef284 - main - bhyve: use physical lobits for BARs of passthru 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e87a6f3ef284593c01e0fd3f8b5bfc1f645e5b18 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=e87a6f3ef284593c01e0fd3f8b5bfc1f645e5b18 commit e87a6f3ef284593c01e0fd3f8b5bfc1f645e5b18 Author: Corvin Köhne AuthorDate: 2021-11-18 15:25:09 +0000 Commit: Emmanuel Vadot CommitDate: 2021-11-18 15:25:09 +0000 bhyve: use physical lobits for BARs of passthru devices Tell the guest whether a BAR uses prefetched memory or not for passthru devices by using the same lobits as the physical device. Reviewed by: grehan Sponsored by: Beckhoff Autmation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D32685 --- usr.sbin/bhyve/pci_emul.c | 16 ++++++++++++---- usr.sbin/bhyve/pci_emul.h | 1 + usr.sbin/bhyve/pci_passthru.c | 11 +++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index 86a2f995126e..bd94859c4ea1 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -707,6 +707,15 @@ pci_emul_alloc_bar(struct pci_devinst *pdi, int idx, enum pcibar_type type, pdi->pi_bar[idx].type = type; pdi->pi_bar[idx].addr = addr; pdi->pi_bar[idx].size = size; + /* + * passthru devices are using same lobits as physical device they set + * this property + */ + if (pdi->pi_bar[idx].lobits != 0) { + lobits = pdi->pi_bar[idx].lobits; + } else { + pdi->pi_bar[idx].lobits = lobits; + } /* Initialize the BAR register in config space */ bar = (addr & mask) | lobits; @@ -1946,7 +1955,7 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, int func, case PCIBAR_IO: addr = *eax & mask; addr &= 0xffff; - bar = addr | PCIM_BAR_IO_SPACE; + bar = addr | pi->pi_bar[idx].lobits; /* * Register the new BAR value for interception */ @@ -1957,7 +1966,7 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, int func, break; case PCIBAR_MEM32: addr = bar = *eax & mask; - bar |= PCIM_BAR_MEM_SPACE | PCIM_BAR_MEM_32; + bar |= pi->pi_bar[idx].lobits; if (addr != pi->pi_bar[idx].addr) { update_bar_address(pi, addr, idx, PCIBAR_MEM32); @@ -1965,8 +1974,7 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, int func, break; case PCIBAR_MEM64: addr = bar = *eax & mask; - bar |= PCIM_BAR_MEM_SPACE | PCIM_BAR_MEM_64 | - PCIM_BAR_MEM_PREFETCH; + bar |= pi->pi_bar[idx].lobits; if (addr != (uint32_t)pi->pi_bar[idx].addr) { update_bar_address(pi, addr, idx, PCIBAR_MEM64); diff --git a/usr.sbin/bhyve/pci_emul.h b/usr.sbin/bhyve/pci_emul.h index 5b6a17119960..6eac0720f09f 100644 --- a/usr.sbin/bhyve/pci_emul.h +++ b/usr.sbin/bhyve/pci_emul.h @@ -99,6 +99,7 @@ struct pcibar { enum pcibar_type type; /* io or memory */ uint64_t size; uint64_t addr; + uint8_t lobits; }; #define PI_NAMESZ 40 diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index bf99c646c480..29142749abb4 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -531,12 +531,23 @@ cfginitbar(struct vmctx *ctx, struct passthru_softc *sc) sc->psc_bar[i].type = bartype; sc->psc_bar[i].size = size; sc->psc_bar[i].addr = base; + sc->psc_bar[i].lobits = 0; /* Allocate the BAR in the guest I/O or MMIO space */ error = pci_emul_alloc_bar(pi, i, bartype, size); if (error) return (-1); + /* Use same lobits as physical bar */ + uint8_t lobits = read_config(&sc->psc_sel, PCIR_BAR(i), 0x01); + if (bartype == PCIBAR_MEM32 || bartype == PCIBAR_MEM64) { + lobits &= ~PCIM_BAR_MEM_BASE; + } else { + lobits &= ~PCIM_BAR_IO_BASE; + } + sc->psc_bar[i].lobits = lobits; + pi->pi_bar[i].lobits = lobits; + /* The MSI-X table needs special handling */ if (i == pci_msix_table_bar(pi)) { error = init_msix_table(ctx, sc, base); From nobody Thu Nov 18 15:28:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8A59F188DCB6; Thu, 18 Nov 2021 15:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hw3b92VbCz3LRw; Thu, 18 Nov 2021 15:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22EC51778B; Thu, 18 Nov 2021 15:28: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 1AIFS4JA080264; Thu, 18 Nov 2021 15:28:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIFS4IC080263; Thu, 18 Nov 2021 15:28:04 GMT (envelope-from git) Date: Thu, 18 Nov 2021 15:28:04 GMT Message-Id: <202111181528.1AIFS4IC080263@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: 5085153ae4d5 - main - bhyve: do not explicitly map fbuf framebuffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5085153ae4d55692415716e0ed03204bdf96d34a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5085153ae4d55692415716e0ed03204bdf96d34a commit 5085153ae4d55692415716e0ed03204bdf96d34a Author: Corvin Köhne AuthorDate: 2021-11-18 15:26:34 +0000 Commit: Emmanuel Vadot CommitDate: 2021-11-18 15:26:34 +0000 bhyve: do not explicitly map fbuf framebuffer Allocating a BAR will call baraddr which maps the framebuffer. No need to allocate it explicitly on init. Reviewed by: grehan Sponsored by: Beckhoff Autmation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D32596 --- usr.sbin/bhyve/pci_fbuf.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/usr.sbin/bhyve/pci_fbuf.c b/usr.sbin/bhyve/pci_fbuf.c index 9c5dbd9c6a40..4bf64e3f2adc 100644 --- a/usr.sbin/bhyve/pci_fbuf.c +++ b/usr.sbin/bhyve/pci_fbuf.c @@ -227,11 +227,11 @@ pci_fbuf_baraddr(struct vmctx *ctx, struct pci_devinst *pi, int baridx, return; sc = pi->pi_arg; - if (!enabled && sc->fbaddr != 0) { + if (!enabled) { if (vm_munmap_memseg(ctx, sc->fbaddr, FB_SIZE) != 0) EPRINTLN("pci_fbuf: munmap_memseg failed"); sc->fbaddr = 0; - } else if (sc->fb_base != NULL && sc->fbaddr == 0) { + } else { prot = PROT_READ | PROT_WRITE; if (vm_mmap_memseg(ctx, address, VM_FRAMEBUFFER, 0, FB_SIZE, prot) != 0) EPRINTLN("pci_fbuf: mmap_memseg failed"); @@ -375,7 +375,7 @@ pci_fbuf_render(struct bhyvegc *gc, void *arg) static int pci_fbuf_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) { - int error, prot; + int error; struct pci_fbuf_softc *sc; if (fbuf_sc != NULL) { @@ -393,6 +393,13 @@ pci_fbuf_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_DISPLAY); pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_DISPLAY_VGA); + sc->fb_base = vm_create_devmem( + ctx, VM_FRAMEBUFFER, "framebuffer", FB_SIZE); + if (sc->fb_base == MAP_FAILED) { + error = -1; + goto done; + } + error = pci_emul_alloc_bar(pi, 0, PCIBAR_MEM32, DMEMSZ); assert(error == 0); @@ -402,7 +409,6 @@ pci_fbuf_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) error = pci_emul_add_msicap(pi, PCI_FBUF_MSI_MSGS); assert(error == 0); - sc->fbaddr = pi->pi_bar[1].addr; sc->memregs.fbsize = FB_SIZE; sc->memregs.width = COLS_DEFAULT; sc->memregs.height = ROWS_DEFAULT; @@ -423,27 +429,9 @@ pci_fbuf_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) goto done; } - sc->fb_base = vm_create_devmem(ctx, VM_FRAMEBUFFER, "framebuffer", FB_SIZE); - if (sc->fb_base == MAP_FAILED) { - error = -1; - goto done; - } DPRINTF(DEBUG_INFO, ("fbuf frame buffer base: %p [sz %lu]", sc->fb_base, FB_SIZE)); - /* - * Map the framebuffer into the guest address space. - * XXX This may fail if the BAR is different than a prior - * run. In this case flag the error. This will be fixed - * when a change_memseg api is available. - */ - prot = PROT_READ | PROT_WRITE; - if (vm_mmap_memseg(ctx, sc->fbaddr, VM_FRAMEBUFFER, 0, FB_SIZE, prot) != 0) { - EPRINTLN("pci_fbuf: mapseg failed - try deleting VM and restarting"); - error = -1; - goto done; - } - console_init(sc->memregs.width, sc->memregs.height, sc->fb_base); console_fb_register(pci_fbuf_render, sc); From nobody Thu Nov 18 15:28:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4DA79188E90C; Thu, 18 Nov 2021 15:29:19 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.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 4Hw3cZ3jmGz3M9B; Thu, 18 Nov 2021 15:29:18 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f182.google.com with SMTP id i9so1341188ilu.1; Thu, 18 Nov 2021 07:29:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=APgSH0H+l9LIZxgBIPx5QGCBXHZ3Lp1MpOvF2uXWlK8=; b=6OPO9iDBrVIujEmPXYvpH6fnmekp7lLguXK6lfKjhc96NeomwF49X8CR5zyWWnJMl/ ba3UsI5C1Ea9kVS0q7fy5HpTN+gD9javjF7VVYP1mMFYVBbe350D1ybelqzH4bpdx1F5 9pYxjpKGV0pOZUlq2ezMlwwK1m1D7o/Bovfg4+NshDjiO+d5OUQCmfBClSKiZ4jNIH78 RTxwndwX1KNfGYNGzP3zJLr1ims+bwn3+LJy9kYGzdMoiFuC76ux/iNGZO1eo1R+rHQA LJFXmgpFIkIrAUe3VwrpAitZNkh56AH30UbvtAggqHlBy476sVIWY6hmTHwxvKtS6vOc TWxw== X-Gm-Message-State: AOAM532pen/QBar9oVHncSsTl0otN6Zck+m6DRWvM5UUPev7lPa0b4qO fsLVWOsgwaFUngcLjFudOG+gZgZPKmGk/GaxPCk69h9Q+WI= X-Google-Smtp-Source: ABdhPJwiRT72NqlWINAADbKwst5LUZD7LghTa8x6N9IYiKyUZBD7IxaxnXALac+12iRCSus/W1uCz/tkaRs3mSQ8tg4= X-Received: by 2002:a92:d081:: with SMTP id h1mr16181087ilh.7.1637249352428; Thu, 18 Nov 2021 07:29:12 -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: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> <20211117054034.jr6wdl5o42dv2kb6@mutt-hbsd> In-Reply-To: <20211117054034.jr6wdl5o42dv2kb6@mutt-hbsd> From: Ed Maste Date: Thu, 18 Nov 2021 10:28:52 -0500 Message-ID: Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables To: Shawn Webb Cc: Kubilay Kocak , Marcin Wojtas , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Hw3cZ3jmGz3M9B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.182 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; FREEFALL_USER(0.00)[carpeddiem]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.182:from]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.182:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Wed, 17 Nov 2021 at 00:40, Shawn Webb wrote= : > > It also doesn't make much sense to toggle AS{L}R for the different > parts of an executable image. AS{L}R is an "all or nothing" thing. There's not toggles for different parts of an executable image. The aslr_enable and pie_aslr_enable sysctls are for two different types of ELF objects. As for aslr_honor_sbrk, sbrk(2) is a legacy memory management interface - from the man page: The brk() and sbrk() functions are legacy interfaces from before the advent of modern virtual memory management. They are deprecated and n= ot present on the arm64 or riscv architectures. The mmap(2) interface should be used to allocate pages instead. The brk() and sbrk() functions are used to change the amount of memory allocated in a process's data segment. They do this by moving the location of the =E2=80=9Cbreak=E2=80=9D. The break is the first addre= ss after the end of the process's uninitialized data segment (also known as the =E2=80=9CB= SS=E2=80=9D). aslr_honor_sbrk determines whether the kernel reserves a region for brk/sbrk to grow into. If set to 1 the kernel reserves this area, and randomly-addressed mappings will not be placed there. From nobody Thu Nov 18 16:03:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5D4F5189F517; Thu, 18 Nov 2021 16:03: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 4Hw4N11v2Lz3mlX; Thu, 18 Nov 2021 16:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 162A217AFF; Thu, 18 Nov 2021 16:03: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 1AIG3SUB033401; Thu, 18 Nov 2021 16:03:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIG3STl033400; Thu, 18 Nov 2021 16:03:28 GMT (envelope-from git) Date: Thu, 18 Nov 2021 16:03:28 GMT Message-Id: <202111181603.1AIG3STl033400@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: 9dae2d03bc64 - main - rc.conf.5: Add entries for NFS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9dae2d03bc644be38196cf76c55039af1a7c1ba6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=9dae2d03bc644be38196cf76c55039af1a7c1ba6 commit 9dae2d03bc644be38196cf76c55039af1a7c1ba6 Author: Rick Macklem AuthorDate: 2021-11-18 15:59:34 +0000 Commit: Rick Macklem CommitDate: 2021-11-18 15:59:34 +0000 rc.conf.5: Add entries for NFS Entries for a few recently defined rc variables were missing from rc.conf.5. This patch adds those. It was not obvious to me what the ordering is, so I added them to the area where other nfsd related variables are. I can easily move them. I also replaced "are" with "is", since it seems to read better. This is a content change. Reviewed by: debdrup MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33043 --- share/man/man5/rc.conf.5 | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 8f247c480cc7..c680ed94575a 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2021 +.Dd November 18, 2021 .Dt RC.CONF 5 .Os .Sh NAME @@ -2388,9 +2388,40 @@ is set to .Dq Li YES and .Va nfsv4_server_enable -are set to +is set to .Dq Li YES , enable the server for NFSv4 as well as NFSv2 and NFSv3. +.It Va nfsv4_server_only +.Pq Vt bool +If +.Va nfs_server_enable +is set to +.Dq Li YES +and +.Va nfsv4_server_only +is set to +.Dq Li YES , +enable the NFS server for NFSv4 only. +.It Va nfs_server_maxio +.Pq Vt int +value to set vfs.nfsd.srvmaxio to, which is the +maximum I/O size for the NFS server. +.It Va tlsclntd_enable +.Pq Vt bool +If set to +.Dq Li YES , +run the +.Xr rpc.tlsclntd 8 +daemon, which is needed for NFS-over-TLS NFS mounts. +.It Va tlsservd_enable +.Pq Vt bool +If set to +.Dq Li YES , +run the +.Xr rpc.tlsservd 8 +daemon, which is needed for the +.Xr nfsd 8 +to support NFS-over-TLS NFS mounts. .It Va nfsuserd_enable .Pq Vt bool If @@ -4663,6 +4694,8 @@ it will be made permanently active. .Xr routed 8 , .Xr rpc.lockd 8 , .Xr rpc.statd 8 , +.Xr rpc.tlsclntd 8 , +.Xr rpc.tlsservd 8 , .Xr rpcbind 8 , .Xr rwhod 8 , .Xr savecore 8 , From nobody Thu Nov 18 17:54:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6CA94188D49E; Thu, 18 Nov 2021 17:54: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 4Hw6r92dcZz4rMQ; Thu, 18 Nov 2021 17:54:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AED51980F; Thu, 18 Nov 2021 17:54: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 1AIHsXif078563; Thu, 18 Nov 2021 17:54:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIHsXVT078562; Thu, 18 Nov 2021 17:54:33 GMT (envelope-from git) Date: Thu, 18 Nov 2021 17:54:33 GMT Message-Id: <202111181754.1AIHsXVT078562@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Neel Chauhan Subject: git: be60d8f276fa - main - ext2fs: check for eh_depth in ext4_ext_check_header() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be60d8f276fa20fc11ad814e54c9c2540f79c7da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=be60d8f276fa20fc11ad814e54c9c2540f79c7da commit be60d8f276fa20fc11ad814e54c9c2540f79c7da Author: Neel Chauhan AuthorDate: 2021-11-17 00:25:04 +0000 Commit: Neel Chauhan CommitDate: 2021-11-18 17:54:42 +0000 ext2fs: check for eh_depth in ext4_ext_check_header() PR: 259112 Reported by: Robert Morris Reviewed by: fsu MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D33030 --- sys/fs/ext2fs/ext2_extents.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c index 2a3ffbd0e860..408f1a27ae76 100644 --- a/sys/fs/ext2fs/ext2_extents.c +++ b/sys/fs/ext2fs/ext2_extents.c @@ -297,6 +297,10 @@ ext4_ext_check_header(struct inode *ip, struct ext4_extent_header *eh) error_msg = "header: invalid eh_entries"; goto corrupted; } + if (eh->eh_depth > 5) { + error_msg = "header: invalid eh_depth"; + goto corrupted; + } return (0); From nobody Thu Nov 18 19:02:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 975C31856481; Thu, 18 Nov 2021 19:02:34 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hw8Lf3RQWz3mgb; Thu, 18 Nov 2021 19:02:34 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id D5F0C3C0199; Thu, 18 Nov 2021 19:02:33 +0000 (UTC) Date: Thu, 18 Nov 2021 19:02:33 +0000 From: Brooks Davis To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b7fd86118fb5 - main - syscalls: sprinkle in const values Message-ID: <20211118190233.GH81740@spindle.one-eyed-alien.net> References: <202111172022.1AHKM3IJ059209@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kA1LkgxZ0NN7Mz3A" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 4Hw8Lf3RQWz3mgb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --kA1LkgxZ0NN7Mz3A Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 18, 2021 at 12:04:42AM +0200, Konstantin Belousov wrote: > On Wed, Nov 17, 2021 at 08:22:03PM +0000, Brooks Davis wrote: > > The branch main has been updated by brooks: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Db7fd86118fb5d41f61fdfa00= 3d11e9367770ff0a > >=20 > > commit b7fd86118fb5d41f61fdfa003d11e9367770ff0a > > Author: Brooks Davis > > AuthorDate: 2021-11-17 20:12:21 +0000 > > Commit: Brooks Davis > > CommitDate: 2021-11-17 20:12:21 +0000 > >=20 > > syscalls: sprinkle in const values > > =20 > > Add missing const qualifiers to a number of syscall arguments. > > =20 > > Obtained from: CheriBSD > > =20 > > Reviewed by: kevans > > --- > > sys/kern/syscalls.master | 32 ++++++++++++------------ > > sys/kern/systrace_args.c | 64 ++++++++++++++++++++++++----------------= -------- > > sys/kern/vfs_syscalls.c | 10 ++++---- > > sys/sys/syscallsubr.h | 13 +++++----- > > sys/sys/sysproto.h | 32 ++++++++++++------------ > :( >=20 > > @@ -501,7 +501,7 @@ > > } > > 74 AUE_MPROTECT STD|CAPENABLED { > > int mprotect( > > - _In_ void *addr, > > + _In_ const void *addr, > > size_t len, > > int prot > > ); > You did not marked addr for munmap(2) as const, but did this for mprotect= (2). > I believe that this is the right interpretation for munmap, but not for > mprotect due to PROT_NONE. >=20 > Or at least it should be consistent WRT allowed side effects on access. >=20 Thanks for pointing this out. It's definitly an error as the signature of mprotect() does include const. I'm not sure why I made this change several years ago. I'll revert it. -- Brooks --kA1LkgxZ0NN7Mz3A Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJhlqNJAAoJEKzQXbSebgfAjC0H/iaOKbMSgsklWtO2EGxx/gRH vyGar1QSZC7B3wB18VLp6Z4Thu2GfYz/b60iNXBumq8Uq/xiASkPSN3umXywFrnu ZfG6/aRZWR8tA24YNeU7QhZshy7dE9URPQ/MtlhQ8bu10Ukb7rIhF8sToJZcC7dp V6vdSBNVUQ7nD48AcStlKZ0TJYION1mBnDTtNKLzQOzRP0pLm5EGqnom0ndBuvoB d0H/VL+Os8x2zWiFAHVRTY5qZ8nB8/hDR/KaJIMncfoygF+vnyF4YTZuzV0zoP22 udAgeUY9wZLmP0gq3QmTrx5CTs1CMAZwZYzNO0oNHhWwCy9O+rKHwWrOYHs0uUI= =9bAj -----END PGP SIGNATURE----- --kA1LkgxZ0NN7Mz3A-- From nobody Thu Nov 18 20:03:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9796F1855570; Thu, 18 Nov 2021 20:03: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 4Hw9hd3sVKz4cHC; Thu, 18 Nov 2021 20:03:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E03E1ACF6; Thu, 18 Nov 2021 20:03: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 1AIK3DKe052650; Thu, 18 Nov 2021 20:03:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIK3Dho052649; Thu, 18 Nov 2021 20:03:13 GMT (envelope-from git) Date: Thu, 18 Nov 2021 20:03:13 GMT Message-Id: <202111182003.1AIK3Dho052649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Grehan Subject: git: b9569ba05e20 - main - Remove myself from bhyve maintenance; ENOTIME. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grehan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9569ba05e20cdcf252963a0ce6d40aa2fa97848 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grehan: URL: https://cgit.FreeBSD.org/src/commit/?id=b9569ba05e20cdcf252963a0ce6d40aa2fa97848 commit b9569ba05e20cdcf252963a0ce6d40aa2fa97848 Author: Peter Grehan AuthorDate: 2021-11-18 21:09:30 +0000 Commit: Peter Grehan CommitDate: 2021-11-18 21:09:30 +0000 Remove myself from bhyve maintenance; ENOTIME. --- MAINTAINERS | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index caa19f1b1d25..4bcc352b1fc1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -122,12 +122,12 @@ usr.sbin/bsdconfig dteske Pre-commit phabricator review requested. usr.sbin/dpv dteske Pre-commit review requested. Keep in sync with libdpv. usr.sbin/pkg pkg@ Please coordinate behavior or flag changes with pkg team. usr.sbin/sysrc dteske Pre-commit phabricator review requested. Keep in sync with bsdconfig(8) sysrc.subr. -vmm(4) jhb, grehan Pre-commit review requested via #bhyve - phabricator group. -libvmmapi jhb, grehan Pre-commit review requested via #bhyve - phabricator group. -usr.sbin/bhyve* jhb, grehan Pre-commit review requested via #bhyve - phabricator group. +vmm(4) jhb Pre-commit review requested via #bhyve + phabricator group. +libvmmapi jhb Pre-commit review requested via #bhyve + phabricator group. +usr.sbin/bhyve* jhb Pre-commit review requested via #bhyve + phabricator group. autofs(5) trasz Pre-commit review recommended. iscsi(4) trasz Pre-commit review recommended. rctl(8) trasz Pre-commit review recommended. From nobody Thu Nov 18 21:03:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 765DC18A46FC; Thu, 18 Nov 2021 21:03: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 4HwC272r90z3DRq; Thu, 18 Nov 2021 21:03:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 41EBB1C083; Thu, 18 Nov 2021 21:03: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 1AIL3RpU032183; Thu, 18 Nov 2021 21:03:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIL3Rkl032182; Thu, 18 Nov 2021 21:03:27 GMT (envelope-from git) Date: Thu, 18 Nov 2021 21:03:27 GMT Message-Id: <202111182103.1AIL3Rkl032182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 1ac5586c6d86 - main - style.Makefile.5: Do not require $FreeBSD$ SCM IDs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ac5586c6d86134922e18871b270ca483c00bf8b Auto-Submitted: auto-generated X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1ac5586c6d86134922e18871b270ca483c00bf8b commit 1ac5586c6d86134922e18871b270ca483c00bf8b Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 21:00:30 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-18 21:03:05 +0000 style.Makefile.5: Do not require $FreeBSD$ SCM IDs It's no longer required to have those SCM IDs at the start of makefiles. MFC after: 3 days --- share/man/man5/style.Makefile.5 | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/share/man/man5/style.Makefile.5 b/share/man/man5/style.Makefile.5 index 67991869ff57..4ced85704640 100644 --- a/share/man/man5/style.Makefile.5 +++ b/share/man/man5/style.Makefile.5 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 25, 2020 +.Dd November 18, 2021 .Dt STYLE.MAKEFILE 5 .Os .Sh NAME @@ -42,13 +42,6 @@ This file specifies the preferred style for makefiles in the source tree. .Bl -bullet .It -All makefiles should have an SCM ID at the start of the file, -followed by a blank line. -.Bd -literal -# $FreeBSD\&$ - -.Ed -.It .Cm .PATH : comes next if needed, and is spelled .Dq Li ".PATH: " , From nobody Thu Nov 18 21:39:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 435491856E86; Thu, 18 Nov 2021 21:39: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 4HwCqR1P14z3PN5; Thu, 18 Nov 2021 21:39:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B8B51C1FA; Thu, 18 Nov 2021 21:39: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 1AILdE7Y072484; Thu, 18 Nov 2021 21:39:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AILdE0U072483; Thu, 18 Nov 2021 21:39:14 GMT (envelope-from git) Date: Thu, 18 Nov 2021 21:39:14 GMT Message-Id: <202111182139.1AILdE0U072483@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: f4bf849bb894 - main - mountd: Fix handling of usernames that start with a digit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f4bf849bb894f4934b8df6c04a820dfa52e9576c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f4bf849bb894f4934b8df6c04a820dfa52e9576c commit f4bf849bb894f4934b8df6c04a820dfa52e9576c Author: Rick Macklem AuthorDate: 2021-11-18 21:35:25 +0000 Commit: Rick Macklem CommitDate: 2021-11-18 21:35:25 +0000 mountd: Fix handling of usernames that start with a digit yocalebo_gmail.com submitted a patch for mountd.c that fixes the case where a username starts with a digit. Without this patch, the username that starts with a digit is misinterpreted as a numeric uid. With this patch, any string that does not entirely convert to a decimal number via strtoul() is considered a user/group name. Submitted by: yocalebo_gmail.com Reviewed by: rmacklem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32993 --- usr.sbin/mountd/mountd.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 4c42fce92723..569ea0fbf707 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -3537,6 +3537,8 @@ parsecred(char *namelist, struct expcred *cr) struct group *gr; gid_t groups[NGROUPS_MAX + 1]; int ngroups; + unsigned long name_ul; + char *end = NULL; /* * Set up the unprivileged user. @@ -3551,10 +3553,11 @@ parsecred(char *namelist, struct expcred *cr) names = namelist; name = strsep_quote(&names, ":"); /* Bug? name could be NULL here */ - if (isdigit(*name) || *name == '-') - pw = getpwuid(atoi(name)); - else + name_ul = strtoul(name, &end, 10); + if (*end != '\0' || end == name) pw = getpwnam(name); + else + pw = getpwuid((uid_t)name_ul); /* * Credentials specified as those of a user. */ @@ -3576,8 +3579,9 @@ parsecred(char *namelist, struct expcred *cr) if (ngroups > 1 && groups[0] == groups[1]) { ngroups--; inpos = 2; - } else + } else { inpos = 1; + } if (ngroups > NGROUPS_MAX) ngroups = NGROUPS_MAX; if (ngroups > SMALLNGROUPS) @@ -3592,25 +3596,26 @@ parsecred(char *namelist, struct expcred *cr) * Explicit credential specified as a colon separated list: * uid:gid:gid:... */ - if (pw != NULL) + if (pw != NULL) { cr->cr_uid = pw->pw_uid; - else if (isdigit(*name) || *name == '-') - cr->cr_uid = atoi(name); - else { + } else if (*end != '\0' || end == name) { syslog(LOG_ERR, "unknown user: %s", name); return; + } else { + cr->cr_uid = name_ul; } cr->cr_ngroups = 0; while (names != NULL && *names != '\0' && cr->cr_ngroups < NGROUPS_MAX) { name = strsep_quote(&names, ":"); - if (isdigit(*name) || *name == '-') { - groups[cr->cr_ngroups++] = atoi(name); - } else { + name_ul = strtoul(name, &end, 10); + if (*end != '\0' || end == name) { if ((gr = getgrnam(name)) == NULL) { syslog(LOG_ERR, "unknown group: %s", name); continue; } groups[cr->cr_ngroups++] = gr->gr_gid; + } else { + groups[cr->cr_ngroups++] = name_ul; } } if (names != NULL && *names != '\0' && cr->cr_ngroups == NGROUPS_MAX) From nobody Thu Nov 18 22:40:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F0F04188E1E0; Thu, 18 Nov 2021 22:40: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 4HwFB36SrSz4T36; Thu, 18 Nov 2021 22:40:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE22C1D071; Thu, 18 Nov 2021 22:40: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 1AIMeRr6061248; Thu, 18 Nov 2021 22:40:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIMeRiJ061247; Thu, 18 Nov 2021 22:40:27 GMT (envelope-from git) Date: Thu, 18 Nov 2021 22:40:27 GMT Message-Id: <202111182240.1AIMeRiJ061247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: e785923ade1b - stable/12 - nfscl: Use a smaller initial delay time for NFSERR_DELAY List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e785923ade1b23dda1004978abc5b239f7882b8d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=e785923ade1b23dda1004978abc5b239f7882b8d commit e785923ade1b23dda1004978abc5b239f7882b8d Author: Rick Macklem AuthorDate: 2021-11-02 00:21:31 +0000 Commit: Rick Macklem CommitDate: 2021-11-18 22:03:11 +0000 nfscl: Use a smaller initial delay time for NFSERR_DELAY For NFS RPCs that receive a NFSERR_DELAY reply, the delay time is initially 1sec and then increases exponentially to NFS_TRYLATERDEL. It was found that this delay time is excessive for some NFSv4 servers, which work well with a 1msec delay. A 1sec delay resulted in very slow performance for Remove and Rename when delegations and pNFS were enabled. This patch decreases the initial delay time to 1msec. Found during a recent IETF NFSv4 working group testing event. (cherry picked from commit 5a95a6e8e4d9e947b3bb4b4755a7242e1ddd72e7) --- sys/fs/nfs/nfs_commonkrpc.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index d583b1c80c3c..12c2787b1eda 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -107,6 +107,10 @@ static int nfs_reconnects; static int nfs3_jukebox_delay = 10; static int nfs_skip_wcc_data_onerr = 1; static int nfs_dsretries = 2; +static struct timespec nfs_trylater_max = { + .tv_sec = NFS_TRYLATERDEL, + .tv_nsec = 0, +}; SYSCTL_DECL(_vfs_nfs); @@ -541,12 +545,10 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp, u_char *retsum, int toplevel, u_int64_t *xidp, struct nfsclsession *dssep) { uint32_t retseq, retval, slotseq, *tl; - time_t waituntil; int i = 0, j = 0, opcnt, set_sigset = 0, slot; int error = 0, usegssname = 0, secflavour = AUTH_SYS; int freeslot, maxslot, reterr, slotpos, timeo; u_int16_t procnum; - u_int trylater_delay = 1; struct nfs_feedback_arg nf; struct timeval timo; AUTH *auth; @@ -558,7 +560,11 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp, struct ucred *authcred; struct nfsclsession *sep; uint8_t sessionid[NFSX_V4SESSIONID]; + struct timespec trylater_delay, ts, waituntil; + /* Initially 1msec. */ + trylater_delay.tv_sec = 0; + trylater_delay.tv_nsec = 1000000; sep = dssep; if (xidp != NULL) *xidp = 0; @@ -1075,12 +1081,19 @@ tryagain: (nd->nd_repstat == NFSERR_DELAY && (nd->nd_flag & ND_NFSV4) == 0) || nd->nd_repstat == NFSERR_RESOURCE) { - if (trylater_delay > NFS_TRYLATERDEL) - trylater_delay = NFS_TRYLATERDEL; - waituntil = NFSD_MONOSEC + trylater_delay; - while (NFSD_MONOSEC < waituntil) - (void) nfs_catnap(PZERO, 0, "nfstry"); - trylater_delay *= 2; + /* Clip at NFS_TRYLATERDEL. */ + if (timespeccmp(&trylater_delay, + &nfs_trylater_max, >)) + trylater_delay = nfs_trylater_max; + getnanouptime(&waituntil); + timespecadd(&waituntil, &trylater_delay, + &waituntil); + do { + nfs_catnap(PZERO, 0, "nfstry"); + getnanouptime(&ts); + } while (timespeccmp(&ts, &waituntil, <)); + timespecadd(&trylater_delay, &trylater_delay, + &trylater_delay); /* Double each time. */ if (slot != -1) { mtx_lock(&sep->nfsess_mtx); sep->nfsess_slotseq[slot]++; From nobody Thu Nov 18 22:59:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6C89E18981A5; Thu, 18 Nov 2021 22:59: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 4HwFcB2cpRz4ZXl; Thu, 18 Nov 2021 22:59:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35ACC1D6EA; Thu, 18 Nov 2021 22:59: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 1AIMxcWQ078816; Thu, 18 Nov 2021 22:59:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AIMxc52078815; Thu, 18 Nov 2021 22:59:38 GMT (envelope-from git) Date: Thu, 18 Nov 2021 22:59:38 GMT Message-Id: <202111182259.1AIMxc52078815@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 5d9215b315a9 - stable/12 - nfscl: Move release of the clientID lock into nfscl_doclose() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5d9215b315a9e2b90d36ba90c4a8c84306bcfee4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=5d9215b315a9e2b90d36ba90c4a8c84306bcfee4 commit 5d9215b315a9e2b90d36ba90c4a8c84306bcfee4 Author: Rick Macklem AuthorDate: 2021-10-16 22:49:38 +0000 Commit: Rick Macklem CommitDate: 2021-11-18 22:55:24 +0000 nfscl: Move release of the clientID lock into nfscl_doclose() This patch moves release of the shared clientID lock from nfsrpc_close() just after the nfscl_doclose() call to the end of nfscl_doclose() call. This does make the code cleaner, since the shared lock is acquired at the beginning of nfscl_doclose(). The only semantics change is that the code no longer drops and reaquires the NFSCLSTATELOCK() mutex, which I do not believe will have a negative effect on the NFSv4 client. This is being done to prepare the code for a future patch that fixes the case where an NFSv4.1/4.2 server replies NFSERR_DELAY to a Close operation. (cherry picked from commit e2aab5e2d73486aa76bb861d583bbce021661601) --- sys/fs/nfsclient/nfs_clrpcops.c | 11 +++++------ sys/fs/nfsclient/nfs_clstate.c | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index d6072bf2523e..f2eb3af5f101 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -716,13 +716,12 @@ nfsrpc_close(vnode_t vp, int doclose, NFSPROC_T *p) return (0); if (doclose) error = nfscl_doclose(vp, &clp, p); - else + else { error = nfscl_getclose(vp, &clp); - if (error) - return (error); - - nfscl_clientrelease(clp); - return (0); + if (error == 0) + nfscl_clientrelease(clp); + } + return (error); } /* diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index ad4f16df8be8..9bd9b8759c51 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -3267,6 +3267,7 @@ lookformore: op = LIST_NEXT(op, nfso_list); } } + nfscl_clrelease(clp); NFSUNLOCKCLSTATE(); /* * recallp has been set NULL by nfscl_retoncloselayout() if it was From nobody Thu Nov 18 23:15:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2281D18A0BAB; Thu, 18 Nov 2021 23:15: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 4HwFyd67Kjz4gZP; Thu, 18 Nov 2021 23:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4B981D9D4; Thu, 18 Nov 2021 23:15: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 1AINFbtW006133; Thu, 18 Nov 2021 23:15:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AINFbG0006132; Thu, 18 Nov 2021 23:15:37 GMT (envelope-from git) Date: Thu, 18 Nov 2021 23:15:37 GMT Message-Id: <202111182315.1AINFbG0006132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ae2268efd5f8 - main - LinuxKPI: make bcd.h use libkern List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae2268efd5f8aaa6aba27dfc4e34b3225f211901 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ae2268efd5f8aaa6aba27dfc4e34b3225f211901 commit ae2268efd5f8aaa6aba27dfc4e34b3225f211901 Author: Bjoern A. Zeeb AuthorDate: 2021-10-27 17:07:38 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-18 23:10:34 +0000 LinuxKPI: make bcd.h use libkern Rather than having code to re-define bcd2bin() for the LinuxKPI make sure libkern.h is always included before the LinuxKPI version. Then only re-define our local LinuxKPI implementation. [1] From the argument truncating wrapper call the libkern version. If we change our libkern implementation in the future we can save us the remainder of the hassle. [2] Given I need this to MFC, which I am not sure we can with libkern, commit this intermediate step. Suggested by: Johannes Berg (johannes sipsolutions.net) [1] Suggested by: ian [2] Sponsored by: The FreeBSD Foundation MFC after: 3 days X-MFC with: 548ada00e54a9e7745d041b1ec7f68f3bd493365 Differential Revision: https://reviews.freebsd.org/D32695 --- sys/compat/linuxkpi/common/include/linux/bcd.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bcd.h b/sys/compat/linuxkpi/common/include/linux/bcd.h index 57fcb4c6bd98..8a40da1a330b 100644 --- a/sys/compat/linuxkpi/common/include/linux/bcd.h +++ b/sys/compat/linuxkpi/common/include/linux/bcd.h @@ -31,23 +31,15 @@ #define _LINUXKPI_LINUX_BCD_H #include +#include -/* - * We could use libkern, but we need the argument truncating. - * - * This leaves us with a duplicate symbol with conflicting types - * so we cannot simply re-define as libkern.h gets included in - * too many places directly or indirectly. This means for now - * drivers will have to be adjusted to call linuxkpi_bcd2bin(). - */ +/* Compared to the libkern version this one truncates the argument. */ static inline uint8_t linuxkpi_bcd2bin(uint8_t x) { - return (x & 0x0f) + (x >> 4) * 10; + return (bcd2bin(x)); } -#if 0 #define bcd2bin(_x) linuxkpi_bcd2bin(_x) -#endif #endif /* _LINUXKPI_LINUX_BCD_H */ From nobody Fri Nov 19 00:00:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 517F9188E936; Fri, 19 Nov 2021 00:00: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 4HwGyQ1cl3z4v6X; Fri, 19 Nov 2021 00:00:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 188C31E0BE; Fri, 19 Nov 2021 00:00: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 1AJ00UEZ067629; Fri, 19 Nov 2021 00:00:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ00UCC067628; Fri, 19 Nov 2021 00:00:30 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:00:30 GMT Message-Id: <202111190000.1AJ00UCC067628@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 82d04e93821d - stable/12 - nfscl: Do pNFS layout return_on_close synchronously List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 82d04e93821d537ab5776c90f73855d5b0367b13 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=82d04e93821d537ab5776c90f73855d5b0367b13 commit 82d04e93821d537ab5776c90f73855d5b0367b13 Author: Rick Macklem AuthorDate: 2021-10-31 23:31:31 +0000 Commit: Rick Macklem CommitDate: 2021-11-18 23:55:39 +0000 nfscl: Do pNFS layout return_on_close synchronously For pNFS servers that specify that Layouts are to be returned upon close, they may expect that LayoutReturn to happen before the associated Close. This patch modifies the NFSv4.1/4.2 pNFS client so that this is done. This only affects a pNFS mount against a non-FreeBSD NFSv4.1/4.2 server that specifies return_on_close in LayoutGet replies. Found during a recent IETF NFSv4 working group testing event. (cherry picked from commit d5d2ce1c8550a41e7374893ccd864c172461221f) --- sys/fs/nfs/nfsclstate.h | 1 + sys/fs/nfsclient/nfs_clstate.c | 63 ++++++++++++++++++++++++++++++------------ 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/sys/fs/nfs/nfsclstate.h b/sys/fs/nfs/nfsclstate.h index 2ada4bfc5540..7f10c058697a 100644 --- a/sys/fs/nfs/nfsclstate.h +++ b/sys/fs/nfs/nfsclstate.h @@ -263,6 +263,7 @@ struct nfscllayout { #define NFSLY_RETONCLOSE 0x0080 #define NFSLY_WRITTEN 0x0100 /* Has been used to write to a DS. */ #define NFSLY_FLEXFILE 0x0200 +#define NFSLY_RETURNED 0x0400 /* * Flex file layout mirror specific stuff for nfsclflayout. diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 9bd9b8759c51..279f7e38c346 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -122,7 +122,7 @@ static struct nfsclclient *nfscl_getclntsess(uint8_t *); static struct nfscldeleg *nfscl_finddeleg(struct nfsclclient *, u_int8_t *, int); static void nfscl_retoncloselayout(vnode_t, struct nfsclclient *, uint8_t *, - int, struct nfsclrecalllayout **); + int, struct nfsclrecalllayout **, struct nfscllayout **); static void nfscl_reldevinfo_locked(struct nfscldevinfo *); static struct nfscllayout *nfscl_findlayout(struct nfsclclient *, u_int8_t *, int); @@ -2817,7 +2817,8 @@ tryagain2: while (lyp != NULL) { nlyp = TAILQ_PREV(lyp, nfscllayouthead, nfsly_list); if (lyp->nfsly_timestamp < NFSD_MONOSEC && - (lyp->nfsly_flags & NFSLY_RECALL) == 0 && + (lyp->nfsly_flags & (NFSLY_RECALL | + NFSLY_RETONCLOSE)) == 0 && lyp->nfsly_lock.nfslock_usecnt == 0 && lyp->nfsly_lock.nfslock_lock == 0) { NFSCL_DEBUG(4, "ret stale lay=%d\n", @@ -2852,7 +2853,13 @@ tryagain2: TAILQ_REMOVE(&rlh, lyp, nfsly_list); NFSCL_DEBUG(4, "ret layout\n"); nfscl_layoutreturn(clp->nfsc_nmp, lyp, cred, p); - nfscl_freelayout(lyp); + if ((lyp->nfsly_flags & NFSLY_RETONCLOSE) != 0) { + NFSLOCKCLSTATE(); + lyp->nfsly_flags |= NFSLY_RETURNED; + wakeup(lyp); + NFSUNLOCKCLSTATE(); + } else + nfscl_freelayout(lyp); } /* @@ -3217,6 +3224,7 @@ nfscl_doclose(vnode_t vp, struct nfsclclient **clpp, NFSPROC_T *p) struct nfscldeleg *dp; struct nfsfh *nfhp; struct nfsclrecalllayout *recallp; + struct nfscllayout *lyp; int error; error = nfscl_getcl(vnode_mount(vp), NULL, NULL, 1, true, &clp); @@ -3245,7 +3253,8 @@ nfscl_doclose(vnode_t vp, struct nfsclclient **clpp, NFSPROC_T *p) } /* Return any layouts marked return on close. */ - nfscl_retoncloselayout(vp, clp, nfhp->nfh_fh, nfhp->nfh_len, &recallp); + nfscl_retoncloselayout(vp, clp, nfhp->nfh_fh, nfhp->nfh_len, &recallp, + &lyp); /* Now process the opens against the server. */ lookformore: @@ -3268,6 +3277,20 @@ lookformore: } } nfscl_clrelease(clp); + + /* Now, wait for any layout that is returned upon close. */ + if (lyp != NULL) { + while ((lyp->nfsly_flags & NFSLY_RETURNED) == 0) { + if (NFSCL_FORCEDISM(vnode_mount(vp))) { + lyp = NULL; + break; + } + msleep(lyp, NFSCLSTATEMUTEXPTR, PZERO, "nfslroc", hz); + } + if (lyp != NULL) + nfscl_freelayout(lyp); + } + NFSUNLOCKCLSTATE(); /* * recallp has been set NULL by nfscl_retoncloselayout() if it was @@ -5054,28 +5077,34 @@ nfscl_getlayout(struct nfsclclient *clp, uint8_t *fhp, int fhlen, */ static void nfscl_retoncloselayout(vnode_t vp, struct nfsclclient *clp, uint8_t *fhp, - int fhlen, struct nfsclrecalllayout **recallpp) + int fhlen, struct nfsclrecalllayout **recallpp, struct nfscllayout **lypp) { struct nfscllayout *lyp; uint32_t iomode; + *lypp = NULL; if (vp->v_type != VREG || !NFSHASPNFS(VFSTONFS(vnode_mount(vp))) || nfscl_enablecallb == 0 || nfs_numnfscbd == 0 || (VTONFS(vp)->n_flag & NNOLAYOUT) != 0) return; lyp = nfscl_findlayout(clp, fhp, fhlen); - if (lyp != NULL && (lyp->nfsly_flags & (NFSLY_RETONCLOSE | - NFSLY_RECALL)) == NFSLY_RETONCLOSE) { - iomode = 0; - if (!LIST_EMPTY(&lyp->nfsly_flayread)) - iomode |= NFSLAYOUTIOMODE_READ; - if (!LIST_EMPTY(&lyp->nfsly_flayrw)) - iomode |= NFSLAYOUTIOMODE_RW; - (void)nfscl_layoutrecall(NFSLAYOUTRETURN_FILE, lyp, iomode, - 0, UINT64_MAX, lyp->nfsly_stateid.seqid, 0, 0, NULL, - *recallpp); - NFSCL_DEBUG(4, "retoncls recall iomode=%d\n", iomode); - *recallpp = NULL; + if (lyp != NULL && (lyp->nfsly_flags & NFSLY_RETONCLOSE) != 0) { + if ((lyp->nfsly_flags & NFSLY_RECALL) == 0) { + iomode = 0; + if (!LIST_EMPTY(&lyp->nfsly_flayread)) + iomode |= NFSLAYOUTIOMODE_READ; + if (!LIST_EMPTY(&lyp->nfsly_flayrw)) + iomode |= NFSLAYOUTIOMODE_RW; + nfscl_layoutrecall(NFSLAYOUTRETURN_FILE, lyp, iomode, + 0, UINT64_MAX, lyp->nfsly_stateid.seqid, 0, 0, NULL, + *recallpp); + NFSCL_DEBUG(4, "retoncls recall iomode=%d\n", iomode); + *recallpp = NULL; + } + + /* Now, wake up renew thread to do LayoutReturn. */ + wakeup(clp); + *lypp = lyp; } } From nobody Fri Nov 19 00:02:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 50E0D188EDAB; Fri, 19 Nov 2021 00:02: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 4HwH0S1G1Dz4vfs; Fri, 19 Nov 2021 00:02:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C6F61E534; Fri, 19 Nov 2021 00:02: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 1AJ02FQ2072001; Fri, 19 Nov 2021 00:02:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02FUJ072000; Fri, 19 Nov 2021 00:02:15 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:15 GMT Message-Id: <202111190002.1AJ02FUJ072000@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: 79bc96d1fbee - stable/13 - LinuxKPI: add nexthdr definitions for IPv6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 79bc96d1fbee646211e1f605a4951ce81e7a0b53 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=79bc96d1fbee646211e1f605a4951ce81e7a0b53 commit 79bc96d1fbee646211e1f605a4951ce81e7a0b53 Author: Bjoern A. Zeeb AuthorDate: 2021-07-27 13:39:15 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:22 +0000 LinuxKPI: add nexthdr definitions for IPv6 Add the nexthdr definitions for IPv6 which are used by wireless drivers and were previously placed in an 80211 header file by accident. Obtained from: bz_iwlwifi Sponsored by: The FreeBSD Foundation (cherry picked from commit b9d984e2c5dcef277c49a576ccefada6519d9b53) --- sys/compat/linuxkpi/common/include/net/ipv6.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/net/ipv6.h b/sys/compat/linuxkpi/common/include/net/ipv6.h index 37c30ed6e793..dfe77ef1c6ed 100644 --- a/sys/compat/linuxkpi/common/include/net/ipv6.h +++ b/sys/compat/linuxkpi/common/include/net/ipv6.h @@ -38,6 +38,11 @@ #define IPV6_DEFAULT_HOPLIMIT 64 +#define NEXTHDR_HOP IPPROTO_HOPOPTS +#define NEXTHDR_ROUTING IPPROTO_ROUTING +#define NEXTHDR_NONE IPPROTO_NONE +#define NEXTHDR_DEST IPPROTO_DSTOPTS + #define ipv6_addr_loopback(addr) IN6_IS_ADDR_LOOPBACK(addr) #define ipv6_addr_any(addr) IN6_IS_ADDR_UNSPECIFIED(addr) From nobody Fri Nov 19 00:02:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 078B4188F08A; Fri, 19 Nov 2021 00:02: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 4HwH0T368Mz4vln; Fri, 19 Nov 2021 00:02:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 222391E6DD; Fri, 19 Nov 2021 00:02: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 1AJ02HnB072031; Fri, 19 Nov 2021 00:02:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02HbH072030; Fri, 19 Nov 2021 00:02:17 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:17 GMT Message-Id: <202111190002.1AJ02HbH072030@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: e41baaefc46a - stable/13 - LinuxKPI: dmi.h do not rely on implicit 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e41baaefc46a88becda14236b66bcba34b366b75 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e41baaefc46a88becda14236b66bcba34b366b75 commit e41baaefc46a88becda14236b66bcba34b366b75 Author: Bjoern A. Zeeb AuthorDate: 2021-07-28 13:28:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:22 +0000 LinuxKPI: dmi.h do not rely on implicit includes Add sys/types.h to dmi.h and do not rely on other files to include all needed headers in Linux land. I ran into compile problems with rtw88 otherwise. (cherry picked from commit ac134e762e6908dcadd0c7cb7bcb3de0ed967f59) --- sys/compat/linuxkpi/common/include/linux/dmi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/dmi.h b/sys/compat/linuxkpi/common/include/linux/dmi.h index b921cc906917..6e450e156b73 100644 --- a/sys/compat/linuxkpi/common/include/linux/dmi.h +++ b/sys/compat/linuxkpi/common/include/linux/dmi.h @@ -31,6 +31,7 @@ #ifndef __LINUX_DMI_H__ #define __LINUX_DMI_H__ +#include #include int linux_dmi_check_system(const struct dmi_system_id *); From nobody Fri Nov 19 00:02:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 71D1A188ED5C; Fri, 19 Nov 2021 00:02: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 4HwH0V46L8z4vjZ; Fri, 19 Nov 2021 00:02:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 539D91E0DE; Fri, 19 Nov 2021 00:02: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 1AJ02I26072056; Fri, 19 Nov 2021 00:02:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02IEw072055; Fri, 19 Nov 2021 00:02:18 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:18 GMT Message-Id: <202111190002.1AJ02IEw072055@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: 2314243b4a29 - stable/13 - LinuxKPI: bitfield.h 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2314243b4a2949d1bdddefcdd43e44bebe5dab50 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2314243b4a2949d1bdddefcdd43e44bebe5dab50 commit 2314243b4a2949d1bdddefcdd43e44bebe5dab50 Author: Bjoern A. Zeeb AuthorDate: 2021-07-29 21:24:35 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:23 +0000 LinuxKPI: bitfield.h cleanup Add a missing tab and remove an unnecessary return. No functional changes. (cherry picked from commit 4c8af633d10104c793673ee1f6e7b96f113cce5a) --- sys/compat/linuxkpi/common/include/linux/bitfield.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h index 4749cc4454e7..27082cbd4886 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitfield.h +++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h @@ -77,7 +77,7 @@ _uX_encode_bits(8) #define _leX_encode_bits(_n) \ static __inline uint ## _n ## _t \ - le ## _n ## _encode_bits(__le ## _n v, uint ## _n ## _t f)\ + le ## _n ## _encode_bits(__le ## _n v, uint ## _n ## _t f) \ { \ return (cpu_to_le ## _n((v & ___bitmask(f)) * ___lsb(f))); \ } @@ -91,7 +91,6 @@ le32p_replace_bits(uint32_t *p, uint32_t v, uint32_t f) { *p = (*p & ~(cpu_to_le32(v))) | le32_encode_bits(v, f); - return; } #define __bf_shf(x) (__builtin_ffsll(x) - 1) From nobody Fri Nov 19 00:02:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4A743188EF58; Fri, 19 Nov 2021 00:02: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 4HwH0W4WY0z4vd0; Fri, 19 Nov 2021 00:02:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6743C1E536; Fri, 19 Nov 2021 00:02: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 1AJ02JJS072080; Fri, 19 Nov 2021 00:02:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02J6Q072079; Fri, 19 Nov 2021 00:02:19 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:19 GMT Message-Id: <202111190002.1AJ02J6Q072079@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: 3ce981ee8ef7 - stable/13 - LinuxKPI: fix bug in le32p_replace_bits() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3ce981ee8ef7b343779f445ba833d93596edf5d9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3ce981ee8ef7b343779f445ba833d93596edf5d9 commit 3ce981ee8ef7b343779f445ba833d93596edf5d9 Author: Bjoern A. Zeeb AuthorDate: 2021-07-29 21:27:21 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:23 +0000 LinuxKPI: fix bug in le32p_replace_bits() Fix a bug that slipped in in 90707c4e44de03ea36be183ef2226601c66169cb using the correct field in le32p_replace_bits(). Sponsored by: The FreeBSD Foundation (cherry picked from commit 22e20d852ff400a486da24e5d1d92c841a3e39d9) --- sys/compat/linuxkpi/common/include/linux/bitfield.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h index 27082cbd4886..a805c1bca5a1 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitfield.h +++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h @@ -90,7 +90,7 @@ static __inline void le32p_replace_bits(uint32_t *p, uint32_t v, uint32_t f) { - *p = (*p & ~(cpu_to_le32(v))) | le32_encode_bits(v, f); + *p = (*p & ~(cpu_to_le32(f))) | le32_encode_bits(v, f); } #define __bf_shf(x) (__builtin_ffsll(x) - 1) From nobody Fri Nov 19 00:02:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9B773188ED73; Fri, 19 Nov 2021 00:02: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 4HwH0Y0K06z4vV1; Fri, 19 Nov 2021 00:02:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D9D01E6DF; Fri, 19 Nov 2021 00:02: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 1AJ02KEN072104; Fri, 19 Nov 2021 00:02:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02KIu072103; Fri, 19 Nov 2021 00:02:20 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:20 GMT Message-Id: <202111190002.1AJ02KIu072103@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: 034475d66c7c - stable/13 - LinuxKPI: add sign_extend32() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 034475d66c7c52211636522f2f44de7e64d36a6b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=034475d66c7c52211636522f2f44de7e64d36a6b commit 034475d66c7c52211636522f2f44de7e64d36a6b Author: Bjoern A. Zeeb AuthorDate: 2021-07-01 13:14:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:23 +0000 LinuxKPI: add sign_extend32() Add sign_extend32() replicating the 64 version. This is needed by the rtw88 driver. (cherry picked from commit ea4dea83944ac6334d31e0364dd674eda250adde) --- sys/compat/linuxkpi/common/include/linux/bitops.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 49bfc4cc7414..0d7ab376e02d 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -412,4 +412,12 @@ sign_extend64(uint64_t value, int index) return ((int64_t)(value << shift) >> shift); } +static inline uint32_t +sign_extend32(uint32_t value, int index) +{ + uint8_t shift = 31 - index; + + return ((int32_t)(value << shift) >> shift); +} + #endif /* _LINUX_BITOPS_H_ */ From nobody Fri Nov 19 00:02:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 77788188EDD1; Fri, 19 Nov 2021 00:02: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 4HwH0Y6zN7z4vm9; Fri, 19 Nov 2021 00:02:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFFE11E2CC; Fri, 19 Nov 2021 00:02: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 1AJ02Lr8072128; Fri, 19 Nov 2021 00:02:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02LXW072127; Fri, 19 Nov 2021 00:02:21 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:21 GMT Message-Id: <202111190002.1AJ02LXW072127@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: 4c8e29637456 - stable/13 - LinuxKPI: add module_pci_driver() and pci_alloc_irq_vectors() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4c8e29637456bbbe709425f691f637914658009f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4c8e29637456bbbe709425f691f637914658009f commit 4c8e29637456bbbe709425f691f637914658009f Author: Bjoern A. Zeeb AuthorDate: 2021-07-01 13:33:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:23 +0000 LinuxKPI: add module_pci_driver() and pci_alloc_irq_vectors() Add the two new functions needed by rtw88 to register the driver and handle the module bits as well as a version of pci_alloc_irq_vectors() for what is needed. (cherry picked from commit 366d68f283793df22392f9fb992c5029dfc293bb) --- sys/compat/linuxkpi/common/include/linux/pci.h | 59 ++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 5b3c7c292921..4914bc247ebc 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -186,6 +186,10 @@ typedef int pci_power_t; #define PCI_EXT_CAP_ID_ERR PCIZ_AER +#define PCI_IRQ_LEGACY 0x01 +#define PCI_IRQ_MSI 0x02 +#define PCI_IRQ_MSIX 0x04 + struct pci_dev; struct pci_driver { @@ -221,6 +225,25 @@ extern spinlock_t pci_lock; #define __devexit_p(x) x +#define module_pci_driver(_driver) \ + \ +static inline int \ +_pci_init(void) \ +{ \ + \ + return (linux_pci_register_driver(&_driver)); \ +} \ + \ +static inline void \ +_pci_exit(void) \ +{ \ + \ + linux_pci_unregister_driver(&_driver); \ +} \ + \ +module_init(_pci_init); \ +module_exit(_pci_exit) + /* * If we find drivers accessing this from multiple KPIs we may have to * refcount objects of this structure. @@ -829,6 +852,42 @@ pci_enable_msi(struct pci_dev *pdev) return (0); } +static inline int +pci_alloc_irq_vectors(struct pci_dev *pdev, int minv, int maxv, + unsigned int flags) +{ + int error; + + if (flags & PCI_IRQ_MSIX) { + struct msix_entry *entries; + int i; + + entries = kcalloc(maxv, sizeof(*entries), GFP_KERNEL); + if (entries == NULL) { + error = -ENOMEM; + goto out; + } + for (i = 0; i < maxv; ++i) + entries[i].entry = i; + error = pci_enable_msix(pdev, entries, maxv); +out: + kfree(entries); + if (error == 0 && pdev->msix_enabled) + return (pdev->dev.irq_end - pdev->dev.irq_start); + } + if (flags & PCI_IRQ_MSI) { + error = pci_enable_msi(pdev); + if (error == 0 && pdev->msi_enabled) + return (pdev->dev.irq_end - pdev->dev.irq_start); + } + if (flags & PCI_IRQ_LEGACY) { + if (pdev->irq) + return (1); + } + + return (-EINVAL); +} + static inline int pci_channel_offline(struct pci_dev *pdev) { From nobody Fri Nov 19 00:02:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0F534188F165; Fri, 19 Nov 2021 00:02: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 4HwH0b4M4bz4vmJ; Fri, 19 Nov 2021 00:02:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9E071E6E1; Fri, 19 Nov 2021 00:02: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 1AJ02M8s072152; Fri, 19 Nov 2021 00:02:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02Mso072151; Fri, 19 Nov 2021 00:02:22 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:22 GMT Message-Id: <202111190002.1AJ02Mso072151@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: 9342ec5077f4 - stable/13 - LinuxKPI: add read_poll_timeout() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9342ec5077f4e198394ec8648a3834524c684d6d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9342ec5077f4e198394ec8648a3834524c684d6d commit 9342ec5077f4e198394ec8648a3834524c684d6d Author: Bjoern A. Zeeb AuthorDate: 2021-07-01 13:29:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:23 +0000 LinuxKPI: add read_poll_timeout() Add an implementation of read_poll_timeout() and the atomic variant which I did at some point last year for rtw88 and now updated based on feedback. (cherry picked from commit fed248a6acb33cf6d51880be8d5c774d89e75110) --- sys/compat/linuxkpi/common/include/linux/iopoll.h | 91 +++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/iopoll.h b/sys/compat/linuxkpi/common/include/linux/iopoll.h new file mode 100644 index 000000000000..ea876042eab6 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/iopoll.h @@ -0,0 +1,91 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020-2021 Bjoern A. Zeeb + * + * 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_IOPOLL_H +#define __LINUXKPI_LINUX_IOPOLL_H + +#include +#include +#include + +#define read_poll_timeout(_pollfp, _var, _cond, _us, _to, _early_sleep, ...) \ +({ \ + struct timeval __now, __end; \ + if (_to) { \ + __end.tv_sec = (_to) / USEC_PER_SEC; \ + __end.tv_usec = (_to) % USEC_PER_SEC; \ + microtime(&__now); \ + timevaladd(&__end, &__now); \ + } \ + \ + if ((_early_sleep) && (_us) > 0) \ + usleep_range(_us, _us); \ + do { \ + (_var) = _pollfp(__VA_ARGS__); \ + if (_cond) \ + break; \ + if (_to) { \ + microtime(&__now); \ + if (timevalcmp(&__now, &__end, >)) \ + break; \ + } \ + if ((_us) != 0) \ + usleep_range(_us, _us); \ + } while (1); \ + (_cond) ? 0 : (-ETIMEDOUT); \ +}) + +#define read_poll_timeout_atomic(_pollfp, _var, _cond, _us, _to, _early_sleep, ...) \ +({ \ + struct timeval __now, __end; \ + if (_to) { \ + __end.tv_sec = (_to) / USEC_PER_SEC; \ + __end.tv_usec = (_to) % USEC_PER_SEC; \ + microtime(&__now); \ + timevaladd(&__end, &__now); \ + } \ + \ + if ((_early_sleep) && (_us) > 0) \ + DELAY(_us); \ + do { \ + (_var) = _pollfp(__VA_ARGS__); \ + if (_cond) \ + break; \ + if (_to) { \ + microtime(&__now); \ + if (timevalcmp(&__now, &__end, >)) \ + break; \ + } \ + if ((_us) != 0) \ + DELAY(_us); \ + } while (1); \ + (_cond) ? 0 : (-ETIMEDOUT); \ +}) + +#endif /* __LINUXKPI_LINUX_IOPOLL_H */ From nobody Fri Nov 19 00:02:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 74DE4188F1CA; Fri, 19 Nov 2021 00:02: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 4HwH0d2JhHz4vtk; Fri, 19 Nov 2021 00:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 097981E539; Fri, 19 Nov 2021 00:02: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 1AJ02O9Z072206; Fri, 19 Nov 2021 00:02:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02OiU072205; Fri, 19 Nov 2021 00:02:24 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:24 GMT Message-Id: <202111190002.1AJ02OiU072205@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: f9002b78d070 - stable/13 - net80211: comments 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: f9002b78d070e2603299e9ff7084ab79e8faaa55 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f9002b78d070e2603299e9ff7084ab79e8faaa55 commit f9002b78d070e2603299e9ff7084ab79e8faaa55 Author: Bjoern A. Zeeb AuthorDate: 2021-09-04 09:16:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:24 +0000 net80211: comments and whitespace Add a missing '.', fix spelling of "failed" and unwrap a closing ); No functional changes. Sponsored by: The FreeBSD Foundation (cherry picked from commit 49c220b021d5855652ecb2803c969dfa47bdd306) --- sys/net80211/ieee80211_input.h | 2 +- sys/net80211/ieee80211_output.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/net80211/ieee80211_input.h b/sys/net80211/ieee80211_input.h index 810dcbde7978..7456fc68b365 100644 --- a/sys/net80211/ieee80211_input.h +++ b/sys/net80211/ieee80211_input.h @@ -178,7 +178,7 @@ ieee80211_check_rxseq_amsdu_more(const struct ieee80211_rx_stats *rxs) * * The routine only eliminates packets whose sequence/fragment * match or are less than the last seen sequence/fragment number - * AND are retransmits It doesn't try to eliminate out of order packets. + * AND are retransmits. It doesn't try to eliminate out of order packets. * * Since all frames after sequence number 4095 will be less than 4095 * (as the seqnum wraps), handle that special case so packets aren't diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index ab3e3142ad2c..4f9e9614f732 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -2590,7 +2590,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, ret = ieee80211_probereq_ie(vap, ic, &frm, &frmlen, ssid, ssidlen, false); KASSERT(ret == 0, - ("%s: ieee80211_probereq_ie railed: %d\n", __func__, ret)); + ("%s: ieee80211_probereq_ie failed: %d\n", __func__, ret)); m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); KASSERT(M_LEADINGSPACE(m) >= sizeof(struct ieee80211_frame), @@ -2725,8 +2725,7 @@ ieee80211_send_mgmt(struct ieee80211_node *ni, int type, int arg) ic->ic_headroom + sizeof(struct ieee80211_frame), 3 * sizeof(uint16_t) + (has_challenge && status == IEEE80211_STATUS_SUCCESS ? - sizeof(uint16_t)+IEEE80211_CHALLENGE_LEN : 0) - ); + sizeof(uint16_t)+IEEE80211_CHALLENGE_LEN : 0)); if (m == NULL) senderr(ENOMEM, is_tx_nobuf); From nobody Fri Nov 19 00:02:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8A108188F318; Fri, 19 Nov 2021 00:02: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 4HwH0c5RtLz4vVS; Fri, 19 Nov 2021 00:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB3B21E4A8; Fri, 19 Nov 2021 00:02: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 1AJ02N2a072182; Fri, 19 Nov 2021 00:02:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02NBv072181; Fri, 19 Nov 2021 00:02:23 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:23 GMT Message-Id: <202111190002.1AJ02NBv072181@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: 20c9dcd2edf3 - stable/13 - LinuxKPI: add fsleep() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 20c9dcd2edf35f9c4cc52d48ea4d3b10af6d8091 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=20c9dcd2edf35f9c4cc52d48ea4d3b10af6d8091 commit 20c9dcd2edf35f9c4cc52d48ea4d3b10af6d8091 Author: Bjoern A. Zeeb AuthorDate: 2021-07-27 15:22:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:23 +0000 LinuxKPI: add fsleep() Add fsleep() function now required by rtw88. This seems to be making a decision depending on time to sleep on how to sleep. Given our compat framework already is lenient on how long to sleep, this is a cut down version. (cherry picked from commit cc2723370b482b923b2adeac3ad359d485f0bd82) --- sys/compat/linuxkpi/common/include/linux/delay.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/delay.h b/sys/compat/linuxkpi/common/include/linux/delay.h index 860d36368a8e..d2fea37699c3 100644 --- a/sys/compat/linuxkpi/common/include/linux/delay.h +++ b/sys/compat/linuxkpi/common/include/linux/delay.h @@ -73,4 +73,14 @@ usleep_range(unsigned long min, unsigned long max) extern unsigned int linux_msleep_interruptible(unsigned int ms); +static inline void +fsleep(unsigned long us) +{ + + if (us < 10) + udelay(us); + else + usleep_range(us, us); +} + #endif /* _LINUX_DELAY_H_ */ From nobody Fri Nov 19 00:02:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BBB80188F63B; Fri, 19 Nov 2021 00:02: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 4HwH0m16lPz4vpn; Fri, 19 Nov 2021 00:02:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAD911E2D2; Fri, 19 Nov 2021 00:02: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 1AJ02VSK072356; Fri, 19 Nov 2021 00:02:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02V5v072355; Fri, 19 Nov 2021 00:02:31 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:31 GMT Message-Id: <202111190002.1AJ02V5v072355@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: 41ca1d50a865 - stable/13 - net80211: mitigation against A-MSDU design flaw List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 41ca1d50a8657959df2009daa300dda56a090d5e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=41ca1d50a8657959df2009daa300dda56a090d5e commit 41ca1d50a8657959df2009daa300dda56a090d5e Author: Mathy Vanhoef AuthorDate: 2021-06-06 22:10:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:24 +0000 net80211: mitigation against A-MSDU design flaw Mitigate A-MSDU injection attacks by detecting if the destination address of a subframe equals an RFC1042 (i.e., LLC/SNAP) header, and if so dropping the complete A-MSDU frame. This mitigates known attacks, although new (unknown) aggregation-based attacks may remain possible. This defense works because in A-MSDU aggregation injection attacks, a normal encrypted Wi-Fi frame is turned into an A-MSDU frame. This means the first 6 bytes of the first A-MSDU subframe correspond to an RFC1042 header. In other words, the destination MAC address of the first A-MSDU subframe contains the start of an RFC1042 header during an aggregation attack. We can detect this and thereby prevent this specific attack. This relates to section 7.2 in the 2021 Usenix "FragAttacks" (Fragment and Forge: Breaking Wi-Fi Through Frame Aggregation and Fragmentation) paper. Submitted by: Mathy Vanhoef (Mathy.Vanhoef kuleuven.be) Security: CVE-2020-24588 PR: 256119 (cherry picked from commit f024bdf1155f36d2d8c4caa533b66e4040c4c469) --- sys/net80211/ieee80211_adhoc.c | 2 +- sys/net80211/ieee80211_hostap.c | 2 +- sys/net80211/ieee80211_input.c | 20 ++++++++++++++++++-- sys/net80211/ieee80211_input.h | 3 ++- sys/net80211/ieee80211_sta.c | 2 +- sys/net80211/ieee80211_wds.c | 2 +- 6 files changed, 24 insertions(+), 7 deletions(-) diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c index a23f138802dc..e2164bbb46a1 100644 --- a/sys/net80211/ieee80211_adhoc.c +++ b/sys/net80211/ieee80211_adhoc.c @@ -558,7 +558,7 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, /* * Finally, strip the 802.11 header. */ - m = ieee80211_decap(vap, m, hdrspace); + m = ieee80211_decap(vap, m, hdrspace, qos); if (m == NULL) { /* XXX mask bit to check for both */ /* don't count Null data frames as errors */ diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 15d42a682355..75fa1c0f7b31 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -744,7 +744,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, /* * Finally, strip the 802.11 header. */ - m = ieee80211_decap(vap, m, hdrspace); + m = ieee80211_decap(vap, m, hdrspace, qos); if (m == NULL) { /* XXX mask bit to check for both */ /* don't count Null data frames as errors */ diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index eaeceb9d228e..66a5ba1c4035 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -309,7 +309,8 @@ ieee80211_deliver_data(struct ieee80211vap *vap, } struct mbuf * -ieee80211_decap(struct ieee80211vap *vap, struct mbuf *m, int hdrlen) +ieee80211_decap(struct ieee80211vap *vap, struct mbuf *m, int hdrlen, + uint8_t qos) { struct ieee80211_qosframe_addr4 wh; struct ether_header *eh; @@ -331,7 +332,9 @@ ieee80211_decap(struct ieee80211vap *vap, struct mbuf *m, int hdrlen) llc->llc_snap.org_code[1] == 0 && llc->llc_snap.org_code[2] == 0 && /* NB: preserve AppleTalk frames that have a native SNAP hdr */ !(llc->llc_snap.ether_type == htons(ETHERTYPE_AARP) || - llc->llc_snap.ether_type == htons(ETHERTYPE_IPX))) { + llc->llc_snap.ether_type == htons(ETHERTYPE_IPX)) && + /* Do not want to touch A-MSDU frames. */ + !(qos & IEEE80211_QOS_AMSDU)) { m_adj(m, hdrlen + sizeof(struct llc) - sizeof(*eh)); llc = NULL; } else { @@ -379,6 +382,10 @@ ieee80211_decap1(struct mbuf *m, int *framelen) #define FF_LLC_SIZE (sizeof(struct ether_header) + sizeof(struct llc)) struct ether_header *eh; struct llc *llc; + const uint8_t llc_hdr_mac[ETHER_ADDR_LEN] = { + /* MAC address matching the 802.2 LLC header */ + LLC_SNAP_LSAP, LLC_SNAP_LSAP, LLC_UI, 0, 0, 0 + }; /* * The frame has an 802.3 header followed by an 802.2 @@ -391,6 +398,15 @@ ieee80211_decap1(struct mbuf *m, int *framelen) if (m->m_len < FF_LLC_SIZE && (m = m_pullup(m, FF_LLC_SIZE)) == NULL) return NULL; eh = mtod(m, struct ether_header *); /* 802.3 header is first */ + + /* + * Detect possible attack where a single 802.11 frame is processed + * as an A-MSDU frame due to an adversary setting the A-MSDU present + * bit in the 802.11 QoS header. [FragAttacks] + */ + if (memcmp(eh->ether_dhost, llc_hdr_mac, ETHER_ADDR_LEN) == 0) + return NULL; + llc = (struct llc *)&eh[1]; /* 802.2 header follows */ *framelen = ntohs(eh->ether_type) /* encap'd frame size */ + sizeof(struct ether_header) - sizeof(struct llc); diff --git a/sys/net80211/ieee80211_input.h b/sys/net80211/ieee80211_input.h index 61e3099cb0a4..2192bba405d2 100644 --- a/sys/net80211/ieee80211_input.h +++ b/sys/net80211/ieee80211_input.h @@ -311,7 +311,8 @@ void ieee80211_deliver_data(struct ieee80211vap *, struct mbuf *ieee80211_defrag(struct ieee80211_node *, struct mbuf *, int, int); struct mbuf *ieee80211_realign(struct ieee80211vap *, struct mbuf *, size_t); -struct mbuf *ieee80211_decap(struct ieee80211vap *, struct mbuf *, int); +struct mbuf *ieee80211_decap(struct ieee80211vap *, struct mbuf *, int, + uint8_t); struct mbuf *ieee80211_decap1(struct mbuf *, int *); int ieee80211_setup_rates(struct ieee80211_node *ni, const uint8_t *rates, const uint8_t *xrates, int flags); diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 6d24eadc11a6..60a5ea100556 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -827,7 +827,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, /* * Finally, strip the 802.11 header. */ - m = ieee80211_decap(vap, m, hdrspace); + m = ieee80211_decap(vap, m, hdrspace, qos); if (m == NULL) { /* XXX mask bit to check for both */ /* don't count Null data frames as errors */ diff --git a/sys/net80211/ieee80211_wds.c b/sys/net80211/ieee80211_wds.c index f59a92b992d7..f88871ca4ae6 100644 --- a/sys/net80211/ieee80211_wds.c +++ b/sys/net80211/ieee80211_wds.c @@ -621,7 +621,7 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, /* * Finally, strip the 802.11 header. */ - m = ieee80211_decap(vap, m, hdrspace); + m = ieee80211_decap(vap, m, hdrspace, qos); if (m == NULL) { /* XXX mask bit to check for both */ /* don't count Null data frames as errors */ From nobody Fri Nov 19 00:02:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A82C9188F456; Fri, 19 Nov 2021 00:02: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 4HwH0l3jBSz4vdt; Fri, 19 Nov 2021 00:02:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3F0B1E53E; Fri, 19 Nov 2021 00:02: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 1AJ02USp072332; Fri, 19 Nov 2021 00:02:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02UII072331; Fri, 19 Nov 2021 00:02:30 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:30 GMT Message-Id: <202111190002.1AJ02UII072331@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: e13d483c5677 - stable/13 - net80211: reject mixed plaintext/encrypted fragments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e13d483c5677d12b52f1c81537d54faa85ed43b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e13d483c5677d12b52f1c81537d54faa85ed43b9 commit e13d483c5677d12b52f1c81537d54faa85ed43b9 Author: Mathy Vanhoef AuthorDate: 2021-06-06 22:10:41 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:24 +0000 net80211: reject mixed plaintext/encrypted fragments ieee80211_defrag() accepts fragmented 802.11 frames in a protected Wi-Fi network even when some of the fragments are not encrypted. Track whether the fragments are encrypted or not and only accept successive ones if they match the state of the first fragment. This relates to section 6.3 in the 2021 Usenix "FragAttacks" (Fragment and Forge: Breaking Wi-Fi Through Frame Aggregation and Fragmentation) paper. Submitted by: Mathy Vanhoef (Mathy.Vanhoef kuleuven.be) Security: CVE-2020-26147 PR: 256118 (cherry picked from commit 11572d7d7fb9802ceb46ea9dc6cbe3bb95373e55) --- sys/net80211/ieee80211_adhoc.c | 2 +- sys/net80211/ieee80211_hostap.c | 2 +- sys/net80211/ieee80211_input.c | 21 ++++++++++++++++++--- sys/net80211/ieee80211_input.h | 2 +- sys/net80211/ieee80211_mesh.c | 2 +- sys/net80211/ieee80211_sta.c | 2 +- sys/net80211/ieee80211_wds.c | 2 +- 7 files changed, 24 insertions(+), 9 deletions(-) diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c index ea1519b3381d..a23f138802dc 100644 --- a/sys/net80211/ieee80211_adhoc.c +++ b/sys/net80211/ieee80211_adhoc.c @@ -531,7 +531,7 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, * Next up, any fragmentation. */ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { - m = ieee80211_defrag(ni, m, hdrspace); + m = ieee80211_defrag(ni, m, hdrspace, has_decrypted); if (m == NULL) { /* Fragment dropped or frame not complete yet */ goto out; diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 16a3d97ae7f2..15d42a682355 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -719,7 +719,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, * Next up, any fragmentation. */ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { - m = ieee80211_defrag(ni, m, hdrspace); + m = ieee80211_defrag(ni, m, hdrspace, has_decrypted); if (m == NULL) { /* Fragment dropped or frame not complete yet */ goto out; diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index aa557fc1ec24..eaeceb9d228e 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -170,7 +170,8 @@ ieee80211_input_mimo_all(struct ieee80211com *ic, struct mbuf *m) * XXX should handle 3 concurrent reassemblies per-spec. */ struct mbuf * -ieee80211_defrag(struct ieee80211_node *ni, struct mbuf *m, int hdrspace) +ieee80211_defrag(struct ieee80211_node *ni, struct mbuf *m, int hdrspace, + int has_decrypted) { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); @@ -189,6 +190,11 @@ ieee80211_defrag(struct ieee80211_node *ni, struct mbuf *m, int hdrspace) if (!more_frag && fragno == 0 && ni->ni_rxfrag[0] == NULL) return m; + /* Temporarily set flag to remember if fragment was encrypted. */ + /* XXX use a non-packet altering storage for this in the future. */ + if (has_decrypted) + wh->i_fc[1] |= IEEE80211_FC1_PROTECTED; + /* * Remove frag to insure it doesn't get reaped by timer. */ @@ -219,10 +225,14 @@ ieee80211_defrag(struct ieee80211_node *ni, struct mbuf *m, int hdrspace) lwh = mtod(mfrag, struct ieee80211_frame *); last_rxseq = le16toh(*(uint16_t *)lwh->i_seq); - /* NB: check seq # and frag together */ + /* + * NB: check seq # and frag together. Also check that both + * fragments are plaintext or that both are encrypted. + */ if (rxseq == last_rxseq+1 && IEEE80211_ADDR_EQ(wh->i_addr1, lwh->i_addr1) && - IEEE80211_ADDR_EQ(wh->i_addr2, lwh->i_addr2)) { + IEEE80211_ADDR_EQ(wh->i_addr2, lwh->i_addr2) && + !((wh->i_fc[1] ^ lwh->i_fc[1]) & IEEE80211_FC1_PROTECTED)) { /* XXX clear MORE_FRAG bit? */ /* track last seqnum and fragno */ *(uint16_t *) lwh->i_seq = *(uint16_t *) wh->i_seq; @@ -253,6 +263,11 @@ ieee80211_defrag(struct ieee80211_node *ni, struct mbuf *m, int hdrspace) ni->ni_rxfrag[0] = mfrag; mfrag = NULL; } + /* Remember to clear protected flag that was temporarily set. */ + if (mfrag != NULL) { + wh = mtod(mfrag, struct ieee80211_frame *); + wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; + } return mfrag; } diff --git a/sys/net80211/ieee80211_input.h b/sys/net80211/ieee80211_input.h index 7456fc68b365..61e3099cb0a4 100644 --- a/sys/net80211/ieee80211_input.h +++ b/sys/net80211/ieee80211_input.h @@ -309,7 +309,7 @@ fail: void ieee80211_deliver_data(struct ieee80211vap *, struct ieee80211_node *, struct mbuf *); struct mbuf *ieee80211_defrag(struct ieee80211_node *, - struct mbuf *, int); + struct mbuf *, int, int); struct mbuf *ieee80211_realign(struct ieee80211vap *, struct mbuf *, size_t); struct mbuf *ieee80211_decap(struct ieee80211vap *, struct mbuf *, int); struct mbuf *ieee80211_decap1(struct mbuf *, int *); diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c index 48a3590d0cf3..63c207d7900b 100644 --- a/sys/net80211/ieee80211_mesh.c +++ b/sys/net80211/ieee80211_mesh.c @@ -1642,7 +1642,7 @@ mesh_input(struct ieee80211_node *ni, struct mbuf *m, */ hdrspace = ieee80211_hdrspace(ic, wh); if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { - m = ieee80211_defrag(ni, m, hdrspace); + m = ieee80211_defrag(ni, m, hdrspace, 0); if (m == NULL) { /* Fragment dropped or frame not complete yet */ goto out; diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 43dc8b6dfeca..6d24eadc11a6 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -795,7 +795,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, * Next up, any fragmentation. */ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { - m = ieee80211_defrag(ni, m, hdrspace); + m = ieee80211_defrag(ni, m, hdrspace, has_decrypted); if (m == NULL) { /* Fragment dropped or frame not complete yet */ goto out; diff --git a/sys/net80211/ieee80211_wds.c b/sys/net80211/ieee80211_wds.c index 8eaffcf87733..f59a92b992d7 100644 --- a/sys/net80211/ieee80211_wds.c +++ b/sys/net80211/ieee80211_wds.c @@ -594,7 +594,7 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, * Next up, any fragmentation. */ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { - m = ieee80211_defrag(ni, m, hdrspace); + m = ieee80211_defrag(ni, m, hdrspace, has_decrypted); if (m == NULL) { /* Fragment dropped or frame not complete yet */ goto out; From nobody Fri Nov 19 00:02:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CE821188F46B; Fri, 19 Nov 2021 00:02: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 4HwH0p11C6z4vf4; Fri, 19 Nov 2021 00:02:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11F1C1E2D4; Fri, 19 Nov 2021 00:02: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 1AJ02W2n072380; Fri, 19 Nov 2021 00:02:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02WYv072379; Fri, 19 Nov 2021 00:02:32 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:32 GMT Message-Id: <202111190002.1AJ02WYv072379@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: 8b2ba742cc2c - stable/13 - net80211: prevent plaintext injection by A-MSDU RFC1042/EAPOL frames List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8b2ba742cc2c732bc4bc1d43f8256adce06657d0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8b2ba742cc2c732bc4bc1d43f8256adce06657d0 commit 8b2ba742cc2c732bc4bc1d43f8256adce06657d0 Author: Mathy Vanhoef AuthorDate: 2021-06-06 22:10:56 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:25 +0000 net80211: prevent plaintext injection by A-MSDU RFC1042/EAPOL frames No longer accept plaintext A-MSDU frames that start with an RFC1042 header with EtherType EAPOL. This is done by only accepting EAPOL packets that are included in non-aggregated 802.11 frames. Note that before this patch, FreeBSD also only accepted EAPOL frames that are sent in a non-aggregated 802.11 frame due to bugs in processing EAPOL packets inside A-MSDUs. In other words, compatibility with legitimate devices remains the same. This relates to section 6.5 in the 2021 Usenix "FragAttacks" (Fragment and Forge: Breaking Wi-Fi Through Frame Aggregation and Fragmentation) paper. Submitted by: Mathy Vanhoef (Mathy.Vanhoef kuleuven.be) Security: CVE-2020-26144 PR: 256120 (cherry picked from commit ffc19cf52da5546973965f78cf32aa0f2c9657f8) --- sys/net80211/ieee80211_adhoc.c | 18 ++++++++++++------ sys/net80211/ieee80211_hostap.c | 18 ++++++++++++------ sys/net80211/ieee80211_sta.c | 18 ++++++++++++------ sys/net80211/ieee80211_wds.c | 18 ++++++++++++------ 4 files changed, 48 insertions(+), 24 deletions(-) diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c index e2164bbb46a1..150515222268 100644 --- a/sys/net80211/ieee80211_adhoc.c +++ b/sys/net80211/ieee80211_adhoc.c @@ -571,7 +571,10 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, IEEE80211_NODE_STAT(ni, rx_decap); goto err; } - eh = mtod(m, struct ether_header *); + if (!(qos & IEEE80211_QOS_AMSDU)) + eh = mtod(m, struct ether_header *); + else + eh = NULL; if (!ieee80211_node_is_authorized(ni)) { /* * Deny any non-PAE frames received prior to @@ -581,11 +584,13 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, * the port is not marked authorized by the * authenticator until the handshake has completed. */ - if (eh->ether_type != htons(ETHERTYPE_PAE)) { + if (eh == NULL || + eh->ether_type != htons(ETHERTYPE_PAE)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, - eh->ether_shost, "data", - "unauthorized port: ether type 0x%x len %u", - eh->ether_type, m->m_pkthdr.len); + ni->ni_macaddr, "data", "unauthorized or " + "unknown port: ether type 0x%x len %u", + eh == NULL ? -1 : eh->ether_type, + m->m_pkthdr.len); vap->iv_stats.is_rx_unauth++; IEEE80211_NODE_STAT(ni, rx_unauth); goto err; @@ -598,7 +603,8 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, if ((vap->iv_flags & IEEE80211_F_DROPUNENC) && ((has_decrypted == 0) && (m->m_flags & M_WEP) == 0) && (is_hw_decrypted == 0) && - eh->ether_type != htons(ETHERTYPE_PAE)) { + (eh == NULL || + eh->ether_type != htons(ETHERTYPE_PAE))) { /* * Drop unencrypted frames. */ diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 75fa1c0f7b31..4fa9c6a72145 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -757,7 +757,10 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, IEEE80211_NODE_STAT(ni, rx_decap); goto err; } - eh = mtod(m, struct ether_header *); + if (!(qos & IEEE80211_QOS_AMSDU)) + eh = mtod(m, struct ether_header *); + else + eh = NULL; if (!ieee80211_node_is_authorized(ni)) { /* * Deny any non-PAE frames received prior to @@ -767,11 +770,13 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, * the port is not marked authorized by the * authenticator until the handshake has completed. */ - if (eh->ether_type != htons(ETHERTYPE_PAE)) { + if (eh == NULL || + eh->ether_type != htons(ETHERTYPE_PAE)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, - eh->ether_shost, "data", - "unauthorized port: ether type 0x%x len %u", - eh->ether_type, m->m_pkthdr.len); + ni->ni_macaddr, "data", "unauthorized or " + "unknown port: ether type 0x%x len %u", + eh == NULL ? -1 : eh->ether_type, + m->m_pkthdr.len); vap->iv_stats.is_rx_unauth++; IEEE80211_NODE_STAT(ni, rx_unauth); goto err; @@ -784,7 +789,8 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, if ((vap->iv_flags & IEEE80211_F_DROPUNENC) && ((has_decrypted == 0) && (m->m_flags & M_WEP) == 0) && (is_hw_decrypted == 0) && - eh->ether_type != htons(ETHERTYPE_PAE)) { + (eh == NULL || + eh->ether_type != htons(ETHERTYPE_PAE))) { /* * Drop unencrypted frames. */ diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 60a5ea100556..cd62266ab942 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -840,7 +840,10 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, IEEE80211_NODE_STAT(ni, rx_decap); goto err; } - eh = mtod(m, struct ether_header *); + if (!(qos & IEEE80211_QOS_AMSDU)) + eh = mtod(m, struct ether_header *); + else + eh = NULL; if (!ieee80211_node_is_authorized(ni)) { /* * Deny any non-PAE frames received prior to @@ -850,11 +853,13 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, * the port is not marked authorized by the * authenticator until the handshake has completed. */ - if (eh->ether_type != htons(ETHERTYPE_PAE)) { + if (eh == NULL || + eh->ether_type != htons(ETHERTYPE_PAE)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, - eh->ether_shost, "data", - "unauthorized port: ether type 0x%x len %u", - eh->ether_type, m->m_pkthdr.len); + ni->ni_macaddr, "data", "unauthorized or " + "unknown port: ether type 0x%x len %u", + eh == NULL ? -1 : eh->ether_type, + m->m_pkthdr.len); vap->iv_stats.is_rx_unauth++; IEEE80211_NODE_STAT(ni, rx_unauth); goto err; @@ -867,7 +872,8 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, if ((vap->iv_flags & IEEE80211_F_DROPUNENC) && ((has_decrypted == 0) && (m->m_flags & M_WEP) == 0) && (is_hw_decrypted == 0) && - eh->ether_type != htons(ETHERTYPE_PAE)) { + (eh == NULL || + eh->ether_type != htons(ETHERTYPE_PAE))) { /* * Drop unencrypted frames. */ diff --git a/sys/net80211/ieee80211_wds.c b/sys/net80211/ieee80211_wds.c index f88871ca4ae6..b73988b10d5e 100644 --- a/sys/net80211/ieee80211_wds.c +++ b/sys/net80211/ieee80211_wds.c @@ -634,7 +634,10 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, IEEE80211_NODE_STAT(ni, rx_decap); goto err; } - eh = mtod(m, struct ether_header *); + if (!(qos & IEEE80211_QOS_AMSDU)) + eh = mtod(m, struct ether_header *); + else + eh = NULL; if (!ieee80211_node_is_authorized(ni)) { /* * Deny any non-PAE frames received prior to @@ -644,11 +647,13 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, * the port is not marked authorized by the * authenticator until the handshake has completed. */ - if (eh->ether_type != htons(ETHERTYPE_PAE)) { + if (eh == NULL || + eh->ether_type != htons(ETHERTYPE_PAE)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, - eh->ether_shost, "data", - "unauthorized port: ether type 0x%x len %u", - eh->ether_type, m->m_pkthdr.len); + ni->ni_macaddr, "data", "unauthorized or " + "unknown port: ether type 0x%x len %u", + eh == NULL ? -1 : eh->ether_type, + m->m_pkthdr.len); vap->iv_stats.is_rx_unauth++; IEEE80211_NODE_STAT(ni, rx_unauth); goto err; @@ -661,7 +666,8 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, if ((vap->iv_flags & IEEE80211_F_DROPUNENC) && ((has_decrypted == 0) && (m->m_flags & M_WEP) == 0) && (is_hw_decrypted == 0) && - eh->ether_type != htons(ETHERTYPE_PAE)) { + (eh == NULL || + eh->ether_type != htons(ETHERTYPE_PAE))) { /* * Drop unencrypted frames. */ From nobody Fri Nov 19 00:02:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D06AD188F4C8; Fri, 19 Nov 2021 00:02: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 4HwH0h2nKXz4vtt; Fri, 19 Nov 2021 00:02:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FFB11E2CF; Fri, 19 Nov 2021 00:02: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 1AJ02RD3072254; Fri, 19 Nov 2021 00:02:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02RuP072253; Fri, 19 Nov 2021 00:02:27 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:27 GMT Message-Id: <202111190002.1AJ02RuP072253@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: 870e31d839c6 - stable/13 - LinuxKPI: disable device_release_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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 870e31d839c69a5d90e56399a55a7d30d556c126 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=870e31d839c69a5d90e56399a55a7d30d556c126 commit 870e31d839c69a5d90e56399a55a7d30d556c126 Author: Bjoern A. Zeeb AuthorDate: 2021-09-27 17:38:41 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:24 +0000 LinuxKPI: disable device_release_driver() As reported by multiple people testing iwlwifi, device_release_driver() can lead to a panic on secondary errors (usually during attach). Disable device_release_driver() for the short-term to prevent the panic but leave it in place so it can be re-worked and fixed properly for the long-term more easily. Sponsored by: The FreeBSD Foundation (cherry picked from commit 93b14194acaf2c2d80df9c4900a90c6644dcd92b) --- sys/compat/linuxkpi/common/include/linux/device.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 4bdc3b831e58..abafcd7ba5c4 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -506,6 +506,9 @@ static inline void device_release_driver(struct device *dev) { +#if 0 + /* This leads to panics. Disable temporarily. Keep to rework. */ + /* We also need to cleanup LinuxKPI bits. What else? */ lkpi_devres_release_free_list(dev); dev_set_drvdata(dev, NULL); @@ -515,6 +518,7 @@ device_release_driver(struct device *dev) if (device_is_attached(dev->bsddev)) device_detach(dev->bsddev); mtx_unlock(&Giant); +#endif } static inline int From nobody Fri Nov 19 00:02:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 528D1188F39C; Fri, 19 Nov 2021 00:02: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 4HwH0f39Qyz4vgg; Fri, 19 Nov 2021 00:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 31A6F1E700; Fri, 19 Nov 2021 00:02: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 1AJ02QXR072230; Fri, 19 Nov 2021 00:02:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02QwV072229; Fri, 19 Nov 2021 00:02:26 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:26 GMT Message-Id: <202111190002.1AJ02QwV072229@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: bb989b92edd9 - stable/13 - net80211: add func/line information to IEEE80211_DISCARD* 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bb989b92edd9eba7f80148378858ee0759d4dd13 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bb989b92edd9eba7f80148378858ee0759d4dd13 commit bb989b92edd9eba7f80148378858ee0759d4dd13 Author: Bjoern A. Zeeb AuthorDate: 2021-09-04 09:24:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:24 +0000 net80211: add func/line information to IEEE80211_DISCARD* macros While debugging is very good in net80211, some log messages are repeated in multiple places 1:1. In order to distinguish where the discard happened and to speed up analysis, add __func__:__LINE__ information to all these messages. Sponsored by: The FreeBSD Foundation (cherry picked from commit cb5c07649aa005abb1e847c2cd5f816d762efb93) --- sys/net80211/ieee80211_var.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 350c9b98441d..e70b7f8e2bb6 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -1067,15 +1067,18 @@ void ieee80211_note_frame(const struct ieee80211vap *, */ #define IEEE80211_DISCARD(_vap, _m, _wh, _type, _fmt, ...) do { \ if ((_vap)->iv_debug & (_m)) \ - ieee80211_discard_frame(_vap, _wh, _type, _fmt, __VA_ARGS__);\ + ieee80211_discard_frame(_vap, _wh, _type, \ + "%s:%d: " _fmt, __func__, __LINE__, __VA_ARGS__); \ } while (0) #define IEEE80211_DISCARD_IE(_vap, _m, _wh, _type, _fmt, ...) do { \ if ((_vap)->iv_debug & (_m)) \ - ieee80211_discard_ie(_vap, _wh, _type, _fmt, __VA_ARGS__);\ + ieee80211_discard_ie(_vap, _wh, _type, \ + "%s:%d: " _fmt, __func__, __LINE__, __VA_ARGS__); \ } while (0) #define IEEE80211_DISCARD_MAC(_vap, _m, _mac, _type, _fmt, ...) do { \ if ((_vap)->iv_debug & (_m)) \ - ieee80211_discard_mac(_vap, _mac, _type, _fmt, __VA_ARGS__);\ + ieee80211_discard_mac(_vap, _mac, _type, \ + "%s:%d: " _fmt, __func__, __LINE__, __VA_ARGS__); \ } while (0) void ieee80211_discard_frame(const struct ieee80211vap *, From nobody Fri Nov 19 00:02:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 01354188F688; Fri, 19 Nov 2021 00:02: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 4HwH0j0fSRz4vdk; Fri, 19 Nov 2021 00:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E70B1E2D1; Fri, 19 Nov 2021 00:02: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 1AJ02S7Q072278; Fri, 19 Nov 2021 00:02:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02S2B072277; Fri, 19 Nov 2021 00:02:28 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:28 GMT Message-Id: <202111190002.1AJ02S2B072277@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: d005c4c6de6b - stable/13 - LinuxKPI: dma-mapping.h unify "mask" and "dma_mask" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d005c4c6de6b314d6e83811c01df035bd5d511fc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d005c4c6de6b314d6e83811c01df035bd5d511fc commit d005c4c6de6b314d6e83811c01df035bd5d511fc Author: Bjoern A. Zeeb AuthorDate: 2021-09-27 20:48:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:24 +0000 LinuxKPI: dma-mapping.h unify "mask" and "dma_mask" In some places we are using "mask" and others "dma_mask" for the same thing. Harmonize the various places to "dma_mask" as used in linux_pci.c. For the declaration remove the argument names to avoid the entire problem. This is in preparation for an upcoming change. No functional changes intended. Sponsored by: The FreeBSD Foundation (cherry picked from commit 72c89ce97ba3f023463930578c6df7f0374cbf17) --- sys/compat/linuxkpi/common/include/linux/dma-mapping.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h index 5b5bc9e90815..554d4bd4e695 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h @@ -91,7 +91,7 @@ struct dma_map_ops { #define DMA_BIT_MASK(n) ((2ULL << ((n) - 1)) - 1ULL) -int linux_dma_tag_init(struct device *dev, u64 mask); +int linux_dma_tag_init(struct device *, u64); void *linux_dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag); dma_addr_t linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len); @@ -104,7 +104,7 @@ void linux_dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sg, unsigned long attrs __unused); static inline int -dma_supported(struct device *dev, u64 mask) +dma_supported(struct device *dev, u64 dma_mask) { /* XXX busdma takes care of this elsewhere. */ @@ -122,23 +122,23 @@ dma_set_mask(struct device *dev, u64 dma_mask) } static inline int -dma_set_coherent_mask(struct device *dev, u64 mask) +dma_set_coherent_mask(struct device *dev, u64 dma_mask) { - if (!dma_supported(dev, mask)) + if (!dma_supported(dev, dma_mask)) return -EIO; /* XXX Currently we don't support a separate coherent mask. */ return 0; } static inline int -dma_set_mask_and_coherent(struct device *dev, u64 mask) +dma_set_mask_and_coherent(struct device *dev, u64 dma_mask) { int r; - r = dma_set_mask(dev, mask); + r = dma_set_mask(dev, dma_mask); if (r == 0) - dma_set_coherent_mask(dev, mask); + dma_set_coherent_mask(dev, dma_mask); return (r); } From nobody Fri Nov 19 00:02:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 78DDB188F64A; Fri, 19 Nov 2021 00:02: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 4HwH0p28vCz4vf6; Fri, 19 Nov 2021 00:02:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2147B1E4A9; Fri, 19 Nov 2021 00:02: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 1AJ02YH0072404; Fri, 19 Nov 2021 00:02:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02Y1r072403; Fri, 19 Nov 2021 00:02:34 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:34 GMT Message-Id: <202111190002.1AJ02Y1r072403@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: ab5678c6c0d0 - stable/13 - net80211: proper ssid length check in setmlme_assoc_adhoc() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ab5678c6c0d0b28feafdb2fd397866d6088f37d8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ab5678c6c0d0b28feafdb2fd397866d6088f37d8 commit ab5678c6c0d0b28feafdb2fd397866d6088f37d8 Author: Bjoern A. Zeeb AuthorDate: 2021-10-06 18:41:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:25 +0000 net80211: proper ssid length check in setmlme_assoc_adhoc() A user supplied SSID length is used without proper checks in setmlme_assoc_adhoc() which can lead to copies beyond the end of the user supplied buffer. The ssid is a fixed size array for the ioctl and the argument to setmlme_assoc_adhoc(). In addition to an ssid_len check of 0 also error in case the ssid_len is larger than the size of the ssid array to prevent problems. PR: 254737 Reported by: Tommaso (cutesmilee.research protonmail.com) (cherry picked from commit 526370fb85db4b659cff4625eb2f379acaa4a1a8) (cherry picked from commit 0525ece3554edce14fa68a7fb61078ae2110c44b) --- sys/net80211/ieee80211_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 2fef9ac0084a..419518eb1224 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1591,7 +1591,7 @@ setmlme_assoc_adhoc(struct ieee80211vap *vap, ("expected opmode IBSS or AHDEMO not %s", ieee80211_opmode_name[vap->iv_opmode])); - if (ssid_len == 0) + if (ssid_len == 0 || ssid_len > IEEE80211_NWID_LEN) return EINVAL; sr = IEEE80211_MALLOC(sizeof(*sr), M_TEMP, From nobody Fri Nov 19 00:02:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EF152188F3FE; Fri, 19 Nov 2021 00:02: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 4HwH0k51fJz3Blt; Fri, 19 Nov 2021 00:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A10A41E53C; Fri, 19 Nov 2021 00:02: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 1AJ02TIf072308; Fri, 19 Nov 2021 00:02:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02TiS072307; Fri, 19 Nov 2021 00:02:29 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:29 GMT Message-Id: <202111190002.1AJ02TiS072307@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: 37b2cf4e6a97 - stable/13 - LinuxKPI: implement dma_set_coherent_mask() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 37b2cf4e6a978dbea35009e361dfecab8efc0775 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=37b2cf4e6a978dbea35009e361dfecab8efc0775 commit 37b2cf4e6a978dbea35009e361dfecab8efc0775 Author: Bjoern A. Zeeb AuthorDate: 2021-09-27 22:50:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:24 +0000 LinuxKPI: implement dma_set_coherent_mask() Coherent is lower 32bit only by default in Linux and our only default dma mask is 64bit currently which violates expectations unless dma_set_coherent_mask() was called explicitly with a different mask. Implement coherent by creating a second tag, and storing the tags in the objects and use the tag from the object wherever possible. This currently does not update the scatterlist or pool (both could be converted but S/G cannot be MFCed as easily). There is a 2nd change embedded in the updated logic of linux_dma_alloc_coherent() to always zero the allocation as otherwise some drivers get cranky on uninialised garbage. Sponsored by: The FreeBSD Foundation (cherry picked from commit c39eefe715b3c835ce3d91a1c1932197c23c1f3c) (cherry picked from commit 1269873159c7fa0db3b9dbf8dadc54eec5dc0d58) --- .../linuxkpi/common/include/linux/dma-mapping.h | 7 +- sys/compat/linuxkpi/common/src/linux_pci.c | 194 +++++++++++++-------- 2 files changed, 129 insertions(+), 72 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h index 554d4bd4e695..c86a24d1270a 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h @@ -92,6 +92,7 @@ struct dma_map_ops { #define DMA_BIT_MASK(n) ((2ULL << ((n) - 1)) - 1ULL) int linux_dma_tag_init(struct device *, u64); +int linux_dma_tag_init_coherent(struct device *, u64); void *linux_dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag); dma_addr_t linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len); @@ -125,10 +126,10 @@ static inline int dma_set_coherent_mask(struct device *dev, u64 dma_mask) { - if (!dma_supported(dev, dma_mask)) + if (!dev->dma_priv || !dma_supported(dev, dma_mask)) return -EIO; - /* XXX Currently we don't support a separate coherent mask. */ - return 0; + + return (linux_dma_tag_init_coherent(dev, dma_mask)); } static inline int diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index c8f473205ede..780ba38d18dd 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -110,13 +110,31 @@ static device_method_t pci_methods[] = { struct linux_dma_priv { uint64_t dma_mask; - struct mtx lock; bus_dma_tag_t dmat; + uint64_t dma_coherent_mask; + bus_dma_tag_t dmat_coherent; + struct mtx lock; struct pctrie ptree; }; #define DMA_PRIV_LOCK(priv) mtx_lock(&(priv)->lock) #define DMA_PRIV_UNLOCK(priv) mtx_unlock(&(priv)->lock) +static int +linux_pdev_dma_uninit(struct pci_dev *pdev) +{ + struct linux_dma_priv *priv; + + priv = pdev->dev.dma_priv; + if (priv->dmat) + bus_dma_tag_destroy(priv->dmat); + if (priv->dmat_coherent) + bus_dma_tag_destroy(priv->dmat_coherent); + mtx_destroy(&priv->lock); + pdev->dev.dma_priv = NULL; + free(priv, M_DEVBUF); + return (0); +} + static int linux_pdev_dma_init(struct pci_dev *pdev) { @@ -124,34 +142,26 @@ linux_pdev_dma_init(struct pci_dev *pdev) int error; priv = malloc(sizeof(*priv), M_DEVBUF, M_WAITOK | M_ZERO); - pdev->dev.dma_priv = priv; mtx_init(&priv->lock, "lkpi-priv-dma", NULL, MTX_DEF); - pctrie_init(&priv->ptree); - /* create a default DMA tag */ + pdev->dev.dma_priv = priv; + + /* Create a default DMA tags. */ error = linux_dma_tag_init(&pdev->dev, DMA_BIT_MASK(64)); - if (error) { - mtx_destroy(&priv->lock); - free(priv, M_DEVBUF); - pdev->dev.dma_priv = NULL; - } - return (error); -} + if (error != 0) + goto err; + /* Coherent is lower 32bit only by default in Linux. */ + error = linux_dma_tag_init_coherent(&pdev->dev, DMA_BIT_MASK(32)); + if (error != 0) + goto err; -static int -linux_pdev_dma_uninit(struct pci_dev *pdev) -{ - struct linux_dma_priv *priv; + return (error); - priv = pdev->dev.dma_priv; - if (priv->dmat) - bus_dma_tag_destroy(priv->dmat); - mtx_destroy(&priv->lock); - free(priv, M_DEVBUF); - pdev->dev.dma_priv = NULL; - return (0); +err: + linux_pdev_dma_uninit(pdev); + return (error); } int @@ -185,6 +195,37 @@ linux_dma_tag_init(struct device *dev, u64 dma_mask) return (-error); } +int +linux_dma_tag_init_coherent(struct device *dev, u64 dma_mask) +{ + struct linux_dma_priv *priv; + int error; + + priv = dev->dma_priv; + + if (priv->dmat_coherent) { + if (priv->dma_coherent_mask == dma_mask) + return (0); + + bus_dma_tag_destroy(priv->dmat_coherent); + } + + priv->dma_coherent_mask = dma_mask; + + error = bus_dma_tag_create(bus_get_dma_tag(dev->bsddev), + 1, 0, /* alignment, boundary */ + dma_mask, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filtfunc, filtfuncarg */ + BUS_SPACE_MAXSIZE, /* maxsize */ + 1, /* nsegments */ + BUS_SPACE_MAXSIZE, /* maxsegsz */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockfuncarg */ + &priv->dmat_coherent); + return (-error); +} + static struct pci_driver * linux_pci_find(device_t dev, const struct pci_device_id **idp) { @@ -723,6 +764,7 @@ struct linux_dma_obj { void *vaddr; uint64_t dma_addr; bus_dmamap_t dmamap; + bus_dma_tag_t dmat; }; static uma_zone_t linux_dma_trie_zone; @@ -768,44 +810,10 @@ linux_dma_trie_free(struct pctrie *ptree, void *node) PCTRIE_DEFINE(LINUX_DMA, linux_dma_obj, dma_addr, linux_dma_trie_alloc, linux_dma_trie_free); -void * -linux_dma_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, gfp_t flag) -{ - struct linux_dma_priv *priv; - vm_paddr_t high; - size_t align; - void *mem; - - if (dev == NULL || dev->dma_priv == NULL) { - *dma_handle = 0; - return (NULL); - } - priv = dev->dma_priv; - if (priv->dma_mask) - high = priv->dma_mask; - else if (flag & GFP_DMA32) - high = BUS_SPACE_MAXADDR_32BIT; - else - high = BUS_SPACE_MAXADDR; - align = PAGE_SIZE << get_order(size); - mem = (void *)kmem_alloc_contig(size, flag & GFP_NATIVE_MASK, 0, high, - align, 0, VM_MEMATTR_DEFAULT); - if (mem != NULL) { - *dma_handle = linux_dma_map_phys(dev, vtophys(mem), size); - if (*dma_handle == 0) { - kmem_free((vm_offset_t)mem, size); - mem = NULL; - } - } else { - *dma_handle = 0; - } - return (mem); -} - #if defined(__i386__) || defined(__amd64__) || defined(__aarch64__) -dma_addr_t -linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len) +static dma_addr_t +linux_dma_map_phys_common(struct device *dev, vm_paddr_t phys, size_t len, + bus_dma_tag_t dmat) { struct linux_dma_priv *priv; struct linux_dma_obj *obj; @@ -820,25 +828,26 @@ linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len) * bus_dma API. This avoids tracking collisions in the pctrie * with the additional benefit of reducing overhead. */ - if (bus_dma_id_mapped(priv->dmat, phys, len)) + if (bus_dma_id_mapped(dmat, phys, len)) return (phys); obj = uma_zalloc(linux_dma_obj_zone, M_NOWAIT); if (obj == NULL) { return (0); } + obj->dmat = dmat; DMA_PRIV_LOCK(priv); - if (bus_dmamap_create(priv->dmat, 0, &obj->dmamap) != 0) { + if (bus_dmamap_create(obj->dmat, 0, &obj->dmamap) != 0) { DMA_PRIV_UNLOCK(priv); uma_zfree(linux_dma_obj_zone, obj); return (0); } nseg = -1; - if (_bus_dmamap_load_phys(priv->dmat, obj->dmamap, phys, len, + if (_bus_dmamap_load_phys(obj->dmat, obj->dmamap, phys, len, BUS_DMA_NOWAIT, &seg, &nseg) != 0) { - bus_dmamap_destroy(priv->dmat, obj->dmamap); + bus_dmamap_destroy(obj->dmat, obj->dmamap); DMA_PRIV_UNLOCK(priv); uma_zfree(linux_dma_obj_zone, obj); return (0); @@ -849,8 +858,8 @@ linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len) error = LINUX_DMA_PCTRIE_INSERT(&priv->ptree, obj); if (error != 0) { - bus_dmamap_unload(priv->dmat, obj->dmamap); - bus_dmamap_destroy(priv->dmat, obj->dmamap); + bus_dmamap_unload(obj->dmat, obj->dmamap); + bus_dmamap_destroy(obj->dmat, obj->dmamap); DMA_PRIV_UNLOCK(priv); uma_zfree(linux_dma_obj_zone, obj); return (0); @@ -859,13 +868,23 @@ linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len) return (obj->dma_addr); } #else -dma_addr_t -linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len) +static dma_addr_t +linux_dma_map_phys_common(struct device *dev __unused, vm_paddr_t phys, + size_t len __unused, bus_dma_tag_t dmat __unused) { return (phys); } #endif +dma_addr_t +linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len) +{ + struct linux_dma_priv *priv; + + priv = dev->dma_priv; + return (linux_dma_map_phys_common(dev, phys, len, priv->dmat)); +} + #if defined(__i386__) || defined(__amd64__) || defined(__aarch64__) void linux_dma_unmap(struct device *dev, dma_addr_t dma_addr, size_t len) @@ -885,8 +904,8 @@ linux_dma_unmap(struct device *dev, dma_addr_t dma_addr, size_t len) return; } LINUX_DMA_PCTRIE_REMOVE(&priv->ptree, dma_addr); - bus_dmamap_unload(priv->dmat, obj->dmamap); - bus_dmamap_destroy(priv->dmat, obj->dmamap); + bus_dmamap_unload(obj->dmat, obj->dmamap); + bus_dmamap_destroy(obj->dmat, obj->dmamap); DMA_PRIV_UNLOCK(priv); uma_zfree(linux_dma_obj_zone, obj); @@ -898,6 +917,43 @@ linux_dma_unmap(struct device *dev, dma_addr_t dma_addr, size_t len) } #endif +void * +linux_dma_alloc_coherent(struct device *dev, size_t size, + dma_addr_t *dma_handle, gfp_t flag) +{ + struct linux_dma_priv *priv; + vm_paddr_t high; + size_t align; + void *mem; + + if (dev == NULL || dev->dma_priv == NULL) { + *dma_handle = 0; + return (NULL); + } + priv = dev->dma_priv; + if (priv->dma_coherent_mask) + high = priv->dma_coherent_mask; + else + /* Coherent is lower 32bit only by default in Linux. */ + high = BUS_SPACE_MAXADDR_32BIT; + align = PAGE_SIZE << get_order(size); + /* Always zero the allocation. */ + flag |= M_ZERO; + mem = (void *)kmem_alloc_contig(size, flag & GFP_NATIVE_MASK, 0, high, + align, 0, VM_MEMATTR_DEFAULT); + if (mem != NULL) { + *dma_handle = linux_dma_map_phys_common(dev, vtophys(mem), size, + priv->dmat_coherent); + if (*dma_handle == 0) { + kmem_free((vm_offset_t)mem, size); + mem = NULL; + } + } else { + *dma_handle = 0; + } + return (mem); +} + int linux_dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir __unused, unsigned long attrs __unused) From nobody Fri Nov 19 00:02:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D9F76188F47C; Fri, 19 Nov 2021 00:02: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 4HwH0r4HY2z3BmQ; Fri, 19 Nov 2021 00:02:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B2C31E4AA; Fri, 19 Nov 2021 00:02: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 1AJ02ZPF072432; Fri, 19 Nov 2021 00:02:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02Z4x072431; Fri, 19 Nov 2021 00:02:35 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:35 GMT Message-Id: <202111190002.1AJ02Z4x072431@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: 32c2c00e3f90 - stable/13 - net80211: correct length check in ieee80211_ies_expand() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 32c2c00e3f90d3a01a03ebdf7131c7e300da034c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=32c2c00e3f90d3a01a03ebdf7131c7e300da034c commit 32c2c00e3f90d3a01a03ebdf7131c7e300da034c Author: Bjoern A. Zeeb AuthorDate: 2021-10-06 18:09:39 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:25 +0000 net80211: correct length check in ieee80211_ies_expand() In ieee80211_ies_expand() we are looping over Elements (also known as Information Elements or IEs). The comment suggests that we assume well-formedness of the IEs themselves. Checking the buffer length being least 2 (1 byte Element ID and 1 byte Length fields) rather than just 1 before accessing ie[1] is still good practise and can prevent and out-of-bounds read in case the input is not behaving according to the comment. Reported by: (coypu sdf.org) admbugs: 857 (cherry picked from commit 09dd08f167812a5fdb516fc98f14dbb43221432f) --- sys/net80211/ieee80211_node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 5a9677836dbd..3ddb82343efe 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1133,7 +1133,7 @@ ieee80211_ies_expand(struct ieee80211_ies *ies) ie = ies->data; ielen = ies->len; - while (ielen > 0) { + while (ielen > 1) { switch (ie[0]) { case IEEE80211_ELEMID_VENDOR: if (iswpaoui(ie)) From nobody Fri Nov 19 00:02:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 17250188F6EA; Fri, 19 Nov 2021 00:02: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 4HwH0s4gFDz3BpR; Fri, 19 Nov 2021 00:02:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74E6A1E59C; Fri, 19 Nov 2021 00:02: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 1AJ02afm072458; Fri, 19 Nov 2021 00:02:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02aLk072457; Fri, 19 Nov 2021 00:02:36 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:36 GMT Message-Id: <202111190002.1AJ02aLk072457@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: 8a5ff0163853 - stable/13 - net80211: correct input_sta length checks and control frame 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8a5ff0163853a4ccda3aaf5bbce33dfc6bbff4b8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8a5ff0163853a4ccda3aaf5bbce33dfc6bbff4b8 commit 8a5ff0163853a4ccda3aaf5bbce33dfc6bbff4b8 Author: Bjoern A. Zeeb AuthorDate: 2021-09-30 16:41:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:25 +0000 net80211: correct input_sta length checks and control frame handling Correct input_sta "assertion" checks. CTS/ACK CTRL frames are shorter then sizeof(struct ieee80211_frame_min) and were thus running into the is_rx_tooshort error case. Use ieee80211_anyhdrsize() to handle this better but make sure we do at least have the first 2 octets needed for that. While here move the safety checks before any code which may not obey them later, just for good style. The non-scanning check further down assumes a frame format also not matching control frames. For now skip the checks for control frames which allows us to deal with some of them at least now. Sponsored by: The FreeBSD Foundation Obtained from: 20210906 wireless v0.91 code drop (cherry picked from commit 3dc7a1897e0bb9e4b529c01cb3f88e1c387af5e8) --- sys/net80211/ieee80211_sta.c | 66 +++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index cd62266ab942..7ea6187332b1 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -552,6 +552,35 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, int is_hw_decrypted = 0; int has_decrypted = 0; + KASSERT(ni != NULL, ("%s: null node, mbuf %p", __func__, m)); + + /* Early init in case of early error case. */ + type = -1; + + /* + * Bit of a cheat here, we use a pointer for a 3-address + * frame format but don't reference fields past outside + * ieee80211_frame_min (or other shorter frames) w/o first + * validating the data is present. + */ + wh = mtod(m, struct ieee80211_frame *); + + if (m->m_pkthdr.len < 2 || m->m_pkthdr.len < ieee80211_anyhdrsize(wh)) { + IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, + ni->ni_macaddr, NULL, + "too short (1): len %u", m->m_pkthdr.len); + vap->iv_stats.is_rx_tooshort++; + goto err; + } + if ((wh->i_fc[0] & IEEE80211_FC0_VERSION_MASK) != + IEEE80211_FC0_VERSION_0) { + IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, + ni->ni_macaddr, NULL, "wrong version, fc %02x:%02x", + wh->i_fc[0], wh->i_fc[1]); + vap->iv_stats.is_rx_badversion++; + goto err; + } + /* * Some devices do hardware decryption all the way through * to pretending the frame wasn't encrypted in the first place. @@ -569,7 +598,6 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, * with the M_AMPDU_MPDU flag and we can bypass most of * the normal processing. */ - wh = mtod(m, struct ieee80211_frame *); type = IEEE80211_FC0_TYPE_DATA; dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK; subtype = IEEE80211_FC0_SUBTYPE_QOS; @@ -577,39 +605,19 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, goto resubmit_ampdu; } - KASSERT(ni != NULL, ("null node")); ni->ni_inact = ni->ni_inact_reload; - type = -1; /* undefined */ - - if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) { - IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, - ni->ni_macaddr, NULL, - "too short (1): len %u", m->m_pkthdr.len); - vap->iv_stats.is_rx_tooshort++; - goto out; - } - /* - * Bit of a cheat here, we use a pointer for a 3-address - * frame format but don't reference fields past outside - * ieee80211_frame_min w/o first validating the data is - * present. - */ - wh = mtod(m, struct ieee80211_frame *); - - if ((wh->i_fc[0] & IEEE80211_FC0_VERSION_MASK) != - IEEE80211_FC0_VERSION_0) { - IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, - ni->ni_macaddr, NULL, "wrong version, fc %02x:%02x", - wh->i_fc[0], wh->i_fc[1]); - vap->iv_stats.is_rx_badversion++; - goto err; - } - dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK; type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; - if ((ic->ic_flags & IEEE80211_F_SCAN) == 0) { + /* + * Control frames are not folowing the header scheme of data and mgmt + * frames so we do not apply extra checks here. + * We probably should do checks on RA (+TA) where available for those + * too, but for now do not drop them. + */ + if (type != IEEE80211_FC0_TYPE_CTL && + (ic->ic_flags & IEEE80211_F_SCAN) == 0) { bssid = wh->i_addr2; if (!IEEE80211_ADDR_EQ(bssid, ni->ni_bssid)) { /* not interested in */ From nobody Fri Nov 19 00:02:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1B0CB188F997; Fri, 19 Nov 2021 00:02: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 4HwH0w3Bfhz3Bpc; Fri, 19 Nov 2021 00:02:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE2C91E6E7; Fri, 19 Nov 2021 00:02: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 1AJ02cpF072506; Fri, 19 Nov 2021 00:02:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02csk072505; Fri, 19 Nov 2021 00:02:38 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:38 GMT Message-Id: <202111190002.1AJ02csk072505@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: aaf336415117 - stable/13 - LinuxKPI: add netdev_features.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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aaf336415117e128e770dee26b8227b641af1902 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=aaf336415117e128e770dee26b8227b641af1902 commit aaf336415117e128e770dee26b8227b641af1902 Author: Bjoern A. Zeeb AuthorDate: 2021-10-25 16:50:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:25 +0000 LinuxKPI: add netdev_features.h Add netdev_features.h as a spearate file from the future netdevice.h implementation to avoid include problems with a future skbuff.h. Sponsored by: The FreeBSD Foundation (cherry picked from commit 490f9d8f0e7ce8c5b268fcd0806c5e00214eb5a7) --- .../common/include/linux/netdev_features.h | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/netdev_features.h b/sys/compat/linuxkpi/common/include/linux/netdev_features.h new file mode 100644 index 000000000000..a4901f4d48c3 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/netdev_features.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2020-2021 The FreeBSD Foundation + * + * Portions of this software were 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 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. + * + * $FreeBSD$ + */ +#ifndef __LKPI_LINUX_NETDEV_FEATURES_H_ +#define __LKPI_LINUX_NETDEV_FEATURES_H_ + +#include +#include + +typedef uint32_t netdev_features_t; + +#define NETIF_F_HIGHDMA BIT(0) +#define NETIF_F_SG BIT(1) +#define NETIF_F_IP_CSUM BIT(2) +#define NETIF_F_IPV6_CSUM BIT(3) +#define NETIF_F_TSO BIT(4) +#define NETIF_F_TSO6 BIT(5) +#define NETIF_F_RXCSUM BIT(6) + +#define NETIF_F_CSUM_MASK (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM) + +#endif /* __LKPI_LINUX_NETDEV_FEATURES_H_ */ From nobody Fri Nov 19 00:02:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A8CFA188F82A; Fri, 19 Nov 2021 00:02: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 4HwH0v6k5mz4vnM; Fri, 19 Nov 2021 00:02:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90C931E4AB; Fri, 19 Nov 2021 00:02: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 1AJ02bRR072482; Fri, 19 Nov 2021 00:02:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02bVD072481; Fri, 19 Nov 2021 00:02:37 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:37 GMT Message-Id: <202111190002.1AJ02bVD072481@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: 6acb9d5f955b - stable/13 - net80211/drivers: improve ieee80211_rx_stats for band List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 6acb9d5f955b8b431c223be3910aa6dcacf1d457 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6acb9d5f955b8b431c223be3910aa6dcacf1d457 commit 6acb9d5f955b8b431c223be3910aa6dcacf1d457 Author: Bjoern A. Zeeb AuthorDate: 2021-06-06 21:14:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:25 +0000 net80211/drivers: improve ieee80211_rx_stats for band While IEEE80211_R_BAND was defined, there was no place to store the band. Add a field for that, adjust ieee80211_lookup_channel_rxstatus() to require it, and update drivers passing "R_{FREQ|IEEE}" in already to provide the band as well. For the moment keep the fall-back code requiring all three fields. Sponsored by: The FreeBSD Foundation (cherry picked from commit 9a6695532b3997e4e2bc3fe57481cc49be5e9e93) --- sys/dev/iwm/if_iwm.c | 5 +++++ sys/dev/rtwn/rtl8188e/r88e_rx.c | 2 ++ sys/dev/rtwn/rtl8812a/r12a_rx.c | 2 ++ sys/dev/usb/wlan/if_rsu.c | 2 ++ sys/net80211/_ieee80211.h | 3 +++ sys/net80211/ieee80211.c | 17 ++++++++++++++--- 6 files changed, 28 insertions(+), 3 deletions(-) diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index b89c895efb50..f994e8e75307 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -3303,12 +3303,15 @@ iwm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, */ bzero(&rxs, sizeof(rxs)); rxs.r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs.r_flags |= IEEE80211_R_BAND; rxs.r_flags |= IEEE80211_R_NF | IEEE80211_R_RSSI; rxs.c_ieee = le16toh(phy_info->channel); if (le16toh(phy_info->phy_flags & IWM_RX_RES_PHY_FLAGS_BAND_24)) { rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_2GHZ); + rxs.c_band = IEEE80211_CHAN_2GHZ; } else { rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_5GHZ); + rxs.c_band = IEEE80211_CHAN_5GHZ; } /* rssi is in 1/2db units */ @@ -3414,10 +3417,12 @@ iwm_rx_mpdu_mq(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, */ bzero(&rxs, sizeof(rxs)); rxs.r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs.r_flags |= IEEE80211_R_BAND; rxs.r_flags |= IEEE80211_R_NF | IEEE80211_R_RSSI; rxs.c_ieee = channel; rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, channel <= 14 ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ); + rxs.c_band = channel <= 14 ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ; /* rssi is in 1/2db units */ rxs.c_rssi = rssi * 2; diff --git a/sys/dev/rtwn/rtl8188e/r88e_rx.c b/sys/dev/rtwn/rtl8188e/r88e_rx.c index dad1bc56446a..16510839bd44 100644 --- a/sys/dev/rtwn/rtl8188e/r88e_rx.c +++ b/sys/dev/rtwn/rtl8188e/r88e_rx.c @@ -240,8 +240,10 @@ r88e_get_rx_stats(struct rtwn_softc *sc, struct ieee80211_rx_stats *rxs, if (!sc->sc_ht40) { /* XXX center channel */ rxs->r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs->r_flags |= IEEE80211_R_BAND; rxs->c_ieee = physt->chan; rxs->c_freq = ieee80211_ieee2mhz(rxs->c_ieee, IEEE80211_CHAN_2GHZ); + rxs->c_band = IEEE80211_CHAN_2GHZ; } } diff --git a/sys/dev/rtwn/rtl8812a/r12a_rx.c b/sys/dev/rtwn/rtl8812a/r12a_rx.c index d8dcb3de12c5..98e0cabdff7c 100644 --- a/sys/dev/rtwn/rtl8812a/r12a_rx.c +++ b/sys/dev/rtwn/rtl8812a/r12a_rx.c @@ -321,8 +321,10 @@ r12a_get_rx_stats(struct rtwn_softc *sc, struct ieee80211_rx_stats *rxs, */ #if 0 rxs->r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs->r_flags |= IEEE80211_R_BAND; rxs->c_ieee = MS(le16toh(physt->phyw1), R12A_PHYW1_CHAN); rxs->c_freq = ieee80211_ieee2mhz(rxs->c_ieee, (rxs->c_ieee < 36) ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ); + rxs->c_band = (rxs->c_ieee < 36) ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ; #endif } diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c index f2dc6657026e..ff0ec77b476c 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -2081,9 +2081,11 @@ rsu_event_survey(struct rsu_softc *sc, uint8_t *buf, int len) /* Set channel flags for input path */ bzero(&rxs, sizeof(rxs)); rxs.r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs.r_flags |= IEEE80211_R_BAND; rxs.r_flags |= IEEE80211_R_NF | IEEE80211_R_RSSI; rxs.c_ieee = le32toh(bss->config.dsconfig); rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_2GHZ); + rxs.c_band = IEEE80211_CHAN_2GHZ; /* This is a number from 0..100; so let's just divide it down a bit */ rxs.c_rssi = le32toh(bss->rssi) / 2; rxs.c_nf = -96; diff --git a/sys/net80211/_ieee80211.h b/sys/net80211/_ieee80211.h index dc6773afac09..754e4647e82f 100644 --- a/sys/net80211/_ieee80211.h +++ b/sys/net80211/_ieee80211.h @@ -612,6 +612,9 @@ struct ieee80211_rx_stats { uint8_t c_ieee; /* Channel */ uint8_t c_width; /* channel width, FW flags above */ + /* 32 bits */ + uint32_t c_band; /* Band; XXX we do not have a real band. */ + /* Force alignment to DWORD */ union { uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 2e98e67edc47..35cf7abdbf3b 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -1818,6 +1818,8 @@ ieee80211_lookup_channel_rxstatus(struct ieee80211vap *vap, return (NULL); if ((rxs->r_flags & IEEE80211_R_IEEE) == 0) return (NULL); + if ((rxs->r_flags & IEEE80211_R_BAND) == 0) + return (NULL); /* * If the rx status contains a valid ieee/freq, then @@ -1828,11 +1830,20 @@ ieee80211_lookup_channel_rxstatus(struct ieee80211vap *vap, */ /* Determine a band */ - /* XXX should be done by the driver? */ - if (rxs->c_freq < 3000) { + switch (rxs->c_band) { + case IEEE80211_CHAN_2GHZ: flags = IEEE80211_CHAN_G; - } else { + break; + case IEEE80211_CHAN_5GHZ: flags = IEEE80211_CHAN_A; + break; + default: + if (rxs->c_freq < 3000) { + flags = IEEE80211_CHAN_G; + } else { + flags = IEEE80211_CHAN_A; + } + break; } /* Channel lookup */ From nobody Fri Nov 19 00:02:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1D094188F762; Fri, 19 Nov 2021 00:02: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 4HwH0w3TNwz3Brr; Fri, 19 Nov 2021 00:02:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C60E11E705; Fri, 19 Nov 2021 00:02: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 1AJ02d06072530; Fri, 19 Nov 2021 00:02:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02dXt072529; Fri, 19 Nov 2021 00:02:39 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:39 GMT Message-Id: <202111190002.1AJ02dXt072529@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: dc70c937b1d6 - stable/13 - LinuxKPI: pci.h / linux_pci.c rename pci_driver 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dc70c937b1d6972d8774cea69da7983bb447622c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=dc70c937b1d6972d8774cea69da7983bb447622c commit dc70c937b1d6972d8774cea69da7983bb447622c Author: Bjoern A. Zeeb AuthorDate: 2021-10-25 17:15:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:26 +0000 LinuxKPI: pci.h / linux_pci.c rename pci_driver field Rename the struct pci_driver {} field to the list_head from links to node as a driver is actually initialsing this to {} which seems questionable but it will at least make us match the Linux structure field name. Reviewed by: manu, hselasky (cherry picked from commit cf899348420ce8839e32ddc30247b5d1c2b384f4) --- sys/compat/linuxkpi/common/include/linux/pci.h | 2 +- sys/compat/linuxkpi/common/src/linux_pci.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 4914bc247ebc..b2b87f993c1f 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -193,7 +193,7 @@ typedef int pci_power_t; struct pci_dev; struct pci_driver { - struct list_head links; + struct list_head node; char *name; const struct pci_device_id *id_table; int (*probe)(struct pci_dev *dev, const struct pci_device_id *id); diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 780ba38d18dd..db94bc08239e 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -242,7 +242,7 @@ linux_pci_find(device_t dev, const struct pci_device_id **idp) subdevice = pci_get_subdevice(dev); spin_lock(&pci_lock); - list_for_each_entry(pdrv, &pci_drivers, links) { + list_for_each_entry(pdrv, &pci_drivers, node) { for (id = pdrv->id_table; id->vendor != 0; id++) { if (vendor == id->vendor && (PCI_ANY_ID == id->device || device == id->device) && @@ -640,7 +640,7 @@ _linux_pci_register_driver(struct pci_driver *pdrv, devclass_t dc) linux_set_current(curthread); spin_lock(&pci_lock); - list_add(&pdrv->links, &pci_drivers); + list_add(&pdrv->node, &pci_drivers); spin_unlock(&pci_lock); pdrv->bsddriver.name = pdrv->name; pdrv->bsddriver.methods = pci_methods; @@ -734,7 +734,7 @@ linux_pci_unregister_driver(struct pci_driver *pdrv) bus = devclass_find("pci"); spin_lock(&pci_lock); - list_del(&pdrv->links); + list_del(&pdrv->node); spin_unlock(&pci_lock); mtx_lock(&Giant); if (bus != NULL) @@ -750,7 +750,7 @@ linux_pci_unregister_drm_driver(struct pci_driver *pdrv) bus = devclass_find("vgapci"); spin_lock(&pci_lock); - list_del(&pdrv->links); + list_del(&pdrv->node); spin_unlock(&pci_lock); mtx_lock(&Giant); if (bus != NULL) From nobody Fri Nov 19 00:02:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8C36B188FA81; Fri, 19 Nov 2021 00:02: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 4HwH0z20Kyz3Bmn; Fri, 19 Nov 2021 00:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 111E61E2D5; Fri, 19 Nov 2021 00:02: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 1AJ02f8k072584; Fri, 19 Nov 2021 00:02:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02f1T072583; Fri, 19 Nov 2021 00:02:41 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:41 GMT Message-Id: <202111190002.1AJ02f1T072583@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: 378083e18812 - stable/13 - mlx4: rename conflicting netdev_priv() to mlx4_netdev_priv() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 378083e18812e0a3537887cbab5a51a573cde802 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=378083e18812e0a3537887cbab5a51a573cde802 commit 378083e18812e0a3537887cbab5a51a573cde802 Author: Bjoern A. Zeeb AuthorDate: 2021-10-25 16:18:11 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:26 +0000 mlx4: rename conflicting netdev_priv() to mlx4_netdev_priv() netdev_priv() is a LinuxKPI function which was used with the old ifnet linux/netdevice.h implementation which was not adaptable to modern Linux drviers unless rewriting them for ifnet in first place which defeats the purpose. Rename the netdev_priv() calls in mlx4 to mlx4_netdev_priv() returning the ifnet softc to avoid conflicting symbol names with different implementations in the future. (cherry picked from commit 9d593d5a76f22a315d7c6ab99e5e76003ec2b3f5) --- sys/dev/mlx4/mlx4_en/en.h | 13 ++++++++++--- sys/dev/mlx4/mlx4_en/mlx4_en_main.c | 2 +- sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c | 34 +++++++++++++++++----------------- sys/dev/mlx4/mlx4_en/mlx4_en_port.c | 8 ++++---- sys/dev/mlx4/mlx4_en/mlx4_en_rx.c | 6 +++--- sys/dev/mlx4/mlx4_en/mlx4_en_tx.c | 16 ++++++++-------- sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c | 2 +- 7 files changed, 44 insertions(+), 37 deletions(-) diff --git a/sys/dev/mlx4/mlx4_en/en.h b/sys/dev/mlx4/mlx4_en/en.h index 4a8b4fbd5fd4..440b9a340221 100644 --- a/sys/dev/mlx4/mlx4_en/en.h +++ b/sys/dev/mlx4/mlx4_en/en.h @@ -39,13 +39,20 @@ #include #include #include -#include #include #include #ifdef CONFIG_MLX4_EN_DCB #include #endif +#include +#include + +#include +#include +#include +#include + #include #include #include @@ -655,7 +662,7 @@ struct mlx4_mac_entry { }; static inline void * -netdev_priv(const struct ifnet *dev) +mlx4_netdev_priv(const struct ifnet *dev) { return (dev->if_softc); } @@ -710,7 +717,7 @@ static inline bool mlx4_en_cq_lock_poll(struct mlx4_en_cq *cq) spin_lock_bh(&cq->poll_lock); if ((cq->state & MLX4_CQ_LOCKED)) { struct ifnet *dev = cq->dev; - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_rx_ring *rx_ring = priv->rx_ring[cq->ring]; cq->state |= MLX4_EN_CQ_STATE_POLL_YIELD; diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_main.c b/sys/dev/mlx4/mlx4_en/mlx4_en_main.c index fe3adfe9c162..e328fb228982 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_main.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_main.c @@ -119,7 +119,7 @@ static void mlx4_en_event(struct mlx4_dev *dev, void *endev_ptr, case MLX4_DEV_EVENT_PORT_DOWN: if (!mdev->pndev[port]) return; - priv = netdev_priv(mdev->pndev[port]); + priv = mlx4_netdev_priv(mdev->pndev[port]); /* To prevent races, we poll the link state in a separate task rather than changing it here */ priv->link_state = event; diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c b/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c index 672affcce623..14289cb20e13 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c @@ -65,7 +65,7 @@ static int mlx4_en_low_latency_recv(struct napi_struct *napi) { struct mlx4_en_cq *cq = container_of(napi, struct mlx4_en_cq, napi); struct ifnet *dev = cq->dev; - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_rx_ring *rx_ring = priv->rx_ring[cq->ring]; int done; @@ -291,7 +291,7 @@ static int mlx4_en_filter_rfs(struct ifnet *net_dev, const struct sk_buff *skb, u16 rxq_index, u32 flow_id) { - struct mlx4_en_priv *priv = netdev_priv(net_dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(net_dev); struct mlx4_en_filter *filter; const struct iphdr *ip; const __be16 *ports; @@ -402,7 +402,7 @@ static void mlx4_en_filter_rfs_expire(struct mlx4_en_priv *priv) static void mlx4_en_vlan_rx_add_vid(void *arg, struct ifnet *dev, u16 vid) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; int err; int idx; @@ -429,7 +429,7 @@ static void mlx4_en_vlan_rx_add_vid(void *arg, struct ifnet *dev, u16 vid) static void mlx4_en_vlan_rx_kill_vid(void *arg, struct ifnet *dev, u16 vid) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; int err; @@ -608,7 +608,7 @@ static void mlx4_en_put_qp(struct mlx4_en_priv *priv) static void mlx4_en_clear_uclist(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_addr_list *tmp, *uc_to_del; list_for_each_entry_safe(uc_to_del, tmp, &priv->uc_list, list) { @@ -637,7 +637,7 @@ static u_int mlx4_copy_addr(void *arg, struct sockaddr_dl *sdl, u_int cnt) static void mlx4_en_cache_uclist(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); mlx4_en_clear_uclist(dev); if_foreach_lladdr(dev, mlx4_copy_addr, priv); @@ -645,7 +645,7 @@ static void mlx4_en_cache_uclist(struct ifnet *dev) static void mlx4_en_clear_mclist(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_addr_list *tmp, *mc_to_del; list_for_each_entry_safe(mc_to_del, tmp, &priv->mc_list, list) { @@ -673,7 +673,7 @@ static u_int mlx4_copy_maddr(void *arg, struct sockaddr_dl *sdl, u_int count) static void mlx4_en_cache_mclist(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); mlx4_en_clear_mclist(dev); if_foreach_llmaddr(dev, mlx4_copy_maddr, priv); @@ -730,7 +730,7 @@ static void update_addr_list_flags(struct mlx4_en_priv *priv, static void mlx4_en_set_rx_mode(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); if (!priv->port_up) return; @@ -1260,7 +1260,7 @@ static void mlx4_en_linkstate(struct work_struct *work) int mlx4_en_start_port(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_cq *cq; struct mlx4_en_tx_ring *tx_ring; @@ -1453,7 +1453,7 @@ cq_err: void mlx4_en_stop_port(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_addr_list *addr_list, *tmp; int i; @@ -1603,7 +1603,7 @@ reset: static void mlx4_en_clear_stats(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; int i; @@ -1762,7 +1762,7 @@ struct en_port_attribute en_port_attr_##_name = __ATTR(_name, _mode, _show, _sto void mlx4_en_destroy_netdev(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; en_dbg(DRV, priv, "Destroying netdev on port:%d\n", priv->port); @@ -1817,7 +1817,7 @@ void mlx4_en_destroy_netdev(struct ifnet *dev) static int mlx4_en_change_mtu(struct ifnet *dev, int new_mtu) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; int err = 0; @@ -2353,7 +2353,7 @@ out: static int mlx4_en_set_ring_size(struct ifnet *dev, int rx_size, int tx_size) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; int port_up = 0; int err = 0; @@ -2427,7 +2427,7 @@ static int mlx4_en_set_tx_ring_size(SYSCTL_HANDLER_ARGS) static int mlx4_en_get_module_info(struct ifnet *dev, struct ethtool_modinfo *modinfo) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; int ret; u8 data[4]; @@ -2475,7 +2475,7 @@ static int mlx4_en_get_module_eeprom(struct ifnet *dev, struct ethtool_eeprom *ee, u8 *data) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; int offset = ee->offset; int i = 0, ret; diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_port.c b/sys/dev/mlx4/mlx4_en/mlx4_en_port.c index 9a0edac109f4..2e19130b9e96 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_port.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_port.c @@ -74,7 +74,7 @@ int mlx4_SET_VLAN_FLTR(struct mlx4_dev *dev, struct mlx4_en_priv *priv) int mlx4_en_QUERY_PORT(struct mlx4_en_dev *mdev, u8 port) { struct mlx4_en_query_port_context *qport_context; - struct mlx4_en_priv *priv = netdev_priv(mdev->pndev[port]); + struct mlx4_en_priv *priv = mlx4_netdev_priv(mdev->pndev[port]); struct mlx4_en_port_state *state = &priv->port_state; struct mlx4_cmd_mailbox *mailbox; int err; @@ -151,7 +151,7 @@ static u64 en_stats_adder(__be64 *start, __be64 *next, int num) static void mlx4_en_fold_software_stats(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_dev *mdev = priv->mdev; u64 packets, bytes; int i; @@ -188,7 +188,7 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset) struct mlx4_en_stat_out_mbox *mlx4_en_stats; struct mlx4_en_stat_out_flow_control_mbox *flowstats; struct ifnet *dev = mdev->pndev[port]; - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_vport_stats *vport_stats = &priv->vport_stats; struct mlx4_cmd_mailbox *mailbox; u64 in_mod = reset << 8 | port; @@ -436,7 +436,7 @@ out: int mlx4_en_get_vport_stats(struct mlx4_en_dev *mdev, u8 port) { - struct mlx4_en_priv *priv = netdev_priv(mdev->pndev[port]); + struct mlx4_en_priv *priv = mlx4_netdev_priv(mdev->pndev[port]); struct mlx4_counter tmp_vport_stats; struct mlx4_en_vf_stats *vf_stats = &priv->vf_stats; int err, i, counter_index; diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c b/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c index 8e7c410d1c55..56e8711c6599 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c @@ -340,7 +340,7 @@ void mlx4_en_set_num_rx_rings(struct mlx4_en_dev *mdev) void mlx4_en_calc_rx_buf(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); int eff_mtu = dev->if_mtu + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN + MLX4_NET_IP_ALIGN; @@ -737,7 +737,7 @@ mlx4_en_rss_hash(__be16 status, int udp_rss) #define CQE_FACTOR_INDEX(index, factor) (((index) << (factor)) + (factor)) int mlx4_en_process_rx_cq(struct ifnet *dev, struct mlx4_en_cq *cq, int budget) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_cqe *cqe; struct mlx4_en_rx_ring *ring = priv->rx_ring[cq->ring]; struct mlx4_en_rx_mbuf *mb_list; @@ -880,7 +880,7 @@ static int mlx4_en_poll_rx_cq(struct mlx4_en_cq *cq, int budget) void mlx4_en_rx_irq(struct mlx4_cq *mcq) { struct mlx4_en_cq *cq = container_of(mcq, struct mlx4_en_cq, mcq); - struct mlx4_en_priv *priv = netdev_priv(cq->dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(cq->dev); int done; // Shoot one within the irq context diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c b/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c index f3a41a15f8b6..34af99ae0340 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c @@ -310,7 +310,7 @@ done: int mlx4_en_free_tx_buf(struct ifnet *dev, struct mlx4_en_tx_ring *ring) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); int cnt = 0; /* Skip last polled descriptor */ @@ -347,7 +347,7 @@ mlx4_en_tx_ring_is_full(struct mlx4_en_tx_ring *ring) static int mlx4_en_process_tx_cq(struct ifnet *dev, struct mlx4_en_cq *cq) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_cq *mcq = &cq->mcq; struct mlx4_en_tx_ring *ring = priv->tx_ring[cq->ring]; struct mlx4_cqe *cqe; @@ -423,7 +423,7 @@ static int mlx4_en_process_tx_cq(struct ifnet *dev, void mlx4_en_tx_irq(struct mlx4_cq *mcq) { struct mlx4_en_cq *cq = container_of(mcq, struct mlx4_en_cq, mcq); - struct mlx4_en_priv *priv = netdev_priv(cq->dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(cq->dev); struct mlx4_en_tx_ring *ring = priv->tx_ring[cq->ring]; if (priv->port_up == 0 || !spin_trylock(&ring->comp_lock)) @@ -436,7 +436,7 @@ void mlx4_en_tx_irq(struct mlx4_cq *mcq) void mlx4_en_poll_tx_cq(unsigned long data) { struct mlx4_en_cq *cq = (struct mlx4_en_cq *) data; - struct mlx4_en_priv *priv = netdev_priv(cq->dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(cq->dev); struct mlx4_en_tx_ring *ring = priv->tx_ring[cq->ring]; u32 inflight; @@ -606,7 +606,7 @@ SYSINIT(hashrandom_init, SI_SUB_RANDOM, SI_ORDER_ANY, &hashrandom_init, NULL); u16 mlx4_en_select_queue(struct ifnet *dev, struct mbuf *mb) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); u32 rings_p_up = priv->num_tx_rings_p_up; u32 up = 0; u32 queue_index; @@ -929,7 +929,7 @@ tx_drop: static int mlx4_en_transmit_locked(struct ifnet *ifp, int tx_ind, struct mbuf *mb) { - struct mlx4_en_priv *priv = netdev_priv(ifp); + struct mlx4_en_priv *priv = mlx4_netdev_priv(ifp); struct mlx4_en_tx_ring *ring = priv->tx_ring[tx_ind]; int err = 0; @@ -954,7 +954,7 @@ mlx4_en_transmit_locked(struct ifnet *ifp, int tx_ind, struct mbuf *mb) int mlx4_en_transmit(struct ifnet *dev, struct mbuf *m) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); struct mlx4_en_tx_ring *ring; int i, err = 0; @@ -994,7 +994,7 @@ mlx4_en_transmit(struct ifnet *dev, struct mbuf *m) void mlx4_en_qflush(struct ifnet *dev) { - struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_priv *priv = mlx4_netdev_priv(dev); if (priv->port_up == 0) return; diff --git a/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c b/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c index 635040e723e2..78650726d291 100644 --- a/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c +++ b/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c @@ -148,7 +148,7 @@ static struct ifnet *mlx4_ib_get_netdev(struct ib_device *device, u8 port_num) if (upper) { struct ifnet *active; - active = bond_option_active_slave_get_rcu(netdev_priv(upper)); + active = bond_option_active_slave_get_rcu(mlx4_netdev_priv(upper)); if (active) dev = active; } From nobody Fri Nov 19 00:02:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9A65D188F930; Fri, 19 Nov 2021 00:02: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 4HwH0y0jCFz4vnW; Fri, 19 Nov 2021 00:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8A061E541; Fri, 19 Nov 2021 00:02: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 1AJ02ekg072554; Fri, 19 Nov 2021 00:02:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02eh5072553; Fri, 19 Nov 2021 00:02:40 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:40 GMT Message-Id: <202111190002.1AJ02eh5072553@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: c7fc9ca77946 - stable/13 - LinuxKPI: pci.h make pci_dev argument const for pci_{read,write}_config*() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c7fc9ca779468264028e20912f3e7cb2ff984641 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c7fc9ca779468264028e20912f3e7cb2ff984641 commit c7fc9ca779468264028e20912f3e7cb2ff984641 Author: Bjoern A. Zeeb AuthorDate: 2021-10-25 17:06:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:26 +0000 LinuxKPI: pci.h make pci_dev argument const for pci_{read,write}_config*() Make the struct pci_dev argument to the pci_{read,write}_config*() functions "const" to match the Linux definition as some drivers try to pass in a const argument which we currently fail to honor. Sponsored by: The FreeBSD Foundation (cherry picked from commit ed5600f5329fad8b167bed0a5ae8a5f60d12258e) --- sys/compat/linuxkpi/common/include/linux/pci.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index b2b87f993c1f..c6737b7b2311 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -696,7 +696,7 @@ pci_disable_link_state(struct pci_dev *pdev, uint32_t flags) } static inline int -pci_read_config_byte(struct pci_dev *pdev, int where, u8 *val) +pci_read_config_byte(const struct pci_dev *pdev, int where, u8 *val) { *val = (u8)pci_read_config(pdev->dev.bsddev, where, 1); @@ -704,7 +704,7 @@ pci_read_config_byte(struct pci_dev *pdev, int where, u8 *val) } static inline int -pci_read_config_word(struct pci_dev *pdev, int where, u16 *val) +pci_read_config_word(const struct pci_dev *pdev, int where, u16 *val) { *val = (u16)pci_read_config(pdev->dev.bsddev, where, 2); @@ -712,7 +712,7 @@ pci_read_config_word(struct pci_dev *pdev, int where, u16 *val) } static inline int -pci_read_config_dword(struct pci_dev *pdev, int where, u32 *val) +pci_read_config_dword(const struct pci_dev *pdev, int where, u32 *val) { *val = (u32)pci_read_config(pdev->dev.bsddev, where, 4); @@ -720,7 +720,7 @@ pci_read_config_dword(struct pci_dev *pdev, int where, u32 *val) } static inline int -pci_write_config_byte(struct pci_dev *pdev, int where, u8 val) +pci_write_config_byte(const struct pci_dev *pdev, int where, u8 val) { pci_write_config(pdev->dev.bsddev, where, val, 1); @@ -728,7 +728,7 @@ pci_write_config_byte(struct pci_dev *pdev, int where, u8 val) } static inline int -pci_write_config_word(struct pci_dev *pdev, int where, u16 val) +pci_write_config_word(const struct pci_dev *pdev, int where, u16 val) { pci_write_config(pdev->dev.bsddev, where, val, 2); @@ -736,7 +736,7 @@ pci_write_config_word(struct pci_dev *pdev, int where, u16 val) } static inline int -pci_write_config_dword(struct pci_dev *pdev, int where, u32 val) +pci_write_config_dword(const struct pci_dev *pdev, int where, u32 val) { pci_write_config(pdev->dev.bsddev, where, val, 4); From nobody Fri Nov 19 00:02:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B706C188F9B1; Fri, 19 Nov 2021 00:02: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 4HwH106Qd5z4vtD; Fri, 19 Nov 2021 00:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E3931E543; Fri, 19 Nov 2021 00:02: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 1AJ02i1K072632; Fri, 19 Nov 2021 00:02:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02iLv072631; Fri, 19 Nov 2021 00:02:44 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:44 GMT Message-Id: <202111190002.1AJ02iLv072631@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: a6a1ab040f95 - stable/13 - LinuxKPI: add simple_open() to fs.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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a6a1ab040f95b8bd05a2c9172f68211a166b072b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a6a1ab040f95b8bd05a2c9172f68211a166b072b commit a6a1ab040f95b8bd05a2c9172f68211a166b072b Author: Bjoern A. Zeeb AuthorDate: 2021-10-25 16:44:18 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:26 +0000 LinuxKPI: add simple_open() to fs.h Add a dummy simple_open() to fs.h as we have for other (unsupported) functions. This is needed by a wireless driver. (cherry picked from commit 41dee251ee9ead2e5c7a33b1457db5742c584354) --- sys/compat/linuxkpi/common/include/linux/fs.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h index eaf806b6732c..f1892352d598 100644 --- a/sys/compat/linuxkpi/common/include/linux/fs.h +++ b/sys/compat/linuxkpi/common/include/linux/fs.h @@ -245,6 +245,12 @@ nonseekable_open(struct inode *inode, struct file *filp) return 0; } +static inline int +simple_open(struct inode *inode, struct file *filp) +{ + return 0; +} + extern unsigned int linux_iminor(struct inode *); #define iminor(...) linux_iminor(__VA_ARGS__) From nobody Fri Nov 19 00:02:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9F5EC188F7D4; Fri, 19 Nov 2021 00:02: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 4HwH102dLXz4vnc; Fri, 19 Nov 2021 00:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3458B1E542; Fri, 19 Nov 2021 00:02: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 1AJ02htc072608; Fri, 19 Nov 2021 00:02:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02hwr072607; Fri, 19 Nov 2021 00:02:43 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:43 GMT Message-Id: <202111190002.1AJ02hwr072607@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: 009e6b6e71cb - stable/13 - LinuxKPI: module.h add MODULE_SUPPORTED_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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 009e6b6e71cbfccfd935ee456cad4e547baee678 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=009e6b6e71cbfccfd935ee456cad4e547baee678 commit 009e6b6e71cbfccfd935ee456cad4e547baee678 Author: Bjoern A. Zeeb AuthorDate: 2021-10-25 16:39:56 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:26 +0000 LinuxKPI: module.h add MODULE_SUPPORTED_DEVICE() Add a dummy MODULE_SUPPORTED_DEVICE define as we do for other MODULE_* macros. This is needed by a wireless driver. (cherry picked from commit c5eec7b57c39b1dc4a63fea115a93d8d1628ff08) --- sys/compat/linuxkpi/common/include/linux/module.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/module.h b/sys/compat/linuxkpi/common/include/linux/module.h index cd5366bc52d0..2a4fdc5a11a9 100644 --- a/sys/compat/linuxkpi/common/include/linux/module.h +++ b/sys/compat/linuxkpi/common/include/linux/module.h @@ -50,6 +50,7 @@ #define MODULE_LICENSE(name) #define MODULE_INFO(tag, info) #define MODULE_FIRMWARE(firmware) +#define MODULE_SUPPORTED_DEVICE(name) #define THIS_MODULE ((struct module *)0) From nobody Fri Nov 19 00:02:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 65A03188F94E; Fri, 19 Nov 2021 00:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwH136pnjz3Bvd; Fri, 19 Nov 2021 00:02:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83D4D1E545; Fri, 19 Nov 2021 00:02: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 1AJ02jes072656; Fri, 19 Nov 2021 00:02:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02jUv072655; Fri, 19 Nov 2021 00:02:45 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:45 GMT Message-Id: <202111190002.1AJ02jUv072655@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: 4459c162792b - stable/13 - LinuxKPI: add kstrtou8() and kstrtou8_from_user() to kernel.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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4459c162792bd50296ccaf664f86fe7b748fc81a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4459c162792bd50296ccaf664f86fe7b748fc81a commit 4459c162792bd50296ccaf664f86fe7b748fc81a Author: Bjoern A. Zeeb AuthorDate: 2021-10-22 11:04:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:26 +0000 LinuxKPI: add kstrtou8() and kstrtou8_from_user() to kernel.h Analogous to the other sized version of kstrto[u]() and kstrtobool_from_user() add the "u8" versions needed by a driver. (cherry picked from commit b382b78503b56ad6b787b995b46418db27adaa61) --- sys/compat/linuxkpi/common/include/linux/kernel.h | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 0909e7fb78f3..c67a9b8e22b0 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -396,6 +396,24 @@ kstrtouint(const char *cp, unsigned int base, unsigned int *res) return (0); } +static inline int +kstrtou8(const char *cp, unsigned int base, u8 *res) +{ + char *end; + unsigned long temp; + + *res = temp = strtoul(cp, &end, base); + + /* skip newline character, if any */ + if (*end == '\n') + end++; + if (*cp == 0 || *end != 0) + return (-EINVAL); + if (temp != (u8)temp) + return (-ERANGE); + return (0); +} + static inline int kstrtou16(const char *cp, unsigned int base, u16 *res) { @@ -487,6 +505,21 @@ kstrtobool_from_user(const char __user *s, size_t count, bool *res) return (kstrtobool(buf, res)); } +static inline int +kstrtou8_from_user(const char __user *s, size_t count, unsigned int base, + u8 *p) +{ + char buf[8] = {}; + + if (count > (sizeof(buf) - 1)) + count = (sizeof(buf) - 1); + + if (copy_from_user(buf, s, count)) + return (-EFAULT); + + return (kstrtou8(buf, base, p)); +} + #define min(x, y) ((x) < (y) ? (x) : (y)) #define max(x, y) ((x) > (y) ? (x) : (y)) From nobody Fri Nov 19 00:02:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EB260188F97D; Fri, 19 Nov 2021 00:02:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwH151GLQz3BsT; Fri, 19 Nov 2021 00:02:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8CC71E6E8; Fri, 19 Nov 2021 00:02: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 1AJ02laP072710; Fri, 19 Nov 2021 00:02:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02lH0072709; Fri, 19 Nov 2021 00:02:47 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:47 GMT Message-Id: <202111190002.1AJ02lH0072709@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: 67efa8b29930 - stable/13 - net80211: add a driver-private pointer to struct ieee80211_node List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 67efa8b29930f12dae2bf237fa7c2ce1dafbd6b1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=67efa8b29930f12dae2bf237fa7c2ce1dafbd6b1 commit 67efa8b29930f12dae2bf237fa7c2ce1dafbd6b1 Author: Bjoern A. Zeeb AuthorDate: 2021-10-31 19:08:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:27 +0000 net80211: add a driver-private pointer to struct ieee80211_node Add a void *ni_drv_data field to struct ieee80211_node that drivers can use to backtrack to their internal state from a net80211 node. Sponsored by: The FreeBSD Foundation (cherry picked from commit 917181dddf66a02958cf0a28e0c7c69e13e21af0) --- sys/net80211/ieee80211_node.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 07144fa0adb3..0e885440687c 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -260,6 +260,8 @@ struct ieee80211_node { /* U-APSD */ uint8_t ni_uapsd; /* U-APSD per-node flags matching WMM STA QoS Info field */ + void *ni_drv_data; /* driver specific */ + uint64_t ni_spare[3]; }; MALLOC_DECLARE(M_80211_NODE); From nobody Fri Nov 19 00:02:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EFC8C188FAAB; Fri, 19 Nov 2021 00:02:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwH1472KMz3Bn9; Fri, 19 Nov 2021 00:02:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A309E1E706; Fri, 19 Nov 2021 00:02: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 1AJ02khW072680; Fri, 19 Nov 2021 00:02:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02k7C072679; Fri, 19 Nov 2021 00:02:46 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:46 GMT Message-Id: <202111190002.1AJ02k7C072679@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: 9d2d8a27d017 - stable/13 - LinuxKPI: add strreplace() to string.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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9d2d8a27d017c19e685c78a9cb7c6802ea793749 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9d2d8a27d017c19e685c78a9cb7c6802ea793749 commit 9d2d8a27d017c19e685c78a9cb7c6802ea793749 Author: Bjoern A. Zeeb AuthorDate: 2021-10-22 11:00:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:26 +0000 LinuxKPI: add strreplace() to string.h Add strreplace() needed by a driver. (cherry picked from commit a5e2a27dca4bd5f4795b42ac598d4fff1c3a6eae) --- sys/compat/linuxkpi/common/include/linux/string.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index 659a48d93596..a757464bf02b 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -167,6 +167,19 @@ str_has_prefix(const char *str, const char *prefix) return (strncmp(str, prefix, len) == 0 ? len : 0); } +static inline char * +strreplace(char *str, char old, char new) +{ + char *p; + + p = strchrnul(str, old); + while (p != NULL && *p != '\0') { + *p = new; + p = strchrnul(str, old); + } + return (p); +} + static inline ssize_t strscpy(char* dst, const char* src, size_t len) { From nobody Fri Nov 19 00:02:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F0916188FA53; Fri, 19 Nov 2021 00:02:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwH160803z4vwL; Fri, 19 Nov 2021 00:02:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 096BB1E2D6; Fri, 19 Nov 2021 00:02: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 1AJ02mfL072734; Fri, 19 Nov 2021 00:02:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02meM072733; Fri, 19 Nov 2021 00:02:48 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:48 GMT Message-Id: <202111190002.1AJ02meM072733@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: f74147e26999 - stable/13 - bhyve: net_backends, automatically IFF_UP tap devices List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f74147e26999838e03a522bf59ea33bef470d356 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f74147e26999838e03a522bf59ea33bef470d356 commit f74147e26999838e03a522bf59ea33bef470d356 Author: Bjoern A. Zeeb AuthorDate: 2021-07-28 22:53:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:27 +0000 bhyve: net_backends, automatically IFF_UP tap devices If you want communications with the outside world and tell bhyve to create an interfaces then it should be usable as well. Rather than relying on the sysctl net.link.tap.up_on_open automatically try to IFF_UP the opened tap device. (cherry picked from commit 56be282bc999cc05dcd1ccb163b108d54f3ff448) --- usr.sbin/bhyve/net_backends.c | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c index 30c26aea458b..cb1730fc77df 100644 --- a/usr.sbin/bhyve/net_backends.c +++ b/usr.sbin/bhyve/net_backends.c @@ -46,6 +46,9 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(INET6) || defined(INET) +#include +#endif #include #include #define NETMAP_WITH_LIBS @@ -179,6 +182,17 @@ SET_DECLARE(net_backend_set, struct net_backend); * The tap backend */ +#if defined(INET6) || defined(INET) +const int pf_list[] = { +#if defined(INET6) + PF_INET6, +#endif +#if defined(INET) + PF_INET, +#endif +}; +#endif + struct tap_priv { struct mevent *mevp; /* @@ -211,6 +225,10 @@ tap_init(struct net_backend *be, const char *devname, struct tap_priv *priv = (struct tap_priv *)be->opaque; char tbuf[80]; int opt = 1; +#if defined(INET6) || defined(INET) + struct ifreq ifrq; + int i, s; +#endif #ifndef WITHOUT_CAPSICUM cap_rights_t rights; #endif @@ -238,6 +256,39 @@ tap_init(struct net_backend *be, const char *devname, goto error; } +#if defined(INET6) || defined(INET) + /* + * Try to UP the interface rather than relying on + * net.link.tap.up_on_open. + */ + bzero(&ifrq, sizeof(ifrq)); + if (ioctl(be->fd, TAPGIFNAME, &ifrq) < 0) { + WPRINTF(("Could not get interface name")); + goto error; + } + + s = -1; + for (i = 0; s == -1 && i < nitems(pf_list); i++) + s = socket(pf_list[i], SOCK_DGRAM, 0); + if (s == -1) { + WPRINTF(("Could open socket")); + goto error; + } + + if (ioctl(s, SIOCGIFFLAGS, &ifrq) < 0) { + (void)close(s); + WPRINTF(("Could not get interface flags")); + goto error; + } + ifrq.ifr_flags |= IFF_UP; + if (ioctl(s, SIOCSIFFLAGS, &ifrq) < 0) { + (void)close(s); + WPRINTF(("Could not set interface flags")); + goto error; + } + (void)close(s); +#endif + #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_EVENT, CAP_READ, CAP_WRITE); if (caph_rights_limit(be->fd, &rights) == -1) From nobody Fri Nov 19 00:02:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E1251188FAF6; Fri, 19 Nov 2021 00:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwH193Fx1z3Bnb; Fri, 19 Nov 2021 00:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BA221E6EA; Fri, 19 Nov 2021 00:02: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 1AJ02pmJ072782; Fri, 19 Nov 2021 00:02:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02pMZ072781; Fri, 19 Nov 2021 00:02:51 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:51 GMT Message-Id: <202111190002.1AJ02pMZ072781@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: 64c69419a96c - stable/13 - arm64/gicv3: improve a panic message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 64c69419a96c03a17c2efc8816fe3e332edacded Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=64c69419a96c03a17c2efc8816fe3e332edacded commit 64c69419a96c03a17c2efc8816fe3e332edacded Author: Bjoern A. Zeeb AuthorDate: 2021-11-09 22:11:15 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:27 +0000 arm64/gicv3: improve a panic message Print the device/unit in the panic message for which we cannot get the MSI device ID to have a clue where to start looking. While here use __func__ instead of hardcoding the function name. (cherry picked from commit fad51d34f21359c5b94ca94842381c3e000f475e) --- sys/arm64/arm64/gicv3_its.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 9c058dbe7f99..84b1a574f02f 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -1110,7 +1110,8 @@ its_get_devid(device_t pci_dev) uintptr_t id; if (pci_get_id(pci_dev, PCI_ID_MSI, &id) != 0) - panic("its_get_devid: Unable to get the MSI DeviceID"); + panic("%s: %s: Unable to get the MSI DeviceID", __func__, + device_get_nameunit(pci_dev)); return (id); } From nobody Fri Nov 19 00:02:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E1489188FC26; Fri, 19 Nov 2021 00:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwH192FgYz3Bvy; Fri, 19 Nov 2021 00:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B2E31E6E9; Fri, 19 Nov 2021 00:02: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 1AJ02oeW072758; Fri, 19 Nov 2021 00:02:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02oUd072757; Fri, 19 Nov 2021 00:02:50 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:50 GMT Message-Id: <202111190002.1AJ02oUd072757@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: 151d59e386d7 - stable/13 - Parse named nodes from IORT ACPI on arm64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 151d59e386d7e1a70b5279e0de5d9ee99259f65c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=151d59e386d7e1a70b5279e0de5d9ee99259f65c commit 151d59e386d7e1a70b5279e0de5d9ee99259f65c Author: Dmitry Salychev AuthorDate: 2021-08-07 17:17:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:27 +0000 Parse named nodes from IORT ACPI on arm64 Add the ability to map named components from IORT to their SMMU or ITS node in order to setup interrupts. It is now possible to find a node by its name (substring) and resource ID similar to PCI nodes. This is needed by work on a driver for NXP's Second Generation Data Path Acceleration Architecture (DPAA2). Reviewed by: andrew (cherry picked from commit d178b1f878ae5b1b4e574bcf34d21b60855bf5a0) --- sys/arm64/acpica/acpi_iort.c | 138 ++++++++++++++++++++++++++++++++++++++----- sys/dev/acpica/acpivar.h | 4 ++ 2 files changed, 126 insertions(+), 16 deletions(-) diff --git a/sys/arm64/acpica/acpi_iort.c b/sys/arm64/acpica/acpi_iort.c index ec5cf799b333..e35531731251 100644 --- a/sys/arm64/acpica/acpi_iort.c +++ b/sys/arm64/acpica/acpi_iort.c @@ -77,6 +77,14 @@ struct iort_its_entry { int pxm; }; +struct iort_named_component +{ + UINT32 NodeFlags; + UINT64 MemoryProperties; + UINT8 MemoryAddressLimit; + char DeviceName[32]; /* Path of namespace object */ +}; + /* * IORT node. Each node has some device specific data depending on the * type of the node. The node can also have a set of mappings, OR in @@ -91,9 +99,10 @@ struct iort_node { u_int usecount; /* for bookkeeping */ u_int revision; /* node revision */ union { - ACPI_IORT_ROOT_COMPLEX pci_rc; /* PCI root complex */ - ACPI_IORT_SMMU smmu; - ACPI_IORT_SMMU_V3 smmu_v3; + ACPI_IORT_ROOT_COMPLEX pci_rc; /* PCI root complex */ + ACPI_IORT_SMMU smmu; + ACPI_IORT_SMMU_V3 smmu_v3; + struct iort_named_component named_comp; } data; union { struct iort_map_entry *mappings; /* node mappings */ @@ -105,6 +114,7 @@ struct iort_node { static TAILQ_HEAD(, iort_node) pci_nodes = TAILQ_HEAD_INITIALIZER(pci_nodes); static TAILQ_HEAD(, iort_node) smmu_nodes = TAILQ_HEAD_INITIALIZER(smmu_nodes); static TAILQ_HEAD(, iort_node) its_groups = TAILQ_HEAD_INITIALIZER(its_groups); +static TAILQ_HEAD(, iort_node) named_nodes = TAILQ_HEAD_INITIALIZER(named_nodes); static int iort_entry_get_id_mapping_index(struct iort_node *node) @@ -166,6 +176,29 @@ iort_entry_lookup(struct iort_node *node, u_int id, u_int *outid) return (entry->out_node); } +/* + * Perform an additional lookup in case of SMMU node and ITS outtype. + */ +static struct iort_node * +iort_smmu_trymap(struct iort_node *node, u_int outtype, u_int *outid) +{ + /* Original node can be not found. */ + if (!node) + return (NULL); + + /* Node can be SMMU or ITS. If SMMU, we need another lookup. */ + if (outtype == ACPI_IORT_NODE_ITS_GROUP && + (node->type == ACPI_IORT_NODE_SMMU_V3 || + node->type == ACPI_IORT_NODE_SMMU)) { + node = iort_entry_lookup(node, *outid, outid); + if (node == NULL) + return (NULL); + } + + KASSERT(node->type == outtype, ("mapping fail")); + return (node); +} + /* * Map a PCI RID to a SMMU node or an ITS node, based on outtype. */ @@ -184,21 +217,35 @@ iort_pci_rc_map(u_int seg, u_int rid, u_int outtype, u_int *outid) break; } - /* Could not find a PCI RC node with segment and device ID. */ - if (out_node == NULL) - return (NULL); + out_node = iort_smmu_trymap(out_node, outtype, &nxtid); + if (out_node) + *outid = nxtid; - /* Node can be SMMU or ITS. If SMMU, we need another lookup. */ - if (outtype == ACPI_IORT_NODE_ITS_GROUP && - (out_node->type == ACPI_IORT_NODE_SMMU_V3 || - out_node->type == ACPI_IORT_NODE_SMMU)) { - out_node = iort_entry_lookup(out_node, nxtid, &nxtid); - if (out_node == NULL) - return (NULL); + return (out_node); +} + +/* + * Map a named component node to a SMMU node or an ITS node, based on outtype. + */ +static struct iort_node * +iort_named_comp_map(const char *devname, u_int rid, u_int outtype, u_int *outid) +{ + struct iort_node *node, *out_node; + u_int nxtid; + + out_node = NULL; + TAILQ_FOREACH(node, &named_nodes, next) { + if (strstr(node->data.named_comp.DeviceName, devname) == NULL) + continue; + out_node = iort_entry_lookup(node, rid, &nxtid); + if (out_node != NULL) + break; } - KASSERT(out_node->type == outtype, ("mapping fail")); - *outid = nxtid; + out_node = iort_smmu_trymap(out_node, outtype, &nxtid); + if (out_node) + *outid = nxtid; + return (out_node); } @@ -279,6 +326,7 @@ iort_add_nodes(ACPI_IORT_NODE *node_entry, u_int node_offset) ACPI_IORT_ROOT_COMPLEX *pci_rc; ACPI_IORT_SMMU *smmu; ACPI_IORT_SMMU_V3 *smmu_v3; + ACPI_IORT_NAMED_COMPONENT *named_comp; struct iort_node *node; node = malloc(sizeof(*node), M_DEVBUF, M_WAITOK | M_ZERO); @@ -310,6 +358,19 @@ iort_add_nodes(ACPI_IORT_NODE *node_entry, u_int node_offset) iort_copy_its(node, node_entry); TAILQ_INSERT_TAIL(&its_groups, node, next); break; + case ACPI_IORT_NODE_NAMED_COMPONENT: + named_comp = (ACPI_IORT_NAMED_COMPONENT *)node_entry->NodeData; + memcpy(&node->data.named_comp, named_comp, sizeof(*named_comp)); + + /* Copy name of the node separately. */ + strncpy(node->data.named_comp.DeviceName, + named_comp->DeviceName, + sizeof(node->data.named_comp.DeviceName)); + node->data.named_comp.DeviceName[31] = 0; + + iort_copy_data(node, node_entry); + TAILQ_INSERT_TAIL(&named_nodes, node, next); + break; default: printf("ACPI: IORT: Dropping unhandled type %u\n", node_entry->Type); @@ -368,7 +429,9 @@ iort_post_process_mappings(void) TAILQ_FOREACH(node, &smmu_nodes, next) for (i = 0; i < node->nentries; i++) iort_resolve_node(&node->entries.mappings[i], FALSE); - /* TODO: named nodes */ + TAILQ_FOREACH(node, &named_nodes, next) + for (i = 0; i < node->nentries; i++) + iort_resolve_node(&node->entries.mappings[i], TRUE); } /* @@ -587,3 +650,46 @@ acpi_iort_map_pci_smmuv3(u_int seg, u_int rid, u_int *xref, u_int *sid) return (0); } + +/* + * Finds mapping for a named node given name and resource ID and returns the + * XREF for MSI interrupt setup and the device ID to use for the interrupt setup. + */ +int +acpi_iort_map_named_msi(const char *devname, u_int rid, u_int *xref, + u_int *devid) +{ + struct iort_node *node; + + node = iort_named_comp_map(devname, rid, ACPI_IORT_NODE_ITS_GROUP, + devid); + if (node == NULL) + return (ENOENT); + + /* This should be an ITS node */ + KASSERT(node->type == ACPI_IORT_NODE_ITS_GROUP, ("bad group")); + + /* Return first node, we don't handle more than that now. */ + *xref = node->entries.its[0].xref; + return (0); +} + +int +acpi_iort_map_named_smmuv3(const char *devname, u_int rid, u_int *xref, + u_int *devid) +{ + ACPI_IORT_SMMU_V3 *smmu; + struct iort_node *node; + + node = iort_named_comp_map(devname, rid, ACPI_IORT_NODE_SMMU_V3, devid); + if (node == NULL) + return (ENOENT); + + /* This should be an SMMU node. */ + KASSERT(node->type == ACPI_IORT_NODE_SMMU_V3, ("bad node")); + + smmu = (ACPI_IORT_SMMU_V3 *)&node->data.smmu_v3; + *xref = smmu->BaseAddress; + + return (0); +} diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index fb196c2f4713..fb568169cf28 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -578,6 +578,10 @@ int acpi_get_domain(device_t dev, device_t child, int *domain); int acpi_iort_map_pci_msi(u_int seg, u_int rid, u_int *xref, u_int *devid); int acpi_iort_map_pci_smmuv3(u_int seg, u_int rid, u_int *xref, u_int *devid); int acpi_iort_its_lookup(u_int its_id, u_int *xref, int *pxm); +int acpi_iort_map_named_msi(const char *devname, u_int rid, u_int *xref, + u_int *devid); +int acpi_iort_map_named_smmuv3(const char *devname, u_int rid, u_int *xref, + u_int *devid); #endif #endif /* _KERNEL */ #endif /* !_ACPIVAR_H_ */ From nobody Fri Nov 19 00:02:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1F240188FC2C; Fri, 19 Nov 2021 00:02: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 4HwH1B26DJz3BqY; Fri, 19 Nov 2021 00:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C3521E547; Fri, 19 Nov 2021 00:02: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 1AJ02qUX072806; Fri, 19 Nov 2021 00:02:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02qlS072805; Fri, 19 Nov 2021 00:02:52 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:52 GMT Message-Id: <202111190002.1AJ02qlS072805@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: 54aa95f082de - stable/13 - mii: update URL for OUIs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 54aa95f082de6df70d692134c603451b16750c3f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=54aa95f082de6df70d692134c603451b16750c3f commit 54aa95f082de6df70d692134c603451b16750c3f Author: Bjoern A. Zeeb AuthorDate: 2021-11-09 21:35:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:27 +0000 mii: update URL for OUIs Update the URL for OUIs as the old one is 404 not even 301 anymore. (cherry picked from commit 8e902c1d21a74c82ffef9f104eb31b213f79f1db) --- sys/dev/mii/miidevs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs index 87035e1b7392..259718303ee5 100644 --- a/sys/dev/mii/miidevs +++ b/sys/dev/mii/miidevs @@ -33,7 +33,7 @@ $FreeBSD$ /* * List of known MII OUIs. - * For a complete list see http://standards.ieee.org/regauth/oui/ + * For a complete list see http://standards-oui.ieee.org/ * * XXX Vendors do obviously not agree how OUIs (24 bit) are mapped * to the 22 bits available in the id registers. From nobody Fri Nov 19 00:02:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AAA1B188FB5E; Fri, 19 Nov 2021 00:02: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 4HwH1B4PN9z3Bsp; Fri, 19 Nov 2021 00:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B94F71E548; Fri, 19 Nov 2021 00:02: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 1AJ02rgc072836; Fri, 19 Nov 2021 00:02:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02rjq072835; Fri, 19 Nov 2021 00:02:53 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:53 GMT Message-Id: <202111190002.1AJ02rjq072835@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: 9806b36deeee - stable/13 - epair: remove "All rights reserved" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9806b36deeeef8df2cc2a5d6122c3aafc478b1f0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9806b36deeeef8df2cc2a5d6122c3aafc478b1f0 commit 9806b36deeeef8df2cc2a5d6122c3aafc478b1f0 Author: Bjoern A. Zeeb AuthorDate: 2021-11-02 16:48:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:27 +0000 epair: remove "All rights reserved" Remove "All rights reserved" from The FreeBSD Foundation owned copyrights on epair code and documentation. Approved by: emaste (FreeBSD Foundation) (cherry picked from commit 1a8f198fa66518e6d249fa8aa765ec6e50a4fbab) --- share/man/man4/epair.4 | 1 - sys/net/if_epair.c | 1 - 2 files changed, 2 deletions(-) diff --git a/share/man/man4/epair.4 b/share/man/man4/epair.4 index 3ea706cb02ac..e1018e4b177f 100644 --- a/share/man/man4/epair.4 +++ b/share/man/man4/epair.4 @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by CK Software GmbH under sponsorship .\" from the FreeBSD Foundation. diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 7f62cdb427ff..3cef6c76a2e2 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -3,7 +3,6 @@ * * Copyright (c) 2008 The FreeBSD Foundation * Copyright (c) 2009-2010 Bjoern A. Zeeb - * All rights reserved. * * This software was developed by CK Software GmbH under sponsorship * from the FreeBSD Foundation. From nobody Fri Nov 19 00:10:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C26BF189873E; Fri, 19 Nov 2021 00: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 4HwH9z1Szcz3KbH; Fri, 19 Nov 2021 00:10:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF3FA1E552; Fri, 19 Nov 2021 00:10: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 1AJ0AUXO081848; Fri, 19 Nov 2021 00: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 1AJ0AU7w081847; Fri, 19 Nov 2021 00:10:30 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:10:30 GMT Message-Id: <202111190010.1AJ0AU7w081847@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: 29745cf91cfc - stable/13 - Bump __FreeBSD_version to 1300521. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 29745cf91cfc22afa94da0ce43e07a6dc377f631 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=29745cf91cfc22afa94da0ce43e07a6dc377f631 commit 29745cf91cfc22afa94da0ce43e07a6dc377f631 Author: Bjoern A. Zeeb AuthorDate: 2021-11-19 00:09:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:09:37 +0000 Bump __FreeBSD_version to 1300521. Bump __FreeBSD_version to 1300521 after merging LinuxKPI and net80211 changes. --- UPDATING | 6 ++++++ sys/sys/param.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 46212b9047a2..7837566e82a7 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,12 @@ 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. +20211119: + Bump __FreeBSD_version to 1300521 after merging LinuxKPI and + net80211 changes in order to support building various wireless + drivers. This is to help other external consumers of LinuxKPI + and net80211 to deal accordingly. + 20211003: Commit a599f9f7620b deleted the variable called nfs_maxcopyrange from nfscommon.ko, since it no longer needs to be global. As such, diff --git a/sys/sys/param.h b/sys/sys/param.h index fa3bc1544a4a..8baeb865e158 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 1300520 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300521 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Fri Nov 19 01:53:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9C52A1852A4C; Fri, 19 Nov 2021 01:53: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 4HwKSY2qfTz4hJh; Fri, 19 Nov 2021 01:53:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23CA21FC30; Fri, 19 Nov 2021 01:53: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 1AJ1rHcW018759; Fri, 19 Nov 2021 01:53:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ1rHN6018758; Fri, 19 Nov 2021 01:53:17 GMT (envelope-from git) Date: Fri, 19 Nov 2021 01:53:17 GMT Message-Id: <202111190153.1AJ1rHN6018758@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: ec5691aa2f96 - stable/13 - net: Allow binding of unspecified address without address existance List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ec5691aa2f96d27c8f000486a9e3297c2dce31b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ec5691aa2f96d27c8f000486a9e3297c2dce31b9 commit ec5691aa2f96d27c8f000486a9e3297c2dce31b9 Author: Roy Marples AuthorDate: 2021-10-20 15:47:29 +0000 Commit: Ed Maste CommitDate: 2021-11-19 00:28:56 +0000 net: Allow binding of unspecified address without address existance Previously in_pcbbind_setup returned EADDRNOTAVAIL for empty V_in_ifaddrhead (i.e., no IPv4 addresses configured) and in6_pcbbind did the same for empty V_in6_ifaddrhead (no IPv6 addresses). An equivalent test has existed since 4.4-Lite. It was presumably done to avoid extra work (assuming the address isn't going to be found later). In normal system operation *_ifaddrhead will not be empty: they will at least have the loopback address(es). In practice no work will be avoided. Further, this case caused net/dhcpd to fail when run early in boot before assignment of any addresses. It should be possible to bind the unspecified address even if no addresses have been configured yet, so just remove the tests. The now-removed "XXX broken" comments were added in 59562606b9d3, which converted the ifaddr lists to TAILQs. As far as I (emaste) can tell the brokenness is the issue described above, not some aspect of the TAILQ conversion. PR: 253166 Reviewed by: ae, bz, donner, emaste, glebius MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D32563 (cherry picked from commit 5c5340108e9c2e384ca646720e17d037c69acc4c) --- sys/netinet/in_pcb.c | 2 -- sys/netinet6/in6_pcb.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 8b109bce9dff..c3ad7e9b6bc6 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -932,8 +932,6 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr *nam, in_addr_t *laddrp, INP_LOCK_ASSERT(inp); INP_HASH_LOCK_ASSERT(pcbinfo); - if (CK_STAILQ_EMPTY(&V_in_ifaddrhead)) /* XXX broken! */ - return (EADDRNOTAVAIL); laddr.s_addr = *laddrp; if (nam != NULL && laddr.s_addr != INADDR_ANY) return (EINVAL); diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 1c36b4386030..bc7c0a2bebf5 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -134,8 +134,6 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr *nam, INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); - if (CK_STAILQ_EMPTY(&V_in6_ifaddrhead)) /* XXX broken! */ - return (EADDRNOTAVAIL); if (inp->inp_lport || !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT|SO_REUSEPORT_LB)) == 0) From nobody Fri Nov 19 01:53:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 521581852CF0; Fri, 19 Nov 2021 01:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwKSm1Knfz4hVD; Fri, 19 Nov 2021 01:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05DD01FA59; Fri, 19 Nov 2021 01:53: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 1AJ1rRUl018886; Fri, 19 Nov 2021 01:53:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ1rRhF018885; Fri, 19 Nov 2021 01:53:27 GMT (envelope-from git) Date: Fri, 19 Nov 2021 01:53:27 GMT Message-Id: <202111190153.1AJ1rRhF018885@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: e20aa51503b5 - stable/12 - net: Allow binding of unspecified address without address existance List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e20aa51503b5960c9514492d0746ce05e8eca8a6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e20aa51503b5960c9514492d0746ce05e8eca8a6 commit e20aa51503b5960c9514492d0746ce05e8eca8a6 Author: Roy Marples AuthorDate: 2021-10-20 15:47:29 +0000 Commit: Ed Maste CommitDate: 2021-11-19 00:29:31 +0000 net: Allow binding of unspecified address without address existance Previously in_pcbbind_setup returned EADDRNOTAVAIL for empty V_in_ifaddrhead (i.e., no IPv4 addresses configured) and in6_pcbbind did the same for empty V_in6_ifaddrhead (no IPv6 addresses). An equivalent test has existed since 4.4-Lite. It was presumably done to avoid extra work (assuming the address isn't going to be found later). In normal system operation *_ifaddrhead will not be empty: they will at least have the loopback address(es). In practice no work will be avoided. Further, this case caused net/dhcpd to fail when run early in boot before assignment of any addresses. It should be possible to bind the unspecified address even if no addresses have been configured yet, so just remove the tests. The now-removed "XXX broken" comments were added in 59562606b9d3, which converted the ifaddr lists to TAILQs. As far as I (emaste) can tell the brokenness is the issue described above, not some aspect of the TAILQ conversion. PR: 253166 Reviewed by: ae, bz, donner, emaste, glebius MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D32563 (cherry picked from commit 5c5340108e9c2e384ca646720e17d037c69acc4c) --- sys/netinet/in_pcb.c | 2 -- sys/netinet6/in6_pcb.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index b8f06a96fe27..5a8076f1171a 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -845,8 +845,6 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr *nam, in_addr_t *laddrp, INP_LOCK_ASSERT(inp); INP_HASH_LOCK_ASSERT(pcbinfo); - if (CK_STAILQ_EMPTY(&V_in_ifaddrhead)) /* XXX broken! */ - return (EADDRNOTAVAIL); laddr.s_addr = *laddrp; if (nam != NULL && laddr.s_addr != INADDR_ANY) return (EINVAL); diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index ee38e52c57f2..855d469da8ac 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -131,8 +131,6 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr *nam, INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); - if (CK_STAILQ_EMPTY(&V_in6_ifaddrhead)) /* XXX broken! */ - return (EADDRNOTAVAIL); if (inp->inp_lport || !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT|SO_REUSEPORT_LB)) == 0) From nobody Fri Nov 19 02:02:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1AF301888D18; Fri, 19 Nov 2021 02:02: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 4HwKgQ6Y04z4lKF; Fri, 19 Nov 2021 02:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C06FE1F6F0; Fri, 19 Nov 2021 02:02: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 1AJ22gC9033284; Fri, 19 Nov 2021 02:02:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ22gxo033283; Fri, 19 Nov 2021 02:02:42 GMT (envelope-from git) Date: Fri, 19 Nov 2021 02:02:42 GMT Message-Id: <202111190202.1AJ22gxo033283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 11d1d20e3721 - stable/12 - nfscl: Make nfscl_getlayout() acquire the correct pNFS layout List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 11d1d20e372173288f9ddb35d049277b3fe20cd7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=11d1d20e372173288f9ddb35d049277b3fe20cd7 commit 11d1d20e372173288f9ddb35d049277b3fe20cd7 Author: Rick Macklem AuthorDate: 2021-10-13 22:48:54 +0000 Commit: Rick Macklem CommitDate: 2021-11-19 01:59:02 +0000 nfscl: Make nfscl_getlayout() acquire the correct pNFS layout Without this patch, if a pNFS read layout has already been acquired for a file, writes would be redirected to the Metadata Server (MDS), because nfscl_getlayout() would not acquire a read/write layout for the file. This happened because there was no "mode" argument to nfscl_getlayout() to indicate whether reading or writing was being done. Since doing I/O through the Metadata Server is not encouraged for some pNFS servers, it is preferable to get a read/write layout for writes instead of redirecting the write to the MDS. This patch adds a access mode argument to nfscl_getlayout() and nfsrpc_getlayout(), so that nfscl_getlayout() knows to acquire a read/write layout for writing, even if a read layout has already been acquired. This patch only affects NFSv4.1/4.2 client behaviour when pNFS ("pnfs" mount option against a server that supports pNFS) is in use. This problem was detected during a recent NFSv4 interoperability testing event held by the IETF working group. (cherry picked from commit 24af0fcdfc4983fd3cef10f9d949aca79476c2c2) --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clrpcops.c | 14 +++++++------- sys/fs/nfsclient/nfs_clstate.c | 7 ++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 91914314970d..e93d6e9bdf27 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -602,7 +602,7 @@ int nfscl_layout(struct nfsmount *, vnode_t, u_int8_t *, int, nfsv4stateid_t *, int, int, struct nfsclflayouthead *, struct nfscllayout **, struct ucred *, NFSPROC_T *); struct nfscllayout *nfscl_getlayout(struct nfsclclient *, uint8_t *, int, - uint64_t, struct nfsclflayout **, int *); + uint64_t, uint32_t, struct nfsclflayout **, int *); void nfscl_dserr(uint32_t, uint32_t, struct nfscldevinfo *, struct nfscllayout *, struct nfsclds *); void nfscl_cancelreqs(struct nfsclds *); diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index f2eb3af5f101..992b8ad8bdcd 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -138,7 +138,7 @@ static int nfsrpc_locku(struct nfsrv_descript *, struct nfsmount *, static int nfsrpc_setaclrpc(vnode_t, struct ucred *, NFSPROC_T *, struct acl *, nfsv4stateid_t *, void *); static int nfsrpc_getlayout(struct nfsmount *, vnode_t, struct nfsfh *, int, - uint32_t *, nfsv4stateid_t *, uint64_t, struct nfscllayout **, + uint32_t, uint32_t *, nfsv4stateid_t *, uint64_t, struct nfscllayout **, struct ucred *, NFSPROC_T *); static int nfsrpc_fillsa(struct nfsmount *, struct sockaddr_in *, struct sockaddr_in6 *, sa_family_t, int, struct nfsclds **, NFSPROC_T *); @@ -5345,8 +5345,8 @@ nfsmout: */ static int nfsrpc_getlayout(struct nfsmount *nmp, vnode_t vp, struct nfsfh *nfhp, - int iomode, uint32_t *notifybitsp, nfsv4stateid_t *stateidp, uint64_t off, - struct nfscllayout **lypp, struct ucred *cred, NFSPROC_T *p) + int iomode, uint32_t rw, uint32_t *notifybitsp, nfsv4stateid_t *stateidp, + uint64_t off, struct nfscllayout **lypp, struct ucred *cred, NFSPROC_T *p) { struct nfscllayout *lyp; struct nfsclflayout *flp; @@ -5366,7 +5366,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, vnode_t vp, struct nfsfh *nfhp, * flp == NULL. */ lyp = nfscl_getlayout(nmp->nm_clp, nfhp->nfh_fh, nfhp->nfh_len, - off, &flp, &recalled); + off, rw, &flp, &recalled); islocked = 0; if (lyp == NULL || flp == NULL) { if (recalled != 0) @@ -5690,7 +5690,7 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, /* Search for a layout for this file. */ off = uiop->uio_offset; layp = nfscl_getlayout(nmp->nm_clp, np->n_fhp->nfh_fh, - np->n_fhp->nfh_len, off, &rflp, &recalled); + np->n_fhp->nfh_len, off, rwaccess, &rflp, &recalled); if (layp == NULL || rflp == NULL) { if (recalled != 0) { NFSFREECRED(newcred); @@ -5710,7 +5710,7 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, else iolaymode = NFSLAYOUTIOMODE_READ; error = nfsrpc_getlayout(nmp, vp, np->n_fhp, iolaymode, - NULL, &stateid, off, &layp, newcred, p); + rwaccess, NULL, &stateid, off, &layp, newcred, p); if (error != 0) { NFSLOCKNODE(np); np->n_flag |= NNOLAYOUT; @@ -7124,7 +7124,7 @@ nfsrpc_getopenlayout(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, * on it, iff flp != NULL or a lock (exclusive lock) on it iff * flp == NULL. */ - lyp = nfscl_getlayout(nmp->nm_clp, newfhp, newfhlen, 0, &flp, + lyp = nfscl_getlayout(nmp->nm_clp, newfhp, newfhlen, 0, mode, &flp, &recalled); NFSCL_DEBUG(4, "nfsrpc_getopenlayout nfscl_getlayout lyp=%p\n", lyp); if (lyp == NULL) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 279f7e38c346..9eeb2ca10865 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -5030,7 +5030,8 @@ nfscl_layout(struct nfsmount *nmp, vnode_t vp, u_int8_t *fhp, int fhlen, */ struct nfscllayout * nfscl_getlayout(struct nfsclclient *clp, uint8_t *fhp, int fhlen, - uint64_t off, struct nfsclflayout **retflpp, int *recalledp) + uint64_t off, uint32_t rwaccess, struct nfsclflayout **retflpp, + int *recalledp) { struct nfscllayout *lyp; mount_t mp; @@ -5046,8 +5047,8 @@ nfscl_getlayout(struct nfsclclient *clp, uint8_t *fhp, int fhlen, TAILQ_REMOVE(&clp->nfsc_layout, lyp, nfsly_list); TAILQ_INSERT_HEAD(&clp->nfsc_layout, lyp, nfsly_list); lyp->nfsly_timestamp = NFSD_MONOSEC + 120; - error = nfscl_findlayoutforio(lyp, off, - NFSV4OPEN_ACCESSREAD, retflpp); + error = nfscl_findlayoutforio(lyp, off, rwaccess, + retflpp); if (error == 0) nfsv4_getref(&lyp->nfsly_lock, NULL, NFSCLSTATEMUTEXPTR, mp); From nobody Fri Nov 19 02:48:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 43045189F4EC; Fri, 19 Nov 2021 02:48: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 4HwLhl10l8z508T; Fri, 19 Nov 2021 02:48:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 03379204D8; Fri, 19 Nov 2021 02:48: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 1AJ2msw7086516; Fri, 19 Nov 2021 02:48:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ2msJR086515; Fri, 19 Nov 2021 02:48:54 GMT (envelope-from git) Date: Fri, 19 Nov 2021 02:48:54 GMT Message-Id: <202111190248.1AJ2msJR086515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: a715704e53bd - stable/12 - nfscl: Restructure nfscl_freeopen() slightly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a715704e53bd84215469f21cd03d5ece9c6c220e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a715704e53bd84215469f21cd03d5ece9c6c220e commit a715704e53bd84215469f21cd03d5ece9c6c220e Author: Rick Macklem AuthorDate: 2021-10-15 00:28:01 +0000 Commit: Rick Macklem CommitDate: 2021-11-19 02:45:13 +0000 nfscl: Restructure nfscl_freeopen() slightly This patch factors the unlinking of the nfsclopen structure out of nfscl_freeopen() into a separate function called nfscl_unlinkopen(). It also adds a new argument to nfscl_freeopen() to conditionally do the unlink. Since this new argument is always passed in as "true" at this time, no semantics change should occur. This is being done to prepare the code for a future patch that fixes the case where an NFSv4.1/4.2 server replies NFSERR_DELAY to a Close operation. (cherry picked from commit 6495766acfb242048a80d58956b2cebbd885d8cc) --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clrpcops.c | 2 +- sys/fs/nfsclient/nfs_clstate.c | 38 +++++++++++++++++++++++++------------- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index e93d6e9bdf27..536f3634dcff 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -562,7 +562,7 @@ int nfscl_checkwritelocked(vnode_t, struct flock *, void nfscl_lockrelease(struct nfscllockowner *, int, int); void nfscl_fillclid(u_int64_t, char *, u_int8_t *, u_int16_t); void nfscl_filllockowner(void *, u_int8_t *, int); -void nfscl_freeopen(struct nfsclopen *, int); +void nfscl_freeopen(struct nfsclopen *, int, bool); void nfscl_umount(struct nfsmount *, NFSPROC_T *, struct nfscldeleghead *); void nfscl_renewthread(struct nfsclclient *, NFSPROC_T *); void nfscl_initiate_recovery(struct nfsclclient *); diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 992b8ad8bdcd..5da95f850856 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -816,7 +816,7 @@ nfsrpc_doclose(struct nfsmount *nmp, struct nfsclopen *op, NFSPROC_T *p) LIST_FOREACH_SAFE(lp, &op->nfso_lock, nfsl_list, nlp) nfscl_freelockowner(lp, 0); - nfscl_freeopen(op, 0); + nfscl_freeopen(op, 0, true); NFSUNLOCKCLSTATE(); NFSFREECRED(tcred); } diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 9eeb2ca10865..ad8770950f56 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -103,6 +103,7 @@ static int nfscl_layoutcnt = 0; static int nfscl_getopen(struct nfsclownerhead *, u_int8_t *, int, u_int8_t *, u_int8_t *, u_int32_t, struct nfscllockowner **, struct nfsclopen **); static void nfscl_clrelease(struct nfsclclient *); +static void nfscl_unlinkopen(struct nfsclopen *); static void nfscl_cleanclient(struct nfsclclient *); static void nfscl_expireclient(struct nfsclclient *, struct nfsmount *, struct ucred *, NFSPROC_T *); @@ -760,7 +761,7 @@ nfscl_openrelease(struct nfsmount *nmp, struct nfsclopen *op, int error, nfscl_lockunlock(&owp->nfsow_rwlock); clp = owp->nfsow_clp; if (error && candelete && op->nfso_opencnt == 0) - nfscl_freeopen(op, 0); + nfscl_freeopen(op, 0, true); nfscl_clrelease(clp); NFSUNLOCKCLSTATE(); } @@ -1459,14 +1460,25 @@ nfscl_lockrelease(struct nfscllockowner *lp, int error, int candelete) NFSUNLOCKCLSTATE(); } +/* + * Unlink the open structure. + */ +static void +nfscl_unlinkopen(struct nfsclopen *op) +{ + + LIST_REMOVE(op, nfso_list); +} + /* * Free up an open structure and any associated byte range lock structures. */ void -nfscl_freeopen(struct nfsclopen *op, int local) +nfscl_freeopen(struct nfsclopen *op, int local, bool unlink) { - LIST_REMOVE(op, nfso_list); + if (unlink) + nfscl_unlinkopen(op); nfscl_freealllocks(&op->nfso_lock, local); free(op, M_NFSCLOPEN); if (local) @@ -1537,7 +1549,7 @@ nfscl_expireopen(struct nfsclclient *clp, struct nfsclopen *op, * If a byte range lock or Share deny or couldn't re-open, free it. */ if (mustdelete) - nfscl_freeopen(op, 0); + nfscl_freeopen(op, 0, true); return (mustdelete); } @@ -1604,7 +1616,7 @@ nfscl_cleandeleg(struct nfscldeleg *dp) if (op != NULL) { if (LIST_NEXT(op, nfso_list) != NULL) panic("nfscleandel"); - nfscl_freeopen(op, 1); + nfscl_freeopen(op, 1, true); } nfscl_freeopenowner(owp, 1); } @@ -1646,7 +1658,7 @@ nfscl_cleanclient(struct nfsclclient *clp) /* Now, all the OpenOwners, etc. */ LIST_FOREACH_SAFE(owp, &clp->nfsc_owner, nfsow_list, nowp) { LIST_FOREACH_SAFE(op, &owp->nfsow_open, nfso_list, nop) { - nfscl_freeopen(op, 0); + nfscl_freeopen(op, 0, true); } nfscl_freeopenowner(owp, 0); } @@ -2166,7 +2178,7 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p) } } if (error != 0 && error != NFSERR_BADSESSION) - nfscl_freeopen(op, 0); + nfscl_freeopen(op, 0, true); op = nop; } owp = nowp; @@ -3246,7 +3258,7 @@ nfscl_doclose(vnode_t vp, struct nfsclclient **clpp, NFSPROC_T *p) if (op != NULL) { KASSERT((op->nfso_opencnt == 0), ("nfscl: bad open cnt on deleg")); - nfscl_freeopen(op, 1); + nfscl_freeopen(op, 1, true); } nfscl_freeopenowner(owp, 1); } @@ -4105,7 +4117,7 @@ nfscl_recalldeleg(struct nfsclclient *clp, struct nfsmount *nmp, ret == NFSERR_BADSESSION) return (ret); if (ret) { - nfscl_freeopen(lop, 1); + nfscl_freeopen(lop, 1, true); if (!error) error = ret; } @@ -4134,7 +4146,7 @@ nfscl_recalldeleg(struct nfsclclient *clp, struct nfsmount *nmp, ret == NFSERR_BADSESSION) return (ret); if (ret) { - nfscl_freeopen(lop, 1); + nfscl_freeopen(lop, 1, true); if (!error) error = ret; } @@ -4186,7 +4198,7 @@ nfscl_moveopen(vnode_t vp, struct nfsclclient *clp, struct nfsmount *nmp, op->nfso_fhlen == lop->nfso_fhlen && !NFSBCMP(op->nfso_fh, lop->nfso_fh, op->nfso_fhlen)) { op->nfso_opencnt += lop->nfso_opencnt; - nfscl_freeopen(lop, 1); + nfscl_freeopen(lop, 1, true); return (0); } } @@ -4204,11 +4216,11 @@ nfscl_moveopen(vnode_t vp, struct nfsclclient *clp, struct nfsmount *nmp, NFS4NODENAME(np->n_v4), np->n_v4->n4_namelen, &ndp, 0, 0, cred, p); if (error) { if (newone) - nfscl_freeopen(op, 0); + nfscl_freeopen(op, 0, true); } else { op->nfso_mode |= lop->nfso_mode; op->nfso_opencnt += lop->nfso_opencnt; - nfscl_freeopen(lop, 1); + nfscl_freeopen(lop, 1, true); } if (nop != NULL) free(nop, M_NFSCLOPEN); From nobody Fri Nov 19 02:50:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CFBC6189FB9B; Fri, 19 Nov 2021 02:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwLkx5VFdz50DG; Fri, 19 Nov 2021 02:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D09520909; Fri, 19 Nov 2021 02:50: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 1AJ2onWk094979; Fri, 19 Nov 2021 02:50:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ2onGw094978; Fri, 19 Nov 2021 02:50:49 GMT (envelope-from git) Date: Fri, 19 Nov 2021 02:50:49 GMT Message-Id: <202111190250.1AJ2onGw094978@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: 760be44702ba - main - git-arc: document "create" command options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 760be44702ba7748589de69f6e82c97a5d2eb5bc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=760be44702ba7748589de69f6e82c97a5d2eb5bc commit 760be44702ba7748589de69f6e82c97a5d2eb5bc Author: Gleb Smirnoff AuthorDate: 2021-11-19 02:47:44 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-19 02:47:44 +0000 git-arc: document "create" command options Differential revision: https://reviews.freebsd.org/D33045 --- tools/tools/git/git-arc.1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/tools/git/git-arc.1 b/tools/tools/git/git-arc.1 index 21399aef8e0e..b59f3eea17ca 100644 --- a/tools/tools/git/git-arc.1 +++ b/tools/tools/git/git-arc.1 @@ -67,6 +67,18 @@ The available verbs are: .Bl -tag -width "create" .It Cm create Create new Differential Revisions from the specified commits. +Accepts options: +.Bl -tag -width subscriber +.It Fl l +Before processing commit(s) display list of commits to be processed +and wait for confirmation. +.It Fl r Ar reviewer +Add one or more reviewers, separated by commas, to revision(s) being created. +Argument(s) must be existing Phabricator user or group. +.It Fl r Ar subscriber +Add one or more subscribers, separated by commas, to revision(s) being created. +Argument(s) must be existing Phabricator user or group. +.El .It Cm list Print the associated Differential Revisions for the specified commits. .It Cm patch From nobody Fri Nov 19 02:50:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4857E189FA4E; Fri, 19 Nov 2021 02:50: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 4HwLky73szz50MK; Fri, 19 Nov 2021 02:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBC24206A7; Fri, 19 Nov 2021 02:50: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 1AJ2ooO1095003; Fri, 19 Nov 2021 02:50:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ2ooFO095002; Fri, 19 Nov 2021 02:50:50 GMT (envelope-from git) Date: Fri, 19 Nov 2021 02:50:50 GMT Message-Id: <202111190250.1AJ2ooFO095002@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: 964035c409b1 - main - git-arc: with "create" allow to specify parent of the first commit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 964035c409b1b7229c7bc0220e7455e4a038ed4b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=964035c409b1b7229c7bc0220e7455e4a038ed4b commit 964035c409b1b7229c7bc0220e7455e4a038ed4b Author: Gleb Smirnoff AuthorDate: 2021-11-19 02:49:20 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-19 02:49:20 +0000 git-arc: with "create" allow to specify parent of the first commit Reviewed by: markj Differential revision: https://reviews.freebsd.org/D33045 --- tools/tools/git/git-arc.1 | 7 ++++++- tools/tools/git/git-arc.sh | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/tools/git/git-arc.1 b/tools/tools/git/git-arc.1 index b59f3eea17ca..984b1e8f32e5 100644 --- a/tools/tools/git/git-arc.1 +++ b/tools/tools/git/git-arc.1 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 14, 2021 +.Dd November 17, 2021 .Dt GIT-ARC 1 .Os .Sh NAME @@ -36,6 +36,7 @@ .Op Fl l .Op Fl r Ar reviewer1 Ns Op Cm \&, Ns Ar reviewer2 ... .Op Fl s Ar subscriber1 Ns Op Cm \&, Ns Ar subscriber2 ... +.Op Fl p Ar parent .Op Ar commit Ns | Ns Ar commit-range .Nm .Cm list Ar commit Ns | Ns Ar commit-range @@ -78,6 +79,10 @@ Argument(s) must be existing Phabricator user or group. .It Fl r Ar subscriber Add one or more subscribers, separated by commas, to revision(s) being created. Argument(s) must be existing Phabricator user or group. +.It Fl p Ar parent +Specify the parent of the first commit in the list. +This is useful when adding more commits on top of the already existing +stack in Phabricator. .El .It Cm list Print the associated Differential Revisions for the specified commits. diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 0c288e7ac6e2..35a815ece137 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -356,15 +356,19 @@ gitarc__create() local commit commits doprompt list o prev reviewers subscribers list= + prev="" if [ "$(git config --bool --get arc.list 2>/dev/null || echo false)" != "false" ]; then list=1 fi doprompt=1 - while getopts lr:s: o; do + while getopts lp:r:s: o; do case "$o" in l) list=1 ;; + p) + prev="$OPTARG" + ;; r) reviewers="$OPTARG" ;; @@ -391,7 +395,6 @@ gitarc__create() fi save_head - prev="" for commit in ${commits}; do if create_one_review "$commit" "$reviewers" "$subscribers" "$prev" \ "$doprompt"; then From nobody Fri Nov 19 03:22:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D12961888A48; Fri, 19 Nov 2021 03:22: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 4HwMRJ5F8nz59MH; Fri, 19 Nov 2021 03:22:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93D0B2108F; Fri, 19 Nov 2021 03:22: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 1AJ3MKfQ040606; Fri, 19 Nov 2021 03:22:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ3MKhu040605; Fri, 19 Nov 2021 03:22:20 GMT (envelope-from git) Date: Fri, 19 Nov 2021 03:22:20 GMT Message-Id: <202111190322.1AJ3MKhu040605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 27cac1948263 - stable/12 - nfscl: Add an argument to nfscl_tryclose() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 27cac1948263d7d2f7e820478658d029264f6554 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=27cac1948263d7d2f7e820478658d029264f6554 commit 27cac1948263d7d2f7e820478658d029264f6554 Author: Rick Macklem AuthorDate: 2021-10-15 21:25:38 +0000 Commit: Rick Macklem CommitDate: 2021-11-19 02:47:31 +0000 nfscl: Add an argument to nfscl_tryclose() This patch adds a new argument to nfscl_tryclose() to indicate whether or not it should loop when a NFSERR_DELAY reply is received from the NFSv4 server. Since this new argument is always passed in as "true" at this time, no semantics change should occur. This is being done to prepare the code for a future patch that fixes the case where an NFSv4.1/4.2 server replies NFSERR_DELAY to a Close operation. (cherry picked from commit 77c595ce33a37d321ef35fd840948a2e5fd17c84) --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clrpcops.c | 2 +- sys/fs/nfsclient/nfs_clstate.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 536f3634dcff..d10aa05a6b6f 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -596,7 +596,7 @@ void nfscl_newnode(vnode_t); void nfscl_delegmodtime(vnode_t); void nfscl_deleggetmodtime(vnode_t, struct timespec *); int nfscl_tryclose(struct nfsclopen *, struct ucred *, - struct nfsmount *, NFSPROC_T *); + struct nfsmount *, NFSPROC_T *, bool); void nfscl_cleanup(NFSPROC_T *); int nfscl_layout(struct nfsmount *, vnode_t, u_int8_t *, int, nfsv4stateid_t *, int, int, struct nfsclflayouthead *, struct nfscllayout **, struct ucred *, diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 5da95f850856..78594cffc3ec 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -807,7 +807,7 @@ nfsrpc_doclose(struct nfsmount *nmp, struct nfsclopen *op, NFSPROC_T *p) nfscl_lockexcl(&op->nfso_own->nfsow_rwlock, NFSCLSTATEMUTEXPTR); NFSUNLOCKCLSTATE(); do { - error = nfscl_tryclose(op, tcred, nmp, p); + error = nfscl_tryclose(op, tcred, nmp, p, true); if (error == NFSERR_GRACE) (void) nfs_catnap(PZERO, error, "nfs_close"); } while (error == NFSERR_GRACE); diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index ad8770950f56..1825b56eabd0 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -2298,7 +2298,7 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p) LIST_FOREACH_SAFE(op, &extra_open, nfso_list, nop) { do { newnfs_copycred(&op->nfso_cred, tcred); - error = nfscl_tryclose(op, tcred, nmp, p); + error = nfscl_tryclose(op, tcred, nmp, p, true); if (error == NFSERR_GRACE) (void) nfs_catnap(PZERO, error, "nfsexcls"); } while (error == NFSERR_GRACE); @@ -4415,24 +4415,24 @@ nfscl_trydelegreturn(struct nfscldeleg *dp, struct ucred *cred, */ int nfscl_tryclose(struct nfsclopen *op, struct ucred *cred, - struct nfsmount *nmp, NFSPROC_T *p) + struct nfsmount *nmp, NFSPROC_T *p, bool loop_on_delayed) { struct nfsrv_descript nfsd, *nd = &nfsd; int error; do { error = nfsrpc_closerpc(nd, nmp, op, cred, p, 0); - if (error == NFSERR_DELAY) + if (loop_on_delayed && error == NFSERR_DELAY) (void) nfs_catnap(PZERO, error, "nfstrycl"); - } while (error == NFSERR_DELAY); + } while (loop_on_delayed && error == NFSERR_DELAY); if (error == EAUTH || error == EACCES) { /* Try again using system credentials */ newnfs_setroot(cred); do { error = nfsrpc_closerpc(nd, nmp, op, cred, p, 1); - if (error == NFSERR_DELAY) + if (loop_on_delayed && error == NFSERR_DELAY) (void) nfs_catnap(PZERO, error, "nfstrycl"); - } while (error == NFSERR_DELAY); + } while (loop_on_delayed && error == NFSERR_DELAY); } return (error); } From nobody Fri Nov 19 04:24:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B1C991856112; Fri, 19 Nov 2021 04:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwNq64fsBz3jpW; Fri, 19 Nov 2021 04:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FF3C21AFD; Fri, 19 Nov 2021 04:24: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 1AJ4OYRG020671; Fri, 19 Nov 2021 04:24:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4OYfm020670; Fri, 19 Nov 2021 04:24:34 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:24:34 GMT Message-Id: <202111190424.1AJ4OYfm020670@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: 322b341d0029 - main - Remove mips from 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 322b341d002945fae9151b8beba6f420db61037d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=322b341d002945fae9151b8beba6f420db61037d commit 322b341d002945fae9151b8beba6f420db61037d Author: Warner Losh AuthorDate: 2021-11-19 04:21:38 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:22:55 +0000 Remove mips from universe Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32851 --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c64873fb241b..0ee8f8ed0f7f 100644 --- a/Makefile +++ b/Makefile @@ -507,16 +507,13 @@ worlds: .PHONY # Don't build rarely used, semi-supported architectures unless requested. # .if defined(EXTRA_TARGETS) -EXTRA_ARCHES_mips= mipsel mipshf mipselhf mips64el mips64hf mips64elhf -EXTRA_ARCHES_mips+= mipsn32 # powerpcspe excluded from main list until clang fixed EXTRA_ARCHES_powerpc= powerpcspe powerpc64le .endif -TARGETS?=amd64 arm arm64 i386 mips powerpc riscv +TARGETS?=amd64 arm arm64 i386 powerpc riscv _UNIVERSE_TARGETS= ${TARGETS} TARGET_ARCHES_arm?= armv6 armv7 TARGET_ARCHES_arm64?= aarch64 -TARGET_ARCHES_mips?= mips mips64 ${EXTRA_ARCHES_mips} TARGET_ARCHES_powerpc?= powerpc powerpc64 ${EXTRA_ARCHES_powerpc} TARGET_ARCHES_riscv?= riscv64 riscv64sf .for target in ${TARGETS} @@ -527,7 +524,6 @@ TARGET_ARCHES_${target}?= ${target} TOOLCHAINS_amd64= amd64-gcc6 TOOLCHAINS_arm64= aarch64-gcc6 TOOLCHAINS_i386= i386-gcc6 -TOOLCHAINS_mips= mips-gcc6 TOOLCHAINS_powerpc= powerpc-gcc6 powerpc64-gcc6 TOOLCHAIN_powerpc64= powerpc64-gcc6 .endif From nobody Fri Nov 19 04:24:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E2BA21856161; Fri, 19 Nov 2021 04:24: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 4HwNq75tVTz3k0L; Fri, 19 Nov 2021 04:24:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B13121477; Fri, 19 Nov 2021 04:24: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 1AJ4OZ3X020701; Fri, 19 Nov 2021 04:24:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4OZIC020700; Fri, 19 Nov 2021 04:24:35 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:24:35 GMT Message-Id: <202111190424.1AJ4OZIC020700@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: a721ac948e9b - main - Document that 13.x is the end of the line for FreeBSD/mips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a721ac948e9bec965a8a0434acede2a672b41a51 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a721ac948e9bec965a8a0434acede2a672b41a51 commit a721ac948e9bec965a8a0434acede2a672b41a51 Author: Warner Losh AuthorDate: 2021-11-19 04:21:46 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:22:55 +0000 Document that 13.x is the end of the line for FreeBSD/mips MFC After: 3 days Sponsored by: Netflix Reviewed by: brooks, jhb, emaste Differential Revision: https://reviews.freebsd.org/D32852 --- share/man/man7/arch.7 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 51586f4dad30..97f64a9d0da3 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -97,15 +97,15 @@ architectures, the final release. .It armv7 Ta 12.0 .It ia64 Ta 5.0 Ta 10.4 .It i386 Ta 1.0 -.It mips Ta 8.0 -.It mipsel Ta 9.0 -.It mipselhf Ta 12.0 -.It mipshf Ta 12.0 -.It mipsn32 Ta 9.0 -.It mips64 Ta 9.0 -.It mips64el Ta 9.0 -.It mips64elhf Ta 12.0 -.It mips64hf Ta 12.0 +.It mips Ta 8.0 Ta 13.x +.It mipsel Ta 9.0 Ta 13.x +.It mipselhf Ta 12.0 Ta 13.x +.It mipshf Ta 12.0 Ta 13.x +.It mipsn32 Ta 9.0 Ta 13.x +.It mips64 Ta 9.0 Ta 13.x +.It mips64el Ta 9.0 Ta 13.x +.It mips64elhf Ta 12.0 Ta 13.x +.It mips64hf Ta 12.0 Ta 13.x .It pc98 Ta 2.2 Ta 11.4 .It powerpc Ta 6.0 .It powerpcspe Ta 12.0 From nobody Fri Nov 19 04:24:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C06F218563BC; Fri, 19 Nov 2021 04:24: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 4HwNq92Fz2z3k0R; Fri, 19 Nov 2021 04:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE4FE218CE; Fri, 19 Nov 2021 04:24: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 1AJ4Oa2I020726; Fri, 19 Nov 2021 04:24:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4Oa1h020725; Fri, 19 Nov 2021 04:24:36 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:24:36 GMT Message-Id: <202111190424.1AJ4Oa1h020725@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: 27a04f59646b - main - Add warning that MIPS is being removed in FreeBSD 14.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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27a04f59646bea70e8461095eb835e92066702ef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=27a04f59646bea70e8461095eb835e92066702ef commit 27a04f59646bea70e8461095eb835e92066702ef Author: Warner Losh AuthorDate: 2021-11-19 04:21:55 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:22:56 +0000 Add warning that MIPS is being removed in FreeBSD 14.0 MFC After: 3 days Sponsored by: Netflix Reviewed by: brooks, jhb Differential Revision: https://reviews.freebsd.org/D32853 --- Makefile.inc1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 6d6991a395c2..d8f50cf77d4b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1188,6 +1188,10 @@ _ncpu_cmd=sysctl -n hw.ncpu 2>/dev/null || nproc 2>/dev/null || echo unknown buildworld_prologue: .PHONY @echo "--------------------------------------------------------------" @echo ">>> World build started on `LC_ALL=C date`" +.if ${TARGET:Mmips} + @echo "--------------------------------------------------------------" + @echo "WARNING: MIPS architecture is gone in FreeBSD 14.0" +.endif @echo "--------------------------------------------------------------" buildworld_epilogue: .PHONY @@ -1197,6 +1201,10 @@ buildworld_epilogue: .PHONY @seconds=$$(($$(date '+%s') - ${_BUILDWORLD_START})); \ echo -n ">>> World built in $$seconds seconds, "; \ echo "ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" +.if ${TARGET:Mmips} + @echo "--------------------------------------------------------------" + @echo "WARNING: MIPS architecture is gone in FreeBSD 14.0" +.endif @echo "--------------------------------------------------------------" # From nobody Fri Nov 19 04:28:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8CD4A188A315; Fri, 19 Nov 2021 04:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwNvK3c5Vz3mBN; Fri, 19 Nov 2021 04:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 57C9E21D39; Fri, 19 Nov 2021 04:28: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 1AJ4SD5m021098; Fri, 19 Nov 2021 04:28:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4SD6A021097; Fri, 19 Nov 2021 04:28:13 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:28:13 GMT Message-Id: <202111190428.1AJ4SD6A021097@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: fb8588d2cb44 - main - tcp_timewait: use on stack struct tcptw as last resort List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: fb8588d2cb449518a9e8dc75ef34ed2094c68835 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=fb8588d2cb449518a9e8dc75ef34ed2094c68835 commit fb8588d2cb449518a9e8dc75ef34ed2094c68835 Author: Gleb Smirnoff AuthorDate: 2021-11-19 04:24:46 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-19 04:27:45 +0000 tcp_timewait: use on stack struct tcptw as last resort In case we failed to uma_zalloc() and also failed to reuse with tcp_tw_2msl_scan(), then just use on stack tcptw. This will allow to run through tcp_twrespond() and standard tcpcb discard routine. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D32965 --- sys/netinet/tcp_timewait.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 9d397d62424f..73a84a407145 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -275,16 +275,17 @@ tcp_twstart(struct tcpcb *tp) * Reached limit on total number of TIMEWAIT connections * allowed. Remove a connection from TIMEWAIT queue in LRU * fashion to make room for this connection. + * If that fails, use on stack tw at least to be able to + * run through tcp_twrespond() and standard tcpcb discard + * routine. * * XXX: Check if it possible to always have enough room * in advance based on guarantees provided by uma_zalloc(). */ tw = tcp_tw_2msl_scan(1); if (tw == NULL) { - tp = tcp_close(tp); - if (tp != NULL) - INP_WUNLOCK(inp); - return; + tw = &twlocal; + local = true; } } /* From nobody Fri Nov 19 04:28:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B8F7E188A316; Fri, 19 Nov 2021 04:28: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 4HwNvL4B04z3mDk; Fri, 19 Nov 2021 04:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6826921B36; Fri, 19 Nov 2021 04:28: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 1AJ4SEsp021122; Fri, 19 Nov 2021 04:28:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4SEAh021121; Fri, 19 Nov 2021 04:28:14 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:28:14 GMT Message-Id: <202111190428.1AJ4SEAh021121@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: ff94500855c1 - main - Add tcp_freecb() - single place to free tcpcb. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ff94500855c16d0d9cc18aa8b0ba73ea94020c56 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ff94500855c16d0d9cc18aa8b0ba73ea94020c56 commit ff94500855c16d0d9cc18aa8b0ba73ea94020c56 Author: Gleb Smirnoff AuthorDate: 2021-11-19 04:26:09 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-19 04:27:45 +0000 Add tcp_freecb() - single place to free tcpcb. Until this change there were two places where we would free tcpcb - tcp_discardcb() in case if all timers are drained and tcp_timer_discard() otherwise. They were pretty much copy-n-paste, except that in the default case we would run tcp_hc_update(). Merge this into single function tcp_freecb() and move new short version of tcp_timer_discard() to tcp_timer.c and make it static. Reviewed by: rrs, hselasky Differential revision: https://reviews.freebsd.org/D32965 --- sys/netinet/tcp_subr.c | 180 +++++++++++++++++++++--------------------------- sys/netinet/tcp_timer.c | 23 +++++++ sys/netinet/tcp_timer.h | 1 - sys/netinet/tcp_var.h | 1 + 4 files changed, 101 insertions(+), 104 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 5563148a52ad..5fa16f43f28b 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2392,11 +2392,6 @@ void tcp_discardcb(struct tcpcb *tp) { struct inpcb *inp = tp->t_inpcb; - struct socket *so = inp->inp_socket; -#ifdef INET6 - int isipv6 = (inp->inp_vflag & INP_IPV6) != 0; -#endif /* INET6 */ - int released __unused; INP_WLOCK_ASSERT(inp); @@ -2458,121 +2453,100 @@ tcp_discardcb(struct tcpcb *tp) CC_ALGO(tp) = NULL; inp->inp_ppcb = NULL; if (tp->t_timers->tt_draincnt == 0) { - /* We own the last reference on tcpcb, let's free it. */ + bool released __diagused; + + released = tcp_freecb(tp); + KASSERT(!released, ("%s: inp %p should not have been released " + "here", __func__, inp)); + } +} + +bool +tcp_freecb(struct tcpcb *tp) +{ + struct inpcb *inp = tp->t_inpcb; + struct socket *so = inp->inp_socket; +#ifdef INET6 + bool isipv6 = (inp->inp_vflag & INP_IPV6) != 0; +#endif + + INP_WLOCK_ASSERT(inp); + MPASS(tp->t_timers->tt_draincnt == 0); + + /* We own the last reference on tcpcb, let's free it. */ #ifdef TCP_BLACKBOX - tcp_log_tcpcbfini(tp); + tcp_log_tcpcbfini(tp); #endif - TCPSTATES_DEC(tp->t_state); - if (tp->t_fb->tfb_tcp_fb_fini) - (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); + TCPSTATES_DEC(tp->t_state); + if (tp->t_fb->tfb_tcp_fb_fini) + (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); + /* + * If we got enough samples through the srtt filter, + * save the rtt and rttvar in the routing entry. + * 'Enough' is arbitrarily defined as 4 rtt samples. + * 4 samples is enough for the srtt filter to converge + * to within enough % of the correct value; fewer samples + * and we could save a bogus rtt. The danger is not high + * as tcp quickly recovers from everything. + * XXX: Works very well but needs some more statistics! + * + * XXXRRS: Updating must be after the stack fini() since + * that may be converting some internal representation of + * say srtt etc into the general one used by other stacks. + * Lets also at least protect against the so being NULL + * as RW stated below. + */ + if ((tp->t_rttupdated >= 4) && (so != NULL)) { + struct hc_metrics_lite metrics; + uint32_t ssthresh; + + bzero(&metrics, sizeof(metrics)); /* - * If we got enough samples through the srtt filter, - * save the rtt and rttvar in the routing entry. - * 'Enough' is arbitrarily defined as 4 rtt samples. - * 4 samples is enough for the srtt filter to converge - * to within enough % of the correct value; fewer samples - * and we could save a bogus rtt. The danger is not high - * as tcp quickly recovers from everything. - * XXX: Works very well but needs some more statistics! + * Update the ssthresh always when the conditions below + * are satisfied. This gives us better new start value + * for the congestion avoidance for new connections. + * ssthresh is only set if packet loss occurred on a session. * - * XXXRRS: Updating must be after the stack fini() since - * that may be converting some internal representation of - * say srtt etc into the general one used by other stacks. - * Lets also at least protect against the so being NULL - * as RW stated below. + * XXXRW: 'so' may be NULL here, and/or socket buffer may be + * being torn down. Ideally this code would not use 'so'. */ - if ((tp->t_rttupdated >= 4) && (so != NULL)) { - struct hc_metrics_lite metrics; - uint32_t ssthresh; - - bzero(&metrics, sizeof(metrics)); + ssthresh = tp->snd_ssthresh; + if (ssthresh != 0 && ssthresh < so->so_snd.sb_hiwat / 2) { /* - * Update the ssthresh always when the conditions below - * are satisfied. This gives us better new start value - * for the congestion avoidance for new connections. - * ssthresh is only set if packet loss occurred on a session. - * - * XXXRW: 'so' may be NULL here, and/or socket buffer may be - * being torn down. Ideally this code would not use 'so'. + * convert the limit from user data bytes to + * packets then to packet data bytes. */ - ssthresh = tp->snd_ssthresh; - if (ssthresh != 0 && ssthresh < so->so_snd.sb_hiwat / 2) { - /* - * convert the limit from user data bytes to - * packets then to packet data bytes. - */ - ssthresh = (ssthresh + tp->t_maxseg / 2) / tp->t_maxseg; - if (ssthresh < 2) - ssthresh = 2; - ssthresh *= (tp->t_maxseg + + ssthresh = (ssthresh + tp->t_maxseg / 2) / tp->t_maxseg; + if (ssthresh < 2) + ssthresh = 2; + ssthresh *= (tp->t_maxseg + #ifdef INET6 - (isipv6 ? sizeof (struct ip6_hdr) + - sizeof (struct tcphdr) : + (isipv6 ? sizeof (struct ip6_hdr) + + sizeof (struct tcphdr) : #endif - sizeof (struct tcpiphdr) + sizeof (struct tcpiphdr) #ifdef INET6 - ) + ) #endif - ); - } else - ssthresh = 0; - metrics.rmx_ssthresh = ssthresh; + ); + } else + ssthresh = 0; + metrics.rmx_ssthresh = ssthresh; - metrics.rmx_rtt = tp->t_srtt; - metrics.rmx_rttvar = tp->t_rttvar; - metrics.rmx_cwnd = tp->snd_cwnd; - metrics.rmx_sendpipe = 0; - metrics.rmx_recvpipe = 0; + metrics.rmx_rtt = tp->t_srtt; + metrics.rmx_rttvar = tp->t_rttvar; + metrics.rmx_cwnd = tp->snd_cwnd; + metrics.rmx_sendpipe = 0; + metrics.rmx_recvpipe = 0; - tcp_hc_update(&inp->inp_inc, &metrics); - } - refcount_release(&tp->t_fb->tfb_refcnt); - tp->t_inpcb = NULL; - uma_zfree(V_tcpcb_zone, tp); - released = in_pcbrele_wlocked(inp); - KASSERT(!released, ("%s: inp %p should not have been released " - "here", __func__, inp)); + tcp_hc_update(&inp->inp_inc, &metrics); } -} -void -tcp_timer_discard(void *ptp) -{ - struct inpcb *inp; - struct tcpcb *tp; - struct epoch_tracker et; + refcount_release(&tp->t_fb->tfb_refcnt); + uma_zfree(V_tcpcb_zone, tp); - tp = (struct tcpcb *)ptp; - CURVNET_SET(tp->t_vnet); - NET_EPOCH_ENTER(et); - inp = tp->t_inpcb; - KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", - __func__, tp)); - INP_WLOCK(inp); - KASSERT((tp->t_timers->tt_flags & TT_STOPPED) != 0, - ("%s: tcpcb has to be stopped here", __func__)); - tp->t_timers->tt_draincnt--; - if (tp->t_timers->tt_draincnt == 0) { - /* We own the last reference on this tcpcb, let's free it. */ -#ifdef TCP_BLACKBOX - tcp_log_tcpcbfini(tp); -#endif - TCPSTATES_DEC(tp->t_state); - if (tp->t_fb->tfb_tcp_fb_fini) - (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); - refcount_release(&tp->t_fb->tfb_refcnt); - tp->t_inpcb = NULL; - uma_zfree(V_tcpcb_zone, tp); - if (in_pcbrele_wlocked(inp)) { - NET_EPOCH_EXIT(et); - CURVNET_RESTORE(); - return; - } - } - INP_WUNLOCK(inp); - NET_EPOCH_EXIT(et); - CURVNET_RESTORE(); + return (in_pcbrele_wlocked(inp)); } /* diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index feea3765821c..67e550b83bce 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -1042,6 +1042,29 @@ tcp_timers_unsuspend(struct tcpcb *tp, uint32_t timer_type) } } +static void +tcp_timer_discard(void *ptp) +{ + struct inpcb *inp; + struct tcpcb *tp; + struct epoch_tracker et; + + tp = (struct tcpcb *)ptp; + CURVNET_SET(tp->t_vnet); + NET_EPOCH_ENTER(et); + inp = tp->t_inpcb; + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", + __func__, tp)); + INP_WLOCK(inp); + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) != 0, + ("%s: tcpcb has to be stopped here", __func__)); + if (--tp->t_timers->tt_draincnt > 0 || + tcp_freecb(tp) == false) + INP_WUNLOCK(inp); + NET_EPOCH_EXIT(et); + CURVNET_RESTORE(); +} + void tcp_timer_stop(struct tcpcb *tp, uint32_t timer_type) { diff --git a/sys/netinet/tcp_timer.h b/sys/netinet/tcp_timer.h index 9a711d173386..c5317d1a4155 100644 --- a/sys/netinet/tcp_timer.h +++ b/sys/netinet/tcp_timer.h @@ -217,7 +217,6 @@ void tcp_inpinfo_lock_del(struct inpcb *inp, struct tcpcb *tp); void tcp_timer_init(void); void tcp_timer_2msl(void *xtp); -void tcp_timer_discard(void *); struct tcptw * tcp_tw_2msl_scan(int reuse); /* XXX temporary? */ void tcp_timer_keep(void *xtp); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 1511da3c70fd..46d00914354f 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -967,6 +967,7 @@ int tcp_ccalgounload(struct cc_algo *unload_algo); struct tcpcb * tcp_close(struct tcpcb *); void tcp_discardcb(struct tcpcb *); +bool tcp_freecb(struct tcpcb *); void tcp_twstart(struct tcpcb *); void tcp_twclose(struct tcptw *, int); void tcp_ctlinput(int, struct sockaddr *, void *); From nobody Fri Nov 19 04:36:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5CF04188DE0F; Fri, 19 Nov 2021 04:36: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 4HwP502Fjpz3pkB; Fri, 19 Nov 2021 04:36:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 298D922024; Fri, 19 Nov 2021 04:36: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 1AJ4aaDj034183; Fri, 19 Nov 2021 04:36:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4aa59034182; Fri, 19 Nov 2021 04:36:36 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:36 GMT Message-Id: <202111190436.1AJ4aa59034182@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: ec3bd288b6e9 - stable/13 - rtld: add rtld_fdprintfx() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ec3bd288b6e96b6008377cafd87de71a7f84b884 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ec3bd288b6e96b6008377cafd87de71a7f84b884 commit ec3bd288b6e96b6008377cafd87de71a7f84b884 Author: Konstantin Belousov AuthorDate: 2021-11-13 01:49:22 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:27 +0000 rtld: add rtld_fdprintfx() (cherry picked from commit 77c088ab2109a376b71decce80e89d4f20ef8223) --- libexec/rtld-elf/rtld_printf.c | 12 ++++++++++++ libexec/rtld-elf/rtld_printf.h | 1 + 2 files changed, 13 insertions(+) diff --git a/libexec/rtld-elf/rtld_printf.c b/libexec/rtld-elf/rtld_printf.c index aedaf5104e31..48a148f72dff 100644 --- a/libexec/rtld-elf/rtld_printf.c +++ b/libexec/rtld-elf/rtld_printf.c @@ -489,6 +489,18 @@ rtld_fdprintf(int fd, const char *fmt, ...) return (retval); } +int +rtld_fdprintfx(int fd, const char *fmt, ...) +{ + va_list ap; + int retval; + + va_start(ap, fmt); + retval = rtld_vfdprintf(fd, fmt, ap); + va_end(ap); + return (retval); +} + void rtld_fdputstr(int fd, const char *str) { diff --git a/libexec/rtld-elf/rtld_printf.h b/libexec/rtld-elf/rtld_printf.h index 3d3a0480ecce..e2fac948dc53 100644 --- a/libexec/rtld-elf/rtld_printf.h +++ b/libexec/rtld-elf/rtld_printf.h @@ -39,6 +39,7 @@ int rtld_snprintf(char *buf, size_t bufsize, const char *fmt, ...) int rtld_vsnprintf(char *buf, size_t bufsize, const char *fmt, va_list ap); int rtld_vfdprintf(int fd, const char *fmt, va_list ap); int rtld_fdprintf(int fd, const char *fmt, ...) __printflike(2, 3); +int rtld_fdprintfx(int fd, const char *fmt, ...); void rtld_fdputstr(int fd, const char *str); void rtld_fdputchar(int fd, int c); From nobody Fri Nov 19 04:36:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C4495188DDB1; Fri, 19 Nov 2021 04:36: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 4HwP513D0Pz3px3; Fri, 19 Nov 2021 04:36:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C85121EA6; Fri, 19 Nov 2021 04:36: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 1AJ4ab8Q034210; Fri, 19 Nov 2021 04:36:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4abw8034209; Fri, 19 Nov 2021 04:36:37 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:37 GMT Message-Id: <202111190436.1AJ4abw8034209@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: 8ade0046f60b - stable/13 - rtld: Implement LD_SHOW_AUXV List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8ade0046f60bfc5491662ae363736638aaaf6640 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8ade0046f60bfc5491662ae363736638aaaf6640 commit 8ade0046f60bfc5491662ae363736638aaaf6640 Author: Konstantin Belousov AuthorDate: 2021-11-13 01:18:13 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:27 +0000 rtld: Implement LD_SHOW_AUXV (cherry picked from commit 64ba1f4cf3a6847a1dacf4bab0409d94898fa168) --- libexec/rtld-elf/rtld.1 | 7 +++++- libexec/rtld-elf/rtld.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1 index 187dc105667a..66aa2bdabd17 100644 --- a/libexec/rtld-elf/rtld.1 +++ b/libexec/rtld-elf/rtld.1 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2021 +.Dd November 13, 2021 .Dt RTLD 1 .Os .Sh NAME @@ -309,6 +309,11 @@ will process the filtee dependencies of the loaded objects immediately, instead of postponing it until required. Normally, the filtees are opened at the time of the first symbol resolution from the filter object. +.It Ev LD_SHOW_AUXV +If set, causes +.Nm +to dump content of the aux vector to standard output, before passing +control to any user code. .El .Sh DIRECT EXECUTION MODE .Nm diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index c173c5a6e22e..0475134b0d96 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -104,6 +104,7 @@ static Obj_Entry *dlopen_object(const char *name, int fd, Obj_Entry *refobj, static Obj_Entry *do_load_object(int, const char *, char *, struct stat *, int); static int do_search_info(const Obj_Entry *obj, int, struct dl_serinfo *); static bool donelist_check(DoneList *, const Obj_Entry *); +static void dump_auxv(Elf_Auxinfo **aux_info); static void errmsg_restore(struct dlerror_save *); static struct dlerror_save *errmsg_save(void); static void *fill_search_info(const char *, size_t, void *); @@ -364,6 +365,7 @@ enum { LD_TRACE_LOADED_OBJECTS_FMT1, LD_TRACE_LOADED_OBJECTS_FMT2, LD_TRACE_LOADED_OBJECTS_ALL, + LD_SHOW_AUXV, }; struct ld_env_var_desc { @@ -396,6 +398,7 @@ static struct ld_env_var_desc ld_env_vars[] = { LD_ENV_DESC(TRACE_LOADED_OBJECTS_FMT1, false), LD_ENV_DESC(TRACE_LOADED_OBJECTS_FMT2, false), LD_ENV_DESC(TRACE_LOADED_OBJECTS_ALL, false), + LD_ENV_DESC(SHOW_AUXV, false), }; static const char * @@ -857,6 +860,9 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) if (rtld_verify_versions(&list_main) == -1 && !ld_tracing) rtld_die(); + if (ld_get_env_var(LD_SHOW_AUXV) != NULL) + dump_auxv(aux_info); + if (ld_tracing) { /* We're done */ trace_loaded_objects(obj_main); exit(0); @@ -6058,6 +6064,67 @@ print_usage(const char *argv0) " Arguments to the executed process\n", argv0); } +#define AUXFMT(at, xfmt) [at] = { .name = #at, .fmt = xfmt } +static const struct auxfmt { + const char *name; + const char *fmt; +} auxfmts[] = { + AUXFMT(AT_NULL, NULL), + AUXFMT(AT_IGNORE, NULL), + AUXFMT(AT_EXECFD, "%d"), + AUXFMT(AT_PHDR, "%p"), + AUXFMT(AT_PHENT, "%u"), + AUXFMT(AT_PHNUM, "%u"), + AUXFMT(AT_PAGESZ, "%u"), + AUXFMT(AT_BASE, "%#lx"), + AUXFMT(AT_FLAGS, "%#lx"), + AUXFMT(AT_ENTRY, "%p"), + AUXFMT(AT_NOTELF, NULL), + AUXFMT(AT_UID, "%d"), + AUXFMT(AT_EUID, "%d"), + AUXFMT(AT_GID, "%d"), + AUXFMT(AT_EGID, "%d"), + AUXFMT(AT_EXECPATH, "%s"), + AUXFMT(AT_CANARY, "%p"), + AUXFMT(AT_CANARYLEN, "%u"), + AUXFMT(AT_OSRELDATE, "%u"), + AUXFMT(AT_NCPUS, "%u"), + AUXFMT(AT_PAGESIZES, "%p"), + AUXFMT(AT_PAGESIZESLEN, "%u"), + AUXFMT(AT_TIMEKEEP, "%p"), + AUXFMT(AT_STACKPROT, "%#x"), + AUXFMT(AT_EHDRFLAGS, "%#lx"), + AUXFMT(AT_HWCAP, "%#lx"), + AUXFMT(AT_HWCAP2, "%#lx"), + AUXFMT(AT_BSDFLAGS, "%#lx"), + AUXFMT(AT_ARGC, "%u"), + AUXFMT(AT_ARGV, "%p"), + AUXFMT(AT_ENVC, "%p"), + AUXFMT(AT_ENVV, "%p"), + AUXFMT(AT_PS_STRINGS, "%p"), + AUXFMT(AT_FXRNG, "%p"), +}; + +static void +dump_auxv(Elf_Auxinfo **aux_info) +{ + Elf_Auxinfo *auxp; + const struct auxfmt *fmt; + int i; + + for (i = 0; i < AT_COUNT; i++) { + auxp = aux_info[i]; + if (auxp == NULL) + continue; + fmt = &auxfmts[i]; + if (fmt->fmt == NULL) + continue; + rtld_fdprintf(STDOUT_FILENO, "%s:\t", fmt->name); + rtld_fdprintfx(STDOUT_FILENO, fmt->fmt, auxp->a_un.a_ptr); + rtld_fdprintf(STDOUT_FILENO, "\n"); + } +} + /* * Overrides for libc_pic-provided functions. */ From nobody Fri Nov 19 04:36:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 140BE188DCC4; Fri, 19 Nov 2021 04:36: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 4HwP525GJgz3ppM; Fri, 19 Nov 2021 04:36:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D2CA2219B; Fri, 19 Nov 2021 04:36: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 1AJ4acGw034234; Fri, 19 Nov 2021 04:36:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4ac64034233; Fri, 19 Nov 2021 04:36:38 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:38 GMT Message-Id: <202111190436.1AJ4ac64034233@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: f363b08c6d5f - stable/13 - rtld dump_auxv: consistently use long modifier for non-pointer auxv vals List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f363b08c6d5f3f3df0f6f301b08348cf003beac1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f363b08c6d5f3f3df0f6f301b08348cf003beac1 commit f363b08c6d5f3f3df0f6f301b08348cf003beac1 Author: Konstantin Belousov AuthorDate: 2021-11-13 19:03:48 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:27 +0000 rtld dump_auxv: consistently use long modifier for non-pointer auxv vals (cherry picked from commit 3a902ef253853e367bd755222ed8fe4f101fbf2c) --- libexec/rtld-elf/rtld.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 0475134b0d96..4c3762ee1ab9 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -6071,33 +6071,33 @@ static const struct auxfmt { } auxfmts[] = { AUXFMT(AT_NULL, NULL), AUXFMT(AT_IGNORE, NULL), - AUXFMT(AT_EXECFD, "%d"), + AUXFMT(AT_EXECFD, "%ld"), AUXFMT(AT_PHDR, "%p"), - AUXFMT(AT_PHENT, "%u"), - AUXFMT(AT_PHNUM, "%u"), - AUXFMT(AT_PAGESZ, "%u"), + AUXFMT(AT_PHENT, "%lu"), + AUXFMT(AT_PHNUM, "%lu"), + AUXFMT(AT_PAGESZ, "%lu"), AUXFMT(AT_BASE, "%#lx"), AUXFMT(AT_FLAGS, "%#lx"), AUXFMT(AT_ENTRY, "%p"), AUXFMT(AT_NOTELF, NULL), - AUXFMT(AT_UID, "%d"), - AUXFMT(AT_EUID, "%d"), - AUXFMT(AT_GID, "%d"), - AUXFMT(AT_EGID, "%d"), + AUXFMT(AT_UID, "%ld"), + AUXFMT(AT_EUID, "%ld"), + AUXFMT(AT_GID, "%ld"), + AUXFMT(AT_EGID, "%ld"), AUXFMT(AT_EXECPATH, "%s"), AUXFMT(AT_CANARY, "%p"), - AUXFMT(AT_CANARYLEN, "%u"), - AUXFMT(AT_OSRELDATE, "%u"), - AUXFMT(AT_NCPUS, "%u"), + AUXFMT(AT_CANARYLEN, "%lu"), + AUXFMT(AT_OSRELDATE, "%lu"), + AUXFMT(AT_NCPUS, "%lu"), AUXFMT(AT_PAGESIZES, "%p"), - AUXFMT(AT_PAGESIZESLEN, "%u"), + AUXFMT(AT_PAGESIZESLEN, "%lu"), AUXFMT(AT_TIMEKEEP, "%p"), - AUXFMT(AT_STACKPROT, "%#x"), + AUXFMT(AT_STACKPROT, "%#lx"), AUXFMT(AT_EHDRFLAGS, "%#lx"), AUXFMT(AT_HWCAP, "%#lx"), AUXFMT(AT_HWCAP2, "%#lx"), AUXFMT(AT_BSDFLAGS, "%#lx"), - AUXFMT(AT_ARGC, "%u"), + AUXFMT(AT_ARGC, "%lu"), AUXFMT(AT_ARGV, "%p"), AUXFMT(AT_ENVC, "%p"), AUXFMT(AT_ENVV, "%p"), From nobody Fri Nov 19 04:36:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 923CF188DC59; Fri, 19 Nov 2021 04:36: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 4HwP540HjDz3ps3; Fri, 19 Nov 2021 04:36:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8EBD721FA6; Fri, 19 Nov 2021 04:36: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 1AJ4ad2E034258; Fri, 19 Nov 2021 04:36:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4adLs034257; Fri, 19 Nov 2021 04:36:39 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:39 GMT Message-Id: <202111190436.1AJ4adLs034257@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: b26ac07d6c6c - stable/13 - rtld dump_auxv: be pedantic and distiguish between auxv union members based on format List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b26ac07d6c6cba8447b9ae597473b6777a843c27 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b26ac07d6c6cba8447b9ae597473b6777a843c27 commit b26ac07d6c6cba8447b9ae597473b6777a843c27 Author: Konstantin Belousov AuthorDate: 2021-11-13 19:04:51 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:27 +0000 rtld dump_auxv: be pedantic and distiguish between auxv union members based on format (cherry picked from commit b61bce17f346d79cecfd8f195a64b10f77be43b1) --- libexec/rtld-elf/rtld.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 4c3762ee1ab9..d5c3d2893582 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -6105,6 +6105,15 @@ static const struct auxfmt { AUXFMT(AT_FXRNG, "%p"), }; +static bool +is_ptr_fmt(const char *fmt) +{ + char last; + + last = fmt[strlen(fmt) - 1]; + return (last == 'p' || last == 's'); +} + static void dump_auxv(Elf_Auxinfo **aux_info) { @@ -6120,7 +6129,13 @@ dump_auxv(Elf_Auxinfo **aux_info) if (fmt->fmt == NULL) continue; rtld_fdprintf(STDOUT_FILENO, "%s:\t", fmt->name); - rtld_fdprintfx(STDOUT_FILENO, fmt->fmt, auxp->a_un.a_ptr); + if (is_ptr_fmt(fmt->fmt)) { + rtld_fdprintfx(STDOUT_FILENO, fmt->fmt, + auxp->a_un.a_ptr); + } else { + rtld_fdprintfx(STDOUT_FILENO, fmt->fmt, + auxp->a_un.a_val); + } rtld_fdprintf(STDOUT_FILENO, "\n"); } } From nobody Fri Nov 19 04:36:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ADC4A188DDE0; Fri, 19 Nov 2021 04:36: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 4HwP552kHzz3pmV; Fri, 19 Nov 2021 04:36:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0EB721EA7; Fri, 19 Nov 2021 04:36: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 1AJ4aeuC034282; Fri, 19 Nov 2021 04:36:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4aeWB034281; Fri, 19 Nov 2021 04:36:40 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:40 GMT Message-Id: <202111190436.1AJ4aeWB034281@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: e631f3e04e40 - stable/13 - procstat auxv: print out FXRNG List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e631f3e04e4083b456d24cd0d2679d6a04900c33 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e631f3e04e4083b456d24cd0d2679d6a04900c33 commit e631f3e04e4083b456d24cd0d2679d6a04900c33 Author: Konstantin Belousov AuthorDate: 2021-11-13 20:55:52 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:27 +0000 procstat auxv: print out FXRNG (cherry picked from commit 0864ab3d3235f22c45f3790b2eb94974a51af062) --- usr.bin/procstat/procstat_auxv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.bin/procstat/procstat_auxv.c b/usr.bin/procstat/procstat_auxv.c index 0b540de973de..f868b7ed2381 100644 --- a/usr.bin/procstat/procstat_auxv.c +++ b/usr.bin/procstat/procstat_auxv.c @@ -233,6 +233,12 @@ procstat_auxv(struct procstat *procstat, struct kinfo_proc *kipp) xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_PS_STRINGS/%p}\n", prefix, "AT_PS_STRINGS", auxv[i].a_un.a_ptr); break; +#endif +#ifdef AT_FXRNG + case AT_FXRNG: + xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_FXRNG/%p}\n", + prefix, "AT_FXRNG", auxv[i].a_un.a_ptr); + break; #endif default: xo_emit("{dw:/%s}{Lw:/%16ld/%ld}{:UNKNOWN/%#lx}\n", From nobody Fri Nov 19 04:36:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6ACB0188DD70; Fri, 19 Nov 2021 04:36: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 4HwP560CVcz3pkf; Fri, 19 Nov 2021 04:36:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C7DA721EA8; Fri, 19 Nov 2021 04:36: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 1AJ4afjW034306; Fri, 19 Nov 2021 04:36:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4afx7034305; Fri, 19 Nov 2021 04:36:41 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:41 GMT Message-Id: <202111190436.1AJ4afx7034305@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: e8b954f136a7 - stable/13 - ldd: also use exec mode for -a List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e8b954f136a7af19c44e16c11335abb9fb5fa7d1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e8b954f136a7af19c44e16c11335abb9fb5fa7d1 commit e8b954f136a7af19c44e16c11335abb9fb5fa7d1 Author: Konstantin Belousov AuthorDate: 2021-11-15 20:45:51 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:28 +0000 ldd: also use exec mode for -a PR: 259069 (cherry picked from commit 7d20a08076b4c9d4513585a01fc57c39be654edf) --- usr.bin/ldd/ldd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index 492e29dff211..c16b6f5e8496 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -236,7 +236,7 @@ main(int argc, char *argv[]) if (is_shlib == 0) { execl(*argv, *argv, (char *)NULL); warn("%s", *argv); - } else if (fmt1 == NULL && fmt2 == NULL) { + } else if (fmt1 == NULL && fmt2 == NULL && !aflag) { dlopen(*argv, RTLD_TRACE); warnx("%s: %s", *argv, dlerror()); } else { From nobody Fri Nov 19 04:36:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2720B188E01F; Fri, 19 Nov 2021 04:36:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwP574JcGz3pxc; Fri, 19 Nov 2021 04:36:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DEFD4218EC; Fri, 19 Nov 2021 04:36: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 1AJ4agXL034338; Fri, 19 Nov 2021 04:36:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4ag31034337; Fri, 19 Nov 2021 04:36:42 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:42 GMT Message-Id: <202111190436.1AJ4ag31034337@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: 77ddf3808b60 - stable/13 - geom_vfs: lock devvp in g_vfs_close() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 77ddf3808b60e1e1fb521e14462561055d00ba58 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=77ddf3808b60e1e1fb521e14462561055d00ba58 commit 77ddf3808b60e1e1fb521e14462561055d00ba58 Author: Konstantin Belousov AuthorDate: 2021-11-01 05:46:52 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:28 +0000 geom_vfs: lock devvp in g_vfs_close() (cherry picked from commit 8db7d16526debbca6bc7a32a57fd0378e48e37de) --- sys/geom/geom_vfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c index f01765b8ee30..b69610c4615e 100644 --- a/sys/geom/geom_vfs.c +++ b/sys/geom/geom_vfs.c @@ -286,12 +286,16 @@ g_vfs_close(struct g_consumer *cp) { struct g_geom *gp; struct g_vfs_softc *sc; + struct vnode *vp; g_topology_assert(); gp = cp->geom; sc = gp->softc; + vp = cp->private; + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); bufobj_invalbuf(sc->sc_bo, V_SAVE, 0, 0); + VOP_UNLOCK(vp); sc->sc_bo->bo_private = cp->private; gp->softc = NULL; mtx_destroy(&sc->sc_mtx); From nobody Fri Nov 19 04:36:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 40EF8188DCEF; Fri, 19 Nov 2021 04:36:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwP583gP2z3q0j; Fri, 19 Nov 2021 04:36:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05CAE218ED; Fri, 19 Nov 2021 04:36: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 1AJ4ahpk034362; Fri, 19 Nov 2021 04:36:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4ahjr034361; Fri, 19 Nov 2021 04:36:43 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:43 GMT Message-Id: <202111190436.1AJ4ahjr034361@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: 4c04226222e4 - stable/13 - getblk(): do not require devvp vnodes to be locked List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4c04226222e499a47dd89988bcbd6df1362c6f4f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4c04226222e499a47dd89988bcbd6df1362c6f4f commit 4c04226222e499a47dd89988bcbd6df1362c6f4f Author: Konstantin Belousov AuthorDate: 2021-11-01 07:14:01 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:28 +0000 getblk(): do not require devvp vnodes to be locked (cherry picked from commit a7b4a54d2c02822d36bb51b1e4450e1bc14ba73a) --- sys/kern/vfs_bio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 6ce445cbf2ee..1e58339446a9 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3902,7 +3902,8 @@ getblkx(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int slpflag, CTR3(KTR_BUF, "getblk(%p, %ld, %d)", vp, (long)blkno, size); KASSERT((flags & (GB_UNMAPPED | GB_KVAALLOC)) != GB_KVAALLOC, ("GB_KVAALLOC only makes sense with GB_UNMAPPED")); - ASSERT_VOP_LOCKED(vp, "getblk"); + if (vp->v_type != VCHR) + ASSERT_VOP_LOCKED(vp, "getblk"); if (size > maxbcachebuf) panic("getblk: size(%d) > maxbcachebuf(%d)\n", size, maxbcachebuf); From nobody Fri Nov 19 04:36:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4F867188DFEA; Fri, 19 Nov 2021 04:36: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 4HwP5B6Qrgz3pdq; Fri, 19 Nov 2021 04:36:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 502BF2219C; Fri, 19 Nov 2021 04:36: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 1AJ4akC0034410; Fri, 19 Nov 2021 04:36:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4ak7L034409; Fri, 19 Nov 2021 04:36:46 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:46 GMT Message-Id: <202111190436.1AJ4ak7L034409@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: c4585660d2bf - stable/13 - mntfs: lock mntfs pseudo devfs vnode properly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c4585660d2bf58de2f32a19885e1d98bfd835439 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c4585660d2bf58de2f32a19885e1d98bfd835439 commit c4585660d2bf58de2f32a19885e1d98bfd835439 Author: Konstantin Belousov AuthorDate: 2021-11-01 12:28:32 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:28 +0000 mntfs: lock mntfs pseudo devfs vnode properly (cherry picked from commit 25809a018db3c9f3be838c10576d2bb070cc055a) --- sys/fs/mntfs/mntfs_vnops.c | 4 ++-- sys/ufs/ffs/ffs_vfsops.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/fs/mntfs/mntfs_vnops.c b/sys/fs/mntfs/mntfs_vnops.c index 2708bc5d319f..4eb12a679590 100644 --- a/sys/fs/mntfs/mntfs_vnops.c +++ b/sys/fs/mntfs/mntfs_vnops.c @@ -89,7 +89,7 @@ mntfs_allocvp(struct mount *mp, struct vnode *ovp) void mntfs_freevp(struct vnode *vp) { - + ASSERT_VOP_ELOCKED(vp, "mntfs_freevp"); vgone(vp); - vrele(vp); + vput(vp); } diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index b8f7c3821bf7..8d0d00bb0231 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -956,6 +956,7 @@ ffs_mountfs(odevvp, mp, td) devvp = mntfs_allocvp(mp, odevvp); VOP_UNLOCK(odevvp); + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); KASSERT(devvp->v_type == VCHR, ("reclaimed devvp")); dev = devvp->v_rdev; KASSERT(dev->si_snapdata == NULL, ("non-NULL snapshot data")); @@ -977,6 +978,7 @@ ffs_mountfs(odevvp, mp, td) BO_LOCK(&odevvp->v_bufobj); odevvp->v_bufobj.bo_flag |= BO_NOBUFS; BO_UNLOCK(&odevvp->v_bufobj); + VOP_UNLOCK(devvp); if (dev->si_iosize_max != 0) mp->mnt_iosize_max = dev->si_iosize_max; if (mp->mnt_iosize_max > maxphys) @@ -1264,6 +1266,7 @@ out: odevvp->v_bufobj.bo_flag &= ~BO_NOBUFS; BO_UNLOCK(&odevvp->v_bufobj); atomic_store_rel_ptr((uintptr_t *)&dev->si_mountpt, 0); + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); mntfs_freevp(devvp); dev_rel(dev); return (error); @@ -1466,6 +1469,7 @@ ffs_unmount(mp, mntflags) ump->um_odevvp->v_bufobj.bo_flag &= ~BO_NOBUFS; BO_UNLOCK(&ump->um_odevvp->v_bufobj); atomic_store_rel_ptr((uintptr_t *)&ump->um_dev->si_mountpt, 0); + vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); mntfs_freevp(ump->um_devvp); vrele(ump->um_odevvp); dev_rel(ump->um_dev); From nobody Fri Nov 19 04:36:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 880F1188DEBB; Fri, 19 Nov 2021 04:36: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 4HwP596T8Vz3q0t; Fri, 19 Nov 2021 04:36:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B5D021D69; Fri, 19 Nov 2021 04:36: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 1AJ4ajUk034386; Fri, 19 Nov 2021 04:36:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4ajQV034385; Fri, 19 Nov 2021 04:36:45 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:45 GMT Message-Id: <202111190436.1AJ4ajQV034385@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: defbe7a7ca21 - stable/13 - ffs: Remove assertions about locked um_devvp in several 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: defbe7a7ca212fd93fc367f0d02ffa340635c4c4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=defbe7a7ca212fd93fc367f0d02ffa340635c4c4 commit defbe7a7ca212fd93fc367f0d02ffa340635c4c4 Author: Konstantin Belousov AuthorDate: 2021-11-01 08:04:27 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:28 +0000 ffs: Remove assertions about locked um_devvp in several places (cherry picked from commit 76b05e3e399133b59fc3e740cab9ae362358c9d6) --- sys/ufs/ffs/ffs_alloc.c | 7 +++++-- sys/ufs/ffs/ffs_vfsops.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 6a262a798d1b..42708e3dce71 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -2251,9 +2251,12 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size, inum, dephd) MPASS(devvp->v_mount->mnt_data == ump); dev = ump->um_devvp->v_rdev; } else if (devvp->v_type == VCHR) { - /* devvp is a normal disk device */ + /* + * devvp is a normal disk device + * XXXKIB: devvp is not locked there, v_rdev access depends on + * busy mount, which prevents mntfs devvp from reclamation. + */ dev = devvp->v_rdev; - ASSERT_VOP_LOCKED(devvp, "ffs_blkfree_cg"); } else return; #ifdef INVARIANTS diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 0b96edff12ff..b8f7c3821bf7 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1544,7 +1544,7 @@ ffs_flushfiles(mp, flags, td) */ } #endif - ASSERT_VOP_LOCKED(ump->um_devvp, "ffs_flushfiles"); + /* devvp is not locked there */ if (ump->um_devvp->v_vflag & VV_COPYONWRITE) { if ((error = vflush(mp, 0, SKIPSYSTEM | flags, td)) != 0) return (error); From nobody Fri Nov 19 04:36:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D3D61188DECE; Fri, 19 Nov 2021 04:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwP5D5WJPz3pqC; Fri, 19 Nov 2021 04:36:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7CD8F21D6A; Fri, 19 Nov 2021 04:36: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 1AJ4am3X034466; Fri, 19 Nov 2021 04:36:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4amTr034465; Fri, 19 Nov 2021 04:36:48 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:48 GMT Message-Id: <202111190436.1AJ4amTr034465@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: 43215144c041 - stable/13 - g_vfs_close(): vp is unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 43215144c041b8f8502c268c72c3041b44e05540 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=43215144c041b8f8502c268c72c3041b44e05540 commit 43215144c041b8f8502c268c72c3041b44e05540 Author: Konstantin Belousov AuthorDate: 2021-11-18 03:02:59 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:29 +0000 g_vfs_close(): vp is unused (cherry picked from commit 4fdc5b8494b46007549b1932c64e11cf634599a1) --- sys/geom/geom_vfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c index ab9d4a001c76..f01765b8ee30 100644 --- a/sys/geom/geom_vfs.c +++ b/sys/geom/geom_vfs.c @@ -286,13 +286,11 @@ g_vfs_close(struct g_consumer *cp) { struct g_geom *gp; struct g_vfs_softc *sc; - struct vnode *vp; g_topology_assert(); gp = cp->geom; sc = gp->softc; - vp = cp->private; bufobj_invalbuf(sc->sc_bo, V_SAVE, 0, 0); sc->sc_bo->bo_private = cp->private; gp->softc = NULL; From nobody Fri Nov 19 04:36:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B2384188E20D; Fri, 19 Nov 2021 04:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwP5D2Lccz3py4; Fri, 19 Nov 2021 04:36:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C29721EA9; Fri, 19 Nov 2021 04:36: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 1AJ4alZj034436; Fri, 19 Nov 2021 04:36:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4alAf034433; Fri, 19 Nov 2021 04:36:47 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:47 GMT Message-Id: <202111190436.1AJ4alAf034433@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: 8d194cc56d93 - stable/13 - ffs: fix newly introduced LOR between mntfs vnode lock and topology lock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8d194cc56d935734ff47ad187ffe99601658d0ac Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8d194cc56d935734ff47ad187ffe99601658d0ac commit 8d194cc56d935734ff47ad187ffe99601658d0ac Author: Konstantin Belousov AuthorDate: 2021-11-16 17:31:11 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:28 +0000 ffs: fix newly introduced LOR between mntfs vnode lock and topology lock (cherry picked from commit c34a5148e8f21e9be28330c4ae4884b6f31193dd) --- sys/geom/geom_vfs.c | 2 -- sys/ufs/ffs/ffs_vfsops.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c index b69610c4615e..ab9d4a001c76 100644 --- a/sys/geom/geom_vfs.c +++ b/sys/geom/geom_vfs.c @@ -293,9 +293,7 @@ g_vfs_close(struct g_consumer *cp) gp = cp->geom; sc = gp->softc; vp = cp->private; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); bufobj_invalbuf(sc->sc_bo, V_SAVE, 0, 0); - VOP_UNLOCK(vp); sc->sc_bo->bo_private = cp->private; gp->softc = NULL; mtx_destroy(&sc->sc_mtx); diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 8d0d00bb0231..507f0b148fc5 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1462,6 +1462,7 @@ ffs_unmount(mp, mntflags) taskqueue_free(ump->um_trim_tq); free (ump->um_trimhash, M_TRIM); } + vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); g_topology_lock(); g_vfs_close(ump->um_cp); g_topology_unlock(); @@ -1469,7 +1470,6 @@ ffs_unmount(mp, mntflags) ump->um_odevvp->v_bufobj.bo_flag &= ~BO_NOBUFS; BO_UNLOCK(&ump->um_odevvp->v_bufobj); atomic_store_rel_ptr((uintptr_t *)&ump->um_dev->si_mountpt, 0); - vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); mntfs_freevp(ump->um_devvp); vrele(ump->um_odevvp); dev_rel(ump->um_dev); From nobody Fri Nov 19 04:36:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C4D01188E395; Fri, 19 Nov 2021 04:36: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 4HwP5H1fVdz3pvk; Fri, 19 Nov 2021 04:36:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C91332219D; Fri, 19 Nov 2021 04:36: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 1AJ4aofb034515; Fri, 19 Nov 2021 04:36:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4aocR034514; Fri, 19 Nov 2021 04:36:50 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:50 GMT Message-Id: <202111190436.1AJ4aocR034514@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: 3a12ea648f3b - stable/13 - freevnode(): lock the freeing vnode around destroy_vpollinfo() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3a12ea648f3b9a7de4fe08a3a9d3ea6d025e8f07 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3a12ea648f3b9a7de4fe08a3a9d3ea6d025e8f07 commit 3a12ea648f3b9a7de4fe08a3a9d3ea6d025e8f07 Author: Konstantin Belousov AuthorDate: 2021-11-02 02:49:13 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:29 +0000 freevnode(): lock the freeing vnode around destroy_vpollinfo() (cherry picked from commit d1d675cb304c3cca824fbc9f932dc9d655b1ad24) --- sys/kern/vfs_subr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index da2f90a44d86..ce1f4ed6126e 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1920,7 +1920,9 @@ freevnode(struct vnode *vp) mac_vnode_destroy(vp); #endif if (vp->v_pollinfo != NULL) { + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); destroy_vpollinfo(vp->v_pollinfo); + VOP_UNLOCK(vp); vp->v_pollinfo = NULL; } vp->v_mountedhere = NULL; From nobody Fri Nov 19 04:36:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 059F6188E22B; Fri, 19 Nov 2021 04:36: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 4HwP5G0JDQz3pnM; Fri, 19 Nov 2021 04:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A124021FA7; Fri, 19 Nov 2021 04:36: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 1AJ4ana1034490; Fri, 19 Nov 2021 04:36:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4anZu034489; Fri, 19 Nov 2021 04:36:49 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:49 GMT Message-Id: <202111190436.1AJ4anZu034489@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: bd625dc3e676 - stable/13 - ffs_snapshot: do not assert that um_devvp is locked List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: bd625dc3e6767f405d78dd1d5c23bb90fd36627f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bd625dc3e6767f405d78dd1d5c23bb90fd36627f commit bd625dc3e6767f405d78dd1d5c23bb90fd36627f Author: Konstantin Belousov AuthorDate: 2021-11-01 23:47:43 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:29 +0000 ffs_snapshot: do not assert that um_devvp is locked (cherry picked from commit eede22d66d0043bf46e0aeac9496bec0a52f87a1) --- sys/ufs/ffs/ffs_snapshot.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 5855a679ab84..a0d16d9eccef 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -2124,7 +2124,6 @@ ffs_snapshot_mount(mp) } VOP_UNLOCK(vp); VI_LOCK(devvp); - ASSERT_VOP_LOCKED(devvp, "ffs_snapshot_mount"); sn->sn_listsize = snaplistsize; sn->sn_blklist = (daddr_t *)snapblklist; devvp->v_vflag |= VV_COPYONWRITE; @@ -2172,7 +2171,6 @@ ffs_snapshot_unmount(mp) sn = devvp->v_rdev->si_snapdata; } try_free_snapdata(devvp); - ASSERT_VOP_LOCKED(devvp, "ffs_snapshot_unmount"); } /* From nobody Fri Nov 19 04:36:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AFC24188E1C0; Fri, 19 Nov 2021 04:36: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 4HwP5J3m0nz3q1L; Fri, 19 Nov 2021 04:36:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFD94218EE; Fri, 19 Nov 2021 04:36: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 1AJ4apsV034540; Fri, 19 Nov 2021 04:36:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4aphv034539; Fri, 19 Nov 2021 04:36:51 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:51 GMT Message-Id: <202111190436.1AJ4aphv034539@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: b9283ea323b2 - stable/13 - Make locking assertions for VOP_FSYNC() and VOP_FDATASYNC() more correct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b9283ea323b202579ce9e59c811672bcfc2eda53 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b9283ea323b202579ce9e59c811672bcfc2eda53 commit b9283ea323b202579ce9e59c811672bcfc2eda53 Author: Konstantin Belousov AuthorDate: 2021-11-03 22:28:32 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:29 +0000 Make locking assertions for VOP_FSYNC() and VOP_FDATASYNC() more correct (cherry picked from commit 47b248ac651683650f7852485c594e76ca375573) --- sys/kern/vfs_subr.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/kern/vnode_if.src | 8 ++++++-- sys/sys/vnode.h | 8 ++++++++ 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ce1f4ed6126e..ff208926be16 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -5580,6 +5580,54 @@ vop_fplookup_symlink_debugpost(void *ap __unused, int rc __unused) VFS_SMR_ASSERT_ENTERED(); } + +static void +vop_fsync_debugprepost(struct vnode *vp, const char *name) +{ + if (vp->v_type == VCHR) + ; + else if (MNT_EXTENDED_SHARED(vp->v_mount)) + ASSERT_VOP_LOCKED(vp, name); + else + ASSERT_VOP_ELOCKED(vp, name); +} + +void +vop_fsync_debugpre(void *a) +{ + struct vop_fsync_args *ap; + + ap = a; + vop_fsync_debugprepost(ap->a_vp, "fsync"); +} + +void +vop_fsync_debugpost(void *a, int rc __unused) +{ + struct vop_fsync_args *ap; + + ap = a; + vop_fsync_debugprepost(ap->a_vp, "fsync"); +} + +void +vop_fdatasync_debugpre(void *a) +{ + struct vop_fdatasync_args *ap; + + ap = a; + vop_fsync_debugprepost(ap->a_vp, "fsync"); +} + +void +vop_fdatasync_debugpost(void *a, int rc __unused) +{ + struct vop_fdatasync_args *ap; + + ap = a; + vop_fsync_debugprepost(ap->a_vp, "fsync"); +} + void vop_strategy_debugpre(void *ap) { diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index b506237f385d..ef4eef7f55f3 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -296,7 +296,9 @@ vop_revoke { }; -%% fsync vp L L L +%% fsync vp - - - +%! fsync pre vop_fsync_debugpre +%! fsync post vop_fsync_debugpost vop_fsync { IN struct vnode *vp; @@ -768,7 +770,9 @@ vop_add_writecount { }; -%% fdatasync vp L L L +%% fdatasync vp - - - +%! fdatasync pre vop_fdatasync_debugpre +%! fdatasync post vop_fdatasync_debugpost vop_fdatasync { IN struct vnode *vp; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index ebd9577004fc..ba5eafc80d4b 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -920,10 +920,14 @@ void vop_symlink_post(void *a, int rc); int vop_sigdefer(struct vop_vector *vop, struct vop_generic_args *a); #ifdef DEBUG_VFS_LOCKS +void vop_fdatasync_debugpre(void *a); +void vop_fdatasync_debugpost(void *a, int rc); void vop_fplookup_vexec_debugpre(void *a); void vop_fplookup_vexec_debugpost(void *a, int rc); void vop_fplookup_symlink_debugpre(void *a); void vop_fplookup_symlink_debugpost(void *a, int rc); +void vop_fsync_debugpre(void *a); +void vop_fsync_debugpost(void *a, int rc); void vop_strategy_debugpre(void *a); void vop_lock_debugpre(void *a); void vop_lock_debugpost(void *a, int rc); @@ -932,10 +936,14 @@ void vop_need_inactive_debugpre(void *a); void vop_need_inactive_debugpost(void *a, int rc); void vop_mkdir_debugpost(void *a, int rc); #else +#define vop_fdatasync_debugpre(x) do { } while (0) +#define vop_fdatasync_debugpost(x, y) do { } while (0) #define vop_fplookup_vexec_debugpre(x) do { } while (0) #define vop_fplookup_vexec_debugpost(x, y) do { } while (0) #define vop_fplookup_symlink_debugpre(x) do { } while (0) #define vop_fplookup_symlink_debugpost(x, y) do { } while (0) +#define vop_fsync_debugpre(x) do { } while (0) +#define vop_fsync_debugpost(x, y) do { } while (0) #define vop_strategy_debugpre(x) do { } while (0) #define vop_lock_debugpre(x) do { } while (0) #define vop_lock_debugpost(x, y) do { } while (0) From nobody Fri Nov 19 04:36:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2AEA4188E24B; Fri, 19 Nov 2021 04:36: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 4HwP5K5QbFz3q5y; Fri, 19 Nov 2021 04:36:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1CA8A21FA8; Fri, 19 Nov 2021 04:36: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 1AJ4arAQ034565; Fri, 19 Nov 2021 04:36:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4arjM034564; Fri, 19 Nov 2021 04:36:53 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:53 GMT Message-Id: <202111190436.1AJ4arjM034564@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: ccea961fcc83 - stable/13 - nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ccea961fcc83b0d9011d75c488216cf6770042c7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ccea961fcc83b0d9011d75c488216cf6770042c7 commit ccea961fcc83b0d9011d75c488216cf6770042c7 Author: Konstantin Belousov AuthorDate: 2021-11-15 20:24:46 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:29 +0000 nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers (cherry picked from commit 8ef0c11e7ce79106130012cb929a8324045f7ff9) --- sys/fs/nfsclient/nfs_clvnops.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index cd8077e243ea..5ae731d1b5e3 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -645,6 +645,11 @@ nfs_open(struct vop_open_args *ap) NFSLOCKNODE(np); if (np->n_flag & NMODIFIED) { NFSUNLOCKNODE(np); + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp)) + return (EBADF); + } error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error == EINTR || error == EIO) { if (NFS_ISV4(vp)) @@ -681,6 +686,11 @@ nfs_open(struct vop_open_args *ap) if (vp->v_type == VDIR) np->n_direofoffset = 0; NFSUNLOCKNODE(np); + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp)) + return (EBADF); + } error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error == EINTR || error == EIO) { if (NFS_ISV4(vp)) @@ -701,6 +711,11 @@ nfs_open(struct vop_open_args *ap) (vp->v_type == VREG)) { if (np->n_directio_opens == 0) { NFSUNLOCKNODE(np); + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp)) + return (EBADF); + } error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error) { if (NFS_ISV4(vp)) @@ -746,6 +761,11 @@ nfs_open(struct vop_open_args *ap) if (vp->v_writecount <= -1) { if ((obj = vp->v_object) != NULL && vm_object_mightbedirty(obj)) { + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp)) + return (EBADF); + } VM_OBJECT_WLOCK(obj); vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); VM_OBJECT_WUNLOCK(obj); @@ -829,6 +849,11 @@ nfs_close(struct vop_close_args *ap) * mmap'ed writes or via write(). */ if (nfs_clean_pages_on_close && vp->v_object) { + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp) && ap->a_fflag != FNONBLOCK) + return (EBADF); + } VM_OBJECT_WLOCK(vp->v_object); vm_object_page_clean(vp->v_object, 0, 0, 0); VM_OBJECT_WUNLOCK(vp->v_object); @@ -853,11 +878,22 @@ nfs_close(struct vop_close_args *ap) * traditional vnode locking implemented for Vnode Ops. */ int cm = newnfs_commit_on_close ? 1 : 0; + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp) && ap->a_fflag != FNONBLOCK) + return (EBADF); + } error = ncl_flush(vp, MNT_WAIT, ap->a_td, cm, 0); /* np->n_flag &= ~NMODIFIED; */ } else if (NFS_ISV4(vp)) { if (nfscl_mustflush(vp) != 0) { int cm = newnfs_commit_on_close ? 1 : 0; + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp) && ap->a_fflag != + FNONBLOCK) + return (EBADF); + } error = ncl_flush(vp, MNT_WAIT, ap->a_td, cm, 0); /* @@ -867,6 +903,12 @@ nfs_close(struct vop_close_args *ap) */ } } else { + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if (VN_IS_DOOMED(vp) && ap->a_fflag != + FNONBLOCK) + return (EBADF); + } error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); } NFSLOCKNODE(np); From nobody Fri Nov 19 04:36:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ACE55188E25D; Fri, 19 Nov 2021 04:36: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 4HwP5M4CRkz3pqk; Fri, 19 Nov 2021 04:36:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 487DC21F35; Fri, 19 Nov 2021 04:36: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 1AJ4asDt034595; Fri, 19 Nov 2021 04:36:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4asRT034594; Fri, 19 Nov 2021 04:36:54 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:36:54 GMT Message-Id: <202111190436.1AJ4asRT034594@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: 19f2755d9ed1 - stable/13 - DEBUG_VFS_LOCKS: stop excluding devfs and doomed vnode from 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 19f2755d9ed1890c8c6a3a66b2493d69c6e0d0ee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=19f2755d9ed1890c8c6a3a66b2493d69c6e0d0ee commit 19f2755d9ed1890c8c6a3a66b2493d69c6e0d0ee Author: Konstantin Belousov AuthorDate: 2021-10-31 21:34:57 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-19 04:25:29 +0000 DEBUG_VFS_LOCKS: stop excluding devfs and doomed vnode from asserts (cherry picked from commit d032cda0d047869139f03cb6d34a18216a166735) --- sys/kern/vfs_subr.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ff208926be16..f56bedecaf15 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -5407,13 +5407,6 @@ extattr_check_cred(struct vnode *vp, int attrnamespace, struct ucred *cred, } #ifdef DEBUG_VFS_LOCKS -/* - * This only exists to suppress warnings from unlocked specfs accesses. It is - * no longer ok to have an unlocked VFS. - */ -#define IGNORE_LOCK(vp) (KERNEL_PANICKED() || (vp) == NULL || \ - (vp)->v_type == VCHR || (vp)->v_type == VBAD) - int vfs_badlock_ddb = 1; /* Drop into debugger on violation. */ SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, "Drop into debugger on lock violation"); @@ -5473,26 +5466,31 @@ assert_vop_locked(struct vnode *vp, const char *str) { int locked; - if (!IGNORE_LOCK(vp)) { - locked = VOP_ISLOCKED(vp); - if (locked == 0 || locked == LK_EXCLOTHER) - vfs_badlock("is not locked but should be", str, vp); - } + if (KERNEL_PANICKED() || vp == NULL) + return; + + locked = VOP_ISLOCKED(vp); + if (locked == 0 || locked == LK_EXCLOTHER) + vfs_badlock("is not locked but should be", str, vp); } void assert_vop_unlocked(struct vnode *vp, const char *str) { + if (KERNEL_PANICKED() || vp == NULL) + return; - if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) == LK_EXCLUSIVE) + if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) vfs_badlock("is locked but should not be", str, vp); } void assert_vop_elocked(struct vnode *vp, const char *str) { + if (KERNEL_PANICKED() || vp == NULL) + return; - if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) != LK_EXCLUSIVE) + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) vfs_badlock("is not exclusive locked but should be", str, vp); } #endif /* DEBUG_VFS_LOCKS */ From nobody Fri Nov 19 04:53:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C78F11897AD7; Fri, 19 Nov 2021 04:53: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 4HwPSK5Hq6z4Ths; Fri, 19 Nov 2021 04:53:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96E8722513; Fri, 19 Nov 2021 04:53: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 1AJ4rLEc061088; Fri, 19 Nov 2021 04:53:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4rLeD061087; Fri, 19 Nov 2021 04:53:21 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:53:21 GMT Message-Id: <202111190453.1AJ4rLeD061087@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: 8d7e5c90e989 - stable/13 - arm64: Spell BeagleBone correctly in config 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d7e5c90e9894fec4a71d2f653344ae5aea4fabd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8d7e5c90e9894fec4a71d2f653344ae5aea4fabd commit 8d7e5c90e9894fec4a71d2f653344ae5aea4fabd Author: Tom Hukins AuthorDate: 2021-11-19 04:51:12 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:52:21 +0000 arm64: Spell BeagleBone correctly in config file. Pull Request: https://github.com/freebsd/freebsd-src/pull/545 (cherry picked from commit 202692b1a733322540723c718288eff3a8054d42) --- sys/arm/conf/GENERIC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 165f707106f4..ac8cbab997ec 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -184,7 +184,7 @@ device ti_adc device pwm # Watchdog support -# If we don't enable the watchdog driver, the BealeBone could potentially +# If we don't enable the watchdog driver, the BeagleBone could potentially # reboot automatically because the boot loader might have enabled the # watchdog. device ti_wdt From nobody Fri Nov 19 04:53:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 176DF1897578; Fri, 19 Nov 2021 04:53: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 4HwPSL6hnxz4TKr; Fri, 19 Nov 2021 04:53:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB17622078; Fri, 19 Nov 2021 04:53: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 1AJ4rM92061112; Fri, 19 Nov 2021 04:53:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4rMVC061111; Fri, 19 Nov 2021 04:53:22 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:53:22 GMT Message-Id: <202111190453.1AJ4rMVC061111@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: 2a5fe2c98181 - stable/13 - src/bin/ps: Fix spelling 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2a5fe2c9818170ea8a853405522add3d2994984c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2a5fe2c9818170ea8a853405522add3d2994984c commit 2a5fe2c9818170ea8a853405522add3d2994984c Author: Elyes HAOUAS AuthorDate: 2021-11-19 04:51:12 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:52:21 +0000 src/bin/ps: Fix spelling error Spell interruptible correctly. Pull Request: https://github.com/freebsd/freebsd-src/pull/544 Signed-off-by: Elyes HAOUAS (cherry picked from commit 3fe686f25a0d0844dc3afd0b3b067ec46abdbc99) --- bin/ps/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ps/print.c b/bin/ps/print.c index 2b61c6b0a15a..d4dbd9624011 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -236,7 +236,7 @@ state(KINFO *k, VARENT *ve __unused) break; case SSLEEP: - if (tdflags & TDF_SINTR) /* interruptable (long) */ + if (tdflags & TDF_SINTR) /* interruptible (long) */ *cp = k->ki_p->ki_slptime >= MAXSLP ? 'I' : 'S'; else *cp = 'D'; From nobody Fri Nov 19 04:53:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D7C681897F19; Fri, 19 Nov 2021 04:53: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 4HwPSN1bL4z4Td6; Fri, 19 Nov 2021 04:53:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D65072249E; Fri, 19 Nov 2021 04:53: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 1AJ4rNHS061136; Fri, 19 Nov 2021 04:53:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4rNC1061135; Fri, 19 Nov 2021 04:53:23 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:53:23 GMT Message-Id: <202111190453.1AJ4rNC1061135@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: fa99313f30f9 - stable/13 - src/bin/pax: Fix spelling 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fa99313f30f9348f2c97346e6e94b0d50380b0e7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fa99313f30f9348f2c97346e6e94b0d50380b0e7 commit fa99313f30f9348f2c97346e6e94b0d50380b0e7 Author: Elyes HAOUAS AuthorDate: 2021-11-19 04:51:12 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:52:21 +0000 src/bin/pax: Fix spelling error "whats" -> "what's" Pull Request: https://github.com/freebsd/freebsd-src/pull/544 Signed-off-by: Elyes HAOUAS (cherry picked from commit 8db446034e3e53969db8b211fb8635dd911d1133) --- bin/pax/buf_subs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c index 153b599193d8..6d50a280f29c 100644 --- a/bin/pax/buf_subs.c +++ b/bin/pax/buf_subs.c @@ -540,7 +540,7 @@ rd_wrbuf(char *in, int cpcnt) } /* - * calculate how much data to copy based on whats left and + * calculate how much data to copy based on what's left and * state of buffer */ cnt = MIN(cnt, incnt); From nobody Fri Nov 19 04:53:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E87A51897B5D; Fri, 19 Nov 2021 04:53:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwPSP238Jz4TdJ; Fri, 19 Nov 2021 04:53:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BEEB226A2; Fri, 19 Nov 2021 04:53: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 1AJ4rOE6061160; Fri, 19 Nov 2021 04:53:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4rOgW061159; Fri, 19 Nov 2021 04:53:24 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:53:24 GMT Message-Id: <202111190453.1AJ4rOgW061159@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: d57d56b8ab07 - stable/13 - src/bin/mkdir: Spell occur correctly. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d57d56b8ab070b8671f9127385201c4022a21373 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d57d56b8ab070b8671f9127385201c4022a21373 commit d57d56b8ab070b8671f9127385201c4022a21373 Author: Elyes HAOUAS AuthorDate: 2021-11-19 04:51:12 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:52:21 +0000 src/bin/mkdir: Spell occur correctly. Pull Request: https://github.com/freebsd/freebsd-src/pull/544 Signed-off-by: Elyes HAOUAS (cherry picked from commit 28c3c137f64a7176d0ca877fb4f35ae17c7c5202) --- bin/mkdir/mkdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mkdir/mkdir.c b/bin/mkdir/mkdir.c index 122ec4458858..cc699d3893dc 100644 --- a/bin/mkdir/mkdir.c +++ b/bin/mkdir/mkdir.c @@ -163,7 +163,7 @@ build(char *path, mode_t omode) * POSIX 1003.2: * For each dir operand that does not name an existing * directory, effects equivalent to those caused by the - * following command shall occcur: + * following command shall occur: * * mkdir -p -m $(umask -S),u+wx $(dirname dir) && * mkdir [-m mode] dir From nobody Fri Nov 19 04:53:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2D4DB1897B71; Fri, 19 Nov 2021 04:53: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 4HwPSQ55LXz4Tfx; Fri, 19 Nov 2021 04:53:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2EDE5226A3; Fri, 19 Nov 2021 04:53: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 1AJ4rQLQ061184; Fri, 19 Nov 2021 04:53:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4rQIM061183; Fri, 19 Nov 2021 04:53:26 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:53:26 GMT Message-Id: <202111190453.1AJ4rQIM061183@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: d88a3fe466de - stable/13 - src/bin/sh: Fix spelling errors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d88a3fe466de8d7f424b28df20319c3eed7c2c45 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d88a3fe466de8d7f424b28df20319c3eed7c2c45 commit d88a3fe466de8d7f424b28df20319c3eed7c2c45 Author: Elyes HAOUAS AuthorDate: 2021-11-19 04:51:13 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:52:21 +0000 src/bin/sh: Fix spelling errors Pull Request: https://github.com/freebsd/freebsd-src/pull/544 Signed-off-by: Elyes HAOUAS (cherry picked from commit 48556dff3d028da85b864c6662534e1388a255c8) --- bin/sh/error.c | 2 +- bin/sh/eval.c | 2 +- bin/sh/nodetypes | 2 +- bin/sh/shell.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/sh/error.c b/bin/sh/error.c index bee2a4fe703b..a6b407907e20 100644 --- a/bin/sh/error.c +++ b/bin/sh/error.c @@ -74,7 +74,7 @@ static void verrorwithstatus(int, const char *, va_list) __printf0like(2, 0) __d * just do a longjmp to the exception handler. The type of exception is * stored in the global variable "exception". * - * Interrupts are disabled; they should be reenabled when the exception is + * Interrupts are disabled; they should be re-enabled when the exception is * caught. */ diff --git a/bin/sh/eval.c b/bin/sh/eval.c index b95689bce006..58cfc522bb14 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -900,7 +900,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd) * the hash table isn't filled with items * from the temporary setting. * - * It would be better to forbit using and + * It would be better to forbid using and * updating the table while this command * runs, by the command finding mechanism * is heavily integrated with hash handling, diff --git a/bin/sh/nodetypes b/bin/sh/nodetypes index 496ffba05924..0d0d657d67e8 100644 --- a/bin/sh/nodetypes +++ b/bin/sh/nodetypes @@ -64,7 +64,7 @@ NPIPE npipe # a pipeline backgnd int # set to run pipeline in background cmdlist nodelist # the commands in the pipeline -NREDIR nredir # redirection (of a compex command) +NREDIR nredir # redirection (of a complex command) type int n nodeptr # the command redirect nodeptr # list of file redirections diff --git a/bin/sh/shell.h b/bin/sh/shell.h index c06e737e658f..536efe6ce228 100644 --- a/bin/sh/shell.h +++ b/bin/sh/shell.h @@ -55,7 +55,7 @@ /* #define DEBUG 1 */ /* - * Type of used arithmetics. SUSv3 requires us to have at least signed long. + * Type of used arithmetic. SUSv3 requires us to have at least signed long. */ typedef intmax_t arith_t; #define ARITH_FORMAT_STR "%" PRIdMAX From nobody Fri Nov 19 04:53:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 85AD91897DDC; Fri, 19 Nov 2021 04:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwPSR51hrz4TRl; Fri, 19 Nov 2021 04:53:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39A592270B; Fri, 19 Nov 2021 04:53: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 1AJ4rRij061217; Fri, 19 Nov 2021 04:53:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4rRoa061216; Fri, 19 Nov 2021 04:53:27 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:53:27 GMT Message-Id: <202111190453.1AJ4rRoa061216@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: 3161a62f2d86 - stable/13 - arm: Remove unused items List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3161a62f2d866b9bba5ce462c2f50f5af7ce0ba7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3161a62f2d866b9bba5ce462c2f50f5af7ce0ba7 commit 3161a62f2d866b9bba5ce462c2f50f5af7ce0ba7 Author: Warner Losh AuthorDate: 2021-11-19 04:51:13 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:52:21 +0000 arm: Remove unused items Remote detritis copied, apparently, from sparc. utrap has never been used on arm, so it's safe to just remove it. Sponsored by: Netflix (cherry picked from commit c47a4a23756167e40c6a9d1dfd0bf64258620171) --- sys/arm/include/proc.h | 10 +---- sys/arm/include/utrap.h | 112 ------------------------------------------------ 2 files changed, 1 insertion(+), 121 deletions(-) diff --git a/sys/arm/include/proc.h b/sys/arm/include/proc.h index a37ccd8f621c..cdd64479c851 100644 --- a/sys/arm/include/proc.h +++ b/sys/arm/include/proc.h @@ -40,13 +40,6 @@ #ifndef _MACHINE_PROC_H_ #define _MACHINE_PROC_H_ -#include - -struct md_utrap { - utrap_entry_t *ut_precise[UT_MAX]; /* must be first */ - int ut_refcnt; -}; - struct mdthread { int md_spinlock_count; /* (k) */ register_t md_saved_cspr; /* (k) */ @@ -58,8 +51,7 @@ struct mdthread { }; struct mdproc { - struct md_utrap *md_utrap; - void *md_sigtramp; + long md_dummy; }; #define KINFO_PROC_SIZE 816 diff --git a/sys/arm/include/utrap.h b/sys/arm/include/utrap.h deleted file mode 100644 index b261d87d566f..000000000000 --- a/sys/arm/include/utrap.h +++ /dev/null @@ -1,112 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2001 Jake Burkholder. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef _MACHINE_UTRAP_H_ -#define _MACHINE_UTRAP_H_ - -#define UT_INSTRUCTION_EXCEPTION 1 -#define UT_INSTRUCTION_ERROR 2 -#define UT_INSTRUCTION_PROTECTION 3 -#define UT_ILLTRAP_INSTRUCTION 4 -#define UT_ILLEGAL_INSTRUCTION 5 -#define UT_PRIVILEGED_OPCODE 6 -#define UT_FP_DISABLED 7 -#define UT_FP_EXCEPTION_IEEE_754 8 -#define UT_FP_EXCEPTION_OTHER 9 -#define UT_TAG_OFERFLOW 10 -#define UT_DIVISION_BY_ZERO 11 -#define UT_DATA_EXCEPTION 12 -#define UT_DATA_ERROR 13 -#define UT_DATA_PROTECTION 14 -#define UT_MEM_ADDRESS_NOT_ALIGNED 15 -#define UT_PRIVILEGED_ACTION 16 -#define UT_ASYNC_DATA_ERROR 17 -#define UT_TRAP_INSTRUCTION_16 18 -#define UT_TRAP_INSTRUCTION_17 19 -#define UT_TRAP_INSTRUCTION_18 20 -#define UT_TRAP_INSTRUCTION_19 21 -#define UT_TRAP_INSTRUCTION_20 22 -#define UT_TRAP_INSTRUCTION_21 23 -#define UT_TRAP_INSTRUCTION_22 24 -#define UT_TRAP_INSTRUCTION_23 25 -#define UT_TRAP_INSTRUCTION_24 26 -#define UT_TRAP_INSTRUCTION_25 27 -#define UT_TRAP_INSTRUCTION_26 28 -#define UT_TRAP_INSTRUCTION_27 29 -#define UT_TRAP_INSTRUCTION_28 30 -#define UT_TRAP_INSTRUCTION_29 31 -#define UT_TRAP_INSTRUCTION_30 32 -#define UT_TRAP_INSTRUCTION_31 33 -#define UT_INSTRUCTION_MISS 34 -#define UT_DATA_MISS 35 -#define UT_MAX 36 - -#define ST_SUNOS_SYSCALL 0 -#define ST_BREAKPOINT 1 -#define ST_DIVISION_BY_ZERO 2 -#define ST_FLUSH_WINDOWS 3 /* XXX implement! */ -#define ST_CLEAN_WINDOW 4 -#define ST_RANGE_CHECK 5 -#define ST_FIX_ALIGNMENT 6 -#define ST_INTEGER_OVERFLOW 7 -/* 8 is 32-bit ABI syscall (old solaris syscall?) */ -#define ST_BSD_SYSCALL 9 -#define ST_FP_RESTORE 10 -/* 11-15 are available */ -/* 16 is linux 32 bit syscall (but supposed to be reserved, grr) */ -/* 17 is old linux 64 bit syscall (but supposed to be reserved, grr) */ -/* 16-31 are reserved for user applications (utraps) */ -#define ST_GETCC 32 /* XXX implement! */ -#define ST_SETCC 33 /* XXX implement! */ -#define ST_GETPSR 34 /* XXX implement! */ -#define ST_SETPSR 35 /* XXX implement! */ -/* 36-63 are available */ -#define ST_SOLARIS_SYSCALL 64 -#define ST_SYSCALL 65 -#define ST_SYSCALL32 66 -/* 67 is reserved to OS source licensee */ -/* 68 is return from deferred trap (not supported) */ -/* 69-95 are reserved to SPARC international */ -/* 96-108 are available */ -/* 109 is linux 64 bit syscall */ -/* 110 is linux 64 bit getcontext (?) */ -/* 111 is linux 64 bit setcontext (?) */ -/* 112-255 are available */ - -#define UTH_NOCHANGE (-1) - -#ifndef __ASM__ - -typedef int utrap_entry_t; -typedef void *utrap_handler_t; - -#endif - -#endif From nobody Fri Nov 19 04:53:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0A9701897F43; Fri, 19 Nov 2021 04:53: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 4HwPSS4NwXz4Tdf; Fri, 19 Nov 2021 04:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66BEF22514; Fri, 19 Nov 2021 04:53: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 1AJ4rS3V061241; Fri, 19 Nov 2021 04:53:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4rSmI061240; Fri, 19 Nov 2021 04:53:28 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:53:28 GMT Message-Id: <202111190453.1AJ4rSmI061240@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: dca9c7b0aad7 - stable/13 - cam_periph: style change List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dca9c7b0aad7d7fcc82dae5a62e8c65bb225a4a6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dca9c7b0aad7d7fcc82dae5a62e8c65bb225a4a6 commit dca9c7b0aad7d7fcc82dae5a62e8c65bb225a4a6 Author: Warner Losh AuthorDate: 2021-11-19 04:51:13 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:52:21 +0000 cam_periph: style change wrap a long line at 80 columns Sponsored by: Netflix Reviewed by: chs Differential Revision: https://reviews.freebsd.org/D32679 (cherry picked from commit dbfe5dd3f95148dd14b95025182da371029c2e90) --- sys/cam/cam_periph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 98b9264f1069..d08adca0ea1c 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -279,7 +279,8 @@ cam_periph_alloc(periph_ctor_t *periph_ctor, && cur_periph->unit_number < periph->unit_number) cur_periph = TAILQ_NEXT(cur_periph, unit_links); if (cur_periph != NULL) { - KASSERT(cur_periph->unit_number != periph->unit_number, ("duplicate units on periph list")); + KASSERT(cur_periph->unit_number != periph->unit_number, + ("duplicate units on periph list")); TAILQ_INSERT_BEFORE(cur_periph, periph, unit_links); } else { TAILQ_INSERT_TAIL(&(*p_drv)->units, periph, unit_links); From nobody Fri Nov 19 04:53:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0A5C41898041; Fri, 19 Nov 2021 04:53: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 4HwPSV3Nzsz4Tlj; Fri, 19 Nov 2021 04:53:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CAF422447; Fri, 19 Nov 2021 04:53: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 1AJ4rT9a061265; Fri, 19 Nov 2021 04:53:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4rTr8061264; Fri, 19 Nov 2021 04:53:29 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:53:29 GMT Message-Id: <202111190453.1AJ4rTr8061264@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: 87586bff11ec - stable/13 - sysbeep: Adjust interface to take a duration as a sbt List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 87586bff11ec0a84eba3b83b68030f9e0db429bf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=87586bff11ec0a84eba3b83b68030f9e0db429bf commit 87586bff11ec0a84eba3b83b68030f9e0db429bf Author: Warner Losh AuthorDate: 2021-11-19 04:51:13 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:52:22 +0000 sysbeep: Adjust interface to take a duration as a sbt Change the 'period' argument to 'duration' and change its type to sbintime_t so we can more easily express different durations. Reviewed by: tsoome, glebius Differential Revision: https://reviews.freebsd.org/D32619 (cherry picked from commit 072d5b98c4318e20248a6fbea4a5ca7c96992cac) --- sys/dev/mlx/mlx.c | 6 +++--- sys/dev/syscons/syscons.c | 7 ++++++- sys/dev/vt/vt_core.c | 8 ++++---- sys/i386/i386/trap.c | 4 ++-- sys/kern/kern_cons.c | 13 +++++++------ sys/sys/systm.h | 2 +- 6 files changed, 23 insertions(+), 17 deletions(-) diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index bafd0902e09a..f5b023eafc9c 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -1083,7 +1083,7 @@ mlx_periodic(void *data) mlx_pause_action(sc); /* pause is running */ sc->mlx_pause.mp_when = 0; - sysbeep(500, hz); + sysbeep(500, SBT_1S); /* * Bus pause still running? @@ -1095,9 +1095,9 @@ mlx_periodic(void *data) if (time_second >= sc->mlx_pause.mp_howlong) { mlx_pause_action(sc); sc->mlx_pause.mp_which = 0; /* pause is complete */ - sysbeep(500, hz); + sysbeep(500, SBT_1S); } else { - sysbeep((time_second % 5) * 100 + 500, hz/8); + sysbeep((time_second % 5) * 100 + 500, SBT_1S / 8); } /* diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 6a389604d3ab..6c349668410d 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -4258,6 +4258,11 @@ sc_respond(scr_stat *scp, const u_char *p, int count, int wakeup) } } +/* + * pitch is the divisor for 1.193182MHz PIT clock. By dividing 1193172 / pitch, + * we convert it back to Hz. + * duration is in ticks of 1/hz. + */ void sc_bell(scr_stat *scp, int pitch, int duration) { @@ -4277,7 +4282,7 @@ sc_bell(scr_stat *scp, int pitch, int duration) } else if (duration != 0 && pitch != 0) { if (scp != scp->sc->cur_scp) pitch *= 2; - sysbeep(1193182 / pitch, duration); + sysbeep(1193182 / pitch, SBT_1S * duration / hz); } } diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 884050f4f0c5..708e5ba70f15 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -119,8 +119,8 @@ const struct terminal_class vt_termclass = { #define VT_TIMERFREQ 25 /* Bell pitch/duration. */ -#define VT_BELLDURATION ((5 * hz + 99) / 100) -#define VT_BELLPITCH 800 +#define VT_BELLDURATION (SBT_1S / 20) +#define VT_BELLPITCH (1193182 / 800) /* Approx 1491Hz */ #define VT_UNIT(vw) ((vw)->vw_device->vd_unit * VT_MAXWINDOWS + \ (vw)->vw_number) @@ -1101,7 +1101,7 @@ vtterm_bell(struct terminal *tm) if (vd->vd_flags & VDF_QUIET_BELL) return; - sysbeep(1193182 / VT_BELLPITCH, VT_BELLDURATION); + sysbeep(VT_BELLPITCH, VT_BELLDURATION); } static void @@ -1117,7 +1117,7 @@ vtterm_beep(struct terminal *tm, u_int param) return; } - period = ((param >> 16) & 0xffff) * hz / 1000; + period = ((param >> 16) & 0xffff) * SBT_1MS; freq = 1193182 / (param & 0xffff); sysbeep(freq, period); diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 045478149be5..6f70a88b62b8 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -414,7 +414,7 @@ user_trctrap_out: #endif if (time_second - lastalert > 10) { log(LOG_WARNING, "NMI: power fail\n"); - sysbeep(880, hz); + sysbeep(880, SBT_1S); lastalert = time_second; } return; @@ -671,7 +671,7 @@ kernel_trctrap: #ifdef POWERFAIL_NMI if (time_second - lastalert > 10) { log(LOG_WARNING, "NMI: power fail\n"); - sysbeep(880, hz); + sysbeep(880, SBT_1S); lastalert = time_second; } return; diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index 780fce00387d..d33811f1e3c8 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -658,7 +658,7 @@ constty_timeout(void *arg) #ifdef HAS_TIMER_SPKR -static int beeping; +static bool beeping; static struct callout beeping_timer; static void @@ -666,11 +666,11 @@ sysbeepstop(void *chan) { timer_spkr_release(); - beeping = 0; + beeping = false; } int -sysbeep(int pitch, int period) +sysbeep(int pitch, sbintime_t duration) { if (timer_spkr_acquire()) { @@ -681,8 +681,9 @@ sysbeep(int pitch, int period) } timer_spkr_setfreq(pitch); if (!beeping) { - beeping = period; - callout_reset(&beeping_timer, period, sysbeepstop, NULL); + beeping = true; + callout_reset_sbt(&beeping_timer, duration, 0, sysbeepstop, + NULL, C_PREL(5)); } return (0); } @@ -701,7 +702,7 @@ SYSINIT(sysbeep, SI_SUB_SOFTINTR, SI_ORDER_ANY, sysbeep_init, NULL); */ int -sysbeep(int pitch __unused, int period __unused) +sysbeep(int pitch __unused, sbintime_t duration __unused) { return (ENODEV); diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 8080f22266e2..619de40a20e8 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -445,7 +445,7 @@ int casueword(volatile u_long *p, u_long oldval, u_long *oldvalp, void realitexpire(void *); -int sysbeep(int hertz, int period); +int sysbeep(int hertz, sbintime_t duration); void hardclock(int cnt, int usermode); void hardclock_sync(int cpu); From nobody Fri Nov 19 04:53:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 952BE1898605; Fri, 19 Nov 2021 04:53: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 4HwPSY1NCkz4TS4; Fri, 19 Nov 2021 04:53:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE3E7222C3; Fri, 19 Nov 2021 04:53: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 1AJ4rVwN061313; Fri, 19 Nov 2021 04:53:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4rVY8061312; Fri, 19 Nov 2021 04:53:31 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:53:31 GMT Message-Id: <202111190453.1AJ4rVY8061312@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: a82d7aeb3f26 - stable/13 - vt: Add devctl message for bells List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a82d7aeb3f2647cc148b5367e02831572d6cd2d4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a82d7aeb3f2647cc148b5367e02831572d6cd2d4 commit a82d7aeb3f2647cc148b5367e02831572d6cd2d4 Author: Warner Losh AuthorDate: 2021-11-19 04:51:13 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:52:22 +0000 vt: Add devctl message for bells Generate VT events when the bell beeps. When coupled with disabling the bell,this allows custom bells to be rung when we'd otherwise beep. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D32656 (cherry picked from commit 4ac3d08a9693c27c1bd2ddd67b2808ac9e18f4c5) --- sbin/devd/devd.conf.5 | 9 +++++++++ share/man/man4/vt.4 | 14 ++++++++++++++ sys/dev/vt/vt_core.c | 36 ++++++++++++++++++++++++++++++++---- 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/sbin/devd/devd.conf.5 b/sbin/devd/devd.conf.5 index 1a1071584f70..a4d0c95b5930 100644 --- a/sbin/devd/devd.conf.5 +++ b/sbin/devd/devd.conf.5 @@ -598,6 +598,15 @@ Notification of a filesystem being unmounted. .Pp .Bl -column "System" "Subsystem" "1234567" -compact .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" +.It Li VT Ta BELL Ta RING Ta +Notifcation that the console bell has run. +See +.Xr vt 4 +for details. +.El +.Pp +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li ZFS Ta ZFS Ta Ta Events about the ZFS subsystem. See diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4 index 8584706dc1aa..d0672ff9e5a0 100644 --- a/share/man/man4/vt.4 +++ b/share/man/man4/vt.4 @@ -297,6 +297,20 @@ console fonts .It Pa /usr/share/vt/keymaps/*.kbd keyboard layouts .El +.Sh DEVCTL MESSAGES +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" +.It Li VT Ta BELL Ta RING Ta +Notifcation that the console bell has run. +.El +.Pp +.Bl -column "Variable" "Meaning" -compact +.Sy "Variable" Ta Sy "Meaning" +.It Li duration_ms Ta Length of time the bell was requested to ring in milliseconds. +.It Li enabled Ta true or false indicating whether or not the bell was enabled when rung. +.It Li hz Ta Tone that was requested in Hz. +.El +.Pp .Sh EXAMPLES This example changes the default color of normal text to green on a black background, or black on a green background when reversed. diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index ebcb4fc8f103..1bbb12d52ec3 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -52,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -1091,12 +1093,35 @@ vt_allocate_keyboard(struct vt_device *vd) return (idx0); } +#define DEVCTL_LEN 64 +static void +vtterm_devctl(bool enabled, int hz, sbintime_t duration) +{ + struct sbuf sb; + char *buf; + + buf = malloc(DEVCTL_LEN, M_VT, M_NOWAIT); + if (buf == NULL) + return; + sbuf_new(&sb, buf, DEVCTL_LEN, SBUF_FIXEDLEN); + sbuf_printf(&sb, "enabled=%s hz=%d duration_ms=%d", + enabled ? "true" : "false", hz, (int)(duration / SBT_1MS)); + sbuf_finish(&sb); + if (sbuf_error(&sb) == 0) + devctl_notify("VT", "BELL", "RING", sbuf_data(&sb)); + sbuf_delete(&sb); + free(buf, M_VT); +} + static void vtterm_bell(struct terminal *tm) { struct vt_window *vw = tm->tm_softc; struct vt_device *vd = vw->vw_device; + vtterm_devctl(vt_enable_bell, vw->vw_bell_pitch, + vw->vw_bell_duration); + if (!vt_enable_bell) return; @@ -1113,10 +1138,8 @@ vtterm_bell(struct terminal *tm) static void vtterm_beep(struct terminal *tm, u_int param) { - u_int freq, period; - - if (!vt_enable_bell) - return; + u_int freq; + sbintime_t period; if ((param == 0) || ((param & 0xffff) == 0)) { vtterm_bell(tm); @@ -1126,6 +1149,11 @@ vtterm_beep(struct terminal *tm, u_int param) period = ((param >> 16) & 0xffff) * SBT_1MS; freq = 1193182 / (param & 0xffff); + vtterm_devctl(vt_enable_bell, freq, period); + + if (!vt_enable_bell) + return; + sysbeep(freq, period); } From nobody Fri Nov 19 04:53:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7FE5E1897FDA; Fri, 19 Nov 2021 04:53: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 4HwPSX26Bfz4Tjf; Fri, 19 Nov 2021 04:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACFFE226A4; Fri, 19 Nov 2021 04:53: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 1AJ4rUoX061289; Fri, 19 Nov 2021 04:53:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ4rU16061288; Fri, 19 Nov 2021 04:53:30 GMT (envelope-from git) Date: Fri, 19 Nov 2021 04:53:30 GMT Message-Id: <202111190453.1AJ4rU16061288@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: 534fb4b8aec0 - stable/13 - vt(4): Connect to teken's TP_SETBELLPD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 534fb4b8aec07d97bbd414a390fe1a6c5b169af8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=534fb4b8aec07d97bbd414a390fe1a6c5b169af8 commit 534fb4b8aec07d97bbd414a390fe1a6c5b169af8 Author: Warner Losh AuthorDate: 2021-11-19 04:51:13 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:52:22 +0000 vt(4): Connect to teken's TP_SETBELLPD Add the glue needed to listen to TP_SETBELLPD which teken uses to inform its client drivers about the results of parsing \e[=;B. It converts these to a Hz value for the tone/pitch of the bell and a duration in ms. There's some loss of precision because in the escape seuquence is defined to be (1193182 / pitch) Hz and is in 10ms units. Also note that kbdcontrol also parses 'off' but then doesn't send the proper escape sequence, leading me to wonder if that's another bug since teken appears to parse that sequence properly and I've added code here to treat that as the same as quiet or disabled. In general, Hz from 100 to 2000 is good. Outside that range is possible, but even at 100Hz the square wave is starting to sound bad and above 2000Hz the speaker may not respond. Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D32620 (cherry picked from commit 2533eca1c2b9d561c42d28bcb6f1c1c35562fbcc) --- sys/dev/vt/vt.h | 2 ++ sys/dev/vt/vt_core.c | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h index 2d671d692384..ad3cb310b510 100644 --- a/sys/dev/vt/vt.h +++ b/sys/dev/vt/vt.h @@ -309,6 +309,8 @@ struct vt_window { struct vt_mode vw_smode; /* switch mode */ struct callout vw_proc_dead_timer; struct vt_window *vw_switch_to; + int vw_bell_pitch; /* (?) Bell pitch */ + sbintime_t vw_bell_duration; /* (?) Bell duration */ }; #define VT_AUTO 0 /* switching is automatic */ diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 708e5ba70f15..ebcb4fc8f103 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -258,6 +258,8 @@ static struct vt_window vt_conswindow = { .vw_terminal = &vt_consterm, .vw_kbdmode = K_XLATE, .vw_grabbed = 0, + .vw_bell_pitch = VT_BELLPITCH, + .vw_bell_duration = VT_BELLDURATION, }; struct terminal vt_consterm = { .tm_class = &vt_termclass, @@ -1101,7 +1103,11 @@ vtterm_bell(struct terminal *tm) if (vd->vd_flags & VDF_QUIET_BELL) return; - sysbeep(VT_BELLPITCH, VT_BELLDURATION); + if (vw->vw_bell_pitch == 0 || + vw->vw_bell_duration == 0) + return; + + sysbeep(vw->vw_bell_pitch, vw->vw_bell_duration); } static void @@ -1178,6 +1184,11 @@ vtterm_param(struct terminal *tm, int cmd, unsigned int arg) case TP_MOUSE: vw->vw_mouse_level = arg; break; + case TP_SETBELLPD: + vw->vw_bell_pitch = TP_SETBELLPD_PITCH(arg); + vw->vw_bell_duration = + TICKS_2_MSEC(TP_SETBELLPD_DURATION(arg)) * SBT_1MS; + break; } } From nobody Fri Nov 19 05:00:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5C492189D383; Fri, 19 Nov 2021 05:00: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 4HwPcl2Ch0z4ZZT; Fri, 19 Nov 2021 05:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C86E2270F; Fri, 19 Nov 2021 05:00: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 1AJ50dSY071919; Fri, 19 Nov 2021 05:00:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ50dnZ071918; Fri, 19 Nov 2021 05:00:39 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:00:39 GMT Message-Id: <202111190500.1AJ50dnZ071918@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: 291b4ff9fc05 - stable/12 - arm: Remove unused items List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: 291b4ff9fc05947aceaf942b4fa50450f6c9671c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=291b4ff9fc05947aceaf942b4fa50450f6c9671c commit 291b4ff9fc05947aceaf942b4fa50450f6c9671c Author: Warner Losh AuthorDate: 2021-11-19 04:59:40 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:59:40 +0000 arm: Remove unused items Remote detritis copied, apparently, from sparc. utrap has never been used on arm, so it's safe to just remove it. Sponsored by: Netflix (cherry picked from commit c47a4a23756167e40c6a9d1dfd0bf64258620171) --- sys/arm/include/proc.h | 10 +---- sys/arm/include/utrap.h | 112 ------------------------------------------------ 2 files changed, 1 insertion(+), 121 deletions(-) diff --git a/sys/arm/include/proc.h b/sys/arm/include/proc.h index 94855b6f60e7..d70c7c3df17e 100644 --- a/sys/arm/include/proc.h +++ b/sys/arm/include/proc.h @@ -40,13 +40,6 @@ #ifndef _MACHINE_PROC_H_ #define _MACHINE_PROC_H_ -#include - -struct md_utrap { - utrap_entry_t *ut_precise[UT_MAX]; /* must be first */ - int ut_refcnt; -}; - struct mdthread { int md_spinlock_count; /* (k) */ register_t md_saved_cspr; /* (k) */ @@ -63,8 +56,7 @@ struct mdthread { }; struct mdproc { - struct md_utrap *md_utrap; - void *md_sigtramp; + long md_dummy; }; #define KINFO_PROC_SIZE 816 diff --git a/sys/arm/include/utrap.h b/sys/arm/include/utrap.h deleted file mode 100644 index b261d87d566f..000000000000 --- a/sys/arm/include/utrap.h +++ /dev/null @@ -1,112 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2001 Jake Burkholder. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef _MACHINE_UTRAP_H_ -#define _MACHINE_UTRAP_H_ - -#define UT_INSTRUCTION_EXCEPTION 1 -#define UT_INSTRUCTION_ERROR 2 -#define UT_INSTRUCTION_PROTECTION 3 -#define UT_ILLTRAP_INSTRUCTION 4 -#define UT_ILLEGAL_INSTRUCTION 5 -#define UT_PRIVILEGED_OPCODE 6 -#define UT_FP_DISABLED 7 -#define UT_FP_EXCEPTION_IEEE_754 8 -#define UT_FP_EXCEPTION_OTHER 9 -#define UT_TAG_OFERFLOW 10 -#define UT_DIVISION_BY_ZERO 11 -#define UT_DATA_EXCEPTION 12 -#define UT_DATA_ERROR 13 -#define UT_DATA_PROTECTION 14 -#define UT_MEM_ADDRESS_NOT_ALIGNED 15 -#define UT_PRIVILEGED_ACTION 16 -#define UT_ASYNC_DATA_ERROR 17 -#define UT_TRAP_INSTRUCTION_16 18 -#define UT_TRAP_INSTRUCTION_17 19 -#define UT_TRAP_INSTRUCTION_18 20 -#define UT_TRAP_INSTRUCTION_19 21 -#define UT_TRAP_INSTRUCTION_20 22 -#define UT_TRAP_INSTRUCTION_21 23 -#define UT_TRAP_INSTRUCTION_22 24 -#define UT_TRAP_INSTRUCTION_23 25 -#define UT_TRAP_INSTRUCTION_24 26 -#define UT_TRAP_INSTRUCTION_25 27 -#define UT_TRAP_INSTRUCTION_26 28 -#define UT_TRAP_INSTRUCTION_27 29 -#define UT_TRAP_INSTRUCTION_28 30 -#define UT_TRAP_INSTRUCTION_29 31 -#define UT_TRAP_INSTRUCTION_30 32 -#define UT_TRAP_INSTRUCTION_31 33 -#define UT_INSTRUCTION_MISS 34 -#define UT_DATA_MISS 35 -#define UT_MAX 36 - -#define ST_SUNOS_SYSCALL 0 -#define ST_BREAKPOINT 1 -#define ST_DIVISION_BY_ZERO 2 -#define ST_FLUSH_WINDOWS 3 /* XXX implement! */ -#define ST_CLEAN_WINDOW 4 -#define ST_RANGE_CHECK 5 -#define ST_FIX_ALIGNMENT 6 -#define ST_INTEGER_OVERFLOW 7 -/* 8 is 32-bit ABI syscall (old solaris syscall?) */ -#define ST_BSD_SYSCALL 9 -#define ST_FP_RESTORE 10 -/* 11-15 are available */ -/* 16 is linux 32 bit syscall (but supposed to be reserved, grr) */ -/* 17 is old linux 64 bit syscall (but supposed to be reserved, grr) */ -/* 16-31 are reserved for user applications (utraps) */ -#define ST_GETCC 32 /* XXX implement! */ -#define ST_SETCC 33 /* XXX implement! */ -#define ST_GETPSR 34 /* XXX implement! */ -#define ST_SETPSR 35 /* XXX implement! */ -/* 36-63 are available */ -#define ST_SOLARIS_SYSCALL 64 -#define ST_SYSCALL 65 -#define ST_SYSCALL32 66 -/* 67 is reserved to OS source licensee */ -/* 68 is return from deferred trap (not supported) */ -/* 69-95 are reserved to SPARC international */ -/* 96-108 are available */ -/* 109 is linux 64 bit syscall */ -/* 110 is linux 64 bit getcontext (?) */ -/* 111 is linux 64 bit setcontext (?) */ -/* 112-255 are available */ - -#define UTH_NOCHANGE (-1) - -#ifndef __ASM__ - -typedef int utrap_entry_t; -typedef void *utrap_handler_t; - -#endif - -#endif From nobody Fri Nov 19 05:00:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D3178189D2CD; Fri, 19 Nov 2021 05:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwPcm42Pzz4Z7X; Fri, 19 Nov 2021 05:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4EB8722266; Fri, 19 Nov 2021 05:00: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 1AJ50eoA071943; Fri, 19 Nov 2021 05:00:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ50eX6071942; Fri, 19 Nov 2021 05:00:40 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:00:40 GMT Message-Id: <202111190500.1AJ50eX6071942@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: 664676054d8b - stable/12 - cam_periph: style change List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 664676054d8b0c16ee18fedd4b095cec538dc2bf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=664676054d8b0c16ee18fedd4b095cec538dc2bf commit 664676054d8b0c16ee18fedd4b095cec538dc2bf Author: Warner Losh AuthorDate: 2021-11-19 04:59:41 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:59:41 +0000 cam_periph: style change wrap a long line at 80 columns Sponsored by: Netflix Reviewed by: chs Differential Revision: https://reviews.freebsd.org/D32679 (cherry picked from commit dbfe5dd3f95148dd14b95025182da371029c2e90) --- sys/cam/cam_periph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index c53be6d61fa7..2744541097dd 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -280,7 +280,8 @@ cam_periph_alloc(periph_ctor_t *periph_ctor, && cur_periph->unit_number < periph->unit_number) cur_periph = TAILQ_NEXT(cur_periph, unit_links); if (cur_periph != NULL) { - KASSERT(cur_periph->unit_number != periph->unit_number, ("duplicate units on periph list")); + KASSERT(cur_periph->unit_number != periph->unit_number, + ("duplicate units on periph list")); TAILQ_INSERT_BEFORE(cur_periph, periph, unit_links); } else { TAILQ_INSERT_TAIL(&(*p_drv)->units, periph, unit_links); From nobody Fri Nov 19 05:00:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2F159189D1BE; Fri, 19 Nov 2021 05:00: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 4HwPcn6wvfz4ZWX; Fri, 19 Nov 2021 05:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DE4B226A7; Fri, 19 Nov 2021 05:00: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 1AJ50fqf071967; Fri, 19 Nov 2021 05:00:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ50fLW071966; Fri, 19 Nov 2021 05:00:41 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:00:41 GMT Message-Id: <202111190500.1AJ50fLW071966@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: 6fd36eb5b489 - stable/12 - arm64: Spell BeagleBone correctly in config 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/stable/12 X-Git-Reftype: branch X-Git-Commit: 6fd36eb5b48989e469f324f173b3945914c9d603 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6fd36eb5b48989e469f324f173b3945914c9d603 commit 6fd36eb5b48989e469f324f173b3945914c9d603 Author: Tom Hukins AuthorDate: 2021-11-19 04:59:41 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:59:41 +0000 arm64: Spell BeagleBone correctly in config file. Pull Request: https://github.com/freebsd/freebsd-src/pull/545 (cherry picked from commit 202692b1a733322540723c718288eff3a8054d42) --- sys/arm/conf/GENERIC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 9c7901c6addf..da46173493bf 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -179,7 +179,7 @@ device ti_adc device pwm # Watchdog support -# If we don't enable the watchdog driver, the BealeBone could potentially +# If we don't enable the watchdog driver, the BeagleBone could potentially # reboot automatically because the boot loader might have enabled the # watchdog. device ti_wdt From nobody Fri Nov 19 05:00:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 560E5189D13D; Fri, 19 Nov 2021 05:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwPcp6XFlz4ZgF; Fri, 19 Nov 2021 05:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9FCED22711; Fri, 19 Nov 2021 05:00: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 1AJ50gjW071997; Fri, 19 Nov 2021 05:00:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ50gsp071996; Fri, 19 Nov 2021 05:00:42 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:00:42 GMT Message-Id: <202111190500.1AJ50gsp071996@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: 5b61930f590a - stable/12 - src/bin/ps: Fix spelling 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5b61930f590aa4c02204dc02e869f1d280b85bcc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5b61930f590aa4c02204dc02e869f1d280b85bcc commit 5b61930f590aa4c02204dc02e869f1d280b85bcc Author: Elyes HAOUAS AuthorDate: 2021-11-19 04:59:41 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:59:41 +0000 src/bin/ps: Fix spelling error Spell interruptible correctly. Pull Request: https://github.com/freebsd/freebsd-src/pull/544 Signed-off-by: Elyes HAOUAS (cherry picked from commit 3fe686f25a0d0844dc3afd0b3b067ec46abdbc99) --- bin/ps/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ps/print.c b/bin/ps/print.c index 6c061aee67df..6850666c757b 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -236,7 +236,7 @@ state(KINFO *k, VARENT *ve __unused) break; case SSLEEP: - if (tdflags & TDF_SINTR) /* interruptable (long) */ + if (tdflags & TDF_SINTR) /* interruptible (long) */ *cp = k->ki_p->ki_slptime >= MAXSLP ? 'I' : 'S'; else *cp = 'D'; From nobody Fri Nov 19 05:00:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E3B69189D2F4; Fri, 19 Nov 2021 05:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwPcr48Ndz4ZSK; Fri, 19 Nov 2021 05:00:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B90AD22451; Fri, 19 Nov 2021 05:00: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 1AJ50hqO072022; Fri, 19 Nov 2021 05:00:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ50hio072021; Fri, 19 Nov 2021 05:00:43 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:00:43 GMT Message-Id: <202111190500.1AJ50hio072021@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: 34bc6f6dd0ed - stable/12 - src/bin/pax: Fix spelling 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 34bc6f6dd0edc523ea820e34a1408e03e061a2d5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=34bc6f6dd0edc523ea820e34a1408e03e061a2d5 commit 34bc6f6dd0edc523ea820e34a1408e03e061a2d5 Author: Elyes HAOUAS AuthorDate: 2021-11-19 04:59:41 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:59:41 +0000 src/bin/pax: Fix spelling error "whats" -> "what's" Pull Request: https://github.com/freebsd/freebsd-src/pull/544 Signed-off-by: Elyes HAOUAS (cherry picked from commit 8db446034e3e53969db8b211fb8635dd911d1133) --- bin/pax/buf_subs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c index 153b599193d8..6d50a280f29c 100644 --- a/bin/pax/buf_subs.c +++ b/bin/pax/buf_subs.c @@ -540,7 +540,7 @@ rd_wrbuf(char *in, int cpcnt) } /* - * calculate how much data to copy based on whats left and + * calculate how much data to copy based on what's left and * state of buffer */ cnt = MIN(cnt, incnt); From nobody Fri Nov 19 05:00:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 037E4189D586; Fri, 19 Nov 2021 05:00: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 4HwPct07tPz4ZXb; Fri, 19 Nov 2021 05:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7981226AB; Fri, 19 Nov 2021 05:00: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 1AJ50iYk072046; Fri, 19 Nov 2021 05:00:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ50iOi072045; Fri, 19 Nov 2021 05:00:44 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:00:44 GMT Message-Id: <202111190500.1AJ50iOi072045@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: 61c051ff3ba3 - stable/12 - src/bin/mkdir: Spell occur correctly. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: 61c051ff3ba3f3af76a692a55539f43db6d3f994 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=61c051ff3ba3f3af76a692a55539f43db6d3f994 commit 61c051ff3ba3f3af76a692a55539f43db6d3f994 Author: Elyes HAOUAS AuthorDate: 2021-11-19 04:59:41 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:59:41 +0000 src/bin/mkdir: Spell occur correctly. Pull Request: https://github.com/freebsd/freebsd-src/pull/544 Signed-off-by: Elyes HAOUAS (cherry picked from commit 28c3c137f64a7176d0ca877fb4f35ae17c7c5202) --- bin/mkdir/mkdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mkdir/mkdir.c b/bin/mkdir/mkdir.c index 122ec4458858..cc699d3893dc 100644 --- a/bin/mkdir/mkdir.c +++ b/bin/mkdir/mkdir.c @@ -163,7 +163,7 @@ build(char *path, mode_t omode) * POSIX 1003.2: * For each dir operand that does not name an existing * directory, effects equivalent to those caused by the - * following command shall occcur: + * following command shall occur: * * mkdir -p -m $(umask -S),u+wx $(dirname dir) && * mkdir [-m mode] dir From nobody Fri Nov 19 05:00:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D17C5189D26A; Fri, 19 Nov 2021 05:00: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 4HwPct4Ks2z4Zgg; Fri, 19 Nov 2021 05:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D48822519; Fri, 19 Nov 2021 05:00: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 1AJ50jGv072070; Fri, 19 Nov 2021 05:00:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ50jBe072069; Fri, 19 Nov 2021 05:00:45 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:00:45 GMT Message-Id: <202111190500.1AJ50jBe072069@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: d1230690019a - stable/12 - src/bin/sh: Fix spelling errors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: d1230690019a36c3d545135721b955e2b62dcf51 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d1230690019a36c3d545135721b955e2b62dcf51 commit d1230690019a36c3d545135721b955e2b62dcf51 Author: Elyes HAOUAS AuthorDate: 2021-11-19 04:59:41 +0000 Commit: Warner Losh CommitDate: 2021-11-19 04:59:41 +0000 src/bin/sh: Fix spelling errors Pull Request: https://github.com/freebsd/freebsd-src/pull/544 Signed-off-by: Elyes HAOUAS (cherry picked from commit 48556dff3d028da85b864c6662534e1388a255c8) --- bin/sh/error.c | 2 +- bin/sh/eval.c | 2 +- bin/sh/nodetypes | 2 +- bin/sh/shell.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/sh/error.c b/bin/sh/error.c index 784d2a9eb91a..1dee56fcbfa7 100644 --- a/bin/sh/error.c +++ b/bin/sh/error.c @@ -74,7 +74,7 @@ static void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2; * just do a longjmp to the exception handler. The type of exception is * stored in the global variable "exception". * - * Interrupts are disabled; they should be reenabled when the exception is + * Interrupts are disabled; they should be re-enabled when the exception is * caught. */ diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 6adc3ac6426d..ab8d331393b4 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -903,7 +903,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd) * the hash table isn't filled with items * from the temporary setting. * - * It would be better to forbit using and + * It would be better to forbid using and * updating the table while this command * runs, by the command finding mechanism * is heavily integrated with hash handling, diff --git a/bin/sh/nodetypes b/bin/sh/nodetypes index 496ffba05924..0d0d657d67e8 100644 --- a/bin/sh/nodetypes +++ b/bin/sh/nodetypes @@ -64,7 +64,7 @@ NPIPE npipe # a pipeline backgnd int # set to run pipeline in background cmdlist nodelist # the commands in the pipeline -NREDIR nredir # redirection (of a compex command) +NREDIR nredir # redirection (of a complex command) type int n nodeptr # the command redirect nodeptr # list of file redirections diff --git a/bin/sh/shell.h b/bin/sh/shell.h index c06e737e658f..536efe6ce228 100644 --- a/bin/sh/shell.h +++ b/bin/sh/shell.h @@ -55,7 +55,7 @@ /* #define DEBUG 1 */ /* - * Type of used arithmetics. SUSv3 requires us to have at least signed long. + * Type of used arithmetic. SUSv3 requires us to have at least signed long. */ typedef intmax_t arith_t; #define ARITH_FORMAT_STR "%" PRIdMAX From nobody Fri Nov 19 05:11:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 44BCB18A4C24; Fri, 19 Nov 2021 05:11: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 4HwPrm1M8rz4gWy; Fri, 19 Nov 2021 05:11:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08DFB224D3; Fri, 19 Nov 2021 05:11: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 1AJ5B3QW084937; Fri, 19 Nov 2021 05:11:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ5B3iO084936; Fri, 19 Nov 2021 05:11:03 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:11:03 GMT Message-Id: <202111190511.1AJ5B3iO084936@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: 1076b8d267b3 - stable/13 - vt: fix typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1076b8d267b3b99e848780e02b07933b358adda2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1076b8d267b3b99e848780e02b07933b358adda2 commit 1076b8d267b3b99e848780e02b07933b358adda2 Author: Warner Losh AuthorDate: 2021-11-19 05:10:07 +0000 Commit: Warner Losh CommitDate: 2021-11-19 05:10:07 +0000 vt: fix typo Notifcation -> Notification (cherry picked from commit cc48eb70d10da7310750930a153616f38afe28d6) --- sbin/devd/devd.conf.5 | 2 +- share/man/man4/vt.4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/devd/devd.conf.5 b/sbin/devd/devd.conf.5 index a4d0c95b5930..18de1f60fdd5 100644 --- a/sbin/devd/devd.conf.5 +++ b/sbin/devd/devd.conf.5 @@ -599,7 +599,7 @@ Notification of a filesystem being unmounted. .Bl -column "System" "Subsystem" "1234567" -compact .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li VT Ta BELL Ta RING Ta -Notifcation that the console bell has run. +Notification that the console bell has run. See .Xr vt 4 for details. diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4 index d0672ff9e5a0..1ed344237eb9 100644 --- a/share/man/man4/vt.4 +++ b/share/man/man4/vt.4 @@ -301,7 +301,7 @@ keyboard layouts .Bl -column "System" "Subsystem" "1234567" -compact .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li VT Ta BELL Ta RING Ta -Notifcation that the console bell has run. +Notification that the console bell has run. .El .Pp .Bl -column "Variable" "Meaning" -compact From nobody Fri Nov 19 05:11:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 84A7018A4D2B; Fri, 19 Nov 2021 05:11: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 4HwPrn2L4bz4gNg; Fri, 19 Nov 2021 05:11:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DDAC2298D; Fri, 19 Nov 2021 05:11: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 1AJ5B5lh084961; Fri, 19 Nov 2021 05:11:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ5B50e084960; Fri, 19 Nov 2021 05:11:05 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:11:05 GMT Message-Id: <202111190511.1AJ5B50e084960@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: 706f4f705bf2 - stable/13 - vt: fix git mismerge List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 706f4f705bf2bdfe7b03647feb21639996c6bcee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=706f4f705bf2bdfe7b03647feb21639996c6bcee commit 706f4f705bf2bdfe7b03647feb21639996c6bcee Author: Warner Losh AuthorDate: 2021-11-19 05:10:07 +0000 Commit: Warner Losh CommitDate: 2021-11-19 05:10:07 +0000 vt: fix git mismerge I made a mistaking in merging the final commits for the devctl changes. This adds the 'hushed' variable and has the correct dates for the manuals. Pointy hat to: imp (cherry picked from commit 80f21bb039cef279e50e1b791b2808b916009bf6) --- sbin/devd/devd.conf.5 | 4 ++-- share/man/man4/vt.4 | 7 ++++--- sys/dev/vt/vt_core.c | 16 ++++++++++------ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/sbin/devd/devd.conf.5 b/sbin/devd/devd.conf.5 index 18de1f60fdd5..e1da5f334f9f 100644 --- a/sbin/devd/devd.conf.5 +++ b/sbin/devd/devd.conf.5 @@ -40,7 +40,7 @@ .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" -.Dd October 12, 2020 +.Dd November 3, 2021 .Dt DEVD.CONF 5 .Os .Sh NAME @@ -599,7 +599,7 @@ Notification of a filesystem being unmounted. .Bl -column "System" "Subsystem" "1234567" -compact .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li VT Ta BELL Ta RING Ta -Notification that the console bell has run. +Notification that the console bell has rung. See .Xr vt 4 for details. diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4 index 1ed344237eb9..c31eae0ec274 100644 --- a/share/man/man4/vt.4 +++ b/share/man/man4/vt.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 4, 2020 +.Dd November 3, 2021 .Dt "VT" 4 .Os .Sh NAME @@ -301,13 +301,14 @@ keyboard layouts .Bl -column "System" "Subsystem" "1234567" -compact .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li VT Ta BELL Ta RING Ta -Notification that the console bell has run. +Notification that the console bell has rung. .El .Pp .Bl -column "Variable" "Meaning" -compact .Sy "Variable" Ta Sy "Meaning" .It Li duration_ms Ta Length of time the bell was requested to ring in milliseconds. -.It Li enabled Ta true or false indicating whether or not the bell was enabled when rung. +.It Li enabled Ta true or false indicating whether or not the bell was administratively enabled when rung. +.It Li hushed Ta true or false indicating whether or not the bell was quieted by the user when rung. .It Li hz Ta Tone that was requested in Hz. .El .Pp diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 1bbb12d52ec3..c65c6cb62ea1 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -1095,7 +1095,7 @@ vt_allocate_keyboard(struct vt_device *vd) #define DEVCTL_LEN 64 static void -vtterm_devctl(bool enabled, int hz, sbintime_t duration) +vtterm_devctl(bool enabled, bool hushed, int hz, sbintime_t duration) { struct sbuf sb; char *buf; @@ -1104,8 +1104,9 @@ vtterm_devctl(bool enabled, int hz, sbintime_t duration) if (buf == NULL) return; sbuf_new(&sb, buf, DEVCTL_LEN, SBUF_FIXEDLEN); - sbuf_printf(&sb, "enabled=%s hz=%d duration_ms=%d", - enabled ? "true" : "false", hz, (int)(duration / SBT_1MS)); + sbuf_printf(&sb, "enabled=%s hushed=%s hz=%d duration_ms=%d", + enabled ? "true" : "false", hushed ? "true" : "false", + hz, (int)(duration / SBT_1MS)); sbuf_finish(&sb); if (sbuf_error(&sb) == 0) devctl_notify("VT", "BELL", "RING", sbuf_data(&sb)); @@ -1119,8 +1120,8 @@ vtterm_bell(struct terminal *tm) struct vt_window *vw = tm->tm_softc; struct vt_device *vd = vw->vw_device; - vtterm_devctl(vt_enable_bell, vw->vw_bell_pitch, - vw->vw_bell_duration); + vtterm_devctl(vt_enable_bell, vd->vd_flags & VDF_QUIET_BELL, + vw->vw_bell_pitch, vw->vw_bell_duration); if (!vt_enable_bell) return; @@ -1140,6 +1141,8 @@ vtterm_beep(struct terminal *tm, u_int param) { u_int freq; sbintime_t period; + struct vt_window *vw = tm->tm_softc; + struct vt_device *vd = vw->vw_device; if ((param == 0) || ((param & 0xffff) == 0)) { vtterm_bell(tm); @@ -1149,7 +1152,8 @@ vtterm_beep(struct terminal *tm, u_int param) period = ((param >> 16) & 0xffff) * SBT_1MS; freq = 1193182 / (param & 0xffff); - vtterm_devctl(vt_enable_bell, freq, period); + vtterm_devctl(vt_enable_bell, vd->vd_flags & VDF_QUIET_BELL, + freq, period); if (!vt_enable_bell) return; From nobody Fri Nov 19 05:27:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A11CD1854066; Fri, 19 Nov 2021 05:27: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 4HwQCV47PQz4lSJ; Fri, 19 Nov 2021 05:27:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 698E222943; Fri, 19 Nov 2021 05:27: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 1AJ5RIb8002458; Fri, 19 Nov 2021 05:27:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ5RI2x002457; Fri, 19 Nov 2021 05:27:18 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:27:18 GMT Message-Id: <202111190527.1AJ5RI2x002457@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 6df0510839d0 - stable/12 - nfscl: Modify Close RPC so that it does not use "owner" for NFSv4.1/4.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6df0510839d03991520f711b01d8d18b3fcfea95 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6df0510839d03991520f711b01d8d18b3fcfea95 commit 6df0510839d03991520f711b01d8d18b3fcfea95 Author: Rick Macklem AuthorDate: 2021-10-18 00:50:56 +0000 Commit: Rick Macklem CommitDate: 2021-11-19 05:24:29 +0000 nfscl: Modify Close RPC so that it does not use "owner" for NFSv4.1/4.2 This patch modifies the function that does the Close RPC (nfsrpc_closerpc) so that it does not use the open_owner (nfso_own) for NFSv4.1/4.2. Use of the seqid in the open_owner structure is only needed for NFSv4.0. Same applies to a NFSERR_STALESTATEID reply, which should only happen for NFSv4.0. This allows nfsrpc_closerpc() to be called when nfso_own is no longer valid. This, in turn, allows nfsrpc_closerpc() to be called after the shared lock on the clientID is released, for NFSv4.1/4.2. This is being done to prepare the code for a future patch that fixes the case where an NFSv4.1/4.2 server replies NFSERR_DELAY to a Close operation. (cherry picked from commit d95c0a12a2dd58b4b13cbc2d1a9fccd848f8ac5e) --- sys/fs/nfsclient/nfs_clrpcops.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 78594cffc3ec..615b48abe6bb 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -835,11 +835,13 @@ nfsrpc_closerpc(struct nfsrv_descript *nd, struct nfsmount *nmp, nfscl_reqstart(nd, NFSPROC_CLOSE, nmp, op->nfso_fh, op->nfso_fhlen, NULL, NULL, 0, 0); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED + NFSX_STATEID); - *tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid); - if (NFSHASNFSV4N(nmp)) + if (NFSHASNFSV4N(nmp)) { *tl++ = 0; - else + *tl++ = 0; + } else { + *tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid); *tl++ = op->nfso_stateid.seqid; + } *tl++ = op->nfso_stateid.other[0]; *tl++ = op->nfso_stateid.other[1]; *tl = op->nfso_stateid.other[2]; @@ -849,11 +851,12 @@ nfsrpc_closerpc(struct nfsrv_descript *nd, struct nfsmount *nmp, NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL); if (error) return (error); - NFSCL_INCRSEQID(op->nfso_own->nfsow_seqid, nd); + if (!NFSHASNFSV4N(nmp)) + NFSCL_INCRSEQID(op->nfso_own->nfsow_seqid, nd); if (nd->nd_repstat == 0) NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID); error = nd->nd_repstat; - if (error == NFSERR_STALESTATEID) + if (!NFSHASNFSV4N(nmp) && error == NFSERR_STALESTATEID) nfscl_initiate_recovery(op->nfso_own->nfsow_clp); nfsmout: mbuf_freem(nd->nd_mrep); From nobody Fri Nov 19 05:32:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 35E4418579F6; Fri, 19 Nov 2021 05:32:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwQL011HWz4nDp; Fri, 19 Nov 2021 05:32:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 03763227D8; Fri, 19 Nov 2021 05:32: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 1AJ5WtTk015253; Fri, 19 Nov 2021 05:32:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ5WtbT015252; Fri, 19 Nov 2021 05:32:55 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:32:55 GMT Message-Id: <202111190532.1AJ5WtbT015252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 69e838e971cd - stable/12 - nfscl: Handle NFSv4.1/4.2 Close RPC NFSERR_DELAY replies better List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 69e838e971cda85da388369fa3bc6169bc44c45d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=69e838e971cda85da388369fa3bc6169bc44c45d commit 69e838e971cda85da388369fa3bc6169bc44c45d Author: Rick Macklem AuthorDate: 2021-10-18 22:02:21 +0000 Commit: Rick Macklem CommitDate: 2021-11-19 05:28:07 +0000 nfscl: Handle NFSv4.1/4.2 Close RPC NFSERR_DELAY replies better Without this patch, if a NFSv4.1/4.2 server replies NFSERR_DELAY to a Close operation, the client loops retrying the Close while holding a shared lock on the clientID. This shared lock blocks returns of delegations, even though the server has issued a CB_RECALL to request the delegation return. This patch delays doing a retry of a Close that received a reply of NFSERR_DELAY until after the shared lock on the clientID is released, for NFSv4.1/4.2. To fix this for NFSv4.0 would be very difficult and since the only known NFSv4 server to reply NFSERR_DELAY to Close only does NFSv4.1/4.2, this fix is hoped to be sufficient. This problem was detected during a recent IETF working group NFSv4 testing event. (cherry picked from commit 52dee2bc035545f7ae2b838d8a0449f65043cd8a) --- sys/fs/nfs/nfs_var.h | 3 ++- sys/fs/nfsclient/nfs_clrpcops.c | 11 +++++++---- sys/fs/nfsclient/nfs_clstate.c | 27 ++++++++++++++++++++++++--- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index d10aa05a6b6f..24702dab442a 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -571,7 +571,8 @@ void nfscl_dumpstate(struct nfsmount *, int, int, int, int); void nfscl_dupopen(vnode_t, int); int nfscl_getclose(vnode_t, struct nfsclclient **); int nfscl_doclose(vnode_t, struct nfsclclient **, NFSPROC_T *); -void nfsrpc_doclose(struct nfsmount *, struct nfsclopen *, NFSPROC_T *); +int nfsrpc_doclose(struct nfsmount *, struct nfsclopen *, NFSPROC_T *, bool, + bool); int nfscl_deleg(mount_t, struct nfsclclient *, u_int8_t *, int, struct ucred *, NFSPROC_T *, struct nfscldeleg **); void nfscl_lockinit(struct nfsv4lock *); diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 615b48abe6bb..9cfab016eecb 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -727,8 +727,9 @@ nfsrpc_close(vnode_t vp, int doclose, NFSPROC_T *p) /* * Close the open. */ -void -nfsrpc_doclose(struct nfsmount *nmp, struct nfsclopen *op, NFSPROC_T *p) +int +nfsrpc_doclose(struct nfsmount *nmp, struct nfsclopen *op, NFSPROC_T *p, + bool loop_on_delayed, bool freeop) { struct nfsrv_descript nfsd, *nd = &nfsd; struct nfscllockowner *lp, *nlp; @@ -807,7 +808,7 @@ nfsrpc_doclose(struct nfsmount *nmp, struct nfsclopen *op, NFSPROC_T *p) nfscl_lockexcl(&op->nfso_own->nfsow_rwlock, NFSCLSTATEMUTEXPTR); NFSUNLOCKCLSTATE(); do { - error = nfscl_tryclose(op, tcred, nmp, p, true); + error = nfscl_tryclose(op, tcred, nmp, p, loop_on_delayed); if (error == NFSERR_GRACE) (void) nfs_catnap(PZERO, error, "nfs_close"); } while (error == NFSERR_GRACE); @@ -816,9 +817,11 @@ nfsrpc_doclose(struct nfsmount *nmp, struct nfsclopen *op, NFSPROC_T *p) LIST_FOREACH_SAFE(lp, &op->nfso_lock, nfsl_list, nlp) nfscl_freelockowner(lp, 0); - nfscl_freeopen(op, 0, true); + if (freeop && error != NFSERR_DELAY) + nfscl_freeopen(op, 0, true); NFSUNLOCKCLSTATE(); NFSFREECRED(tcred); + return (error); } /* diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 1825b56eabd0..387d043b4dbd 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -3231,8 +3231,10 @@ int nfscl_doclose(vnode_t vp, struct nfsclclient **clpp, NFSPROC_T *p) { struct nfsclclient *clp; + struct nfsmount *nmp; struct nfsclowner *owp, *nowp; - struct nfsclopen *op; + struct nfsclopen *op, *nop; + struct nfsclopenhead delayed; struct nfscldeleg *dp; struct nfsfh *nfhp; struct nfsclrecalllayout *recallp; @@ -3244,6 +3246,7 @@ nfscl_doclose(vnode_t vp, struct nfsclclient **clpp, NFSPROC_T *p) return (error); *clpp = clp; + nmp = VFSTONFS(vnode_mount(vp)); nfhp = VTONFS(vp)->n_fhp; recallp = malloc(sizeof(*recallp), M_NFSLAYRECALL, M_WAITOK); NFSLOCKCLSTATE(); @@ -3269,6 +3272,7 @@ nfscl_doclose(vnode_t vp, struct nfsclclient **clpp, NFSPROC_T *p) &lyp); /* Now process the opens against the server. */ + LIST_INIT(&delayed); lookformore: LIST_FOREACH(owp, &clp->nfsc_owner, nfsow_list) { op = LIST_FIRST(&owp->nfsow_open); @@ -3280,9 +3284,19 @@ lookformore: KASSERT((op->nfso_opencnt == 0), ("nfscl: bad open cnt on server")); NFSUNLOCKCLSTATE(); - nfsrpc_doclose(VFSTONFS(vnode_mount(vp)), op, - p); + if (NFSHASNFSV4N(nmp)) + nfsrpc_doclose(nmp, op, p, false, + true); + else + nfsrpc_doclose(nmp, op, p, true, + true); NFSLOCKCLSTATE(); + if (error == NFSERR_DELAY) { + nfscl_unlinkopen(op); + op->nfso_own = NULL; + LIST_INSERT_HEAD(&delayed, op, + nfso_list); + } goto lookformore; } op = LIST_NEXT(op, nfso_list); @@ -3309,6 +3323,13 @@ lookformore: * used by the function, but calling free() with a NULL pointer is ok. */ free(recallp, M_NFSLAYRECALL); + + /* Now, loop retrying the delayed closes. */ + LIST_FOREACH_SAFE(op, &delayed, nfso_list, nop) { + nfsrpc_doclose(nmp, op, p, true, false); + LIST_REMOVE(op, nfso_list); + nfscl_freeopen(op, 0, false); + } return (0); } From nobody Fri Nov 19 05:38:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 897D6188B466; Fri, 19 Nov 2021 05:38:08 +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 4HwQS03WbSz4qCg; Fri, 19 Nov 2021 05:38:08 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637300288; 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=sTFwXyrlAz/6pkIvS81I3yAU5miAT9Ci/6GcCizrBS8=; b=BzdOSXJ0ksErbkMYa2wNr5BIT65dNIpdDlCVa104X3WJKHDF0+aWu/cwke4kuf4DXJf3R3 ZBkbgznsdeXsoOsaWxAcEW241kM6a3Kc/trg6CWoD4t4CpUd7j9VcP8PosOPWbhkpqri2O vJoD4VjWkpU78UveqVusMRVvhqs52EOjC03VsUJr8NcU72Sl7YttGqKsv1JdpThwTTi8H1 0O/rw1/KBI8pkP7eQEpKZRdt6bLv+YFo4DEeQAjPtj20WBU3DaYa83Dw10p7ueSX9pWNZQ 9Z5s5wwDkOHWamBVFbnfaIXJXCu/vJnPl8eEwxY5jQ9rR3osncN3yz4ULWGGjQ== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 4F9CCE69F; Fri, 19 Nov 2021 05:38:08 +0000 (UTC) Date: Fri, 19 Nov 2021 05:38:08 +0000 From: Alexey Dokuchaev To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a721ac948e9b - main - Document that 13.x is the end of the line for FreeBSD/mips Message-ID: References: <202111190424.1AJ4OZIC020700@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: <202111190424.1AJ4OZIC020700@gitrepo.freebsd.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637300288; 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=sTFwXyrlAz/6pkIvS81I3yAU5miAT9Ci/6GcCizrBS8=; b=BCFrJTDeZ8W9H7ICx12DLkQMA5fYTXcOX592Lkh9wxGMGeqvjgdACgG43HVCBTdw8DxdYH O2AJBxa/OVNREBefaO2hIIB9l1LS+WAyZtW9hXAfDHIIoYG/N8w7XINure85+/zoRrc7en XmCOcj3YX9Y7WywY//Q5L5PGWUd91ZmBuNkuCisO4vCjtX1EbSX/qOd8bQimlVS9MQ3wxT /olZlYFt2cSNuccfoDa1Ep6FCijMkyWLcd7dpfhiJZMZGbMU6lRyv4uCNukDECbtDgSMWa iIlE4vCoupDOo+bnCBzd2TgGCpKWdcYk2wM26sBeheCd8JeyjRA6FJqA5LUW+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637300288; a=rsa-sha256; cv=none; b=DNuc+zCj5HUQVWKp0lCTcpfYFbVUeUKvXcM3Zls/97ckq7zcjcnDQyatr0hmLYvBETLikU AtlqAi6YDjIzYBKT40ZhuBMEfIt0F/8d1rQgCYR8uZvBJEUpxRLjlyflVwB+3C29jYizup kemFyK4XjuHmzOd/KpAQ3VWumTyBxqD9b5iRIolT05jkuR6duFbfulj00SKyC7kfnFA6x4 KraY0IKJvXsXFiJpENDcp0DLwrUk2YGQE8kGfreXz69b6PB4AmirTV4CBHxfuB4LhfYLOk 9Fdsrq1UIQx6YsPY2fQU807wtbwIlbotXU0Jj3i2qcnXTSbyGz7deYJFMbHqfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Fri, Nov 19, 2021 at 04:24:35AM +0000, Warner Losh wrote: > commit a721ac948e9bec965a8a0434acede2a672b41a51 > > Document that 13.x is the end of the line for FreeBSD/mips > > diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 > index 51586f4dad30..97f64a9d0da3 100644 > --- a/share/man/man7/arch.7 > +++ b/share/man/man7/arch.7 > @@ -97,15 +97,15 @@ architectures, the final release. > .It armv7 Ta 12.0 > .It ia64 Ta 5.0 Ta 10.4 > .It i386 Ta 1.0 > -.It mips Ta 8.0 > -.It mipsel Ta 9.0 > -.It mipselhf Ta 12.0 > -.It mipshf Ta 12.0 > -.It mipsn32 Ta 9.0 > -.It mips64 Ta 9.0 > -.It mips64el Ta 9.0 > -.It mips64elhf Ta 12.0 > -.It mips64hf Ta 12.0 > +.It mips Ta 8.0 Ta 13.x > +.It mipsel Ta 9.0 Ta 13.x > +.It mipselhf Ta 12.0 Ta 13.x > +.It mipshf Ta 12.0 Ta 13.x > +.It mipsn32 Ta 9.0 Ta 13.x > +.It mips64 Ta 9.0 Ta 13.x > +.It mips64el Ta 9.0 Ta 13.x > +.It mips64elhf Ta 12.0 Ta 13.x > +.It mips64hf Ta 12.0 Ta 13.x > .It pc98 Ta 2.2 Ta 11.4 Other lines have this third column aligned; doesn't breaking it bother your sens esthe'tique? ./danfe From nobody Fri Nov 19 05:45:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 90365188EF51; Fri, 19 Nov 2021 05:45: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 4HwQcQ3Y0Kz4sSP; Fri, 19 Nov 2021 05:45:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5600222DEE; Fri, 19 Nov 2021 05:45: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 1AJ5jQGl028855; Fri, 19 Nov 2021 05:45:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ5jQuh028854; Fri, 19 Nov 2021 05:45:26 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:45:26 GMT Message-Id: <202111190545.1AJ5jQuh028854@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: 1f629966d683 - main - ANSIify libsa 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f629966d683ca2e79adbc6c39e7ec5f1a87832f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1f629966d683ca2e79adbc6c39e7ec5f1a87832f commit 1f629966d683ca2e79adbc6c39e7ec5f1a87832f Author: Alfonso AuthorDate: 2021-07-07 14:52:21 +0000 Commit: Warner Losh CommitDate: 2021-11-19 05:43:02 +0000 ANSIify libsa functions Convert libsa files to use ANSI function definitions. Pull request: https://github.com/freebsd/freebsd-src/pull/508 [ cut and paste error corrected ] --- stand/libsa/dev.c | 9 +++------ stand/libsa/in_cksum.c | 4 +--- stand/libsa/inet_ntoa.c | 3 +-- stand/libsa/stat.c | 4 +--- stand/libsa/strcasecmp.c | 7 ++----- stand/libsa/strdup.c | 3 +-- 6 files changed, 9 insertions(+), 21 deletions(-) diff --git a/stand/libsa/dev.c b/stand/libsa/dev.c index 20f3100852e7..1d1dd075580e 100644 --- a/stand/libsa/dev.c +++ b/stand/libsa/dev.c @@ -40,22 +40,19 @@ __FBSDID("$FreeBSD$"); #include "stand.h" int -nodev() +nodev(void) { return (ENXIO); } void -nullsys() +nullsys(void) { } /* ARGSUSED */ int -noioctl(f, cmd, data) - struct open_file *f; - u_long cmd; - void *data; +noioctl(struct open_file *f __unused, u_long cmd __unused, void *data __unused) { return (EINVAL); } diff --git a/stand/libsa/in_cksum.c b/stand/libsa/in_cksum.c index 97782152d71d..2f8c448fc0eb 100644 --- a/stand/libsa/in_cksum.c +++ b/stand/libsa/in_cksum.c @@ -50,9 +50,7 @@ __FBSDID("$FreeBSD$"); * In particular, it should not be this one. */ int -in_cksum(p, len) - void *p; - int len; +in_cksum(void *p, int len) { int sum = 0, oddbyte = 0, v = 0; u_char *cp = p; diff --git a/stand/libsa/inet_ntoa.c b/stand/libsa/inet_ntoa.c index f675a0ff7736..45c79f26151d 100644 --- a/stand/libsa/inet_ntoa.c +++ b/stand/libsa/inet_ntoa.c @@ -45,8 +45,7 @@ static char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93"; * to base 256 d.d.d.d representation. */ char * -inet_ntoa(in) - struct in_addr in; +inet_ntoa(struct in_addr in) { static const char fmt[] = "%u.%u.%u.%u"; static char ret[sizeof "255.255.255.255"]; diff --git a/stand/libsa/stat.c b/stand/libsa/stat.c index 9875372b441d..f3b198955ab8 100644 --- a/stand/libsa/stat.c +++ b/stand/libsa/stat.c @@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$"); #include "stand.h" int -stat(str, sb) - const char *str; - struct stat *sb; +stat(const char *str, struct stat *sb) { int fd, rv; diff --git a/stand/libsa/strcasecmp.c b/stand/libsa/strcasecmp.c index f8131019384c..12ec81b022c4 100644 --- a/stand/libsa/strcasecmp.c +++ b/stand/libsa/strcasecmp.c @@ -39,8 +39,7 @@ static char sccsid[] = "@(#)strcasecmp.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ int -strcasecmp(s1, s2) - const char *s1, *s2; +strcasecmp(const char *s1, const char *s2) { const u_char *us1 = (const u_char *)s1, @@ -53,9 +52,7 @@ strcasecmp(s1, s2) } int -strncasecmp(s1, s2, n) - const char *s1, *s2; - size_t n; +strncasecmp(const char *s1, const char *s2, size_t n) { if (n != 0) { const u_char diff --git a/stand/libsa/strdup.c b/stand/libsa/strdup.c index de6c4def8bc6..ad7200c69850 100644 --- a/stand/libsa/strdup.c +++ b/stand/libsa/strdup.c @@ -39,8 +39,7 @@ static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93"; #include char * -strdup(str) - const char *str; +strdup(const char *str) { size_t len; char *copy = NULL; From nobody Fri Nov 19 05:57:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BBEF31894202; Fri, 19 Nov 2021 05:57: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 4HwQst47L5z3BwQ; Fri, 19 Nov 2021 05:57:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 601F72314B; Fri, 19 Nov 2021 05:57: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 1AJ5v6Sa042584; Fri, 19 Nov 2021 05:57:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ5v6OQ042583; Fri, 19 Nov 2021 05:57:06 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:57:06 GMT Message-Id: <202111190557.1AJ5v6OQ042583@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: 9f6c794ee2ed - main - NanoBSD/rescue: Update to 20200214 OpenSSH configuration 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f6c794ee2ed91f65b570176d3eb729777817bc4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9f6c794ee2ed91f65b570176d3eb729777817bc4 commit 9f6c794ee2ed91f65b570176d3eb729777817bc4 Author: Jose Luis Duran AuthorDate: 2021-07-16 17:17:30 +0000 Commit: Warner Losh CommitDate: 2021-11-19 05:55:46 +0000 NanoBSD/rescue: Update to 20200214 OpenSSH configuration files No functional change intended. --- .../tools/nanobsd/rescue/Files/etc/ssh/ssh_config | 19 ++++---- .../tools/nanobsd/rescue/Files/etc/ssh/sshd_config | 52 ++++++++++++---------- 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config b/tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config index 07e4086bbbbb..e7d969abed25 100644 --- a/tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config +++ b/tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config @@ -1,4 +1,4 @@ -# $OpenBSD: ssh_config,v 1.22 2006/05/29 12:56:33 dtucker Exp $ +# $OpenBSD: ssh_config,v 1.33 2017/05/07 23:12:57 djm Exp $ # $FreeBSD$ # This is the ssh client system-wide configuration file. See @@ -21,8 +21,6 @@ # Host * # ForwardAgent no # ForwardX11 no -# RhostsRSAAuthentication no -# RSAAuthentication yes # PasswordAuthentication yes # HostbasedAuthentication no # GSSAPIAuthentication no @@ -32,15 +30,20 @@ # AddressFamily any # ConnectTimeout 0 # StrictHostKeyChecking ask -# IdentityFile ~/.ssh/identity # IdentityFile ~/.ssh/id_rsa # IdentityFile ~/.ssh/id_dsa +# IdentityFile ~/.ssh/id_ecdsa +# IdentityFile ~/.ssh/id_ed25519 # Port 22 -# Protocol 2,1 -# Cipher 3des -# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc +# Protocol 2 +# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc +# MACs hmac-md5,hmac-sha1,umac-64@openssh.com # EscapeChar ~ # Tunnel no # TunnelDevice any:any # PermitLocalCommand no -# VersionAddendum FreeBSD-20061110 +# VisualHostKey no +# ProxyCommand ssh -q -W %h:%p gateway.example.com +# RekeyLimit 1G 1h +# VerifyHostKeyDNS yes +# VersionAddendum FreeBSD-20200214 diff --git a/tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config b/tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config index 96572d967e9b..23eec590c9eb 100644 --- a/tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config +++ b/tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config @@ -1,4 +1,4 @@ -# $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $ +# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $ # $FreeBSD$ # This is the sshd server system-wide configuration file. See @@ -8,31 +8,25 @@ # The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options change a +# possible, but leave them commented. Uncommented options override the # default value. # Note that some of FreeBSD's defaults differ from OpenBSD's, and # FreeBSD has a few additional options. -#VersionAddendum FreeBSD-20061110 - #Port 22 -#Protocol 2 #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress :: -# HostKey for protocol version 1 -#HostKey /etc/ssh/ssh_host_key -# HostKeys for protocol version 2 -#HostKey /etc/ssh/ssh_host_dsa_key +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_ecdsa_key +#HostKey /etc/ssh/ssh_host_ed25519_key -# Lifetime and size of ephemeral version 1 server key -#KeyRegenerationInterval 1h -#ServerKeyBits 768 +# Ciphers and keying +#RekeyLimit default none # Logging -# obsoletes QuietMode and FascistLogging #SyslogFacility AUTH #LogLevel INFO @@ -42,17 +36,23 @@ PermitRootLogin yes #StrictModes yes #MaxAuthTries 6 +#MaxSessions 10 -#RSAAuthentication yes #PubkeyAuthentication yes -#AuthorizedKeysFile .ssh/authorized_keys + +# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 +# but this is overridden so installations will only check .ssh/authorized_keys +AuthorizedKeysFile .ssh/authorized_keys + +#AuthorizedPrincipalsFile none + +#AuthorizedKeysCommand none +#AuthorizedKeysCommandUser nobody # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#RhostsRSAAuthentication no -# similar for protocol version 2 #HostbasedAuthentication no # Change to yes if you don't trust ~/.ssh/known_hosts for -# RhostsRSAAuthentication and HostbasedAuthentication +# HostbasedAuthentication #IgnoreUserKnownHosts no # Don't read the user's ~/.rhosts and ~/.shosts files #IgnoreRhosts yes @@ -75,37 +75,40 @@ PermitRootLogin yes #GSSAPICleanupCredentials yes # Set this to 'no' to disable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will +# and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass -PermitRootLogin yes +# the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and ChallengeResponseAuthentication to 'no'. #UsePAM yes +#AllowAgentForwarding yes #AllowTcpForwarding yes #GatewayPorts no #X11Forwarding yes #X11DisplayOffset 10 #X11UseLocalhost yes +#PermitTTY yes #PrintMotd yes #PrintLastLog yes #TCPKeepAlive yes -#UseLogin no -#UsePrivilegeSeparation yes #PermitUserEnvironment no #Compression delayed #ClientAliveInterval 0 #ClientAliveCountMax 3 #UseDNS yes #PidFile /var/run/sshd.pid -#MaxStartups 10 +#MaxStartups 10:30:100 #PermitTunnel no +#ChrootDirectory none +#UseBlacklist no +#VersionAddendum FreeBSD-20200214 # no default banner path -#Banner /some/path +#Banner none # override default of no subsystems Subsystem sftp /usr/libexec/sftp-server @@ -114,4 +117,5 @@ Subsystem sftp /usr/libexec/sftp-server #Match User anoncvs # X11Forwarding no # AllowTcpForwarding no +# PermitTTY no # ForceCommand cvs server From nobody Fri Nov 19 05:57:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 594C41894053; Fri, 19 Nov 2021 05:57: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 4HwQsv61yxz3Bwl; Fri, 19 Nov 2021 05:57:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CBA023306; Fri, 19 Nov 2021 05:57: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 1AJ5v7YG042610; Fri, 19 Nov 2021 05:57:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ5v71p042609; Fri, 19 Nov 2021 05:57:07 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:57:07 GMT Message-Id: <202111190557.1AJ5v71p042609@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: 137692469769 - main - nanobsd: remove psuedo-terminals from ttys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 137692469769bb10625fb7dd29f867f93f05b641 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=137692469769bb10625fb7dd29f867f93f05b641 commit 137692469769bb10625fb7dd29f867f93f05b641 Author: Warner Losh AuthorDate: 2021-11-19 05:49:13 +0000 Commit: Warner Losh CommitDate: 2021-11-19 05:55:57 +0000 nanobsd: remove psuedo-terminals from ttys Yowsa! Another review mentioned this in passing... Only 10 years late. Sponsored by: Netflix --- tools/tools/nanobsd/pcengines/Files/etc/ttys | 513 --------------------------- tools/tools/nanobsd/rescue/Files/etc/ttys | 513 --------------------------- 2 files changed, 1026 deletions(-) diff --git a/tools/tools/nanobsd/pcengines/Files/etc/ttys b/tools/tools/nanobsd/pcengines/Files/etc/ttys index 7d28bad02ee3..49e9b3bee05e 100644 --- a/tools/tools/nanobsd/pcengines/Files/etc/ttys +++ b/tools/tools/nanobsd/pcengines/Files/etc/ttys @@ -50,516 +50,3 @@ ttyd2 "/usr/libexec/getty std.9600" dialup off secure ttyd3 "/usr/libexec/getty std.9600" dialup off secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure -# Pseudo terminals -ttyp0 none network -ttyp1 none network -ttyp2 none network -ttyp3 none network -ttyp4 none network -ttyp5 none network -ttyp6 none network -ttyp7 none network -ttyp8 none network -ttyp9 none network -ttypa none network -ttypb none network -ttypc none network -ttypd none network -ttype none network -ttypf none network -ttypg none network -ttyph none network -ttypi none network -ttypj none network -ttypk none network -ttypl none network -ttypm none network -ttypn none network -ttypo none network -ttypp none network -ttypq none network -ttypr none network -ttyps none network -ttypt none network -ttypu none network -ttypv none network -ttyq0 none network -ttyq1 none network -ttyq2 none network -ttyq3 none network -ttyq4 none network -ttyq5 none network -ttyq6 none network -ttyq7 none network -ttyq8 none network -ttyq9 none network -ttyqa none network -ttyqb none network -ttyqc none network -ttyqd none network -ttyqe none network -ttyqf none network -ttyqg none network -ttyqh none network -ttyqi none network -ttyqj none network -ttyqk none network -ttyql none network -ttyqm none network -ttyqn none network -ttyqo none network -ttyqp none network -ttyqq none network -ttyqr none network -ttyqs none network -ttyqt none network -ttyqu none network -ttyqv none network -ttyr0 none network -ttyr1 none network -ttyr2 none network -ttyr3 none network -ttyr4 none network -ttyr5 none network -ttyr6 none network -ttyr7 none network -ttyr8 none network -ttyr9 none network -ttyra none network -ttyrb none network -ttyrc none network -ttyrd none network -ttyre none network -ttyrf none network -ttyrg none network -ttyrh none network -ttyri none network -ttyrj none network -ttyrk none network -ttyrl none network -ttyrm none network -ttyrn none network -ttyro none network -ttyrp none network -ttyrq none network -ttyrr none network -ttyrs none network -ttyrt none network -ttyru none network -ttyrv none network -ttys0 none network -ttys1 none network -ttys2 none network -ttys3 none network -ttys4 none network -ttys5 none network -ttys6 none network -ttys7 none network -ttys8 none network -ttys9 none network -ttysa none network -ttysb none network -ttysc none network -ttysd none network -ttyse none network -ttysf none network -ttysg none network -ttysh none network -ttysi none network -ttysj none network -ttysk none network -ttysl none network -ttysm none network -ttysn none network -ttyso none network -ttysp none network -ttysq none network -ttysr none network -ttyss none network -ttyst none network -ttysu none network -ttysv none network -ttyP0 none network -ttyP1 none network -ttyP2 none network -ttyP3 none network -ttyP4 none network -ttyP5 none network -ttyP6 none network -ttyP7 none network -ttyP8 none network -ttyP9 none network -ttyPa none network -ttyPb none network -ttyPc none network -ttyPd none network -ttyPe none network -ttyPf none network -ttyPg none network -ttyPh none network -ttyPi none network -ttyPj none network -ttyPk none network -ttyPl none network -ttyPm none network -ttyPn none network -ttyPo none network -ttyPp none network -ttyPq none network -ttyPr none network -ttyPs none network -ttyPt none network -ttyPu none network -ttyPv none network -ttyQ0 none network -ttyQ1 none network -ttyQ2 none network -ttyQ3 none network -ttyQ4 none network -ttyQ5 none network -ttyQ6 none network -ttyQ7 none network -ttyQ8 none network -ttyQ9 none network -ttyQa none network -ttyQb none network -ttyQc none network -ttyQd none network -ttyQe none network -ttyQf none network -ttyQg none network -ttyQh none network -ttyQi none network -ttyQj none network -ttyQk none network -ttyQl none network -ttyQm none network -ttyQn none network -ttyQo none network -ttyQp none network -ttyQq none network -ttyQr none network -ttyQs none network -ttyQt none network -ttyQu none network -ttyQv none network -ttyR0 none network -ttyR1 none network -ttyR2 none network -ttyR3 none network -ttyR4 none network -ttyR5 none network -ttyR6 none network -ttyR7 none network -ttyR8 none network -ttyR9 none network -ttyRa none network -ttyRb none network -ttyRc none network -ttyRd none network -ttyRe none network -ttyRf none network -ttyRg none network -ttyRh none network -ttyRi none network -ttyRj none network -ttyRk none network -ttyRl none network -ttyRm none network -ttyRn none network -ttyRo none network -ttyRp none network -ttyRq none network -ttyRr none network -ttyRs none network -ttyRt none network -ttyRu none network -ttyRv none network -ttyS0 none network -ttyS1 none network -ttyS2 none network -ttyS3 none network -ttyS4 none network -ttyS5 none network -ttyS6 none network -ttyS7 none network -ttyS8 none network -ttyS9 none network -ttySa none network -ttySb none network -ttySc none network -ttySd none network -ttySe none network -ttySf none network -ttySg none network -ttySh none network -ttySi none network -ttySj none network -ttySk none network -ttySl none network -ttySm none network -ttySn none network -ttySo none network -ttySp none network -ttySq none network -ttySr none network -ttySs none network -ttySt none network -ttySu none network -ttySv none network -ttyl0 none network -ttyl1 none network -ttyl2 none network -ttyl3 none network -ttyl4 none network -ttyl5 none network -ttyl6 none network -ttyl7 none network -ttyl8 none network -ttyl9 none network -ttyla none network -ttylb none network -ttylc none network -ttyld none network -ttyle none network -ttylf none network -ttylg none network -ttylh none network -ttyli none network -ttylj none network -ttylk none network -ttyll none network -ttylm none network -ttyln none network -ttylo none network -ttylp none network -ttylq none network -ttylr none network -ttyls none network -ttylt none network -ttylu none network -ttylv none network -ttym0 none network -ttym1 none network -ttym2 none network -ttym3 none network -ttym4 none network -ttym5 none network -ttym6 none network -ttym7 none network -ttym8 none network -ttym9 none network -ttyma none network -ttymb none network -ttymc none network -ttymd none network -ttyme none network -ttymf none network -ttymg none network -ttymh none network -ttymi none network -ttymj none network -ttymk none network -ttyml none network -ttymm none network -ttymn none network -ttymo none network -ttymp none network -ttymq none network -ttymr none network -ttyms none network -ttymt none network -ttymu none network -ttymv none network -ttyn0 none network -ttyn1 none network -ttyn2 none network -ttyn3 none network -ttyn4 none network -ttyn5 none network -ttyn6 none network -ttyn7 none network -ttyn8 none network -ttyn9 none network -ttyna none network -ttynb none network -ttync none network -ttynd none network -ttyne none network -ttynf none network -ttyng none network -ttynh none network -ttyni none network -ttynj none network -ttynk none network -ttynl none network -ttynm none network -ttynn none network -ttyno none network -ttynp none network -ttynq none network -ttynr none network -ttyns none network -ttynt none network -ttynu none network -ttynv none network -ttyo0 none network -ttyo1 none network -ttyo2 none network -ttyo3 none network -ttyo4 none network -ttyo5 none network -ttyo6 none network -ttyo7 none network -ttyo8 none network -ttyo9 none network -ttyoa none network -ttyob none network -ttyoc none network -ttyod none network -ttyoe none network -ttyof none network -ttyog none network -ttyoh none network -ttyoi none network -ttyoj none network -ttyok none network -ttyol none network -ttyom none network -ttyon none network -ttyoo none network -ttyop none network -ttyoq none network -ttyor none network -ttyos none network -ttyot none network -ttyou none network -ttyov none network -ttyL0 none network -ttyL1 none network -ttyL2 none network -ttyL3 none network -ttyL4 none network -ttyL5 none network -ttyL6 none network -ttyL7 none network -ttyL8 none network -ttyL9 none network -ttyLa none network -ttyLb none network -ttyLc none network -ttyLd none network -ttyLe none network -ttyLf none network -ttyLg none network -ttyLh none network -ttyLi none network -ttyLj none network -ttyLk none network -ttyLl none network -ttyLm none network -ttyLn none network -ttyLo none network -ttyLp none network -ttyLq none network -ttyLr none network -ttyLs none network -ttyLt none network -ttyLu none network -ttyLv none network -ttyM0 none network -ttyM1 none network -ttyM2 none network -ttyM3 none network -ttyM4 none network -ttyM5 none network -ttyM6 none network -ttyM7 none network -ttyM8 none network -ttyM9 none network -ttyMa none network -ttyMb none network -ttyMc none network -ttyMd none network -ttyMe none network -ttyMf none network -ttyMg none network -ttyMh none network -ttyMi none network -ttyMj none network -ttyMk none network -ttyMl none network -ttyMm none network -ttyMn none network -ttyMo none network -ttyMp none network -ttyMq none network -ttyMr none network -ttyMs none network -ttyMt none network -ttyMu none network -ttyMv none network -ttyN0 none network -ttyN1 none network -ttyN2 none network -ttyN3 none network -ttyN4 none network -ttyN5 none network -ttyN6 none network -ttyN7 none network -ttyN8 none network -ttyN9 none network -ttyNa none network -ttyNb none network -ttyNc none network -ttyNd none network -ttyNe none network -ttyNf none network -ttyNg none network -ttyNh none network -ttyNi none network -ttyNj none network -ttyNk none network -ttyNl none network -ttyNm none network -ttyNn none network -ttyNo none network -ttyNp none network -ttyNq none network -ttyNr none network -ttyNs none network -ttyNt none network -ttyNu none network -ttyNv none network -ttyO0 none network -ttyO1 none network -ttyO2 none network -ttyO3 none network -ttyO4 none network -ttyO5 none network -ttyO6 none network -ttyO7 none network -ttyO8 none network -ttyO9 none network -ttyOa none network -ttyOb none network -ttyOc none network -ttyOd none network -ttyOe none network -ttyOf none network -ttyOg none network -ttyOh none network -ttyOi none network -ttyOj none network -ttyOk none network -ttyOl none network -ttyOm none network -ttyOn none network -ttyOo none network -ttyOp none network -ttyOq none network -ttyOr none network -ttyOs none network -ttyOt none network -ttyOu none network -ttyOv none network diff --git a/tools/tools/nanobsd/rescue/Files/etc/ttys b/tools/tools/nanobsd/rescue/Files/etc/ttys index 8e72947a73c7..eed846f54feb 100644 --- a/tools/tools/nanobsd/rescue/Files/etc/ttys +++ b/tools/tools/nanobsd/rescue/Files/etc/ttys @@ -50,516 +50,3 @@ ttyu2 "/usr/libexec/getty std.9600" dialup off secure ttyu3 "/usr/libexec/getty std.9600" dialup off secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure -# Pseudo terminals -ttyp0 none network -ttyp1 none network -ttyp2 none network -ttyp3 none network -ttyp4 none network -ttyp5 none network -ttyp6 none network -ttyp7 none network -ttyp8 none network -ttyp9 none network -ttypa none network -ttypb none network -ttypc none network -ttypd none network -ttype none network -ttypf none network -ttypg none network -ttyph none network -ttypi none network -ttypj none network -ttypk none network -ttypl none network -ttypm none network -ttypn none network -ttypo none network -ttypp none network -ttypq none network -ttypr none network -ttyps none network -ttypt none network -ttypu none network -ttypv none network -ttyq0 none network -ttyq1 none network -ttyq2 none network -ttyq3 none network -ttyq4 none network -ttyq5 none network -ttyq6 none network -ttyq7 none network -ttyq8 none network -ttyq9 none network -ttyqa none network -ttyqb none network -ttyqc none network -ttyqd none network -ttyqe none network -ttyqf none network -ttyqg none network -ttyqh none network -ttyqi none network -ttyqj none network -ttyqk none network -ttyql none network -ttyqm none network -ttyqn none network -ttyqo none network -ttyqp none network -ttyqq none network -ttyqr none network -ttyqs none network -ttyqt none network -ttyqu none network -ttyqv none network -ttyr0 none network -ttyr1 none network -ttyr2 none network -ttyr3 none network -ttyr4 none network -ttyr5 none network -ttyr6 none network -ttyr7 none network -ttyr8 none network -ttyr9 none network -ttyra none network -ttyrb none network -ttyrc none network -ttyrd none network -ttyre none network -ttyrf none network -ttyrg none network -ttyrh none network -ttyri none network -ttyrj none network -ttyrk none network -ttyrl none network -ttyrm none network -ttyrn none network -ttyro none network -ttyrp none network -ttyrq none network -ttyrr none network -ttyrs none network -ttyrt none network -ttyru none network -ttyrv none network -ttys0 none network -ttys1 none network -ttys2 none network -ttys3 none network -ttys4 none network -ttys5 none network -ttys6 none network -ttys7 none network -ttys8 none network -ttys9 none network -ttysa none network -ttysb none network -ttysc none network -ttysd none network -ttyse none network -ttysf none network -ttysg none network -ttysh none network -ttysi none network -ttysj none network -ttysk none network -ttysl none network -ttysm none network -ttysn none network -ttyso none network -ttysp none network -ttysq none network -ttysr none network -ttyss none network -ttyst none network -ttysu none network -ttysv none network -ttyP0 none network -ttyP1 none network -ttyP2 none network -ttyP3 none network -ttyP4 none network -ttyP5 none network -ttyP6 none network -ttyP7 none network -ttyP8 none network -ttyP9 none network -ttyPa none network -ttyPb none network -ttyPc none network -ttyPd none network -ttyPe none network -ttyPf none network -ttyPg none network -ttyPh none network -ttyPi none network -ttyPj none network -ttyPk none network -ttyPl none network -ttyPm none network -ttyPn none network -ttyPo none network -ttyPp none network -ttyPq none network -ttyPr none network -ttyPs none network -ttyPt none network -ttyPu none network -ttyPv none network -ttyQ0 none network -ttyQ1 none network -ttyQ2 none network -ttyQ3 none network -ttyQ4 none network -ttyQ5 none network -ttyQ6 none network -ttyQ7 none network -ttyQ8 none network -ttyQ9 none network -ttyQa none network -ttyQb none network -ttyQc none network -ttyQd none network -ttyQe none network -ttyQf none network -ttyQg none network -ttyQh none network -ttyQi none network -ttyQj none network -ttyQk none network -ttyQl none network -ttyQm none network -ttyQn none network -ttyQo none network -ttyQp none network -ttyQq none network -ttyQr none network -ttyQs none network -ttyQt none network -ttyQu none network -ttyQv none network -ttyR0 none network -ttyR1 none network -ttyR2 none network -ttyR3 none network -ttyR4 none network -ttyR5 none network -ttyR6 none network -ttyR7 none network -ttyR8 none network -ttyR9 none network -ttyRa none network -ttyRb none network -ttyRc none network -ttyRd none network -ttyRe none network -ttyRf none network -ttyRg none network -ttyRh none network -ttyRi none network -ttyRj none network -ttyRk none network -ttyRl none network -ttyRm none network -ttyRn none network -ttyRo none network -ttyRp none network -ttyRq none network -ttyRr none network -ttyRs none network -ttyRt none network -ttyRu none network -ttyRv none network -ttyS0 none network -ttyS1 none network -ttyS2 none network -ttyS3 none network -ttyS4 none network -ttyS5 none network -ttyS6 none network -ttyS7 none network -ttyS8 none network -ttyS9 none network -ttySa none network -ttySb none network -ttySc none network -ttySd none network -ttySe none network -ttySf none network -ttySg none network -ttySh none network -ttySi none network -ttySj none network -ttySk none network -ttySl none network -ttySm none network -ttySn none network -ttySo none network -ttySp none network -ttySq none network -ttySr none network -ttySs none network -ttySt none network -ttySu none network -ttySv none network -ttyl0 none network -ttyl1 none network -ttyl2 none network -ttyl3 none network -ttyl4 none network -ttyl5 none network -ttyl6 none network -ttyl7 none network -ttyl8 none network -ttyl9 none network -ttyla none network -ttylb none network -ttylc none network -ttyld none network -ttyle none network -ttylf none network -ttylg none network -ttylh none network -ttyli none network -ttylj none network -ttylk none network -ttyll none network -ttylm none network -ttyln none network -ttylo none network -ttylp none network -ttylq none network -ttylr none network -ttyls none network -ttylt none network -ttylu none network -ttylv none network -ttym0 none network -ttym1 none network -ttym2 none network -ttym3 none network -ttym4 none network -ttym5 none network -ttym6 none network -ttym7 none network -ttym8 none network -ttym9 none network -ttyma none network -ttymb none network -ttymc none network -ttymd none network -ttyme none network -ttymf none network -ttymg none network -ttymh none network -ttymi none network -ttymj none network -ttymk none network -ttyml none network -ttymm none network -ttymn none network -ttymo none network -ttymp none network -ttymq none network -ttymr none network -ttyms none network -ttymt none network -ttymu none network -ttymv none network -ttyn0 none network -ttyn1 none network -ttyn2 none network -ttyn3 none network -ttyn4 none network -ttyn5 none network -ttyn6 none network -ttyn7 none network -ttyn8 none network -ttyn9 none network -ttyna none network -ttynb none network -ttync none network -ttynd none network -ttyne none network -ttynf none network -ttyng none network -ttynh none network -ttyni none network -ttynj none network -ttynk none network -ttynl none network -ttynm none network -ttynn none network -ttyno none network -ttynp none network -ttynq none network -ttynr none network -ttyns none network -ttynt none network -ttynu none network -ttynv none network -ttyo0 none network -ttyo1 none network -ttyo2 none network -ttyo3 none network -ttyo4 none network -ttyo5 none network -ttyo6 none network -ttyo7 none network -ttyo8 none network -ttyo9 none network -ttyoa none network -ttyob none network -ttyoc none network -ttyod none network -ttyoe none network -ttyof none network -ttyog none network -ttyoh none network -ttyoi none network -ttyoj none network -ttyok none network -ttyol none network -ttyom none network -ttyon none network -ttyoo none network -ttyop none network -ttyoq none network -ttyor none network -ttyos none network -ttyot none network -ttyou none network -ttyov none network -ttyL0 none network -ttyL1 none network -ttyL2 none network -ttyL3 none network -ttyL4 none network -ttyL5 none network -ttyL6 none network -ttyL7 none network -ttyL8 none network -ttyL9 none network -ttyLa none network -ttyLb none network -ttyLc none network -ttyLd none network -ttyLe none network -ttyLf none network -ttyLg none network -ttyLh none network -ttyLi none network -ttyLj none network -ttyLk none network -ttyLl none network -ttyLm none network -ttyLn none network -ttyLo none network -ttyLp none network -ttyLq none network -ttyLr none network -ttyLs none network -ttyLt none network -ttyLu none network -ttyLv none network -ttyM0 none network -ttyM1 none network -ttyM2 none network -ttyM3 none network -ttyM4 none network -ttyM5 none network -ttyM6 none network -ttyM7 none network -ttyM8 none network -ttyM9 none network -ttyMa none network -ttyMb none network -ttyMc none network -ttyMd none network -ttyMe none network -ttyMf none network -ttyMg none network -ttyMh none network -ttyMi none network -ttyMj none network -ttyMk none network *** 75 LINES SKIPPED *** From nobody Fri Nov 19 05:57:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 47DE41893F79; Fri, 19 Nov 2021 05: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 4HwQsw6zYqz3By2; Fri, 19 Nov 2021 05:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8FE1B23197; Fri, 19 Nov 2021 05: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 1AJ5v84f042639; Fri, 19 Nov 2021 05: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 1AJ5v8e5042638; Fri, 19 Nov 2021 05:57:08 GMT (envelope-from git) Date: Fri, 19 Nov 2021 05:57:08 GMT Message-Id: <202111190557.1AJ5v8e5042638@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: 872d50a5d8fc - main - nanobsd/rescue: Catch up to 20210907 OpenSSH import List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 872d50a5d8fca234823385c0a134cd0da0f4477a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=872d50a5d8fca234823385c0a134cd0da0f4477a commit 872d50a5d8fca234823385c0a134cd0da0f4477a Author: Warner Losh AuthorDate: 2021-11-19 05:54:54 +0000 Commit: Warner Losh CommitDate: 2021-11-19 05:55:58 +0000 nanobsd/rescue: Catch up to 20210907 OpenSSH import Sponsored by: Netflix --- tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config | 6 +++--- tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config b/tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config index e7d969abed25..d2a1db35d42e 100644 --- a/tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config +++ b/tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config @@ -1,4 +1,4 @@ -# $OpenBSD: ssh_config,v 1.33 2017/05/07 23:12:57 djm Exp $ +# $OpenBSD: ssh_config,v 1.35 2020/07/17 03:43:42 dtucker Exp $ # $FreeBSD$ # This is the ssh client system-wide configuration file. See @@ -35,7 +35,6 @@ # IdentityFile ~/.ssh/id_ecdsa # IdentityFile ~/.ssh/id_ed25519 # Port 22 -# Protocol 2 # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc # MACs hmac-md5,hmac-sha1,umac-64@openssh.com # EscapeChar ~ @@ -45,5 +44,6 @@ # VisualHostKey no # ProxyCommand ssh -q -W %h:%p gateway.example.com # RekeyLimit 1G 1h +# UserKnownHostsFile ~/.ssh/known_hosts.d/%k # VerifyHostKeyDNS yes -# VersionAddendum FreeBSD-20200214 +# VersionAddendum FreeBSD-20210907 diff --git a/tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config b/tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config index 23eec590c9eb..e3020bbfcacf 100644 --- a/tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config +++ b/tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config @@ -1,4 +1,4 @@ -# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $ +# $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $ # $FreeBSD$ # This is the sshd server system-wide configuration file. See @@ -62,7 +62,7 @@ AuthorizedKeysFile .ssh/authorized_keys #PermitEmptyPasswords no # Change to no to disable PAM authentication -#ChallengeResponseAuthentication yes +#KbdInteractiveAuthentication yes # Kerberos options #KerberosAuthentication no @@ -76,13 +76,13 @@ AuthorizedKeysFile .ssh/authorized_keys # Set this to 'no' to disable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and +# be allowed through the KbdInteractiveAuthentication and # PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass +# PAM authentication via KbdInteractiveAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. +# and KbdInteractiveAuthentication to 'no'. #UsePAM yes #AllowAgentForwarding yes @@ -105,7 +105,7 @@ AuthorizedKeysFile .ssh/authorized_keys #PermitTunnel no #ChrootDirectory none #UseBlacklist no -#VersionAddendum FreeBSD-20200214 +#VersionAddendum FreeBSD-20210907 # no default banner path #Banner none From nobody Fri Nov 19 06:06:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 88E651899A58; Fri, 19 Nov 2021 06:06: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 4HwR533Psvz3GQL; Fri, 19 Nov 2021 06:06:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50A1323581; Fri, 19 Nov 2021 06:06: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 1AJ66lJ1056546; Fri, 19 Nov 2021 06:06:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ66lYp056545; Fri, 19 Nov 2021 06:06:47 GMT (envelope-from git) Date: Fri, 19 Nov 2021 06:06:47 GMT Message-Id: <202111190606.1AJ66lYp056545@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: 9097ac9af414 - main - Fix typo on "Celsius" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9097ac9af4144187d080cf6c796c50d777e517b1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9097ac9af4144187d080cf6c796c50d777e517b1 commit 9097ac9af4144187d080cf6c796c50d777e517b1 Author: Elyes HAOUAS AuthorDate: 2021-10-06 15:32:15 +0000 Commit: Warner Losh CommitDate: 2021-11-19 06:05:32 +0000 Fix typo on "Celsius" "Celcius" --> "Celsius" Signed-off-by: Elyes HAOUAS Pull Request: https://github.com/freebsd/freebsd-src/pull/551/files --- share/man/man4/gpioths.4 | 2 +- sys/arm/freescale/imx/imx6_anatop.c | 4 ++-- sys/dev/bxe/ecore_hsi.h | 8 ++++---- sys/dev/cxgb/common/cxgb_aq100x.c | 2 +- sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c | 4 ++-- sys/dev/qlnx/qlnxe/mcp_public.h | 2 +- sys/dev/usb/misc/ugold.c | 8 ++++---- usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/share/man/man4/gpioths.4 b/share/man/man4/gpioths.4 index 13b1040f2b25..19250b13107e 100644 --- a/share/man/man4/gpioths.4 +++ b/share/man/man4/gpioths.4 @@ -80,7 +80,7 @@ humidity measurements. The current temperature in integer deciKelvins. Note that .Xr sysctl 8 -will convert those units to display in decimal degrees Celcius. +will convert those units to display in decimal degrees Celsius. .It Va dev.gpioths..hum The current relative humidity, as an integer percentage. .It Va dev.gpioths..fails diff --git a/sys/arm/freescale/imx/imx6_anatop.c b/sys/arm/freescale/imx/imx6_anatop.c index 2a1b06bbd6ce..a233cf9ab354 100644 --- a/sys/arm/freescale/imx/imx6_anatop.c +++ b/sys/arm/freescale/imx/imx6_anatop.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); * Note that temperature values throughout this code are handled in two types of * units. Items with '_cnt' in the name use the hardware temperature count * units (higher counts are lower temperatures). Items with '_val' in the name - * are deci-Celcius, which are converted to/from deci-Kelvins in the sysctl + * are deci-Celsius, which are converted to/from deci-Kelvins in the sysctl * handlers (dK is the standard unit for temperature in sysctl). */ @@ -140,7 +140,7 @@ static struct oppt { */ static uint32_t imx6_ocotp_mhz_tab[] = {792, 852, 996, 1200}; -#define TZ_ZEROC 2731 /* deci-Kelvin <-> deci-Celcius offset. */ +#define TZ_ZEROC 2731 /* deci-Kelvin <-> deci-Celsius offset. */ uint32_t imx6_anatop_read_4(bus_size_t offset) diff --git a/sys/dev/bxe/ecore_hsi.h b/sys/dev/bxe/ecore_hsi.h index 22f0767e6b0f..28a3ea923185 100644 --- a/sys/dev/bxe/ecore_hsi.h +++ b/sys/dev/bxe/ecore_hsi.h @@ -1185,12 +1185,12 @@ struct shm_dev_info { /* size */ struct extended_dev_info_shared_cfg { /* NVRAM OFFSET */ - /* Threshold in celcius to start using the fan */ + /* Threshold in celsius to start using the fan */ uint32_t temperature_monitor1; /* 0x4000 */ #define EXTENDED_DEV_INFO_SHARED_CFG_TEMP_FAN_THRESH_MASK 0x0000007F #define EXTENDED_DEV_INFO_SHARED_CFG_TEMP_FAN_THRESH_SHIFT 0 - /* Threshold in celcius to shut down the board */ + /* Threshold in celsius to shut down the board */ #define EXTENDED_DEV_INFO_SHARED_CFG_TEMP_SHUT_THRESH_MASK 0x00007F00 #define EXTENDED_DEV_INFO_SHARED_CFG_TEMP_SHUT_THRESH_SHIFT 8 @@ -1366,12 +1366,12 @@ struct extended_dev_info_shared_cfg { /* NVRAM OFFSET */ #define EXTENDED_DEV_INFO_SHARED_CFG_REV_ID_CTRL_ACTUAL 0x00001000 #define EXTENDED_DEV_INFO_SHARED_CFG_REV_ID_CTRL_FORCE_B0 0x00002000 #define EXTENDED_DEV_INFO_SHARED_CFG_REV_ID_CTRL_FORCE_B1 0x00003000 - /* Threshold in celcius for max continuous operation */ + /* Threshold in celsius for max continuous operation */ uint32_t temperature_report; /* 0x4014 */ #define EXTENDED_DEV_INFO_SHARED_CFG_TEMP_MCOT_MASK 0x0000007F #define EXTENDED_DEV_INFO_SHARED_CFG_TEMP_MCOT_SHIFT 0 - /* Threshold in celcius for sensor caution */ + /* Threshold in celsius for sensor caution */ #define EXTENDED_DEV_INFO_SHARED_CFG_TEMP_SCT_MASK 0x00007F00 #define EXTENDED_DEV_INFO_SHARED_CFG_TEMP_SCT_SHIFT 8 diff --git a/sys/dev/cxgb/common/cxgb_aq100x.c b/sys/dev/cxgb/common/cxgb_aq100x.c index 78a76b2cc47c..8c06f9f5ab20 100644 --- a/sys/dev/cxgb/common/cxgb_aq100x.c +++ b/sys/dev/cxgb/common/cxgb_aq100x.c @@ -79,7 +79,7 @@ enum { } while (0) /* - * Return value is temperature in celcius, 0xffff for error or don't know. + * Return value is temperature in celsius, 0xffff for error or don't know. */ static int aq100x_temperature(struct cphy *phy) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c index f7228989ee04..9b91ae27ffee 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c @@ -872,7 +872,7 @@ mlx5e_hw_temperature_update(struct mlx5e_priv *priv) MLX5_ACCESS_REG_SUMMARY_CTRL_ID_MTMP, 0, 0); if (err) goto done; - /* convert from 0.125 celcius to millicelcius */ + /* convert from 0.125 celsius to millicelsius */ priv->params_ethtool.hw_val_temp[x] = (s16)MLX5_GET(mtmp_reg, out_sensor, temperature) * 125; } @@ -1639,6 +1639,6 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv) OID_AUTO, "hw_temperature", CTLTYPE_S32 | CTLFLAG_RD | CTLFLAG_MPSAFE, priv, 0, mlx5e_hw_temperature_handler, "I", - "HW temperature in millicelcius"); + "HW temperature in millicelsius"); } } diff --git a/sys/dev/qlnx/qlnxe/mcp_public.h b/sys/dev/qlnx/qlnxe/mcp_public.h index 71c59b16408e..585dc6634d71 100644 --- a/sys/dev/qlnx/qlnxe/mcp_public.h +++ b/sys/dev/qlnx/qlnxe/mcp_public.h @@ -513,7 +513,7 @@ struct public_global { u32 debug_mb_offset; u32 phymod_dbg_mb_offset; struct couple_mode_teaming cmt; - s32 internal_temperature; /* Temperature in Celcius (-255C / +255C), measured every second. */ + s32 internal_temperature; /* Temperature in Celsius (-255C / +255C), measured every second. */ u32 mfw_ver; u32 running_bundle_id; s32 external_temperature; diff --git a/sys/dev/usb/misc/ugold.c b/sys/dev/usb/misc/ugold.c index b5fb9591857f..0057d042006d 100644 --- a/sys/dev/usb/misc/ugold.c +++ b/sys/dev/usb/misc/ugold.c @@ -250,7 +250,7 @@ ugold_attach(device_t dev) SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(sensor_tree), OID_AUTO, "inner", CTLFLAG_RD, &sc->sc_sensor[UGOLD_INNER], 0, - "Inner temperature in microCelcius"); + "Inner temperature in microCelsius"); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(sensor_tree), @@ -260,17 +260,17 @@ ugold_attach(device_t dev) SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(sensor_tree), OID_AUTO, "inner_calib", CTLFLAG_RWTUN, &sc->sc_calib[UGOLD_INNER], 0, - "Inner calibration temperature in microCelcius"); + "Inner calibration temperature in microCelsius"); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(sensor_tree), OID_AUTO, "outer", CTLFLAG_RD, &sc->sc_sensor[UGOLD_OUTER], 0, - "Outer temperature in microCelcius"); + "Outer temperature in microCelsius"); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(sensor_tree), OID_AUTO, "outer_calib", CTLFLAG_RWTUN, &sc->sc_calib[UGOLD_OUTER], 0, - "Outer calibration temperature in microCelcius"); + "Outer calibration temperature in microCelsius"); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(sensor_tree), diff --git a/usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c b/usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c index 25e60f5dddbe..9d50c3e58750 100644 --- a/usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c +++ b/usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c @@ -300,7 +300,7 @@ oid_get_value(const struct oid *o, const struct oidformat *of, return (false); } - /* Convert temperatures from decikelvin to degrees Celcius. */ + /* Convert temperatures from decikelvin to degrees Celsius. */ if (oidformat_is_temperature(of)) { double v; int e; @@ -403,7 +403,7 @@ oid_get_metric(const struct oidname *on, const struct oidformat *of, label += strlen(label) + 1; } if (oidformat_is_temperature(of)) - strlcat(metric, "_celcius", mlen); + strlcat(metric, "_celsius", mlen); else if (oidformat_is_timeval(of)) strlcat(metric, "_seconds", mlen); From nobody Fri Nov 19 06:09:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 246D61899C79; Fri, 19 Nov 2021 06:09: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 4HwR7f0XTTz3Gmj; Fri, 19 Nov 2021 06:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6798234B0; Fri, 19 Nov 2021 06:09: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 1AJ6918C056821; Fri, 19 Nov 2021 06:09:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ691wu056820; Fri, 19 Nov 2021 06:09:01 GMT (envelope-from git) Date: Fri, 19 Nov 2021 06:09:01 GMT Message-Id: <202111190609.1AJ691wu056820@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: 04912a8d1c15 - main - release/packages/Makefile.package: Fix typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04912a8d1c15f9771545059032eedb9b0fea6e70 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=04912a8d1c15f9771545059032eedb9b0fea6e70 commit 04912a8d1c15f9771545059032eedb9b0fea6e70 Author: Elyes HAOUAS AuthorDate: 2021-11-06 11:59:36 +0000 Commit: Warner Losh CommitDate: 2021-11-19 06:07:53 +0000 release/packages/Makefile.package: Fix typo "librairies" --> "libraries" Signed-off-by: Elyes HAOUAS Pull Request: https://github.com/freebsd/freebsd-src/pull/553 --- release/packages/Makefile.package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index f41a31c8fb3b..8abf7cbd5353 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -110,8 +110,8 @@ tests_COMMENT= Test Suite tests_DESC= Test Suite unbound_COMMENT= Unbound DNS Resolver unbound_DESC= Unbound DNS Resolver -utilities_COMMENT= Non-vital programs and librairies -utilities_DESC= Non-vital programs and librairies +utilities_COMMENT= Non-vital programs and libraries +utilities_DESC= Non-vital programs and libraries vi_COMMENT= Vi Editor vi_DESC= Vi Editor vt_COMMENT= VT fonts and keyboard files From nobody Fri Nov 19 06:14:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EC94D189D5B0; Fri, 19 Nov 2021 06:14: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 4HwRG938dhz3JsN; Fri, 19 Nov 2021 06:14:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4CA622369D; Fri, 19 Nov 2021 06:14: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 1AJ6EftQ069584; Fri, 19 Nov 2021 06:14:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ6EfS2069583; Fri, 19 Nov 2021 06:14:41 GMT (envelope-from git) Date: Fri, 19 Nov 2021 06:14:41 GMT Message-Id: <202111190614.1AJ6EfS2069583@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: a420a672bc53 - main - Bootstrap: Prune building from pre-FreeBSD 11 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: a420a672bc53bd3928626aa5d0ec5b41c0471356 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a420a672bc53bd3928626aa5d0ec5b41c0471356 commit a420a672bc53bd3928626aa5d0ec5b41c0471356 Author: Warner Losh AuthorDate: 2021-10-10 17:28:54 +0000 Commit: Warner Losh CommitDate: 2021-11-19 06:13:44 +0000 Bootstrap: Prune building from pre-FreeBSD 11 support We don't need to bootstrap lex or md4 anymore. Cat doesn't need to be bootstrapped (but is needed for buildkernel) cruncgen doesn't need to be bootstrapped at all. kbdcontrol isn't needed Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/554 --- Makefile.inc1 | 51 ++++----------------------------------------------- 1 file changed, 4 insertions(+), 47 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index d8f50cf77d4b..6573b4a079a1 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -681,8 +681,8 @@ PACKAGE= kernel BOOTSTRAPPING?= 0 # Keep these in sync -MINIMUM_SUPPORTED_OSREL?= 1002501 -MINIMUM_SUPPORTED_REL?= 10.3 +MINIMUM_SUPPORTED_OSREL?= 1102501 +MINIMUM_SUPPORTED_REL?= 11.3 # Common environment for world related stages CROSSENV+= \ @@ -2239,24 +2239,6 @@ _vtfontcvt= usr.bin/vtfontcvt # If you add a new bootstrap tool where we could also use the host version, # please ensure that you also add a .else case where you add the tool to the # _bootstrap_tools_links variable. -.if ${BOOTSTRAPPING} < 1000033 -# Note: lex needs m4 to build but m4 also depends on lex (which needs m4 to -# generate any files). To fix this cyclic dependency we can build a bootstrap -# version of m4 (with pre-generated files) then use that to build the real m4. -# We can't simply use the host m4 since e.g. the macOS version does not accept -# the flags that are passed by lex. -# For lex we also use the pre-gerated files since we would otherwise need to -# build awk and sed first (which need lex to build) -# TODO: add a _bootstrap_lex and then build the real lex afterwards -_lex= usr.bin/lex -_m4= tools/build/bootstrap-m4 usr.bin/m4 -${_bt}-tools/build/bootstrap-m4: ${_bt}-usr.bin/lex ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc -${_bt}-usr.bin/m4: ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc ${_bt}-usr.bin/lex ${_bt}-tools/build/bootstrap-m4 -_bt_m4_depend=${_bt}-usr.bin/m4 -_bt_lex_depend=${_bt}-usr.bin/lex ${_bt_m4_depend} -.else -_bootstrap_tools_links+=m4 lex -.endif # ELF Tool Chain libraries are needed for ELF tools and dtrace tools. # r296685 fix cross-endian objcopy @@ -2292,21 +2274,6 @@ ${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd _bootstrap_tools_links+=mtree .endif -# r246097: log addition login.conf.db, passwd, pwd.db, and spwd.db with cat -l -.if ${BOOTSTRAPPING} < 1000027 -_cat= bin/cat -.else -_bootstrap_tools_links+=cat -.endif - -# r277259 crunchide: Correct 64-bit section header offset -# r281674 crunchide: always include both 32- and 64-bit ELF support -.if ${BOOTSTRAPPING} < 1100078 -_crunchide= usr.sbin/crunch/crunchide -.else -_bootstrap_tools_links+=crunchide -.endif - # 1300115: Higher WARNS fixes .if ${BOOTSTRAPPING} < 1202502 || \ (${BOOTSTRAPPING} > 1300000 && ${BOOTSTRAPPING} < 1300131) @@ -2315,18 +2282,6 @@ _crunchgen= usr.sbin/crunch/crunchgen _bootstrap_tools_links+=crunchgen .endif -# r296926 -P keymap search path, MFC to stable/10 in r298297 -# Note: kbdcontrol can not be bootstrapped on non-FreeBSD systems -.if !defined(CROSSBUILD_HOST) -.if (${BOOTSTRAPPING} < 1003501 || \ - (${BOOTSTRAPPING} >= 1100000 && ${BOOTSTRAPPING} < 1100103) || \ - (!exists(/usr/sbin/kbdcontrol))) -_kbdcontrol= usr.sbin/kbdcontrol -.else -_bootstrap_tools_links+=kbdcontrol -.endif -.endif - # 1300102: VHDX support .if ${BOOTSTRAPPING} < 1201520 || \ (${BOOTSTRAPPING} > 1300000 && ${BOOTSTRAPPING} < 1300102) @@ -2423,6 +2378,8 @@ _basic_bootstrap_tools+=usr.sbin/services_mkdb usr.sbin/pwd_mkdb # bootstrap ldd on non-FreeBSD systems _basic_bootstrap_tools+=usr.bin/ldd .endif +# cat is used by sys/kern/genoffset.sh and sys/conf/newvers.sh +_basic_bootstrap_tools+=bin/cat # sysctl/chflags are required for installkernel: .if !defined(CROSSBUILD_HOST) _basic_bootstrap_tools+=bin/chflags From nobody Fri Nov 19 06:20:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EAD271850E07; Fri, 19 Nov 2021 06:20: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 4HwRNr6KScz3Ldy; Fri, 19 Nov 2021 06:20:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B568723596; Fri, 19 Nov 2021 06:20: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 1AJ6KSqR078315; Fri, 19 Nov 2021 06:20:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ6KS08078314; Fri, 19 Nov 2021 06:20:28 GMT (envelope-from git) Date: Fri, 19 Nov 2021 06:20:28 GMT Message-Id: <202111190620.1AJ6KS08078314@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: 9cb485d18f01 - main - geom: Remove g_class.config List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cb485d18f01900800efe4ec3cfcfadd335da858 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9cb485d18f01900800efe4ec3cfcfadd335da858 commit 9cb485d18f01900800efe4ec3cfcfadd335da858 Author: Wuyang Chung AuthorDate: 2021-10-16 01:43:54 +0000 Commit: Warner Losh CommitDate: 2021-11-19 06:17:07 +0000 geom: Remove g_class.config g_class.config is write only, remove it. --- sys/geom/geom.h | 1 - sys/geom/geom_subr.c | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/geom/geom.h b/sys/geom/geom.h index 1aba1f46d6d5..0d6d74d0b51c 100644 --- a/sys/geom/geom.h +++ b/sys/geom/geom.h @@ -96,7 +96,6 @@ struct g_class { u_int version; u_int spare0; g_taste_t *taste; - g_config_t *config; g_ctl_req_t *ctlreq; g_init_t *init; g_fini_t *fini; diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index 2f7ea7754f7b..abaae5ccf57f 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -222,7 +222,6 @@ retry: /* Bar new entries */ mp->taste = NULL; - mp->config = NULL; LIST_FOREACH(gp, &mp->geom, geom) { error = mp->destroy_geom(NULL, mp, gp); From nobody Fri Nov 19 06:24:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 70F6A1851EC9; Fri, 19 Nov 2021 06:24: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 4HwRT51cGzz3Mct; Fri, 19 Nov 2021 06:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 13154235AE; Fri, 19 Nov 2021 06:24: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 1AJ6O9VT082669; Fri, 19 Nov 2021 06:24:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ6O94i082668; Fri, 19 Nov 2021 06:24:09 GMT (envelope-from git) Date: Fri, 19 Nov 2021 06:24:09 GMT Message-Id: <202111190624.1AJ6O94i082668@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: f7c32ed61785 - main - Fix 'take effect' spelling in menus and comments. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f7c32ed617858bcd22f8d1b03199099d50125721 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f7c32ed617858bcd22f8d1b03199099d50125721 commit f7c32ed617858bcd22f8d1b03199099d50125721 Author: betterentley AuthorDate: 2021-11-12 21:55:27 +0000 Commit: Warner Losh CommitDate: 2021-11-19 06:22:12 +0000 Fix 'take effect' spelling in menus and comments. Signed-off-by: John Bentley Pull Request: https://github.com/freebsd/freebsd-src/pull/559 --- share/man/man4/bpf.4 | 2 +- share/man/man4/bxe.4 | 2 +- sys/dev/e1000/e1000_phy.c | 2 +- sys/dev/igc/igc_phy.c | 2 +- sys/dev/isci/scil/scif_sas_controller.c | 2 +- sys/dev/mlx4/mlx4_core/mlx4_cmd.c | 2 +- usr.sbin/bsdconfig/security/include/messages.subr | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/share/man/man4/bpf.4 b/share/man/man4/bpf.4 index f285d5276376..f07279566ee4 100644 --- a/share/man/man4/bpf.4 +++ b/share/man/man4/bpf.4 @@ -698,7 +698,7 @@ will start receiving when packets arrive. Note that you must do an .Dv FIOSETOWN -in order for this to take affect, +in order for this to take effect, as the system will not default this for you. The signal may be changed via .Dv BIOCSRSIG . diff --git a/share/man/man4/bxe.4 b/share/man/man4/bxe.4 index 4838b825b756..98d3040ef454 100644 --- a/share/man/man4/bxe.4 +++ b/share/man/man4/bxe.4 @@ -88,7 +88,7 @@ There a number of configuration parameters that can be set to tweak the driver's behavior. These parameters can be set via the .Xr loader.conf 5 -file to take affect during the next system boot. +file to take effect during the next system boot. The following parameters affect ALL instances of the driver. .Bl -tag -width indent diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c index 5c346b2163de..0c74d4229a34 100644 --- a/sys/dev/e1000/e1000_phy.c +++ b/sys/dev/e1000/e1000_phy.c @@ -2020,7 +2020,7 @@ s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw) * disable auto-negotiation, configure duplex, configure speed, configure * the collision distance, write configuration to CTRL register. The * caller must write to the PHY_CONTROL register for these settings to - * take affect. + * take effect. **/ void e1000_phy_force_speed_duplex_setup(struct e1000_hw *hw, u16 *phy_ctrl) { diff --git a/sys/dev/igc/igc_phy.c b/sys/dev/igc/igc_phy.c index a6823ddf7bac..97cb11d1cd01 100644 --- a/sys/dev/igc/igc_phy.c +++ b/sys/dev/igc/igc_phy.c @@ -590,7 +590,7 @@ s32 igc_setup_copper_link_generic(struct igc_hw *hw) * disable auto-negotiation, configure duplex, configure speed, configure * the collision distance, write configuration to CTRL register. The * caller must write to the PHY_CONTROL register for these settings to - * take affect. + * take effect. **/ void igc_phy_force_speed_duplex_setup(struct igc_hw *hw, u16 *phy_ctrl) { diff --git a/sys/dev/isci/scil/scif_sas_controller.c b/sys/dev/isci/scil/scif_sas_controller.c index b3987984afa2..a3dd5513bdc8 100644 --- a/sys/dev/isci/scil/scif_sas_controller.c +++ b/sys/dev/isci/scil/scif_sas_controller.c @@ -561,7 +561,7 @@ SCI_STATUS scif_user_parameters_set( // In the future more could be done to prevent setting parameters at the // wrong time, but for now we'll simply set the values even if it is too - // late for them to take affect. + // late for them to take effect. return SCI_SUCCESS; } diff --git a/sys/dev/mlx4/mlx4_core/mlx4_cmd.c b/sys/dev/mlx4/mlx4_core/mlx4_cmd.c index 39a4064e3ff4..489492455bb9 100644 --- a/sys/dev/mlx4/mlx4_core/mlx4_cmd.c +++ b/sys/dev/mlx4/mlx4_core/mlx4_cmd.c @@ -3110,7 +3110,7 @@ int mlx4_set_vf_rate(struct mlx4_dev *dev, int port, int vf, int min_tx_rate, mlx4_info(dev, "VF in VGT mode (needed VST)\n"); mlx4_info(dev, - "rate %d take affect when VF moves to valid state\n", + "rate %d take effect when VF moves to valid state\n", max_tx_rate); return 0; } diff --git a/usr.sbin/bsdconfig/security/include/messages.subr b/usr.sbin/bsdconfig/security/include/messages.subr index f6df66751881..1ab2333c1fb8 100644 --- a/usr.sbin/bsdconfig/security/include/messages.subr +++ b/usr.sbin/bsdconfig/security/include/messages.subr @@ -33,7 +33,7 @@ msg_exit="Exit" msg_exit_this_menu="Exit this menu" msg_highly_secure="Highly Secure" msg_highly_secure_mode="Highly secure mode" -msg_menu_text="This menu allows you to configure aspects of the operating system security\npolicy. Please read the system documentation carefully before modifying\nthese settings, as they may cause service disruption if used improperly.\n\nMost settings will take affect only following a system reboot." +msg_menu_text="This menu allows you to configure aspects of the operating system security\npolicy. Please read the system documentation carefully before modifying\nthese settings, as they may cause service disruption if used improperly.\n\nMost settings will take effect only following a system reboot." msg_network_secure="Network Secure" msg_network_secure_mode="Network secure mode" msg_nfs_port="NFS port" From nobody Fri Nov 19 06:27:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ADDA51855310; Fri, 19 Nov 2021 06:27: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 4HwRYJ49rNz3NnG; Fri, 19 Nov 2021 06:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F4A4234DE; Fri, 19 Nov 2021 06:27: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 1AJ6RmjT083157; Fri, 19 Nov 2021 06:27:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ6RmbK083156; Fri, 19 Nov 2021 06:27:48 GMT (envelope-from git) Date: Fri, 19 Nov 2021 06:27:48 GMT Message-Id: <202111190627.1AJ6RmbK083156@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: 8587d752558c - main - Correct the name of the second parameter of biowait to wmesg List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8587d752558ccdfa3e3a9aa95f3af50304a973dc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8587d752558ccdfa3e3a9aa95f3af50304a973dc commit 8587d752558ccdfa3e3a9aa95f3af50304a973dc Author: Wuyang Chung AuthorDate: 2021-10-17 03:25:27 +0000 Commit: Warner Losh CommitDate: 2021-11-19 06:26:33 +0000 Correct the name of the second parameter of biowait to wmesg This parameter is passed directly to msleep, and the name of the msleep parameter is wmesg. Make them match. Pull Request: https://github.com/freebsd/freebsd-src/pull/557 --- sys/kern/vfs_bio.c | 4 ++-- sys/sys/bio.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 2b89490ce618..4b746a269171 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -4403,14 +4403,14 @@ biodone(struct bio *bp) * Wait for a BIO to finish. */ int -biowait(struct bio *bp, const char *wchan) +biowait(struct bio *bp, const char *wmesg) { struct mtx *mtxp; mtxp = mtx_pool_find(mtxpool_sleep, bp); mtx_lock(mtxp); while ((bp->bio_flags & BIO_DONE) == 0) - msleep(bp, mtxp, PRIBIO, wchan, 0); + msleep(bp, mtxp, PRIBIO, wmesg, 0); mtx_unlock(mtxp); if (bp->bio_error != 0) return (bp->bio_error); diff --git a/sys/sys/bio.h b/sys/sys/bio.h index fba1b9dce68f..90430b1e7099 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -152,7 +152,7 @@ extern int bio_transient_maxcnt; void biodone(struct bio *bp); void biofinish(struct bio *bp, struct devstat *stat, int error); -int biowait(struct bio *bp, const char *wchan); +int biowait(struct bio *bp, const char *wmesg); #if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING) void biotrack_buf(struct bio *bp, const char *location); From nobody Fri Nov 19 06:28:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 992CE185588E; Fri, 19 Nov 2021 06:28:59 +0000 (UTC) (envelope-from kevans91@ksu.edu) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2071.outbound.protection.outlook.com [40.107.94.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwRZg2240z3PbD; Fri, 19 Nov 2021 06:28:59 +0000 (UTC) (envelope-from kevans91@ksu.edu) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PwHygmu9ZmD9RqQkco0HS0zvyoQP6K3tyvM59/B1PMyQG7n55XyA/sKi/ePgS3YnCQrtjq1YpL9y5UBWnRFhC69EOSuDPCZK4JRwHO2PeO1zehCXMifKugBxZ2BHUX5YFJoPRfsH/3tXgyiJJ6EZlI511N7WUyylJ7lbxo1J60Qiq1fq4YVe9uFIMu/HvyPv2M/rrTNAklNbkvadvKeIw9r3BXzrm5R5A6pGpYFdBQnHaOYa4355UskkHAUAP9x5OskiS6fzQsOjBooE1B4OR/pWDG/o54yMst9+gmsERvWBrphvIxz+/GbfOVhbBUCBmwUws8/fhamTMcTS7aCciQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VAPbQSCZW20EHUZ2flLubtYZZj+cKb/q4jHAFJJV7lc=; b=lrG0k5ZD62fzDASb4ICsvu3JEcr/P8RgOhvUa+ONlrtreTbo9M0U1BqcYxlCE7sE+2FZTSUQQZ9AhpP+FCrnmHDltkiPx885+Ove+SjQT/yNnjoKTDv3Aen8nu5zq89Nbv8Y8RmW20zU+OTTDTgNoBnM23IA6lsToKYrBvSgUyDdsbwwVD4/G225bECrZtL/A08MzGgMcLLlkiQ9Nsz4+cCMawaN20BWTGDbRf3D+IFVz5Tj81WQWTg0axB21JCOZc7zemfDXPO9ltIUjVVSW7A2TRyi/OUFWjIJQ1x1d+heJ5oH2u/2g43KxANa6OzIwGWYHnbPZ+XDUM5YctQcgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ksu.edu; dmarc=pass action=none header.from=ksu.edu; dkim=pass header.d=ksu.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ksu.edu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VAPbQSCZW20EHUZ2flLubtYZZj+cKb/q4jHAFJJV7lc=; b=VBZyj/sitFCSgIAhoSsfMq65kn1TX3UGcKij4jCJk+ywdLJVwke8iKLIYFrSr6TiWwrj8b3wrFFnxdSKuOdBAiHWk8wqQn8lTUqGE5Tojdl9d6syYI9SxUk9JFK2lFzGXPRkyi73Vz4vYaV62mEdeWMg/7H9Hd1bGqYhMrAol10= Received: from DM6PR05MB6953.namprd05.prod.outlook.com (2603:10b6:5:206::17) by DM6PR05MB6506.namprd05.prod.outlook.com (2603:10b6:5:126::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.15; Fri, 19 Nov 2021 06:28:50 +0000 Received: from DM6PR05MB6953.namprd05.prod.outlook.com ([fe80::e8b3:ed98:faf7:8233]) by DM6PR05MB6953.namprd05.prod.outlook.com ([fe80::e8b3:ed98:faf7:8233%4]) with mapi id 15.20.4713.019; Fri, 19 Nov 2021 06:28:50 +0000 X-Gm-Message-State: AOAM532WJeQyJ5aicbPbB05fCtgzQePYtR/o9SYWyTPUMLArLKovM3OI hHladjNWAT8Ds1jKsHdAu6ER6+PSwExoJ3lBqM4= X-Google-Smtp-Source: ABdhPJye/zpv0SZP8VkFXzdziEeSlLIStkwHZ7bf/ZV62rZuVxk3Iybbd8xp+z9UZv0vIbvWQKS0v3BXwTMZR4Dbs0c= X-Received: by 2002:ac8:4e28:: with SMTP id d8mr3539769qtw.11.1637303326343; Thu, 18 Nov 2021 22:28:46 -0800 (PST) References: <202111190614.1AJ6EfS2069583@gitrepo.freebsd.org> In-Reply-To: <202111190614.1AJ6EfS2069583@gitrepo.freebsd.org> From: Kyle Evans Date: Fri, 19 Nov 2021 00:28:35 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: a420a672bc53 - main - Bootstrap: Prune building from pre-FreeBSD 11 support To: Warner Losh Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-ClientProxiedBy: BL0PR01CA0022.prod.exchangelabs.com (2603:10b6:208:71::35) To DM6PR05MB6953.namprd05.prod.outlook.com (2603:10b6:5:206::17) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: from mail-qt1-f169.google.com (209.85.160.169) by BL0PR01CA0022.prod.exchangelabs.com (2603:10b6:208:71::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Fri, 19 Nov 2021 06:28:49 +0000 Received: by mail-qt1-f169.google.com with SMTP id j17so8658155qtx.2; Thu, 18 Nov 2021 22:28:49 -0800 (PST) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aefe01cd-d81e-46b4-c107-08d9ab25d961 X-MS-TrafficTypeDiagnostic: DM6PR05MB6506: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uM94Jdg++EP9KhqLM7aDnSSIKxeY9I6AZYh8jrg7weem+I8Z+Cw3Wxhc3gzVL0482kSMP2aubibaE1ZwxACMB+KfKYQ/yrGZSG1m5SbbkEvgJh4b1DtveXb10bz0fTBRjj79KhcmGNlSgPvi9Tb7lryUsVBeSwCXHuoHwfKBmit9W8BkQVsJ8sxHRu4YegetFx5dlEfbKnxWlVvXakF6c76a02TjCIaEv9QvDON734jqxZncBS+G/Z+EcOYAKUV/Mp59deu+A6wzj+cLYMCoCKzteHKx+W/zoSRigWEWY9/AjSR1a4QkYBSI6FyLl+SC19MjIdnQZWfKWpSOFnxQDr6mJ/XP6JTKFUC76gLEBwPdpMhp2S5iTnujqOA9Ps/72LR62mIotugWcIMdonfAC3ITBJ56WWLd/iQjA4j87hS8GQ3Lcm+qdVDyVQPg6KCjw/VuuoJXyR1cZkHeedI8ZwbmMuwfu3aogXyMhDms7VYDx/7Eu8OOUGJb+HVSN4AWXlD9PGLkc8AepJNWWGmDMg8ia8zH9LuBOHFdtmwtXu1JQzPjRGqcCny9r+2r/qYKqotHtHjXgKICmn5KFerkG5Duf63t9HwQkkN9A4SGxzfC5hdDrpoJB8939FJAriIc5xQrnIba1u2B9EgG2EEsw3VlaTyMTV5srOOrZUuoGnKOEPLWlI2Oy8M9u42Wr7oFTwTNeT5eGLdbFrx8OCY4Ieb9PglECLrWk7lb6aKq/XRsMs9hSYlY7dhDybmP88C7Kk7JJbYtmdpzaqWQHgccY66SO+8cQuSUB4KKD977HJhucCLWztOr4+MKGyIhhox5nA6J3KPQAw27jFDgeQMsug== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR05MB6953.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(83380400001)(66476007)(450100002)(53546011)(4326008)(4001150100001)(9686003)(66556008)(38100700002)(54906003)(38350700002)(55446002)(186003)(508600001)(26005)(786003)(2906002)(966005)(55236004)(6666004)(75432002)(316002)(52116002)(45080400002)(86362001)(8676002)(66946007)(5660300002)(6916009)(42186006)(8936002)(84970400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Sng5OU5tdmhaUXdFSG4rbGtkVWpxV201TEo4NXdKRXNZTnBsK1YrKytiZXdl?= =?utf-8?B?bjdQc0VlWGxOZE5oNUlUT2p4L2JhRG9EVCtrVHllU0ZXRHlpTnVFLzdiM0Nl?= =?utf-8?B?Kyt3T2F5WG5EMHc3ZE50bTZyNUpJRUJqeEFvanVQaXkrOW1LOCtJL0FUYUF1?= =?utf-8?B?NnovNlJmVXFPMXJSTlZiZHVpVUt0WWZsYmpBa0VHSnkzRTdxNWVmODNLQkQ2?= =?utf-8?B?amhDSW9QY1ZhOXJrOWVGb2QweldDM0RnbXJkRC94NVB0QUJ5bzdNY1hNNzRv?= =?utf-8?B?c0dlMVZKTytrVVFmaDhaSnFqNVA1aEpwalNVejZKSTNUOGMwOHFuL1Jld2c5?= =?utf-8?B?SmtrRUE2ZWtHNTQvZVkvWkJQQlVwa2t5alBYUEsyVWZOeTAyTTM5MHBSRlRt?= =?utf-8?B?L0ZoZXBScUl5OGYwaTBuS2NaNlVMaUswUUJBYnVnNzdQd3V0RzFUa05EMmpT?= =?utf-8?B?cDd0NVpkSEZOQktGeGFSNWhoMFJLekVGMU9DOGZ6K2RIeVlVVnRqWmpiNXUr?= =?utf-8?B?MWdtejNNbzVVa3BybUpVZHpYaEUwMHFWWmhjMUpOOVYrMElTTDlwSk8wdXhu?= =?utf-8?B?eWJHd2RRMmFwS0UyRTIwRG1JS1gvUUtVUnZSeXZIVDFqbHVMZlB5dHNYY1lF?= =?utf-8?B?ZEI4YXFvWUpMUWxKNUcyS3pFSDBuMmlCeC9LcEluZGkwQzdCVCtZTUNqdzBI?= =?utf-8?B?V042UjdYZGVuQU9NTUhQdzRsK3g0OWZYc3dqaWgyMVMrcWsyOXhRK1VzOFk0?= =?utf-8?B?dlIvUGdmdUpOZENtOFRrTXdnTWpaRVJyc0hoTExraGcrVjMveU5oTXo3akFr?= =?utf-8?B?RVJ0eXBYSmNPbDVpRHArdWtEMVliV1hJd29mZXpHQlVpbXN1MDV5bTlKUk1i?= =?utf-8?B?Z0N0RGVYbmJXbnY0SDF5WktjMjdQNlp4Q1hGWHhOZHd5RS9RdWxpVGxpOGR0?= =?utf-8?B?eUZtQTlnaEUzVmh5UWNZRmJka3NlaHp0SHFyMUYzQk03Y3hyRks1Y0lrQkdN?= =?utf-8?B?bDd0dGhFb1NqUDlzTjA1QkV1VXExcHh4NEZEYWRHeHJ1bktBeWFxRTVabzdX?= =?utf-8?B?ZVVuVHBXYlpISWV0U0VLOUZzRktmamgzb0MvckxhTjRVL3lMb01lSGlOMkp3?= =?utf-8?B?dTQrbis1eGdPYTFsdEk2WSt4eGN5R01JaGZxcTVQNEZtQzQ2NWMvOXYyK1FB?= =?utf-8?B?azd1aGxaT3FSRXNCclZtSXJDOWFzT0lnTWtmRExTL2dEUytrN085MGtueHkz?= =?utf-8?B?enFBcTJpcHNNb2JmcTIwMGZEOWZSMGxQTitpU3FCcy9wbUllNnRSL2l3dWN3?= =?utf-8?B?djNqSEJMT1FEZDlaMDhsazNMcHB0c0REYU9peUdCWGFUd3ZOenFTaXdxN3hO?= =?utf-8?B?WndBdDV6UFptUW9HcFl3NHB6ck9ZVDRoUGQrN0hoNUdtYUlMYTBlYlFrOE5H?= =?utf-8?B?Zk85cU4xNGhYM1lKaEwwMTY5WHU2VU1HaHQ0REtjM01oQzE4TzMvTUhOTFY5?= =?utf-8?B?WjlvS051a2svV25URTRJZkJxaWwydTVSalptSC9JQnZoSitld3ViN3BJK080?= =?utf-8?B?OC9LdUlRTWFqMGVuNWV0eUhsWWdEQ1k1R3JkcTlueWFoRDBYNWJjMGRWM1pq?= =?utf-8?B?US9PKzlXeGhSbDUvd1ltKzVsV2dzQnI4eWM0eG0yeHh6YTlyREcrMjR3V1gr?= =?utf-8?B?bFNpTFQ3VDZTbG9vV3RaNDF4YU16N1U0QmhWTmtqVlkxQ3dWd1FUU0NMZk9G?= =?utf-8?B?bXkrUWlXblUwVVlHYm5FZzRLMGVadXc1OXRqN3ZCMkRnNUQvcmlTdGNxQ3FB?= =?utf-8?B?dktyWDk1MW9IYkQxY3U3bEVjTk1ncDI3UEtCRFRJTHFjaXFGdTQ5V3RaZTRI?= =?utf-8?B?YWR5WVNkcTVjdUc0REU0czNoQVpQTHBUQkYxeklseUtZcStBR3ZxVmdGN3pB?= =?utf-8?B?L2tsT05oazFDSGozMjRQYlRYVVEwbDlJMFR0dTE4c1ZiVlBIVCtFdGdWK2k1?= =?utf-8?B?VVhMZm43VFdOMXUyYnZuWkZVM2VsY1Jka2tGbWs5S3AvYlBSUUpvMU1ITkw4?= =?utf-8?B?ZHFyWE92K2lUdUFnbVlSanpnS2paMWhFeG5HTVo0QXRjZmU3KzZ2dGZINDBz?= =?utf-8?B?UDhEMHhkNk5tM2oxa0Jpd0swcEZrcUlVRG1mWXVPUDFYYU5Cems3R3gza09r?= =?utf-8?Q?a/hKsXNB4RC6ELzJ9q6iD4c=3D?= X-OriginatorOrg: ksu.edu X-MS-Exchange-CrossTenant-Network-Message-Id: aefe01cd-d81e-46b4-c107-08d9ab25d961 X-MS-Exchange-CrossTenant-AuthSource: DM6PR05MB6953.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2021 06:28:50.1366 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d9a2fa71-d67d-4cb6-b541-06ccaa8013fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: czUm0fy++UJs43azmHJHekg8d919Eisli4ieZWJ7wkphGZ+Z0xV+WM4k5KzjrY5/21AQl54fzjGnBb5oYTX7Qg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB6506 X-Rspamd-Queue-Id: 4HwRZg2240z3PbD X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Fri, Nov 19, 2021 at 12:14 AM Warner Losh wrote: > > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a420a672bc53bd3928626aa5d0ec5b41c0471356 > > commit a420a672bc53bd3928626aa5d0ec5b41c0471356 > Author: Warner Losh > AuthorDate: 2021-10-10 17:28:54 +0000 > Commit: Warner Losh > CommitDate: 2021-11-19 06:13:44 +0000 > > Bootstrap: Prune building from pre-FreeBSD 11 support > > We don't need to bootstrap lex or md4 anymore. > Cat doesn't need to be bootstrapped (but is needed for buildkernel) > cruncgen doesn't need to be bootstrapped at all. > kbdcontrol isn't needed > > Sponsored by: Netflix > Pull Request: https://github.com/freebsd/freebsd-src/pull/554 > --- > Makefile.inc1 | 51 ++++----------------------------------------------- > 1 file changed, 4 insertions(+), 47 deletions(-) > > diff --git a/Makefile.inc1 b/Makefile.inc1 > index d8f50cf77d4b..6573b4a079a1 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -681,8 +681,8 @@ PACKAGE= kernel > > BOOTSTRAPPING?= 0 > # Keep these in sync > -MINIMUM_SUPPORTED_OSREL?= 1002501 > -MINIMUM_SUPPORTED_REL?= 10.3 > +MINIMUM_SUPPORTED_OSREL?= 1102501 > +MINIMUM_SUPPORTED_REL?= 11.3 > > # Common environment for world related stages > CROSSENV+= \ > @@ -2239,24 +2239,6 @@ _vtfontcvt= usr.bin/vtfontcvt > # If you add a new bootstrap tool where we could also use the host version, > # please ensure that you also add a .else case where you add the tool to the > # _bootstrap_tools_links variable. > -.if ${BOOTSTRAPPING} < 1000033 > -# Note: lex needs m4 to build but m4 also depends on lex (which needs m4 to > -# generate any files). To fix this cyclic dependency we can build a bootstrap > -# version of m4 (with pre-generated files) then use that to build the real m4. > -# We can't simply use the host m4 since e.g. the macOS version does not accept > -# the flags that are passed by lex. > -# For lex we also use the pre-gerated files since we would otherwise need to > -# build awk and sed first (which need lex to build) > -# TODO: add a _bootstrap_lex and then build the real lex afterwards > -_lex= usr.bin/lex > -_m4= tools/build/bootstrap-m4 usr.bin/m4 > -${_bt}-tools/build/bootstrap-m4: ${_bt}-usr.bin/lex ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc > -${_bt}-usr.bin/m4: ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc ${_bt}-usr.bin/lex ${_bt}-tools/build/bootstrap-m4 > -_bt_m4_depend=${_bt}-usr.bin/m4 > -_bt_lex_depend=${_bt}-usr.bin/lex ${_bt_m4_depend} > -.else > -_bootstrap_tools_links+=m4 lex > -.endif > > # ELF Tool Chain libraries are needed for ELF tools and dtrace tools. > # r296685 fix cross-endian objcopy I'll leave a comment on just this first one, but it applies to the others as well... this left a bunch of references to the removed variables elsewhere in Makefile.inc1 that need to be removed. I'm also not entirely convinced that flat removal was entirely right....these should have probably been replaced with just the _bootstrap_tools_links additions, because we presumably still want them linked in if we're not building them. > @@ -2292,21 +2274,6 @@ ${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd > _bootstrap_tools_links+=mtree > .endif > > -# r246097: log addition login.conf.db, passwd, pwd.db, and spwd.db with cat -l > -.if ${BOOTSTRAPPING} < 1000027 > -_cat= bin/cat > -.else > -_bootstrap_tools_links+=cat > -.endif > - > -# r277259 crunchide: Correct 64-bit section header offset > -# r281674 crunchide: always include both 32- and 64-bit ELF support > -.if ${BOOTSTRAPPING} < 1100078 > -_crunchide= usr.sbin/crunch/crunchide > -.else > -_bootstrap_tools_links+=crunchide > -.endif > - > # 1300115: Higher WARNS fixes > .if ${BOOTSTRAPPING} < 1202502 || \ > (${BOOTSTRAPPING} > 1300000 && ${BOOTSTRAPPING} < 1300131) > @@ -2315,18 +2282,6 @@ _crunchgen= usr.sbin/crunch/crunchgen > _bootstrap_tools_links+=crunchgen > .endif > > -# r296926 -P keymap search path, MFC to stable/10 in r298297 > -# Note: kbdcontrol can not be bootstrapped on non-FreeBSD systems > -.if !defined(CROSSBUILD_HOST) > -.if (${BOOTSTRAPPING} < 1003501 || \ > - (${BOOTSTRAPPING} >= 1100000 && ${BOOTSTRAPPING} < 1100103) || \ > - (!exists(/usr/sbin/kbdcontrol))) > -_kbdcontrol= usr.sbin/kbdcontrol > -.else > -_bootstrap_tools_links+=kbdcontrol > -.endif > -.endif > - > # 1300102: VHDX support > .if ${BOOTSTRAPPING} < 1201520 || \ > (${BOOTSTRAPPING} > 1300000 && ${BOOTSTRAPPING} < 1300102) > @@ -2423,6 +2378,8 @@ _basic_bootstrap_tools+=usr.sbin/services_mkdb usr.sbin/pwd_mkdb > # bootstrap ldd on non-FreeBSD systems > _basic_bootstrap_tools+=usr.bin/ldd > .endif > +# cat is used by sys/kern/genoffset.sh and sys/conf/newvers.sh > +_basic_bootstrap_tools+=bin/cat > # sysctl/chflags are required for installkernel: > .if !defined(CROSSBUILD_HOST) > _basic_bootstrap_tools+=bin/chflags From nobody Fri Nov 19 06:39:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 37896188BC51; Fri, 19 Nov 2021 06:39: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 4HwRpb1056z3jM8; Fri, 19 Nov 2021 06:39:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F328C23ACD; Fri, 19 Nov 2021 06:39: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 1AJ6dI5l097028; Fri, 19 Nov 2021 06:39:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ6dI3Q097027; Fri, 19 Nov 2021 06:39:18 GMT (envelope-from git) Date: Fri, 19 Nov 2021 06:39:18 GMT Message-Id: <202111190639.1AJ6dI3Q097027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: ae23f081c5c7 - stable/12 - if_epair: delete mbuf tags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ae23f081c5c741b9f3019ed8a84226548ec15308 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ae23f081c5c741b9f3019ed8a84226548ec15308 commit ae23f081c5c741b9f3019ed8a84226548ec15308 Author: Kristof Provost AuthorDate: 2021-10-26 07:57:56 +0000 Commit: Kristof Provost CommitDate: 2021-11-19 06:35:58 +0000 if_epair: delete mbuf tags Remove all (non-persistent) tags when we transmit a packet. Real network interfaces do not carry any tags either, and leaving tags attached can produce unexpected results. Reviewed by: bz, glebius MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32663 (cherry picked from commit 62d2dcafb7f33fe8f47e9d5dd519d665f7af140e) --- sys/net/if_epair.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 376bdbe9117f..cd11036ad028 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -194,6 +194,12 @@ struct epair_dpcpu { }; DPCPU_DEFINE(struct epair_dpcpu, epair_dpcpu); +static void +epair_clear_mbuf(struct mbuf *m) +{ + m_tag_delete_nonpersistent(m); +} + static void epair_dpcpu_init(void) { @@ -433,6 +439,8 @@ epair_start_locked(struct ifnet *ifp) } DPRINTF("packet %s -> %s\n", ifp->if_xname, oifp->if_xname); + epair_clear_mbuf(m); + /* * Add a reference so the interface cannot go while the * packet is in transit as we rely on rcvif to stay valid. @@ -554,6 +562,9 @@ epair_transmit_locked(struct ifnet *ifp, struct mbuf *m) (void)epair_add_ifp_for_draining(ifp); return (error); } + + epair_clear_mbuf(m); + sc = oifp->if_softc; /* * Add a reference so the interface cannot go while the From nobody Fri Nov 19 06:39:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B9DA3188B96C; Fri, 19 Nov 2021 06:39: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 4HwRpb47sLz3jJh; Fri, 19 Nov 2021 06:39:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55AFE23ACE; Fri, 19 Nov 2021 06:39: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 1AJ6dJmI097104; Fri, 19 Nov 2021 06:39:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ6dJHU097103; Fri, 19 Nov 2021 06:39:19 GMT (envelope-from git) Date: Fri, 19 Nov 2021 06:39:19 GMT Message-Id: <202111190639.1AJ6dJHU097103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 6d20b6de6ae2 - stable/13 - if_epair: delete mbuf tags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6d20b6de6ae219114049a8fd14e3bd70c10876c0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6d20b6de6ae219114049a8fd14e3bd70c10876c0 commit 6d20b6de6ae219114049a8fd14e3bd70c10876c0 Author: Kristof Provost AuthorDate: 2021-10-26 07:57:56 +0000 Commit: Kristof Provost CommitDate: 2021-11-19 05:51:58 +0000 if_epair: delete mbuf tags Remove all (non-persistent) tags when we transmit a packet. Real network interfaces do not carry any tags either, and leaving tags attached can produce unexpected results. Reviewed by: bz, glebius MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32663 (cherry picked from commit 62d2dcafb7f33fe8f47e9d5dd519d665f7af140e) --- sys/net/if_epair.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 3cef6c76a2e2..2feefedb3cd9 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -195,6 +195,19 @@ struct epair_dpcpu { }; DPCPU_DEFINE(struct epair_dpcpu, epair_dpcpu); +static void +epair_clear_mbuf(struct mbuf *m) +{ + /* Remove any CSUM_SND_TAG as ether_input will barf. */ + if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) { + m_snd_tag_rele(m->m_pkthdr.snd_tag); + m->m_pkthdr.snd_tag = NULL; + m->m_pkthdr.csum_flags &= ~CSUM_SND_TAG; + } + + m_tag_delete_nonpersistent(m); +} + static void epair_dpcpu_init(void) { @@ -434,6 +447,8 @@ epair_start_locked(struct ifnet *ifp) } DPRINTF("packet %s -> %s\n", ifp->if_xname, oifp->if_xname); + epair_clear_mbuf(m); + /* * Add a reference so the interface cannot go while the * packet is in transit as we rely on rcvif to stay valid. @@ -555,6 +570,9 @@ epair_transmit_locked(struct ifnet *ifp, struct mbuf *m) (void)epair_add_ifp_for_draining(ifp); return (error); } + + epair_clear_mbuf(m); + sc = oifp->if_softc; /* * Add a reference so the interface cannot go while the From nobody Fri Nov 19 06:39:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CD728188BB42; Fri, 19 Nov 2021 06:39: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 4HwRpc3Z3nz3jJj; Fri, 19 Nov 2021 06:39:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 230A1238F2; Fri, 19 Nov 2021 06:39: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 1AJ6dKZV097128; Fri, 19 Nov 2021 06:39:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ6dKXb097127; Fri, 19 Nov 2021 06:39:20 GMT (envelope-from git) Date: Fri, 19 Nov 2021 06:39:20 GMT Message-Id: <202111190639.1AJ6dKXb097127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 4f524ecb040b - stable/12 - mbuf: PACKET_TAG_PF should not be persistent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4f524ecb040b532bebef69e943bb110b018daf21 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4f524ecb040b532bebef69e943bb110b018daf21 commit 4f524ecb040b532bebef69e943bb110b018daf21 Author: Kristof Provost AuthorDate: 2021-10-26 07:51:33 +0000 Commit: Kristof Provost CommitDate: 2021-11-19 06:35:58 +0000 mbuf: PACKET_TAG_PF should not be persistent We should clear firewall tags on loopback, icmp reflection, or if_epair transmission. Left over tags can produce unexpected behaviour, especially on if_epair where a and b interfaces can be in different vnets, and have different firewall policies set. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32664 (cherry picked from commit 7fe0c3f8d3303b67e55e3abcd66cbd4a9eaa1a0d) --- sys/sys/mbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 127dae75726f..7d3bc98eb5f6 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1150,7 +1150,7 @@ extern int nmbclusters; /* Maximum number of clusters */ #define PACKET_TAG_DIVERT 17 /* divert info */ #define PACKET_TAG_IPFORWARD 18 /* ipforward info */ #define PACKET_TAG_MACLABEL (19 | MTAG_PERSISTENT) /* MAC label */ -#define PACKET_TAG_PF (21 | MTAG_PERSISTENT) /* PF/ALTQ information */ +#define PACKET_TAG_PF 21 /* PF/ALTQ information */ #define PACKET_TAG_RTSOCKFAM 25 /* rtsock sa family */ #define PACKET_TAG_IPOPTIONS 27 /* Saved IP options */ #define PACKET_TAG_CARP 28 /* CARP info */ From nobody Fri Nov 19 06:39:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 417A2188BB46; Fri, 19 Nov 2021 06:39: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 4HwRpc5jcvz3jGj; Fri, 19 Nov 2021 06:39:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7797E238F3; Fri, 19 Nov 2021 06:39: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 1AJ6dKWJ097152; Fri, 19 Nov 2021 06:39:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ6dKno097151; Fri, 19 Nov 2021 06:39:20 GMT (envelope-from git) Date: Fri, 19 Nov 2021 06:39:20 GMT Message-Id: <202111190639.1AJ6dKno097151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 2036a3a8a168 - stable/13 - mbuf: PACKET_TAG_PF should not be persistent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2036a3a8a16832974b529d601a124ac52dfeb7d1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2036a3a8a16832974b529d601a124ac52dfeb7d1 commit 2036a3a8a16832974b529d601a124ac52dfeb7d1 Author: Kristof Provost AuthorDate: 2021-10-26 07:51:33 +0000 Commit: Kristof Provost CommitDate: 2021-11-19 05:51:58 +0000 mbuf: PACKET_TAG_PF should not be persistent We should clear firewall tags on loopback, icmp reflection, or if_epair transmission. Left over tags can produce unexpected behaviour, especially on if_epair where a and b interfaces can be in different vnets, and have different firewall policies set. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32664 (cherry picked from commit 7fe0c3f8d3303b67e55e3abcd66cbd4a9eaa1a0d) --- sys/sys/mbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 9f84d0758bc6..2182a6c7679c 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1327,7 +1327,7 @@ extern bool mb_use_ext_pgs; /* Use ext_pgs for sendfile */ #define PACKET_TAG_DIVERT 17 /* divert info */ #define PACKET_TAG_IPFORWARD 18 /* ipforward info */ #define PACKET_TAG_MACLABEL (19 | MTAG_PERSISTENT) /* MAC label */ -#define PACKET_TAG_PF (21 | MTAG_PERSISTENT) /* PF/ALTQ information */ +#define PACKET_TAG_PF 21 /* PF/ALTQ information */ #define PACKET_TAG_RTSOCKFAM 25 /* rtsock sa family */ #define PACKET_TAG_IPOPTIONS 27 /* Saved IP options */ #define PACKET_TAG_CARP 28 /* CARP info */ From nobody Fri Nov 19 06:45:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 75F68188D516 for ; Fri, 19 Nov 2021 06:46:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x92d.google.com (mail-ua1-x92d.google.com [IPv6:2607:f8b0:4864:20::92d]) (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 4HwRyM2kfPz3l05 for ; Fri, 19 Nov 2021 06:46:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x92d.google.com with SMTP id j14so9468887uan.10 for ; Thu, 18 Nov 2021 22:46:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UPgQyT4RDhNRtfSLQsOIu/uQMlJo/iphgaYn//jU7kg=; b=qVGnH/d/nW+CQVV0RLMfL+Tx4dTQtNQh50cGJJOsH5EjTNjhm0JXk/q/sqer0uRvaE SojIkTPtVdP3CEaXHTscHcd2qNETAWnf2J5GJVu9/2gJNZ3BicxC5Hg3z/vQs5V38vBr OaJOvhLvyqoNJ22F8+uMfvXhMs+HCa4r+t5SsaqzpFdbYST6lwKpaiDOUazeZbBvZxnv fXyNbOJrLdo6NCsWEm9Wb5Hpw2oHZ9MNhFHGdZULgPgpnVvuOntJW6hfx8jJ4Pu2dZsm 2cDlQK5RCjEmR/zl31JYgYADReHLmbv5qINkuMEEBxmg0vuvd8MEWp+t8oj2dJUSl1Z5 YMvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UPgQyT4RDhNRtfSLQsOIu/uQMlJo/iphgaYn//jU7kg=; b=dMJB5IOIYBzYaBlLW2ZbGtoeuz73H2PxQoZMirPqHD+OgDZtznx7Gl7WLbDbEAgclO h58/uRWNbngHYzFlRDs1aktCWTWZMTn+dlnb/D2miu7iykF68il2ZWZZVbrxx3cPH2OB wdacsl26yxxWWuTDOR2ezh0skf6ng8DYtpX0aaqsk0K39HV0VxwX1IM+XTu1Qnn/ECsW EeZLxguhC4yOHETN1F4p454LOrXT1n9jNwoki/YE5sLIBJrq/4Gigp1HQ/OXdkdf932O 6NLzr/Oq/EEIoYY1dJXreJHtiPXTRRdHzaspCRSD25umsEhLUaj65LNIOk9t82pARuhg TQ+w== X-Gm-Message-State: AOAM532hhSTxOMYgnsSqg02zqwqHkAWfSogYRK6Ya2wHg7FbnqQyp/1G xEHkGz89bcmR5kqWTQn3f4JEExP+x4rKD/X7FRa0bZ/SFPY= X-Google-Smtp-Source: ABdhPJzoCYdT2vlk0PvX5+AVbJDhzg4astZQMaZRF/Q8UP5/cSRKng6smsvH/QyrEJWnaCRVNw6yGg58u1QIWH72RyY= X-Received: by 2002:a67:ab48:: with SMTP id k8mr90790875vsh.30.1637304362497; Thu, 18 Nov 2021 22:46:02 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202111190424.1AJ4OZIC020700@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 18 Nov 2021 23:45:51 -0700 Message-ID: Subject: Re: git: a721ac948e9b - main - Document that 13.x is the end of the line for FreeBSD/mips To: Alexey Dokuchaev Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000ea898c05d11ea04e" X-Rspamd-Queue-Id: 4HwRyM2kfPz3l05 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000ea898c05d11ea04e Content-Type: text/plain; charset="UTF-8" On Thu, Nov 18, 2021 at 10:38 PM Alexey Dokuchaev wrote: > On Fri, Nov 19, 2021 at 04:24:35AM +0000, Warner Losh wrote: > > commit a721ac948e9bec965a8a0434acede2a672b41a51 > > > > Document that 13.x is the end of the line for FreeBSD/mips > > > > diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 > > index 51586f4dad30..97f64a9d0da3 100644 > > --- a/share/man/man7/arch.7 > > +++ b/share/man/man7/arch.7 > > @@ -97,15 +97,15 @@ architectures, the final release. > > .It armv7 Ta 12.0 > > .It ia64 Ta 5.0 Ta 10.4 > > .It i386 Ta 1.0 > > -.It mips Ta 8.0 > > -.It mipsel Ta 9.0 > > -.It mipselhf Ta 12.0 > > -.It mipshf Ta 12.0 > > -.It mipsn32 Ta 9.0 > > -.It mips64 Ta 9.0 > > -.It mips64el Ta 9.0 > > -.It mips64elhf Ta 12.0 > > -.It mips64hf Ta 12.0 > > +.It mips Ta 8.0 Ta 13.x > > +.It mipsel Ta 9.0 Ta 13.x > > +.It mipselhf Ta 12.0 Ta 13.x > > +.It mipshf Ta 12.0 Ta 13.x > > +.It mipsn32 Ta 9.0 Ta 13.x > > +.It mips64 Ta 9.0 Ta 13.x > > +.It mips64el Ta 9.0 Ta 13.x > > +.It mips64elhf Ta 12.0 Ta 13.x > > +.It mips64hf Ta 12.0 Ta 13.x > > .It pc98 Ta 2.2 Ta 11.4 > > Other lines have this third column aligned; doesn't breaking it > bother your sens esthe'tique? > Nope. Feel free to fix if it bothers yours. This has been sitting in my queue for too long. Warner --000000000000ea898c05d11ea04e-- From nobody Fri Nov 19 07:11:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D1C76189A86C; Fri, 19 Nov 2021 07:11: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 4HwSWl5W6Qz3tM4; Fri, 19 Nov 2021 07:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E07923F40; Fri, 19 Nov 2021 07:11: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 1AJ7BVoE047133; Fri, 19 Nov 2021 07: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 1AJ7BVL7047132; Fri, 19 Nov 2021 07:11:31 GMT (envelope-from git) Date: Fri, 19 Nov 2021 07:11:31 GMT Message-Id: <202111190711.1AJ7BVL7047132@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: 8502220db508 - main - Revert "Bootstrap: Prune building from pre-FreeBSD 11 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: 8502220db5085410dadd9b674b2f54df4815ac23 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8502220db5085410dadd9b674b2f54df4815ac23 commit 8502220db5085410dadd9b674b2f54df4815ac23 Author: Warner Losh AuthorDate: 2021-11-19 07:10:21 +0000 Commit: Warner Losh CommitDate: 2021-11-19 07:10:21 +0000 Revert "Bootstrap: Prune building from pre-FreeBSD 11 support" This reverts commit a420a672bc53bd3928626aa5d0ec5b41c0471356. kevans pointed out some potential problems here, so reverting until I can fix them. --- Makefile.inc1 | 51 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 6573b4a079a1..d8f50cf77d4b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -681,8 +681,8 @@ PACKAGE= kernel BOOTSTRAPPING?= 0 # Keep these in sync -MINIMUM_SUPPORTED_OSREL?= 1102501 -MINIMUM_SUPPORTED_REL?= 11.3 +MINIMUM_SUPPORTED_OSREL?= 1002501 +MINIMUM_SUPPORTED_REL?= 10.3 # Common environment for world related stages CROSSENV+= \ @@ -2239,6 +2239,24 @@ _vtfontcvt= usr.bin/vtfontcvt # If you add a new bootstrap tool where we could also use the host version, # please ensure that you also add a .else case where you add the tool to the # _bootstrap_tools_links variable. +.if ${BOOTSTRAPPING} < 1000033 +# Note: lex needs m4 to build but m4 also depends on lex (which needs m4 to +# generate any files). To fix this cyclic dependency we can build a bootstrap +# version of m4 (with pre-generated files) then use that to build the real m4. +# We can't simply use the host m4 since e.g. the macOS version does not accept +# the flags that are passed by lex. +# For lex we also use the pre-gerated files since we would otherwise need to +# build awk and sed first (which need lex to build) +# TODO: add a _bootstrap_lex and then build the real lex afterwards +_lex= usr.bin/lex +_m4= tools/build/bootstrap-m4 usr.bin/m4 +${_bt}-tools/build/bootstrap-m4: ${_bt}-usr.bin/lex ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc +${_bt}-usr.bin/m4: ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc ${_bt}-usr.bin/lex ${_bt}-tools/build/bootstrap-m4 +_bt_m4_depend=${_bt}-usr.bin/m4 +_bt_lex_depend=${_bt}-usr.bin/lex ${_bt_m4_depend} +.else +_bootstrap_tools_links+=m4 lex +.endif # ELF Tool Chain libraries are needed for ELF tools and dtrace tools. # r296685 fix cross-endian objcopy @@ -2274,6 +2292,21 @@ ${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd _bootstrap_tools_links+=mtree .endif +# r246097: log addition login.conf.db, passwd, pwd.db, and spwd.db with cat -l +.if ${BOOTSTRAPPING} < 1000027 +_cat= bin/cat +.else +_bootstrap_tools_links+=cat +.endif + +# r277259 crunchide: Correct 64-bit section header offset +# r281674 crunchide: always include both 32- and 64-bit ELF support +.if ${BOOTSTRAPPING} < 1100078 +_crunchide= usr.sbin/crunch/crunchide +.else +_bootstrap_tools_links+=crunchide +.endif + # 1300115: Higher WARNS fixes .if ${BOOTSTRAPPING} < 1202502 || \ (${BOOTSTRAPPING} > 1300000 && ${BOOTSTRAPPING} < 1300131) @@ -2282,6 +2315,18 @@ _crunchgen= usr.sbin/crunch/crunchgen _bootstrap_tools_links+=crunchgen .endif +# r296926 -P keymap search path, MFC to stable/10 in r298297 +# Note: kbdcontrol can not be bootstrapped on non-FreeBSD systems +.if !defined(CROSSBUILD_HOST) +.if (${BOOTSTRAPPING} < 1003501 || \ + (${BOOTSTRAPPING} >= 1100000 && ${BOOTSTRAPPING} < 1100103) || \ + (!exists(/usr/sbin/kbdcontrol))) +_kbdcontrol= usr.sbin/kbdcontrol +.else +_bootstrap_tools_links+=kbdcontrol +.endif +.endif + # 1300102: VHDX support .if ${BOOTSTRAPPING} < 1201520 || \ (${BOOTSTRAPPING} > 1300000 && ${BOOTSTRAPPING} < 1300102) @@ -2378,8 +2423,6 @@ _basic_bootstrap_tools+=usr.sbin/services_mkdb usr.sbin/pwd_mkdb # bootstrap ldd on non-FreeBSD systems _basic_bootstrap_tools+=usr.bin/ldd .endif -# cat is used by sys/kern/genoffset.sh and sys/conf/newvers.sh -_basic_bootstrap_tools+=bin/cat # sysctl/chflags are required for installkernel: .if !defined(CROSSBUILD_HOST) _basic_bootstrap_tools+=bin/chflags From nobody Fri Nov 19 07:13:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5E159189C5FE for ; Fri, 19 Nov 2021 07:13:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x92a.google.com (mail-ua1-x92a.google.com [IPv6:2607:f8b0:4864:20::92a]) (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 4HwSZ93Md5z3vb6 for ; Fri, 19 Nov 2021 07:13:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x92a.google.com with SMTP id b17so19479234uas.0 for ; Thu, 18 Nov 2021 23:13:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8dBJzg772PO62bWbqha50RH/T+lFDQtIqxkrNKIcQCU=; b=eKIEdwE4VTyIjk11Wx/sBsQ8A3ZsLSaM327/U9mGMt/FGDJ/GcwMrDkNhNCh4LVoCH OY/MDuAfUmBqhYVQlCaAJ5Ryt3UDDYpavnx3+MRZJBluecuJurM1s1LxXpc71IYkcU1J h6HKK4kuHI6pdZLjRe43TWuE2sxTBOxz018Grqw0NdrK6Bn5AT8RzDwtukHwpCvpUbDK NwXGsDBAgQhE1cmnwfDdbvjSi8MG/YGg+RyUnt1EG04DRlp3yXOFHSVsCQ1DzOmgrIq8 +R0NsHmu79smIfIkvFGPE9xoBjc/nrOhLOwoeNXc5Bn21Gwn+/JR7KlRtGiDta3Y2XVZ DIaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8dBJzg772PO62bWbqha50RH/T+lFDQtIqxkrNKIcQCU=; b=EbqxU9sCh7jGLcoTddKXzVrVbgV58kXeo54mkTOzmK+H7aNSwVpy9lONJIxcWbLXAu TE83uDDNYKC45r4MexOR5ZlBgyaL2PNP5LkUfaaRY8tYKRH8QwdCIzG4pzr6Kqm0eSJx nYWXRhy7Ae79r4Kr6CRgQxRM0VesyJhxfK4au6PbhsQIH5gqG+nQBdyEO/aWHVkA6i4/ mMLXz4pFQa+F181xwL2ZHyXEOrozZzalBP63ylAmHTbUZhEMqPrQMenzbM8UMAJ1EUfi qXW3erg/7m2uKgOoai2UnbNQtx6ec23QRX9+mdPkxY8Qkpj6XErvW7Yc+7ZCUKoOmOMm Slig== X-Gm-Message-State: AOAM532qpaSN8siqqTHW7FZjgVHJT729V721qXxI2B1R1ajAVNTYNjae wwdPM/kGC09MErPimsmr8EwOQi/XbVAP5kl8QFZ6eA== X-Google-Smtp-Source: ABdhPJyiTtgrKgts380GoD87P5bG4XJHc087VRk5vAJn1MhbiHrmsSuvAyAXKXUMZwI5ni2jZiG4Yfc/fBt+rMAHhoY= X-Received: by 2002:ab0:6f47:: with SMTP id r7mr45885051uat.85.1637306011358; Thu, 18 Nov 2021 23:13:31 -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: <202111190614.1AJ6EfS2069583@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 19 Nov 2021 00:13:20 -0700 Message-ID: Subject: Re: git: a420a672bc53 - main - Bootstrap: Prune building from pre-FreeBSD 11 support To: Kyle Evans Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000322c3b05d11f039d" X-Rspamd-Queue-Id: 4HwSZ93Md5z3vb6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000322c3b05d11f039d Content-Type: text/plain; charset="UTF-8" On Thu, Nov 18, 2021 at 11:29 PM Kyle Evans wrote: > On Fri, Nov 19, 2021 at 12:14 AM Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=a420a672bc53bd3928626aa5d0ec5b41c0471356 > > > > commit a420a672bc53bd3928626aa5d0ec5b41c0471356 > > Author: Warner Losh > > AuthorDate: 2021-10-10 17:28:54 +0000 > > Commit: Warner Losh > > CommitDate: 2021-11-19 06:13:44 +0000 > > > > Bootstrap: Prune building from pre-FreeBSD 11 support > > > > We don't need to bootstrap lex or md4 anymore. > > Cat doesn't need to be bootstrapped (but is needed for buildkernel) > > cruncgen doesn't need to be bootstrapped at all. > > kbdcontrol isn't needed > > > > Sponsored by: Netflix > > Pull Request: https://github.com/freebsd/freebsd-src/pull/554 > > --- > > Makefile.inc1 | 51 ++++----------------------------------------------- > > 1 file changed, 4 insertions(+), 47 deletions(-) > > > > diff --git a/Makefile.inc1 b/Makefile.inc1 > > index d8f50cf77d4b..6573b4a079a1 100644 > > --- a/Makefile.inc1 > > +++ b/Makefile.inc1 > > @@ -681,8 +681,8 @@ PACKAGE= kernel > > > > BOOTSTRAPPING?= 0 > > # Keep these in sync > > -MINIMUM_SUPPORTED_OSREL?= 1002501 > > -MINIMUM_SUPPORTED_REL?= 10.3 > > +MINIMUM_SUPPORTED_OSREL?= 1102501 > > +MINIMUM_SUPPORTED_REL?= 11.3 > > > > # Common environment for world related stages > > CROSSENV+= \ > > @@ -2239,24 +2239,6 @@ _vtfontcvt= usr.bin/vtfontcvt > > # If you add a new bootstrap tool where we could also use the host > version, > > # please ensure that you also add a .else case where you add the tool > to the > > # _bootstrap_tools_links variable. > > -.if ${BOOTSTRAPPING} < 1000033 > > -# Note: lex needs m4 to build but m4 also depends on lex (which needs > m4 to > > -# generate any files). To fix this cyclic dependency we can build a > bootstrap > > -# version of m4 (with pre-generated files) then use that to build the > real m4. > > -# We can't simply use the host m4 since e.g. the macOS version does not > accept > > -# the flags that are passed by lex. > > -# For lex we also use the pre-gerated files since we would otherwise > need to > > -# build awk and sed first (which need lex to build) > > -# TODO: add a _bootstrap_lex and then build the real lex afterwards > > -_lex= usr.bin/lex > > -_m4= tools/build/bootstrap-m4 usr.bin/m4 > > -${_bt}-tools/build/bootstrap-m4: ${_bt}-usr.bin/lex > ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc > > -${_bt}-usr.bin/m4: ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc > ${_bt}-usr.bin/lex ${_bt}-tools/build/bootstrap-m4 > > -_bt_m4_depend=${_bt}-usr.bin/m4 > > -_bt_lex_depend=${_bt}-usr.bin/lex ${_bt_m4_depend} > > -.else > > -_bootstrap_tools_links+=m4 lex > > -.endif > > > > # ELF Tool Chain libraries are needed for ELF tools and dtrace tools. > > # r296685 fix cross-endian objcopy > > I'll leave a comment on just this first one, but it applies to the > others as well... this left a bunch of references to the removed > variables elsewhere in Makefile.inc1 that need to be removed. I'm also > not entirely convinced that flat removal was entirely right....these > should have probably been replaced with just the > _bootstrap_tools_links additions, because we presumably still want > them linked in if we're not building them. > I hadn't thought of that. I'm reverting until I can think this through. It worked in the test builds, but I want to understand when it might be needed. thanks for the feedback. Warner > > > @@ -2292,21 +2274,6 @@ ${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd > > _bootstrap_tools_links+=mtree > > .endif > > > > -# r246097: log addition login.conf.db, passwd, pwd.db, and spwd.db with > cat -l > > -.if ${BOOTSTRAPPING} < 1000027 > > -_cat= bin/cat > > -.else > > -_bootstrap_tools_links+=cat > > -.endif > > - > > -# r277259 crunchide: Correct 64-bit section header offset > > -# r281674 crunchide: always include both 32- and 64-bit ELF support > > -.if ${BOOTSTRAPPING} < 1100078 > > -_crunchide= usr.sbin/crunch/crunchide > > -.else > > -_bootstrap_tools_links+=crunchide > > -.endif > > - > > # 1300115: Higher WARNS fixes > > .if ${BOOTSTRAPPING} < 1202502 || \ > > (${BOOTSTRAPPING} > 1300000 && ${BOOTSTRAPPING} < 1300131) > > @@ -2315,18 +2282,6 @@ _crunchgen= usr.sbin/crunch/crunchgen > > _bootstrap_tools_links+=crunchgen > > .endif > > > > -# r296926 -P keymap search path, MFC to stable/10 in r298297 > > -# Note: kbdcontrol can not be bootstrapped on non-FreeBSD systems > > -.if !defined(CROSSBUILD_HOST) > > -.if (${BOOTSTRAPPING} < 1003501 || \ > > - (${BOOTSTRAPPING} >= 1100000 && ${BOOTSTRAPPING} < 1100103) || \ > > - (!exists(/usr/sbin/kbdcontrol))) > > -_kbdcontrol= usr.sbin/kbdcontrol > > -.else > > -_bootstrap_tools_links+=kbdcontrol > > -.endif > > -.endif > > - > > # 1300102: VHDX support > > .if ${BOOTSTRAPPING} < 1201520 || \ > > (${BOOTSTRAPPING} > 1300000 && ${BOOTSTRAPPING} < 1300102) > > @@ -2423,6 +2378,8 @@ _basic_bootstrap_tools+=usr.sbin/services_mkdb > usr.sbin/pwd_mkdb > > # bootstrap ldd on non-FreeBSD systems > > _basic_bootstrap_tools+=usr.bin/ldd > > .endif > > +# cat is used by sys/kern/genoffset.sh and sys/conf/newvers.sh > > +_basic_bootstrap_tools+=bin/cat > > # sysctl/chflags are required for installkernel: > > .if !defined(CROSSBUILD_HOST) > > _basic_bootstrap_tools+=bin/chflags > --000000000000322c3b05d11f039d-- From nobody Fri Nov 19 08:01:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 14337188BE1E; Fri, 19 Nov 2021 08:01: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 4HwTdY6qWFz4fdW; Fri, 19 Nov 2021 08:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9F9324D2E; Fri, 19 Nov 2021 08:01: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 1AJ81buh014982; Fri, 19 Nov 2021 08:01:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ81bFj014981; Fri, 19 Nov 2021 08:01:37 GMT (envelope-from git) Date: Fri, 19 Nov 2021 08:01:37 GMT Message-Id: <202111190801.1AJ81bFj014981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 1bfdb812c786 - main - iflib_stop: drain rx tasks to prevent any data races List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bfdb812c786ac2607a82633f9c84a5d16f54079 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=1bfdb812c786ac2607a82633f9c84a5d16f54079 commit 1bfdb812c786ac2607a82633f9c84a5d16f54079 Author: Andriy Gapon AuthorDate: 2021-11-19 07:56:30 +0000 Commit: Andriy Gapon CommitDate: 2021-11-19 08:00:38 +0000 iflib_stop: drain rx tasks to prevent any data races iflib_stop modifies iflib data structures that are used by _task_fn_rx, most prominently the free lists. So, iflib_stop has to ensure that the rx task threads are not active. This should help to fix a crash seen when iflib_if_ioctl (e.g., SIOCSIFCAP) is called while there is already traffic flowing. The crash has been seen on VMWare guests with vmxnet3 driver. My guess is that on physical hardware the couple of 1ms delays that iflib_stop has after disabling interrupts are enough for the queued work to be completed before any iflib state is touched. But on busy hypervisors the guests might not get enough CPU time to complete the work, thus there can be a race between the taskqueue threads and the work done to handle an ioctl, specifically in iflib_stop and iflib_init_locked. PR: 259458 Reviewed by: markj MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D32926 --- sys/net/iflib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 8c8cc6936f7e..1fdda2ef8462 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2634,7 +2634,8 @@ iflib_stop(if_ctx_t ctx) bzero((void *)di->idi_vaddr, di->idi_size); } for (i = 0; i < scctx->isc_nrxqsets; i++, rxq++) { - /* make sure all transmitters have completed before proceeding XXX */ + gtaskqueue_drain(rxq->ifr_task.gt_taskqueue, + &rxq->ifr_task.gt_task); rxq->ifr_cq_cidx = 0; for (j = 0, di = rxq->ifr_ifdi; j < sctx->isc_nrxqs; j++, di++) From nobody Fri Nov 19 08:22:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B94B118977D6; Fri, 19 Nov 2021 08:22:18 +0000 (UTC) (envelope-from kevans@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 4HwV5Q4dX0z4nXg; Fri, 19 Nov 2021 08:22:18 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 73C0A15D4; Fri, 19 Nov 2021 08:22:18 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f181.google.com with SMTP id i9so9451035qki.3; Fri, 19 Nov 2021 00:22:18 -0800 (PST) X-Gm-Message-State: AOAM533Hte9wPSOMujG/O7rWGrJvgWkp7Y/Dlwhe56kH/gcHUlJluewN 9V6P/t/Zn1S+eqTrtE6ny0krkg4sNz0BzNGfGkI= X-Google-Smtp-Source: ABdhPJxQuj0681uqJZJD60kiJJCP18mHCyJmJqZG7+0EoOg8frtZclgTlb5iBTWJiwB6Pms1Vest44NA1fjBN8EWygA= X-Received: by 2002:a05:620a:c4a:: with SMTP id u10mr26281419qki.69.1637310137645; Fri, 19 Nov 2021 00:22:17 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202111190614.1AJ6EfS2069583@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Fri, 19 Nov 2021 02:22:06 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: a420a672bc53 - main - Bootstrap: Prune building from pre-FreeBSD 11 support To: Warner Losh Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-ThisMailContainsUnwantedMimeParts: N On Fri, Nov 19, 2021 at 1:13 AM Warner Losh wrote: > > > > On Thu, Nov 18, 2021 at 11:29 PM Kyle Evans wrote: >> >> On Fri, Nov 19, 2021 at 12:14 AM Warner Losh wrote: >> > >> > The branch main has been updated by imp: >> > >> > URL: https://cgit.FreeBSD.org/src/commit/?id=a420a672bc53bd3928626aa5d0ec5b41c0471356 >> > >> > commit a420a672bc53bd3928626aa5d0ec5b41c0471356 >> > Author: Warner Losh >> > AuthorDate: 2021-10-10 17:28:54 +0000 >> > Commit: Warner Losh >> > CommitDate: 2021-11-19 06:13:44 +0000 >> > >> > Bootstrap: Prune building from pre-FreeBSD 11 support >> > >> > We don't need to bootstrap lex or md4 anymore. >> > Cat doesn't need to be bootstrapped (but is needed for buildkernel) >> > cruncgen doesn't need to be bootstrapped at all. >> > kbdcontrol isn't needed >> > >> > Sponsored by: Netflix >> > Pull Request: https://github.com/freebsd/freebsd-src/pull/554 >> > --- >> > Makefile.inc1 | 51 ++++----------------------------------------------- >> > 1 file changed, 4 insertions(+), 47 deletions(-) >> > >> > diff --git a/Makefile.inc1 b/Makefile.inc1 >> > index d8f50cf77d4b..6573b4a079a1 100644 >> > --- a/Makefile.inc1 >> > +++ b/Makefile.inc1 >> > @@ -681,8 +681,8 @@ PACKAGE= kernel >> > >> > BOOTSTRAPPING?= 0 >> > # Keep these in sync >> > -MINIMUM_SUPPORTED_OSREL?= 1002501 >> > -MINIMUM_SUPPORTED_REL?= 10.3 >> > +MINIMUM_SUPPORTED_OSREL?= 1102501 >> > +MINIMUM_SUPPORTED_REL?= 11.3 >> > >> > # Common environment for world related stages >> > CROSSENV+= \ >> > @@ -2239,24 +2239,6 @@ _vtfontcvt= usr.bin/vtfontcvt >> > # If you add a new bootstrap tool where we could also use the host version, >> > # please ensure that you also add a .else case where you add the tool to the >> > # _bootstrap_tools_links variable. >> > -.if ${BOOTSTRAPPING} < 1000033 >> > -# Note: lex needs m4 to build but m4 also depends on lex (which needs m4 to >> > -# generate any files). To fix this cyclic dependency we can build a bootstrap >> > -# version of m4 (with pre-generated files) then use that to build the real m4. >> > -# We can't simply use the host m4 since e.g. the macOS version does not accept >> > -# the flags that are passed by lex. >> > -# For lex we also use the pre-gerated files since we would otherwise need to >> > -# build awk and sed first (which need lex to build) >> > -# TODO: add a _bootstrap_lex and then build the real lex afterwards >> > -_lex= usr.bin/lex >> > -_m4= tools/build/bootstrap-m4 usr.bin/m4 >> > -${_bt}-tools/build/bootstrap-m4: ${_bt}-usr.bin/lex ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc >> > -${_bt}-usr.bin/m4: ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc ${_bt}-usr.bin/lex ${_bt}-tools/build/bootstrap-m4 >> > -_bt_m4_depend=${_bt}-usr.bin/m4 >> > -_bt_lex_depend=${_bt}-usr.bin/lex ${_bt_m4_depend} >> > -.else >> > -_bootstrap_tools_links+=m4 lex >> > -.endif >> > >> > # ELF Tool Chain libraries are needed for ELF tools and dtrace tools. >> > # r296685 fix cross-endian objcopy >> >> I'll leave a comment on just this first one, but it applies to the >> others as well... this left a bunch of references to the removed >> variables elsewhere in Makefile.inc1 that need to be removed. I'm also >> not entirely convinced that flat removal was entirely right....these >> should have probably been replaced with just the >> _bootstrap_tools_links additions, because we presumably still want >> them linked in if we're not building them. > > > I hadn't thought of that. I'm reverting until I can think this through. It worked > in the test builds, but I want to understand when it might be needed. thanks > for the feedback. > I think it's a BUILD_WITH_STRICT_TMPPATH violation -- it doesn't currently work anyways according to comments, but it's probably good to avoid. I'm not all that familiar with this part of the build, though, so hopefully someone with knowledge of the seedier parts will chime in. > Warner > >> >> >> > @@ -2292,21 +2274,6 @@ ${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd >> > _bootstrap_tools_links+=mtree >> > .endif >> > >> > -# r246097: log addition login.conf.db, passwd, pwd.db, and spwd.db with cat -l >> > -.if ${BOOTSTRAPPING} < 1000027 >> > -_cat= bin/cat >> > -.else >> > -_bootstrap_tools_links+=cat >> > -.endif >> > - >> > -# r277259 crunchide: Correct 64-bit section header offset >> > -# r281674 crunchide: always include both 32- and 64-bit ELF support >> > -.if ${BOOTSTRAPPING} < 1100078 >> > -_crunchide= usr.sbin/crunch/crunchide >> > -.else >> > -_bootstrap_tools_links+=crunchide >> > -.endif >> > - >> > # 1300115: Higher WARNS fixes >> > .if ${BOOTSTRAPPING} < 1202502 || \ >> > (${BOOTSTRAPPING} > 1300000 && ${BOOTSTRAPPING} < 1300131) >> > @@ -2315,18 +2282,6 @@ _crunchgen= usr.sbin/crunch/crunchgen >> > _bootstrap_tools_links+=crunchgen >> > .endif >> > >> > -# r296926 -P keymap search path, MFC to stable/10 in r298297 >> > -# Note: kbdcontrol can not be bootstrapped on non-FreeBSD systems >> > -.if !defined(CROSSBUILD_HOST) >> > -.if (${BOOTSTRAPPING} < 1003501 || \ >> > - (${BOOTSTRAPPING} >= 1100000 && ${BOOTSTRAPPING} < 1100103) || \ >> > - (!exists(/usr/sbin/kbdcontrol))) >> > -_kbdcontrol= usr.sbin/kbdcontrol >> > -.else >> > -_bootstrap_tools_links+=kbdcontrol >> > -.endif >> > -.endif >> > - >> > # 1300102: VHDX support >> > .if ${BOOTSTRAPPING} < 1201520 || \ >> > (${BOOTSTRAPPING} > 1300000 && ${BOOTSTRAPPING} < 1300102) >> > @@ -2423,6 +2378,8 @@ _basic_bootstrap_tools+=usr.sbin/services_mkdb usr.sbin/pwd_mkdb >> > # bootstrap ldd on non-FreeBSD systems >> > _basic_bootstrap_tools+=usr.bin/ldd >> > .endif >> > +# cat is used by sys/kern/genoffset.sh and sys/conf/newvers.sh >> > +_basic_bootstrap_tools+=bin/cat >> > # sysctl/chflags are required for installkernel: >> > .if !defined(CROSSBUILD_HOST) >> > _basic_bootstrap_tools+=bin/chflags From nobody Fri Nov 19 08:58:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 41B3818540DB; Fri, 19 Nov 2021 08:58: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 4HwVvh1PmNz3HrJ; Fri, 19 Nov 2021 08:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02699255D5; Fri, 19 Nov 2021 08:58: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 1AJ8wtpC083030; Fri, 19 Nov 2021 08:58:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ8wtHh083029; Fri, 19 Nov 2021 08:58:55 GMT (envelope-from git) Date: Fri, 19 Nov 2021 08:58:55 GMT Message-Id: <202111190858.1AJ8wtHh083029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Guangyuan Yang Subject: git: f6842865d336 - main - uuid(3): Document return values List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ygy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6842865d3367217f2df3e5ae7ecb5b66caf9451 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ygy (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f6842865d3367217f2df3e5ae7ecb5b66caf9451 commit f6842865d3367217f2df3e5ae7ecb5b66caf9451 Author: Felix Johnson AuthorDate: 2021-11-19 08:42:49 +0000 Commit: Guangyuan Yang CommitDate: 2021-11-19 08:58:34 +0000 uuid(3): Document return values PR: 204449 MFC after: 3 days Reported by: Michael Cress --- lib/libc/uuid/uuid.3 | 63 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/lib/libc/uuid/uuid.3 b/lib/libc/uuid/uuid.3 index 4fa41dec98bd..108ee34f213c 100644 --- a/lib/libc/uuid/uuid.3 +++ b/lib/libc/uuid/uuid.3 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2012 +.Dd November 19, 2021 .Dt UUID 3 .Os .Sh NAME @@ -68,20 +68,12 @@ The and .Fn uuid_create_nil functions create UUIDs. -The -.Fn uuid_compare , -.Fn uuid_equal -and -.Fn uuid_is_nil -functions can be used to test UUIDs. To convert from the binary representation to the string representation or vice versa, use .Fn uuid_to_string or .Fn uuid_from_string respectively. -A 16-bit hash value can be obtained by calling -.Fn uuid_hash . .Pp The .Fn uuid_to_string @@ -111,6 +103,49 @@ functions decode a UUID from an octet stream in little-endian and big-endian byte-order, respectively. These routines are not part of the DCE RPC API. They are provided for convenience. +.Pp +The +.Fn uuid_compare +and +.Fn uuid_equal +functions compare two UUIDs for equality. +UUIDs are equal if pointers +.Fa a +and +.Fa b +are equal or both +.Dv NULL , +or if the structures +.Fa a +and +.Fa b +point to are equal. +.Fn uuid_compare +returns 0 if the UUIDs are equal, -1 if +.Fa a +is less than +.Fa b , +and 1 if +.Fa a +is greater than +.Fa b . +.Fn uuid_equal +returns 1 if the UUIDs are equal, 0 if they are +not equal. +.Pp +The +.Fn uuid_is_nil +function compares a UUID to +.Dv NULL . +The function returns 1 if +.Fa u +is +.Dv NULL +or if the UUID consists of all zeros, and zero otherwise. +.Pp +The +.Fn uuid_hash +function returns a 16-bit hash value for the specified UUID. .Sh RETURN VALUES The successful or unsuccessful completion of the function is returned in the @@ -127,6 +162,16 @@ The string representation of an UUID is not valid. .It Dv uuid_s_no_memory The function can not allocate memory to store an UUID representation. .El +.Pp +.Fn uuid_compare , +.Fn uuid_equal , +.Fn uuid_is_nil , +and +.Fn uuid_hash +always set +.Fa status +to +.Dv uuid_s_ok . .Sh SEE ALSO .Xr uuidgen 1 , .Xr uuidgen 2 From nobody Fri Nov 19 11:56:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 39FC4189DAD7; Fri, 19 Nov 2021 11:56:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwZrM17frz3DmV; Fri, 19 Nov 2021 11:56:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 03B8F277F4; Fri, 19 Nov 2021 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 1AJBuIYq023590; Fri, 19 Nov 2021 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 1AJBuIoa023589; Fri, 19 Nov 2021 11:56:18 GMT (envelope-from git) Date: Fri, 19 Nov 2021 11:56:18 GMT Message-Id: <202111191156.1AJBuIoa023589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 2e8ff4d1d5b9 - main - Switch to Arm Optimized Routines for mem* & str* List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e8ff4d1d5b9d32b29287efb414449121733544a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=2e8ff4d1d5b9d32b29287efb414449121733544a commit 2e8ff4d1d5b9d32b29287efb414449121733544a Author: Andrew Turner AuthorDate: 2021-11-01 13:06:56 +0000 Commit: Andrew Turner CommitDate: 2021-11-19 11:40:46 +0000 Switch to Arm Optimized Routines for mem* & str* These are the updated version of the older Cortex Strings Library we previously used. The Arm Optimized Routines also support CPU features that are currently in development on FreeBSD, e.g. Branch Target Identification (BTI). Rather than add BTI support to the old code it's easier to just use the maintained version. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32774 --- lib/libc/aarch64/string/Makefile.inc | 51 +++++++++++++++++++++++++----------- lib/libc/aarch64/string/memcpy.S | 6 +++++ lib/libc/aarch64/string/memmove.S | 5 ++++ lib/libc/aarch64/string/strchr.S | 5 ++++ lib/libc/aarch64/string/strrchr.S | 5 ++++ 5 files changed, 57 insertions(+), 15 deletions(-) diff --git a/lib/libc/aarch64/string/Makefile.inc b/lib/libc/aarch64/string/Makefile.inc index 5ce355f8b0c1..0e1f0f4b84e2 100644 --- a/lib/libc/aarch64/string/Makefile.inc +++ b/lib/libc/aarch64/string/Makefile.inc @@ -1,20 +1,41 @@ # $FreeBSD$ # -# String handling from the Cortex Strings library -# https://git.linaro.org/toolchain/cortex-strings.git +# String handling from the Arm Optimized Routines +# https://github.com/ARM-software/optimized-routines # -.PATH: ${SRCTOP}/contrib/cortex-strings/src/aarch64 +AARCH64_STRING_FUNCS= \ + memchr \ + memcmp \ + memcpy \ + memmove \ + memrchr \ + memset \ + stpcpy \ + strchr \ + strchrnul \ + strcmp \ + strcpy \ + strlen \ + strncmp \ + strnlen \ + strrchr -MDSRCS+= \ - memchr.S \ - memcmp.S \ - memcpy.S \ - memmove.S \ - memset.S \ - strchr.S \ - strcmp.S \ - strcpy.S \ - strlen.S \ - strncmp.S \ - strnlen.S +# +# Add the above functions. Generate an asm file that includes the needed +# Arm Optimized Routines file defining the function name to the libc name. +# Some file need multiple macros defined or a weak symbol added we can +# override the generated file in these cases. +# +.for FUNC in ${AARCH64_STRING_FUNCS} +.if !exists(${FUNC}.S) +${FUNC}.S: + printf '/* %sgenerated by libc/aarch64/string/Makefile.inc */\n' @ > ${.TARGET} + printf '#define __%s_aarch64 %s\n' ${FUNC} ${FUNC} >> ${.TARGET} + printf '#include "aarch64/%s.S"\n' ${FUNC} >> ${.TARGET} +CLEANFILES+= ${FUNC}.S +.endif + +MDSRCS+= ${FUNC}.S +CFLAGS.${FUNC}.S+=-I${SRCTOP}/contrib/arm-optimized-routines/string +.endfor diff --git a/lib/libc/aarch64/string/memcpy.S b/lib/libc/aarch64/string/memcpy.S new file mode 100644 index 000000000000..ac4fbe8d6175 --- /dev/null +++ b/lib/libc/aarch64/string/memcpy.S @@ -0,0 +1,6 @@ +#define __memcpy_aarch64 memcpy +#define __memmove_aarch64 memmove +#include "aarch64/memcpy.S" + +.weak index +.equ index, strchr diff --git a/lib/libc/aarch64/string/memmove.S b/lib/libc/aarch64/string/memmove.S new file mode 100644 index 000000000000..e2f99790e0da --- /dev/null +++ b/lib/libc/aarch64/string/memmove.S @@ -0,0 +1,5 @@ +/* + * memmove is implemented in memcpy.S. Having this file simplifies the build + * as it stops MISRCS from picking up the C implementation and rtld expects + * to copy the memmove object file into its object directory. + */ diff --git a/lib/libc/aarch64/string/strchr.S b/lib/libc/aarch64/string/strchr.S new file mode 100644 index 000000000000..e241b35004bb --- /dev/null +++ b/lib/libc/aarch64/string/strchr.S @@ -0,0 +1,5 @@ +#define __strchr_aarch64 strchr +#include "aarch64/strchr.S" + +.weak index +.equ index, strchr diff --git a/lib/libc/aarch64/string/strrchr.S b/lib/libc/aarch64/string/strrchr.S new file mode 100644 index 000000000000..46e966e3188a --- /dev/null +++ b/lib/libc/aarch64/string/strrchr.S @@ -0,0 +1,5 @@ +#define __strrchr_aarch64 strrchr +#include "aarch64/strrchr.S" + +.weak rindex +.equ rindex, strrchr From nobody Fri Nov 19 11:56:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 102BD189DE06; Fri, 19 Nov 2021 11:56: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 4HwZrN27XXz3DpV; Fri, 19 Nov 2021 11:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B50727C60; Fri, 19 Nov 2021 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 1AJBuJVd023614; Fri, 19 Nov 2021 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 1AJBuJ7I023613; Fri, 19 Nov 2021 11:56:19 GMT (envelope-from git) Date: Fri, 19 Nov 2021 11:56:19 GMT Message-Id: <202111191156.1AJBuJ7I023613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: b2e843161dc3 - main - Use a builtin where possible in msun List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2e843161dc3b79777e873183447c92ed9c3703a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b2e843161dc3b79777e873183447c92ed9c3703a commit b2e843161dc3b79777e873183447c92ed9c3703a Author: Andrew Turner AuthorDate: 2021-11-02 11:31:17 +0000 Commit: Andrew Turner CommitDate: 2021-11-19 11:40:46 +0000 Use a builtin where possible in msun Some of the functions in msun can be implemented using a compiler builtin function to generate a small number of instructions. Implement this support in fma, fmax, fmin, and sqrt on arm64. Care must be taken as the builtin can be implemented as a function call on some architectures that lack direct support. In these cases we need to use the original code path. As we don't set errno on failure build with -fno-math-errno so the toolchain doesn't convert a builtin into a function call when it detects a failure, e.g. gcc will add a call to sqrt when the input is negative leading to an infinite loop. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32801 --- lib/msun/Makefile | 5 +++++ lib/msun/aarch64/Makefile.inc | 12 ++++++++++++ lib/msun/src/e_sqrt.c | 18 +++++++++++++----- lib/msun/src/e_sqrtf.c | 8 ++++++++ lib/msun/src/s_fma.c | 8 ++++++++ lib/msun/src/s_fmaf.c | 8 ++++++++ lib/msun/src/s_fmax.c | 8 ++++++++ lib/msun/src/s_fmaxf.c | 8 ++++++++ lib/msun/src/s_fmin.c | 8 ++++++++ lib/msun/src/s_fminf.c | 8 ++++++++ 10 files changed, 86 insertions(+), 5 deletions(-) diff --git a/lib/msun/Makefile b/lib/msun/Makefile index d7c0e2f88358..6274c27c12c5 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -45,6 +45,11 @@ CFLAGS+= -I${.CURDIR}/${ARCH_SUBDIR} CFLAGS+= -ffp-exception-behavior=maytrap .endif +# Tell the compiler we don't set errno in any of the math functions. This +# stops gcc from trying to generate a function call to set errno when using +# a builtin in the implementation +CFLAGS+= -fno-math-errno + .PATH: ${.CURDIR}/bsdsrc .PATH: ${.CURDIR}/src .PATH: ${.CURDIR}/man diff --git a/lib/msun/aarch64/Makefile.inc b/lib/msun/aarch64/Makefile.inc index 286a60859591..b0e01488b0bb 100644 --- a/lib/msun/aarch64/Makefile.inc +++ b/lib/msun/aarch64/Makefile.inc @@ -2,3 +2,15 @@ LDBL_PREC = 113 +# Use a builtin when it generates the needed instruction +CFLAGS+=-DUSE_BUILTIN_FMAF +CFLAGS+=-DUSE_BUILTIN_FMA + +CFLAGS+=-DUSE_BUILTIN_FMAXF +CFLAGS+=-DUSE_BUILTIN_FMAX + +CFLAGS+=-DUSE_BUILTIN_FMINF +CFLAGS+=-DUSE_BUILTIN_FMIN + +CFLAGS+=-DUSE_BUILTIN_SQRTF +CFLAGS+=-DUSE_BUILTIN_SQRT diff --git a/lib/msun/src/e_sqrt.c b/lib/msun/src/e_sqrt.c index 12fb56e1340b..37351a425ce4 100644 --- a/lib/msun/src/e_sqrt.c +++ b/lib/msun/src/e_sqrt.c @@ -14,6 +14,18 @@ #include __FBSDID("$FreeBSD$"); +#include + +#include "math.h" +#include "math_private.h" + +#ifdef USE_BUILTIN_SQRT +double +__ieee754_sqrt(double x) +{ + return (__builtin_sqrt(x)); +} +#else /* __ieee754_sqrt(x) * Return correctly rounded sqrt. * ------------------------------------------ @@ -84,11 +96,6 @@ __FBSDID("$FreeBSD$"); *--------------- */ -#include - -#include "math.h" -#include "math_private.h" - static const double one = 1.0, tiny=1.0e-300; double @@ -187,6 +194,7 @@ __ieee754_sqrt(double x) INSERT_WORDS(z,ix0,ix1); return z; } +#endif #if (LDBL_MANT_DIG == 53) __weak_reference(sqrt, sqrtl); diff --git a/lib/msun/src/e_sqrtf.c b/lib/msun/src/e_sqrtf.c index 7eba4d07f92c..06e5d62fa5f9 100644 --- a/lib/msun/src/e_sqrtf.c +++ b/lib/msun/src/e_sqrtf.c @@ -20,6 +20,13 @@ static char rcsid[] = "$FreeBSD$"; #include "math.h" #include "math_private.h" +#ifdef USE_BUILTIN_SQRTF +float +__ieee754_sqrtf(float x) +{ + return (__builtin_sqrtf(x)); +} +#else static const float one = 1.0, tiny=1.0e-30; float @@ -87,3 +94,4 @@ __ieee754_sqrtf(float x) SET_FLOAT_WORD(z,ix); return z; } +#endif diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index 41a6424fdf7f..95cffd0ba36d 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -35,6 +35,13 @@ __FBSDID("$FreeBSD$"); #include "math_private.h" +#ifdef USE_BUILTIN_FMA +double +fma(double x, double y, double z) +{ + return (__builtin_fma(x, y, z)); +} +#else /* * A struct dd represents a floating-point number with twice the precision * of a double. We maintain the invariant that "hi" stores the 53 high-order @@ -284,6 +291,7 @@ fma(double x, double y, double z) else return (add_and_denormalize(r.hi, adj, spread)); } +#endif /* !USE_BUILTIN_FMA */ #if (LDBL_MANT_DIG == 53) __weak_reference(fma, fmal); diff --git a/lib/msun/src/s_fmaf.c b/lib/msun/src/s_fmaf.c index 389cf1b11bee..4591cc219bbb 100644 --- a/lib/msun/src/s_fmaf.c +++ b/lib/msun/src/s_fmaf.c @@ -34,6 +34,13 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" +#ifdef USE_BUILTIN_FMAF +float +fmaf(float x, float y, float z) +{ + return (__builtin_fmaf(x, y, z)); +} +#else /* * Fused multiply-add: Compute x * y + z with a single rounding error. * @@ -69,3 +76,4 @@ fmaf(float x, float y, float z) SET_LOW_WORD(adjusted_result, lr + 1); return (adjusted_result); } +#endif /* !USE_BUILTIN_FMAF */ diff --git a/lib/msun/src/s_fmax.c b/lib/msun/src/s_fmax.c index 0c234bcc5f7f..b53b1e64da04 100644 --- a/lib/msun/src/s_fmax.c +++ b/lib/msun/src/s_fmax.c @@ -34,6 +34,13 @@ __FBSDID("$FreeBSD$"); #include "fpmath.h" +#ifdef USE_BUILTIN_FMAX +double +fmax(double x, double y) +{ + return (__builtin_fmax(x, y)); +} +#else double fmax(double x, double y) { @@ -54,6 +61,7 @@ fmax(double x, double y) return (x > y ? x : y); } +#endif #if (LDBL_MANT_DIG == 53) __weak_reference(fmax, fmaxl); diff --git a/lib/msun/src/s_fmaxf.c b/lib/msun/src/s_fmaxf.c index 8e9d1baf3e8e..8d3d14f4b52a 100644 --- a/lib/msun/src/s_fmaxf.c +++ b/lib/msun/src/s_fmaxf.c @@ -33,6 +33,13 @@ __FBSDID("$FreeBSD$"); #include "fpmath.h" +#ifdef USE_BUILTIN_FMAXF +float +fmaxf(float x, float y) +{ + return (__builtin_fmaxf(x, y)); +} +#else float fmaxf(float x, float y) { @@ -53,3 +60,4 @@ fmaxf(float x, float y) return (x > y ? x : y); } +#endif diff --git a/lib/msun/src/s_fmin.c b/lib/msun/src/s_fmin.c index d7f24c121fb2..53f36c1c2d3d 100644 --- a/lib/msun/src/s_fmin.c +++ b/lib/msun/src/s_fmin.c @@ -34,6 +34,13 @@ __FBSDID("$FreeBSD$"); #include "fpmath.h" +#ifdef USE_BUILTIN_FMIN +double +fmin(double x, double y) +{ + return (__builtin_fmin(x, y)); +} +#else double fmin(double x, double y) { @@ -54,6 +61,7 @@ fmin(double x, double y) return (x < y ? x : y); } +#endif #if (LDBL_MANT_DIG == 53) __weak_reference(fmin, fminl); diff --git a/lib/msun/src/s_fminf.c b/lib/msun/src/s_fminf.c index 258316725ddd..58b6a489b820 100644 --- a/lib/msun/src/s_fminf.c +++ b/lib/msun/src/s_fminf.c @@ -33,6 +33,13 @@ __FBSDID("$FreeBSD$"); #include "fpmath.h" +#ifdef USE_BUILTIN_FMINF +float +fminf(float x, float y) +{ + return (__builtin_fminf(x, y)); +} +#else float fminf(float x, float y) { @@ -53,3 +60,4 @@ fminf(float x, float y) return (x < y ? x : y); } +#endif From nobody Fri Nov 19 15:05:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 36CDB188FBFF; Fri, 19 Nov 2021 15:05:31 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (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 4Hwg2g0lV5z3MJh; Fri, 19 Nov 2021 15:05:31 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-qk1-x730.google.com with SMTP id o63so10453034qkb.4; Fri, 19 Nov 2021 07:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=nOa+FYBNjK61vAI3hJrkhTK5kc0KRixn7CrhxpwnvME=; b=UFcUxwmVQU367di/bsndp3Eh9whDlLBduU12Qia5FsJpNGyf57M9+a3Z7wDLzjfBPK 5GceHPkuhjSBNl450rYVNqb1G3cIr6NQ4CBmzHPwf4zkvrbqo4HEaIZd3Q0YUkR9UD80 CajFB/1+R6aVUbDeJrGt5VyzWO45Q+8JYr255qAX3Y/xMkpH8bwfH4vdEDGpGZJMB8fP 5ouoiHkvy4K7Ncg2zRFxq7TJGTvSXW8ZNVz/ixsPvlvHdzn6WfOLv25NvKytT8A3UzlT lv45g6LqtZWoKbvETiUbIZcBHj0wPqfNjn4UypconVrgKwTPRa7cI4ENV48T0ksPDYUM Wigg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nOa+FYBNjK61vAI3hJrkhTK5kc0KRixn7CrhxpwnvME=; b=1MgHwGJLZZdh9G10m/2+i9EAWG6G/useMT+0lXom457qlpojzhv40lVKHUkxLt9OL1 QVt6mF9bHWiCEuwmA6B9PzO1jNZK3wCO0doJ+MKp4t3JNqkwInPODtfk9zq3DmbvLgWc qSx4w+VseAQomftuh97MAJuSHaEK9JvMvnK2XAQWi/HZ+54gezpf0Ke8NKZJGOc0lHC+ eRdSrLq+mXEZ6KUyP5xHxOApjK+NC8wIEI+tSyaUJpvF+KgY6q+PR0b5BEBB6cSkGkCK h/C1A8Dm0A5XPqlOu1cekyYzNn21/4fmcnAY4uKwsfyp74+xlujwvMyXQYsfkqdU2O1o /VyQ== X-Gm-Message-State: AOAM532LlAOOBRu0LtTl/v9RpxJIgjtKq76JQpqags7n0DbjOvpPOM8z c7mK63zEhHExrDqCu+3LfjEttGjQz2o= X-Google-Smtp-Source: ABdhPJyMdekVGclgxHuGwEUTqO+7lixu96pTfHFJhMWWAiwo99ndejRuPrcIE0pGexNyhbaiymKaXw== X-Received: by 2002:a05:620a:d96:: with SMTP id q22mr29369547qkl.219.1637334330296; Fri, 19 Nov 2021 07:05:30 -0800 (PST) Received: from spectre.mavhome.dp.ua (104-55-12-234.lightspeed.knvltn.sbcglobal.net. [104.55.12.234]) by smtp.gmail.com with ESMTPSA id r20sm1911358qkp.21.2021.11.19.07.05.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Nov 2021 07:05:29 -0800 (PST) Subject: Re: git: 9cb485d18f01 - main - geom: Remove g_class.config To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202111190620.1AJ6KS08078314@gitrepo.freebsd.org> From: Alexander Motin Message-ID: <708f1f87-0082-5259-24df-cf23b87b628f@gmail.com> Date: Fri, 19 Nov 2021 10:05:28 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.13.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 In-Reply-To: <202111190620.1AJ6KS08078314@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Hwg2g0lV5z3MJh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N I have no objections, but I'd leave padding there to not break KBI for out of tree GEOM classes. On 19.11.2021 01:20, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=9cb485d18f01900800efe4ec3cfcfadd335da858 > > commit 9cb485d18f01900800efe4ec3cfcfadd335da858 > Author: Wuyang Chung > AuthorDate: 2021-10-16 01:43:54 +0000 > Commit: Warner Losh > CommitDate: 2021-11-19 06:17:07 +0000 > > geom: Remove g_class.config > > g_class.config is write only, remove it. > --- > sys/geom/geom.h | 1 - > sys/geom/geom_subr.c | 1 - > 2 files changed, 2 deletions(-) > > diff --git a/sys/geom/geom.h b/sys/geom/geom.h > index 1aba1f46d6d5..0d6d74d0b51c 100644 > --- a/sys/geom/geom.h > +++ b/sys/geom/geom.h > @@ -96,7 +96,6 @@ struct g_class { > u_int version; > u_int spare0; > g_taste_t *taste; > - g_config_t *config; > g_ctl_req_t *ctlreq; > g_init_t *init; > g_fini_t *fini; > diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c > index 2f7ea7754f7b..abaae5ccf57f 100644 > --- a/sys/geom/geom_subr.c > +++ b/sys/geom/geom_subr.c > @@ -222,7 +222,6 @@ retry: > > /* Bar new entries */ > mp->taste = NULL; > - mp->config = NULL; > > LIST_FOREACH(gp, &mp->geom, geom) { > error = mp->destroy_geom(NULL, mp, gp); > -- Alexander Motin From nobody Fri Nov 19 15:31:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EFC29189EB67; Fri, 19 Nov 2021 15:31:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hwgcg6Y8Jz3nC2; Fri, 19 Nov 2021 15:31:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 54CC65104; Fri, 19 Nov 2021 15:31:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 964035c409b1 - main - git-arc: with "create" allow to specify parent of the first commit To: Gleb Smirnoff , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202111190250.1AJ2ooFO095002@gitrepo.freebsd.org> From: John Baldwin Message-ID: Date: Fri, 19 Nov 2021 07:31:29 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.14.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 In-Reply-To: <202111190250.1AJ2ooFO095002@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 11/18/21 6:50 PM, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=964035c409b1b7229c7bc0220e7455e4a038ed4b > > commit 964035c409b1b7229c7bc0220e7455e4a038ed4b > Author: Gleb Smirnoff > AuthorDate: 2021-11-19 02:49:20 +0000 > Commit: Gleb Smirnoff > CommitDate: 2021-11-19 02:49:20 +0000 > > git-arc: with "create" allow to specify parent of the first commit > > Reviewed by: markj > Differential revision: https://reviews.freebsd.org/D33045 Neat! -- John Baldwin From nobody Fri Nov 19 16:46:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 781C8189AD73 for ; Fri, 19 Nov 2021 16:46:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) (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 4HwjHk2Xq2z4fmX for ; Fri, 19 Nov 2021 16:46:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x935.google.com with SMTP id p2so22392725uad.11 for ; Fri, 19 Nov 2021 08:46:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3v11TT6w0sclY19A4dAaBmcF5ZEz1fXn6umni8hi9sw=; b=oPLQKccb3flX3vFAGsb57s267LyVTAl+9qEf0JwlYtGLghvtpySt0WIqF5mG1pU2rk FpQC1DYlsTEvV9TUVnOl7fi+KDhge4/GYJ4DNkqdp/T3ZbOEsom924OpE/46lkDc/WPU 9uhNYUvD3LpB0YaqUUJGWILu44RdZ5Z/4PlW2520vu5dwO5IgKMl8CzZfTjd+jDDIx2L dLjhKqpIHnbw17BVk8C+hrenSUqzP71QzlivqAkm18+hWDVCXHiD9oYbul+chGvq4VGD CZdYt6mqLUOBp1hBU1sjtnM233pG0yM+5b0hHDpxC3+wBEr2NX8a3RburMSXQSxt9CTA wPcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3v11TT6w0sclY19A4dAaBmcF5ZEz1fXn6umni8hi9sw=; b=3biPH8z5QfuYkV8DzldoB8A6gJktvH86CFvXw1xNSkbPA1HMEA/XYsfsYKARWy9IkQ ixeQIeBzHZUGOBfGxc5a6+jF2lvWE29HMJ912sfWind50aggG6H5pyTfMAznM2mqp/eq pV3pcOlFMJAFl7iuX+3tcXavwHXgT2Uf/TExm6SoNXyNG+ohLh/xUaDafemoBswFOTkx vupWelOJGq78C9NrPU2j4LGeuVcwhQ/eHTyG1bULjGpTwuUF8+ERjwqXAjOwr6XQT7sa /JRbttYvykOsOBXdKHLzVD/qgTQya68hgt1E0hfhMFYdpj/5CGWo2bomEgWRFbzlL/Lj /gHw== X-Gm-Message-State: AOAM531amh1NEXD40bM7S3SE9gJj5W5xIkzVhT2Da/9Oy7h818+X4DXr xVAvvTNu14Su1YxO6OV5/lbRaisQXjjdB0gWsbTlUxsGcbI= X-Google-Smtp-Source: ABdhPJymtUTxX8l/w/92ag/KgYMyTPCh/XVfkV6MnLXpI7RPLNwIKAnSKnNdQJY8zO27+qO81MRNaViRPc4qFLr0Go0= X-Received: by 2002:a67:fdc3:: with SMTP id l3mr95049956vsq.42.1637340417803; Fri, 19 Nov 2021 08:46:57 -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: <202111190620.1AJ6KS08078314@gitrepo.freebsd.org> <708f1f87-0082-5259-24df-cf23b87b628f@gmail.com> In-Reply-To: <708f1f87-0082-5259-24df-cf23b87b628f@gmail.com> From: Warner Losh Date: Fri, 19 Nov 2021 09:46:46 -0700 Message-ID: Subject: Re: git: 9cb485d18f01 - main - geom: Remove g_class.config To: Alexander Motin Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000fadbae05d127053f" X-Rspamd-Queue-Id: 4HwjHk2Xq2z4fmX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000fadbae05d127053f Content-Type: text/plain; charset="UTF-8" Thanks Alexander... I understand this comment for MFCing, but -current isn't KBI stable, though I likely should have bumped FreeBSD_version to cope instead. Am I missing something? Warner On Fri, Nov 19, 2021 at 8:05 AM Alexander Motin wrote: > I have no objections, but I'd leave padding there to not break KBI for > out of tree GEOM classes. > > On 19.11.2021 01:20, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=9cb485d18f01900800efe4ec3cfcfadd335da858 > > > > commit 9cb485d18f01900800efe4ec3cfcfadd335da858 > > Author: Wuyang Chung > > AuthorDate: 2021-10-16 01:43:54 +0000 > > Commit: Warner Losh > > CommitDate: 2021-11-19 06:17:07 +0000 > > > > geom: Remove g_class.config > > > > g_class.config is write only, remove it. > > --- > > sys/geom/geom.h | 1 - > > sys/geom/geom_subr.c | 1 - > > 2 files changed, 2 deletions(-) > > > > diff --git a/sys/geom/geom.h b/sys/geom/geom.h > > index 1aba1f46d6d5..0d6d74d0b51c 100644 > > --- a/sys/geom/geom.h > > +++ b/sys/geom/geom.h > > @@ -96,7 +96,6 @@ struct g_class { > > u_int version; > > u_int spare0; > > g_taste_t *taste; > > - g_config_t *config; > > g_ctl_req_t *ctlreq; > > g_init_t *init; > > g_fini_t *fini; > > diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c > > index 2f7ea7754f7b..abaae5ccf57f 100644 > > --- a/sys/geom/geom_subr.c > > +++ b/sys/geom/geom_subr.c > > @@ -222,7 +222,6 @@ retry: > > > > /* Bar new entries */ > > mp->taste = NULL; > > - mp->config = NULL; > > > > LIST_FOREACH(gp, &mp->geom, geom) { > > error = mp->destroy_geom(NULL, mp, gp); > > > > -- > Alexander Motin > --000000000000fadbae05d127053f-- From nobody Fri Nov 19 17:49:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 17DB6189A032; Fri, 19 Nov 2021 17:49:30 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (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 4Hwkgs6PTxz3DcW; Fri, 19 Nov 2021 17:49:29 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-qk1-x72b.google.com with SMTP id m192so6550415qke.2; Fri, 19 Nov 2021 09:49:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fH3oXgEA26koOZzUS7kaM14UjQdnbcbUXB9k1uP96n4=; b=RZHFrbL3BHuPgxhdAMjuScodpLgViLHqlzirq0k+iXoV/0Rg9RvC+50O/tF8/aymCT AUgyGMd8NCn94FvtclbHQbyFa25/G7HUfg3P434De4aT+uCM2AQi1NAOqqn1+56VlMOs pTAIBTmkCOrkhrDT28rbvLAaRW8QoRN7JSJ3OqLj4RgijaKm+DoUH1SnAtGVLQSZr9K3 SivCJVzfHYKhaNfKRoPjty8XVtOylt2Bn4jN9DQ+UgRJ3Su+4FD8KiabmfhE0GI92R1Z Vavsu7cugOv9EEMpKTIFhgMwgETGawoh+p5qhL58r0fPZ6wDMdde1IoYJ++V7ab0iD6E WbRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fH3oXgEA26koOZzUS7kaM14UjQdnbcbUXB9k1uP96n4=; b=GPWBcK2nkgTcCf4SoRC/err2M35VLpBVKP5nFxtcdIKzd2wBewlA0Fqb/bWMAu/dD9 p5m7XpZevY/P1/h/5SI4dEWx+fMNH9+YA55mN7k5KJi0I4Yb+XkaUtyT8LA97LvXOESY vgC6/BLne0cqiW/xevAK/op+0t/lemzLnoqneNi0IKx14fu0ovCaH780TYHgq7aeHMY0 qlUHhoM/s/+93/okkJU1YuvIRsxQDRz1xmaze9XHmoES09lrRbb0TSGfeze4UhZIenpp heRY8AD8pFytJqUm39SbPY7dSLJgjBbC5qwrwr9FY/bfcTYWJU2wTTeuNCJ3myX3JpGS 3nIQ== X-Gm-Message-State: AOAM5319x/ZXZSdNCmz3QeyskElLzx0Iz/zm3j/7fn52i/R8cpDw+W6R t3ZVms+T7c6ntNkool0QxPPZAjeYr44= X-Google-Smtp-Source: ABdhPJzJRaCCh3lyGr73o+TqS16udcHLkBmd9lBGxwWTFSklvr/WqIj2T8lv4ANlwL8z+oVxcuoXpA== X-Received: by 2002:a05:620a:461e:: with SMTP id br30mr29952912qkb.363.1637344162693; Fri, 19 Nov 2021 09:49:22 -0800 (PST) Received: from spectre.mavhome.dp.ua (104-55-12-234.lightspeed.knvltn.sbcglobal.net. [104.55.12.234]) by smtp.gmail.com with ESMTPSA id e13sm253672qte.56.2021.11.19.09.49.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Nov 2021 09:49:22 -0800 (PST) Subject: Re: git: 9cb485d18f01 - main - geom: Remove g_class.config To: Warner Losh Cc: Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202111190620.1AJ6KS08078314@gitrepo.freebsd.org> <708f1f87-0082-5259-24df-cf23b87b628f@gmail.com> From: Alexander Motin Message-ID: <66dd682b-6341-5036-4ccf-00af5c960d41@gmail.com> Date: Fri, 19 Nov 2021 12:49:21 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.13.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 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Hwkgs6PTxz3DcW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N You are right, but I'd generally try to preserve KBI even in current, when possible, to ease upgrades. On 19.11.2021 11:46, Warner Losh wrote: > Thanks Alexander...  I understand this comment for MFCing, but -current > isn't KBI > stable, though I likely should have bumped FreeBSD_version to cope > instead. Am I > missing something? > > Warner > > On Fri, Nov 19, 2021 at 8:05 AM Alexander Motin > wrote: > > I have no objections, but I'd leave padding there to not break KBI for > out of tree GEOM classes. > > On 19.11.2021 01:20, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=9cb485d18f01900800efe4ec3cfcfadd335da858 > > > > > commit 9cb485d18f01900800efe4ec3cfcfadd335da858 > > Author:     Wuyang Chung > > > AuthorDate: 2021-10-16 01:43:54 +0000 > > Commit:     Warner Losh > > CommitDate: 2021-11-19 06:17:07 +0000 > > > >     geom: Remove g_class.config > >      > >     g_class.config is write only, remove it. > > --- > >  sys/geom/geom.h      | 1 - > >  sys/geom/geom_subr.c | 1 - > >  2 files changed, 2 deletions(-) > > > > diff --git a/sys/geom/geom.h b/sys/geom/geom.h > > index 1aba1f46d6d5..0d6d74d0b51c 100644 > > --- a/sys/geom/geom.h > > +++ b/sys/geom/geom.h > > @@ -96,7 +96,6 @@ struct g_class { > >       u_int                   version; > >       u_int                   spare0; > >       g_taste_t               *taste; > > -     g_config_t              *config; > >       g_ctl_req_t             *ctlreq; > >       g_init_t                *init; > >       g_fini_t                *fini; > > diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c > > index 2f7ea7754f7b..abaae5ccf57f 100644 > > --- a/sys/geom/geom_subr.c > > +++ b/sys/geom/geom_subr.c > > @@ -222,7 +222,6 @@ retry: > >  > >       /* Bar new entries */ > >       mp->taste = NULL; > > -     mp->config = NULL; > >  > >       LIST_FOREACH(gp, &mp->geom, geom) { > >               error = mp->destroy_geom(NULL, mp, gp); > > > > -- > Alexander Motin > -- Alexander Motin From nobody Fri Nov 19 18:13:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1890718A4609; Fri, 19 Nov 2021 18:13: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 4HwlCw0F0Hz3Ljh; Fri, 19 Nov 2021 18:13:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DBEC64EF1; Fri, 19 Nov 2021 18:13: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 1AJIDlPb029539; Fri, 19 Nov 2021 18:13:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJIDl8q029538; Fri, 19 Nov 2021 18:13:47 GMT (envelope-from git) Date: Fri, 19 Nov 2021 18:13:47 GMT Message-Id: <202111191813.1AJIDl8q029538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 15b5c347f191 - main - sched_ule(4): Fix two typo in source code comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15b5c347f1916d14e84765ae68921755ee930612 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=15b5c347f1916d14e84765ae68921755ee930612 commit 15b5c347f1916d14e84765ae68921755ee930612 Author: Gordon Bergling AuthorDate: 2021-11-19 18:13:28 +0000 Commit: Gordon Bergling CommitDate: 2021-11-19 18:13:28 +0000 sched_ule(4): Fix two typo in source code comments - s/conditons/conditions/ - s/unconditonally/unconditionally/ MFC after: 3 days --- sys/kern/sched_ule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index e311c8da8bac..46b3b9aa418f 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -2040,7 +2040,7 @@ tdq_trysteal(struct tdq *tdq) /* * The data returned by sched_highest() is stale and * the chosen CPU no longer has an eligible thread. - * At this point unconditonally exit the loop to bound + * At this point unconditionally exit the loop to bound * the time spent in the critcal section. */ if (steal->tdq_load < steal_thresh || @@ -3083,7 +3083,7 @@ sched_fork_exit(struct thread *td) } /* - * Create on first use to catch odd startup conditons. + * Create on first use to catch odd startup conditions. */ char * sched_tdname(struct thread *td) From nobody Fri Nov 19 18:16:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 81F5218A6309; Fri, 19 Nov 2021 18:16: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 4HwlGs2wdVz3N4m; Fri, 19 Nov 2021 18:16:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43E315122; Fri, 19 Nov 2021 18:16: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 1AJIGLCh029824; Fri, 19 Nov 2021 18:16:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJIGLqp029823; Fri, 19 Nov 2021 18:16:21 GMT (envelope-from git) Date: Fri, 19 Nov 2021 18:16:21 GMT Message-Id: <202111191816.1AJIGLqp029823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: b4fbc855a518 - main - cc_newreno(4): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4fbc855a518c2bcad60c66c8f4e149996033b10 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b4fbc855a518c2bcad60c66c8f4e149996033b10 commit b4fbc855a518c2bcad60c66c8f4e149996033b10 Author: Gordon Bergling AuthorDate: 2021-11-19 18:16:02 +0000 Commit: Gordon Bergling CommitDate: 2021-11-19 18:16:02 +0000 cc_newreno(4): Fix a typo in a source code comment - s/conditons/conditions/ MFC after: 3 days --- sys/netinet/cc/cc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/cc/cc.c b/sys/netinet/cc/cc.c index 457f5a6e55e1..b49e5940bc7e 100644 --- a/sys/netinet/cc/cc.c +++ b/sys/netinet/cc/cc.c @@ -358,7 +358,7 @@ newreno_cc_post_recovery(struct cc_var *ccv) if (pipe < CCV(ccv, snd_ssthresh)) /* * Ensure that cwnd does not collapse to 1 MSS under - * adverse conditons. Implements RFC6582 + * adverse conditions. Implements RFC6582 */ CCV(ccv, snd_cwnd) = max(pipe, CCV(ccv, t_maxseg)) + CCV(ccv, t_maxseg); From nobody Fri Nov 19 18:18:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 007E618A796F; Fri, 19 Nov 2021 18:18: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 4HwlJq6Zqdz3P1m; Fri, 19 Nov 2021 18:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C321C50BE; Fri, 19 Nov 2021 18:18: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 1AJII3kv030048; Fri, 19 Nov 2021 18:18:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJII3AY030047; Fri, 19 Nov 2021 18:18:03 GMT (envelope-from git) Date: Fri, 19 Nov 2021 18:18:03 GMT Message-Id: <202111191818.1AJII3AY030047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: bebff615877e - main - ffs_softdep: Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bebff615877efdf549e5033b47ade4d8553f6a77 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bebff615877efdf549e5033b47ade4d8553f6a77 commit bebff615877efdf549e5033b47ade4d8553f6a77 Author: Gordon Bergling AuthorDate: 2021-11-19 18:17:41 +0000 Commit: Gordon Bergling CommitDate: 2021-11-19 18:17:41 +0000 ffs_softdep: Fix a typo in a source code comment - s/conditonally/conditionally/ MFC after: 3 days --- sys/ufs/ffs/ffs_softdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 969f7554dd0a..0b816b4139d3 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -9194,7 +9194,7 @@ complete_diradd(dap) /* * Cancel a diradd when a dirrem overlaps with it. We must cancel the journal - * add entries and conditonally journal the remove. + * add entries and conditionally journal the remove. */ static void cancel_diradd(dap, dirrem, jremref, dotremref, dotdotremref) From nobody Fri Nov 19 18:20:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C2B8E18A7DFD; Fri, 19 Nov 2021 18:20: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 4HwlM81N6Pz3Pmy; Fri, 19 Nov 2021 18:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08A4B5328; Fri, 19 Nov 2021 18:20: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 1AJIK3Tr032360; Fri, 19 Nov 2021 18:20:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJIK3E6032357; Fri, 19 Nov 2021 18:20:03 GMT (envelope-from git) Date: Fri, 19 Nov 2021 18:20:03 GMT Message-Id: <202111191820.1AJIK3E6032357@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 975e2e3f84b0 - main - ppbus(4): Fix a typo in source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 975e2e3f84b0b7425185c9bb43722da779e8cd98 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=975e2e3f84b0b7425185c9bb43722da779e8cd98 commit 975e2e3f84b0b7425185c9bb43722da779e8cd98 Author: Gordon Bergling AuthorDate: 2021-11-19 18:19:36 +0000 Commit: Gordon Bergling CommitDate: 2021-11-19 18:19:36 +0000 ppbus(4): Fix a typo in source code comment - s/quering/querying/ Obtained from: NetBSD MFC after: 3 days --- sys/dev/ppbus/ppb_1284.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ppbus/ppb_1284.c b/sys/dev/ppbus/ppb_1284.c index 5752e4599a8d..52dfb27931ed 100644 --- a/sys/dev/ppbus/ppb_1284.c +++ b/sys/dev/ppbus/ppb_1284.c @@ -737,7 +737,7 @@ ppb_1284_negociate(device_t bus, int mode, int options) goto error; } - /* Event 7 - quering result consider nACK not to misunderstand + /* Event 7 - querying result consider nACK not to misunderstand * a remote computer terminate sequence */ if (options & PPB_EXTENSIBILITY_LINK) { /* XXX not fully supported yet */ From nobody Fri Nov 19 18:26:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 91C891854486; Fri, 19 Nov 2021 18:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwlVw3gX7z3hV1; Fri, 19 Nov 2021 18:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B9775357; Fri, 19 Nov 2021 18:26: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 1AJIQmlt043090; Fri, 19 Nov 2021 18:26:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJIQmHx043089; Fri, 19 Nov 2021 18:26:48 GMT (envelope-from git) Date: Fri, 19 Nov 2021 18:26:48 GMT Message-Id: <202111191826.1AJIQmHx043089@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 8b11850f9d04 - main - TWL: Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b11850f9d04c096d8ed3647db512f8feceefaf4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8b11850f9d04c096d8ed3647db512f8feceefaf4 commit 8b11850f9d04c096d8ed3647db512f8feceefaf4 Author: Gordon Bergling AuthorDate: 2021-11-19 18:26:34 +0000 Commit: Gordon Bergling CommitDate: 2021-11-19 18:26:34 +0000 TWL: Fix a typo in a source code comment - s/maxium/maximum/ MFC after: 3 days --- sys/arm/ti/twl/twl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/ti/twl/twl.c b/sys/arm/ti/twl/twl.c index e1b20cbbaa5f..c7755b524f0a 100644 --- a/sys/arm/ti/twl/twl.c +++ b/sys/arm/ti/twl/twl.c @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD$"); /* Each TWL device typically has more than one I2C address */ #define TWL_MAX_SUBADDRS 4 -/* The maxium number of bytes that can be written in one call */ +/* The maximum number of bytes that can be written in one call */ #define TWL_MAX_IIC_DATA_SIZE 63 /* The TWL devices typically use 4 I2C address for the different internal From nobody Fri Nov 19 18:29:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3E1311855BC3; Fri, 19 Nov 2021 18:29: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 4HwlZN1G6bz3jf5; Fri, 19 Nov 2021 18:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C995550A; Fri, 19 Nov 2021 18:29: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 1AJITl5n043394; Fri, 19 Nov 2021 18:29:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJITlmH043393; Fri, 19 Nov 2021 18:29:47 GMT (envelope-from git) Date: Fri, 19 Nov 2021 18:29:47 GMT Message-Id: <202111191829.1AJITlmH043393@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 5e21882bb4e7 - main - iscsi(4): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e21882bb4e7d36ebcf0300234486a54ff4e7b13 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5e21882bb4e7d36ebcf0300234486a54ff4e7b13 commit 5e21882bb4e7d36ebcf0300234486a54ff4e7b13 Author: Gordon Bergling AuthorDate: 2021-11-19 18:29:21 +0000 Commit: Gordon Bergling CommitDate: 2021-11-19 18:29:21 +0000 iscsi(4): Fix a typo in a source code comment - s/conditon/condition/ MFC after: 3 days --- sys/dev/isci/scil/scif_sas_design.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/isci/scil/scif_sas_design.h b/sys/dev/isci/scil/scif_sas_design.h index 1f2e8a851287..18c9e86e861d 100644 --- a/sys/dev/isci/scil/scif_sas_design.h +++ b/sys/dev/isci/scil/scif_sas_design.h @@ -334,7 +334,7 @@ Please refer to these files directly for further design information: The SCIF SAS SMP REMOTE DEVICE object represents the expander device and fulfills its SMP discover activities. The discover procedure includes a initial discover phase and a following SATA spinup_hold release phase, if there are expander attached -SATA device is discovered and in spinup_hold conditon. The SCIF SAS SMP REMOTE DEVICE +SATA device is discovered and in spinup_hold condition. The SCIF SAS SMP REMOTE DEVICE object also fulfills expander attached device Target Reset (Phy Control) activity. @image latex Discover Process.eps "SMP Discover Activity Diagram" width=10cm From nobody Fri Nov 19 18:52:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 910B41891B7B; Fri, 19 Nov 2021 18:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hwm4H3lzDz3rCS; Fri, 19 Nov 2021 18:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 612E65AC5; Fri, 19 Nov 2021 18:52: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 1AJIqFHT082706; Fri, 19 Nov 2021 18:52:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJIqFLG082705; Fri, 19 Nov 2021 18:52:15 GMT (envelope-from git) Date: Fri, 19 Nov 2021 18:52:15 GMT Message-Id: <202111191852.1AJIqFLG082705@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 3e5ddef0fd39 - main - firewire(4): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e5ddef0fd391049f378456e10a0cea015652bc0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3e5ddef0fd391049f378456e10a0cea015652bc0 commit 3e5ddef0fd391049f378456e10a0cea015652bc0 Author: Gordon Bergling AuthorDate: 2021-11-19 18:50:56 +0000 Commit: Gordon Bergling CommitDate: 2021-11-19 18:50:56 +0000 firewire(4): Fix a typo in a source code comment - s/unavailabe/unavailable/ MFC after: 3 days --- sys/dev/firewire/sbp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/firewire/sbp.h b/sys/dev/firewire/sbp.h index 93ad991e3a76..f50723556763 100644 --- a/sys/dev/firewire/sbp.h +++ b/sys/dev/firewire/sbp.h @@ -126,7 +126,7 @@ struct sbp_status { #define STATUS_LUR 5 /* 6: Maximum payload too small */ /* 7: Reserved for future standardization */ -/* 8: Resource unavailabe */ +/* 8: Resource unavailable */ #define STATUS_RES_UNAVAIL 8 /* 9: Function Rejected */ /* 10: Login ID not recognized */ From nobody Fri Nov 19 18:52:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C986E1891D10; Fri, 19 Nov 2021 18:52: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 4Hwm4J4Zj3z3rLF; Fri, 19 Nov 2021 18:52:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C9255AC6; Fri, 19 Nov 2021 18:52: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 1AJIqGha082730; Fri, 19 Nov 2021 18:52:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJIqG8p082729; Fri, 19 Nov 2021 18:52:16 GMT (envelope-from git) Date: Fri, 19 Nov 2021 18:52:16 GMT Message-Id: <202111191852.1AJIqG8p082729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 8acb66212603 - main - iwm(4): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8acb6621260361852fb80b03d921a56548ac920b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8acb6621260361852fb80b03d921a56548ac920b commit 8acb6621260361852fb80b03d921a56548ac920b Author: Gordon Bergling AuthorDate: 2021-11-19 18:51:55 +0000 Commit: Gordon Bergling CommitDate: 2021-11-19 18:51:55 +0000 iwm(4): Fix a typo in a source code comment - s/availabe/available/ MFC after: 3 days --- sys/dev/iwm/if_iwmreg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iwm/if_iwmreg.h b/sys/dev/iwm/if_iwmreg.h index ee5c5ec07b21..c9ccbe965095 100644 --- a/sys/dev/iwm/if_iwmreg.h +++ b/sys/dev/iwm/if_iwmreg.h @@ -3786,7 +3786,7 @@ enum iwm_sf_scenario { /** * Smart Fifo configuration command. * @state: smart fifo state, types listed in enum %iwm_sf_state. - * @watermark: Minimum allowed availabe free space in RXF for transient state. + * @watermark: Minimum allowed available free space in RXF for transient state. * @long_delay_timeouts: aging and idle timer values for each scenario * in long delay state. * @full_on_timeouts: timer values for each scenario in full on state. From nobody Fri Nov 19 19:00:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3BAF5189553C; Fri, 19 Nov 2021 19:00: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 4HwmG11Gv2z3tY4; Fri, 19 Nov 2021 19:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B66D5B9D; Fri, 19 Nov 2021 19:00: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 1AJJ0etL092460; Fri, 19 Nov 2021 19:00:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJJ0ew4092459; Fri, 19 Nov 2021 19:00:40 GMT (envelope-from git) Date: Fri, 19 Nov 2021 19:00:40 GMT Message-Id: <202111191900.1AJJ0ew4092459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: d7125850f031 - main - ixl(4): Fix a typo in a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7125850f031f8e763ff35c70fda310a1419b876 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d7125850f031f8e763ff35c70fda310a1419b876 commit d7125850f031f8e763ff35c70fda310a1419b876 Author: Gordon Bergling AuthorDate: 2021-11-19 18:59:28 +0000 Commit: Gordon Bergling CommitDate: 2021-11-19 18:59:28 +0000 ixl(4): Fix a typo in a sysctl description MFC after: 3 days --- sys/dev/ixl/if_ixl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index e7e6e31a7fca..7fa2318db300 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -235,7 +235,7 @@ TUNABLE_INT("hw.ixl.debug_recovery_mode", &ixl_debug_recovery_mode); SYSCTL_INT(_hw_ixl, OID_AUTO, debug_recovery_mode, CTLFLAG_RDTUN, &ixl_debug_recovery_mode, 0, - "Act like when FW entered recovery mode (for debuging)"); + "Act like when FW entered recovery mode (for debugging)"); #endif static int ixl_i2c_access_method = 0; From nobody Fri Nov 19 19:04:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E9AA018989F7; Fri, 19 Nov 2021 19:04: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 4HwmLC6FFrz3wVP; Fri, 19 Nov 2021 19:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5D2E5E89; Fri, 19 Nov 2021 19:04: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 1AJJ4JQV097106; Fri, 19 Nov 2021 19:04:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJJ4Jhh097104; Fri, 19 Nov 2021 19:04:19 GMT (envelope-from git) Date: Fri, 19 Nov 2021 19:04:19 GMT Message-Id: <202111191904.1AJJ4Jhh097104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 840d72371bdc - main - lpr(1): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 840d72371bdc48be58152c839160c492bef7f1b7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=840d72371bdc48be58152c839160c492bef7f1b7 commit 840d72371bdc48be58152c839160c492bef7f1b7 Author: Gordon Bergling AuthorDate: 2021-11-19 19:04:09 +0000 Commit: Gordon Bergling CommitDate: 2021-11-19 19:04:09 +0000 lpr(1): Fix a typo in a source code comment -s /debuging/debugging/ MFC after: 3 days --- usr.sbin/lpr/common_source/ctlinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/lpr/common_source/ctlinfo.c b/usr.sbin/lpr/common_source/ctlinfo.c index d1f828e5ed99..15fed7bc32ef 100644 --- a/usr.sbin/lpr/common_source/ctlinfo.c +++ b/usr.sbin/lpr/common_source/ctlinfo.c @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); */ /* - * Some define's useful for debuging. + * Some define's useful for debugging. * TRIGGERTEST_FNAME and DEBUGREADCF_FNAME, allow us to do testing on * a per-spool-directory basis. */ From nobody Fri Nov 19 19:06:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 907F5189921F; Fri, 19 Nov 2021 19:06: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 4HwmNC3Cmkz4QtQ; Fri, 19 Nov 2021 19:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E73C5C24; Fri, 19 Nov 2021 19:06: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 1AJJ63KH097368; Fri, 19 Nov 2021 19:06:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJJ63Bt097367; Fri, 19 Nov 2021 19:06:03 GMT (envelope-from git) Date: Fri, 19 Nov 2021 19:06:03 GMT Message-Id: <202111191906.1AJJ63Bt097367@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: 1adebe3cd6b1 - main - minidump: Parameterize minidumpsys() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1adebe3cd6b1eb0973969e2c4c5d41f174caa304 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=1adebe3cd6b1eb0973969e2c4c5d41f174caa304 commit 1adebe3cd6b1eb0973969e2c4c5d41f174caa304 Author: Mitchell Horne AuthorDate: 2021-11-17 15:26:59 +0000 Commit: Mitchell Horne CommitDate: 2021-11-19 19:05:52 +0000 minidump: Parameterize minidumpsys() The minidump code is written assuming that certain global state will not change, and rightly so, since it executes from a kernel debugger context. In order to support taking minidumps of a live system, we should allow copies of relevant global state that is likely to change to be passed as parameters to the minidumpsys() function. This patch does the work of parameterizing this function, by adding a struct minidumpstate argument. For now, this struct allows for copies of the kernel message buffer, and the bitset that tracks which pages should be dumped (vm_page_dump). Follow-up changes will actually make use of these arguments. Notably, dump_avail[] does not need a snapshot, since it is not expected to change after system initialization. The existing minidumpsys() definitions are renamed, and a thin MI wrapper is added to kern_dump.c, which handles the construction of the state struct. Thus, calling minidumpsys() remains as simple as before. Reviewed by: kib, markj, jhb Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D31989 --- sys/amd64/amd64/minidump_machdep.c | 2 +- sys/arm/arm/minidump_machdep.c | 2 +- sys/arm/include/md_var.h | 3 ++- sys/arm64/arm64/minidump_machdep.c | 2 +- sys/arm64/include/md_var.h | 3 ++- sys/i386/i386/minidump_machdep.c | 5 +++-- sys/i386/i386/minidump_machdep_base.c | 10 +++++----- sys/i386/include/md_var.h | 4 ++-- sys/kern/kern_dump.c | 22 +++++++++++++++++++++- sys/mips/include/md_var.h | 3 ++- sys/mips/mips/minidump_machdep.c | 2 +- sys/powerpc/include/md_var.h | 3 ++- sys/powerpc/powerpc/minidump_machdep.c | 2 +- sys/riscv/include/md_var.h | 3 ++- sys/riscv/riscv/minidump_machdep.c | 2 +- sys/sys/kerneldump.h | 6 ++++++ sys/x86/include/x86_var.h | 3 ++- 17 files changed, 55 insertions(+), 22 deletions(-) diff --git a/sys/amd64/amd64/minidump_machdep.c b/sys/amd64/amd64/minidump_machdep.c index d6bdbfb7e633..68333088ed5a 100644 --- a/sys/amd64/amd64/minidump_machdep.c +++ b/sys/amd64/amd64/minidump_machdep.c @@ -160,7 +160,7 @@ blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz) static pd_entry_t fakepd[NPDEPG]; int -minidumpsys(struct dumperinfo *di) +cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { uint32_t pmapsize; vm_offset_t va; diff --git a/sys/arm/arm/minidump_machdep.c b/sys/arm/arm/minidump_machdep.c index 83c607c839ee..6d199d1894c3 100644 --- a/sys/arm/arm/minidump_machdep.c +++ b/sys/arm/arm/minidump_machdep.c @@ -153,7 +153,7 @@ static char dumpbuf[PAGE_SIZE] __aligned(sizeof(uint64_t)); CTASSERT(sizeof(dumpbuf) % sizeof(pt2_entry_t) == 0); int -minidumpsys(struct dumperinfo *di) +cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { struct minidumphdr mdhdr; uint64_t dumpsize, *dump_avail_buf; diff --git a/sys/arm/include/md_var.h b/sys/arm/include/md_var.h index 19468bd30e02..63f9f8256672 100644 --- a/sys/arm/include/md_var.h +++ b/sys/arm/include/md_var.h @@ -52,9 +52,10 @@ enum cpu_class { extern enum cpu_class cpu_class; struct dumperinfo; +struct minidumpstate; extern int busdma_swi_pending; void busdma_swi(void); -int minidumpsys(struct dumperinfo *); +int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *); extern uint32_t initial_fpscr; diff --git a/sys/arm64/arm64/minidump_machdep.c b/sys/arm64/arm64/minidump_machdep.c index 92b172260ae0..7558e612153c 100644 --- a/sys/arm64/arm64/minidump_machdep.c +++ b/sys/arm64/arm64/minidump_machdep.c @@ -147,7 +147,7 @@ blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz) } int -minidumpsys(struct dumperinfo *di) +cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { struct minidumphdr mdhdr; pd_entry_t *l0, *l1, *l2; diff --git a/sys/arm64/include/md_var.h b/sys/arm64/include/md_var.h index 1f5e6f693d60..46a4737a6247 100644 --- a/sys/arm64/include/md_var.h +++ b/sys/arm64/include/md_var.h @@ -44,10 +44,11 @@ extern u_long elf32_hwcap2; #endif struct dumperinfo; +struct minidumpstate; extern int busdma_swi_pending; void busdma_swi(void); -int minidumpsys(struct dumperinfo *); +int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *); void generic_bs_fault(void) __asm(__STRING(generic_bs_fault)); void generic_bs_peek_1(void) __asm(__STRING(generic_bs_peek_1)); void generic_bs_peek_2(void) __asm(__STRING(generic_bs_peek_2)); diff --git a/sys/i386/i386/minidump_machdep.c b/sys/i386/i386/minidump_machdep.c index d2a7999cb2c3..6d3585795208 100644 --- a/sys/i386/i386/minidump_machdep.c +++ b/sys/i386/i386/minidump_machdep.c @@ -50,8 +50,9 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct kerneldumpheader) == 512); int -minidumpsys(struct dumperinfo *di) +cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { - return (pae_mode ? minidumpsys_pae(di) : minidumpsys_nopae(di)); + return (pae_mode ? cpu_minidumpsys_pae(di, state) : + cpu_minidumpsys_nopae(di, state)); } diff --git a/sys/i386/i386/minidump_machdep_base.c b/sys/i386/i386/minidump_machdep_base.c index e3e211bf9a46..8984ab4dd083 100644 --- a/sys/i386/i386/minidump_machdep_base.c +++ b/sys/i386/i386/minidump_machdep_base.c @@ -145,15 +145,15 @@ blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz) static pt_entry_t fakept[NPTEPG]; #ifdef PMAP_PAE_COMP -#define minidumpsys minidumpsys_pae -#define IdlePTD IdlePTD_pae +#define cpu_minidumpsys cpu_minidumpsys_pae +#define IdlePTD IdlePTD_pae #else -#define minidumpsys minidumpsys_nopae -#define IdlePTD IdlePTD_nopae +#define cpu_minidumpsys cpu_minidumpsys_nopae +#define IdlePTD IdlePTD_nopae #endif int -minidumpsys(struct dumperinfo *di) +cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { uint64_t dumpsize; uint32_t ptesize; diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h index 95f4907a61d0..88b036a9cc24 100644 --- a/sys/i386/include/md_var.h +++ b/sys/i386/include/md_var.h @@ -68,8 +68,8 @@ void doreti_popl_fs_fault(void) __asm(__STRING(doreti_popl_fs_fault)); void fill_based_sd(struct segment_descriptor *sdp, uint32_t base); void i686_pagezero(void *addr); void sse2_pagezero(void *addr); -int minidumpsys_nopae(struct dumperinfo *); -int minidumpsys_pae(struct dumperinfo *); +int cpu_minidumpsys_nopae(struct dumperinfo *, const struct minidumpstate *); +int cpu_minidumpsys_pae(struct dumperinfo *, const struct minidumpstate *); void init_AMD_Elan_sc520(void); vm_paddr_t kvtop(void *addr); void panicifcpuunsupported(void); diff --git a/sys/kern/kern_dump.c b/sys/kern/kern_dump.c index 4c592f446f45..278863e19a65 100644 --- a/sys/kern/kern_dump.c +++ b/sys/kern/kern_dump.c @@ -32,15 +32,18 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include +#include #include + #include #include #include #include #include #include + #include #include #include @@ -386,6 +389,8 @@ dumpsys_generic(struct dumperinfo *di) return (error); } +#if MINIDUMP_PAGE_TRACKING == 1 + /* Minidump progress bar */ static struct { const int min_per; @@ -454,3 +459,18 @@ dumpsys_pb_progress(size_t delta) break; } } + +int +minidumpsys(struct dumperinfo *di) +{ + struct minidumpstate state; + int error; + + state.msgbufp = msgbufp; + state.dump_bitset = vm_page_dump; + + error = cpu_minidumpsys(di, &state); + + return (error); +} +#endif /* MINIDUMP_PAGE_TRACKING == 1 */ diff --git a/sys/mips/include/md_var.h b/sys/mips/include/md_var.h index b322c4d6323a..ca2afa9a3616 100644 --- a/sys/mips/include/md_var.h +++ b/sys/mips/include/md_var.h @@ -82,6 +82,7 @@ extern int busdma_swi_pending; void busdma_swi(void); struct dumperinfo; -int minidumpsys(struct dumperinfo *); +struct minidumpstate; +int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *); #endif /* !_MACHINE_MD_VAR_H_ */ diff --git a/sys/mips/mips/minidump_machdep.c b/sys/mips/mips/minidump_machdep.c index 691e1208e684..06a63834cab8 100644 --- a/sys/mips/mips/minidump_machdep.c +++ b/sys/mips/mips/minidump_machdep.c @@ -106,7 +106,7 @@ write_buffer(struct dumperinfo *di, char *ptr, size_t sz) } int -minidumpsys(struct dumperinfo *di) +cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { struct minidumphdr mdhdr; uint64_t *dump_avail_buf; diff --git a/sys/powerpc/include/md_var.h b/sys/powerpc/include/md_var.h index ab5f9e33a5bb..6e74000340b9 100644 --- a/sys/powerpc/include/md_var.h +++ b/sys/powerpc/include/md_var.h @@ -43,7 +43,8 @@ extern char sigcode64[], sigcode64_elfv2[]; extern int szsigcode64, szsigcode64_elfv2; struct dumperinfo; -int minidumpsys(struct dumperinfo *); +struct minidumpstate; +int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *); #endif extern long Maxmem; diff --git a/sys/powerpc/powerpc/minidump_machdep.c b/sys/powerpc/powerpc/minidump_machdep.c index 908e6f7a3fc7..e6a0f3918883 100644 --- a/sys/powerpc/powerpc/minidump_machdep.c +++ b/sys/powerpc/powerpc/minidump_machdep.c @@ -189,7 +189,7 @@ dump_pmap(struct dumperinfo *di) } int -minidumpsys(struct dumperinfo *di) +cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { vm_paddr_t pa; int error, retry_count; diff --git a/sys/riscv/include/md_var.h b/sys/riscv/include/md_var.h index b36a44d7d023..56007cd0c155 100644 --- a/sys/riscv/include/md_var.h +++ b/sys/riscv/include/md_var.h @@ -42,8 +42,9 @@ extern register_t marchid; extern register_t mimpid; struct dumperinfo; +struct minidumpstate; void busdma_swi(void); -int minidumpsys(struct dumperinfo *); +int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *); #endif /* !_MACHINE_MD_VAR_H_ */ diff --git a/sys/riscv/riscv/minidump_machdep.c b/sys/riscv/riscv/minidump_machdep.c index 992ab097e1b3..d71dde8f6da5 100644 --- a/sys/riscv/riscv/minidump_machdep.c +++ b/sys/riscv/riscv/minidump_machdep.c @@ -153,7 +153,7 @@ blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz) } int -minidumpsys(struct dumperinfo *di) +cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { pd_entry_t *l1, *l2; pt_entry_t *l3; diff --git a/sys/sys/kerneldump.h b/sys/sys/kerneldump.h index c4ce9d2f13ec..54662d9cff39 100644 --- a/sys/sys/kerneldump.h +++ b/sys/sys/kerneldump.h @@ -135,6 +135,12 @@ struct dump_pa { vm_paddr_t pa_size; }; +struct minidumpstate { + struct msgbuf *msgbufp; + struct bitset *dump_bitset; +}; + +int minidumpsys(struct dumperinfo *); int dumpsys_generic(struct dumperinfo *); void dumpsys_map_chunk(vm_paddr_t, size_t, void **); diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h index d695822ddb7f..47b630d076d2 100644 --- a/sys/x86/include/x86_var.h +++ b/sys/x86/include/x86_var.h @@ -104,6 +104,7 @@ struct fpreg; struct dbreg; struct dumperinfo; struct trapframe; +struct minidumpstate; /* * The interface type of the interrupt handler entry point cannot be @@ -151,7 +152,7 @@ void pagecopy(void *from, void *to); void printcpuinfo(void); int pti_get_default(void); int user_dbreg_trap(register_t dr6); -int minidumpsys(struct dumperinfo *); +int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *); struct pcb *get_pcb_td(struct thread *td); void x86_set_fork_retval(struct thread *td); uint64_t rdtsc_ordered(void); From nobody Fri Nov 19 19:06:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B99871899309; Fri, 19 Nov 2021 19:06: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 4HwmND4Qhvz4RLS; Fri, 19 Nov 2021 19:06:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7031A5C25; Fri, 19 Nov 2021 19:06: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 1AJJ64dE097392; Fri, 19 Nov 2021 19:06:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJJ64aZ097391; Fri, 19 Nov 2021 19:06:04 GMT (envelope-from git) Date: Fri, 19 Nov 2021 19:06:04 GMT Message-Id: <202111191906.1AJJ64aZ097391@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: 90d4da622592 - main - amd64: provide PHYS_IN_DMAP() and VIRT_IN_DMAP() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 90d4da62259299a8d91fed1121be97ac5b7b6b3c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=90d4da62259299a8d91fed1121be97ac5b7b6b3c commit 90d4da62259299a8d91fed1121be97ac5b7b6b3c Author: Mitchell Horne AuthorDate: 2021-11-17 15:29:02 +0000 Commit: Mitchell Horne CommitDate: 2021-11-19 19:05:52 +0000 amd64: provide PHYS_IN_DMAP() and VIRT_IN_DMAP() It is useful for quickly checking an address against the DMAP region. These definitions exist already on arm64 and riscv. Reviewed by: kib, markj MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32962 --- sys/amd64/include/vmparam.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index 6cb8b3f0071a..c841cc41f17b 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -239,16 +239,19 @@ * because the result is not actually accessed until later, but the early * vt fb startup needs to be reworked. */ +#define PHYS_IN_DMAP(pa) (dmaplimit == 0 || (pa) < dmaplimit) +#define VIRT_IN_DMAP(va) ((va) >= DMAP_MIN_ADDRESS && \ + (va) < (DMAP_MIN_ADDRESS + dmaplimit)) + #define PMAP_HAS_DMAP 1 #define PHYS_TO_DMAP(x) ({ \ - KASSERT(dmaplimit == 0 || (x) < dmaplimit, \ + KASSERT(PHYS_IN_DMAP(x), \ ("physical address %#jx not covered by the DMAP", \ (uintmax_t)x)); \ (x) | DMAP_MIN_ADDRESS; }) #define DMAP_TO_PHYS(x) ({ \ - KASSERT((x) < (DMAP_MIN_ADDRESS + dmaplimit) && \ - (x) >= DMAP_MIN_ADDRESS, \ + KASSERT(VIRT_IN_DMAP(x), \ ("virtual address %#jx not covered by the DMAP", \ (uintmax_t)x)); \ (x) & ~DMAP_MIN_ADDRESS; }) From nobody Fri Nov 19 19:06:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AF1D818991D9; Fri, 19 Nov 2021 19:06: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 4HwmNG1xBgz4Qtd; Fri, 19 Nov 2021 19:06:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A30F5D58; Fri, 19 Nov 2021 19:06: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 1AJJ651d097420; Fri, 19 Nov 2021 19:06:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJJ65Di097419; Fri, 19 Nov 2021 19:06:05 GMT (envelope-from git) Date: Fri, 19 Nov 2021 19:06:05 GMT Message-Id: <202111191906.1AJJ65Di097419@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: 681bd71047f1 - main - minidump: reduce the amount direct accesses to page tables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 681bd71047f184282d10d5ec9c1770882d525eb8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=681bd71047f184282d10d5ec9c1770882d525eb8 commit 681bd71047f184282d10d5ec9c1770882d525eb8 Author: Mitchell Horne AuthorDate: 2021-11-17 15:30:43 +0000 Commit: Mitchell Horne CommitDate: 2021-11-19 19:05:52 +0000 minidump: reduce the amount direct accesses to page tables During a live dump, we may race with updates to the kernel page tables. This is generally okay; we accept that the state of the system while dumping may be somewhat inconsistent with its state when the dump was invoked. However, when walking the kernel page tables, it is important that we load each PDE/PTE only once while operating on it. Otherwise, it is possible to have the relevant PTE change underneath us. For example, after checking the valid bit, but before reading the physical address. Convert the loads to atomics, and add some validation around the physical addresses, to ensure that we do not try to dump a non-existent or non-canonical physical address. Similarly, don't read kernel_vm_end more than once, on the off chance that pmap_growkernel() is called between the two page table walks. Reviewed by: kib, markj MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31990 --- sys/amd64/amd64/minidump_machdep.c | 72 +++++++++++++++++++++-------------- sys/arm/arm/minidump_machdep.c | 14 +++++-- sys/arm64/arm64/minidump_machdep.c | 69 +++++++++++++++++++++++---------- sys/i386/i386/minidump_machdep_base.c | 45 +++++++++++++--------- sys/riscv/riscv/minidump_machdep.c | 58 +++++++++++++++++++--------- 5 files changed, 171 insertions(+), 87 deletions(-) diff --git a/sys/amd64/amd64/minidump_machdep.c b/sys/amd64/amd64/minidump_machdep.c index 68333088ed5a..975ae038cfdf 100644 --- a/sys/amd64/amd64/minidump_machdep.c +++ b/sys/amd64/amd64/minidump_machdep.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include CTASSERT(sizeof(struct kerneldumpheader) == 512); @@ -163,10 +164,11 @@ int cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { uint32_t pmapsize; - vm_offset_t va; + vm_offset_t va, kva_end; int error; uint64_t *pml4, *pdp, *pd, *pt, pa; - int i, ii, j, k, n; + uint64_t pdpe, pde, pte; + int ii, j, k, n; int retry_count; struct minidumphdr mdhdr; @@ -174,10 +176,18 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) retry: retry_count++; - /* Walk page table pages, set bits in vm_page_dump */ + /* Snapshot the KVA upper bound in case it grows. */ + kva_end = MAX(KERNBASE + nkpt * NBPDR, kernel_vm_end); + + /* + * Walk the kernel page table pages, setting the active entries in the + * dump bitmap. + * + * NB: for a live dump, we may be racing with updates to the page + * tables, so care must be taken to read each entry only once. + */ pmapsize = 0; - for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + nkpt * NBPDR, - kernel_vm_end); ) { + for (va = VM_MIN_KERNEL_ADDRESS; va < kva_end; ) { /* * We always write a page, even if it is zero. Each * page written corresponds to 1GB of space @@ -186,8 +196,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) ii = pmap_pml4e_index(va); pml4 = (uint64_t *)PHYS_TO_DMAP(KPML4phys) + ii; pdp = (uint64_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME); - i = pmap_pdpe_index(va); - if ((pdp[i] & PG_V) == 0) { + pdpe = atomic_load_64(&pdp[pmap_pdpe_index(va)]); + if ((pdpe & PG_V) == 0) { va += NBPDP; continue; } @@ -195,9 +205,9 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) /* * 1GB page is represented as 512 2MB pages in a dump. */ - if ((pdp[i] & PG_PS) != 0) { + if ((pdpe & PG_PS) != 0) { va += NBPDP; - pa = pdp[i] & PG_PS_FRAME; + pa = pdpe & PG_PS_FRAME; for (n = 0; n < NPDEPG * NPTEPG; n++) { if (vm_phys_is_dumpable(pa)) dump_add_page(pa); @@ -206,16 +216,16 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) continue; } - pd = (uint64_t *)PHYS_TO_DMAP(pdp[i] & PG_FRAME); + pd = (uint64_t *)PHYS_TO_DMAP(pdpe & PG_FRAME); for (n = 0; n < NPDEPG; n++, va += NBPDR) { - j = pmap_pde_index(va); + pde = atomic_load_64(&pd[pmap_pde_index(va)]); - if ((pd[j] & PG_V) == 0) + if ((pde & PG_V) == 0) continue; - if ((pd[j] & PG_PS) != 0) { + if ((pde & PG_PS) != 0) { /* This is an entire 2M page. */ - pa = pd[j] & PG_PS_FRAME; + pa = pde & PG_PS_FRAME; for (k = 0; k < NPTEPG; k++) { if (vm_phys_is_dumpable(pa)) dump_add_page(pa); @@ -224,17 +234,18 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) continue; } - pa = pd[j] & PG_FRAME; + pa = pde & PG_FRAME; /* set bit for this PTE page */ if (vm_phys_is_dumpable(pa)) dump_add_page(pa); /* and for each valid page in this 2MB block */ - pt = (uint64_t *)PHYS_TO_DMAP(pd[j] & PG_FRAME); + pt = (uint64_t *)PHYS_TO_DMAP(pde & PG_FRAME); for (k = 0; k < NPTEPG; k++) { - if ((pt[k] & PG_V) == 0) + pte = atomic_load_64(&pt[k]); + if ((pte & PG_V) == 0) continue; - pa = pt[k] & PG_FRAME; - if (vm_phys_is_dumpable(pa)) + pa = pte & PG_FRAME; + if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) dump_add_page(pa); } } @@ -247,7 +258,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { /* Clear out undumpable pages now if needed */ - if (vm_phys_is_dumpable(pa)) { + if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) { dumpsize += PAGE_SIZE; } else { dump_drop_page(pa); @@ -309,15 +320,14 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) /* Dump kernel page directory pages */ bzero(fakepd, sizeof(fakepd)); - for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + nkpt * NBPDR, - kernel_vm_end); va += NBPDP) { + for (va = VM_MIN_KERNEL_ADDRESS; va < kva_end; va += NBPDP) { ii = pmap_pml4e_index(va); pml4 = (uint64_t *)PHYS_TO_DMAP(KPML4phys) + ii; pdp = (uint64_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME); - i = pmap_pdpe_index(va); + pdpe = atomic_load_64(&pdp[pmap_pdpe_index(va)]); /* We always write a page, even if it is zero */ - if ((pdp[i] & PG_V) == 0) { + if ((pdpe & PG_V) == 0) { error = blk_write(di, (char *)&fakepd, 0, PAGE_SIZE); if (error) goto fail; @@ -329,9 +339,9 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) } /* 1GB page is represented as 512 2MB pages in a dump */ - if ((pdp[i] & PG_PS) != 0) { + if ((pdpe & PG_PS) != 0) { /* PDPE and PDP have identical layout in this case */ - fakepd[0] = pdp[i]; + fakepd[0] = pdpe; for (j = 1; j < NPDEPG; j++) fakepd[j] = fakepd[j - 1] + NBPDR; error = blk_write(di, (char *)&fakepd, 0, PAGE_SIZE); @@ -345,8 +355,14 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) continue; } - pd = (uint64_t *)PHYS_TO_DMAP(pdp[i] & PG_FRAME); - error = blk_write(di, (char *)pd, 0, PAGE_SIZE); + pa = pdpe & PG_FRAME; + if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) { + pd = (uint64_t *)PHYS_TO_DMAP(pa); + error = blk_write(di, (char *)pd, 0, PAGE_SIZE); + } else { + /* Malformed pa, write the zeroed fakepd. */ + error = blk_write(di, (char *)&fakepd, 0, PAGE_SIZE); + } if (error) goto fail; error = blk_flush(di); diff --git a/sys/arm/arm/minidump_machdep.c b/sys/arm/arm/minidump_machdep.c index 6d199d1894c3..e3bf37599d4a 100644 --- a/sys/arm/arm/minidump_machdep.c +++ b/sys/arm/arm/minidump_machdep.c @@ -159,7 +159,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) uint64_t dumpsize, *dump_avail_buf; uint32_t ptesize; uint32_t pa, prev_pa = 0, count = 0; - vm_offset_t va; + vm_offset_t va, kva_end; int error, i; char *addr; @@ -174,9 +174,15 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) */ dcache_wbinv_poc_all(); - /* Walk page table pages, set bits in vm_page_dump */ + /* Snapshot the KVA upper bound in case it grows. */ + kva_end = kernel_vm_end; + + /* + * Walk the kernel page table pages, setting the active entries in the + * dump bitmap. + */ ptesize = 0; - for (va = KERNBASE; va < kernel_vm_end; va += PAGE_SIZE) { + for (va = KERNBASE; va < kva_end; va += PAGE_SIZE) { pa = pmap_dump_kextract(va, NULL); if (pa != 0 && vm_phys_is_dumpable(pa)) dump_add_page(pa); @@ -255,7 +261,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) /* Dump kernel page table pages */ addr = dumpbuf; - for (va = KERNBASE; va < kernel_vm_end; va += PAGE_SIZE) { + for (va = KERNBASE; va < kva_end; va += PAGE_SIZE) { pmap_dump_kextract(va, (pt2_entry_t *)addr); addr += sizeof(pt2_entry_t); if (addr == dumpbuf + sizeof(dumpbuf)) { diff --git a/sys/arm64/arm64/minidump_machdep.c b/sys/arm64/arm64/minidump_machdep.c index 7558e612153c..5814cce632a9 100644 --- a/sys/arm64/arm64/minidump_machdep.c +++ b/sys/arm64/arm64/minidump_machdep.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -150,9 +151,9 @@ int cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { struct minidumphdr mdhdr; - pd_entry_t *l0, *l1, *l2; - pt_entry_t *l3; - vm_offset_t va; + pd_entry_t *l0, *l1, l1e, *l2, l2e; + pt_entry_t *l3, l3e; + vm_offset_t va, kva_end; vm_paddr_t pa; uint32_t pmapsize; int error, i, j, retry_count; @@ -162,31 +163,46 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) retry_count++; error = 0; pmapsize = 0; - for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += L2_SIZE) { + + /* Snapshot the KVA upper bound in case it grows. */ + kva_end = kernel_vm_end; + + /* + * Walk the kernel page table pages, setting the active entries in the + * dump bitmap. + * + * NB: for a live dump, we may be racing with updates to the page + * tables, so care must be taken to read each entry only once. + */ + for (va = VM_MIN_KERNEL_ADDRESS; va < kva_end; va += L2_SIZE) { pmapsize += PAGE_SIZE; if (!pmap_get_tables(pmap_kernel(), va, &l0, &l1, &l2, &l3)) continue; - if ((*l1 & ATTR_DESCR_MASK) == L1_BLOCK) { - pa = *l1 & ~ATTR_MASK; + l1e = atomic_load_64(l1); + l2e = atomic_load_64(l2); + if ((l1e & ATTR_DESCR_MASK) == L1_BLOCK) { + pa = l1e & ~ATTR_MASK; for (i = 0; i < Ln_ENTRIES * Ln_ENTRIES; i++, pa += PAGE_SIZE) if (vm_phys_is_dumpable(pa)) dump_add_page(pa); pmapsize += (Ln_ENTRIES - 1) * PAGE_SIZE; va += L1_SIZE - L2_SIZE; - } else if ((*l2 & ATTR_DESCR_MASK) == L2_BLOCK) { - pa = *l2 & ~ATTR_MASK; + } else if ((l2e & ATTR_DESCR_MASK) == L2_BLOCK) { + pa = l2e & ~ATTR_MASK; for (i = 0; i < Ln_ENTRIES; i++, pa += PAGE_SIZE) { if (vm_phys_is_dumpable(pa)) dump_add_page(pa); } - } else if ((*l2 & ATTR_DESCR_MASK) == L2_TABLE) { + } else if ((l2e & ATTR_DESCR_MASK) == L2_TABLE) { for (i = 0; i < Ln_ENTRIES; i++) { - if ((l3[i] & ATTR_DESCR_MASK) != L3_PAGE) + l3e = atomic_load_64(&l3[i]); + if ((l3e & ATTR_DESCR_MASK) != L3_PAGE) continue; - pa = l3[i] & ~ATTR_MASK; - if (vm_phys_is_dumpable(pa)) + pa = l3e & ~ATTR_MASK; + pa = l3e & ~ATTR_MASK; + if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) dump_add_page(pa); } } @@ -198,7 +214,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { - if (vm_phys_is_dumpable(pa)) + if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) dumpsize += PAGE_SIZE; else dump_drop_page(pa); @@ -260,7 +276,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) /* Dump kernel page directory pages */ bzero(&tmpbuffer, sizeof(tmpbuffer)); - for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += L2_SIZE) { + for (va = VM_MIN_KERNEL_ADDRESS; va < kva_end; va += L2_SIZE) { if (!pmap_get_tables(pmap_kernel(), va, &l0, &l1, &l2, &l3)) { /* We always write a page, even if it is zero */ error = blk_write(di, (char *)&tmpbuffer, 0, PAGE_SIZE); @@ -270,12 +286,17 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) error = blk_flush(di); if (error) goto fail; - } else if ((*l1 & ATTR_DESCR_MASK) == L1_BLOCK) { + continue; + } + + l1e = atomic_load_64(l1); + l2e = atomic_load_64(l2); + if ((l1e & ATTR_DESCR_MASK) == L1_BLOCK) { /* * Handle a 1GB block mapping: write out 512 fake L2 * pages. */ - pa = (*l1 & ~ATTR_MASK) | (va & L1_OFFSET); + pa = (l1e & ~ATTR_MASK) | (va & L1_OFFSET); for (i = 0; i < Ln_ENTRIES; i++) { for (j = 0; j < Ln_ENTRIES; j++) { @@ -294,8 +315,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) goto fail; bzero(&tmpbuffer, sizeof(tmpbuffer)); va += L1_SIZE - L2_SIZE; - } else if ((*l2 & ATTR_DESCR_MASK) == L2_BLOCK) { - pa = (*l2 & ~ATTR_MASK) | (va & L2_OFFSET); + } else if ((l2e & ATTR_DESCR_MASK) == L2_BLOCK) { + pa = (l2e & ~ATTR_MASK) | (va & L2_OFFSET); /* Generate fake l3 entries based upon the l1 entry */ for (i = 0; i < Ln_ENTRIES; i++) { @@ -312,9 +333,17 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) bzero(&tmpbuffer, sizeof(tmpbuffer)); continue; } else { - pa = *l2 & ~ATTR_MASK; + pa = l2e & ~ATTR_MASK; - error = blk_write(di, NULL, pa, PAGE_SIZE); + /* + * We always write a page, even if it is zero. If pa + * is malformed, write the zeroed tmpbuffer. + */ + if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) + error = blk_write(di, NULL, pa, PAGE_SIZE); + else + error = blk_write(di, (char *)&tmpbuffer, 0, + PAGE_SIZE); if (error) goto fail; } diff --git a/sys/i386/i386/minidump_machdep_base.c b/sys/i386/i386/minidump_machdep_base.c index 8984ab4dd083..9b036f0fd700 100644 --- a/sys/i386/i386/minidump_machdep_base.c +++ b/sys/i386/i386/minidump_machdep_base.c @@ -157,17 +157,26 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { uint64_t dumpsize; uint32_t ptesize; - vm_offset_t va; + vm_offset_t va, kva_end; int error; uint64_t pa; - pd_entry_t *pd; - pt_entry_t *pt; + pd_entry_t *pd, pde; + pt_entry_t *pt, pte; int j, k; struct minidumphdr mdhdr; - /* Walk page table pages, set bits in vm_page_dump */ + /* Snapshot the KVA upper bound in case it grows. */ + kva_end = kernel_vm_end; + + /* + * Walk the kernel page table pages, setting the active entries in the + * dump bitmap. + * + * NB: for a live dump, we may be racing with updates to the page + * tables, so care must be taken to read each entry only once. + */ ptesize = 0; - for (va = KERNBASE; va < kernel_vm_end; va += NBPDR) { + for (va = KERNBASE; va < kva_end; va += NBPDR) { /* * We always write a page, even if it is zero. Each * page written corresponds to 2MB of space @@ -175,9 +184,10 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) ptesize += PAGE_SIZE; pd = IdlePTD; /* always mapped! */ j = va >> PDRSHIFT; - if ((pd[j] & (PG_PS | PG_V)) == (PG_PS | PG_V)) { + pde = pte_load(&pd[va >> PDRSHIFT]); + if ((pde & (PG_PS | PG_V)) == (PG_PS | PG_V)) { /* This is an entire 2M page. */ - pa = pd[j] & PG_PS_FRAME; + pa = pde & PG_PS_FRAME; for (k = 0; k < NPTEPG; k++) { if (vm_phys_is_dumpable(pa)) dump_add_page(pa); @@ -185,12 +195,13 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) } continue; } - if ((pd[j] & PG_V) == PG_V) { + if ((pde & PG_V) == PG_V) { /* set bit for each valid page in this 2MB block */ - pt = pmap_kenter_temporary(pd[j] & PG_FRAME, 0); + pt = pmap_kenter_temporary(pde & PG_FRAME, 0); for (k = 0; k < NPTEPG; k++) { - if ((pt[k] & PG_V) == PG_V) { - pa = pt[k] & PG_FRAME; + pte = pte_load(&pt[k]); + if ((pte & PG_V) == PG_V) { + pa = pte & PG_FRAME; if (vm_phys_is_dumpable(pa)) dump_add_page(pa); } @@ -266,13 +277,13 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) goto fail; /* Dump kernel page table pages */ - for (va = KERNBASE; va < kernel_vm_end; va += NBPDR) { + for (va = KERNBASE; va < kva_end; va += NBPDR) { /* We always write a page, even if it is zero */ pd = IdlePTD; /* always mapped! */ - j = va >> PDRSHIFT; - if ((pd[j] & (PG_PS | PG_V)) == (PG_PS | PG_V)) { + pde = pte_load(&pd[va >> PDRSHIFT]); + if ((pde & (PG_PS | PG_V)) == (PG_PS | PG_V)) { /* This is a single 2M block. Generate a fake PTP */ - pa = pd[j] & PG_PS_FRAME; + pa = pde & PG_PS_FRAME; for (k = 0; k < NPTEPG; k++) { fakept[k] = (pa + (k * PAGE_SIZE)) | PG_V | PG_RW | PG_A | PG_M; } @@ -285,8 +296,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) goto fail; continue; } - if ((pd[j] & PG_V) == PG_V) { - pa = pd[j] & PG_FRAME; + if ((pde & PG_V) == PG_V) { + pa = pde & PG_FRAME; error = blk_write(di, 0, pa, PAGE_SIZE); if (error) goto fail; diff --git a/sys/riscv/riscv/minidump_machdep.c b/sys/riscv/riscv/minidump_machdep.c index d71dde8f6da5..8f5a4a4d1289 100644 --- a/sys/riscv/riscv/minidump_machdep.c +++ b/sys/riscv/riscv/minidump_machdep.c @@ -155,11 +155,11 @@ blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz) int cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { - pd_entry_t *l1, *l2; - pt_entry_t *l3; + pd_entry_t *l1, *l2, l2e; + pt_entry_t *l3, l3e; struct minidumphdr mdhdr; uint32_t pmapsize; - vm_offset_t va; + vm_offset_t va, kva_max; vm_paddr_t pa; int error; int i; @@ -171,8 +171,17 @@ retry: error = 0; pmapsize = 0; - /* Build set of dumpable pages from kernel pmap */ - for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += L2_SIZE) { + /* Snapshot the KVA upper bound in case it grows. */ + kva_max = kernel_vm_end; + + /* + * Walk the kernel page table pages, setting the active entries in the + * dump bitmap. + * + * NB: for a live dump, we may be racing with updates to the page + * tables, so care must be taken to read each entry only once. + */ + for (va = VM_MIN_KERNEL_ADDRESS; va < kva_max; va += L2_SIZE) { pmapsize += PAGE_SIZE; if (!pmap_get_tables(pmap_kernel(), va, &l1, &l2, &l3)) continue; @@ -182,18 +191,20 @@ retry: continue; /* l2 may be a superpage */ - if ((*l2 & PTE_RWX) != 0) { - pa = (*l2 >> PTE_PPN1_S) << L2_SHIFT; + l2e = atomic_load_64(l2); + if ((l2e & PTE_RWX) != 0) { + pa = (l2e >> PTE_PPN1_S) << L2_SHIFT; for (i = 0; i < Ln_ENTRIES; i++, pa += PAGE_SIZE) { if (vm_phys_is_dumpable(pa)) dump_add_page(pa); } } else { for (i = 0; i < Ln_ENTRIES; i++) { - if ((l3[i] & PTE_V) == 0) + l3e = atomic_load_64(&l3[i]); + if ((l3e & PTE_V) == 0) continue; - pa = (l3[i] >> PTE_PPN0_S) * PAGE_SIZE; - if (vm_phys_is_dumpable(pa)) + pa = (l3e >> PTE_PPN0_S) * PAGE_SIZE; + if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) dump_add_page(pa); } } @@ -206,7 +217,7 @@ retry: dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { /* Clear out undumpable pages now if needed */ - if (vm_phys_is_dumpable(pa)) + if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) dumpsize += PAGE_SIZE; else dump_drop_page(pa); @@ -268,7 +279,7 @@ retry: /* Dump kernel page directory pages */ bzero(&tmpbuffer, sizeof(tmpbuffer)); - for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += L2_SIZE) { + for (va = VM_MIN_KERNEL_ADDRESS; va < kva_max; va += L2_SIZE) { if (!pmap_get_tables(pmap_kernel(), va, &l1, &l2, &l3)) { /* We always write a page, even if it is zero */ error = blk_write(di, (char *)&tmpbuffer, 0, PAGE_SIZE); @@ -278,10 +289,14 @@ retry: error = blk_flush(di); if (error) goto fail; - } else if ((*l2 & PTE_RWX) != 0) { + continue; + } + + l2e = atomic_load_64(l2); + if ((l2e & PTE_RWX) != 0) { /* Generate fake l3 entries based on the l2 superpage */ for (i = 0; i < Ln_ENTRIES; i++) { - tmpbuffer[i] = (*l2 | (i << PTE_PPN0_S)); + tmpbuffer[i] = (l2e | (i << PTE_PPN0_S)); } /* We always write a page, even if it is zero */ error = blk_write(di, (char *)&tmpbuffer, 0, PAGE_SIZE); @@ -293,10 +308,17 @@ retry: goto fail; bzero(&tmpbuffer, sizeof(tmpbuffer)); } else { - pa = (*l2 >> PTE_PPN0_S) * PAGE_SIZE; - - /* We always write a page, even if it is zero */ - error = blk_write(di, NULL, pa, PAGE_SIZE); + pa = (l2e >> PTE_PPN0_S) * PAGE_SIZE; + + /* + * We always write a page, even if it is zero. If pa + * is malformed, write the zeroed tmpbuffer. + */ + if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) + error = blk_write(di, NULL, pa, PAGE_SIZE); + else + error = blk_write(di, (char *)&tmpbuffer, 0, + PAGE_SIZE); if (error) goto fail; } From nobody Fri Nov 19 19:06:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 96FAD189923C; Fri, 19 Nov 2021 19:06: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 4HwmNG6V5cz4RNp; Fri, 19 Nov 2021 19:06:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE90A5E8B; Fri, 19 Nov 2021 19:06: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 1AJJ66Cf097447; Fri, 19 Nov 2021 19:06:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJJ66PA097446; Fri, 19 Nov 2021 19:06:06 GMT (envelope-from git) Date: Fri, 19 Nov 2021 19:06:06 GMT Message-Id: <202111191906.1AJJ66PA097446@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: 1d2d1418b492 - main - minidump: Use provided msgbuf pointer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1d2d1418b492359921716aaa41e93750969b6e1f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=1d2d1418b492359921716aaa41e93750969b6e1f commit 1d2d1418b492359921716aaa41e93750969b6e1f Author: Mitchell Horne AuthorDate: 2021-11-17 15:34:13 +0000 Commit: Mitchell Horne CommitDate: 2021-11-19 19:05:52 +0000 minidump: Use provided msgbuf pointer Don't assume we are dumping the global message buffer, but use the one provided by the state argument. While here, drop superfluous cast to char *. Reviewed by: markj, jhb MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31991 --- sys/amd64/amd64/minidump_machdep.c | 8 +++++--- sys/arm/arm/minidump_machdep.c | 9 +++++---- sys/arm64/arm64/minidump_machdep.c | 9 +++++---- sys/i386/i386/minidump_machdep_base.c | 9 ++++++--- sys/mips/mips/minidump_machdep.c | 9 +++++---- sys/powerpc/powerpc/minidump_machdep.c | 11 ++++++----- sys/riscv/riscv/minidump_machdep.c | 9 +++++---- 7 files changed, 37 insertions(+), 27 deletions(-) diff --git a/sys/amd64/amd64/minidump_machdep.c b/sys/amd64/amd64/minidump_machdep.c index 975ae038cfdf..8d2bc3bca84a 100644 --- a/sys/amd64/amd64/minidump_machdep.c +++ b/sys/amd64/amd64/minidump_machdep.c @@ -171,6 +171,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) int ii, j, k, n; int retry_count; struct minidumphdr mdhdr; + struct msgbuf *mbp; retry_count = 0; retry: @@ -252,8 +253,9 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) } /* Calculate dump size. */ + mbp = state->msgbufp; dumpsize = pmapsize; - dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(mbp->msg_size); dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { @@ -273,7 +275,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) bzero(&mdhdr, sizeof(mdhdr)); strcpy(mdhdr.magic, MINIDUMP_MAGIC); mdhdr.version = MINIDUMP_VERSION; - mdhdr.msgbufsize = msgbufp->msg_size; + mdhdr.msgbufsize = mbp->msg_size; mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.pmapsize = pmapsize; mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; @@ -299,7 +301,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) goto fail; /* Dump msgbuf up front */ - error = blk_write(di, (char *)msgbufp->msg_ptr, 0, round_page(msgbufp->msg_size)); + error = blk_write(di, mbp->msg_ptr, 0, round_page(mbp->msg_size)); if (error) goto fail; diff --git a/sys/arm/arm/minidump_machdep.c b/sys/arm/arm/minidump_machdep.c index e3bf37599d4a..76ce89f895e3 100644 --- a/sys/arm/arm/minidump_machdep.c +++ b/sys/arm/arm/minidump_machdep.c @@ -156,6 +156,7 @@ int cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { struct minidumphdr mdhdr; + struct msgbuf *mbp; uint64_t dumpsize, *dump_avail_buf; uint32_t ptesize; uint32_t pa, prev_pa = 0, count = 0; @@ -190,8 +191,9 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) } /* Calculate dump size. */ + mbp = state->msgbufp; dumpsize = ptesize; - dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(mbp->msg_size); dumpsize += round_page(nitems(dump_avail) * sizeof(uint64_t)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { @@ -209,7 +211,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) bzero(&mdhdr, sizeof(mdhdr)); strcpy(mdhdr.magic, MINIDUMP_MAGIC); mdhdr.version = MINIDUMP_VERSION; - mdhdr.msgbufsize = msgbufp->msg_size; + mdhdr.msgbufsize = mbp->msg_size; mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.ptesize = ptesize; mdhdr.kernbase = KERNBASE; @@ -235,8 +237,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) goto fail; /* Dump msgbuf up front */ - error = blk_write(di, (char *)msgbufp->msg_ptr, 0, - round_page(msgbufp->msg_size)); + error = blk_write(di, mbp->msg_ptr, 0, round_page(mbp->msg_size)); if (error) goto fail; diff --git a/sys/arm64/arm64/minidump_machdep.c b/sys/arm64/arm64/minidump_machdep.c index 5814cce632a9..5a935d3c379d 100644 --- a/sys/arm64/arm64/minidump_machdep.c +++ b/sys/arm64/arm64/minidump_machdep.c @@ -151,6 +151,7 @@ int cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { struct minidumphdr mdhdr; + struct msgbuf *mbp; pd_entry_t *l0, *l1, l1e, *l2, l2e; pt_entry_t *l3, l3e; vm_offset_t va, kva_end; @@ -209,8 +210,9 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) } /* Calculate dump size. */ + mbp = state->msgbufp; dumpsize = pmapsize; - dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(mbp->msg_size); dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { @@ -227,7 +229,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) bzero(&mdhdr, sizeof(mdhdr)); strcpy(mdhdr.magic, MINIDUMP_MAGIC); mdhdr.version = MINIDUMP_VERSION; - mdhdr.msgbufsize = msgbufp->msg_size; + mdhdr.msgbufsize = mbp->msg_size; mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.pmapsize = pmapsize; mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; @@ -254,8 +256,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) goto fail; /* Dump msgbuf up front */ - error = blk_write(di, (char *)msgbufp->msg_ptr, 0, - round_page(msgbufp->msg_size)); + error = blk_write(di, mbp->msg_ptr, 0, round_page(mbp->msg_size)); if (error) goto fail; diff --git a/sys/i386/i386/minidump_machdep_base.c b/sys/i386/i386/minidump_machdep_base.c index 9b036f0fd700..196c375bec56 100644 --- a/sys/i386/i386/minidump_machdep_base.c +++ b/sys/i386/i386/minidump_machdep_base.c @@ -164,6 +164,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) pt_entry_t *pt, pte; int j, k; struct minidumphdr mdhdr; + struct msgbuf *mbp; /* Snapshot the KVA upper bound in case it grows. */ kva_end = kernel_vm_end; @@ -212,8 +213,9 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) } /* Calculate dump size. */ + mbp = state->msgbufp; dumpsize = ptesize; - dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(mbp->msg_size); dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { @@ -232,7 +234,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) bzero(&mdhdr, sizeof(mdhdr)); strcpy(mdhdr.magic, MINIDUMP_MAGIC); mdhdr.version = MINIDUMP_VERSION; - mdhdr.msgbufsize = msgbufp->msg_size; + mdhdr.msgbufsize = mbp->msg_size; mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.ptesize = ptesize; mdhdr.kernbase = KERNBASE; @@ -257,7 +259,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) goto fail; /* Dump msgbuf up front */ - error = blk_write(di, (char *)msgbufp->msg_ptr, 0, round_page(msgbufp->msg_size)); + error = blk_write(di, (char *)mbp->msg_ptr, 0, + round_page(mbp->msg_size)); if (error) goto fail; diff --git a/sys/mips/mips/minidump_machdep.c b/sys/mips/mips/minidump_machdep.c index 06a63834cab8..49a5ee3f15a7 100644 --- a/sys/mips/mips/minidump_machdep.c +++ b/sys/mips/mips/minidump_machdep.c @@ -109,6 +109,7 @@ int cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) { struct minidumphdr mdhdr; + struct msgbuf *mbp; uint64_t *dump_avail_buf; uint32_t ptesize; vm_paddr_t pa; @@ -148,8 +149,9 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) } /* Calculate dump size. */ + mbp = state->msgbufp; dumpsize = ptesize; - dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(mbp->msg_size); dumpsize += round_page(nitems(dump_avail) * sizeof(uint64_t)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { @@ -167,7 +169,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) bzero(&mdhdr, sizeof(mdhdr)); strcpy(mdhdr.magic, MINIDUMP_MAGIC); mdhdr.version = MINIDUMP_VERSION; - mdhdr.msgbufsize = msgbufp->msg_size; + mdhdr.msgbufsize = mbp->msg_size; mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.ptesize = ptesize; mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; @@ -191,8 +193,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) goto fail; /* Dump msgbuf up front */ - error = write_buffer(di, (char *)msgbufp->msg_ptr, - round_page(msgbufp->msg_size)); + error = write_buffer(di, mbp->msg_ptr, round_page(mbp->msg_size)); if (error) goto fail; diff --git a/sys/powerpc/powerpc/minidump_machdep.c b/sys/powerpc/powerpc/minidump_machdep.c index e6a0f3918883..c7e8d1965b98 100644 --- a/sys/powerpc/powerpc/minidump_machdep.c +++ b/sys/powerpc/powerpc/minidump_machdep.c @@ -195,6 +195,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) int error, retry_count; uint32_t pmapsize; struct minidumphdr mdhdr; + struct msgbuf *mbp; retry_count = 0; retry: @@ -210,8 +211,9 @@ retry: } /* Calculate dump size */ + mbp = state->msgbufp; dumpsize = PAGE_SIZE; /* header */ - dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(mbp->msg_size); dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); dumpsize += pmapsize; @@ -229,7 +231,7 @@ retry: strcpy(mdhdr.magic, MINIDUMP_MAGIC); strncpy(mdhdr.mmu_name, pmap_mmu_name(), sizeof(mdhdr.mmu_name) - 1); mdhdr.version = MINIDUMP_VERSION; - mdhdr.msgbufsize = msgbufp->msg_size; + mdhdr.msgbufsize = mbp->msg_size; mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.pmapsize = pmapsize; mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; @@ -260,9 +262,8 @@ retry: dump_total("header", PAGE_SIZE); /* Dump msgbuf up front */ - error = blk_write(di, (char *)msgbufp->msg_ptr, 0, - round_page(msgbufp->msg_size)); - dump_total("msgbuf", round_page(msgbufp->msg_size)); + error = blk_write(di, mbp->msg_ptr, 0, round_page(mbp->msg_size)); + dump_total("msgbuf", round_page(mbp->msg_size)); /* Dump dump_avail */ _Static_assert(sizeof(dump_avail) <= sizeof(pgbuf), diff --git a/sys/riscv/riscv/minidump_machdep.c b/sys/riscv/riscv/minidump_machdep.c index 8f5a4a4d1289..814c2dd00697 100644 --- a/sys/riscv/riscv/minidump_machdep.c +++ b/sys/riscv/riscv/minidump_machdep.c @@ -158,6 +158,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) pd_entry_t *l1, *l2, l2e; pt_entry_t *l3, l3e; struct minidumphdr mdhdr; + struct msgbuf *mbp; uint32_t pmapsize; vm_offset_t va, kva_max; vm_paddr_t pa; @@ -211,8 +212,9 @@ retry: } /* Calculate dump size */ + mbp = state->msgbufp; dumpsize = pmapsize; - dumpsize += round_page(msgbufp->msg_size); + dumpsize += round_page(mbp->msg_size); dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); VM_PAGE_DUMP_FOREACH(pa) { @@ -230,7 +232,7 @@ retry: bzero(&mdhdr, sizeof(mdhdr)); strcpy(mdhdr.magic, MINIDUMP_MAGIC); mdhdr.version = MINIDUMP_VERSION; - mdhdr.msgbufsize = msgbufp->msg_size; + mdhdr.msgbufsize = mbp->msg_size; mdhdr.bitmapsize = round_page(BITSET_SIZE(vm_page_dump_pages)); mdhdr.pmapsize = pmapsize; mdhdr.kernbase = KERNBASE; @@ -257,8 +259,7 @@ retry: goto fail; /* Dump msgbuf up front */ - error = blk_write(di, (char *)msgbufp->msg_ptr, 0, - round_page(msgbufp->msg_size)); + error = blk_write(di, mbp->msg_ptr, 0, round_page(mbp->msg_size)); if (error) goto fail; From nobody Fri Nov 19 19:06:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6039C18993A0; Fri, 19 Nov 2021 19:06:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwmNH6y9xz4RCh; Fri, 19 Nov 2021 19:06:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE0755C26; Fri, 19 Nov 2021 19:06: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 1AJJ67eY097471; Fri, 19 Nov 2021 19:06:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJJ6745097470; Fri, 19 Nov 2021 19:06:07 GMT (envelope-from git) Date: Fri, 19 Nov 2021 19:06:07 GMT Message-Id: <202111191906.1AJJ6745097470@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: 10fe6f80a6c8 - main - minidump: Use the provided dump bitset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 10fe6f80a6c871ba317ddc2684cecb8f02096943 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=10fe6f80a6c871ba317ddc2684cecb8f02096943 commit 10fe6f80a6c871ba317ddc2684cecb8f02096943 Author: Mitchell Horne AuthorDate: 2021-11-17 15:35:18 +0000 Commit: Mitchell Horne CommitDate: 2021-11-19 19:05:52 +0000 minidump: Use the provided dump bitset When constructing the set of dumpable pages, use the bitset provided by the state argument, rather than assuming vm_page_dump invariably. For normal kernel minidumps this will be a pointer to vm_page_dump, but when dumping the live system it will not. To do this, the functions in vm_dumpset.h are extended to accept the desired bitset as an argument. Note that this provided bitset is assumed to be derived from vm_page_dump, and therefore has the same size. Reviewed by: kib, markj, jhb MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31992 --- sys/amd64/amd64/minidump_machdep.c | 19 +++++++++++-------- sys/arm/arm/minidump_machdep.c | 10 +++++----- sys/arm64/arm64/minidump_machdep.c | 18 ++++++++++-------- sys/i386/i386/minidump_machdep_base.c | 12 +++++++----- sys/mips/mips/minidump_machdep.c | 13 +++++++------ sys/powerpc/aim/mmu_oea64.c | 10 +++++----- sys/powerpc/include/dump.h | 2 +- sys/powerpc/include/mmuvar.h | 2 +- sys/powerpc/powerpc/minidump_machdep.c | 8 ++++---- sys/powerpc/powerpc/pmap_dispatch.c | 2 +- sys/riscv/riscv/minidump_machdep.c | 12 +++++++----- sys/vm/vm_dumpset.h | 20 ++++++++++++-------- 12 files changed, 71 insertions(+), 57 deletions(-) diff --git a/sys/amd64/amd64/minidump_machdep.c b/sys/amd64/amd64/minidump_machdep.c index 8d2bc3bca84a..de8433ae5a05 100644 --- a/sys/amd64/amd64/minidump_machdep.c +++ b/sys/amd64/amd64/minidump_machdep.c @@ -211,7 +211,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) pa = pdpe & PG_PS_FRAME; for (n = 0; n < NPDEPG * NPTEPG; n++) { if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, + pa); pa += PAGE_SIZE; } continue; @@ -229,7 +230,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) pa = pde & PG_PS_FRAME; for (k = 0; k < NPTEPG; k++) { if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add( + state->dump_bitset, pa); pa += PAGE_SIZE; } continue; @@ -238,7 +240,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) pa = pde & PG_FRAME; /* set bit for this PTE page */ if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, pa); /* and for each valid page in this 2MB block */ pt = (uint64_t *)PHYS_TO_DMAP(pde & PG_FRAME); for (k = 0; k < NPTEPG; k++) { @@ -247,7 +249,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) continue; pa = pte & PG_FRAME; if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, + pa); } } } @@ -258,12 +261,12 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) dumpsize += round_page(mbp->msg_size); dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { /* Clear out undumpable pages now if needed */ if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) { dumpsize += PAGE_SIZE; } else { - dump_drop_page(pa); + vm_page_dump_drop(state->dump_bitset, pa); } } dumpsize += PAGE_SIZE; @@ -315,7 +318,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) goto fail; /* Dump bitmap */ - error = blk_write(di, (char *)vm_page_dump, 0, + error = blk_write(di, (char *)state->dump_bitset, 0, round_page(BITSET_SIZE(vm_page_dump_pages))); if (error) goto fail; @@ -373,7 +376,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) } /* Dump memory chunks */ - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { error = blk_write(di, 0, pa, PAGE_SIZE); if (error) goto fail; diff --git a/sys/arm/arm/minidump_machdep.c b/sys/arm/arm/minidump_machdep.c index 76ce89f895e3..ab3034237d17 100644 --- a/sys/arm/arm/minidump_machdep.c +++ b/sys/arm/arm/minidump_machdep.c @@ -186,7 +186,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) for (va = KERNBASE; va < kva_end; va += PAGE_SIZE) { pa = pmap_dump_kextract(va, NULL); if (pa != 0 && vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, pa); ptesize += sizeof(pt2_entry_t); } @@ -196,12 +196,12 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) dumpsize += round_page(mbp->msg_size); dumpsize += round_page(nitems(dump_avail) * sizeof(uint64_t)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { /* Clear out undumpable pages now if needed */ if (vm_phys_is_dumpable(pa)) dumpsize += PAGE_SIZE; else - dump_drop_page(pa); + vm_page_dump_drop(state->dump_bitset, pa); } dumpsize += PAGE_SIZE; @@ -255,7 +255,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) goto fail; /* Dump bitmap */ - error = blk_write(di, (char *)vm_page_dump, 0, + error = blk_write(di, (char *)state->dump_bitset, 0, round_page(BITSET_SIZE(vm_page_dump_pages))); if (error) goto fail; @@ -279,7 +279,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) } /* Dump memory chunks */ - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { if (!count) { prev_pa = pa; count++; diff --git a/sys/arm64/arm64/minidump_machdep.c b/sys/arm64/arm64/minidump_machdep.c index 5a935d3c379d..8383d69fc5f8 100644 --- a/sys/arm64/arm64/minidump_machdep.c +++ b/sys/arm64/arm64/minidump_machdep.c @@ -187,14 +187,16 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) for (i = 0; i < Ln_ENTRIES * Ln_ENTRIES; i++, pa += PAGE_SIZE) if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, + pa); pmapsize += (Ln_ENTRIES - 1) * PAGE_SIZE; va += L1_SIZE - L2_SIZE; } else if ((l2e & ATTR_DESCR_MASK) == L2_BLOCK) { pa = l2e & ~ATTR_MASK; for (i = 0; i < Ln_ENTRIES; i++, pa += PAGE_SIZE) { if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, + pa); } } else if ((l2e & ATTR_DESCR_MASK) == L2_TABLE) { for (i = 0; i < Ln_ENTRIES; i++) { @@ -202,9 +204,9 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) if ((l3e & ATTR_DESCR_MASK) != L3_PAGE) continue; pa = l3e & ~ATTR_MASK; - pa = l3e & ~ATTR_MASK; if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, + pa); } } } @@ -215,11 +217,11 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) dumpsize += round_page(mbp->msg_size); dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) dumpsize += PAGE_SIZE; else - dump_drop_page(pa); + vm_page_dump_drop(state->dump_bitset, pa); } dumpsize += PAGE_SIZE; @@ -270,7 +272,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) goto fail; /* Dump bitmap */ - error = blk_write(di, (char *)vm_page_dump, 0, + error = blk_write(di, (char *)state->dump_bitset, 0, round_page(BITSET_SIZE(vm_page_dump_pages))); if (error) goto fail; @@ -351,7 +353,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) } /* Dump memory chunks */ - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { error = blk_write(di, 0, pa, PAGE_SIZE); if (error) goto fail; diff --git a/sys/i386/i386/minidump_machdep_base.c b/sys/i386/i386/minidump_machdep_base.c index 196c375bec56..a3f09228fa2d 100644 --- a/sys/i386/i386/minidump_machdep_base.c +++ b/sys/i386/i386/minidump_machdep_base.c @@ -191,7 +191,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) pa = pde & PG_PS_FRAME; for (k = 0; k < NPTEPG; k++) { if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, + pa); pa += PAGE_SIZE; } continue; @@ -204,7 +205,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) if ((pte & PG_V) == PG_V) { pa = pte & PG_FRAME; if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add( + state->dump_bitset, pa); } } } else { @@ -218,12 +220,12 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) dumpsize += round_page(mbp->msg_size); dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { /* Clear out undumpable pages now if needed */ if (vm_phys_is_dumpable(pa)) { dumpsize += PAGE_SIZE; } else { - dump_drop_page(pa); + vm_page_dump_drop(state->dump_bitset, pa); } } dumpsize += PAGE_SIZE; @@ -317,7 +319,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) } /* Dump memory chunks */ - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { error = blk_write(di, 0, pa, PAGE_SIZE); if (error) goto fail; diff --git a/sys/mips/mips/minidump_machdep.c b/sys/mips/mips/minidump_machdep.c index 49a5ee3f15a7..abe45e999f13 100644 --- a/sys/mips/mips/minidump_machdep.c +++ b/sys/mips/mips/minidump_machdep.c @@ -134,7 +134,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) if (pte_test(&pte[i], PTE_V)) { pa = TLBLO_PTE_TO_PA(pte[i]); if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, + pa); } } } @@ -145,7 +146,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) */ for (pa = 0; pa < phys_avail[0]; pa += PAGE_SIZE) { if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, pa); } /* Calculate dump size. */ @@ -154,12 +155,12 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) dumpsize += round_page(mbp->msg_size); dumpsize += round_page(nitems(dump_avail) * sizeof(uint64_t)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { /* Clear out undumpable pages now if needed */ if (vm_phys_is_dumpable(pa)) dumpsize += PAGE_SIZE; else - dump_drop_page(pa); + vm_page_dump_drop(state->dump_bitset, pa); } dumpsize += PAGE_SIZE; @@ -249,8 +250,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) prev_pte = 0; } - /* Dump memory chunks page by page*/ - VM_PAGE_DUMP_FOREACH(pa) { + /* Dump memory chunks page by page */ + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { dump_va = pmap_kenter_temporary(pa, 0); error = write_buffer(di, dump_va, PAGE_SIZE); if (error) diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index 2a9318446c0f..728f388ffb08 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -443,7 +443,7 @@ static int moea64_map_user_ptr(pmap_t pm, volatile const void *uaddr, void **kaddr, size_t ulen, size_t *klen); static int moea64_decode_kernel_ptr(vm_offset_t addr, int *is_user, vm_offset_t *decoded_addr); -static size_t moea64_scan_pmap(void); +static size_t moea64_scan_pmap(struct bitset *dump_bitset); static void *moea64_dump_pmap_init(unsigned blkpgs); #ifdef __powerpc64__ static void moea64_page_array_startup(long); @@ -3317,7 +3317,7 @@ moea64_scan_init() #ifdef __powerpc64__ static size_t -moea64_scan_pmap() +moea64_scan_pmap(struct bitset *dump_bitset) { struct pvo_entry *pvo; vm_paddr_t pa, pa_end; @@ -3360,11 +3360,11 @@ moea64_scan_pmap() pa_end = pa + lpsize; for (; pa < pa_end; pa += PAGE_SIZE) { if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(dump_bitset, pa); } } else { if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(dump_bitset, pa); } } PMAP_UNLOCK(kernel_pmap); @@ -3386,7 +3386,7 @@ moea64_dump_pmap_init(unsigned blkpgs) #else static size_t -moea64_scan_pmap() +moea64_scan_pmap(struct bitset *dump_bitset __unused) { return (0); } diff --git a/sys/powerpc/include/dump.h b/sys/powerpc/include/dump.h index 3debbfbe25f9..c45ccd2158de 100644 --- a/sys/powerpc/include/dump.h +++ b/sys/powerpc/include/dump.h @@ -40,7 +40,7 @@ void dumpsys_pa_init(void); void dumpsys_unmap_chunk(vm_paddr_t, size_t, void *); -size_t dumpsys_scan_pmap(void); +size_t dumpsys_scan_pmap(struct bitset *); void *dumpsys_dump_pmap_init(unsigned blkpgs); void *dumpsys_dump_pmap(void *ctx, void *buf, u_long *nbytes); diff --git a/sys/powerpc/include/mmuvar.h b/sys/powerpc/include/mmuvar.h index f94ca56df441..b449064e009f 100644 --- a/sys/powerpc/include/mmuvar.h +++ b/sys/powerpc/include/mmuvar.h @@ -96,7 +96,7 @@ typedef void (*pmap_sync_icache_t)(pmap_t, vm_offset_t, vm_size_t); typedef void (*pmap_dumpsys_map_chunk_t)(vm_paddr_t, size_t, void **); typedef void (*pmap_dumpsys_unmap_chunk_t)(vm_paddr_t, size_t, void *); typedef void (*pmap_dumpsys_pa_init_t)(void); -typedef size_t (*pmap_dumpsys_scan_pmap_t)(void); +typedef size_t (*pmap_dumpsys_scan_pmap_t)(struct bitset *dump_bitset); typedef void *(*pmap_dumpsys_dump_pmap_init_t)(unsigned); typedef void *(*pmap_dumpsys_dump_pmap_t)(void *, void *, u_long *); typedef vm_offset_t (*pmap_quick_enter_page_t)(vm_page_t); diff --git a/sys/powerpc/powerpc/minidump_machdep.c b/sys/powerpc/powerpc/minidump_machdep.c index c7e8d1965b98..396c6487823e 100644 --- a/sys/powerpc/powerpc/minidump_machdep.c +++ b/sys/powerpc/powerpc/minidump_machdep.c @@ -204,7 +204,7 @@ retry: DBG(total = dumptotal = 0;) /* Build set of dumpable pages from kernel pmap */ - pmapsize = dumpsys_scan_pmap(); + pmapsize = dumpsys_scan_pmap(state->dump_bitset); if (pmapsize % PAGE_SIZE != 0) { printf("pmapsize not page aligned: 0x%x\n", pmapsize); return (EINVAL); @@ -217,12 +217,12 @@ retry: dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); dumpsize += pmapsize; - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { /* Clear out undumpable pages now if needed */ if (vm_phys_is_dumpable(pa)) dumpsize += PAGE_SIZE; else - dump_drop_page(pa); + vm_page_dump_drop(state->dump_bitset, pa); } dumpsys_pb_init(dumpsize); @@ -289,7 +289,7 @@ retry: dump_total("pmap", pmapsize); /* Dump memory chunks */ - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { error = blk_write(di, 0, pa, PAGE_SIZE); if (error) goto fail; diff --git a/sys/powerpc/powerpc/pmap_dispatch.c b/sys/powerpc/powerpc/pmap_dispatch.c index 8aa09811c95b..00d4a2074327 100644 --- a/sys/powerpc/powerpc/pmap_dispatch.c +++ b/sys/powerpc/powerpc/pmap_dispatch.c @@ -188,7 +188,7 @@ DEFINE_PMAP_IFUNC(void, tlbie_all, (void)); DEFINE_DUMPSYS_IFUNC(void, map_chunk, (vm_paddr_t, size_t, void **)); DEFINE_DUMPSYS_IFUNC(void, unmap_chunk, (vm_paddr_t, size_t, void *)); DEFINE_DUMPSYS_IFUNC(void, pa_init, (void)); -DEFINE_DUMPSYS_IFUNC(size_t, scan_pmap, (void)); +DEFINE_DUMPSYS_IFUNC(size_t, scan_pmap, (struct bitset *)); DEFINE_DUMPSYS_IFUNC(void *, dump_pmap_init, (unsigned)); DEFINE_DUMPSYS_IFUNC(void *, dump_pmap, (void *, void *, u_long *)); diff --git a/sys/riscv/riscv/minidump_machdep.c b/sys/riscv/riscv/minidump_machdep.c index 814c2dd00697..ee6faaa6680f 100644 --- a/sys/riscv/riscv/minidump_machdep.c +++ b/sys/riscv/riscv/minidump_machdep.c @@ -197,7 +197,8 @@ retry: pa = (l2e >> PTE_PPN1_S) << L2_SHIFT; for (i = 0; i < Ln_ENTRIES; i++, pa += PAGE_SIZE) { if (vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, + pa); } } else { for (i = 0; i < Ln_ENTRIES; i++) { @@ -206,7 +207,8 @@ retry: continue; pa = (l3e >> PTE_PPN0_S) * PAGE_SIZE; if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) - dump_add_page(pa); + vm_page_dump_add(state->dump_bitset, + pa); } } } @@ -217,12 +219,12 @@ retry: dumpsize += round_page(mbp->msg_size); dumpsize += round_page(sizeof(dump_avail)); dumpsize += round_page(BITSET_SIZE(vm_page_dump_pages)); - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { /* Clear out undumpable pages now if needed */ if (PHYS_IN_DMAP(pa) && vm_phys_is_dumpable(pa)) dumpsize += PAGE_SIZE; else - dump_drop_page(pa); + vm_page_dump_drop(state->dump_bitset, pa); } dumpsize += PAGE_SIZE; @@ -327,7 +329,7 @@ retry: /* Dump memory chunks */ /* XXX cluster it up and use blk_dump() */ - VM_PAGE_DUMP_FOREACH(pa) { + VM_PAGE_DUMP_FOREACH(state->dump_bitset, pa) { error = blk_write(di, 0, pa, PAGE_SIZE); if (error) goto fail; diff --git a/sys/vm/vm_dumpset.h b/sys/vm/vm_dumpset.h index 6be417344263..f9ba6b2429c5 100644 --- a/sys/vm/vm_dumpset.h +++ b/sys/vm/vm_dumpset.h @@ -37,8 +37,12 @@ extern struct bitset *vm_page_dump; extern long vm_page_dump_pages; extern vm_paddr_t dump_avail[PHYS_AVAIL_COUNT]; +/* For the common case: add/remove a page from the minidump bitset. */ +#define dump_add_page(pa) vm_page_dump_add(vm_page_dump, pa) +#define dump_drop_page(pa) vm_page_dump_drop(vm_page_dump, pa) + static inline void -dump_add_page(vm_paddr_t pa) +vm_page_dump_add(struct bitset *bitset, vm_paddr_t pa) { vm_pindex_t adj; int i; @@ -48,7 +52,7 @@ dump_add_page(vm_paddr_t pa) if (pa >= dump_avail[i] && pa < dump_avail[i + 1]) { BIT_SET_ATOMIC(vm_page_dump_pages, (pa >> PAGE_SHIFT) - (dump_avail[i] >> PAGE_SHIFT) + - adj, vm_page_dump); + adj, bitset); return; } adj += howmany(dump_avail[i + 1], PAGE_SIZE) - @@ -57,7 +61,7 @@ dump_add_page(vm_paddr_t pa) } static inline void -dump_drop_page(vm_paddr_t pa) +vm_page_dump_drop(struct bitset *bitset, vm_paddr_t pa) { vm_pindex_t adj; int i; @@ -67,7 +71,7 @@ dump_drop_page(vm_paddr_t pa) if (pa >= dump_avail[i] && pa < dump_avail[i + 1]) { BIT_CLR_ATOMIC(vm_page_dump_pages, (pa >> PAGE_SHIFT) - (dump_avail[i] >> PAGE_SHIFT) + - adj, vm_page_dump); + adj, bitset); return; } adj += howmany(dump_avail[i + 1], PAGE_SIZE) - @@ -91,9 +95,9 @@ vm_page_dump_index_to_pa(int bit) return ((vm_paddr_t)NULL); } -#define VM_PAGE_DUMP_FOREACH(pa) \ - for (vm_pindex_t __b = BIT_FFS(vm_page_dump_pages, vm_page_dump); \ - (pa) = vm_page_dump_index_to_pa(__b - 1), __b != 0; \ - __b = BIT_FFS_AT(vm_page_dump_pages, vm_page_dump, __b)) +#define VM_PAGE_DUMP_FOREACH(bitset, pa) \ + for (vm_pindex_t __b = BIT_FFS(vm_page_dump_pages, bitset); \ + (pa) = vm_page_dump_index_to_pa(__b - 1), __b != 0; \ + __b = BIT_FFS_AT(vm_page_dump_pages, bitset, __b)) #endif /* _SYS_DUMPSET_H_ */ From nobody Fri Nov 19 19:06:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B962118991FB; Fri, 19 Nov 2021 19:06: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 4HwmNK0ZQYz4R5h; Fri, 19 Nov 2021 19:06:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF7F65E0C; Fri, 19 Nov 2021 19:06: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 1AJJ68C0097495; Fri, 19 Nov 2021 19:06:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJJ68nr097494; Fri, 19 Nov 2021 19:06:08 GMT (envelope-from git) Date: Fri, 19 Nov 2021 19:06:08 GMT Message-Id: <202111191906.1AJJ68nr097494@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: 588ab3c77454 - main - Allow minidumps to be performed on the live system List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 588ab3c7745480778281ce2ab086eacfb487e413 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=588ab3c7745480778281ce2ab086eacfb487e413 commit 588ab3c7745480778281ce2ab086eacfb487e413 Author: Mitchell Horne AuthorDate: 2021-11-17 15:35:59 +0000 Commit: Mitchell Horne CommitDate: 2021-11-19 19:05:53 +0000 Allow minidumps to be performed on the live system Add a boolean parameter to minidumpsys(), to indicate a live dump. When requested, take a snapshot of important global state, and pass this to the machine-dependent minidump function. For now this includes the kernel message buffer, and the bitset of pages to be dumped. Beyond this, we don't take much action to protect the integrity of the dump from changes in the running system. A new function msgbuf_duplicate() is added for snapshotting the message buffer. msgbuf_copy() is insufficient for this purpose since it marks any new characters it finds as read. For now, nothing can actually trigger a live minidump. A future patch will add the mechanism for this. For simplicity and safety, live dumps are disallowed for mips. Reviewed by: markj, jhb MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31993 --- sys/kern/kern_dump.c | 67 +++++++++++++++++++++++++++++++++++++--- sys/kern/subr_msgbuf.c | 15 +++++++++ sys/mips/mips/minidump_machdep.c | 4 +++ sys/sys/kerneldump.h | 2 +- sys/sys/msgbuf.h | 1 + 5 files changed, 84 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_dump.c b/sys/kern/kern_dump.c index 278863e19a65..17ac4e418645 100644 --- a/sys/kern/kern_dump.c +++ b/sys/kern/kern_dump.c @@ -31,8 +31,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include @@ -295,7 +297,7 @@ dumpsys_generic(struct dumperinfo *di) #if MINIDUMP_PAGE_TRACKING == 1 if (do_minidump) - return (minidumpsys(di)); + return (minidumpsys(di, false)); #endif bzero(&ehdr, sizeof(ehdr)); @@ -461,15 +463,72 @@ dumpsys_pb_progress(size_t delta) } int -minidumpsys(struct dumperinfo *di) +minidumpsys(struct dumperinfo *di, bool livedump) { struct minidumpstate state; + struct msgbuf mb_copy; + char *msg_ptr; + size_t sz; int error; - state.msgbufp = msgbufp; - state.dump_bitset = vm_page_dump; + if (livedump) { + KASSERT(!dumping, ("live dump invoked from incorrect context")); + + /* + * Before invoking cpu_minidumpsys() on the live system, we + * must snapshot some required global state: the message + * buffer, and the page dump bitset. They may be modified at + * any moment, so for the sake of the live dump it is best to + * have an unchanging snapshot to work with. Both are included + * as part of the dump and consumed by userspace tools. + * + * Other global state important to the minidump code is the + * dump_avail array and the kernel's page tables, but snapshots + * are not taken of these. For one, dump_avail[] is expected + * not to change after boot. Snapshotting the kernel page + * tables would involve an additional walk, so this is avoided + * too. + * + * This means live dumps are best effort, and the result may or + * may not be usable; there are no guarantees about the + * consistency of the dump's contents. Any of the following + * (and likely more) may affect the live dump: + * + * - Data may be modified, freed, or remapped during the + * course of the dump, such that the contents written out + * are partially or entirely unrecognizable. This means + * valid references may point to destroyed/mangled objects, + * and vice versa. + * + * - The dumped context of any threads that ran during the + * dump process may be unreliable. + * + * - The set of kernel page tables included in the dump likely + * won't correspond exactly to the copy of the dump bitset. + * This means some pages will be dumped without any way to + * locate them, and some pages may not have been dumped + * despite appearing as if they should. + */ + msg_ptr = malloc(msgbufsize, M_TEMP, M_WAITOK); + msgbuf_duplicate(msgbufp, &mb_copy, msg_ptr); + state.msgbufp = &mb_copy; + + sz = BITSET_SIZE(vm_page_dump_pages); + state.dump_bitset = malloc(sz, M_TEMP, M_WAITOK); + BIT_COPY_STORE_REL(sz, vm_page_dump, state.dump_bitset); + } else { + KASSERT(dumping, ("minidump invoked outside of doadump()")); + + /* Use the globals. */ + state.msgbufp = msgbufp; + state.dump_bitset = vm_page_dump; + } error = cpu_minidumpsys(di, &state); + if (livedump) { + free(msg_ptr, M_TEMP); + free(state.dump_bitset, M_TEMP); + } return (error); } diff --git a/sys/kern/subr_msgbuf.c b/sys/kern/subr_msgbuf.c index 980d37df205b..8af013d52a2d 100644 --- a/sys/kern/subr_msgbuf.c +++ b/sys/kern/subr_msgbuf.c @@ -414,3 +414,18 @@ msgbuf_copy(struct msgbuf *src, struct msgbuf *dst) while ((c = msgbuf_getchar(src)) >= 0) msgbuf_addchar(dst, c); } + +/* + * Get a snapshot of the message buffer, without modifying its internal state + * (i.e. don't mark any new characters as read). + */ +void +msgbuf_duplicate(struct msgbuf *src, struct msgbuf *dst, char *dst_msgptr) +{ + + mtx_lock_spin(&src->msg_lock); + bcopy(src, dst, sizeof(struct msgbuf)); + dst->msg_ptr = dst_msgptr; + bcopy(src->msg_ptr, dst->msg_ptr, src->msg_size); + mtx_unlock_spin(&src->msg_lock); +} diff --git a/sys/mips/mips/minidump_machdep.c b/sys/mips/mips/minidump_machdep.c index abe45e999f13..cbf9a83395a6 100644 --- a/sys/mips/mips/minidump_machdep.c +++ b/sys/mips/mips/minidump_machdep.c @@ -120,6 +120,10 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) int i, error; void *dump_va; + /* Live dumps are untested. */ + if (!dumping) + return (EOPNOTSUPP); + /* Flush cache */ mips_dcache_wbinv_all(); diff --git a/sys/sys/kerneldump.h b/sys/sys/kerneldump.h index 54662d9cff39..c293491eadc9 100644 --- a/sys/sys/kerneldump.h +++ b/sys/sys/kerneldump.h @@ -140,7 +140,7 @@ struct minidumpstate { struct bitset *dump_bitset; }; -int minidumpsys(struct dumperinfo *); +int minidumpsys(struct dumperinfo *, bool); int dumpsys_generic(struct dumperinfo *); void dumpsys_map_chunk(vm_paddr_t, size_t, void **); diff --git a/sys/sys/msgbuf.h b/sys/sys/msgbuf.h index df61f130e46f..27aba1a8e0ed 100644 --- a/sys/sys/msgbuf.h +++ b/sys/sys/msgbuf.h @@ -78,6 +78,7 @@ void msgbuf_init(struct msgbuf *mbp, void *ptr, int size); int msgbuf_peekbytes(struct msgbuf *mbp, char *buf, int buflen, u_int *seqp); void msgbuf_reinit(struct msgbuf *mbp, void *ptr, int size); +void msgbuf_duplicate(struct msgbuf *src, struct msgbuf *dst, char *msgptr); #ifndef MSGBUF_SIZE #define MSGBUF_SIZE (32768 * 3) From nobody Fri Nov 19 20:09:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 14BB8189917D for ; Fri, 19 Nov 2021 20:09: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 4HwnnV02Sdz4nyV; Fri, 19 Nov 2021 20:09:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5A50675B; Fri, 19 Nov 2021 20:09: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 1AJK9XVX077745; Fri, 19 Nov 2021 20:09:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJK9Xdc077744; Fri, 19 Nov 2021 20:09:33 GMT (envelope-from git) Date: Fri, 19 Nov 2021 20:09:33 GMT Message-Id: <202111192009.1AJK9Xdc077744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 344a3780b2e3..c0981da47d56 - vendor/llvm-project/main - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/vendor/llvm-project/main X-Git-Reftype: branch X-Git-Commit: c0981da47d5696fe36474fcf86b4ce03ae3ff818 X-Git-Oldrev: 344a3780b2e33f6ca763666c380202b18aab72a3 X-Git-Newrev: c0981da47d5696fe36474fcf86b4ce03ae3ff818 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/llvm-project/main has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=344a3780b2e3..c0981da47d56 c0981da47d56 Vendor import of llvm-project main llvmorg-14-init-10186-gff7f2cfa959b. From nobody Fri Nov 19 20:09:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1B8EB1899308 for ; Fri, 19 Nov 2021 20:09: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 4HwnnV0Kqyz4p7L; Fri, 19 Nov 2021 20:09:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCE9A686D; Fri, 19 Nov 2021 20:09: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 1AJK9XJv077769; Fri, 19 Nov 2021 20:09:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJK9Xqb077768; Fri, 19 Nov 2021 20:09:33 GMT (envelope-from git) Date: Fri, 19 Nov 2021 20:09:33 GMT Message-Id: <202111192009.1AJK9Xqb077768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: e1bd400275f3 - Create tag vendor/llvm-project/llvmorg-14-init-10186-gff7f2cfa959b List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/tags/vendor/llvm-project/llvmorg-14-init-10186-gff7f2cfa959b X-Git-Reftype: annotated tag X-Git-Commit: e1bd400275f3861f63ae3d5544fc840b7a6f5b16 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/llvm-project/llvmorg-14-init-10186-gff7f2cfa959b has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-14-init-10186-gff7f2cfa959b tag vendor/llvm-project/llvmorg-14-init-10186-gff7f2cfa959b Tagger: Dimitry Andric TaggerDate: 2021-11-19 20:07:23 +0000 Tag llvm-project main llvmorg-14-init-10186-gff7f2cfa959b. commit c0981da47d5696fe36474fcf86b4ce03ae3ff818 Author: Dimitry Andric AuthorDate: 2021-11-19 20:06:13 +0000 Commit: Dimitry Andric CommitDate: 2021-11-19 20:06:13 +0000 Vendor import of llvm-project main llvmorg-14-init-10186-gff7f2cfa959b. From nobody Fri Nov 19 22:06:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B8728188D75B; Fri, 19 Nov 2021 22:06: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 4HwrNb4mmXz4SJf; Fri, 19 Nov 2021 22:06:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8454C10703; Fri, 19 Nov 2021 22:06: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 1AJM6dEc037542; Fri, 19 Nov 2021 22:06:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJM6dDG037541; Fri, 19 Nov 2021 22:06:39 GMT (envelope-from git) Date: Fri, 19 Nov 2021 22:06:39 GMT Message-Id: <202111192206.1AJM6dDG037541@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: 3142d4f622d2 - main - lagg: fix unused-but-set-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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3142d4f622d2f95da5c7c52f60ce840411a07b0a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3142d4f622d2f95da5c7c52f60ce840411a07b0a commit 3142d4f622d2f95da5c7c52f60ce840411a07b0a Author: Kristof Provost AuthorDate: 2021-11-19 16:22:48 +0000 Commit: Kristof Provost CommitDate: 2021-11-19 21:01:27 +0000 lagg: fix unused-but-set-variable MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/if_lagg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 87227136e667..e9e66e54e6ce 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1834,13 +1834,10 @@ lagg_snd_tag_alloc(struct ifnet *ifp, struct epoch_tracker et; const struct if_snd_tag_sw *sw; struct lagg_snd_tag *lst; - struct lagg_softc *sc; struct lagg_port *lp; struct ifnet *lp_ifp; int error; - sc = ifp->if_softc; - switch (params->hdr.type) { #ifdef RATELIMIT case IF_SND_TAG_TYPE_UNLIMITED: From nobody Fri Nov 19 22:34:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 322F8189A510; Fri, 19 Nov 2021 22:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hws0f0tl5z4b88; Fri, 19 Nov 2021 22:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F26E610CE3; Fri, 19 Nov 2021 22:34: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 1AJMYPon076994; Fri, 19 Nov 2021 22:34:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJMYPAW076993; Fri, 19 Nov 2021 22:34:25 GMT (envelope-from git) Date: Fri, 19 Nov 2021 22:34:25 GMT Message-Id: <202111192234.1AJMYPAW076993@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: 3339950117be - main - timecounter: Initialize tc_lock earlier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3339950117bedb5f880f6c08982dcc5dd43f9c34 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3339950117bedb5f880f6c08982dcc5dd43f9c34 commit 3339950117bedb5f880f6c08982dcc5dd43f9c34 Author: Mark Johnston AuthorDate: 2021-11-19 22:29:28 +0000 Commit: Mark Johnston CommitDate: 2021-11-19 22:29:28 +0000 timecounter: Initialize tc_lock earlier Hyper-V wants to register its MSR-based timecounter during SI_SUB_HYPERVISOR, before SI_SUB_LOCK, since an emulated 8254 may not be available for DELAY(). So we cannot use MTX_SYSINIT to initialize the timecounter lock. PR: 259878 Reviewed by: kib MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33014 --- sys/kern/kern_tc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index f760d8ab34e3..f041c5f547e0 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -99,7 +99,6 @@ static struct timecounter *timecounters = &dummy_timecounter; /* Mutex to protect the timecounter list. */ static struct mtx tc_lock; -MTX_SYSINIT(tc_lock, &tc_lock, "tc", MTX_DEF); int tc_min_ticktock_freq = 1; @@ -1989,6 +1988,8 @@ inittimehands(void *dummy) TUNABLE_STR_FETCH("kern.timecounter.hardware", tc_from_tunable, sizeof(tc_from_tunable)); + + mtx_init(&tc_lock, "tc", NULL, MTX_DEF); } SYSINIT(timehands, SI_SUB_TUNABLES, SI_ORDER_ANY, inittimehands, NULL); From nobody Fri Nov 19 22:34:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AE7B2189A700; Fri, 19 Nov 2021 22:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hws0g1tc3z4b8F; Fri, 19 Nov 2021 22:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EC7F10666; Fri, 19 Nov 2021 22:34: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 1AJMYRfo077018; Fri, 19 Nov 2021 22:34:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJMYRQG077017; Fri, 19 Nov 2021 22:34:27 GMT (envelope-from git) Date: Fri, 19 Nov 2021 22:34:27 GMT Message-Id: <202111192234.1AJMYRQG077017@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: ed6a9452be01 - main - hyperv: Register the MSR-based timecounter during SI_SUB_HYPERVISOR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ed6a9452be01c1b7805d0a7311211b8cf381a9dd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ed6a9452be01c1b7805d0a7311211b8cf381a9dd commit ed6a9452be01c1b7805d0a7311211b8cf381a9dd Author: Mark Johnston AuthorDate: 2021-11-19 22:30:05 +0000 Commit: Mark Johnston CommitDate: 2021-11-19 22:30:05 +0000 hyperv: Register the MSR-based timecounter during SI_SUB_HYPERVISOR This reverts commit 9ef7df022a46 ("hyperv: Register hyperv_timecounter later during boot") and adds a comment explaining why the timecounter needs to be registered as early as it is. PR: 259878 Fixes: 9ef7df022a46 ("hyperv: Register hyperv_timecounter later during boot") Reviewed by: kib MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33014 --- sys/dev/hyperv/vmbus/hyperv.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/dev/hyperv/vmbus/hyperv.c b/sys/dev/hyperv/vmbus/hyperv.c index 2c413664cd07..01e0ad9610d9 100644 --- a/sys/dev/hyperv/vmbus/hyperv.c +++ b/sys/dev/hyperv/vmbus/hyperv.c @@ -247,15 +247,12 @@ hyperv_init(void *dummy __unused) /* Set guest id */ wrmsr(MSR_HV_GUEST_OS_ID, MSR_HV_GUESTID_FREEBSD); -} -SYSINIT(hyperv_initialize, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, hyperv_init, - NULL); - -static void -hyperv_tc_init(void *arg __unused) -{ if (hyperv_features & CPUID_HV_MSR_TIME_REFCNT) { - /* Register Hyper-V timecounter */ + /* + * Register Hyper-V timecounter. This should be done as early + * as possible to let DELAY() work, since the 8254 PIT is not + * reliably emulated or even available. + */ tc_init(&hyperv_timecounter); /* @@ -265,7 +262,8 @@ hyperv_tc_init(void *arg __unused) hyperv_tc64 = hyperv_tc64_rdmsr; } } -SYSINIT(hyperv_tc_init, SI_SUB_DRIVERS, SI_ORDER_FIRST, hyperv_tc_init, NULL); +SYSINIT(hyperv_initialize, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, hyperv_init, + NULL); static void hypercall_memfree(void) From nobody Fri Nov 19 22:44:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 36584189ECD9; Fri, 19 Nov 2021 22:44:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwsDF10WTz4fDR; Fri, 19 Nov 2021 22:44:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 043EF10E27; Fri, 19 Nov 2021 22:44: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 1AJMiS5I090113; Fri, 19 Nov 2021 22:44:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJMiSLO090112; Fri, 19 Nov 2021 22:44:28 GMT (envelope-from git) Date: Fri, 19 Nov 2021 22:44:28 GMT Message-Id: <202111192244.1AJMiSLO090112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 81c9491a5b4c - stable/12 - nfscl: Fix two more cases for forced dismount List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 81c9491a5b4c81e50e88967a977c8674fd580f25 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=81c9491a5b4c81e50e88967a977c8674fd580f25 commit 81c9491a5b4c81e50e88967a977c8674fd580f25 Author: Rick Macklem AuthorDate: 2021-11-05 22:33:19 +0000 Commit: Rick Macklem CommitDate: 2021-11-19 22:39:56 +0000 nfscl: Fix two more cases for forced dismount Although I was not able to cause a failure during testing, there are places in nfscl_removedeleg() and nfscl_renamedeleg() where I think a forced dismount could get hung. This patch fixes those. This patch only affects forced dismount and only if the NFSv4 server is issuing delegations to the client. Found by code inspection. (cherry picked from commit f5d5164fb607ab9c51c52ace4ec241f6cac7cc5c) --- sys/fs/nfsclient/nfs_clstate.c | 54 +++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 387d043b4dbd..c7b9608da1ba 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -4538,6 +4538,7 @@ nfscl_removedeleg(vnode_t vp, NFSPROC_T *p, nfsv4stateid_t *stp) struct nfsclowner *owp; struct nfscllockowner *lp; struct nfsmount *nmp; + struct mount *mp; struct ucred *cred; struct nfsnode *np; int igotlock = 0, triedrecall = 0, needsrecall, retcnt = 0, islept; @@ -4546,6 +4547,7 @@ nfscl_removedeleg(vnode_t vp, NFSPROC_T *p, nfsv4stateid_t *stp) if (NFSHASPNFS(nmp)) return (retcnt); np = VTONFS(vp); + mp = nmp->nm_mountp; NFSLOCKCLSTATE(); /* * Loop around waiting for: @@ -4572,8 +4574,13 @@ nfscl_removedeleg(vnode_t vp, NFSPROC_T *p, nfsv4stateid_t *stp) igotlock = 0; } dp->nfsdl_rwlock.nfslock_lock |= NFSV4LOCK_WANTED; - (void) nfsmsleep(&dp->nfsdl_rwlock, - NFSCLSTATEMUTEXPTR, PZERO, "nfscld", NULL); + msleep(&dp->nfsdl_rwlock, NFSCLSTATEMUTEXPTR, PZERO, + "nfscld", hz); + if (NFSCL_FORCEDISM(mp)) { + dp->nfsdl_flags &= ~NFSCLDL_DELEGRET; + NFSUNLOCKCLSTATE(); + return (0); + } continue; } needsrecall = 0; @@ -4596,7 +4603,14 @@ nfscl_removedeleg(vnode_t vp, NFSPROC_T *p, nfsv4stateid_t *stp) islept = 0; while (!igotlock) { igotlock = nfsv4_lock(&clp->nfsc_lock, 1, - &islept, NFSCLSTATEMUTEXPTR, NULL); + &islept, NFSCLSTATEMUTEXPTR, mp); + if (NFSCL_FORCEDISM(mp)) { + dp->nfsdl_flags &= ~NFSCLDL_DELEGRET; + if (igotlock) + nfsv4_unlock(&clp->nfsc_lock, 0); + NFSUNLOCKCLSTATE(); + return (0); + } if (islept) break; } @@ -4637,6 +4651,7 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stateid_t *fstp, int *gotfdp, vnode_t tvp, struct nfsclowner *owp; struct nfscllockowner *lp; struct nfsmount *nmp; + struct mount *mp; struct ucred *cred; struct nfsnode *np; int igotlock = 0, triedrecall = 0, needsrecall, retcnt = 0, islept; @@ -4646,6 +4661,7 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stateid_t *fstp, int *gotfdp, vnode_t tvp, *gottdp = 0; if (NFSHASPNFS(nmp)) return (retcnt); + mp = nmp->nm_mountp; NFSLOCKCLSTATE(); /* * Loop around waiting for: @@ -4673,8 +4689,15 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stateid_t *fstp, int *gotfdp, vnode_t tvp, igotlock = 0; } dp->nfsdl_rwlock.nfslock_lock |= NFSV4LOCK_WANTED; - (void) nfsmsleep(&dp->nfsdl_rwlock, - NFSCLSTATEMUTEXPTR, PZERO, "nfscld", NULL); + msleep(&dp->nfsdl_rwlock, NFSCLSTATEMUTEXPTR, PZERO, + "nfscld", hz); + if (NFSCL_FORCEDISM(mp)) { + dp->nfsdl_flags &= ~NFSCLDL_DELEGRET; + NFSUNLOCKCLSTATE(); + *gotfdp = 0; + *gottdp = 0; + return (0); + } continue; } needsrecall = 0; @@ -4697,7 +4720,16 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stateid_t *fstp, int *gotfdp, vnode_t tvp, islept = 0; while (!igotlock) { igotlock = nfsv4_lock(&clp->nfsc_lock, 1, - &islept, NFSCLSTATEMUTEXPTR, NULL); + &islept, NFSCLSTATEMUTEXPTR, mp); + if (NFSCL_FORCEDISM(mp)) { + dp->nfsdl_flags &= ~NFSCLDL_DELEGRET; + if (igotlock) + nfsv4_unlock(&clp->nfsc_lock, 0); + NFSUNLOCKCLSTATE(); + *gotfdp = 0; + *gottdp = 0; + return (0); + } if (islept) break; } @@ -4734,8 +4766,14 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stateid_t *fstp, int *gotfdp, vnode_t tvp, */ if (dp->nfsdl_rwlock.nfslock_usecnt > 0) { dp->nfsdl_rwlock.nfslock_lock |= NFSV4LOCK_WANTED; - (void) nfsmsleep(&dp->nfsdl_rwlock, - NFSCLSTATEMUTEXPTR, PZERO, "nfscld", NULL); + msleep(&dp->nfsdl_rwlock, NFSCLSTATEMUTEXPTR, PZERO, + "nfscld", hz); + if (NFSCL_FORCEDISM(mp)) { + NFSUNLOCKCLSTATE(); + *gotfdp = 0; + *gottdp = 0; + return (0); + } continue; } LIST_FOREACH(owp, &dp->nfsdl_owner, nfsow_list) { From nobody Fri Nov 19 22:53:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6D4FA18A4BE3; Fri, 19 Nov 2021 22:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwsQt2ZGxz4jXN; Fri, 19 Nov 2021 22:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 386D81120F; Fri, 19 Nov 2021 22:53: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 1AJMrgsP003157; Fri, 19 Nov 2021 22:53:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJMrgYi003156; Fri, 19 Nov 2021 22:53:42 GMT (envelope-from git) Date: Fri, 19 Nov 2021 22:53:42 GMT Message-Id: <202111192253.1AJMrgYi003156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 65ecc964f800 - stable/13 - nfscl: Fix two more cases for forced dismount List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 65ecc964f80042b0100891602eec5561d315edcb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=65ecc964f80042b0100891602eec5561d315edcb commit 65ecc964f80042b0100891602eec5561d315edcb Author: Rick Macklem AuthorDate: 2021-11-05 22:33:19 +0000 Commit: Rick Macklem CommitDate: 2021-11-19 22:49:43 +0000 nfscl: Fix two more cases for forced dismount Although I was not able to cause a failure during testing, there are places in nfscl_removedeleg() and nfscl_renamedeleg() where I think a forced dismount could get hung. This patch fixes those. This patch only affects forced dismount and only if the NFSv4 server is issuing delegations to the client. Found by code inspection. (cherry picked from commit f5d5164fb607ab9c51c52ace4ec241f6cac7cc5c) --- sys/fs/nfsclient/nfs_clstate.c | 54 +++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 4392ed6cbcb2..1e2feef19d63 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -4671,6 +4671,7 @@ nfscl_removedeleg(vnode_t vp, NFSPROC_T *p, nfsv4stateid_t *stp) struct nfsclowner *owp; struct nfscllockowner *lp; struct nfsmount *nmp; + struct mount *mp; struct ucred *cred; struct nfsnode *np; int igotlock = 0, triedrecall = 0, needsrecall, retcnt = 0, islept; @@ -4685,6 +4686,7 @@ nfscl_removedeleg(vnode_t vp, NFSPROC_T *p, nfsv4stateid_t *stp) } NFSUNLOCKMNT(nmp); np = VTONFS(vp); + mp = nmp->nm_mountp; NFSLOCKCLSTATE(); /* * Loop around waiting for: @@ -4711,8 +4713,13 @@ nfscl_removedeleg(vnode_t vp, NFSPROC_T *p, nfsv4stateid_t *stp) igotlock = 0; } dp->nfsdl_rwlock.nfslock_lock |= NFSV4LOCK_WANTED; - (void) nfsmsleep(&dp->nfsdl_rwlock, - NFSCLSTATEMUTEXPTR, PZERO, "nfscld", NULL); + msleep(&dp->nfsdl_rwlock, NFSCLSTATEMUTEXPTR, PZERO, + "nfscld", hz); + if (NFSCL_FORCEDISM(mp)) { + dp->nfsdl_flags &= ~NFSCLDL_DELEGRET; + NFSUNLOCKCLSTATE(); + return (0); + } continue; } needsrecall = 0; @@ -4735,7 +4742,14 @@ nfscl_removedeleg(vnode_t vp, NFSPROC_T *p, nfsv4stateid_t *stp) islept = 0; while (!igotlock) { igotlock = nfsv4_lock(&clp->nfsc_lock, 1, - &islept, NFSCLSTATEMUTEXPTR, NULL); + &islept, NFSCLSTATEMUTEXPTR, mp); + if (NFSCL_FORCEDISM(mp)) { + dp->nfsdl_flags &= ~NFSCLDL_DELEGRET; + if (igotlock) + nfsv4_unlock(&clp->nfsc_lock, 0); + NFSUNLOCKCLSTATE(); + return (0); + } if (islept) break; } @@ -4776,6 +4790,7 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stateid_t *fstp, int *gotfdp, vnode_t tvp, struct nfsclowner *owp; struct nfscllockowner *lp; struct nfsmount *nmp; + struct mount *mp; struct ucred *cred; struct nfsnode *np; int igotlock = 0, triedrecall = 0, needsrecall, retcnt = 0, islept; @@ -4791,6 +4806,7 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stateid_t *fstp, int *gotfdp, vnode_t tvp, return (retcnt); } NFSUNLOCKMNT(nmp); + mp = nmp->nm_mountp; NFSLOCKCLSTATE(); /* * Loop around waiting for: @@ -4818,8 +4834,15 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stateid_t *fstp, int *gotfdp, vnode_t tvp, igotlock = 0; } dp->nfsdl_rwlock.nfslock_lock |= NFSV4LOCK_WANTED; - (void) nfsmsleep(&dp->nfsdl_rwlock, - NFSCLSTATEMUTEXPTR, PZERO, "nfscld", NULL); + msleep(&dp->nfsdl_rwlock, NFSCLSTATEMUTEXPTR, PZERO, + "nfscld", hz); + if (NFSCL_FORCEDISM(mp)) { + dp->nfsdl_flags &= ~NFSCLDL_DELEGRET; + NFSUNLOCKCLSTATE(); + *gotfdp = 0; + *gottdp = 0; + return (0); + } continue; } needsrecall = 0; @@ -4842,7 +4865,16 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stateid_t *fstp, int *gotfdp, vnode_t tvp, islept = 0; while (!igotlock) { igotlock = nfsv4_lock(&clp->nfsc_lock, 1, - &islept, NFSCLSTATEMUTEXPTR, NULL); + &islept, NFSCLSTATEMUTEXPTR, mp); + if (NFSCL_FORCEDISM(mp)) { + dp->nfsdl_flags &= ~NFSCLDL_DELEGRET; + if (igotlock) + nfsv4_unlock(&clp->nfsc_lock, 0); + NFSUNLOCKCLSTATE(); + *gotfdp = 0; + *gottdp = 0; + return (0); + } if (islept) break; } @@ -4879,8 +4911,14 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stateid_t *fstp, int *gotfdp, vnode_t tvp, */ if (dp->nfsdl_rwlock.nfslock_usecnt > 0) { dp->nfsdl_rwlock.nfslock_lock |= NFSV4LOCK_WANTED; - (void) nfsmsleep(&dp->nfsdl_rwlock, - NFSCLSTATEMUTEXPTR, PZERO, "nfscld", NULL); + msleep(&dp->nfsdl_rwlock, NFSCLSTATEMUTEXPTR, PZERO, + "nfscld", hz); + if (NFSCL_FORCEDISM(mp)) { + NFSUNLOCKCLSTATE(); + *gotfdp = 0; + *gottdp = 0; + return (0); + } continue; } LIST_FOREACH(owp, &dp->nfsdl_owner, nfsow_list) { From nobody Sat Nov 20 00:26:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F0C9A1889CF5; Sat, 20 Nov 2021 00:26: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 4HwvVL6Twvz3hj3; Sat, 20 Nov 2021 00:26:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BEA9312583; Sat, 20 Nov 2021 00:26: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 1AK0QoAq023821; Sat, 20 Nov 2021 00:26:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AK0Qo4T023820; Sat, 20 Nov 2021 00:26:50 GMT (envelope-from git) Date: Sat, 20 Nov 2021 00:26:50 GMT Message-Id: <202111200026.1AK0Qo4T023820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 7fd7b6b4a5dd - stable/13 - Prefer CPUID leaf 1Fh for Intel CPU topology detection. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7fd7b6b4a5dd6e32a50966e7c7d0ae6e6e34beba Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=7fd7b6b4a5dd6e32a50966e7c7d0ae6e6e34beba commit 7fd7b6b4a5dd6e32a50966e7c7d0ae6e6e34beba Author: Alexander Motin AuthorDate: 2021-11-06 04:48:37 +0000 Commit: Alexander Motin CommitDate: 2021-11-20 00:26:29 +0000 Prefer CPUID leaf 1Fh for Intel CPU topology detection. Leaf 1Fh is a prefered extended version of 0Bh. It is supported by new Lader Lake CPUs, though does not report anything new so far. MFC after: 2 weeks (cherry picked from commit 6badb512a94df667f0df1484fb288ece186305bd) --- sys/x86/x86/mp_x86.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index ca1125886619..7724370c2c93 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -380,7 +380,7 @@ topo_probe_intel_0x4(void) /* * Determine topology of processing units for Intel CPUs - * using CPUID Leaf 11, if supported. + * using CPUID Leaf 1Fh or 0Bh, if supported. * See: * - Intel 64 Architecture Processor Topology Enumeration * - Intel 64 and IA-32 ArchitecturesSoftware Developer’s Manual, @@ -390,13 +390,23 @@ topo_probe_intel_0x4(void) static void topo_probe_intel_0xb(void) { - u_int p[4]; + u_int leaf; + u_int p[4] = { 0 }; int bits; int type; int i; - /* Fall back if CPU leaf 11 doesn't really exist. */ - cpuid_count(0x0b, 0, p); + /* Prefer leaf 1Fh (V2 Extended Topology Enumeration). */ + if (cpu_high >= 0x1f) { + leaf = 0x1f; + cpuid_count(leaf, 0, p); + } + /* Fall back to leaf 0Bh (Extended Topology Enumeration). */ + if (p[1] == 0) { + leaf = 0x0b; + cpuid_count(leaf, 0, p); + } + /* Fall back to leaf 04h (Deterministic Cache Parameters). */ if (p[1] == 0) { topo_probe_intel_0x4(); return; @@ -404,7 +414,7 @@ topo_probe_intel_0xb(void) /* We only support three levels for now. */ for (i = 0; ; i++) { - cpuid_count(0x0b, i, p); + cpuid_count(leaf, i, p); bits = p[0] & 0x1f; type = (p[2] >> 8) & 0xff; @@ -412,13 +422,12 @@ topo_probe_intel_0xb(void) if (type == 0) break; - /* TODO: check for duplicate (re-)assignment */ if (type == CPUID_TYPE_SMT) core_id_shift = bits; else if (type == CPUID_TYPE_CORE) pkg_id_shift = bits; - else - printf("unknown CPU level type %d\n", type); + else if (bootverbose) + printf("Topology level type %d shift: %d\n", type, bits); } if (pkg_id_shift < core_id_shift) { From nobody Sat Nov 20 00:40:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 27461189048A; Sat, 20 Nov 2021 00:40: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 4HwvpS0gZ0z3m3H; Sat, 20 Nov 2021 00:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB2121252B; Sat, 20 Nov 2021 00:40: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 1AK0elDf046184; Sat, 20 Nov 2021 00:40:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AK0eluA046183; Sat, 20 Nov 2021 00:40:47 GMT (envelope-from git) Date: Sat, 20 Nov 2021 00:40:47 GMT Message-Id: <202111200040.1AK0eluA046183@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 1ae5513db3b2 - stable/12 - Prefer CPUID leaf 1Fh for Intel CPU topology detection. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1ae5513db3b28e929d487d954d4e1c8a4c70fde9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=1ae5513db3b28e929d487d954d4e1c8a4c70fde9 commit 1ae5513db3b28e929d487d954d4e1c8a4c70fde9 Author: Alexander Motin AuthorDate: 2021-11-06 04:48:37 +0000 Commit: Alexander Motin CommitDate: 2021-11-20 00:32:54 +0000 Prefer CPUID leaf 1Fh for Intel CPU topology detection. Leaf 1Fh is a prefered extended version of 0Bh. It is supported by new Lader Lake CPUs, though does not report anything new so far. MFC after: 2 weeks (cherry picked from commit 6badb512a94df667f0df1484fb288ece186305bd) --- sys/x86/x86/mp_x86.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 73565360007b..41dc36672135 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -366,7 +366,7 @@ topo_probe_intel_0x4(void) /* * Determine topology of processing units for Intel CPUs - * using CPUID Leaf 11, if supported. + * using CPUID Leaf 1Fh or 0Bh, if supported. * See: * - Intel 64 Architecture Processor Topology Enumeration * - Intel 64 and IA-32 ArchitecturesSoftware Developer’s Manual, @@ -376,13 +376,23 @@ topo_probe_intel_0x4(void) static void topo_probe_intel_0xb(void) { - u_int p[4]; + u_int leaf; + u_int p[4] = { 0 }; int bits; int type; int i; - /* Fall back if CPU leaf 11 doesn't really exist. */ - cpuid_count(0x0b, 0, p); + /* Prefer leaf 1Fh (V2 Extended Topology Enumeration). */ + if (cpu_high >= 0x1f) { + leaf = 0x1f; + cpuid_count(leaf, 0, p); + } + /* Fall back to leaf 0Bh (Extended Topology Enumeration). */ + if (p[1] == 0) { + leaf = 0x0b; + cpuid_count(leaf, 0, p); + } + /* Fall back to leaf 04h (Deterministic Cache Parameters). */ if (p[1] == 0) { topo_probe_intel_0x4(); return; @@ -390,7 +400,7 @@ topo_probe_intel_0xb(void) /* We only support three levels for now. */ for (i = 0; ; i++) { - cpuid_count(0x0b, i, p); + cpuid_count(leaf, i, p); bits = p[0] & 0x1f; type = (p[2] >> 8) & 0xff; @@ -398,13 +408,12 @@ topo_probe_intel_0xb(void) if (type == 0) break; - /* TODO: check for duplicate (re-)assignment */ if (type == CPUID_TYPE_SMT) core_id_shift = bits; else if (type == CPUID_TYPE_CORE) pkg_id_shift = bits; - else - printf("unknown CPU level type %d\n", type); + else if (bootverbose) + printf("Topology level type %d shift: %d\n", type, bits); } if (pkg_id_shift < core_id_shift) { From nobody Sat Nov 20 01:08:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E4591189E2F7; Sat, 20 Nov 2021 01:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwwQS60bkz3w6t; Sat, 20 Nov 2021 01:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEAD112D25; Sat, 20 Nov 2021 01:08: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 1AK18W32077702; Sat, 20 Nov 2021 01:08:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AK18WfM077701; Sat, 20 Nov 2021 01:08:32 GMT (envelope-from git) Date: Sat, 20 Nov 2021 01:08:32 GMT Message-Id: <202111200108.1AK18WfM077701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Guangyuan Yang Subject: git: ffc00e9db94d - stable/13 - bridge(4): Fix spelling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ygy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ffc00e9db94dce45d332651ec538672f211760c3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by ygy (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ffc00e9db94dce45d332651ec538672f211760c3 commit ffc00e9db94dce45d332651ec538672f211760c3 Author: Tom Marcoen AuthorDate: 2021-11-17 17:47:33 +0000 Commit: Guangyuan Yang CommitDate: 2021-11-20 01:08:14 +0000 bridge(4): Fix spelling PR: 237725 (cherry picked from commit 8406182dbeb972698775e2468902bc5f6e593d72) --- share/man/man4/bridge.4 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4 index 7e5376556c57..c79e5da69837 100644 --- a/share/man/man4/bridge.4 +++ b/share/man/man4/bridge.4 @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 1, 2020 +.Dd November 17, 2021 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -96,20 +96,20 @@ If .Xr sysctl 8 node .Va net.link.bridge.inherit_mac -has non-zero value, a newly created bridge will inherit its MAC address -from its first member instead of choosing a random link-level address. -This provides a more predictable bridge MAC without any -additional configuration, but currently this feature is known -to break some L2 protocols, for example PPPoE that is provided -by +has a non-zero value, the newly created bridge will inherit the MAC +address from its first member instead of choosing a random link-level +address. +This will provide more predictable bridge MAC addresses without any +additional configuration, but currently this feature is known to break +some L2 protocols, for example PPPoE that is provided by .Xr ng_pppoe 4 and .Xr ppp 8 . -Currently this feature is considered experimental and is turned off +Currently this feature is considered as experimental and is turned off by default. .Pp A bridge can be used to provide several services, such as a simple -802.11-to-Ethernet bridge for wireless hosts, and traffic isolation. +802.11-to-Ethernet bridge for wireless hosts, or traffic isolation. .Pp A bridge works like a switch, forwarding traffic from one interface to another. @@ -130,7 +130,7 @@ The MTU of the first member interface to be added is used as the bridge MTU. All additional members are required to have exactly the same MTU value. .Pp The TOE, TSO, TXCSUM and TXCSUM6 capabilities on all interfaces added to the -bridge are disabled if any of the interfaces doesn't support/enable them. +bridge are disabled if any of the interfaces do not support/enable them. The LRO capability is always disabled. All the capabilities are restored when the interface is removed from the bridge. Changing capabilities at run-time may cause NIC reinit and a link flap. @@ -180,7 +180,7 @@ This situation is clearly against the description in Section 5, RFC 4007. Although it works in most cases, -it can cause some counterintuitive or undesirable behavior in some +it can cause some counterintuitive or undesirable behaviour in some edge cases when both, the .Nm interface and one of the member interfaces, have an IPv6 address @@ -198,7 +198,7 @@ interface has IPv6 addresses, IPv6 addresses on the member interface will be automatically removed before the interface is added. .Pp -This behavior can be disabled by setting +This behaviour can be disabled by setting .Xr sysctl 8 variable .Va net.link.bridge.allow_llz_overlap From nobody Sat Nov 20 08:02:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 50C05188D444; Sat, 20 Nov 2021 08:02: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 4Hx5c51nMcz3q8F; Sat, 20 Nov 2021 08:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D2CE18553; Sat, 20 Nov 2021 08:02: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 1AK82TaY037273; Sat, 20 Nov 2021 08:02:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AK82T9N037272; Sat, 20 Nov 2021 08:02:29 GMT (envelope-from git) Date: Sat, 20 Nov 2021 08:02:29 GMT Message-Id: <202111200802.1AK82T9N037272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: ce74223a366b - main - mixer: make .Dt tags uppercase List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce74223a366b59bb7ea8febef9e4db1fc700136a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ce74223a366b59bb7ea8febef9e4db1fc700136a commit ce74223a366b59bb7ea8febef9e4db1fc700136a Author: Christos Margiolis AuthorDate: 2021-11-20 07:58:36 +0000 Commit: Gordon Bergling CommitDate: 2021-11-20 07:58:36 +0000 mixer: make .Dt tags uppercase The document title should be uppercase in man pages. Reviewed by: imp, gbe MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D33027 --- lib/libmixer/mixer.3 | 2 +- usr.sbin/mixer/mixer.8 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libmixer/mixer.3 b/lib/libmixer/mixer.3 index b541c94af779..25e93440f32c 100644 --- a/lib/libmixer/mixer.3 +++ b/lib/libmixer/mixer.3 @@ -23,7 +23,7 @@ .\" .Dd September 22, 2021 -.Dt mixer 3 +.Dt MIXER 3 .Os .Sh NAME .Nm mixer_open , diff --git a/usr.sbin/mixer/mixer.8 b/usr.sbin/mixer/mixer.8 index 2dd7818a1fd4..11663eb56203 100644 --- a/usr.sbin/mixer/mixer.8 +++ b/usr.sbin/mixer/mixer.8 @@ -23,7 +23,7 @@ .\" .Dd October 17, 2021 -.Dt mixer 8 +.Dt MIXER 8 .Os .Sh NAME .Nm mixer From nobody Sat Nov 20 08:10:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 63E1A1892CFF; Sat, 20 Nov 2021 08:10:52 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher 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 "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hx5nl6JBNz3sfg; Sat, 20 Nov 2021 08:10:51 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.16.1/8.16.1) with ESMTPS id 1AK8AnPC037208 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 20 Nov 2021 00:10:49 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.16.1/8.16.1/Submit) id 1AK8An7W037207; Sat, 20 Nov 2021 00:10:49 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Sat, 20 Nov 2021 00:10:49 -0800 From: Gleb Smirnoff To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ff94500855c1 - main - Add tcp_freecb() - single place to free tcpcb. Message-ID: References: <202111190428.1AJ4SEAh021121@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: <202111190428.1AJ4SEAh021121@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4Hx5nl6JBNz3sfg X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US] X-ThisMailContainsUnwantedMimeParts: N On Fri, Nov 19, 2021 at 04:28:14AM +0000, Gleb Smirnoff wrote: T> The branch main has been updated by glebius: T> T> URL: https://cgit.FreeBSD.org/src/commit/?id=ff94500855c16d0d9cc18aa8b0ba73ea94020c56 T> T> commit ff94500855c16d0d9cc18aa8b0ba73ea94020c56 T> Author: Gleb Smirnoff T> AuthorDate: 2021-11-19 04:26:09 +0000 T> Commit: Gleb Smirnoff T> CommitDate: 2021-11-19 04:27:45 +0000 T> T> Add tcp_freecb() - single place to free tcpcb. T> T> Until this change there were two places where we would free tcpcb - T> tcp_discardcb() in case if all timers are drained and tcp_timer_discard() T> otherwise. They were pretty much copy-n-paste, except that in the T> default case we would run tcp_hc_update(). Merge this into single T> function tcp_freecb() and move new short version of tcp_timer_discard() T> to tcp_timer.c and make it static. T> T> Reviewed by: rrs, hselasky T> Differential revision: https://reviews.freebsd.org/D32965 Should have been https://reviews.freebsd.org/D32966 -- Gleb Smirnoff From nobody Sat Nov 20 08:57:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B8B961888C45; Sat, 20 Nov 2021 08:57: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 4Hx6qR4Vj2z4bjl; Sat, 20 Nov 2021 08:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7577C19315; Sat, 20 Nov 2021 08:57: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 1AK8vNTV003737; Sat, 20 Nov 2021 08:57:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AK8vNBh003736; Sat, 20 Nov 2021 08:57:23 GMT (envelope-from git) Date: Sat, 20 Nov 2021 08:57:23 GMT Message-Id: <202111200857.1AK8vNBh003736@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: 0c54fe172ad3 - main - rc.d/rctl: unbreak for distinct /usr filesystem List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c54fe172ad365e7e60d6249484a7579c18b7d2d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=0c54fe172ad365e7e60d6249484a7579c18b7d2d commit 0c54fe172ad365e7e60d6249484a7579c18b7d2d Author: Eugene Grosbein AuthorDate: 2021-11-20 08:54:39 +0000 Commit: Eugene Grosbein CommitDate: 2021-11-20 08:56:43 +0000 rc.d/rctl: unbreak for distinct /usr filesystem Both rctl and used xargs utility live in /usr/bin so add REQUIRE: FILESYSTEMS Reported by: Peter MFC after: 3 days --- libexec/rc/rc.d/rctl | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rc/rc.d/rctl b/libexec/rc/rc.d/rctl index ed5665454dde..f1b001a6ad79 100755 --- a/libexec/rc/rc.d/rctl +++ b/libexec/rc/rc.d/rctl @@ -4,6 +4,7 @@ # # PROVIDE: rctl +# REQUIRE: FILESYSTEMS # BEFORE: LOGIN # KEYWORD: nojail From nobody Sat Nov 20 15:58:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 145721899551; Sat, 20 Nov 2021 15:58: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 4HxJ8v6gk0z4p8b; Sat, 20 Nov 2021 15:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B53471E9AD; Sat, 20 Nov 2021 15:58: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 1AKFw7NO063267; Sat, 20 Nov 2021 15:58:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKFw7Ax063266; Sat, 20 Nov 2021 15:58:07 GMT (envelope-from git) Date: Sat, 20 Nov 2021 15:58:07 GMT Message-Id: <202111201558.1AKFw7Ax063266@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 87c8d2853971 - stable/13 - nfscl: Fix NFSv4.1/4.2 pnfs mounts using nconnect List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 87c8d2853971cb69845b230f530e82702f1e19ef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=87c8d2853971cb69845b230f530e82702f1e19ef commit 87c8d2853971cb69845b230f530e82702f1e19ef Author: Rick Macklem AuthorDate: 2021-11-05 00:06:34 +0000 Commit: Rick Macklem CommitDate: 2021-11-20 15:54:38 +0000 nfscl: Fix NFSv4.1/4.2 pnfs mounts using nconnect When a mount with the "pnfs" and "nconnect" options specified does an I/O operation, it erroneously uses a TCP connection to the MDS when it is meant to be a DS operation and, as such, needs to use a TCP connection to the DS. This patch fixes this. When the "pnfs" and "nconnect" options are specified for a NFSv4.1/4.2 mount, there probably should be N connections established to each DS for I/O RPCs. This is a fair amount of work and may be done in a future commit. This problem was found during a recent IETF NFSv4 working group testing event. (cherry picked from commit 80e5955b085af20e65ef84066a164936413748e3) --- sys/fs/nfs/nfs_commonkrpc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 358d77fe5b30..c1a5fab2a358 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -639,8 +639,17 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp, if (nrp->nr_client == NULL) newnfs_connect(nmp, nrp, cred, td, 0, false, &nrp->nr_client); + /* + * If the "nconnect" mount option was specified and this RPC is + * one that can have a large RPC message and is being done through + * the NFS/MDS server, use an additional connection. (When the RPC is + * being done through the server/MDS, nrp == &nmp->nm_sockreq.) + * The "nconnect" mount option normally has minimal effect when the + * "pnfs" mount option is specified, since only Readdir RPCs are + * normally done through the NFS/MDS server. + */ nextconn_set = false; - if (nmp != NULL && nmp->nm_aconnect > 0 && + if (nmp != NULL && nmp->nm_aconnect > 0 && nrp == &nmp->nm_sockreq && (nd->nd_procnum == NFSPROC_READ || nd->nd_procnum == NFSPROC_READDIR || nd->nd_procnum == NFSPROC_READDIRPLUS || From nobody Sat Nov 20 16:36:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 15630188D0B1; Sat, 20 Nov 2021 16:36: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 4HxK1X06ZVz3Ghc; Sat, 20 Nov 2021 16:36:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D40761F16A; Sat, 20 Nov 2021 16:36: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 1AKGalpI016792; Sat, 20 Nov 2021 16:36:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKGalc6016791; Sat, 20 Nov 2021 16:36:47 GMT (envelope-from git) Date: Sat, 20 Nov 2021 16:36:47 GMT Message-Id: <202111201636.1AKGalc6016791@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: 705a6ee2b611 - main - zfs: Fix a deadlock between page busy and the teardown lock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 705a6ee2b6112c3a653b2bd68f961a8b5b8071a4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=705a6ee2b6112c3a653b2bd68f961a8b5b8071a4 commit 705a6ee2b6112c3a653b2bd68f961a8b5b8071a4 Author: Mark Johnston AuthorDate: 2021-11-20 16:21:25 +0000 Commit: Mark Johnston CommitDate: 2021-11-20 16:21:25 +0000 zfs: Fix a deadlock between page busy and the teardown lock When rolling back a dataset, ZFS has to purge file data resident in the system page cache. To do this, it loops over all vnodes for the mountpoint and calls vn_pages_remove() to purge pages associated with the vnode's VM object. Each page is thus exclusively busied while the dataset's teardown write lock is held. When handling a page fault on a mapped ZFS file, FreeBSD's page fault handler busies newly allocated pages and then uses VOP_GETPAGES to fill them. The ZFS getpages VOP acquires the teardown read lock with vnode pages already busied. This represents a lock order reversal which can lead to deadlock. To break the deadlock, observe that zfs_rezget() need only purge those pages marked valid, and that pages busied by the page fault handler are, by definition, invalid. Furthermore, ZFS pages always transition from invalid to valid with the teardown lock held, and ZFS never creates partially valid pages. Thus, zfs_rezget() can use the new vn_pages_remove_valid() to skip over pages busied by the fault handler. PR: 258208 Tested by: pho Reviewed by: avg, sef, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32931 --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c index 4a37ac9235dc..fd51668d2bea 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c @@ -1079,9 +1079,18 @@ zfs_rezget(znode_t *zp) * the vnode in case of error, but currently we cannot do that * because of the LOR between the vnode lock and z_teardown_lock. * So, instead, we have to "doom" the znode in the illumos style. + * + * Ignore invalid pages during the scan. This is to avoid deadlocks + * between page busying and the teardown lock, as pages are busied prior + * to a VOP_GETPAGES operation, which acquires the teardown read lock. + * Such pages will be invalid and can safely be skipped here. */ vp = ZTOV(zp); +#if __FreeBSD_version >= 1400042 + vn_pages_remove_valid(vp, 0, 0); +#else vn_pages_remove(vp, 0, 0); +#endif ZFS_OBJ_HOLD_ENTER(zfsvfs, obj_num); From nobody Sat Nov 20 16:37:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5760A188D2EA; Sat, 20 Nov 2021 16:37:49 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) (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 4HxK2h4QBbz3Gph; Sat, 20 Nov 2021 16:37:48 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qv1-xf2c.google.com with SMTP id gu12so9271002qvb.6; Sat, 20 Nov 2021 08:37:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=h50BEeSeNdcwaZXT2fj+RhtrJiAQRuVFhBNnxkI7WJg=; b=bDuHuc6oLALBN/I8LRrjztRuGXHo3267o7ebQV1h+5Jq/0tmWMU7yabpZQhsuKm7nS RTIaWnPBemegPibYdrUTNVXt5FA3t87Nu8YoP9XBvH8oG927mwr+lk3cgOK17zmxy1Fo 2pGS3pHTtAGu7t+75MvqE2ZuBFTfRerjk0YNOWKR/UQeOJS9Fcw+bZtvP7bdiNbRhLEt bF6aTh1DNmsqaoAtXXS6w61IHeGg/IsRClvQudtvdf0UXnvJVJ1yDackzTteUYYwiXL7 WK7kRWvEAPaxirWaky5nL6soRz+DHmp13OJr7uc/5fhmV+3X15j4HtINyheBu9pRQI9p 7Rog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=h50BEeSeNdcwaZXT2fj+RhtrJiAQRuVFhBNnxkI7WJg=; b=Fjct2usQt+hpe6YKJ0OjKd3u4yHgTDXWwgBbLq73xiJn8lN+2AdnfCqGt6zxqC6IYi ohRy8Cab2Q/JdT/9E9Na658TNWzOa81V/CGCwBxSO19lQdehFVQ/r7OTD65vmW7zakeQ qrN9rB0K5oi4X421cAezFbSIidIY+lhIqqiiuQ7VRmw9rQ0jjRio0PQn+tJZhfNzq2Mx w9ywgTxkZBzM5HVJdFs5c/OIUwIgY26spTFvRRCbYSPOFxzfqrQtDgZKOv+Tn++5DzfA TVWxKc7XgJ8PLfJuMAY4HOsLTHdwQIev8bxiysdcSQFEOhfR1wkLKLNUt9IqSVitgRZz LvHg== X-Gm-Message-State: AOAM531IPF+G4OfO/us5F3YHgP1BXvRZLoL7tFqlSPhl/KFMxxZhYN5e 1p7LA5a9PYmFlnXWfzynIEuW+5zXeyk= X-Google-Smtp-Source: ABdhPJxBD1YlOP+sfzZdxc5EPKdD+i5+Wop4qerVHYf+IMHaCfwWfahp+dskXfSk2h/69eKJ6paw6Q== X-Received: by 2002:a05:6214:c28:: with SMTP id a8mr83348561qvd.24.1637426267982; Sat, 20 Nov 2021 08:37:47 -0800 (PST) Received: from nuc ([142.126.186.191]) by smtp.gmail.com with ESMTPSA id w10sm1666089qtj.37.2021.11.20.08.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Nov 2021 08:37:47 -0800 (PST) Sender: Mark Johnston Date: Sat, 20 Nov 2021 11:37:45 -0500 From: Mark Johnston To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 705a6ee2b611 - main - zfs: Fix a deadlock between page busy and the teardown lock Message-ID: References: <202111201636.1AKGalc6016791@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: <202111201636.1AKGalc6016791@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4HxK2h4QBbz3Gph X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=bDuHuc6o; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::f2c as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-0.11 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; NEURAL_HAM_MEDIUM(-0.41)[-0.413]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_NOT_FQDN(0.50)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_SPAM_LONG(1.00)[1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2c:from]; NEURAL_HAM_SHORT(-0.99)[-0.993]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N On Sat, Nov 20, 2021 at 04:36:47PM +0000, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=705a6ee2b6112c3a653b2bd68f961a8b5b8071a4 > > commit 705a6ee2b6112c3a653b2bd68f961a8b5b8071a4 > Author: Mark Johnston > AuthorDate: 2021-11-20 16:21:25 +0000 > Commit: Mark Johnston > CommitDate: 2021-11-20 16:21:25 +0000 > > zfs: Fix a deadlock between page busy and the teardown lock > > When rolling back a dataset, ZFS has to purge file data resident in the > system page cache. To do this, it loops over all vnodes for the > mountpoint and calls vn_pages_remove() to purge pages associated with > the vnode's VM object. Each page is thus exclusively busied while the > dataset's teardown write lock is held. > > When handling a page fault on a mapped ZFS file, FreeBSD's page fault > handler busies newly allocated pages and then uses VOP_GETPAGES to fill > them. The ZFS getpages VOP acquires the teardown read lock with vnode > pages already busied. This represents a lock order reversal which can > lead to deadlock. > > To break the deadlock, observe that zfs_rezget() need only purge those > pages marked valid, and that pages busied by the page fault handler are, > by definition, invalid. Furthermore, ZFS pages always transition from > invalid to valid with the teardown lock held, and ZFS never creates > partially valid pages. Thus, zfs_rezget() can use the new > vn_pages_remove_valid() to skip over pages busied by the fault handler. I'll get this merged upstream once the new KPI is available in stable/13, but didn't see a reason to hold off committing directly. From nobody Sat Nov 20 17:07:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D9307189EE71; Sat, 20 Nov 2021 17:07: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 4HxKj35MZRz3jH0; Sat, 20 Nov 2021 17:07:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 986961FB03; Sat, 20 Nov 2021 17:07: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 1AKH7Z46057588; Sat, 20 Nov 2021 17:07:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKH7Z6k057587; Sat, 20 Nov 2021 17:07:35 GMT (envelope-from git) Date: Sat, 20 Nov 2021 17:07:35 GMT Message-Id: <202111201707.1AKH7Z6k057587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 3adc9c8c73a5 - main - Belatedly update contrib/llvm-project/FREEBSD-Xlist for llvm 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3adc9c8c73a5225a841e663822b329b8bb8e64b6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3adc9c8c73a5225a841e663822b329b8bb8e64b6 commit 3adc9c8c73a5225a841e663822b329b8bb8e64b6 Author: Dimitry Andric AuthorDate: 2021-11-20 17:06:36 +0000 Commit: Dimitry Andric CommitDate: 2021-11-20 17:06:36 +0000 Belatedly update contrib/llvm-project/FREEBSD-Xlist for llvm 13 MFC after: 2 weeks --- contrib/llvm-project/FREEBSD-Xlist | 284 +++++++++---------------------------- 1 file changed, 64 insertions(+), 220 deletions(-) diff --git a/contrib/llvm-project/FREEBSD-Xlist b/contrib/llvm-project/FREEBSD-Xlist index e7e549df44d5..83ef7e63ffec 100644 --- a/contrib/llvm-project/FREEBSD-Xlist +++ b/contrib/llvm-project/FREEBSD-Xlist @@ -1,13 +1,14 @@ -# $FreeBSD$ .arcconfig .arclint .clang-format .clang-tidy .git-blame-ignore-revs -.github +.github/ .gitignore +.mailmap CONTRIBUTING.md README.md +SECURITY.md clang/.clang-format clang/.clang-tidy clang/.gitignore @@ -33,6 +34,8 @@ clang/include/clang/Parse/CMakeLists.txt clang/include/clang/Sema/CMakeLists.txt clang/include/clang/Serialization/CMakeLists.txt clang/include/clang/StaticAnalyzer/Checkers/CMakeLists.txt +clang/include/clang/Tooling/Syntax/CMakeLists.txt +clang/lib/APINotes/CMakeLists.txt clang/lib/ARCMigrate/CMakeLists.txt clang/lib/AST/CMakeLists.txt clang/lib/ASTMatchers/CMakeLists.txt @@ -56,6 +59,8 @@ clang/lib/Frontend/Rewrite/CMakeLists.txt clang/lib/FrontendTool/CMakeLists.txt clang/lib/Headers/CMakeLists.txt clang/lib/Index/CMakeLists.txt +clang/lib/IndexSerialization/CMakeLists.txt +clang/lib/Interpreter/CMakeLists.txt clang/lib/Lex/CMakeLists.txt clang/lib/Parse/CMakeLists.txt clang/lib/Rewrite/CMakeLists.txt @@ -71,6 +76,8 @@ clang/lib/Tooling/ASTDiff/CMakeLists.txt clang/lib/Tooling/CMakeLists.txt clang/lib/Tooling/Core/CMakeLists.txt clang/lib/Tooling/DependencyScanning/CMakeLists.txt +clang/lib/Tooling/DumpTool/CMakeLists.txt +clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py clang/lib/Tooling/Inclusions/CMakeLists.txt clang/lib/Tooling/Refactoring/CMakeLists.txt clang/lib/Tooling/Syntax/CMakeLists.txt @@ -78,6 +85,8 @@ clang/lib/Tooling/Transformer/CMakeLists.txt clang/runtime/ clang/test/ clang/tools/CMakeLists.txt +clang/tools/amdgpu-arch/CMakeLists.txt +clang/tools/apinotes-test/ clang/tools/arcmt-test/ clang/tools/c-arcmt-test/ clang/tools/c-index-test/ @@ -100,6 +109,7 @@ clang/tools/clang-offload-bundler/ clang/tools/clang-offload-wrapper/ clang/tools/clang-refactor/ clang/tools/clang-rename/ +clang/tools/clang-repl/CMakeLists.txt clang/tools/clang-scan-deps/ clang/tools/clang-shlib/ clang/tools/diag-build/ @@ -133,6 +143,7 @@ clang/utils/find-unused-diagnostics.sh clang/utils/hmaptool/ clang/utils/make-ast-dump-check.sh clang/utils/modfuzz.py +clang/utils/module-deps-to-rsp.py clang/utils/perf-training/ clang/utils/token-delta.py clang/utils/valgrind/ @@ -175,14 +186,16 @@ compiler-rt/lib/interception/CMakeLists.txt compiler-rt/lib/interception/tests/ compiler-rt/lib/lsan/.clang-format compiler-rt/lib/lsan/CMakeLists.txt +compiler-rt/lib/memprof/CMakeLists.txt compiler-rt/lib/msan/.clang-format compiler-rt/lib/msan/CMakeLists.txt compiler-rt/lib/msan/tests/ +compiler-rt/lib/orc/CMakeLists.txt +compiler-rt/lib/orc/unittests/ compiler-rt/lib/profile/CMakeLists.txt compiler-rt/lib/safestack/.clang-format compiler-rt/lib/safestack/CMakeLists.txt compiler-rt/lib/sanitizer_common/.clang-format -compiler-rt/lib/sanitizer_common/.clang-tidy compiler-rt/lib/sanitizer_common/CMakeLists.txt compiler-rt/lib/sanitizer_common/scripts/ compiler-rt/lib/sanitizer_common/tests/ @@ -211,31 +224,28 @@ compiler-rt/tools/ compiler-rt/unittests/ compiler-rt/utils/ compiler-rt/www/ -debuginfo-tests/ +cross-project-tests/ flang/ libc/ libclc/ libcxx/.clang-format libcxx/.gitignore libcxx/CMakeLists.txt -libcxx/NOTES.TXT libcxx/TODO.TXT libcxx/appveyor-reqs-install.cmd libcxx/appveyor.yml libcxx/benchmarks/ libcxx/cmake/ libcxx/docs/ -libcxx/fuzzing/ libcxx/include/CMakeLists.txt libcxx/include/__config_site.in -libcxx/include/support/ +libcxx/include/__support/ libcxx/lib/ libcxx/src/CMakeLists.txt libcxx/src/support/solaris/ libcxx/src/support/win32/ libcxx/test/ libcxx/utils/ -libcxx/www/ libcxxabi/ libunwind/.clang-format libunwind/CMakeLists.txt @@ -268,6 +278,8 @@ lldb/.gitignore lldb/CMakeLists.txt lldb/CODE_OWNERS.txt lldb/bindings/CMakeLists.txt +lldb/bindings/lua/CMakeLists.txt +lldb/bindings/python/CMakeLists.txt lldb/cmake/ lldb/docs/.htaccess lldb/docs/CMakeLists.txt @@ -281,7 +293,6 @@ lldb/docs/lldb-gdb-remote.txt lldb/docs/lldb-platform-packets.txt lldb/docs/resources/ lldb/docs/status/ -lldb/docs/structured_data/ lldb/docs/testsuite/ lldb/docs/use/ lldb/examples/ @@ -315,6 +326,7 @@ lldb/source/Plugins/ABI/Mips/CMakeLists.txt lldb/source/Plugins/ABI/PowerPC/CMakeLists.txt lldb/source/Plugins/ABI/SystemZ/CMakeLists.txt lldb/source/Plugins/ABI/X86/CMakeLists.txt +lldb/source/Plugins/Architecture/AArch64/CMakeLists.txt lldb/source/Plugins/Architecture/Arm/CMakeLists.txt lldb/source/Plugins/Architecture/CMakeLists.txt lldb/source/Plugins/Architecture/Mips/CMakeLists.txt @@ -367,6 +379,7 @@ lldb/source/Plugins/ObjectFile/CMakeLists.txt lldb/source/Plugins/ObjectFile/ELF/CMakeLists.txt lldb/source/Plugins/ObjectFile/JIT/CMakeLists.txt lldb/source/Plugins/ObjectFile/Mach-O/ +lldb/source/Plugins/ObjectFile/PDB/CMakeLists.txt lldb/source/Plugins/ObjectFile/PECOFF/ lldb/source/Plugins/ObjectFile/wasm/CMakeLists.txt lldb/source/Plugins/OperatingSystem/CMakeLists.txt @@ -393,6 +406,7 @@ lldb/source/Plugins/Process/elf-core/CMakeLists.txt lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt lldb/source/Plugins/Process/mach-core/ lldb/source/Plugins/Process/minidump/CMakeLists.txt +lldb/source/Plugins/Process/scripted/CMakeLists.txt lldb/source/Plugins/ScriptInterpreter/CMakeLists.txt lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt lldb/source/Plugins/ScriptInterpreter/None/CMakeLists.txt @@ -410,6 +424,11 @@ lldb/source/Plugins/SymbolVendor/ELF/CMakeLists.txt lldb/source/Plugins/SymbolVendor/MacOSX/ lldb/source/Plugins/SymbolVendor/wasm/CMakeLists.txt lldb/source/Plugins/SystemRuntime/ +lldb/source/Plugins/Trace/CMakeLists.txt +lldb/source/Plugins/Trace/common/CMakeLists.txt +lldb/source/Plugins/Trace/intel-pt/CMakeLists.txt +lldb/source/Plugins/TraceExporter/CMakeLists.txt +lldb/source/Plugins/TraceExporter/ctf/CMakeLists.txt lldb/source/Plugins/TypeSystem/CMakeLists.txt lldb/source/Plugins/TypeSystem/Clang/CMakeLists.txt lldb/source/Plugins/UnwindAssembly/CMakeLists.txt @@ -429,7 +448,6 @@ lldb/tools/driver/CMakeLists.txt lldb/tools/driver/lldb-Info.plist.in lldb/tools/intel-features/ lldb/tools/lldb-instr/CMakeLists.txt -lldb/tools/lldb-perf/ lldb/tools/lldb-server/CMakeLists.txt lldb/tools/lldb-test/ lldb/tools/lldb-vscode/ @@ -441,7 +459,6 @@ lldb/utils/lit-cpuid/ lldb/utils/lldb-dotest/ lldb/utils/lldb-repro/ lldb/utils/lui/ -lldb/utils/test/ llvm/.clang-format llvm/.clang-tidy llvm/.gitattributes @@ -449,7 +466,6 @@ llvm/.gitignore llvm/CMakeLists.txt llvm/CODE_OWNERS.TXT llvm/CREDITS.TXT -llvm/LLVMBuild.txt llvm/README.txt llvm/RELEASE_TESTERS.TXT llvm/benchmarks/ @@ -467,412 +483,240 @@ llvm/include/llvm/IR/CMakeLists.txt llvm/include/llvm/Support/CMakeLists.txt llvm/include/llvm/Support/LICENSE.TXT llvm/lib/Analysis/CMakeLists.txt -llvm/lib/Analysis/LLVMBuild.txt llvm/lib/Analysis/README.txt +llvm/lib/Analysis/models/ llvm/lib/AsmParser/CMakeLists.txt -llvm/lib/AsmParser/LLVMBuild.txt llvm/lib/BinaryFormat/CMakeLists.txt -llvm/lib/BinaryFormat/LLVMBuild.txt llvm/lib/Bitcode/CMakeLists.txt -llvm/lib/Bitcode/LLVMBuild.txt llvm/lib/Bitcode/Reader/CMakeLists.txt -llvm/lib/Bitcode/Reader/LLVMBuild.txt llvm/lib/Bitcode/Writer/CMakeLists.txt -llvm/lib/Bitcode/Writer/LLVMBuild.txt llvm/lib/Bitstream/CMakeLists.txt -llvm/lib/Bitstream/LLVMBuild.txt llvm/lib/Bitstream/Reader/CMakeLists.txt -llvm/lib/Bitstream/Reader/LLVMBuild.txt llvm/lib/CMakeLists.txt llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt -llvm/lib/CodeGen/AsmPrinter/LLVMBuild.txt llvm/lib/CodeGen/CMakeLists.txt llvm/lib/CodeGen/GlobalISel/CMakeLists.txt -llvm/lib/CodeGen/GlobalISel/LLVMBuild.txt -llvm/lib/CodeGen/LLVMBuild.txt llvm/lib/CodeGen/MIRParser/CMakeLists.txt -llvm/lib/CodeGen/MIRParser/LLVMBuild.txt llvm/lib/CodeGen/README.txt llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt -llvm/lib/CodeGen/SelectionDAG/LLVMBuild.txt llvm/lib/DWARFLinker/CMakeLists.txt -llvm/lib/DWARFLinker/LLVMBuild.txt +llvm/lib/DWP/CMakeLists.txt llvm/lib/DebugInfo/CMakeLists.txt llvm/lib/DebugInfo/CodeView/CMakeLists.txt -llvm/lib/DebugInfo/CodeView/LLVMBuild.txt llvm/lib/DebugInfo/DWARF/CMakeLists.txt -llvm/lib/DebugInfo/DWARF/LLVMBuild.txt llvm/lib/DebugInfo/GSYM/CMakeLists.txt -llvm/lib/DebugInfo/GSYM/LLVMBuild.txt -llvm/lib/DebugInfo/LLVMBuild.txt llvm/lib/DebugInfo/MSF/CMakeLists.txt -llvm/lib/DebugInfo/MSF/LLVMBuild.txt llvm/lib/DebugInfo/PDB/CMakeLists.txt -llvm/lib/DebugInfo/PDB/LLVMBuild.txt llvm/lib/DebugInfo/Symbolize/CMakeLists.txt -llvm/lib/DebugInfo/Symbolize/LLVMBuild.txt llvm/lib/Demangle/CMakeLists.txt -llvm/lib/Demangle/LLVMBuild.txt llvm/lib/ExecutionEngine/CMakeLists.txt llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt -llvm/lib/ExecutionEngine/IntelJITEvents/LLVMBuild.txt llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt -llvm/lib/ExecutionEngine/Interpreter/LLVMBuild.txt llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt -llvm/lib/ExecutionEngine/JITLink/LLVMBuild.txt -llvm/lib/ExecutionEngine/LLVMBuild.txt llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt -llvm/lib/ExecutionEngine/MCJIT/LLVMBuild.txt llvm/lib/ExecutionEngine/OProfileJIT/CMakeLists.txt -llvm/lib/ExecutionEngine/OProfileJIT/LLVMBuild.txt llvm/lib/ExecutionEngine/Orc/CMakeLists.txt -llvm/lib/ExecutionEngine/Orc/LLVMBuild.txt -llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt -llvm/lib/ExecutionEngine/OrcError/LLVMBuild.txt +llvm/lib/ExecutionEngine/Orc/Shared/CMakeLists.txt +llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt -llvm/lib/ExecutionEngine/PerfJITEvents/LLVMBuild.txt llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt -llvm/lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt llvm/lib/Extensions/ +llvm/lib/FileCheck/CMakeLists.txt llvm/lib/Frontend/CMakeLists.txt -llvm/lib/Frontend/LLVMBuild.txt llvm/lib/Frontend/OpenACC/CMakeLists.txt llvm/lib/Frontend/OpenMP/CMakeLists.txt -llvm/lib/Frontend/OpenMP/LLVMBuild.txt llvm/lib/FuzzMutate/CMakeLists.txt -llvm/lib/FuzzMutate/LLVMBuild.txt llvm/lib/Fuzzer/ llvm/lib/IR/CMakeLists.txt -llvm/lib/IR/LLVMBuild.txt llvm/lib/IRReader/CMakeLists.txt -llvm/lib/IRReader/LLVMBuild.txt -llvm/lib/LLVMBuild.txt +llvm/lib/InterfaceStub/CMakeLists.txt llvm/lib/LTO/CMakeLists.txt -llvm/lib/LTO/LLVMBuild.txt llvm/lib/LineEditor/CMakeLists.txt -llvm/lib/LineEditor/LLVMBuild.txt llvm/lib/Linker/CMakeLists.txt -llvm/lib/Linker/LLVMBuild.txt llvm/lib/MC/CMakeLists.txt -llvm/lib/MC/LLVMBuild.txt llvm/lib/MC/MCDisassembler/CMakeLists.txt -llvm/lib/MC/MCDisassembler/LLVMBuild.txt llvm/lib/MC/MCParser/CMakeLists.txt -llvm/lib/MC/MCParser/LLVMBuild.txt llvm/lib/MCA/CMakeLists.txt -llvm/lib/MCA/LLVMBuild.txt llvm/lib/Object/CMakeLists.txt -llvm/lib/Object/LLVMBuild.txt llvm/lib/ObjectYAML/CMakeLists.txt -llvm/lib/ObjectYAML/LLVMBuild.txt llvm/lib/Option/CMakeLists.txt -llvm/lib/Option/LLVMBuild.txt llvm/lib/Passes/CMakeLists.txt -llvm/lib/Passes/LLVMBuild.txt llvm/lib/ProfileData/CMakeLists.txt llvm/lib/ProfileData/Coverage/CMakeLists.txt -llvm/lib/ProfileData/Coverage/LLVMBuild.txt -llvm/lib/ProfileData/LLVMBuild.txt llvm/lib/Remarks/CMakeLists.txt -llvm/lib/Remarks/LLVMBuild.txt llvm/lib/Support/CMakeLists.txt -llvm/lib/Support/LLVMBuild.txt llvm/lib/TableGen/CMakeLists.txt -llvm/lib/TableGen/LLVMBuild.txt llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt -llvm/lib/Target/AArch64/AsmParser/LLVMBuild.txt llvm/lib/Target/AArch64/CMakeLists.txt llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt -llvm/lib/Target/AArch64/Disassembler/LLVMBuild.txt -llvm/lib/Target/AArch64/LLVMBuild.txt llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/AArch64/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt -llvm/lib/Target/AArch64/TargetInfo/LLVMBuild.txt llvm/lib/Target/AArch64/Utils/CMakeLists.txt -llvm/lib/Target/AArch64/Utils/LLVMBuild.txt llvm/lib/Target/AMDGPU/AsmParser/CMakeLists.txt -llvm/lib/Target/AMDGPU/AsmParser/LLVMBuild.txt llvm/lib/Target/AMDGPU/CMakeLists.txt llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt -llvm/lib/Target/AMDGPU/Disassembler/LLVMBuild.txt -llvm/lib/Target/AMDGPU/LLVMBuild.txt llvm/lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/AMDGPU/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/AMDGPU/TargetInfo/CMakeLists.txt -llvm/lib/Target/AMDGPU/TargetInfo/LLVMBuild.txt llvm/lib/Target/AMDGPU/Utils/CMakeLists.txt -llvm/lib/Target/AMDGPU/Utils/LLVMBuild.txt llvm/lib/Target/ARC/CMakeLists.txt llvm/lib/Target/ARC/Disassembler/CMakeLists.txt -llvm/lib/Target/ARC/Disassembler/LLVMBuild.txt -llvm/lib/Target/ARC/LLVMBuild.txt llvm/lib/Target/ARC/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/ARC/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/ARC/TargetInfo/CMakeLists.txt -llvm/lib/Target/ARC/TargetInfo/LLVMBuild.txt llvm/lib/Target/ARM/AsmParser/CMakeLists.txt -llvm/lib/Target/ARM/AsmParser/LLVMBuild.txt llvm/lib/Target/ARM/CMakeLists.txt llvm/lib/Target/ARM/Disassembler/CMakeLists.txt -llvm/lib/Target/ARM/Disassembler/LLVMBuild.txt -llvm/lib/Target/ARM/LLVMBuild.txt llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/ARM/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/ARM/README-Thumb.txt llvm/lib/Target/ARM/README-Thumb2.txt llvm/lib/Target/ARM/README.txt llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt -llvm/lib/Target/ARM/TargetInfo/LLVMBuild.txt llvm/lib/Target/ARM/Utils/CMakeLists.txt -llvm/lib/Target/ARM/Utils/LLVMBuild.txt llvm/lib/Target/AVR/AsmParser/CMakeLists.txt -llvm/lib/Target/AVR/AsmParser/LLVMBuild.txt llvm/lib/Target/AVR/CMakeLists.txt llvm/lib/Target/AVR/Disassembler/CMakeLists.txt -llvm/lib/Target/AVR/Disassembler/LLVMBuild.txt -llvm/lib/Target/AVR/LLVMBuild.txt llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/AVR/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/AVR/TargetInfo/CMakeLists.txt -llvm/lib/Target/AVR/TargetInfo/LLVMBuild.txt llvm/lib/Target/BPF/AsmParser/CMakeLists.txt -llvm/lib/Target/BPF/AsmParser/LLVMBuild.txt llvm/lib/Target/BPF/CMakeLists.txt llvm/lib/Target/BPF/Disassembler/CMakeLists.txt -llvm/lib/Target/BPF/Disassembler/LLVMBuild.txt -llvm/lib/Target/BPF/LLVMBuild.txt llvm/lib/Target/BPF/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/BPF/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/BPF/TargetInfo/CMakeLists.txt -llvm/lib/Target/BPF/TargetInfo/LLVMBuild.txt llvm/lib/Target/CMakeLists.txt +llvm/lib/Target/CSKY/AsmParser/CMakeLists.txt +llvm/lib/Target/CSKY/CMakeLists.txt +llvm/lib/Target/CSKY/MCTargetDesc/CMakeLists.txt +llvm/lib/Target/CSKY/TargetInfo/CMakeLists.txt llvm/lib/Target/Hexagon/AsmParser/CMakeLists.txt -llvm/lib/Target/Hexagon/AsmParser/LLVMBuild.txt llvm/lib/Target/Hexagon/CMakeLists.txt llvm/lib/Target/Hexagon/Disassembler/CMakeLists.txt -llvm/lib/Target/Hexagon/Disassembler/LLVMBuild.txt -llvm/lib/Target/Hexagon/LLVMBuild.txt llvm/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/Hexagon/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/Hexagon/TargetInfo/CMakeLists.txt -llvm/lib/Target/Hexagon/TargetInfo/LLVMBuild.txt -llvm/lib/Target/LLVMBuild.txt llvm/lib/Target/Lanai/AsmParser/CMakeLists.txt -llvm/lib/Target/Lanai/AsmParser/LLVMBuild.txt llvm/lib/Target/Lanai/CMakeLists.txt llvm/lib/Target/Lanai/Disassembler/CMakeLists.txt -llvm/lib/Target/Lanai/Disassembler/LLVMBuild.txt -llvm/lib/Target/Lanai/LLVMBuild.txt llvm/lib/Target/Lanai/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/Lanai/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/Lanai/TargetInfo/CMakeLists.txt -llvm/lib/Target/Lanai/TargetInfo/LLVMBuild.txt +llvm/lib/Target/M68k/AsmParser/CMakeLists.txt +llvm/lib/Target/M68k/CMakeLists.txt +llvm/lib/Target/M68k/Disassembler/CMakeLists.txt +llvm/lib/Target/M68k/MCTargetDesc/CMakeLists.txt +llvm/lib/Target/M68k/TargetInfo/CMakeLists.txt llvm/lib/Target/MSP430/AsmParser/CMakeLists.txt -llvm/lib/Target/MSP430/AsmParser/LLVMBuild.txt llvm/lib/Target/MSP430/CMakeLists.txt llvm/lib/Target/MSP430/Disassembler/CMakeLists.txt -llvm/lib/Target/MSP430/Disassembler/LLVMBuild.txt -llvm/lib/Target/MSP430/LLVMBuild.txt llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/MSP430/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/MSP430/README.txt llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt -llvm/lib/Target/MSP430/TargetInfo/LLVMBuild.txt llvm/lib/Target/Mips/AsmParser/CMakeLists.txt -llvm/lib/Target/Mips/AsmParser/LLVMBuild.txt llvm/lib/Target/Mips/CMakeLists.txt llvm/lib/Target/Mips/Disassembler/CMakeLists.txt -llvm/lib/Target/Mips/Disassembler/LLVMBuild.txt -llvm/lib/Target/Mips/LLVMBuild.txt llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/Mips/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt -llvm/lib/Target/Mips/TargetInfo/LLVMBuild.txt llvm/lib/Target/NVPTX/CMakeLists.txt -llvm/lib/Target/NVPTX/LLVMBuild.txt llvm/lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/NVPTX/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/NVPTX/TargetInfo/CMakeLists.txt -llvm/lib/Target/NVPTX/TargetInfo/LLVMBuild.txt llvm/lib/Target/PowerPC/AsmParser/CMakeLists.txt -llvm/lib/Target/PowerPC/AsmParser/LLVMBuild.txt llvm/lib/Target/PowerPC/CMakeLists.txt llvm/lib/Target/PowerPC/Disassembler/CMakeLists.txt -llvm/lib/Target/PowerPC/Disassembler/LLVMBuild.txt -llvm/lib/Target/PowerPC/LLVMBuild.txt llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/PowerPC/README.txt llvm/lib/Target/PowerPC/README_ALTIVEC.txt llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt -llvm/lib/Target/PowerPC/TargetInfo/LLVMBuild.txt llvm/lib/Target/README.txt llvm/lib/Target/RISCV/AsmParser/CMakeLists.txt -llvm/lib/Target/RISCV/AsmParser/LLVMBuild.txt llvm/lib/Target/RISCV/CMakeLists.txt llvm/lib/Target/RISCV/Disassembler/CMakeLists.txt -llvm/lib/Target/RISCV/Disassembler/LLVMBuild.txt -llvm/lib/Target/RISCV/LLVMBuild.txt llvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/RISCV/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/RISCV/TargetInfo/CMakeLists.txt -llvm/lib/Target/RISCV/TargetInfo/LLVMBuild.txt -llvm/lib/Target/RISCV/Utils/CMakeLists.txt -llvm/lib/Target/RISCV/Utils/LLVMBuild.txt llvm/lib/Target/Sparc/AsmParser/CMakeLists.txt -llvm/lib/Target/Sparc/AsmParser/LLVMBuild.txt llvm/lib/Target/Sparc/CMakeLists.txt llvm/lib/Target/Sparc/Disassembler/CMakeLists.txt -llvm/lib/Target/Sparc/Disassembler/LLVMBuild.txt -llvm/lib/Target/Sparc/LLVMBuild.txt llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/Sparc/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/Sparc/README.txt llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt -llvm/lib/Target/Sparc/TargetInfo/LLVMBuild.txt llvm/lib/Target/SystemZ/AsmParser/CMakeLists.txt -llvm/lib/Target/SystemZ/AsmParser/LLVMBuild.txt llvm/lib/Target/SystemZ/CMakeLists.txt llvm/lib/Target/SystemZ/Disassembler/CMakeLists.txt -llvm/lib/Target/SystemZ/Disassembler/LLVMBuild.txt -llvm/lib/Target/SystemZ/LLVMBuild.txt llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/SystemZ/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt -llvm/lib/Target/SystemZ/TargetInfo/LLVMBuild.txt llvm/lib/Target/VE/AsmParser/CMakeLists.txt -llvm/lib/Target/VE/AsmParser/LLVMBuild.txt llvm/lib/Target/VE/CMakeLists.txt llvm/lib/Target/VE/Disassembler/CMakeLists.txt -llvm/lib/Target/VE/Disassembler/LLVMBuild.txt -llvm/lib/Target/VE/LLVMBuild.txt llvm/lib/Target/VE/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/VE/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/VE/TargetInfo/CMakeLists.txt -llvm/lib/Target/VE/TargetInfo/LLVMBuild.txt llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt -llvm/lib/Target/WebAssembly/AsmParser/LLVMBuild.txt llvm/lib/Target/WebAssembly/CMakeLists.txt llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt -llvm/lib/Target/WebAssembly/Disassembler/LLVMBuild.txt -llvm/lib/Target/WebAssembly/LLVMBuild.txt llvm/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/WebAssembly/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/WebAssembly/TargetInfo/CMakeLists.txt -llvm/lib/Target/WebAssembly/TargetInfo/LLVMBuild.txt +llvm/lib/Target/WebAssembly/Utils/CMakeLists.txt llvm/lib/Target/X86/AsmParser/CMakeLists.txt -llvm/lib/Target/X86/AsmParser/LLVMBuild.txt llvm/lib/Target/X86/CMakeLists.txt llvm/lib/Target/X86/Disassembler/CMakeLists.txt -llvm/lib/Target/X86/Disassembler/LLVMBuild.txt -llvm/lib/Target/X86/LLVMBuild.txt llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/X86/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/X86/README-FPStack.txt llvm/lib/Target/X86/README-SSE.txt llvm/lib/Target/X86/README-X86-64.txt llvm/lib/Target/X86/README.txt llvm/lib/Target/X86/TargetInfo/CMakeLists.txt -llvm/lib/Target/X86/TargetInfo/LLVMBuild.txt llvm/lib/Target/XCore/CMakeLists.txt llvm/lib/Target/XCore/Disassembler/CMakeLists.txt -llvm/lib/Target/XCore/Disassembler/LLVMBuild.txt -llvm/lib/Target/XCore/LLVMBuild.txt llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt -llvm/lib/Target/XCore/MCTargetDesc/LLVMBuild.txt llvm/lib/Target/XCore/README.txt llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt -llvm/lib/Target/XCore/TargetInfo/LLVMBuild.txt llvm/lib/Testing/CMakeLists.txt -llvm/lib/Testing/LLVMBuild.txt llvm/lib/Testing/Support/CMakeLists.txt -llvm/lib/Testing/Support/LLVMBuild.txt llvm/lib/TextAPI/CMakeLists.txt -llvm/lib/TextAPI/LLVMBuild.txt llvm/lib/ToolDrivers/CMakeLists.txt -llvm/lib/ToolDrivers/LLVMBuild.txt llvm/lib/ToolDrivers/llvm-dlltool/CMakeLists.txt -llvm/lib/ToolDrivers/llvm-dlltool/LLVMBuild.txt llvm/lib/ToolDrivers/llvm-lib/CMakeLists.txt -llvm/lib/ToolDrivers/llvm-lib/LLVMBuild.txt llvm/lib/Transforms/AggressiveInstCombine/CMakeLists.txt -llvm/lib/Transforms/AggressiveInstCombine/LLVMBuild.txt llvm/lib/Transforms/CFGuard/CMakeLists.txt -llvm/lib/Transforms/CFGuard/LLVMBuild.txt llvm/lib/Transforms/CMakeLists.txt llvm/lib/Transforms/Coroutines/CMakeLists.txt -llvm/lib/Transforms/Coroutines/LLVMBuild.txt llvm/lib/Transforms/Hello/ llvm/lib/Transforms/IPO/CMakeLists.txt -llvm/lib/Transforms/IPO/LLVMBuild.txt llvm/lib/Transforms/InstCombine/CMakeLists.txt -llvm/lib/Transforms/InstCombine/LLVMBuild.txt llvm/lib/Transforms/Instrumentation/CMakeLists.txt -llvm/lib/Transforms/Instrumentation/LLVMBuild.txt -llvm/lib/Transforms/LLVMBuild.txt llvm/lib/Transforms/ObjCARC/CMakeLists.txt -llvm/lib/Transforms/ObjCARC/LLVMBuild.txt llvm/lib/Transforms/Scalar/CMakeLists.txt -llvm/lib/Transforms/Scalar/LLVMBuild.txt llvm/lib/Transforms/Utils/CMakeLists.txt -llvm/lib/Transforms/Utils/LLVMBuild.txt llvm/lib/Transforms/Vectorize/CMakeLists.txt -llvm/lib/Transforms/Vectorize/LLVMBuild.txt llvm/lib/WindowsManifest/CMakeLists.txt -llvm/lib/WindowsManifest/LLVMBuild.txt llvm/lib/XRay/CMakeLists.txt -llvm/lib/XRay/LLVMBuild.txt llvm/llvm.spec.in llvm/projects/ llvm/resources/ llvm/runtimes/ llvm/test/ llvm/tools/CMakeLists.txt -llvm/tools/LLVMBuild.txt llvm/tools/bugpoint/CMakeLists.txt -llvm/tools/bugpoint/LLVMBuild.txt llvm/tools/bugpoint-passes/ llvm/tools/dsymutil/ llvm/tools/gold/ llvm/tools/llc/CMakeLists.txt -llvm/tools/llc/LLVMBuild.txt llvm/tools/lli/CMakeLists.txt llvm/tools/lli/ChildTarget/CMakeLists.txt -llvm/tools/lli/ChildTarget/LLVMBuild.txt -llvm/tools/lli/LLVMBuild.txt llvm/tools/llvm-ar/CMakeLists.txt -llvm/tools/llvm-ar/LLVMBuild.txt llvm/tools/llvm-as/CMakeLists.txt -llvm/tools/llvm-as/LLVMBuild.txt llvm/tools/llvm-as-fuzzer/ llvm/tools/llvm-bcanalyzer/CMakeLists.txt -llvm/tools/llvm-bcanalyzer/LLVMBuild.txt llvm/tools/llvm-c-test/ llvm/tools/llvm-cat/ llvm/tools/llvm-cfi-verify/ llvm/tools/llvm-config/ llvm/tools/llvm-cov/CMakeLists.txt -llvm/tools/llvm-cov/LLVMBuild.txt llvm/tools/llvm-cvtres/ llvm/tools/llvm-cxxdump/CMakeLists.txt -llvm/tools/llvm-cxxdump/LLVMBuild.txt llvm/tools/llvm-cxxfilt/CMakeLists.txt llvm/tools/llvm-cxxmap/CMakeLists.txt -llvm/tools/llvm-cxxmap/LLVMBuild.txt llvm/tools/llvm-diff/CMakeLists.txt -llvm/tools/llvm-diff/LLVMBuild.txt llvm/tools/llvm-dis/CMakeLists.txt -llvm/tools/llvm-dis/LLVMBuild.txt llvm/tools/llvm-dwarfdump/CMakeLists.txt -llvm/tools/llvm-dwarfdump/LLVMBuild.txt llvm/tools/llvm-dwarfdump/fuzzer/ llvm/tools/llvm-dwp/CMakeLists.txt -llvm/tools/llvm-dwp/LLVMBuild.txt -llvm/tools/llvm-elfabi/ llvm/tools/llvm-exegesis/ llvm/tools/llvm-extract/CMakeLists.txt -llvm/tools/llvm-extract/LLVMBuild.txt llvm/tools/llvm-go/ llvm/tools/llvm-gsymutil/ llvm/tools/llvm-ifs/ @@ -880,64 +724,56 @@ llvm/tools/llvm-isel-fuzzer/ llvm/tools/llvm-itanium-demangle-fuzzer/ llvm/tools/llvm-jitlink/ llvm/tools/llvm-jitlistener/ +llvm/tools/llvm-libtool-darwin/ llvm/tools/llvm-link/CMakeLists.txt -llvm/tools/llvm-link/LLVMBuild.txt llvm/tools/llvm-lipo/ llvm/tools/llvm-lto/CMakeLists.txt -llvm/tools/llvm-lto/LLVMBuild.txt llvm/tools/llvm-lto2/CMakeLists.txt -llvm/tools/llvm-lto2/LLVMBuild.txt llvm/tools/llvm-mc/CMakeLists.txt -llvm/tools/llvm-mc/LLVMBuild.txt llvm/tools/llvm-mc-assemble-fuzzer/ llvm/tools/llvm-mc-disassemble-fuzzer/ llvm/tools/llvm-mca/CMakeLists.txt -llvm/tools/llvm-mca/LLVMBuild.txt +llvm/tools/llvm-mca/lib/AMDGPU/CMakeLists.txt +llvm/tools/llvm-mca/lib/CMakeLists.txt llvm/tools/llvm-microsoft-demangle-fuzzer/ llvm/tools/llvm-ml/ llvm/tools/llvm-modextract/CMakeLists.txt -llvm/tools/llvm-modextract/LLVMBuild.txt llvm/tools/llvm-mt/ llvm/tools/llvm-nm/CMakeLists.txt -llvm/tools/llvm-nm/LLVMBuild.txt llvm/tools/llvm-objcopy/CMakeLists.txt -llvm/tools/llvm-objcopy/LLVMBuild.txt llvm/tools/llvm-objdump/CMakeLists.txt -llvm/tools/llvm-objdump/LLVMBuild.txt llvm/tools/llvm-opt-fuzzer/ llvm/tools/llvm-opt-report/ llvm/tools/llvm-pdbutil/CMakeLists.txt -llvm/tools/llvm-pdbutil/LLVMBuild.txt llvm/tools/llvm-profdata/CMakeLists.txt -llvm/tools/llvm-profdata/LLVMBuild.txt +llvm/tools/llvm-profgen/ llvm/tools/llvm-rc/ llvm/tools/llvm-readobj/CMakeLists.txt -llvm/tools/llvm-readobj/LLVMBuild.txt llvm/tools/llvm-reduce/ llvm/tools/llvm-rtdyld/CMakeLists.txt -llvm/tools/llvm-rtdyld/LLVMBuild.txt +llvm/tools/llvm-rust-demangle-fuzzer/ llvm/tools/llvm-shlib/ +llvm/tools/llvm-sim/CMakeLists.txt llvm/tools/llvm-size/CMakeLists.txt -llvm/tools/llvm-size/LLVMBuild.txt llvm/tools/llvm-special-case-list-fuzzer/ llvm/tools/llvm-split/ llvm/tools/llvm-stress/CMakeLists.txt -llvm/tools/llvm-stress/LLVMBuild.txt llvm/tools/llvm-strings/CMakeLists.txt -llvm/tools/llvm-strings/LLVMBuild.txt llvm/tools/llvm-symbolizer/CMakeLists.txt +llvm/tools/llvm-tapi-diff/CMakeLists.txt llvm/tools/llvm-undname/ llvm/tools/llvm-xray/CMakeLists.txt llvm/tools/llvm-yaml-numeric-parser-fuzzer/ +llvm/tools/llvm-yaml-parser-fuzzer/ llvm/tools/lto/ llvm/tools/msbuild/ llvm/tools/obj2yaml/ llvm/tools/opt/CMakeLists.txt -llvm/tools/opt/LLVMBuild.txt llvm/tools/opt-viewer/ llvm/tools/remarks-shlib/ llvm/tools/sancov/ llvm/tools/sanstats/ +llvm/tools/split-file/ llvm/tools/verify-uselistorder/ llvm/tools/vfabi-demangle-fuzzer/ llvm/tools/xcode-toolchain/ @@ -949,14 +785,12 @@ llvm/utils/FileCheck/ llvm/utils/GenLibDeps.pl llvm/utils/GetSourceVersion llvm/utils/KillTheDoctor/ -llvm/utils/LLVMBuild.txt llvm/utils/LLVMVisualizers/ llvm/utils/Misc/ llvm/utils/PerfectShuffle/ llvm/utils/Reviewing/ llvm/utils/TableGen/CMakeLists.txt llvm/utils/TableGen/GlobalISel/CMakeLists.txt -llvm/utils/TableGen/LLVMBuild.txt llvm/utils/TableGen/tdtags llvm/utils/Target/ llvm/utils/UpdateCMakeLists.pl @@ -974,6 +808,7 @@ llvm/utils/chunk-print-before-all.py llvm/utils/clang-parse-diagnostics-file llvm/utils/codegen-diff llvm/utils/collect_and_build_with_pgo.py +llvm/utils/convert-constraint-log-to-z3.py llvm/utils/count/ llvm/utils/countloc.sh llvm/utils/create_ladder_graph.py @@ -981,6 +816,7 @@ llvm/utils/crosstool/ llvm/utils/demangle_tree.py llvm/utils/docker/ llvm/utils/emacs/ +llvm/utils/extract-section.py llvm/utils/extract_symbols.py llvm/utils/extract_vplan.py llvm/utils/findmisopt @@ -997,23 +833,28 @@ llvm/utils/kate/ llvm/utils/lint/ llvm/utils/lit/ llvm/utils/lldbDataFormatters.py -llvm/utils/llvm-build/ llvm/utils/llvm-compilers-check llvm/utils/llvm-gisel-cov.py llvm/utils/llvm-lit/ llvm/utils/llvm-locstats/ llvm/utils/llvm-native-gxx +llvm/utils/llvm-original-di-preservation.py llvm/utils/llvm.grm llvm/utils/llvmdo llvm/utils/llvmgrep +llvm/utils/merge-stats.py llvm/utils/not/ llvm/utils/prepare-code-coverage-artifact.py llvm/utils/release/ +llvm/utils/remote-exec.py +llvm/utils/revert_checker.py +llvm/utils/revert_checker_test.py llvm/utils/sanitizers/ llvm/utils/schedcover.py llvm/utils/shuffle_fuzz.py llvm/utils/shuffle_select_fuzz_tester.py llvm/utils/sort_includes.py +llvm/utils/sysroot.py llvm/utils/testgen/ llvm/utils/textmate/ llvm/utils/unicode-case-fold.py @@ -1024,6 +865,7 @@ llvm/utils/update_llc_test_checks.py llvm/utils/update_mca_test_checks.py llvm/utils/update_mir_test_checks.py llvm/utils/update_test_checks.py +llvm/utils/update_test_prefix.py llvm/utils/valgrind/ llvm/utils/vim/ llvm/utils/vscode/ @@ -1037,6 +879,7 @@ openmp/cmake/ openmp/docs/ openmp/libomptarget/ openmp/runtime/.clang-format +openmp/runtime/.clang-tidy openmp/runtime/CMakeLists.txt openmp/runtime/README.txt openmp/runtime/cmake/ @@ -1049,4 +892,5 @@ openmp/www/ parallel-libs/ polly/ pstl/ +runtimes/ utils/ From nobody Sat Nov 20 17:37:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 02C591855021 for ; Sat, 20 Nov 2021 17:37: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 4HxLMP6fcCz3sN3; Sat, 20 Nov 2021 17:37:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C068320209; Sat, 20 Nov 2021 17:37: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 1AKHbLuj097212; Sat, 20 Nov 2021 17:37:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKHbLnx097211; Sat, 20 Nov 2021 17:37:21 GMT (envelope-from git) Date: Sat, 20 Nov 2021 17:37:21 GMT Message-Id: <202111201737.1AKHbLnx097211@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: c79be18a7a3a - Create tag vendor/llvm-project/llvmorg-14-init-10223-g401b76fdf2b3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/tags/vendor/llvm-project/llvmorg-14-init-10223-g401b76fdf2b3 X-Git-Reftype: annotated tag X-Git-Commit: c79be18a7a3a724df19c36718eddfd93741e3cb2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/llvm-project/llvmorg-14-init-10223-g401b76fdf2b3 has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-14-init-10223-g401b76fdf2b3 tag vendor/llvm-project/llvmorg-14-init-10223-g401b76fdf2b3 Tagger: Dimitry Andric TaggerDate: 2021-11-20 17:37:04 +0000 Tag llvm-project main llvmorg-14-init-10223-g401b76fdf2b3. commit 846a2208a8ab099f595fe7e8b2e6d54a7b5e67fb Author: Dimitry Andric AuthorDate: 2021-11-20 17:36:30 +0000 Commit: Dimitry Andric CommitDate: 2021-11-20 17:36:30 +0000 Vendor import of llvm-project main llvmorg-14-init-10223-g401b76fdf2b3. From nobody Sat Nov 20 17:37:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 048121855164 for ; Sat, 20 Nov 2021 17:37: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 4HxLMP6kz8z3sF8; Sat, 20 Nov 2021 17:37:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B821920188; Sat, 20 Nov 2021 17:37: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 1AKHbL34097188; Sat, 20 Nov 2021 17:37:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKHbL8V097187; Sat, 20 Nov 2021 17:37:21 GMT (envelope-from git) Date: Sat, 20 Nov 2021 17:37:21 GMT Message-Id: <202111201737.1AKHbL8V097187@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: c0981da47d56..846a2208a8ab - vendor/llvm-project/main - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/vendor/llvm-project/main X-Git-Reftype: branch X-Git-Commit: 846a2208a8ab099f595fe7e8b2e6d54a7b5e67fb X-Git-Oldrev: c0981da47d5696fe36474fcf86b4ce03ae3ff818 X-Git-Newrev: 846a2208a8ab099f595fe7e8b2e6d54a7b5e67fb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/llvm-project/main has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=c0981da47d56..846a2208a8ab 846a2208a8ab Vendor import of llvm-project main llvmorg-14-init-10223-g401b76fdf2b3. From nobody Sat Nov 20 18:33:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D7D3918A253F; Sat, 20 Nov 2021 18:33: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 4HxMcb5jjdz4hTn; Sat, 20 Nov 2021 18:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A440A20BC0; Sat, 20 Nov 2021 18:33: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 1AKIXpIG076209; Sat, 20 Nov 2021 18:33:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKIXpDv076208; Sat, 20 Nov 2021 18:33:51 GMT (envelope-from git) Date: Sat, 20 Nov 2021 18:33:51 GMT Message-Id: <202111201833.1AKIXpDv076208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Wing Subject: git: f8145bd4bcc0 - stable/12 - fsck_ufs: fix segfault with gjournal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f8145bd4bcc025fbb1750d9daf75e92916db4192 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=f8145bd4bcc025fbb1750d9daf75e92916db4192 commit f8145bd4bcc025fbb1750d9daf75e92916db4192 Author: Robert Wing AuthorDate: 2021-06-03 01:41:31 +0000 Commit: Robert Wing CommitDate: 2021-11-20 18:24:06 +0000 fsck_ufs: fix segfault with gjournal The segfault was being hit in closedisk() while trying to free a non-pointer. The fix for this bug differs between stable/12 and stable/13. PR: 245907 Submitted by: longwitz@incore.de Differential Revision: https://reviews.freebsd.org/D30537 (cherry picked from commit 441e69e419effac0225a45f4cdb948280b8ce5ab) --- sbin/fsck_ffs/gjournal.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sbin/fsck_ffs/gjournal.c b/sbin/fsck_ffs/gjournal.c index b9bfd1bfcced..dca08278569d 100644 --- a/sbin/fsck_ffs/gjournal.c +++ b/sbin/fsck_ffs/gjournal.c @@ -246,7 +246,6 @@ closedisk(void) err(1, "sbwrite(%s)", devnam); if (ufs_disk_close(diskp) == -1) err(1, "ufs_disk_close(%s)", devnam); - free(diskp); diskp = NULL; fs = NULL; } From nobody Sat Nov 20 19:04:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 49139188C619; Sat, 20 Nov 2021 19:04: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 4HxNJC1Wr1z4spQ; Sat, 20 Nov 2021 19:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FB9920E7A; Sat, 20 Nov 2021 19:04: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 1AKJ4g7d016868; Sat, 20 Nov 2021 19:04:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKJ4gmr016867; Sat, 20 Nov 2021 19:04:42 GMT (envelope-from git) Date: Sat, 20 Nov 2021 19:04:42 GMT Message-Id: <202111201904.1AKJ4gmr016867@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: 19dc64451179 - main - if_stf: add 6rd 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19dc644511796d80bd82f62ef49cb1cb4b86add3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=19dc644511796d80bd82f62ef49cb1cb4b86add3 commit 19dc644511796d80bd82f62ef49cb1cb4b86add3 Author: Kristof Provost AuthorDate: 2021-11-08 08:46:47 +0000 Commit: Kristof Provost CommitDate: 2021-11-20 18:29:01 +0000 if_stf: add 6rd support Implement IPv6 Rapid Deployment (RFC5969) on top of the existing 6to4 (RFC3056) if_stf code. PR: 253328 Reviewed by: hrs Obtained from: pfSense Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33037 --- sbin/ifconfig/Makefile | 1 + sbin/ifconfig/ifstf.c | 152 ++++++++++++++++++++++++ sys/net/if_stf.c | 314 +++++++++++++++++++++++++++++++++++++++---------- sys/net/if_stf.h | 46 ++++++++ sys/netinet6/in6_var.h | 1 + 5 files changed, 452 insertions(+), 62 deletions(-) diff --git a/sbin/ifconfig/Makefile b/sbin/ifconfig/Makefile index b178dc0c7e6a..c48375b8c6d9 100644 --- a/sbin/ifconfig/Makefile +++ b/sbin/ifconfig/Makefile @@ -24,6 +24,7 @@ SRCS+= af_inet6.c # IPv6 support .endif .if ${MK_INET6_SUPPORT} != "no" SRCS+= af_nd6.c # ND6 support +SRCS+= ifstf.c # STF configuration options .endif SRCS+= ifclone.c # clone device support diff --git a/sbin/ifconfig/ifstf.c b/sbin/ifconfig/ifstf.c new file mode 100644 index 000000000000..f6c3cb5d5447 --- /dev/null +++ b/sbin/ifconfig/ifstf.c @@ -0,0 +1,152 @@ +/*- + * Copyright 2013 Ermal Luci + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "ifconfig.h" + +static int +do_cmd(int sock, u_long op, void *arg, size_t argsize, int set) +{ + struct ifdrv ifd; + + memset(&ifd, 0, sizeof(ifd)); + + strlcpy(ifd.ifd_name, ifr.ifr_name, sizeof(ifd.ifd_name)); + ifd.ifd_cmd = op; + ifd.ifd_len = argsize; + ifd.ifd_data = arg; + + return (ioctl(sock, set ? SIOCSDRVSPEC : SIOCGDRVSPEC, &ifd)); +} + +static void +stf_status(int s) +{ + struct stfv4args param; + + if (do_cmd(s, STF6RD_GV4NET, ¶m, sizeof(param), 0) < 0) + return; + + printf("\tv4net %s/%d -> ", inet_ntoa(param.srcv4_addr), + param.v4_prefixlen ? param.v4_prefixlen : 32); + printf("tv4br %s\n", inet_ntoa(param.braddr)); +} + +static void +setstf_br(const char *val, int d, int s, const struct afswtch *afp) +{ + struct stfv4args req; + struct sockaddr_in sin; + + memset(&req, 0, sizeof(req)); + + sin.sin_len = sizeof(sin); + sin.sin_family = AF_INET; + + if (!inet_aton(val, &sin.sin_addr)) + errx(1, "%s: bad value", val); + + req.braddr = sin.sin_addr; + if (do_cmd(s, STF6RD_SBR, &req, sizeof(req), 1) < 0) + err(1, "STF6RD_SBR%s", val); +} + +static void +setstf_set(const char *val, int d, int s, const struct afswtch *afp) +{ + struct stfv4args req; + struct sockaddr_in sin; + const char *errstr; + char *p = NULL; + + memset(&req, 0, sizeof(req)); + + sin.sin_len = sizeof(sin); + sin.sin_family = AF_INET; + + p = strrchr(val, '/'); + if (p == NULL) + errx(2, "Wrong argument given"); + + *p = '\0'; + req.v4_prefixlen = (int)strtonum(p + 1, 0, 32, &errstr); + if (errstr != NULL || req.v4_prefixlen == 0) { + *p = '/'; + errx(1, "%s: bad value (prefix length %s)", val, errstr); + } + + if (!inet_aton(val, &sin.sin_addr)) + errx(1, "%s: bad value", val); + + memcpy(&req.srcv4_addr, &sin.sin_addr, sizeof(req.srcv4_addr)); + if (do_cmd(s, STF6RD_SV4NET, &req, sizeof(req), 1) < 0) + err(1, "STF6RD_SV4NET %s", val); +} + +static struct cmd stf_cmds[] = { + DEF_CMD_ARG("stfv4net", setstf_set), + DEF_CMD_ARG("stfv4br", setstf_br), +}; + +static struct afswtch af_stf = { + .af_name = "af_stf", + .af_af = AF_UNSPEC, + .af_other_status = stf_status, +}; + +static __constructor void +stf_ctor(void) +{ + int i; + + for (i = 0; i < nitems(stf_cmds); i++) + cmd_register(&stf_cmds[i]); + af_register(&af_stf); +} diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index f80ba96e2f59..528e38c8d26e 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -5,6 +5,9 @@ * SPDX-License-Identifier: BSD-3-Clause * * Copyright (C) 2000 WIDE Project. + * Copyright (c) 2010 Hiroki Sato + * Copyright (c) 2013 Ermal Luci + * Copyright (c) 2017-2021 Rubicon Communications, LLC (Netgate) * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -81,10 +84,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -98,6 +103,7 @@ #include #include #include +#include #include #include @@ -109,6 +115,7 @@ #include #include +#include #include #include #include @@ -141,7 +148,10 @@ SYSCTL_INT(_net_link_stf, OID_AUTO, permit_rfc1918, CTLFLAG_RWTUN, struct stf_softc { struct ifnet *sc_ifp; - u_int sc_fibnum; + in_addr_t braddr; /* Border relay IPv4 address */ + in_addr_t srcv4_addr; /* Our IPv4 WAN address */ + u_int v4prefixlen; /* How much of the v4 address to include in our address. */ + u_int sc_fibnum; const struct encaptab *encap_cookie; }; #define STF2IFP(sc) ((sc)->sc_ifp) @@ -164,6 +174,11 @@ static int stf_checkaddr4(struct stf_softc *, struct in_addr *, struct ifnet *); static int stf_checkaddr6(struct stf_softc *, struct in6_addr *, struct ifnet *); +static struct sockaddr_in *stf_getin4addr_in6(struct stf_softc *, + struct sockaddr_in *, struct in6_addr, struct in6_addr, + struct in6_addr); +static struct sockaddr_in *stf_getin4addr(struct stf_softc *, + struct sockaddr_in *, struct in6_addr, struct in6_addr); static int stf_ioctl(struct ifnet *, u_long, caddr_t); static int stf_clone_match(struct if_clone *, const char *); @@ -324,14 +339,15 @@ static moduledata_t stf_mod = { }; DECLARE_MODULE(if_stf, stf_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); +MODULE_VERSION(if_stf, 2); static int stf_encapcheck(const struct mbuf *m, int off, int proto, void *arg) { struct ip ip; struct stf_softc *sc; - struct in_addr a, b, mask; struct in6_addr addr6, mask6; + struct sockaddr_in sin4addr, sin4mask; sc = (struct stf_softc *)arg; if (sc == NULL) @@ -355,29 +371,43 @@ stf_encapcheck(const struct mbuf *m, int off, int proto, void *arg) if (stf_getsrcifa6(STF2IFP(sc), &addr6, &mask6) != 0) return (0); - /* - * check if IPv4 dst matches the IPv4 address derived from the - * local 6to4 address. - * success on: dst = 10.1.1.1, ia6->ia_addr = 2002:0a01:0101:... - */ - if (bcmp(GET_V4(&addr6), &ip.ip_dst, sizeof(ip.ip_dst)) != 0) - return (0); + if (sc->srcv4_addr != INADDR_ANY) { + sin4addr.sin_addr.s_addr = sc->srcv4_addr; + sin4addr.sin_family = AF_INET; + } else + if (stf_getin4addr(sc, &sin4addr, addr6, mask6) == NULL) + return (0); - /* - * check if IPv4 src matches the IPv4 address derived from the - * local 6to4 address masked by prefixmask. - * success on: src = 10.1.1.1, ia6->ia_addr = 2002:0a00:.../24 - * fail on: src = 10.1.1.1, ia6->ia_addr = 2002:0b00:.../24 - */ - bzero(&a, sizeof(a)); - bcopy(GET_V4(&addr6), &a, sizeof(a)); - bcopy(GET_V4(&mask6), &mask, sizeof(mask)); - a.s_addr &= mask.s_addr; - b = ip.ip_src; - b.s_addr &= mask.s_addr; - if (a.s_addr != b.s_addr) + if (sin4addr.sin_addr.s_addr != ip.ip_dst.s_addr) return (0); + if (IN6_IS_ADDR_6TO4(&addr6)) { + /* + * 6to4 (RFC 3056). + * Check if IPv4 src matches the IPv4 address derived + * from the local 6to4 address masked by prefixmask. + * success on: src = 10.1.1.1, ia6->ia_addr = 2002:0a00:.../24 + * fail on: src = 10.1.1.1, ia6->ia_addr = 2002:0b00:.../24 + */ + memcpy(&sin4mask.sin_addr, GET_V4(&mask6), + sizeof(sin4mask.sin_addr)); + if ((sin4addr.sin_addr.s_addr & sin4mask.sin_addr.s_addr) != + (ip.ip_src.s_addr & sin4mask.sin_addr.s_addr)) + return (0); + } else { + /* 6rd (RFC 5569) */ + /* + * No restriction on the src address in the case of + * 6rd because the stf(4) interface always has a + * prefix which covers whole of IPv4 src address + * range. So, stf_output() will catch all of + * 6rd-capsuled IPv4 traffic with suspicious inner dst + * IPv4 address (i.e. the IPv6 destination address is + * one the admin does not like to route to outside), + * and then it discard them silently. + */ + } + /* stf interface makes single side match only */ return (32); } @@ -387,30 +417,38 @@ stf_getsrcifa6(struct ifnet *ifp, struct in6_addr *addr, struct in6_addr *mask) { struct ifaddr *ia; struct in_ifaddr *ia4; - struct in6_ifaddr *ia6; - struct sockaddr_in6 *sin6; + struct in6_addr addr6, mask6; + struct sockaddr_in sin4; + struct stf_softc *sc; struct in_addr in; NET_EPOCH_ASSERT(); + sc = ifp->if_softc; + CK_STAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_link) { if (ia->ifa_addr->sa_family != AF_INET6) continue; - sin6 = (struct sockaddr_in6 *)ia->ifa_addr; - if (!IN6_IS_ADDR_6TO4(&sin6->sin6_addr)) - continue; - bcopy(GET_V4(&sin6->sin6_addr), &in, sizeof(in)); + addr6 = *IFA_IN6(ia); + mask6 = *IFA_MASKIN6(ia); + if (sc->srcv4_addr != INADDR_ANY) + bcopy(&sc->srcv4_addr, &in, sizeof(in)); + else { + if (stf_getin4addr(sc, &sin4, addr6, mask6) == NULL) + continue; + bcopy(&sin4.sin_addr, &in, sizeof(in)); + } + CK_LIST_FOREACH(ia4, INADDR_HASH(in.s_addr), ia_hash) if (ia4->ia_addr.sin_addr.s_addr == in.s_addr) break; if (ia4 == NULL) continue; - ia6 = (struct in6_ifaddr *)ia; + *addr = addr6; + *mask = mask6; - *addr = sin6->sin6_addr; - *mask = ia6->ia_prefixmask.sin6_addr; return (0); } @@ -423,8 +461,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, { struct stf_softc *sc; const struct sockaddr_in6 *dst6; - struct in_addr in4; - const void *ptr; + struct sockaddr_in dst4, src4; u_int8_t tos; struct ip *ip; struct ip6_hdr *ip6; @@ -474,17 +511,17 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, * Pickup the right outer dst addr from the list of candidates. * ip6_dst has priority as it may be able to give us shorter IPv4 hops. */ - ptr = NULL; - if (IN6_IS_ADDR_6TO4(&ip6->ip6_dst)) - ptr = GET_V4(&ip6->ip6_dst); - else if (IN6_IS_ADDR_6TO4(&dst6->sin6_addr)) - ptr = GET_V4(&dst6->sin6_addr); - else { - m_freem(m); - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return (ENETUNREACH); + if (stf_getin4addr_in6(sc, &dst4, addr6, mask6, + ip6->ip6_dst) == NULL) { + if (sc->braddr != INADDR_ANY) + dst4.sin_addr.s_addr = sc->braddr; + else if (stf_getin4addr_in6(sc, &dst4, addr6, mask6, + dst6->sin6_addr) == NULL) { + m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ENETUNREACH); + } } - bcopy(ptr, &in4, sizeof(in4)); if (bpf_peers_present(ifp->if_bpf)) { /* @@ -507,8 +544,16 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, bzero(ip, sizeof(*ip)); - bcopy(GET_V4(&addr6), &ip->ip_src, sizeof(ip->ip_src)); - bcopy(&in4, &ip->ip_dst, sizeof(ip->ip_dst)); + if (sc->srcv4_addr != INADDR_ANY) + src4.sin_addr.s_addr = sc->srcv4_addr; + else if (stf_getin4addr(sc, &src4, addr6, mask6) == NULL) { + m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ENETUNREACH); + } + bcopy(&src4.sin_addr, &ip->ip_src, sizeof(ip->ip_src)); + bcopy(&dst4.sin_addr, &ip->ip_dst, sizeof(ip->ip_dst)); + ip->ip_p = IPPROTO_IPV6; ip->ip_ttl = ip_stf_ttl; ip->ip_len = htons(m->m_pkthdr.len); @@ -556,13 +601,6 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp) return (-1); } - /* - * reject packets with private address range. - * (requirement from RFC3056 section 2 1st paragraph) - */ - if (isrfc1918addr(in)) - return (-1); - /* * reject packets with broadcast */ @@ -624,6 +662,7 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) struct ip6_hdr *ip6; u_int8_t otos, itos; struct ifnet *ifp; + struct nhop_object *nh; NET_EPOCH_ASSERT(); @@ -674,6 +713,32 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) return (IPPROTO_DONE); } + /* + * reject packets with private address range. + * (requirement from RFC3056 section 2 1st paragraph) + */ + if ((IN6_IS_ADDR_6TO4(&ip6->ip6_src) && isrfc1918addr(&ip->ip_src)) || + (IN6_IS_ADDR_6TO4(&ip6->ip6_dst) && isrfc1918addr(&ip->ip_dst))) { + m_freem(m); + return (IPPROTO_DONE); + } + + /* + * Ignore if the destination is the same stf interface because + * all of valid IPv6 outgoing traffic should go interfaces + * except for it. + */ + nh = fib6_lookup(sc->sc_fibnum, &ip6->ip6_dst, 0, 0, 0); + if (nh == NULL) { + m_free(m); + return (IPPROTO_DONE); + } + if ((nh->nh_ifp == ifp) && + (!IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &nh->gw6_sa.sin6_addr))) { + m_free(m); + return (IPPROTO_DONE); + } + itos = IPV6_TRAFFIC_CLASS(ip6); if ((ifp->if_flags & IFF_LINK1) != 0) ip_ecn_egress(ECN_ALLOWED, &otos, &itos); @@ -709,34 +774,159 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) return (IPPROTO_DONE); } +static struct sockaddr_in * +stf_getin4addr_in6(struct stf_softc *sc, struct sockaddr_in *sin, + struct in6_addr addr6, struct in6_addr mask6, struct in6_addr in6) +{ + int i; + + /* + * When (src addr & src mask) != (in6 & src mask), + * the dst is not in the 6rd domain. The IPv4 address must + * not be used. + */ + for (i = 0; i < sizeof(addr6); i++) { + if ((((u_char *)&addr6)[i] & ((u_char *)&mask6)[i]) != + (((u_char *)&in6)[i] & ((u_char *)&mask6)[i])) + return (NULL); + } + + /* After the mask check, use in6 instead of addr6. */ + return (stf_getin4addr(sc, sin, in6, mask6)); +} + +static struct sockaddr_in * +stf_getin4addr(struct stf_softc *sc, struct sockaddr_in *sin, + struct in6_addr addr6, struct in6_addr mask6) +{ + struct in_addr *in; + + memset(sin, 0, sizeof(*sin)); + in = &sin->sin_addr; + if (IN6_IS_ADDR_6TO4(&addr6)) { + /* 6to4 (RFC 3056) */ + bcopy(GET_V4(&addr6), in, sizeof(*in)); + if (isrfc1918addr(in)) + return (NULL); + } else { + /* 6rd (RFC 5569) */ + in_addr_t v4prefix; + uint8_t *v6 = (uint8_t*)&addr6; + uint64_t v6prefix; + u_int plen; + u_int v4suffixlen; + + v4prefix = 0; + if (sc->v4prefixlen < 32) { + v4suffixlen = 32 - sc->v4prefixlen; + v4prefix = ntohl(sc->srcv4_addr) & + (0xffffffffU << v4suffixlen); + } else { + MPASS(sc->v4prefixlen == 32); + v4suffixlen = 32; + } + + plen = in6_mask2len(&mask6, NULL); + if (plen > 64) + return (NULL); + + /* To make this simple we do not support prefixes longer than + * 64 bits. RFC5969 says "a 6rd delegated prefix SHOULD be /64 + * or shorter." so this is a moderately safe assumption. */ + v6prefix = be64toh(*(uint64_t *)v6); + + /* Shift away the v6 prefix itself. */ + v6prefix <<= plen; + v6prefix >>= plen; + + /* Now shift away everything after the v4 address. */ + v6prefix >>= 64 - plen - v4suffixlen; + + sin->sin_addr.s_addr = htonl(v4prefix | (uint32_t)v6prefix); + } + + return (sin); +} + static int stf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct ifaddr *ifa; + struct ifdrv *ifd; struct ifreq *ifr; - struct sockaddr_in6 *sin6; - struct in_addr addr; + struct sockaddr_in sin4; + struct stf_softc *sc_cur; + struct stfv4args args; int error, mtu; error = 0; + sc_cur = ifp->if_softc; + switch (cmd) { + case SIOCSDRVSPEC: + ifd = (struct ifdrv *)data; + error = priv_check(curthread, PRIV_NET_ADDIFADDR); + if (error) + break; + if (ifd->ifd_cmd == STF6RD_SV4NET) { + if (ifd->ifd_len != sizeof(args)) { + error = EINVAL; + break; + } + bzero(&args, sizeof(args)); + error = copyin(ifd->ifd_data, &args, ifd->ifd_len); + if (error) + break; + + if (args.v4_prefixlen < 1 || args.v4_prefixlen > 32) { + error = EINVAL; + break; + } + + bcopy(&args.srcv4_addr, &sc_cur->srcv4_addr, + sizeof(sc_cur->srcv4_addr)); + sc_cur->v4prefixlen = args.v4_prefixlen; + } else if (ifd->ifd_cmd == STF6RD_SBR) { + if (ifd->ifd_len != sizeof(args)) { + error = EINVAL; + break; + } + bzero(&args, sizeof(args)); + error = copyin(ifd->ifd_data, &args, ifd->ifd_len); + if (error) + break; + sc_cur->braddr = args.braddr.s_addr; + } else + error = EINVAL; + break; + case SIOCGDRVSPEC: + ifd = (struct ifdrv *)data; + if (ifd->ifd_cmd != STF6RD_GV4NET) { + error = EINVAL; + break; + } + if (ifd->ifd_len != sizeof(args)) { + error = EINVAL; + break; + } + bzero(&args, sizeof(args)); + args.srcv4_addr.s_addr = sc_cur->srcv4_addr; + args.braddr.s_addr = sc_cur->braddr; + args.v4_prefixlen = sc_cur->v4prefixlen; + error = copyout(&args, ifd->ifd_data, ifd->ifd_len); + break; case SIOCSIFADDR: ifa = (struct ifaddr *)data; if (ifa == NULL || ifa->ifa_addr->sa_family != AF_INET6) { error = EAFNOSUPPORT; break; } - sin6 = (struct sockaddr_in6 *)ifa->ifa_addr; - if (!IN6_IS_ADDR_6TO4(&sin6->sin6_addr)) { + if (stf_getin4addr(sc_cur, &sin4, + satosin6(ifa->ifa_addr)->sin6_addr, + satosin6(ifa->ifa_netmask)->sin6_addr) == NULL) { error = EINVAL; break; } - bcopy(GET_V4(&sin6->sin6_addr), &addr, sizeof(addr)); - if (isrfc1918addr(&addr)) { - error = EINVAL; - break; - } - ifp->if_flags |= IFF_UP; ifp->if_drv_flags |= IFF_DRV_RUNNING; break; diff --git a/sys/net/if_stf.h b/sys/net/if_stf.h new file mode 100644 index 000000000000..26c8f2f04e00 --- /dev/null +++ b/sys/net/if_stf.h @@ -0,0 +1,46 @@ +/*- + * Copyright (C) 2000 WIDE Project. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the project nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _NET_IF_STF_H_ +#define _NET_IF_STF_H_ + +struct stfv4args { + struct in_addr srcv4_addr; /* Our IPv4 src/WAN address */ + struct in_addr braddr; /* The border relay IPv4 address */ + int v4_prefixlen; /* The length of the IPv4 prefix. (I.e. + the number of bits of the IPv4 + address not encoded in the IPv6 + address. */ +}; + +#define STF6RD_SV4NET 1 +#define STF6RD_GV4NET 2 +#define STF6RD_SBR 3 + +#endif /* _NET_IF_STF_H_ */ diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 1caa4511a2b1..d3da832d2b90 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -407,6 +407,7 @@ struct in6_rrenumreq { #define IA6_DSTSIN6(ia) (&((ia)->ia_dstaddr)) #define IFA_IN6(x) (&((struct sockaddr_in6 *)((x)->ifa_addr))->sin6_addr) #define IFA_DSTIN6(x) (&((struct sockaddr_in6 *)((x)->ifa_dstaddr))->sin6_addr) +#define IFA_MASKIN6(x) (&((struct sockaddr_in6 *)((x)->ifa_netmask))->sin6_addr) #define IFPR_IN6(x) (&((struct sockaddr_in6 *)((x)->ifpr_prefix))->sin6_addr) From nobody Sat Nov 20 19:04:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 608E0188C562; Sat, 20 Nov 2021 19:04: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 4HxNJD26wKz4srK; Sat, 20 Nov 2021 19:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 296C72134A; Sat, 20 Nov 2021 19:04: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 1AKJ4iYu016892; Sat, 20 Nov 2021 19:04:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKJ4iAq016891; Sat, 20 Nov 2021 19:04:44 GMT (envelope-from git) Date: Sat, 20 Nov 2021 19:04:44 GMT Message-Id: <202111201904.1AKJ4iAq016891@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: b46512f704e7 - main - if_stf: add dtrace probe points List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b46512f704e7bb93324749d4f9747e6ffde75fb7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b46512f704e7bb93324749d4f9747e6ffde75fb7 commit b46512f704e7bb93324749d4f9747e6ffde75fb7 Author: Kristof Provost AuthorDate: 2021-11-09 15:28:07 +0000 Commit: Kristof Provost CommitDate: 2021-11-20 18:29:01 +0000 if_stf: add dtrace probe points Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33038 --- sys/net/if_stf.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 103 insertions(+), 6 deletions(-) diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index 528e38c8d26e..7807c6ebe7e9 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -92,6 +92,7 @@ #include #include #include +#include #include #include @@ -128,6 +129,38 @@ #include +SDT_PROVIDER_DEFINE(if_stf); +SDT_PROBE_DEFINE3(if_stf, , encapcheck, in, "struct mbuf *", "int", "int"); +SDT_PROBE_DEFINE0(if_stf, , encapcheck, accept); +SDT_PROBE_DEFINE3(if_stf, , getsrcifa6, in, "struct ifnet *", + "struct in6_addr *", "struct in6_addr *"); +SDT_PROBE_DEFINE2(if_stf, , getsrcifa6, found, "struct in6_addr *", + "struct in6_addr *"); +SDT_PROBE_DEFINE0(if_stf, , getsrcifa6, notfound); + +SDT_PROBE_DEFINE4(if_stf, , stf_output, in, "struct ifnet *", "struct mbuf *", + "struct sockaddr *", "struct route *"); +SDT_PROBE_DEFINE2(if_stf, , stf_output, error, "int", "int"); +SDT_PROBE_DEFINE1(if_stf, , stf_output, out, "int"); + +SDT_PROBE_DEFINE3(if_stf, , checkaddr6, in, "struct stf_softc *", + "struct in6_addr *", "struct ifnet *"); +SDT_PROBE_DEFINE2(if_stf, , checkaddr6, out, "int", "int"); + +SDT_PROBE_DEFINE3(if_stf, , stf_input, in, "struct mbuf *", "int", "int"); +SDT_PROBE_DEFINE2(if_stf, , stf_input, out, "int", "int"); + +SDT_PROBE_DEFINE3(if_stf, , ioctl, sv4net, "struct in_addr *", + "struct in_addr *", "int"); +SDT_PROBE_DEFINE1(if_stf, , ioctl, sdstv4, "struct in_addr *"); +SDT_PROBE_DEFINE1(if_stf, , ioctl, ifaddr, "struct ifaddr *"); + +SDT_PROBE_DEFINE4(if_stf, , getin4addr_in6, out, "struct in6_addr *", + "struct in6_addr *", "struct in6_addr *", "struct sockaddr_in *"); + +SDT_PROBE_DEFINE2(if_stf, , getin4addr, in, "struct in6_addr *", "struct in6_addr *"); +SDT_PROBE_DEFINE1(if_stf, , getin4addr, out, "struct sockaddr_in *"); + SYSCTL_DECL(_net_link); static SYSCTL_NODE(_net_link, IFT_STF, stf, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "6to4 Interface"); @@ -349,6 +382,8 @@ stf_encapcheck(const struct mbuf *m, int off, int proto, void *arg) struct in6_addr addr6, mask6; struct sockaddr_in sin4addr, sin4mask; + SDT_PROBE3(if_stf, , encapcheck, in, m, off, proto); + sc = (struct stf_softc *)arg; if (sc == NULL) return (0); @@ -408,6 +443,8 @@ stf_encapcheck(const struct mbuf *m, int off, int proto, void *arg) */ } + SDT_PROBE0(if_stf, , encapcheck, accept); + /* stf interface makes single side match only */ return (32); } @@ -426,6 +463,8 @@ stf_getsrcifa6(struct ifnet *ifp, struct in6_addr *addr, struct in6_addr *mask) sc = ifp->if_softc; + SDT_PROBE3(if_stf, , getsrcifa6, in, ifp, addr, mask); + CK_STAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_link) { if (ia->ifa_addr->sa_family != AF_INET6) continue; @@ -449,9 +488,13 @@ stf_getsrcifa6(struct ifnet *ifp, struct in6_addr *addr, struct in6_addr *mask) *addr = addr6; *mask = mask6; + SDT_PROBE2(if_stf, , getsrcifa6, found, addr, mask); + return (0); } + SDT_PROBE0(if_stf, , getsrcifa6, notfound); + return (ENOENT); } @@ -468,10 +511,13 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, struct in6_addr addr6, mask6; int error; + SDT_PROBE4(if_stf, , stf_output, in, ifp, m, dst, ro); + #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); if (error) { m_freem(m); + SDT_PROBE2(if_stf, , stf_output, error, error, __LINE__); return (error); } #endif @@ -483,6 +529,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, if ((ifp->if_flags & IFF_UP) == 0) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + SDT_PROBE2(if_stf, , stf_output, error, ENETDOWN, __LINE__); return (ENETDOWN); } @@ -494,6 +541,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, if (stf_getsrcifa6(ifp, &addr6, &mask6) != 0) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + SDT_PROBE2(if_stf, , stf_output, error, ENETDOWN, __LINE__); return (ENETDOWN); } @@ -501,6 +549,8 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, m = m_pullup(m, sizeof(*ip6)); if (!m) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + SDT_PROBE2(if_stf, , stf_output, error, ENOBUFS, + __LINE__); return (ENOBUFS); } } @@ -519,6 +569,8 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, dst6->sin6_addr) == NULL) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + SDT_PROBE2(if_stf, , stf_output, error, ENETUNREACH, + __LINE__); return (ENETUNREACH); } } @@ -538,6 +590,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, M_PREPEND(m, sizeof(struct ip), M_NOWAIT); if (m == NULL) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + SDT_PROBE2(if_stf, , stf_output, error, ENOBUFS, __LINE__); return (ENOBUFS); } ip = mtod(m, struct ip *); @@ -549,6 +602,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, else if (stf_getin4addr(sc, &src4, addr6, mask6) == NULL) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + SDT_PROBE2(if_stf, , stf_output, error, ENETUNREACH, __LINE__); return (ENETUNREACH); } bcopy(&src4.sin_addr, &ip->ip_src, sizeof(ip->ip_src)); @@ -566,6 +620,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); error = ip_output(m, NULL, NULL, 0, NULL, NULL); + SDT_PROBE1(if_stf, , stf_output, out, error); return (error); } @@ -633,13 +688,19 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp) static int stf_checkaddr6(struct stf_softc *sc, struct in6_addr *in6, struct ifnet *inifp) { + SDT_PROBE3(if_stf, , checkaddr6, in, sc, in6, inifp); + /* * check 6to4 addresses */ if (IN6_IS_ADDR_6TO4(in6)) { struct in_addr in4; + int ret; + bcopy(GET_V4(in6), &in4, sizeof(in4)); - return (stf_checkaddr4(sc, &in4, inifp)); + ret = stf_checkaddr4(sc, &in4, inifp); + SDT_PROBE2(if_stf, , checkaddr6, out, ret, __LINE__); + return (ret); } /* @@ -648,9 +709,17 @@ stf_checkaddr6(struct stf_softc *sc, struct in6_addr *in6, struct ifnet *inifp) * (1) reject bad packets earlier, and * (2) to be safe against future ip6_input change. */ - if (IN6_IS_ADDR_V4COMPAT(in6) || IN6_IS_ADDR_V4MAPPED(in6)) + if (IN6_IS_ADDR_V4COMPAT(in6)) { + SDT_PROBE2(if_stf, , checkaddr6, out, -1, __LINE__); return (-1); + } + if (IN6_IS_ADDR_V4MAPPED(in6)) { + SDT_PROBE2(if_stf, , checkaddr6, out, -1, __LINE__); + return (-1); + } + + SDT_PROBE2(if_stf, , checkaddr6, out, 0, __LINE__); return (0); } @@ -666,14 +735,18 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) NET_EPOCH_ASSERT(); + SDT_PROBE3(if_stf, , stf_input, in, m, off, proto); + if (proto != IPPROTO_IPV6) { m_freem(m); + SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); } ip = mtod(m, struct ip *); if (sc == NULL || (STF2IFP(sc)->if_flags & IFF_UP) == 0) { m_freem(m); + SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); } @@ -690,6 +763,7 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) if (stf_checkaddr4(sc, &ip->ip_dst, NULL) < 0 || stf_checkaddr4(sc, &ip->ip_src, m->m_pkthdr.rcvif) < 0) { m_freem(m); + SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); } @@ -698,8 +772,11 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) if (m->m_len < sizeof(*ip6)) { m = m_pullup(m, sizeof(*ip6)); - if (!m) + if (!m) { + SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, + __LINE__); return (IPPROTO_DONE); + } } ip6 = mtod(m, struct ip6_hdr *); @@ -710,6 +787,7 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) if (stf_checkaddr6(sc, &ip6->ip6_dst, NULL) < 0 || stf_checkaddr6(sc, &ip6->ip6_src, m->m_pkthdr.rcvif) < 0) { m_freem(m); + SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); } @@ -720,6 +798,7 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) if ((IN6_IS_ADDR_6TO4(&ip6->ip6_src) && isrfc1918addr(&ip->ip_src)) || (IN6_IS_ADDR_6TO4(&ip6->ip6_dst) && isrfc1918addr(&ip->ip_dst))) { m_freem(m); + SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); } @@ -731,11 +810,13 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) nh = fib6_lookup(sc->sc_fibnum, &ip6->ip6_dst, 0, 0, 0); if (nh == NULL) { m_free(m); + SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); } if ((nh->nh_ifp == ifp) && (!IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &nh->gw6_sa.sin6_addr))) { m_free(m); + SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); } @@ -771,6 +852,7 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len); M_SETFIB(m, ifp->if_fib); netisr_dispatch(NETISR_IPV6, m); + SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); } @@ -779,6 +861,7 @@ stf_getin4addr_in6(struct stf_softc *sc, struct sockaddr_in *sin, struct in6_addr addr6, struct in6_addr mask6, struct in6_addr in6) { int i; + struct sockaddr_in *out; /* * When (src addr & src mask) != (in6 & src mask), @@ -787,12 +870,17 @@ stf_getin4addr_in6(struct stf_softc *sc, struct sockaddr_in *sin, */ for (i = 0; i < sizeof(addr6); i++) { if ((((u_char *)&addr6)[i] & ((u_char *)&mask6)[i]) != - (((u_char *)&in6)[i] & ((u_char *)&mask6)[i])) - return (NULL); + (((u_char *)&in6)[i] & ((u_char *)&mask6)[i])) { + SDT_PROBE4(if_stf, , getin4addr_in6, out, &addr6, + &mask6, &in6, NULL); + return (NULL); + } } /* After the mask check, use in6 instead of addr6. */ - return (stf_getin4addr(sc, sin, in6, mask6)); + out = stf_getin4addr(sc, sin, in6, mask6); + SDT_PROBE4(if_stf, , getin4addr_in6, out, &addr6, &mask6, &in6, out); + return (out); } static struct sockaddr_in * @@ -801,6 +889,8 @@ stf_getin4addr(struct stf_softc *sc, struct sockaddr_in *sin, { struct in_addr *in; + SDT_PROBE2(if_stf, , getin4addr, in, &addr6, &mask6); + memset(sin, 0, sizeof(*sin)); in = &sin->sin_addr; if (IN6_IS_ADDR_6TO4(&addr6)) { @@ -845,6 +935,8 @@ stf_getin4addr(struct stf_softc *sc, struct sockaddr_in *sin, sin->sin_addr.s_addr = htonl(v4prefix | (uint32_t)v6prefix); } + SDT_PROBE1(if_stf, , getin4addr, out, sin); + return (sin); } @@ -886,6 +978,8 @@ stf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) bcopy(&args.srcv4_addr, &sc_cur->srcv4_addr, sizeof(sc_cur->srcv4_addr)); sc_cur->v4prefixlen = args.v4_prefixlen; + SDT_PROBE3(if_stf, , ioctl, sv4net, sc_cur->srcv4_addr, + sc_cur->srcv4_addr, sc_cur->v4prefixlen); } else if (ifd->ifd_cmd == STF6RD_SBR) { if (ifd->ifd_len != sizeof(args)) { error = EINVAL; @@ -896,6 +990,8 @@ stf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (error) break; sc_cur->braddr = args.braddr.s_addr; + SDT_PROBE1(if_stf, , ioctl, sdstv4, + sc_cur->braddr); } else error = EINVAL; break; @@ -917,6 +1013,7 @@ stf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; case SIOCSIFADDR: ifa = (struct ifaddr *)data; + SDT_PROBE1(if_stf, , ioctl, ifaddr, ifa); if (ifa == NULL || ifa->ifa_addr->sa_family != AF_INET6) { error = EAFNOSUPPORT; break; From nobody Sat Nov 20 19:04:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D2C1A188C56C; Sat, 20 Nov 2021 19:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HxNJF4yMwz4sv5; Sat, 20 Nov 2021 19:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C1E4212E6; Sat, 20 Nov 2021 19:04: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 1AKJ4jVm016916; Sat, 20 Nov 2021 19:04:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKJ4jFG016915; Sat, 20 Nov 2021 19:04:45 GMT (envelope-from git) Date: Sat, 20 Nov 2021 19:04:45 GMT Message-Id: <202111201904.1AKJ4jFG016915@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: e1b95017d299 - main - net tests: 6rd test for if_stf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e1b95017d2990a5bb3fd3d5021105bd5069697f2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e1b95017d2990a5bb3fd3d5021105bd5069697f2 commit e1b95017d2990a5bb3fd3d5021105bd5069697f2 Author: Kristof Provost AuthorDate: 2021-11-09 15:06:16 +0000 Commit: Kristof Provost CommitDate: 2021-11-20 18:29:02 +0000 net tests: 6rd test for if_stf Basic test case for 6rd. PR: 253328 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33039 --- tests/sys/net/if_stf.sh | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/tests/sys/net/if_stf.sh b/tests/sys/net/if_stf.sh index f3ed2d744c7c..4d0df53e0bcd 100644 --- a/tests/sys/net/if_stf.sh +++ b/tests/sys/net/if_stf.sh @@ -78,7 +78,61 @@ atf_test_case "6to4" "cleanup" vnet_cleanup } +atf_test_case "6rd" "cleanup" +6rd_head() +{ + atf_set descr '6RD test' + atf_set require.user root +} + +6rd_body() +{ + vnet_init + + if ! kldstat -q -m if_stf; then + atf_skip "This test requires if_stf" + fi + if ! kldstat -q -m if_gif; then + atf_skip "This test requires if_gif" + fi + + epair=$(vnet_mkepair) + vnet_mkjail br ${epair}a + jexec br ifconfig ${epair}a 192.0.2.1/24 up + + # Simple gif to terminate the 6RD tunnel + gif=$(jexec br ifconfig gif create) + jexec br ifconfig lo0 inet6 2001:db9::1/64 up + jexec br ifconfig $gif inet6 2001:db8::/64 up + jexec br ifconfig $gif tunnel 192.0.2.1 192.0.2.2 + jexec br route -6 add default -interface $gif + + vnet_mkjail client ${epair}b + jexec client ifconfig lo0 up + jexec client ifconfig ${epair}b 192.0.2.2/24 up + + # Sanity check + atf_check -s exit:0 -o ignore \ + jexec client ping -c 1 192.0.2.1 + + stf=$(jexec client ifconfig stf create) + + jexec client ifconfig $stf stfv4br 192.0.2.1 + jexec client ifconfig $stf stfv4net 192.0.2.2/32 + jexec client ifconfig $stf inet6 2001:db8:c000:0202::1/32 up + jexec client route -6 add default -interface $stf + + atf_check -s exit:0 -o ignore \ + jexec client ping6 -c 1 2001:db9::1 +} + +6rd_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "6to4" + atf_add_test_case "6rd" } From nobody Sat Nov 20 19:04:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9D12E188C3DE; Sat, 20 Nov 2021 19:04: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 4HxNJH18qyz4t0b; Sat, 20 Nov 2021 19:04:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E4CC210AB; Sat, 20 Nov 2021 19:04: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 1AKJ4kio016940; Sat, 20 Nov 2021 19:04:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKJ4k5l016939; Sat, 20 Nov 2021 19:04:46 GMT (envelope-from git) Date: Sat, 20 Nov 2021 19:04:46 GMT Message-Id: <202111201904.1AKJ4k5l016939@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: 2610dcc1a565 - main - net tests: 6rd to 6rd 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2610dcc1a565a95d6659928de4d505662e1bf1c2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2610dcc1a565a95d6659928de4d505662e1bf1c2 commit 2610dcc1a565a95d6659928de4d505662e1bf1c2 Author: Kristof Provost AuthorDate: 2021-11-09 17:46:22 +0000 Commit: Kristof Provost CommitDate: 2021-11-20 18:29:02 +0000 net tests: 6rd to 6rd test Test traffic between 6rd hosts, without border relay involvement. PR: 253328 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33040 --- tests/sys/net/if_stf.sh | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/tests/sys/net/if_stf.sh b/tests/sys/net/if_stf.sh index 4d0df53e0bcd..e97938f0b2d8 100644 --- a/tests/sys/net/if_stf.sh +++ b/tests/sys/net/if_stf.sh @@ -131,8 +131,73 @@ atf_test_case "6rd" "cleanup" vnet_cleanup } +atf_test_case "6rd_peer" "cleanup" +6rd_peer_head() +{ + atf_set descr '6RD peer test' + atf_set require.user root +} + +6rd_peer_body() +{ + vnet_init + + if ! kldstat -q -m if_stf; then + atf_skip "This test requires if_stf" + fi + + epair=$(vnet_mkepair) + + vnet_mkjail one ${epair}a + jexec one ifconfig lo0 up + jexec one ifconfig ${epair}a 192.0.2.1/24 up + stf_one=$(jexec one ifconfig stf create) + jexec one ifconfig $stf_one stfv4br 192.0.2.3 + jexec one ifconfig $stf_one stfv4net 192.0.2.1/32 + jexec one ifconfig $stf_one inet6 2001:db8:c000:0201::1/32 up + jexec one route -6 add default -interface $stf_one + + vnet_mkjail two ${epair}b + jexec two ifconfig lo0 up + jexec two ifconfig ${epair}b 192.0.2.2/24 up + stf_two=$(jexec two ifconfig stf create) + jexec two ifconfig $stf_two stfv4br 192.0.2.3 + jexec two ifconfig $stf_two stfv4net 192.0.2.2/32 + jexec two ifconfig $stf_two inet6 2001:db8:c000:0202::1/32 up + jexec two route -6 add default -interface $stf_two + + # Sanity check + atf_check -s exit:0 -o ignore \ + jexec one ping -c 1 192.0.2.2 + + # Test 6rd + atf_check -s exit:0 -o ignore \ + jexec one ping6 -c 1 2001:db8:c000:0202::1 + atf_check -s exit:0 -o ignore \ + jexec two ping6 -c 1 2001:db8:c000:0201::1 + + # Shorter prefixes, for both v4 and v6 + jexec one ifconfig $stf_one inet6 2001:db8:c000:0201::1 delete + jexec one ifconfig $stf_one inet6 2001:0201::1/16 + jexec one ifconfig $stf_one stfv4net 192.0.2.1/16 + jexec two ifconfig $stf_two inet6 2001:db8:c000:0202::1 delete + jexec two ifconfig $stf_two inet6 2001:0202::1/16 + jexec two ifconfig $stf_two stfv4net 192.0.2.2/16 + + atf_check -s exit:0 -o ignore \ + jexec one ping6 -c 1 2001:0202::1 + atf_check -s exit:0 -o ignore \ + jexec two ping6 -c 1 2001:0201::1 +} + +6rd_peer_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "6to4" atf_add_test_case "6rd" + atf_add_test_case "6rd_peer" } From nobody Sat Nov 20 19:04:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3B22C188C78E; Sat, 20 Nov 2021 19:04: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 4HxNJJ3l3hz4srk; Sat, 20 Nov 2021 19:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A03321233; Sat, 20 Nov 2021 19:04: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 1AKJ4ldo016966; Sat, 20 Nov 2021 19:04:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKJ4lZv016965; Sat, 20 Nov 2021 19:04:47 GMT (envelope-from git) Date: Sat, 20 Nov 2021 19:04:47 GMT Message-Id: <202111201904.1AKJ4lZv016965@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: 67573b7a39b1 - main - net tests: fix if_stf:6to4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 67573b7a39b19e39536a68563fed0d940604e573 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=67573b7a39b19e39536a68563fed0d940604e573 commit 67573b7a39b19e39536a68563fed0d940604e573 Author: Kristof Provost AuthorDate: 2021-11-10 11:02:34 +0000 Commit: Kristof Provost CommitDate: 2021-11-20 18:29:02 +0000 net tests: fix if_stf:6to4 This test needs to have the loopback interface enabled, or route lookups for our own IP addresses will fail. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33041 --- tests/sys/net/if_stf.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/sys/net/if_stf.sh b/tests/sys/net/if_stf.sh index e97938f0b2d8..8ed1ba4daaee 100644 --- a/tests/sys/net/if_stf.sh +++ b/tests/sys/net/if_stf.sh @@ -41,7 +41,7 @@ atf_test_case "6to4" "cleanup" atf_skip "This test requires if_stf" fi if ! kldstat -q -m if_gif; then - atf_skip "This test requires if_stf" + atf_skip "This test requires if_gif" fi epair=$(vnet_mkepair) @@ -56,6 +56,7 @@ atf_test_case "6to4" "cleanup" jexec relay route -6 add default -interface $gif vnet_mkjail client ${epair}b + jexec client ifconfig lo0 up jexec client ifconfig ${epair}b 192.0.2.2/24 up stf=$(jexec client ifconfig stf create) jexec client ifconfig $stf inet6 2002:c000:0202::1/32 up From nobody Sat Nov 20 19:04:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F1538188C717; Sat, 20 Nov 2021 19:04: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 4HxNJK1RPxz4svX; Sat, 20 Nov 2021 19:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCD5F20F6A; Sat, 20 Nov 2021 19:04: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 1AKJ4mmc016995; Sat, 20 Nov 2021 19:04:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKJ4mZv016994; Sat, 20 Nov 2021 19:04:48 GMT (envelope-from git) Date: Sat, 20 Nov 2021 19:04:48 GMT Message-Id: <202111201904.1AKJ4mZv016994@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: 3f7b9525ea48 - main - if_stf: document 6rd in the man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f7b9525ea48afcb297abcf6c66bd39fcf6b756b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3f7b9525ea48afcb297abcf6c66bd39fcf6b756b commit 3f7b9525ea48afcb297abcf6c66bd39fcf6b756b Author: Kristof Provost AuthorDate: 2021-11-17 00:13:17 +0000 Commit: Kristof Provost CommitDate: 2021-11-20 18:29:02 +0000 if_stf: document 6rd in the man page PR: 253328 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33042 --- share/man/man4/stf.4 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/share/man/man4/stf.4 b/share/man/man4/stf.4 index 786acb22fce1..7a5e16be56d8 100644 --- a/share/man/man4/stf.4 +++ b/share/man/man4/stf.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 28, 2012 +.Dd November 16, 2021 .Dt STF 4 .Os .Sh NAME @@ -44,11 +44,15 @@ The .Nm interface supports .Dq 6to4 +and +.Dq 6rd IPv6 in IPv4 encapsulation. It can tunnel IPv6 traffic over IPv4, as specified in -.Li RFC3056 . +.Li RFC3056 +or +.Li RFC5969 . .Pp -For ordinary nodes in 6to4 site, you do not need +For ordinary nodes in a 6to4 or 6RD site, you do not need .Nm interface. The @@ -56,6 +60,8 @@ The interface is necessary for site border router (called .Dq 6to4 router +or +.Dq 6rd Customer Edge (CE) in the specification). .Pp Each @@ -69,6 +75,7 @@ command or using the .Va cloned_interfaces variable in .Xr rc.conf 5 . +.Sh 6to4 .Pp Due to the way 6to4 protocol is specified, .Nm @@ -180,6 +187,41 @@ Note, however, there are other security risks exist. If you wish to use the configuration, you must not advertise your 6to4 address to others. .\" +.Sh 6rd +Like +.Dq 6to4 +.Dq 6rd +also requires configuration before it can be used. +The required configuration parameters are: +.Bl -bullet +.It +The IPv6 address and prefix length. +.It +The border router IPv4 address. +.It +The IPv4 WAN address. +.It +The prefix length of the IPv4 WAN address. +.El +.Pp +These can parameters are all configured through +.Xr ifconfig 8 . +.Pp +The IPv6 address and prefix length can be configured like any other IPv6 address. +Note that the prefix length is the IPv6 prefix length excluding the embedded +IPv4 address bits. +The prefix length of the delegated network is the sum of the IPv6 prefix length +and the IPv4 prefix length. +.Pp +The border router IPv4 address is configured with the +.Xr ifconfig 8 +.Cm stfv4br +command. +.Pp +The IPv4 WAN address and IPv4 prefix length are configured using the +.Xr ifconfig 8 +.Cm stfv4net +command. .Sh SYSCTL VARIABLES The following .Xr sysctl 8 @@ -241,6 +283,24 @@ and not to use your 6to4 prefix as a source. # route add -inet6 2002:: -prefixlen 16 ::1 # route change -inet6 2002:: -prefixlen 16 ::1 -ifp stf0 .Ed +.Pp +The following example configures a +.Dq 6rd +tunnel on a +.Dq 6rd CE +where the ISP's +.Dq 6rd +IPv6 prefix is 2001:db8::/32. +The border router is 192.0.2.1. +The +.Dq 6rd CE +has a WAN address of 192.0.2.2 and the full IPv4 address is embedded in the +.Dq 6rd IPv6 address: +.Bd -literal +# ifconfig stf0 inet6 2001:db8:c000:0202:: prefixlen 32 up +# ifconfig stf0 stfv4br 192.0.2.1 +# ifconfig stf0 stfv4net 192.0.2.2/32 +.Ed .\" .Sh SEE ALSO .Xr gif 4 , From nobody Sat Nov 20 19:04:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 18A01188C728; Sat, 20 Nov 2021 19:04: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 4HxNJL2LfYz4sly; Sat, 20 Nov 2021 19:04:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB5832134B; Sat, 20 Nov 2021 19:04: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 1AKJ4nAJ017019; Sat, 20 Nov 2021 19:04:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKJ4ncW017018; Sat, 20 Nov 2021 19:04:49 GMT (envelope-from git) Date: Sat, 20 Nov 2021 19:04:49 GMT Message-Id: <202111201904.1AKJ4ncW017018@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: 5dd9d0605aff - main - if_stf: minor man page improvements List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5dd9d0605afff469cc2e98a9d74806eb7dfeb018 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5dd9d0605afff469cc2e98a9d74806eb7dfeb018 commit 5dd9d0605afff469cc2e98a9d74806eb7dfeb018 Author: Kristof Provost AuthorDate: 2021-11-17 22:12:14 +0000 Commit: Kristof Provost CommitDate: 2021-11-20 18:29:02 +0000 if_stf: minor man page improvements - fix typo (router -> routers) - Remove 6bone reference, because that was phased out in 2006. Suggested by: Pau Amma Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33046 --- share/man/man4/stf.4 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/share/man/man4/stf.4 b/share/man/man4/stf.4 index 7a5e16be56d8..2b794cd2936e 100644 --- a/share/man/man4/stf.4 +++ b/share/man/man4/stf.4 @@ -57,9 +57,9 @@ For ordinary nodes in a 6to4 or 6RD site, you do not need interface. The .Nm -interface is necessary for site border router +interface is necessary for site border routers (called -.Dq 6to4 router +.Dq 6to4 routers or .Dq 6rd Customer Edge (CE) in the specification). @@ -306,8 +306,6 @@ has a WAN address of 192.0.2.2 and the full IPv4 address is embedded in the .Xr gif 4 , .Xr inet 4 , .Xr inet6 4 -.Pp -.Pa http://www.ipv6day.org/action.php?n=En.IPv6day .Rs .%A Brian Carpenter .%A Keith Moore From nobody Sat Nov 20 19:26:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E28A81898256; Sat, 20 Nov 2021 19:26: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 4HxNmq5gPkz3J96; Sat, 20 Nov 2021 19:26:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2E1421A82; Sat, 20 Nov 2021 19:26: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 1AKJQ39W043871; Sat, 20 Nov 2021 19:26:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKJQ32F043870; Sat, 20 Nov 2021 19:26:03 GMT (envelope-from git) Date: Sat, 20 Nov 2021 19:26:03 GMT Message-Id: <202111201926.1AKJQ32F043870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 8981a100e614 - main - mount: retire kernel_vmount() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8981a100e614d9030eb75e7e828caad48214306d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=8981a100e614d9030eb75e7e828caad48214306d commit 8981a100e614d9030eb75e7e828caad48214306d Author: Robert Wing AuthorDate: 2021-11-20 19:22:28 +0000 Commit: Robert Wing CommitDate: 2021-11-20 19:22:28 +0000 mount: retire kernel_vmount() The last usage of this function was removed in e3b1c847a4237ad9. There are no in-tree consumers of kernel_vmount(). Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D32607 --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 1 - share/man/man9/kernel_mount.9 | 25 +------------------------ sys/kern/vfs_mount.c | 26 -------------------------- sys/sys/mount.h | 1 - 5 files changed, 4 insertions(+), 52 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 00cfe2a33129..9bfd496e334b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -40,6 +40,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20211120 +OLD_FILES+=usr/share/man/man9/kernel_vmount.9.gz + # 20211115: vm_page busy functions removed OLD_FILES+=share/man/man9/vm_page_sbusy.9.gz OLD_FILES+=share/man/man9/vm_page_xbusy.9.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 2bb45e3a6dc8..150b7b5715c0 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1313,7 +1313,6 @@ MLINKS+=ithread.9 ithread_add_handler.9 \ ithread.9 ithread_schedule.9 MLINKS+=kernacc.9 useracc.9 MLINKS+=kernel_mount.9 free_mntarg.9 \ - kernel_mount.9 kernel_vmount.9 \ kernel_mount.9 mount_arg.9 \ kernel_mount.9 mount_argb.9 \ kernel_mount.9 mount_argf.9 \ diff --git a/share/man/man9/kernel_mount.9 b/share/man/man9/kernel_mount.9 index 873f522fa1f7..7a11007c288b 100644 --- a/share/man/man9/kernel_mount.9 +++ b/share/man/man9/kernel_mount.9 @@ -25,13 +25,12 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2004 +.Dd November 20, 2021 .Dt KERNEL_MOUNT 9 .Os .Sh NAME .Nm free_mntarg , .Nm kernel_mount , -.Nm kernel_vmount , .Nm mount_arg , .Nm mount_argb , .Nm mount_argf , @@ -42,8 +41,6 @@ .Fn free_mntarg "struct mntarg *ma" .Ft int .Fn kernel_mount "struct mntarg *ma" "int flags" -.Ft int -.Fn kernel_vmount "int flags" ... .Ft "struct mntarg *" .Fo mount_arg .Fa "struct mntarg *ma" "const char *name" "const void *val" "int len" @@ -100,12 +97,6 @@ that code will be called and the file system mount will not be attempted. .Pp The -.Fn kernel_vmount -is a function similar to -.Xr printf 9 -which is used to mount a file system. -.Pp -The .Fn mount_arg function takes a plain argument and crafts parts of the structure with regards to various mount options. @@ -178,20 +169,6 @@ msdosfs_cmount(struct mntarg *ma, void *data, int flags, struct thread *td) return (error); } .Ed -.Pp -When working with -.Fn kernel_vmount , -.Fa varargs -must come in pairs, e.g., -.Brq Va name , value . -.Bd -literal - error = kernel_vmount( - MNT_RDONLY, - "fstype", vfsname, - "fspath", "/", - "from", path, - NULL); -.Ed .Sh SEE ALSO .Xr VFS 9 , .Xr VFS_MOUNT 9 diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 5b68a8fec474..07076bc2f4f7 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -2816,32 +2816,6 @@ kernel_mount(struct mntarg *ma, uint64_t flags) return (error); } -/* - * A printflike function to mount a filesystem. - */ -int -kernel_vmount(int flags, ...) -{ - struct mntarg *ma = NULL; - va_list ap; - const char *cp; - const void *vp; - int error; - - va_start(ap, flags); - for (;;) { - cp = va_arg(ap, const char *); - if (cp == NULL) - break; - vp = va_arg(ap, const void *); - ma = mount_arg(ma, cp, vp, (vp != NULL ? -1 : 0)); - } - va_end(ap); - - error = kernel_mount(ma, flags); - return (error); -} - /* Map from mount options to printable formats. */ static struct mntoptnames optnames[] = { MNTOPT_NAMES diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 68211785b7c5..1863a36738d1 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -973,7 +973,6 @@ vfs_statfs_t __vfs_statfs; int dounmount(struct mount *, uint64_t, struct thread *); int kernel_mount(struct mntarg *ma, uint64_t flags); -int kernel_vmount(int flags, ...); struct mntarg *mount_arg(struct mntarg *ma, const char *name, const void *val, int len); struct mntarg *mount_argb(struct mntarg *ma, int flag, const char *name); struct mntarg *mount_argf(struct mntarg *ma, const char *name, const char *fmt, ...); From nobody Sat Nov 20 21:20:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 23E141891FCD; Sat, 20 Nov 2021 21:20: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 4HxRK95ph3z4gRG; Sat, 20 Nov 2021 21:20:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A84162318D; Sat, 20 Nov 2021 21:20: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 1AKLKjLQ001917; Sat, 20 Nov 2021 21:20:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKLKjEF001915; Sat, 20 Nov 2021 21:20:45 GMT (envelope-from git) Date: Sat, 20 Nov 2021 21:20:45 GMT Message-Id: <202111202120.1AKLKjEF001915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 92b40444d07a - stable/12 - MFC: rc.d/rctl: unbreak for distinct /usr filesystem List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 92b40444d07aeef2bf4b20109f3f90ac343b90df Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=92b40444d07aeef2bf4b20109f3f90ac343b90df commit 92b40444d07aeef2bf4b20109f3f90ac343b90df Author: Eugene Grosbein AuthorDate: 2021-11-20 08:54:39 +0000 Commit: Eugene Grosbein CommitDate: 2021-11-20 21:17:28 +0000 MFC: rc.d/rctl: unbreak for distinct /usr filesystem Both rctl and used xargs utility live in /usr/bin so add REQUIRE: FILESYSTEMS This trivial change to stable/12 violates "3 days MFC policy" because of imminent upcoming 12.3-RELESE deadline. Approved by: re (cperciva) Reported by: Peter (cherry picked from commit 0c54fe172ad365e7e60d6249484a7579c18b7d2d) --- libexec/rc/rc.d/rctl | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rc/rc.d/rctl b/libexec/rc/rc.d/rctl index ed5665454dde..f1b001a6ad79 100755 --- a/libexec/rc/rc.d/rctl +++ b/libexec/rc/rc.d/rctl @@ -4,6 +4,7 @@ # # PROVIDE: rctl +# REQUIRE: FILESYSTEMS # BEFORE: LOGIN # KEYWORD: nojail From nobody Sat Nov 20 21:38:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ED166189BB58; Sat, 20 Nov 2021 21:38:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HxRjz6M7rz4mJD; Sat, 20 Nov 2021 21:38:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B63B923059; Sat, 20 Nov 2021 21:38: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 1AKLclpm017451; Sat, 20 Nov 2021 21:38:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKLclhU017450; Sat, 20 Nov 2021 21:38:47 GMT (envelope-from git) Date: Sat, 20 Nov 2021 21:38:47 GMT Message-Id: <202111202138.1AKLclhU017450@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: 438fd19dc327 - main - ssh: mention nanobsd config files in upgrade instructions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 438fd19dc327400e5fbcebfcb9fe9361b317e791 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=438fd19dc327400e5fbcebfcb9fe9361b317e791 commit 438fd19dc327400e5fbcebfcb9fe9361b317e791 Author: Ed Maste AuthorDate: 2021-11-20 21:22:28 +0000 Commit: Ed Maste CommitDate: 2021-11-20 21:38:18 +0000 ssh: mention nanobsd config files in upgrade instructions Sponsored by: The FreeBSD Foundation --- crypto/openssh/FREEBSD-upgrade | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade index 02c953ddd765..ed750a77fcb2 100644 --- a/crypto/openssh/FREEBSD-upgrade +++ b/crypto/openssh/FREEBSD-upgrade @@ -103,7 +103,12 @@ something significant changes or if ssh_namespace.h is out of whack. -12) Commit, and hunker down for the inevitable storm of complaints. +12) Update nanobsd's copies of the ssh config files: + + tools/tools/nanobsd/rescue/Files/etc/ssh/ssh_config + tools/tools/nanobsd/rescue/Files/etc/ssh/sshd_config + +13) Commit, and hunker down for the inevitable storm of complaints. From nobody Sat Nov 20 22:56:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5D81F18A3CCA; Sat, 20 Nov 2021 22:56: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 4HxTRL2848z3kxj; Sat, 20 Nov 2021 22:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 259802459A; Sat, 20 Nov 2021 22: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 1AKMuED9024547; Sat, 20 Nov 2021 22: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 1AKMuEAi024546; Sat, 20 Nov 2021 22:56:14 GMT (envelope-from git) Date: Sat, 20 Nov 2021 22:56:14 GMT Message-Id: <202111202256.1AKMuEAi024546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 53cff1d4ddb9 - stable/12 - nfsd: Fix f_bavail and f_ffree for NFSv4 when negative List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 53cff1d4ddb9f46d9c68eb3ec1f81717f7a8767c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=53cff1d4ddb9f46d9c68eb3ec1f81717f7a8767c commit 53cff1d4ddb9f46d9c68eb3ec1f81717f7a8767c Author: Rick Macklem AuthorDate: 2021-11-08 20:59:31 +0000 Commit: Rick Macklem CommitDate: 2021-11-20 21:49:57 +0000 nfsd: Fix f_bavail and f_ffree for NFSv4 when negative Since the NFS Space_available and Files_available are unsigned, the NFSv3 server sets them to 0 when negative, so that they do not appear to be large positive values for non-FreeBSD clients. This patch fixes the NFSv4 server to do the same. Found during a recent IEFT NFSv4 working group testing event. (cherry picked from commit d70ca5b00eede3367ce659a03b2f9cc9729cd0dd) --- sys/fs/nfs/nfs_commonsubs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 390d6e91535f..e4120d4d9e78 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -2482,6 +2482,17 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, } NFSCLRSTATFS_ATTRBIT(retbitp); } + /* + * Since NFS handles these values as unsigned on the + * wire, there is no way to represent negative values, + * so set them to 0. Without this, they will appear + * to be very large positive values for clients like + * Solaris10. + */ + if (fs->f_bavail < 0) + fs->f_bavail = 0; + if (fs->f_ffree < 0) + fs->f_ffree = 0; } #endif From nobody Sat Nov 20 22:58:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1331E18A5C93; Sat, 20 Nov 2021 22:58: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 4HxTVF4dCMz3mCH; Sat, 20 Nov 2021 22:58:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B24D2441C; Sat, 20 Nov 2021 22:58: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 1AKMwj8D024956; Sat, 20 Nov 2021 22:58:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKMwj2R024955; Sat, 20 Nov 2021 22:58:45 GMT (envelope-from git) Date: Sat, 20 Nov 2021 22:58:45 GMT Message-Id: <202111202258.1AKMwj2R024955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: ca2b9574aa42 - stable/13 - libarchive: cherry-pick bugfix from vendor List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: ca2b9574aa42f1bca7a4d611bf32a997a31e2e9a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=ca2b9574aa42f1bca7a4d611bf32a997a31e2e9a commit ca2b9574aa42f1bca7a4d611bf32a997a31e2e9a Author: Martin Matuska AuthorDate: 2021-11-17 21:21:19 +0000 Commit: Martin Matuska CommitDate: 2021-11-20 22:33:10 +0000 libarchive: cherry-pick bugfix from vendor Vendor commit message (ede459d2e): archive_write_disk_posix: fix writing fflags broken in 8a1bd5c The fixup list was erroneously assumed to be directories only. Only in the case of critical file flags modification (e.g. SF_IMMUTABLE on BSD systems), other file types (e.g. regular files or symbolic links) may be added to the fixup list. We still need to verify that we are writing to the correct file type, so compare the archive entry file type with the file type of the file to be modified. Fixes vendor issue #1617: Immutable flag no longer preserved during tar extraction on FreeBSD Reported by: markjdb Libarchive commit: ede459d2ebb879f5eedb6f7abea203be0b334230 (cherry picked from commit 201d0ebee321fb1a5501e17a4f150aa211020c5c) --- .../libarchive/archive_write_disk_posix.c | 87 +++++++++++++++++++--- 1 file changed, 75 insertions(+), 12 deletions(-) diff --git a/contrib/libarchive/libarchive/archive_write_disk_posix.c b/contrib/libarchive/libarchive/archive_write_disk_posix.c index a554679bfd10..1aa00840bf4c 100644 --- a/contrib/libarchive/libarchive/archive_write_disk_posix.c +++ b/contrib/libarchive/libarchive/archive_write_disk_posix.c @@ -173,6 +173,7 @@ struct fixup_entry { struct fixup_entry *next; struct archive_acl acl; mode_t mode; + __LA_MODE_T filetype; int64_t atime; int64_t birthtime; int64_t mtime; @@ -357,6 +358,7 @@ struct archive_write_disk { static int la_opendirat(int, const char *); static int la_mktemp(struct archive_write_disk *); +static int la_verify_filetype(mode_t, __LA_MODE_T); static void fsobj_error(int *, struct archive_string *, int, const char *, const char *); static int check_symlinks_fsobj(char *, int *, struct archive_string *, @@ -464,6 +466,39 @@ la_opendirat(int fd, const char *path) { #endif } +static int +la_verify_filetype(mode_t mode, __LA_MODE_T filetype) { + int ret = 0; + + switch (filetype) { + case AE_IFREG: + ret = (S_ISREG(mode)); + break; + case AE_IFDIR: + ret = (S_ISDIR(mode)); + break; + case AE_IFLNK: + ret = (S_ISLNK(mode)); + break; + case AE_IFSOCK: + ret = (S_ISSOCK(mode)); + break; + case AE_IFCHR: + ret = (S_ISCHR(mode)); + break; + case AE_IFBLK: + ret = (S_ISBLK(mode)); + break; + case AE_IFIFO: + ret = (S_ISFIFO(mode)); + break; + default: + break; + } + + return (ret); +} + static int lazy_stat(struct archive_write_disk *a) { @@ -822,6 +857,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_MODE_BASE; fe->mode = a->mode; } @@ -832,6 +868,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->mode = a->mode; fe->fixup |= TODO_TIMES; if (archive_entry_atime_is_set(entry)) { @@ -865,6 +902,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_ACLS; archive_acl_copy(&fe->acl, archive_entry_acl(entry)); } @@ -877,6 +915,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->mac_metadata = malloc(metadata_size); if (fe->mac_metadata != NULL) { memcpy(fe->mac_metadata, metadata, @@ -891,6 +930,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_FFLAGS; /* TODO: Complete this.. defer fflags from below. */ } @@ -2463,7 +2503,7 @@ _archive_write_disk_close(struct archive *_a) struct fixup_entry *next, *p; struct stat st; char *c; - int fd, ret; + int fd, ret, openflags; archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA, @@ -2490,32 +2530,53 @@ _archive_write_disk_close(struct archive *_a) if (p->fixup == 0) goto skip_fixup_entry; else { - fd = open(p->name, O_BINARY | O_NOFOLLOW | O_RDONLY + /* + * We need to verify if the type of the file + * we are going to open matches the file type + * of the fixup entry. + */ + openflags = O_BINARY | O_NOFOLLOW | O_RDONLY + | O_CLOEXEC; #if defined(O_DIRECTORY) - | O_DIRECTORY + if (p->filetype == AE_IFDIR) + openflags |= O_DIRECTORY; #endif - | O_CLOEXEC); + fd = open(p->name, openflags); + +#if defined(O_DIRECTORY) /* - ` * If we don't support O_DIRECTORY, - * or open() has failed, we must stat() - * to verify that we are opening a directory + * If we support O_DIRECTORY and open was + * successful we can skip the file type check + * for directories. For other file types + * we need to verify via fstat() or lstat() */ -#if defined(O_DIRECTORY) - if (fd == -1) { + if (fd == -1 || p->filetype != AE_IFDIR) { +#if HAVE_FSTAT + if (fd > 0 && ( + fstat(fd, &st) != 0 || + la_verify_filetype(st.st_mode, + p->filetype) == 0)) { + goto skip_fixup_entry; + } else +#endif if (lstat(p->name, &st) != 0 || - !S_ISDIR(st.st_mode)) { + la_verify_filetype(st.st_mode, + p->filetype) == 0) { goto skip_fixup_entry; } } #else #if HAVE_FSTAT if (fd > 0 && ( - fstat(fd, &st) != 0 || !S_ISDIR(st.st_mode))) { + fstat(fd, &st) != 0 || + la_verify_filetype(st.st_mode, + p->filetype) == 0)) { goto skip_fixup_entry; } else #endif if (lstat(p->name, &st) != 0 || - !S_ISDIR(st.st_mode)) { + la_verify_filetype(st.st_mode, + p->filetype) == 0) { goto skip_fixup_entry; } #endif @@ -2689,6 +2750,7 @@ new_fixup(struct archive_write_disk *a, const char *pathname) fe->next = a->fixup_list; a->fixup_list = fe; fe->fixup = 0; + fe->filetype = 0; fe->name = strdup(pathname); return (fe); } @@ -3811,6 +3873,7 @@ set_fflags(struct archive_write_disk *a) le = current_fixup(a, a->name); if (le == NULL) return (ARCHIVE_FATAL); + le->filetype = archive_entry_filetype(a->entry); le->fixup |= TODO_FFLAGS; le->fflags_set = set; /* Store the mode if it's not already there. */ From nobody Sat Nov 20 23:15:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ABFCD18AD1DC; Sat, 20 Nov 2021 23:15: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 4HxTsq4X1jz3rfS; Sat, 20 Nov 2021 23:15:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7BC7C24742; Sat, 20 Nov 2021 23:15: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 1AKNFhsf052538; Sat, 20 Nov 2021 23:15:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKNFh2V052537; Sat, 20 Nov 2021 23:15:43 GMT (envelope-from git) Date: Sat, 20 Nov 2021 23:15:43 GMT Message-Id: <202111202315.1AKNFh2V052537@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: f2b106ec4e5a - stable/12 - libarchive: cherry-pick bugfix from vendor List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/12 X-Git-Reftype: branch X-Git-Commit: f2b106ec4e5a8488883c58480cf576d18010d263 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=f2b106ec4e5a8488883c58480cf576d18010d263 commit f2b106ec4e5a8488883c58480cf576d18010d263 Author: Martin Matuska AuthorDate: 2021-11-17 21:21:19 +0000 Commit: Martin Matuska CommitDate: 2021-11-20 23:00:24 +0000 libarchive: cherry-pick bugfix from vendor Vendor commit message (ede459d2e): archive_write_disk_posix: fix writing fflags broken in 8a1bd5c The fixup list was erroneously assumed to be directories only. Only in the case of critical file flags modification (e.g. SF_IMMUTABLE on BSD systems), other file types (e.g. regular files or symbolic links) may be added to the fixup list. We still need to verify that we are writing to the correct file type, so compare the archive entry file type with the file type of the file to be modified. Fixes vendor issue #1617: Immutable flag no longer preserved during tar extraction on FreeBSD Reported by: markjdb Libarchive commit: ede459d2ebb879f5eedb6f7abea203be0b334230 (cherry picked from commit 201d0ebee321fb1a5501e17a4f150aa211020c5c) --- .../libarchive/archive_write_disk_posix.c | 87 +++++++++++++++++++--- 1 file changed, 75 insertions(+), 12 deletions(-) diff --git a/contrib/libarchive/libarchive/archive_write_disk_posix.c b/contrib/libarchive/libarchive/archive_write_disk_posix.c index a554679bfd10..1aa00840bf4c 100644 --- a/contrib/libarchive/libarchive/archive_write_disk_posix.c +++ b/contrib/libarchive/libarchive/archive_write_disk_posix.c @@ -173,6 +173,7 @@ struct fixup_entry { struct fixup_entry *next; struct archive_acl acl; mode_t mode; + __LA_MODE_T filetype; int64_t atime; int64_t birthtime; int64_t mtime; @@ -357,6 +358,7 @@ struct archive_write_disk { static int la_opendirat(int, const char *); static int la_mktemp(struct archive_write_disk *); +static int la_verify_filetype(mode_t, __LA_MODE_T); static void fsobj_error(int *, struct archive_string *, int, const char *, const char *); static int check_symlinks_fsobj(char *, int *, struct archive_string *, @@ -464,6 +466,39 @@ la_opendirat(int fd, const char *path) { #endif } +static int +la_verify_filetype(mode_t mode, __LA_MODE_T filetype) { + int ret = 0; + + switch (filetype) { + case AE_IFREG: + ret = (S_ISREG(mode)); + break; + case AE_IFDIR: + ret = (S_ISDIR(mode)); + break; + case AE_IFLNK: + ret = (S_ISLNK(mode)); + break; + case AE_IFSOCK: + ret = (S_ISSOCK(mode)); + break; + case AE_IFCHR: + ret = (S_ISCHR(mode)); + break; + case AE_IFBLK: + ret = (S_ISBLK(mode)); + break; + case AE_IFIFO: + ret = (S_ISFIFO(mode)); + break; + default: + break; + } + + return (ret); +} + static int lazy_stat(struct archive_write_disk *a) { @@ -822,6 +857,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_MODE_BASE; fe->mode = a->mode; } @@ -832,6 +868,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->mode = a->mode; fe->fixup |= TODO_TIMES; if (archive_entry_atime_is_set(entry)) { @@ -865,6 +902,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_ACLS; archive_acl_copy(&fe->acl, archive_entry_acl(entry)); } @@ -877,6 +915,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->mac_metadata = malloc(metadata_size); if (fe->mac_metadata != NULL) { memcpy(fe->mac_metadata, metadata, @@ -891,6 +930,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_FFLAGS; /* TODO: Complete this.. defer fflags from below. */ } @@ -2463,7 +2503,7 @@ _archive_write_disk_close(struct archive *_a) struct fixup_entry *next, *p; struct stat st; char *c; - int fd, ret; + int fd, ret, openflags; archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA, @@ -2490,32 +2530,53 @@ _archive_write_disk_close(struct archive *_a) if (p->fixup == 0) goto skip_fixup_entry; else { - fd = open(p->name, O_BINARY | O_NOFOLLOW | O_RDONLY + /* + * We need to verify if the type of the file + * we are going to open matches the file type + * of the fixup entry. + */ + openflags = O_BINARY | O_NOFOLLOW | O_RDONLY + | O_CLOEXEC; #if defined(O_DIRECTORY) - | O_DIRECTORY + if (p->filetype == AE_IFDIR) + openflags |= O_DIRECTORY; #endif - | O_CLOEXEC); + fd = open(p->name, openflags); + +#if defined(O_DIRECTORY) /* - ` * If we don't support O_DIRECTORY, - * or open() has failed, we must stat() - * to verify that we are opening a directory + * If we support O_DIRECTORY and open was + * successful we can skip the file type check + * for directories. For other file types + * we need to verify via fstat() or lstat() */ -#if defined(O_DIRECTORY) - if (fd == -1) { + if (fd == -1 || p->filetype != AE_IFDIR) { +#if HAVE_FSTAT + if (fd > 0 && ( + fstat(fd, &st) != 0 || + la_verify_filetype(st.st_mode, + p->filetype) == 0)) { + goto skip_fixup_entry; + } else +#endif if (lstat(p->name, &st) != 0 || - !S_ISDIR(st.st_mode)) { + la_verify_filetype(st.st_mode, + p->filetype) == 0) { goto skip_fixup_entry; } } #else #if HAVE_FSTAT if (fd > 0 && ( - fstat(fd, &st) != 0 || !S_ISDIR(st.st_mode))) { + fstat(fd, &st) != 0 || + la_verify_filetype(st.st_mode, + p->filetype) == 0)) { goto skip_fixup_entry; } else #endif if (lstat(p->name, &st) != 0 || - !S_ISDIR(st.st_mode)) { + la_verify_filetype(st.st_mode, + p->filetype) == 0) { goto skip_fixup_entry; } #endif @@ -2689,6 +2750,7 @@ new_fixup(struct archive_write_disk *a, const char *pathname) fe->next = a->fixup_list; a->fixup_list = fe; fe->fixup = 0; + fe->filetype = 0; fe->name = strdup(pathname); return (fe); } @@ -3811,6 +3873,7 @@ set_fflags(struct archive_write_disk *a) le = current_fixup(a, a->name); if (le == NULL) return (ARCHIVE_FATAL); + le->filetype = archive_entry_filetype(a->entry); le->fixup |= TODO_FFLAGS; le->fflags_set = set; /* Store the mode if it's not already there. */ From nobody Sat Nov 20 23:38:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D9BBE188EC1D; Sat, 20 Nov 2021 23:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HxVMq5p1dz4RwX; Sat, 20 Nov 2021 23:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A72D524E17; Sat, 20 Nov 2021 23: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 1AKNcFS7079294; Sat, 20 Nov 2021 23: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 1AKNcFZ8079293; Sat, 20 Nov 2021 23:38:15 GMT (envelope-from git) Date: Sat, 20 Nov 2021 23:38:15 GMT Message-Id: <202111202338.1AKNcFZ8079293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 50f03cd45ed6 - stable/11 - libarchive: cherry-pick bugfix from vendor List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/11 X-Git-Reftype: branch X-Git-Commit: 50f03cd45ed69802778aeeece504ab718ff10238 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/11 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=50f03cd45ed69802778aeeece504ab718ff10238 commit 50f03cd45ed69802778aeeece504ab718ff10238 Author: Martin Matuska AuthorDate: 2021-11-17 21:21:19 +0000 Commit: Martin Matuska CommitDate: 2021-11-20 23:16:35 +0000 libarchive: cherry-pick bugfix from vendor Vendor commit message (ede459d2e): archive_write_disk_posix: fix writing fflags broken in 8a1bd5c The fixup list was erroneously assumed to be directories only. Only in the case of critical file flags modification (e.g. SF_IMMUTABLE on BSD systems), other file types (e.g. regular files or symbolic links) may be added to the fixup list. We still need to verify that we are writing to the correct file type, so compare the archive entry file type with the file type of the file to be modified. Fixes vendor issue #1617: Immutable flag no longer preserved during tar extraction on FreeBSD Reported by: markjdb Libarchive commit: ede459d2ebb879f5eedb6f7abea203be0b334230 (cherry picked from commit 201d0ebee321fb1a5501e17a4f150aa211020c5c) --- .../libarchive/archive_write_disk_posix.c | 87 +++++++++++++++++++--- 1 file changed, 75 insertions(+), 12 deletions(-) diff --git a/contrib/libarchive/libarchive/archive_write_disk_posix.c b/contrib/libarchive/libarchive/archive_write_disk_posix.c index a554679bfd10..1aa00840bf4c 100644 --- a/contrib/libarchive/libarchive/archive_write_disk_posix.c +++ b/contrib/libarchive/libarchive/archive_write_disk_posix.c @@ -173,6 +173,7 @@ struct fixup_entry { struct fixup_entry *next; struct archive_acl acl; mode_t mode; + __LA_MODE_T filetype; int64_t atime; int64_t birthtime; int64_t mtime; @@ -357,6 +358,7 @@ struct archive_write_disk { static int la_opendirat(int, const char *); static int la_mktemp(struct archive_write_disk *); +static int la_verify_filetype(mode_t, __LA_MODE_T); static void fsobj_error(int *, struct archive_string *, int, const char *, const char *); static int check_symlinks_fsobj(char *, int *, struct archive_string *, @@ -464,6 +466,39 @@ la_opendirat(int fd, const char *path) { #endif } +static int +la_verify_filetype(mode_t mode, __LA_MODE_T filetype) { + int ret = 0; + + switch (filetype) { + case AE_IFREG: + ret = (S_ISREG(mode)); + break; + case AE_IFDIR: + ret = (S_ISDIR(mode)); + break; + case AE_IFLNK: + ret = (S_ISLNK(mode)); + break; + case AE_IFSOCK: + ret = (S_ISSOCK(mode)); + break; + case AE_IFCHR: + ret = (S_ISCHR(mode)); + break; + case AE_IFBLK: + ret = (S_ISBLK(mode)); + break; + case AE_IFIFO: + ret = (S_ISFIFO(mode)); + break; + default: + break; + } + + return (ret); +} + static int lazy_stat(struct archive_write_disk *a) { @@ -822,6 +857,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_MODE_BASE; fe->mode = a->mode; } @@ -832,6 +868,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->mode = a->mode; fe->fixup |= TODO_TIMES; if (archive_entry_atime_is_set(entry)) { @@ -865,6 +902,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_ACLS; archive_acl_copy(&fe->acl, archive_entry_acl(entry)); } @@ -877,6 +915,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->mac_metadata = malloc(metadata_size); if (fe->mac_metadata != NULL) { memcpy(fe->mac_metadata, metadata, @@ -891,6 +930,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_FFLAGS; /* TODO: Complete this.. defer fflags from below. */ } @@ -2463,7 +2503,7 @@ _archive_write_disk_close(struct archive *_a) struct fixup_entry *next, *p; struct stat st; char *c; - int fd, ret; + int fd, ret, openflags; archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA, @@ -2490,32 +2530,53 @@ _archive_write_disk_close(struct archive *_a) if (p->fixup == 0) goto skip_fixup_entry; else { - fd = open(p->name, O_BINARY | O_NOFOLLOW | O_RDONLY + /* + * We need to verify if the type of the file + * we are going to open matches the file type + * of the fixup entry. + */ + openflags = O_BINARY | O_NOFOLLOW | O_RDONLY + | O_CLOEXEC; #if defined(O_DIRECTORY) - | O_DIRECTORY + if (p->filetype == AE_IFDIR) + openflags |= O_DIRECTORY; #endif - | O_CLOEXEC); + fd = open(p->name, openflags); + +#if defined(O_DIRECTORY) /* - ` * If we don't support O_DIRECTORY, - * or open() has failed, we must stat() - * to verify that we are opening a directory + * If we support O_DIRECTORY and open was + * successful we can skip the file type check + * for directories. For other file types + * we need to verify via fstat() or lstat() */ -#if defined(O_DIRECTORY) - if (fd == -1) { + if (fd == -1 || p->filetype != AE_IFDIR) { +#if HAVE_FSTAT + if (fd > 0 && ( + fstat(fd, &st) != 0 || + la_verify_filetype(st.st_mode, + p->filetype) == 0)) { + goto skip_fixup_entry; + } else +#endif if (lstat(p->name, &st) != 0 || - !S_ISDIR(st.st_mode)) { + la_verify_filetype(st.st_mode, + p->filetype) == 0) { goto skip_fixup_entry; } } #else #if HAVE_FSTAT if (fd > 0 && ( - fstat(fd, &st) != 0 || !S_ISDIR(st.st_mode))) { + fstat(fd, &st) != 0 || + la_verify_filetype(st.st_mode, + p->filetype) == 0)) { goto skip_fixup_entry; } else #endif if (lstat(p->name, &st) != 0 || - !S_ISDIR(st.st_mode)) { + la_verify_filetype(st.st_mode, + p->filetype) == 0) { goto skip_fixup_entry; } #endif @@ -2689,6 +2750,7 @@ new_fixup(struct archive_write_disk *a, const char *pathname) fe->next = a->fixup_list; a->fixup_list = fe; fe->fixup = 0; + fe->filetype = 0; fe->name = strdup(pathname); return (fe); } @@ -3811,6 +3873,7 @@ set_fflags(struct archive_write_disk *a) le = current_fixup(a, a->name); if (le == NULL) return (ARCHIVE_FATAL); + le->filetype = archive_entry_filetype(a->entry); le->fixup |= TODO_FFLAGS; le->fflags_set = set; /* Store the mode if it's not already there. */ From nobody Sun Nov 21 00:28:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B8A5B1889713; Sun, 21 Nov 2021 00:28: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 4HxWTP4rT5z4jdf; Sun, 21 Nov 2021 00:28:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86EB52579C; Sun, 21 Nov 2021 00:28: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 1AL0S9Tm045621; Sun, 21 Nov 2021 00:28:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AL0S9Ja045620; Sun, 21 Nov 2021 00:28:09 GMT (envelope-from git) Date: Sun, 21 Nov 2021 00:28:09 GMT Message-Id: <202111210028.1AL0S9Ja045620@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: 7dab2a7cf5b9 - stable/13 - Kernel linkers: some style List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7dab2a7cf5b9c9c00435ee7709e8f7b3c19be870 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7dab2a7cf5b9c9c00435ee7709e8f7b3c19be870 commit 7dab2a7cf5b9c9c00435ee7709e8f7b3c19be870 Author: Konstantin Belousov AuthorDate: 2021-11-07 09:03:45 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-21 00:27:44 +0000 Kernel linkers: some style (cherry picked from commit a7e4eb14229845c0857caf91bc3364f9e7075b00) --- sys/kern/link_elf.c | 10 +++++----- sys/kern/link_elf_obj.c | 36 ++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index 2faaa003380a..4114bd46f0c0 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -1596,12 +1596,12 @@ static int link_elf_search_symbol(linker_file_t lf, caddr_t value, c_linker_sym_t *sym, long *diffp) { - elf_file_t ef = (elf_file_t) lf; - u_long off = (uintptr_t) (void *) value; + elf_file_t ef = (elf_file_t)lf; + u_long off = (uintptr_t) (void *)value; u_long diff = off; u_long st_value; - const Elf_Sym* es; - const Elf_Sym* best = NULL; + const Elf_Sym *es; + const Elf_Sym *best = NULL; int i; for (i = 0, es = ef->ddbsymtab; i < ef->ddbsymcnt; i++, es++) { @@ -1711,7 +1711,7 @@ link_elf_each_function_nameval(linker_file_t file, { linker_symval_t symval; elf_file_t ef = (elf_file_t)file; - const Elf_Sym* symp; + const Elf_Sym *symp; int i, error; /* Exhaustive search */ diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 91852939e5e8..5c6db11e1937 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -1421,7 +1421,7 @@ link_elf_lookup_symbol(linker_file_t lf, const char *name, c_linker_sym_t *sym) return 0; } } - return ENOENT; + return (ENOENT); } static int @@ -1442,17 +1442,17 @@ link_elf_symbol_values(linker_file_t lf, c_linker_sym_t sym, val = ((caddr_t (*)(void))val)(); symval->value = val; symval->size = es->st_size; - return 0; + return (0); } - return ENOENT; + return (ENOENT); } static int link_elf_search_symbol(linker_file_t lf, caddr_t value, c_linker_sym_t *sym, long *diffp) { - elf_file_t ef = (elf_file_t) lf; - u_long off = (uintptr_t) (void *) value; + elf_file_t ef = (elf_file_t)lf; + u_long off = (uintptr_t)(void *)value; u_long diff = off; u_long st_value; const Elf_Sym *es; @@ -1480,7 +1480,7 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value, *diffp = diff; *sym = (c_linker_sym_t) best; - return 0; + return (0); } /* @@ -1779,25 +1779,21 @@ link_elf_reloc_local(linker_file_t lf, bool ifuncs) static long link_elf_symtab_get(linker_file_t lf, const Elf_Sym **symtab) { - elf_file_t ef = (elf_file_t)lf; - - *symtab = ef->ddbsymtab; - - if (*symtab == NULL) - return (0); + elf_file_t ef = (elf_file_t)lf; - return (ef->ddbsymcnt); + *symtab = ef->ddbsymtab; + if (*symtab == NULL) + return (0); + return (ef->ddbsymcnt); } static long link_elf_strtab_get(linker_file_t lf, caddr_t *strtab) { - elf_file_t ef = (elf_file_t)lf; - - *strtab = ef->ddbstrtab; - - if (*strtab == NULL) - return (0); + elf_file_t ef = (elf_file_t)lf; - return (ef->ddbstrcnt); + *strtab = ef->ddbstrtab; + if (*strtab == NULL) + return (0); + return (ef->ddbstrcnt); } From nobody Sun Nov 21 00:38:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EAA6C188CEEA; Sun, 21 Nov 2021 00:38: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 4HxWjr6KNrz4ltK; Sun, 21 Nov 2021 00:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B91A1257C4; Sun, 21 Nov 2021 00:38: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 1AL0cuRK058728; Sun, 21 Nov 2021 00:38:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AL0cuAh058727; Sun, 21 Nov 2021 00:38:56 GMT (envelope-from git) Date: Sun, 21 Nov 2021 00:38:56 GMT Message-Id: <202111210038.1AL0cuAh058727@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: 036af1053acd - main - mkimg: zero entry in vhdx_write_metadata List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 036af1053acd6cae68c5fb6bed30508f2e40be13 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=036af1053acd6cae68c5fb6bed30508f2e40be13 commit 036af1053acd6cae68c5fb6bed30508f2e40be13 Author: Ed Maste AuthorDate: 2021-11-21 00:29:11 +0000 Commit: Ed Maste CommitDate: 2021-11-21 00:37:25 +0000 mkimg: zero entry in vhdx_write_metadata Otherwise _reserved might contain uninitialized data. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.bin/mkimg/vhdx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/mkimg/vhdx.c b/usr.bin/mkimg/vhdx.c index 4c97b20f5996..744d6e810ca5 100644 --- a/usr.bin/mkimg/vhdx.c +++ b/usr.bin/mkimg/vhdx.c @@ -331,6 +331,7 @@ vhdx_write_metadata(int fd, uint64_t image_size) memset(metadata, 0, SIZE_1MB); memset(&header, 0, sizeof(header)); + memset(&entry, 0, sizeof(entry)); le64enc(&header.signature, VHDX_METADATA_TABLE_HEADER_SIGNATURE); le16enc(&header.entry_count, 5); From nobody Sun Nov 21 01:31:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3FBF518A8708; Sun, 21 Nov 2021 01:31: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 4HxXtP15nrz3K1r; Sun, 21 Nov 2021 01:31:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 032E226748; Sun, 21 Nov 2021 01:31: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 1AL1VO3X034057; Sun, 21 Nov 2021 01:31:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AL1VOt3034056; Sun, 21 Nov 2021 01:31:24 GMT (envelope-from git) Date: Sun, 21 Nov 2021 01:31:24 GMT Message-Id: <202111210131.1AL1VOt3034056@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: de0af6442023 - stable/13 - wpa: Remove duplicate options definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: de0af6442023254f759c5acc4edd0b4bf0709597 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=de0af6442023254f759c5acc4edd0b4bf0709597 commit de0af6442023254f759c5acc4edd0b4bf0709597 Author: Cy Schubert AuthorDate: 2021-11-09 00:16:46 +0000 Commit: Cy Schubert CommitDate: 2021-11-21 01:30:49 +0000 wpa: Remove duplicate options definitions Global options are defined in usr.sbin/wpa/Makefile.inc. Those in usr.sbin/wpa/src/crypto/Makefile are duplicates of those found above. Remove them. (cherry picked from commit 3332f1b444d4a73238e9f59cca27bfc95fe936bd) --- usr.sbin/wpa/src/crypto/Makefile | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/usr.sbin/wpa/src/crypto/Makefile b/usr.sbin/wpa/src/crypto/Makefile index c95834279c21..eede671aa7db 100644 --- a/usr.sbin/wpa/src/crypto/Makefile +++ b/usr.sbin/wpa/src/crypto/Makefile @@ -139,20 +139,6 @@ SRCS+= dh_groups.c .endif .if ${MK_WPA_SUPPLICANT_EAPOL} != "no" -CFLAGS+=-DCONFIG_WPS \ - -DCONFIG_HS20 \ - -DCONFIG_INTERWORKING \ - -DEAP_GTC \ - -DEAP_LEAP \ - -DEAP_MD5 \ - -DEAP_MSCHAPv2 \ - -DEAP_OTP \ - -DEAP_PEAP \ - -DEAP_PSK \ - -DEAP_TLS \ - -DEAP_TTLS \ - -DEAP_WSC \ - -DIEEE8021X_EAPOL SRCS+= ms_funcs.c .endif From nobody Sun Nov 21 01:31:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 42DFC18A8446; Sun, 21 Nov 2021 01:31: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 4HxXtQ3qWqz3Jqh; Sun, 21 Nov 2021 01:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E9C1266AB; Sun, 21 Nov 2021 01: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 1AL1VQOc034081; Sun, 21 Nov 2021 01: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 1AL1VQgF034080; Sun, 21 Nov 2021 01:31:26 GMT (envelope-from git) Date: Sun, 21 Nov 2021 01:31:26 GMT Message-Id: <202111210131.1AL1VQgF034080@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: 9ed6f73bfba3 - stable/13 - Revert "wpa: Fix WITHOUT_CRYPT build" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9ed6f73bfba3dac47252e905bee8a81c90f7124b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=9ed6f73bfba3dac47252e905bee8a81c90f7124b commit 9ed6f73bfba3dac47252e905bee8a81c90f7124b Author: Cy Schubert AuthorDate: 2021-11-09 22:17:01 +0000 Commit: Cy Schubert CommitDate: 2021-11-21 01:30:49 +0000 Revert "wpa: Fix WITHOUT_CRYPT build" This reverts commit a30e8044aa4753858c189f3384dae2b2f25a150b. WITHOUT_OPENSSL build is a subset of WITHOUT_CRYPT build. It was incorrect to label this patch as fixing WITHOUT_CRYPT when in fact it fixes WITHOUT_OPENSSL. The build failure will be addressed in a fix for WITHOUT_OPENSSL build. (cherry picked from commit 96e2ac9c48baae6a352eb5574af87f81e01ff021) --- usr.sbin/wpa/Makefile.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index e43a6f539d92..915b5312f02f 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -56,6 +56,7 @@ CFLAGS+=-DCONFIG_TDLS CFLAGS+=-DCONFIG_TERMINATE_ONLASTIF CFLAGS+=-DCONFIG_TLS=openssl CFLAGS+=-DCONFIG_MATCH_IFACE +CFLAGS+=-DCONFIG_PASN CFLAGS+=-DCONFIG_PTKSA_CACHE CFLAGS+=-DEAP_SERVER CFLAGS+=-DEAP_SERVER_GTC @@ -90,10 +91,6 @@ NEED_AES_ENCBLOCK=y NEED_AES_OMAC1=y .endif -.if ${MK_CRYPT} != "no" -CFLAGS+=-DCONFIG_PASN -.endif - .if !empty(CFLAGS:M*-DEAP_AKA) NEED_SIM_COMMON=y NEED_AES_CBC=y From nobody Sun Nov 21 01:31:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BD47D18A84D1; Sun, 21 Nov 2021 01:31: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 4HxXtR63Whz3KCS; Sun, 21 Nov 2021 01:31:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44A1026619; Sun, 21 Nov 2021 01:31: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 1AL1VRM8034105; Sun, 21 Nov 2021 01:31:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AL1VReo034104; Sun, 21 Nov 2021 01:31:27 GMT (envelope-from git) Date: Sun, 21 Nov 2021 01:31:27 GMT Message-Id: <202111210131.1AL1VReo034104@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: c2ab6e36ec1d - stable/13 - wpa: Fix WITHOUT_OPENSSL build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c2ab6e36ec1d5eac86fea8dbe3b5ebf2300f6f76 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c2ab6e36ec1d5eac86fea8dbe3b5ebf2300f6f76 commit c2ab6e36ec1d5eac86fea8dbe3b5ebf2300f6f76 Author: Cy Schubert AuthorDate: 2021-11-09 22:52:44 +0000 Commit: Cy Schubert CommitDate: 2021-11-21 01:30:49 +0000 wpa: Fix WITHOUT_OPENSSL build PR: 259517 Reported by: emaste, FreeBSD Build Option Survey https://callfortesting.org/results/bos-2021-11-04/ Fixes: c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5 (cherry picked from commit ba5de3c2b3b84fd547ddcc0e678a013e5df87db1) --- usr.sbin/wpa/Makefile.inc | 5 ++++- usr.sbin/wpa/src/tls/Makefile | 9 +++++---- usr.sbin/wpa/wpa_supplicant/Makefile | 5 ++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index 915b5312f02f..5c5a6b403225 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -56,7 +56,6 @@ CFLAGS+=-DCONFIG_TDLS CFLAGS+=-DCONFIG_TERMINATE_ONLASTIF CFLAGS+=-DCONFIG_TLS=openssl CFLAGS+=-DCONFIG_MATCH_IFACE -CFLAGS+=-DCONFIG_PASN CFLAGS+=-DCONFIG_PTKSA_CACHE CFLAGS+=-DEAP_SERVER CFLAGS+=-DEAP_SERVER_GTC @@ -91,6 +90,10 @@ NEED_AES_ENCBLOCK=y NEED_AES_OMAC1=y .endif +.if ${MK_OPENSSL} != "no" +CFLAGS+=-DCONFIG_PASN +.endif + .if !empty(CFLAGS:M*-DEAP_AKA) NEED_SIM_COMMON=y NEED_AES_CBC=y diff --git a/usr.sbin/wpa/src/tls/Makefile b/usr.sbin/wpa/src/tls/Makefile index e5fdf96444d6..fbb57b9c4c10 100644 --- a/usr.sbin/wpa/src/tls/Makefile +++ b/usr.sbin/wpa/src/tls/Makefile @@ -29,13 +29,14 @@ SRCS+= asn1.c \ tlsv1_server_read.c \ tlsv1_server_write.c \ x509v3.c -.endif -.endif CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \ - -DCONFIG_CRYPTO_INTERNAL \ - -DCONFIG_TLSV11 \ + -DCONFIG_CRYPTO_INTERNAL +.else +CFLAGS+=-DCONFIG_TLSV11 \ -DCONFIG_TLSV12 +.endif +.endif # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index 8e7edfcf7720..fb045f804977 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -27,7 +27,6 @@ SRCS= bss.c \ notify.c \ op_classes.c \ offchannel.c \ - pasn_supplicant.c \ robust_av.c \ rrm.c \ scan.c \ @@ -37,6 +36,10 @@ SRCS= bss.c \ wpa_supplicant.c \ wpas_glue.c +.if ${MK_OPENSSL} != "no" +SRCS+= pasn_supplicant.c +.endif + MAN= wpa_supplicant.8 wpa_supplicant.conf.5 .if ${MK_EXAMPLES} != "no" From nobody Sun Nov 21 01:31:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2954F18A83F4; Sun, 21 Nov 2021 01:31: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 4HxXtS72PRz3Jc7; Sun, 21 Nov 2021 01:31:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D94E26521; Sun, 21 Nov 2021 01:31: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 1AL1VSX6034131; Sun, 21 Nov 2021 01:31:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AL1VSl5034130; Sun, 21 Nov 2021 01:31:28 GMT (envelope-from git) Date: Sun, 21 Nov 2021 01:31:28 GMT Message-Id: <202111210131.1AL1VSl5034130@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: ec9a2f80fcc7 - stable/13 - wpa: Fix WITHOUT_WPA_SUPPLICANT_EAPOL build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ec9a2f80fcc7d7b74f6ac50f4e36933e437e15ee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ec9a2f80fcc7d7b74f6ac50f4e36933e437e15ee commit ec9a2f80fcc7d7b74f6ac50f4e36933e437e15ee Author: Cy Schubert AuthorDate: 2021-11-10 03:05:03 +0000 Commit: Cy Schubert CommitDate: 2021-11-21 01:30:49 +0000 wpa: Fix WITHOUT_WPA_SUPPLICANT_EAPOL build Reported by: FreeBSD Build Option Survey https://callfortesting.org/results/bos-2021-11-04/ Fixes: c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5 (cherry picked from commit c9516b83c14f2dcec57bd175e418c152a0cec947) --- usr.sbin/wpa/Makefile.inc | 12 ++++++------ usr.sbin/wpa/src/ap/Makefile | 9 ++++++--- usr.sbin/wpa/src/crypto/Makefile | 2 -- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index 5c5a6b403225..5ce7dee4d2c5 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -42,11 +42,6 @@ CFLAGS+=-DCONFIG_IEEE80211R CFLAGS+=-DCONFIG_IEEE80211W CFLAGS+=-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\" CFLAGS+=-DCONFIG_DEBUG_SYSLOG -CFLAGS+=-DCONFIG_WPS -CFLAGS+=-DCONFIG_WPS2 -CFLAGS+=-DCONFIG_WPS_UPNP -CFLAGS+=-DCONFIG_WPS_OOB -CFLAGS+=-DCONFIG_INTERWORKING CFLAGS+=-DPKCS12_FUNCS CFLAGS+=-DCONFIG_GAS CFLAGS+=-DCONFIG_PEERKEY @@ -84,7 +79,12 @@ CFLAGS+=-DCONFIG_HS20 \ -DEAP_TLS \ -DEAP_TTLS \ -DEAP_WSC \ - -DIEEE8021X_EAPOL + -DIEEE8021X_EAPOL \ + -DCONFIG_INTERWORKING \ + -DCONFIG_WPS \ + -DCONFIG_WPS2 \ + -DCONFIG_WPS_UPNP \ + -DCONFIG_WPS_OOB NEED_AES_EAX=y NEED_AES_ENCBLOCK=y NEED_AES_OMAC1=y diff --git a/usr.sbin/wpa/src/ap/Makefile b/usr.sbin/wpa/src/ap/Makefile index 162b8b5444aa..801f45fca8a6 100644 --- a/usr.sbin/wpa/src/ap/Makefile +++ b/usr.sbin/wpa/src/ap/Makefile @@ -20,9 +20,7 @@ SRCS= accounting.c \ dfs.c \ drv_callbacks.c \ eap_user_db.c \ - gas_serv.c \ hostapd.c \ - hs20.c \ ieee802_11_auth.c \ ieee802_11_ht.c \ ieee802_11_shared.c \ @@ -43,8 +41,13 @@ SRCS= accounting.c \ wnm_ap.c \ wpa_auth.c \ wpa_auth_glue.c \ - wpa_auth_ie.c \ + wpa_auth_ie.c + +.if ${MK_WPA_SUPPLICANT_EAPOL} != "no" +SRCS+= gas_serv.c \ + hs20.c \ wps_hostapd.c +.endif CFLAGS+=-DHOSTAPD diff --git a/usr.sbin/wpa/src/crypto/Makefile b/usr.sbin/wpa/src/crypto/Makefile index eede671aa7db..d71b740bb816 100644 --- a/usr.sbin/wpa/src/crypto/Makefile +++ b/usr.sbin/wpa/src/crypto/Makefile @@ -138,9 +138,7 @@ SRCS+= dh_group5.c SRCS+= dh_groups.c .endif -.if ${MK_WPA_SUPPLICANT_EAPOL} != "no" SRCS+= ms_funcs.c -.endif CFLAGS+=-DCONFIG_CRYPTO_INTERNAL \ -DCONFIG_TLS_INTERNAL_CLIENT \ From nobody Sun Nov 21 10:04:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AAA9D189D9B5; Sun, 21 Nov 2021 10:04: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 4HxmGB1q6Fz3rYY; Sun, 21 Nov 2021 10:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1AE5356AA; Sun, 21 Nov 2021 10:04: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 1ALA4Ina017171; Sun, 21 Nov 2021 10:04:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALA4I2g017170; Sun, 21 Nov 2021 10:04:18 GMT (envelope-from git) Date: Sun, 21 Nov 2021 10:04:18 GMT Message-Id: <202111211004.1ALA4I2g017170@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: ad235cff36a1 - stable/12 - camcontrol: dump received data for MMC command even if it is unknown List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ad235cff36a132bb21a9cef78afcabb1a14140e7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=ad235cff36a132bb21a9cef78afcabb1a14140e7 commit ad235cff36a132bb21a9cef78afcabb1a14140e7 Author: Andriy Gapon AuthorDate: 2021-11-06 10:23:55 +0000 Commit: Andriy Gapon CommitDate: 2021-11-21 10:02:51 +0000 camcontrol: dump received data for MMC command even if it is unknown For example, EXT_CSD can be read like this: # camcontrol mmcsdcmd 2:0:0 -c 8 -a 0 -f 0x35 -l 512 CMD 8 arg 0 flags 35 MMCIO: error 0, 00000900 00000000 00000000 00000000 No command-specific decoder for CMD 8 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 0010 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |9...............| ... 0100 00 00 00 00 00 00 00 00 01 08 00 01 02 02 00 00 |................| ... 01e0 00 00 00 00 00 00 00 00 00 81 c7 00 00 01 03 07 |................| 01f0 05 00 03 01 3f 3f 01 01 01 00 00 00 00 00 00 00 |....??..........| (cherry picked from commit c01a46d4acab923961dfb7e4605b9ca6e775e616) --- sbin/camcontrol/camcontrol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 0b8b9e57fb43..a6cadfd20978 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -8118,6 +8118,8 @@ mmcsdcmd(struct cam_device *device, int argc, char **argv, char *combinedopt, break; default: printf("No command-specific decoder for CMD %d\n", mmc_opcode); + if (mmc_data_len > 0) + hexdump(mmc_data, mmc_data_len, NULL, 0); } } mmccmd_bailout: From nobody Sun Nov 21 10:05:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 28CDC189F38F; Sun, 21 Nov 2021 10:05: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 4HxmHq0bS7z3srt; Sun, 21 Nov 2021 10:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E9B10581C; Sun, 21 Nov 2021 10:05: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 1ALA5gox017388; Sun, 21 Nov 2021 10:05:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALA5g7L017387; Sun, 21 Nov 2021 10:05:42 GMT (envelope-from git) Date: Sun, 21 Nov 2021 10:05:42 GMT Message-Id: <202111211005.1ALA5g7L017387@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: ee82e15cd9fc - stable/13 - pcf8574: driver for 8-pin quasi-bidirectional GPIO over I2C List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ee82e15cd9fc8387c06295bc59839ab0cf2f8e10 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=ee82e15cd9fc8387c06295bc59839ab0cf2f8e10 commit ee82e15cd9fc8387c06295bc59839ab0cf2f8e10 Author: Andriy Gapon AuthorDate: 2020-10-01 09:48:56 +0000 Commit: Andriy Gapon CommitDate: 2021-11-21 09:59:34 +0000 pcf8574: driver for 8-pin quasi-bidirectional GPIO over I2C (cherry picked from commit 6354154ef520d359492badf0de9c8ae5d7080ae7) --- share/man/man4/Makefile | 1 + share/man/man4/pcf8574.4 | 98 +++++++++ sys/conf/files | 1 + sys/dev/iicbus/gpio/pcf8574.c | 425 +++++++++++++++++++++++++++++++++++++++ sys/modules/i2c/Makefile | 1 + sys/modules/i2c/pcf8574/Makefile | 18 ++ 6 files changed, 544 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index f5aaa2b616a6..e8c0a5651ff8 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -425,6 +425,7 @@ MAN= aac.4 \ pccard.4 \ pccbb.4 \ pcf.4 \ + pcf8574.4 \ pcf8591.4 \ ${_pchtherm.4} \ pci.4 \ diff --git a/share/man/man4/pcf8574.4 b/share/man/man4/pcf8574.4 new file mode 100644 index 000000000000..9fdf71874063 --- /dev/null +++ b/share/man/man4/pcf8574.4 @@ -0,0 +1,98 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2020 Andriy Gapon +.\" +.\" 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$ +.\" +.Dd November 6, 2021 +.Dt PCF8574 4 +.Os +.Sh NAME +.Nm pcf8574 +.Nd driver for the PCF8574 8-bit I2C IO expander +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device pcf8574" +.Cd "device gpio" +.Cd "device iicbus" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +pcf8574_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides +.Xr gpiobus 4 +control over 8 GPIO pins. +The pins are quasi-bidirectional. +Only low output can be actively driven. +High output is equivalent to input. +.Pp +On an +.Xr FDT 4 +based system the following properties must be set: +.Bl -tag -width "compatible" +.It Va compatible +Must be set to "nxp,pcf8574". +.It Va reg +The I2C address of +.Nm . +.El +.Pp +The DTS part for a +.Nm +device usually looks like: +.Bd -literal +/ { + + ... + pcf8574@27 { + compatible = "nxp,pcf8574"; + reg = <0x27>; + }; +}; +.Ed +.Sh SEE ALSO +.Xr fdt 4 , +.Xr gpiobus 4 , +.Xr iicbus 4 +.Sh HISTORY +The +.Nm +driver and this manual page was written by +.An Andriy Gapon Aq Mt avg@FreeBSD.org . +.Sh BUGS +The +.Nm +driver does not support the input change interrupt +that the hardware provides. diff --git a/sys/conf/files b/sys/conf/files index a9f67bcf46f7..5051a38b2997 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1886,6 +1886,7 @@ dev/iicbus/mux/iic_gpiomux.c optional iic_gpiomux fdt dev/iicbus/mux/ltc430x.c optional ltc430x dev/iicbus/nxprtc.c optional nxprtc | pcf8563 dev/iicbus/ofw_iicbus.c optional fdt iicbus +dev/iicbus/pcf8574.c optional pcf8574 dev/iicbus/pcf8591.c optional pcf8591 dev/iicbus/rtc8583.c optional rtc8583 dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt diff --git a/sys/dev/iicbus/gpio/pcf8574.c b/sys/dev/iicbus/gpio/pcf8574.c new file mode 100644 index 000000000000..6fa544ac3283 --- /dev/null +++ b/sys/dev/iicbus/gpio/pcf8574.c @@ -0,0 +1,425 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) Andriy Gapon + * + * 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. + * + */ + +/* + * Driver for PCF8574 / PCF8574A 8-bit I/O expander + * with quasi-bidirectional I/O. + * There is no separate mode / configuration register. + * Pins are set and queried via a single register. + * Because of that we have to maintain the state in the driver + * and assume that there is no outside meddling with the device. + * See the datasheet for details. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include + +#ifdef FDT +#include +#include +#include +#endif + +#include +#include + +#include + +#include "gpio_if.h" + +#define NUM_PINS 8 +#define PIN_CAPS (GPIO_PIN_OUTPUT | GPIO_PIN_INPUT) + +#define dbg_dev_printf(dev, fmt, args...) \ + if (bootverbose) device_printf(dev, fmt, ##args) + +struct pcf8574_softc { + device_t dev; + device_t busdev; + struct sx lock; + uint8_t addr; + uint8_t output_mask; + uint8_t output_state; +}; + +#ifdef FDT +static struct ofw_compat_data compat_data[] = { + { "nxp,pcf8574", 1 }, + { "nxp,pcf8574a", 1 }, + { NULL, 0 } +}; +#endif + +static int +pcf8574_read(struct pcf8574_softc *sc, uint8_t *val) +{ + struct iic_msg msg; + int error; + + msg.slave = sc->addr; + msg.flags = IIC_M_RD; + msg.len = 1; + msg.buf = val; + + error = iicbus_transfer_excl(sc->dev, &msg, 1, IIC_WAIT); + return (iic2errno(error)); +} + +static int +pcf8574_write(struct pcf8574_softc *sc, uint8_t val) +{ + struct iic_msg msg; + int error; + + msg.slave = sc->addr; + msg.flags = IIC_M_WR; + msg.len = 1; + msg.buf = &val; + + error = iicbus_transfer_excl(sc->dev, &msg, 1, IIC_WAIT); + return (iic2errno(error)); +} + +static int +pcf8574_probe(device_t dev) +{ + +#ifdef FDT + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); +#endif + device_set_desc(dev, "PCF8574 I/O expander"); + return (BUS_PROBE_DEFAULT); +} + +static int +pcf8574_attach(device_t dev) +{ + struct pcf8574_softc *sc; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->addr = iicbus_get_addr(dev); + + /* Treat everything as input because there is no way to tell. */ + sc->output_mask = 0; + sc->output_state = 0xff; + + /* Put the device to a safe, known state. */ + (void)pcf8574_write(sc, 0xff); + + sx_init(&sc->lock, "pcf8574"); + sc->busdev = gpiobus_attach_bus(dev); + if (sc->busdev == NULL) { + device_printf(dev, "Could not create busdev child\n"); + sx_destroy(&sc->lock); + return (ENXIO); + } + return (0); +} + +static int +pcf8574_detach(device_t dev) +{ + struct pcf8574_softc *sc; + + sc = device_get_softc(dev); + + if (sc->busdev != NULL) + gpiobus_detach_bus(sc->busdev); + + sx_destroy(&sc->lock); + return (0); +} + +static device_t +pcf8574_get_bus(device_t dev) +{ + struct pcf8574_softc *sc; + + sc = device_get_softc(dev); + return (sc->busdev); +} + +static int +pcf8574_pin_max(device_t dev __unused, int *maxpin) +{ + *maxpin = NUM_PINS - 1; + return (0); +} + +static int +pcf8574_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) +{ + + if (pin >= NUM_PINS) + return (EINVAL); + *caps = PIN_CAPS; + return (0); +} + +static int +pcf8574_pin_getflags(device_t dev, uint32_t pin, uint32_t *pflags) +{ + struct pcf8574_softc *sc; + uint8_t val, stale; + int error; + + sc = device_get_softc(dev); + + if (pin >= NUM_PINS) + return (EINVAL); + + sx_xlock(&sc->lock); + error = pcf8574_read(sc, &val); + if (error != 0) { + dbg_dev_printf(dev, "failed to read from device: %d\n", + error); + sx_xunlock(&sc->lock); + return (error); + } + + /* + * Check for pins whose read value is one, but they are configured + * as outputs with low signal. This is an impossible combination, + * so change their view to be inputs. + */ + stale = val & sc->output_mask & ~sc->output_state; + sc->output_mask &= ~stale; + sc->output_state |= stale; + + if ((sc->output_mask & (1 << pin)) != 0) + *pflags = GPIO_PIN_OUTPUT; + else + *pflags = GPIO_PIN_INPUT; + sx_xunlock(&sc->lock); + + return (0); +} + +static int +pcf8574_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) +{ + struct pcf8574_softc *sc; + int error; + uint8_t val; + bool update_needed; + + sc = device_get_softc(dev); + + if (pin >= NUM_PINS) + return (EINVAL); + if ((flags & ~PIN_CAPS) != 0) + return (EINVAL); + + sx_xlock(&sc->lock); + if ((flags & GPIO_PIN_OUTPUT) != 0) { + sc->output_mask |= 1 << pin; + update_needed = false; + } else if ((flags & GPIO_PIN_INPUT) != 0) { + sc->output_mask &= ~(1 << pin); + sc->output_state |= 1 << pin; + update_needed = true; + } else { + KASSERT(false, ("both input and output modes requested")); + update_needed = false; + } + + if (update_needed) { + val = sc->output_state | ~sc->output_mask; + error = pcf8574_write(sc, val); + if (error != 0) + dbg_dev_printf(dev, "failed to write to device: %d\n", + error); + } + sx_xunlock(&sc->lock); + + return (0); +} + +static int +pcf8574_pin_getname(device_t dev, uint32_t pin, char *name) +{ + + if (pin >= NUM_PINS) + return (EINVAL); + snprintf(name, GPIOMAXNAME, "P%d", pin); + return (0); +} + +static int +pcf8574_pin_get(device_t dev, uint32_t pin, unsigned int *on) +{ + struct pcf8574_softc *sc; + uint8_t val; + int error; + + sc = device_get_softc(dev); + + sx_xlock(&sc->lock); + if ((sc->output_mask & (1 << pin)) != 0) { + *on = (sc->output_state & (1 << pin)) != 0; + sx_xunlock(&sc->lock); + return (0); + } + + error = pcf8574_read(sc, &val); + if (error != 0) { + dbg_dev_printf(dev, "failed to read from device: %d\n", error); + sx_xunlock(&sc->lock); + return (error); + } + sx_xunlock(&sc->lock); + + *on = (val & (1 << pin)) != 0; + return (0); +} + +static int +pcf8574_pin_set(device_t dev, uint32_t pin, unsigned int on) +{ + struct pcf8574_softc *sc; + uint8_t val; + int error; + + sc = device_get_softc(dev); + + if (pin >= NUM_PINS) + return (EINVAL); + + sx_xlock(&sc->lock); + + if ((sc->output_mask & (1 << pin)) == 0) { + sx_xunlock(&sc->lock); + return (EINVAL); + } + + /* + * Algorithm: + * - set all outputs to their recorded state; + * - set all inputs to the high state; + * - apply the requested change. + */ + val = sc->output_state | ~sc->output_mask; + val &= ~(1 << pin); + val |= (on != 0) << pin; + + error = pcf8574_write(sc, val); + if (error != 0) { + dbg_dev_printf(dev, "failed to write to device: %d\n", error); + sx_xunlock(&sc->lock); + return (error); + } + + /* + * NB: we can record anything as "output" state of input pins. + * By convention and for convenience it will be recorded as 1. + */ + sc->output_state = val; + sx_xunlock(&sc->lock); + return (0); +} + +static int +pcf8574_pin_toggle(device_t dev, uint32_t pin) +{ + struct pcf8574_softc *sc; + uint8_t val; + int error; + + sc = device_get_softc(dev); + + if (pin >= NUM_PINS) + return (EINVAL); + + sx_xlock(&sc->lock); + + if ((sc->output_mask & (1 << pin)) == 0) { + sx_xunlock(&sc->lock); + return (EINVAL); + } + + val = sc->output_state | ~sc->output_mask; + val ^= 1 << pin; + + error = pcf8574_write(sc, val); + if (error != 0) { + dbg_dev_printf(dev, "failed to write to device: %d\n", error); + sx_xunlock(&sc->lock); + return (error); + } + + sc->output_state = val; + sx_xunlock(&sc->lock); + return (0); +} + +static device_method_t pcf8574_methods[] = { + DEVMETHOD(device_probe, pcf8574_probe), + DEVMETHOD(device_attach, pcf8574_attach), + DEVMETHOD(device_detach, pcf8574_detach), + + /* GPIO methods */ + DEVMETHOD(gpio_get_bus, pcf8574_get_bus), + DEVMETHOD(gpio_pin_max, pcf8574_pin_max), + DEVMETHOD(gpio_pin_getcaps, pcf8574_pin_getcaps), + DEVMETHOD(gpio_pin_getflags, pcf8574_pin_getflags), + DEVMETHOD(gpio_pin_setflags, pcf8574_pin_setflags), + DEVMETHOD(gpio_pin_getname, pcf8574_pin_getname), + DEVMETHOD(gpio_pin_get, pcf8574_pin_get), + DEVMETHOD(gpio_pin_set, pcf8574_pin_set), + DEVMETHOD(gpio_pin_toggle, pcf8574_pin_toggle), + + DEVMETHOD_END +}; + +static driver_t pcf8574_driver = { + "gpio", + pcf8574_methods, + sizeof(struct pcf8574_softc) +}; + +static devclass_t pcf8574_devclass; + +DRIVER_MODULE(pcf8574, iicbus, pcf8574_driver, pcf8574_devclass, 0, 0); +MODULE_DEPEND(pcf8574, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); +MODULE_DEPEND(pcf8574, gpiobus, 1, 1, 1); +MODULE_VERSION(pcf8574, 1); +#ifdef FDT +IICBUS_FDT_PNP_INFO(compat_data); +#endif diff --git a/sys/modules/i2c/Makefile b/sys/modules/i2c/Makefile index 483eb012bb95..9fea714975f7 100644 --- a/sys/modules/i2c/Makefile +++ b/sys/modules/i2c/Makefile @@ -21,6 +21,7 @@ SUBDIR = \ max44009 \ mux \ nxprtc \ + pcf8574 \ pcf8591 \ rtc8583 \ s35390a \ diff --git a/sys/modules/i2c/pcf8574/Makefile b/sys/modules/i2c/pcf8574/Makefile new file mode 100644 index 000000000000..7c4fe37297e4 --- /dev/null +++ b/sys/modules/i2c/pcf8574/Makefile @@ -0,0 +1,18 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/iicbus/gpio/ +KMOD = pcf8574 +SRCS = pcf8574.c + +SRCS+= \ + bus_if.h \ + device_if.h \ + gpio_if.h \ + iicbus_if.h \ + opt_platform.h \ + +.if !empty(OPT_FDT) +SRCS+= ofw_bus_if.h +.endif + +.include From nobody Sun Nov 21 10:05:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8DA05189EF7E; Sun, 21 Nov 2021 10:05: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 4HxmHr2Kshz3ss2; Sun, 21 Nov 2021 10:05:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20106581D; Sun, 21 Nov 2021 10:05: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 1ALA5hBb017418; Sun, 21 Nov 2021 10:05:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALA5hiB017417; Sun, 21 Nov 2021 10:05:43 GMT (envelope-from git) Date: Sun, 21 Nov 2021 10:05:43 GMT Message-Id: <202111211005.1ALA5hiB017417@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 128a6d31f2dc - stable/13 - camcontrol: dump received data for MMC command even if it is unknown List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 128a6d31f2dc59a9869dd852ab2a2343406e53c6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=128a6d31f2dc59a9869dd852ab2a2343406e53c6 commit 128a6d31f2dc59a9869dd852ab2a2343406e53c6 Author: Andriy Gapon AuthorDate: 2021-11-06 10:23:55 +0000 Commit: Andriy Gapon CommitDate: 2021-11-21 10:00:42 +0000 camcontrol: dump received data for MMC command even if it is unknown For example, EXT_CSD can be read like this: # camcontrol mmcsdcmd 2:0:0 -c 8 -a 0 -f 0x35 -l 512 CMD 8 arg 0 flags 35 MMCIO: error 0, 00000900 00000000 00000000 00000000 No command-specific decoder for CMD 8 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 0010 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |9...............| ... 0100 00 00 00 00 00 00 00 00 01 08 00 01 02 02 00 00 |................| ... 01e0 00 00 00 00 00 00 00 00 00 81 c7 00 00 01 03 07 |................| 01f0 05 00 03 01 3f 3f 01 01 01 00 00 00 00 00 00 00 |....??..........| (cherry picked from commit c01a46d4acab923961dfb7e4605b9ca6e775e616) --- sbin/camcontrol/camcontrol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 27d545d924b3..35272bcdc8ed 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -8170,6 +8170,8 @@ mmcsdcmd(struct cam_device *device, int argc, char **argv, char *combinedopt, break; default: printf("No command-specific decoder for CMD %d\n", mmc_opcode); + if (mmc_data_len > 0) + hexdump(mmc_data, mmc_data_len, NULL, 0); } } mmccmd_bailout: From nobody Sun Nov 21 10:05:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3DDCB189F480; Sun, 21 Nov 2021 10:05: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 4HxmHs5C85z3sl0; Sun, 21 Nov 2021 10:05:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34D9C56AD; Sun, 21 Nov 2021 10:05: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 1ALA5jdA017443; Sun, 21 Nov 2021 10:05:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALA5jLp017442; Sun, 21 Nov 2021 10:05:45 GMT (envelope-from git) Date: Sun, 21 Nov 2021 10:05:45 GMT Message-Id: <202111211005.1ALA5jLp017442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 9d7c92dbb9bf - stable/13 - add rk3328 overlay for enabling analog sound List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9d7c92dbb9bffae557d572c14eb43015e00b8259 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=9d7c92dbb9bffae557d572c14eb43015e00b8259 commit 9d7c92dbb9bffae557d572c14eb43015e00b8259 Author: Andriy Gapon AuthorDate: 2021-06-09 07:43:39 +0000 Commit: Andriy Gapon CommitDate: 2021-11-21 10:04:42 +0000 add rk3328 overlay for enabling analog sound (cherry picked from commit 00c06804a87c5ddbd91f188280331e3076c1b81c) --- sys/dts/arm64/overlays/rk3328-analog-sound.dtso | 12 ++++++++++++ sys/modules/dtb/rockchip/Makefile | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/dts/arm64/overlays/rk3328-analog-sound.dtso b/sys/dts/arm64/overlays/rk3328-analog-sound.dtso new file mode 100644 index 000000000000..c73635ce3b4e --- /dev/null +++ b/sys/dts/arm64/overlays/rk3328-analog-sound.dtso @@ -0,0 +1,12 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "rockchip,rk3328"; +}; + +&{/analog-sound} { + status = "okay"; +}; + +/* vim: set ft=dts: */ diff --git a/sys/modules/dtb/rockchip/Makefile b/sys/modules/dtb/rockchip/Makefile index 20df656bd148..7722a56df023 100644 --- a/sys/modules/dtb/rockchip/Makefile +++ b/sys/modules/dtb/rockchip/Makefile @@ -15,7 +15,8 @@ DTS= \ rockchip/rk3399-firefly.dts \ rockchip/rk3399-rockpro64.dts -DTSO= rk3328-dwc3.dtso \ +DTSO= rk3328-analog-sound.dtso \ + rk3328-dwc3.dtso \ rk3399-mmc0-disable.dtso \ rk3399-mmc1-disable.dtso \ rk3399-sdhci-disable.dtso From nobody Sun Nov 21 10:05:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 486DD189F32D; Sun, 21 Nov 2021 10:05: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 4HxmHt54Mtz3ssC; Sun, 21 Nov 2021 10:05:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62BD757D6; Sun, 21 Nov 2021 10:05: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 1ALA5kFi017467; Sun, 21 Nov 2021 10:05:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALA5kam017466; Sun, 21 Nov 2021 10:05:46 GMT (envelope-from git) Date: Sun, 21 Nov 2021 10:05:46 GMT Message-Id: <202111211005.1ALA5kam017466@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 1f39ef9fa810 - stable/13 - rk805: add system poweroff 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: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1f39ef9fa810201e64f2f1fcd306d6d991bfc58b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=1f39ef9fa810201e64f2f1fcd306d6d991bfc58b commit 1f39ef9fa810201e64f2f1fcd306d6d991bfc58b Author: Andriy Gapon AuthorDate: 2021-11-06 17:58:43 +0000 Commit: Andriy Gapon CommitDate: 2021-11-21 10:05:18 +0000 rk805: add system poweroff support On my Rock64 neither EFI nor PSCI shutdown actually power off the board. RK805 does the job. (cherry picked from commit cc0b35259aed73747721718415fa1854108a276a) --- sys/arm64/rockchip/rk805.c | 36 ++++++++++++++++++++++++++++++++++++ sys/arm64/rockchip/rk805reg.h | 4 ++++ 2 files changed, 40 insertions(+) diff --git a/sys/arm64/rockchip/rk805.c b/sys/arm64/rockchip/rk805.c index d3e04081aeb2..39755fa5ce87 100644 --- a/sys/arm64/rockchip/rk805.c +++ b/sys/arm64/rockchip/rk805.c @@ -31,8 +31,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include @@ -737,6 +739,29 @@ rk805_settime(device_t dev, struct timespec *ts) return (error); } +static void +rk805_poweroff(void *arg, int howto) +{ + device_t dev = arg; + int error; + uint8_t val; + + if ((howto & RB_POWEROFF) == 0) + return; + + device_printf(dev, "Powering off...\n"); + error = rk805_read(dev, RK805_DEV_CTRL, &val, 1); + if (error == 0) { + val |= RK805_DEV_CTRL_OFF; + error = rk805_write(dev, RK805_DEV_CTRL, &val, 1); + + /* Wait a bit for the command to take effect. */ + if (error == 0) + DELAY(100); + } + device_printf(dev, "Power off failed\n"); +} + static int rk805_attach(device_t dev) { @@ -797,6 +822,17 @@ rk805_attach(device_t dev) } } + if (OF_hasprop(ofw_bus_get_node(dev), + "rockchip,system-power-controller")) { + /* + * The priority is chosen to override PSCI and EFI shutdown + * methods as those two just hang without powering off on Rock64 + * at least. + */ + EVENTHANDLER_REGISTER(shutdown_final, rk805_poweroff, dev, + SHUTDOWN_PRI_LAST - 2); + } + return (0); } diff --git a/sys/arm64/rockchip/rk805reg.h b/sys/arm64/rockchip/rk805reg.h index b1f4481a5b68..61c6f49abd2c 100644 --- a/sys/arm64/rockchip/rk805reg.h +++ b/sys/arm64/rockchip/rk805reg.h @@ -93,6 +93,10 @@ #define RK808_LDO8_ON_VSEL 0x49 #define RK808_LDO8_SLEEP_VSEL 0x4A +#define RK805_DEV_CTRL 0x4B +#define RK805_DEV_CTRL_OFF (1 << 0) +#define RK805_DEV_CTRL_SLP (1 << 1) + enum rk805_regulator { RK805_DCDC1 = 0, RK805_DCDC2, From nobody Sun Nov 21 15:59:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C2D0118968B2; Sun, 21 Nov 2021 15:59: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 4Hxw7S5D51z3hRg; Sun, 21 Nov 2021 15:59:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9315111FF8; Sun, 21 Nov 2021 15:59: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 1ALFx0bA081630; Sun, 21 Nov 2021 15:59:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALFx0Jg081629; Sun, 21 Nov 2021 15:59:00 GMT (envelope-from git) Date: Sun, 21 Nov 2021 15:59:00 GMT Message-Id: <202111211559.1ALFx0Jg081629@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: a8837c77efd0 - main - mpr: fix freeze / release mismatch in timeout 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: a8837c77efd0bb9d934657edf87a9a66baac7479 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a8837c77efd0bb9d934657edf87a9a66baac7479 commit a8837c77efd0bb9d934657edf87a9a66baac7479 Author: Warner Losh AuthorDate: 2021-11-21 15:50:46 +0000 Commit: Warner Losh CommitDate: 2021-11-21 15:54:45 +0000 mpr: fix freeze / release mismatch in timeout code So, if we're processing a timeout, and we've sent an ABORT to the firmware for that timeout, but not yet received the response from the firmware, AND we get another timeout, we queue the timeout and freeze the queue. However, when we've finally processed them all, we only release the queue once. This causes all I/O to halt as the devq remains frozen forever. Instead, only freeze the queue when we start the process (eg set INRESET on the target). This will allow the release when all the timed out I/Os have finished ABORTing. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D33054 --- sys/dev/mpr/mpr_sas.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index aace724e16f2..a4872dcc769e 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -248,7 +248,8 @@ mprsas_free_tm(struct mpr_softc *sc, struct mpr_command *tm) * INRESET flag as well or scsi I/O will not work. */ if (tm->cm_ccb) { - mpr_dprint(sc, MPR_XINFO, "Unfreezing devq for target ID %d\n", + mpr_dprint(sc, MPR_XINFO | MPR_RECOVERY, + "Unfreezing devq for target ID %d\n", tm->cm_targ->tid); tm->cm_targ->flags &= ~MPRSAS_TARGET_INRESET; xpt_release_devq(tm->cm_ccb->ccb_h.path, 1, TRUE); @@ -1924,6 +1925,9 @@ mprsas_action_scsiio(struct mprsas_softc *sassc, union ccb *ccb) */ if (targ->flags & MPRSAS_TARGET_INRESET) { ccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_DEV_QFRZN; + mpr_dprint(sc, MPR_XINFO | MPR_RECOVERY, + "%s: Freezing devq for target ID %d\n", + __func__, targ->tid); xpt_freeze_devq(ccb->ccb_h.path, 1); xpt_done(ccb); return; @@ -2513,8 +2517,8 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm) if ((sassc->flags & MPRSAS_QUEUE_FROZEN) == 0) { xpt_freeze_simq(sassc->sim, 1); sassc->flags |= MPRSAS_QUEUE_FROZEN; - mpr_dprint(sc, MPR_XINFO, "Error sending command, " - "freezing SIM queue\n"); + mpr_dprint(sc, MPR_XINFO | MPR_RECOVERY, + "Error sending command, freezing SIM queue\n"); } } @@ -2549,7 +2553,7 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm) if (sassc->flags & MPRSAS_QUEUE_FROZEN) { ccb->ccb_h.status |= CAM_RELEASE_SIMQ; sassc->flags &= ~MPRSAS_QUEUE_FROZEN; - mpr_dprint(sc, MPR_XINFO, + mpr_dprint(sc, MPR_XINFO | MPR_RECOVERY, "Unfreezing SIM queue\n"); } } @@ -2817,7 +2821,7 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm) if (sassc->flags & MPRSAS_QUEUE_FROZEN) { ccb->ccb_h.status |= CAM_RELEASE_SIMQ; sassc->flags &= ~MPRSAS_QUEUE_FROZEN; - mpr_dprint(sc, MPR_XINFO, "Command completed, unfreezing SIM " + mpr_dprint(sc, MPR_INFO, "Command completed, unfreezing SIM " "queue\n"); } @@ -3425,6 +3429,11 @@ mprsas_async(void *callback_arg, uint32_t code, struct cam_path *path, * the target until the reset has completed. The CCB holds the path which * is used to release the devq. The devq is released and the CCB is freed * when the TM completes. + * We only need to do this when we're entering reset, not at each time we + * need to send an abort (which will happen if multiple commands timeout + * while we're sending the abort). We do not release the queue for each + * command we complete (just at the end when we free the tm), so freezing + * it each time doesn't make sense. */ void mprsas_prepare_for_tm(struct mpr_softc *sc, struct mpr_command *tm, @@ -3440,13 +3449,15 @@ mprsas_prepare_for_tm(struct mpr_softc *sc, struct mpr_command *tm, target->tid, lun_id) != CAM_REQ_CMP) { xpt_free_ccb(ccb); } else { - mpr_dprint(sc, MPR_XINFO, - "%s: Freezing devq for target ID %d\n", - __func__, target->tid); - xpt_freeze_devq(ccb->ccb_h.path, 1); tm->cm_ccb = ccb; tm->cm_targ = target; - target->flags |= MPRSAS_TARGET_INRESET; + if ((target->flags & MPRSAS_TARGET_INRESET) == 0) { + mpr_dprint(sc, MPR_XINFO | MPR_RECOVERY, + "%s: Freezing devq for target ID %d\n", + __func__, target->tid); + xpt_freeze_devq(ccb->ccb_h.path, 1); + target->flags |= MPRSAS_TARGET_INRESET; + } } } } From nobody Sun Nov 21 15:59:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 855AA18967E0; Sun, 21 Nov 2021 15:59: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 4Hxw7V0kFWz3hnK; Sun, 21 Nov 2021 15:59:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D579711E4D; Sun, 21 Nov 2021 15:59: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 1ALFx1p7081654; Sun, 21 Nov 2021 15:59:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALFx1qV081653; Sun, 21 Nov 2021 15:59:01 GMT (envelope-from git) Date: Sun, 21 Nov 2021 15:59:01 GMT Message-Id: <202111211559.1ALFx1qV081653@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: a8935083b518 - main - devmatch: Allow devmatch_blocklist to be set in kenv 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: a8935083b5181b0a56d26cad7191ef138228befd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a8935083b5181b0a56d26cad7191ef138228befd commit a8935083b5181b0a56d26cad7191ef138228befd Author: Warner Losh AuthorDate: 2021-11-21 15:50:51 +0000 Commit: Warner Losh CommitDate: 2021-11-21 15:54:45 +0000 devmatch: Allow devmatch_blocklist to be set in kenv too Add in all the variables set in the kenv variable devmatch_blocklist too. This allows blocking autoloading from the boot loader. Sponsored by: Netflix Reviewed by: 0mp Differential Revision: https://reviews.freebsd.org/D32171 --- libexec/rc/rc.d/devmatch | 2 +- sbin/devmatch/devmatch.8 | 3 ++- share/man/man5/rc.conf.5 | 8 +++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/libexec/rc/rc.d/devmatch b/libexec/rc/rc.d/devmatch index f5b8e8e51071..f7925321eebe 100755 --- a/libexec/rc/rc.d/devmatch +++ b/libexec/rc/rc.d/devmatch @@ -64,7 +64,7 @@ devmatch_start() # names with .ko devctl freeze - x=$(echo '#'${devmatch_blocklist:-${devmatch_blacklist}}'#' | \ + x=$(echo "#${devmatch_blocklist:-${devmatch_blacklist}}#$(kenv -q devmatch_blocklist)#" | \ sed -e "s/ /#/g;s/\.ko#/#/g") for m in ${list}; do m="${m%.ko}" diff --git a/sbin/devmatch/devmatch.8 b/sbin/devmatch/devmatch.8 index 914dacf58fdc..11cf844bef9f 100644 --- a/sbin/devmatch/devmatch.8 +++ b/sbin/devmatch/devmatch.8 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2020 +.Dd November 21, 2021 .Dt DEVMATCH 8 .Os .Sh NAME @@ -67,6 +67,7 @@ tables with that PNP info can not be found. Produce more verbose output. .El .Sh SEE ALSO +.Xr rc.conf 5 , .Xr devinfo 8 , .Xr MODULE_PNP_INFO 9 .Sh HISTORY diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index c680ed94575a..a22f267c13b9 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2021 +.Dd November 21, 2021 .Dt RC.CONF 5 .Os .Sh NAME @@ -261,6 +261,12 @@ disable auto-loading of kernel modules with .Pq Vt str A whitespace-separated list of kernel modules to be ignored by .Xr devmatch 8 . +In addition, the +.Xr kenv 1 +.Va devmatch_blocklist +is appended to this variable to allow disabling of +.Xr devmatch 8 +loaded modules from the boot loader. .It Va devmatch_blacklist .Pq Vt str This variable is deprecated. From nobody Sun Nov 21 16:03:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3E4DE189ACFD; Sun, 21 Nov 2021 16:03: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 4HxwDR1FF4z3m6W; Sun, 21 Nov 2021 16:03:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 026A91262E; Sun, 21 Nov 2021 16:03: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 1ALG3IND095824; Sun, 21 Nov 2021 16:03:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALG3ILj095823; Sun, 21 Nov 2021 16:03:18 GMT (envelope-from git) Date: Sun, 21 Nov 2021 16:03:18 GMT Message-Id: <202111211603.1ALG3ILj095823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 529957726679 - stable/13 - nfsd: Fix the NFSv4 pNFS MDS server for DS NFSERR_NOSPC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5299577266790d1da58db29ada5082550287ce55 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=5299577266790d1da58db29ada5082550287ce55 commit 5299577266790d1da58db29ada5082550287ce55 Author: Rick Macklem AuthorDate: 2021-11-07 19:43:03 +0000 Commit: Rick Macklem CommitDate: 2021-11-21 15:59:49 +0000 nfsd: Fix the NFSv4 pNFS MDS server for DS NFSERR_NOSPC If a pNFS server's DS runs out of disk space, it replies NFSERR_NOSPC to the client doing writing. For the Linux client, it then sends a LayoutError RPC to the server to tell it about the error and keeps retrying, doing repeated LayoutGet and Write RPCs to the DS. The Linux client is "stuck" until disk space on the DS is free'd up. For a mirrored server configuration, the first mirror that ran out of space was taken offline. This does not make much sense, since the other mirror(s) will run out of space soon and the fix is a manual cleanup up disk space. This patch changes the pNFS server to not disable a mirror for the mirrored case when this occurs. Further work is needed, since the Linux client expects the MDS to reply NFSERR_NOSPC to LayoutGets once the DS is out of space. Without this further change, the above mentioned looping occurs. Found during a recent IEFT NFSv4 working group testing event. (cherry picked from commit a7e014eee5d47d6eb13bc98c71e65d00a6de8ed3) --- sys/fs/nfsserver/nfs_nfsdserv.c | 7 ++++--- sys/fs/nfsserver/nfs_nfsdstate.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 7ca766c99069..0e447778d639 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -5046,10 +5046,11 @@ nfsrvd_layouterror(struct nfsrv_descript *nd, __unused int isdgram, opnum = fxdr_unsigned(int, *tl); NFSD_DEBUG(4, "nfsrvd_layouterr op=%d stat=%d\n", opnum, stat); /* - * Except for NFSERR_ACCES and NFSERR_STALE errors, - * disable the mirror. + * Except for NFSERR_ACCES, NFSERR_STALE and NFSERR_NOSPC + * errors, disable the mirror. */ - if (stat != NFSERR_ACCES && stat != NFSERR_STALE) + if (stat != NFSERR_ACCES && stat != NFSERR_STALE && + stat != NFSERR_NOSPC) nfsrv_delds(devid, curthread); } nfsmout: diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 750eda2027ec..797b9b0a466e 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -7009,10 +7009,11 @@ nfsrv_flexlayouterr(struct nfsrv_descript *nd, uint32_t *layp, int maxcnt, NFSD_DEBUG(4, "flexlayouterr op=%d stat=%d\n", opnum, stat); /* - * Except for NFSERR_ACCES and NFSERR_STALE errors, - * disable the mirror. + * Except for NFSERR_ACCES, NFSERR_STALE and + * NFSERR_NOSPC errors, disable the mirror. */ - if (stat != NFSERR_ACCES && stat != NFSERR_STALE) + if (stat != NFSERR_ACCES && stat != NFSERR_STALE && + stat != NFSERR_NOSPC) nfsrv_delds(devid, p); } } From nobody Sun Nov 21 16:07:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 48BF5189BF32; Sun, 21 Nov 2021 16:07:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HxwKb1dl1z3nHm; Sun, 21 Nov 2021 16:07:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14BF711E6D; Sun, 21 Nov 2021 16:07: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 1ALG7k5Q096224; Sun, 21 Nov 2021 16:07:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALG7kr9096223; Sun, 21 Nov 2021 16:07:46 GMT (envelope-from git) Date: Sun, 21 Nov 2021 16:07:46 GMT Message-Id: <202111211607.1ALG7kr9096223@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: 77e3db078984 - main - loader: abstract boot services exiting to libefi function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 77e3db07898461de458caece30f42adceff222a9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=77e3db07898461de458caece30f42adceff222a9 commit 77e3db07898461de458caece30f42adceff222a9 Author: Warner Losh AuthorDate: 2021-11-21 16:05:07 +0000 Commit: Warner Losh CommitDate: 2021-11-21 16:05:07 +0000 loader: abstract boot services exiting to libefi function Move direct call of ExitBootServices to efi_exit_boot_services. This function sets boot_services_active to false so callers don't have to do it everywhere (though currently only loader/bootinfo.c is affected). Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32226 --- stand/efi/include/efilib.h | 12 ++++++++++++ stand/efi/loader/bootinfo.c | 6 ++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/stand/efi/include/efilib.h b/stand/efi/include/efilib.h index b9b9030afd7f..903e1f0d00e5 100644 --- a/stand/efi/include/efilib.h +++ b/stand/efi/include/efilib.h @@ -69,9 +69,21 @@ pdinfo_t *efiblk_get_pdinfo(struct devdesc *dev); pdinfo_t *efiblk_get_pdinfo_by_handle(EFI_HANDLE h); pdinfo_t *efiblk_get_pdinfo_by_device_path(EFI_DEVICE_PATH *path); +/* libefi.c */ void *efi_get_table(EFI_GUID *tbl); EFI_STATUS OpenProtocolByHandle(EFI_HANDLE, EFI_GUID *, void **); +static inline EFI_STATUS +efi_exit_boot_services(UINTN key) +{ + EFI_STATUS status; + + status = BS->ExitBootServices(IH, key); + if (!EFI_ERROR(status)) + boot_services_active = false; + return (status); +} + int efi_getdev(void **vdev, const char *devspec, const char **path); char *efi_fmtdev(void *vdev); int efi_setcurrdev(struct env_var *ev, int flags, const void *value); diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 5213b328d712..ca7a2c8ce4b8 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -393,11 +393,9 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) if (!exit_bs) break; - status = BS->ExitBootServices(IH, efi_mapkey); - if (!EFI_ERROR(status)) { - boot_services_active = false; + status = efi_exit_boot_services(efi_mapkey); + if (!EFI_ERROR(status)) break; - } } if (retry == 0) { From nobody Sun Nov 21 17:59:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BE3DF188C64A; Sun, 21 Nov 2021 17:59: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 4Hxynz4xCkz4sHd; Sun, 21 Nov 2021 17:59:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FD7A13D96; Sun, 21 Nov 2021 17:59: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 1ALHx3Mh041800; Sun, 21 Nov 2021 17:59:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALHx3ps041799; Sun, 21 Nov 2021 17:59:03 GMT (envelope-from git) Date: Sun, 21 Nov 2021 17:59:03 GMT Message-Id: <202111211759.1ALHx3ps041799@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: 8ec4c5dae327 - main - Fix coredump_phnum test with ASLR enabled 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ec4c5dae32765701ac70811455084efd1570c32 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8ec4c5dae32765701ac70811455084efd1570c32 commit 8ec4c5dae32765701ac70811455084efd1570c32 Author: Ed Maste AuthorDate: 2021-11-21 17:17:20 +0000 Commit: Ed Maste CommitDate: 2021-11-21 17:57:38 +0000 Fix coredump_phnum test with ASLR enabled by default coredump_phnum intends to generate a core file with many PT_LOAD segments. Previously it called mmap() in a loop with alternating protections, relying on each mapping following the previous, to produce a core file with many page-sized PT_LOAD segments. With ASLR on we no longer have this property of each mmap() following the previous. Instead, perform a single allocation, and then use mprotect() to set alternating pages to PROT_READ. PR: 259970 Reported by: lwhsu, mw Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33070 --- tests/sys/kern/coredump_phnum_helper.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/sys/kern/coredump_phnum_helper.c b/tests/sys/kern/coredump_phnum_helper.c index da023e691a24..0dff59b918d9 100644 --- a/tests/sys/kern/coredump_phnum_helper.c +++ b/tests/sys/kern/coredump_phnum_helper.c @@ -42,18 +42,21 @@ int main(int argc __unused, char **argv __unused) { void *v; - unsigned i; + size_t i, pages; - for (i = 0; i < UINT16_MAX + 1000; i++) { + pages = UINT16_MAX + 1000; + v = mmap(NULL, pages * PAGE_SIZE, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0); + if (v == NULL) + err(1, "mmap"); + for (i = 0; i < pages; i += 2) { /* - * Alternate protections; otherwise the kernel will just extend - * the adjacent same-protection previous mapping. + * Alternate protections to interleave RW and R PT_LOAD + * segments. */ - v = mmap(NULL, PAGE_SIZE, - (((i % 2) == 0) ? PROT_READ : 0) | PROT_WRITE, - MAP_ANON | MAP_PRIVATE, -1, 0); - if (v == MAP_FAILED) - err(1, "mmap"); + if (mprotect((char *)v + i * PAGE_SIZE, PAGE_SIZE, + PROT_READ) != 0) + err(1, "mprotect"); } /* Dump core. */ From nobody Sun Nov 21 18:04:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 62282188FFCE; Sun, 21 Nov 2021 18:04: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 4Hxywd2Mxdz4vZv; Sun, 21 Nov 2021 18:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E40C13867; Sun, 21 Nov 2021 18:04: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 1ALI4m0N055458; Sun, 21 Nov 2021 18:04:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALI4mqh055457; Sun, 21 Nov 2021 18:04:48 GMT (envelope-from git) Date: Sun, 21 Nov 2021 18:04:48 GMT Message-Id: <202111211804.1ALI4mqh055457@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 43040454e985 - releng/12.3 - libarchive: cherry-pick bugfix from vendor List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/releng/12.3 X-Git-Reftype: branch X-Git-Commit: 43040454e985c8c8e1269f2a736bc174d79de3c5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.3 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=43040454e985c8c8e1269f2a736bc174d79de3c5 commit 43040454e985c8c8e1269f2a736bc174d79de3c5 Author: Martin Matuska AuthorDate: 2021-11-17 21:21:19 +0000 Commit: Martin Matuska CommitDate: 2021-11-21 18:03:56 +0000 libarchive: cherry-pick bugfix from vendor Vendor commit message (ede459d2e): archive_write_disk_posix: fix writing fflags broken in 8a1bd5c The fixup list was erroneously assumed to be directories only. Only in the case of critical file flags modification (e.g. SF_IMMUTABLE on BSD systems), other file types (e.g. regular files or symbolic links) may be added to the fixup list. We still need to verify that we are writing to the correct file type, so compare the archive entry file type with the file type of the file to be modified. Fixes vendor issue #1617: Immutable flag no longer preserved during tar extraction on FreeBSD Approved by: re (gjb) Reported by: markj Libarchive commit: ede459d2ebb879f5eedb6f7abea203be0b334230 (cherry picked from commit 201d0ebee321fb1a5501e17a4f150aa211020c5c) (cherry picked from commit f2b106ec4e5a8488883c58480cf576d18010d263) --- .../libarchive/archive_write_disk_posix.c | 87 +++++++++++++++++++--- 1 file changed, 75 insertions(+), 12 deletions(-) diff --git a/contrib/libarchive/libarchive/archive_write_disk_posix.c b/contrib/libarchive/libarchive/archive_write_disk_posix.c index a554679bfd10..1aa00840bf4c 100644 --- a/contrib/libarchive/libarchive/archive_write_disk_posix.c +++ b/contrib/libarchive/libarchive/archive_write_disk_posix.c @@ -173,6 +173,7 @@ struct fixup_entry { struct fixup_entry *next; struct archive_acl acl; mode_t mode; + __LA_MODE_T filetype; int64_t atime; int64_t birthtime; int64_t mtime; @@ -357,6 +358,7 @@ struct archive_write_disk { static int la_opendirat(int, const char *); static int la_mktemp(struct archive_write_disk *); +static int la_verify_filetype(mode_t, __LA_MODE_T); static void fsobj_error(int *, struct archive_string *, int, const char *, const char *); static int check_symlinks_fsobj(char *, int *, struct archive_string *, @@ -464,6 +466,39 @@ la_opendirat(int fd, const char *path) { #endif } +static int +la_verify_filetype(mode_t mode, __LA_MODE_T filetype) { + int ret = 0; + + switch (filetype) { + case AE_IFREG: + ret = (S_ISREG(mode)); + break; + case AE_IFDIR: + ret = (S_ISDIR(mode)); + break; + case AE_IFLNK: + ret = (S_ISLNK(mode)); + break; + case AE_IFSOCK: + ret = (S_ISSOCK(mode)); + break; + case AE_IFCHR: + ret = (S_ISCHR(mode)); + break; + case AE_IFBLK: + ret = (S_ISBLK(mode)); + break; + case AE_IFIFO: + ret = (S_ISFIFO(mode)); + break; + default: + break; + } + + return (ret); +} + static int lazy_stat(struct archive_write_disk *a) { @@ -822,6 +857,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_MODE_BASE; fe->mode = a->mode; } @@ -832,6 +868,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->mode = a->mode; fe->fixup |= TODO_TIMES; if (archive_entry_atime_is_set(entry)) { @@ -865,6 +902,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_ACLS; archive_acl_copy(&fe->acl, archive_entry_acl(entry)); } @@ -877,6 +915,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->mac_metadata = malloc(metadata_size); if (fe->mac_metadata != NULL) { memcpy(fe->mac_metadata, metadata, @@ -891,6 +930,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) fe = current_fixup(a, archive_entry_pathname(entry)); if (fe == NULL) return (ARCHIVE_FATAL); + fe->filetype = archive_entry_filetype(entry); fe->fixup |= TODO_FFLAGS; /* TODO: Complete this.. defer fflags from below. */ } @@ -2463,7 +2503,7 @@ _archive_write_disk_close(struct archive *_a) struct fixup_entry *next, *p; struct stat st; char *c; - int fd, ret; + int fd, ret, openflags; archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA, @@ -2490,32 +2530,53 @@ _archive_write_disk_close(struct archive *_a) if (p->fixup == 0) goto skip_fixup_entry; else { - fd = open(p->name, O_BINARY | O_NOFOLLOW | O_RDONLY + /* + * We need to verify if the type of the file + * we are going to open matches the file type + * of the fixup entry. + */ + openflags = O_BINARY | O_NOFOLLOW | O_RDONLY + | O_CLOEXEC; #if defined(O_DIRECTORY) - | O_DIRECTORY + if (p->filetype == AE_IFDIR) + openflags |= O_DIRECTORY; #endif - | O_CLOEXEC); + fd = open(p->name, openflags); + +#if defined(O_DIRECTORY) /* - ` * If we don't support O_DIRECTORY, - * or open() has failed, we must stat() - * to verify that we are opening a directory + * If we support O_DIRECTORY and open was + * successful we can skip the file type check + * for directories. For other file types + * we need to verify via fstat() or lstat() */ -#if defined(O_DIRECTORY) - if (fd == -1) { + if (fd == -1 || p->filetype != AE_IFDIR) { +#if HAVE_FSTAT + if (fd > 0 && ( + fstat(fd, &st) != 0 || + la_verify_filetype(st.st_mode, + p->filetype) == 0)) { + goto skip_fixup_entry; + } else +#endif if (lstat(p->name, &st) != 0 || - !S_ISDIR(st.st_mode)) { + la_verify_filetype(st.st_mode, + p->filetype) == 0) { goto skip_fixup_entry; } } #else #if HAVE_FSTAT if (fd > 0 && ( - fstat(fd, &st) != 0 || !S_ISDIR(st.st_mode))) { + fstat(fd, &st) != 0 || + la_verify_filetype(st.st_mode, + p->filetype) == 0)) { goto skip_fixup_entry; } else #endif if (lstat(p->name, &st) != 0 || - !S_ISDIR(st.st_mode)) { + la_verify_filetype(st.st_mode, + p->filetype) == 0) { goto skip_fixup_entry; } #endif @@ -2689,6 +2750,7 @@ new_fixup(struct archive_write_disk *a, const char *pathname) fe->next = a->fixup_list; a->fixup_list = fe; fe->fixup = 0; + fe->filetype = 0; fe->name = strdup(pathname); return (fe); } @@ -3811,6 +3873,7 @@ set_fflags(struct archive_write_disk *a) le = current_fixup(a, a->name); if (le == NULL) return (ARCHIVE_FATAL); + le->filetype = archive_entry_filetype(a->entry); le->fixup |= TODO_FFLAGS; le->fflags_set = set; /* Store the mode if it's not already there. */ From nobody Sun Nov 21 18:20:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6365E1897B4E; Sun, 21 Nov 2021 18:20: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 4HxzGt2DTxz3G52; Sun, 21 Nov 2021 18:20:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B2C0140D1; Sun, 21 Nov 2021 18: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 1ALIKcHN077026; Sun, 21 Nov 2021 18: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 1ALIKcUb077024; Sun, 21 Nov 2021 18:20:38 GMT (envelope-from git) Date: Sun, 21 Nov 2021 18:20:38 GMT Message-Id: <202111211820.1ALIKcUb077024@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: 111619ff70f0 - stable/13 - LinuxKPI: add bcd.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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 111619ff70f081f244336bfb82cba71b59551d60 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=111619ff70f081f244336bfb82cba71b59551d60 commit 111619ff70f081f244336bfb82cba71b59551d60 Author: Bjoern A. Zeeb AuthorDate: 2021-10-25 18:14:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-21 18:15:58 +0000 LinuxKPI: add bcd.h Add bcd2bin() in bcd.h. Libkern does provide a bcd2bin() which cannot be used cirectly leaving us with a conflict (see comment in file). Rather than having code to re-define bcd2bin() for the LinuxKPI make sure libkern.h is always included before the LinuxKPI version. Then only re-define our local LinuxKPI implementation. [1] From the argument truncating wrapper call the libkern version. If we change our libkern implementation in the future we can save us the remainder of the hassle. [2]. Suggested by: Johannes Berg (johannes sipsolutions.net) [1] Suggested by: ian [2] Sponsored by: The FreeBSD Foundation (cherry picked from commit 548ada00e54a9e7745d041b1ec7f68f3bd493365) (cherry picked from commit ae2268efd5f8aaa6aba27dfc4e34b3225f211901) --- sys/compat/linuxkpi/common/include/linux/bcd.h | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bcd.h b/sys/compat/linuxkpi/common/include/linux/bcd.h new file mode 100644 index 000000000000..8a40da1a330b --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/bcd.h @@ -0,0 +1,45 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2021 Bjoern A. Zeeb + * + * 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_BCD_H +#define _LINUXKPI_LINUX_BCD_H + +#include +#include + +/* Compared to the libkern version this one truncates the argument. */ +static inline uint8_t linuxkpi_bcd2bin(uint8_t x) +{ + + return (bcd2bin(x)); +} + +#define bcd2bin(_x) linuxkpi_bcd2bin(_x) + +#endif /* _LINUXKPI_LINUX_BCD_H */ From nobody Sun Nov 21 23:59:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9080D1898B50; Sun, 21 Nov 2021 23:59: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 4Hy6nf3fmFz3qvv; Sun, 21 Nov 2021 23:59:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D65E189C9; Sun, 21 Nov 2021 23:59: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 1ALNxI7M032075; Sun, 21 Nov 2021 23:59:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALNxITq032074; Sun, 21 Nov 2021 23:59:18 GMT (envelope-from git) Date: Sun, 21 Nov 2021 23:59:18 GMT Message-Id: <202111212359.1ALNxITq032074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 06bd74e1e39c - main - GEOM: Switch g_io_deliver() locking from cp to pp. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06bd74e1e39cb33b18b19a748a80b5e1d70fda17 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=06bd74e1e39cb33b18b19a748a80b5e1d70fda17 commit 06bd74e1e39cb33b18b19a748a80b5e1d70fda17 Author: Alexander Motin AuthorDate: 2021-11-21 23:50:59 +0000 Commit: Alexander Motin CommitDate: 2021-11-21 23:50:59 +0000 GEOM: Switch g_io_deliver() locking from cp to pp. Single provider may have multiple consumers, and locking one of consumers is not sufficient to protect the provider. Though the only part of the provider this locking protects now is its statistics. Reported by: Arka Sharma MFC after: 2 weeks --- sys/geom/geom_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index c4e9be02bf44..f32a3dc52f93 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -678,7 +678,7 @@ g_io_deliver(struct bio *bp, int error) if ((g_collectstats & G_STATS_CONSUMERS) != 0 || ((g_collectstats & G_STATS_PROVIDERS) != 0 && pp->stat != NULL)) binuptime(&now); - mtxp = mtx_pool_find(mtxpool_sleep, cp); + mtxp = mtx_pool_find(mtxpool_sleep, pp); mtx_lock(mtxp); if (g_collectstats & G_STATS_PROVIDERS) devstat_end_transaction_bio_bt(pp->stat, bp, &now); From nobody Mon Nov 22 00:32:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2568F18A97F6; Mon, 22 Nov 2021 00:32:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hy7X407CTz4VfD; Mon, 22 Nov 2021 00:32:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D83471941E; Mon, 22 Nov 2021 00:32: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 1AM0WZ90084661; Mon, 22 Nov 2021 00:32:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM0WZe9084660; Mon, 22 Nov 2021 00:32:35 GMT (envelope-from git) Date: Mon, 22 Nov 2021 00:32:35 GMT Message-Id: <202111220032.1AM0WZe9084660@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: cf09094e3983 - stable/13 - growfs: do not error if filesystem is already requested 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cf09094e3983298ee8f69a0011012e55e71fde30 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cf09094e3983298ee8f69a0011012e55e71fde30 commit cf09094e3983298ee8f69a0011012e55e71fde30 Author: Ed Maste AuthorDate: 2021-11-15 20:37:34 +0000 Commit: Ed Maste CommitDate: 2021-11-22 00:30:18 +0000 growfs: do not error if filesystem is already requested size For some cloud/virtualization use cases it can be convenient to grow the filesystem on boot any time the disk/partition happens to be larger, but not fail if it remains the same size. Continue to emit a message if we have no action to take, but exit with status 0 if the size remains the same. Reviewed by: trasz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32856 (cherry picked from commit 3f9acedb020b4bcac850eee8a60c75e0880d3e3f) --- sbin/growfs/growfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index 510192dada0b..1f1bcf82c965 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1503,7 +1503,10 @@ main(int argc, char **argv) humanize_number(newsizebuf, sizeof(newsizebuf), size, "B", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - errx(1, "requested size %s is not larger than the current " + if (size == (uint64_t)(osblock.fs_size * osblock.fs_fsize)) + errx(0, "requested size %s is equal to the current " + "filesystem size %s", newsizebuf, oldsizebuf); + errx(1, "requested size %s is smaller than the current " "filesystem size %s", newsizebuf, oldsizebuf); } From nobody Mon Nov 22 00:33:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 051DA18A9B30; Mon, 22 Nov 2021 00:33: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 4Hy7YL6kv4z4WWm; Mon, 22 Nov 2021 00:33:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C72411941F; Mon, 22 Nov 2021 00:33: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 1AM0XgBC084897; Mon, 22 Nov 2021 00:33:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM0Xg0c084896; Mon, 22 Nov 2021 00:33:42 GMT (envelope-from git) Date: Mon, 22 Nov 2021 00:33:42 GMT Message-Id: <202111220033.1AM0Xg0c084896@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: 11f45b8f8009 - stable/12 - growfs: do not error if filesystem is already requested 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 11f45b8f800975e0484940430b988b2006caf1e4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=11f45b8f800975e0484940430b988b2006caf1e4 commit 11f45b8f800975e0484940430b988b2006caf1e4 Author: Ed Maste AuthorDate: 2021-11-15 20:37:34 +0000 Commit: Ed Maste CommitDate: 2021-11-22 00:33:15 +0000 growfs: do not error if filesystem is already requested size For some cloud/virtualization use cases it can be convenient to grow the filesystem on boot any time the disk/partition happens to be larger, but not fail if it remains the same size. Continue to emit a message if we have no action to take, but exit with status 0 if the size remains the same. Reviewed by: trasz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32856 (cherry picked from commit 3f9acedb020b4bcac850eee8a60c75e0880d3e3f) --- sbin/growfs/growfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index d1e42ed7c3d0..c47352e64079 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1485,7 +1485,10 @@ main(int argc, char **argv) humanize_number(newsizebuf, sizeof(newsizebuf), size, "B", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - errx(1, "requested size %s is not larger than the current " + if (size == (uint64_t)(osblock.fs_size * osblock.fs_fsize)) + errx(0, "requested size %s is equal to the current " + "filesystem size %s", newsizebuf, oldsizebuf); + errx(1, "requested size %s is smaller than the current " "filesystem size %s", newsizebuf, oldsizebuf); } From nobody Mon Nov 22 00:43:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 090E418AFD0B; Mon, 22 Nov 2021 00:43: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 4Hy7n16hc6z4bD8; Mon, 22 Nov 2021 00:43:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C7B5918E63; Mon, 22 Nov 2021 00:43: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 1AM0hnPi098527; Mon, 22 Nov 2021 00:43:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM0hnm2098526; Mon, 22 Nov 2021 00:43:49 GMT (envelope-from git) Date: Mon, 22 Nov 2021 00:43:49 GMT Message-Id: <202111220043.1AM0hnm2098526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Guangyuan Yang Subject: git: c8342584596a - stable/13 - uuid(3): Document return values List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ygy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c8342584596a0354df6414a0747afe0dfed485e0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by ygy (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c8342584596a0354df6414a0747afe0dfed485e0 commit c8342584596a0354df6414a0747afe0dfed485e0 Author: Felix Johnson AuthorDate: 2021-11-19 08:42:49 +0000 Commit: Guangyuan Yang CommitDate: 2021-11-22 00:43:31 +0000 uuid(3): Document return values PR: 204449 Reported by: Michael Cress (cherry picked from commit f6842865d3367217f2df3e5ae7ecb5b66caf9451) --- lib/libc/uuid/uuid.3 | 63 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/lib/libc/uuid/uuid.3 b/lib/libc/uuid/uuid.3 index 4fa41dec98bd..108ee34f213c 100644 --- a/lib/libc/uuid/uuid.3 +++ b/lib/libc/uuid/uuid.3 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2012 +.Dd November 19, 2021 .Dt UUID 3 .Os .Sh NAME @@ -68,20 +68,12 @@ The and .Fn uuid_create_nil functions create UUIDs. -The -.Fn uuid_compare , -.Fn uuid_equal -and -.Fn uuid_is_nil -functions can be used to test UUIDs. To convert from the binary representation to the string representation or vice versa, use .Fn uuid_to_string or .Fn uuid_from_string respectively. -A 16-bit hash value can be obtained by calling -.Fn uuid_hash . .Pp The .Fn uuid_to_string @@ -111,6 +103,49 @@ functions decode a UUID from an octet stream in little-endian and big-endian byte-order, respectively. These routines are not part of the DCE RPC API. They are provided for convenience. +.Pp +The +.Fn uuid_compare +and +.Fn uuid_equal +functions compare two UUIDs for equality. +UUIDs are equal if pointers +.Fa a +and +.Fa b +are equal or both +.Dv NULL , +or if the structures +.Fa a +and +.Fa b +point to are equal. +.Fn uuid_compare +returns 0 if the UUIDs are equal, -1 if +.Fa a +is less than +.Fa b , +and 1 if +.Fa a +is greater than +.Fa b . +.Fn uuid_equal +returns 1 if the UUIDs are equal, 0 if they are +not equal. +.Pp +The +.Fn uuid_is_nil +function compares a UUID to +.Dv NULL . +The function returns 1 if +.Fa u +is +.Dv NULL +or if the UUID consists of all zeros, and zero otherwise. +.Pp +The +.Fn uuid_hash +function returns a 16-bit hash value for the specified UUID. .Sh RETURN VALUES The successful or unsuccessful completion of the function is returned in the @@ -127,6 +162,16 @@ The string representation of an UUID is not valid. .It Dv uuid_s_no_memory The function can not allocate memory to store an UUID representation. .El +.Pp +.Fn uuid_compare , +.Fn uuid_equal , +.Fn uuid_is_nil , +and +.Fn uuid_hash +always set +.Fa status +to +.Dv uuid_s_ok . .Sh SEE ALSO .Xr uuidgen 1 , .Xr uuidgen 2 From nobody Mon Nov 22 00:46:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 42D0C18880FD; Mon, 22 Nov 2021 00:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hy7qp1RKpz4bdJ; Mon, 22 Nov 2021 00:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1112318E64; Mon, 22 Nov 2021 00:46: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 1AM0kDL4098840; Mon, 22 Nov 2021 00:46:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM0kDxx098839; Mon, 22 Nov 2021 00:46:13 GMT (envelope-from git) Date: Mon, 22 Nov 2021 00:46:13 GMT Message-Id: <202111220046.1AM0kDxx098839@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: 532cfa69cf13 - stable/13 - Document that 13.x is the end of the line for FreeBSD/mips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 532cfa69cf13051a848a2d224d0bf7de04a5c6ee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=532cfa69cf13051a848a2d224d0bf7de04a5c6ee commit 532cfa69cf13051a848a2d224d0bf7de04a5c6ee Author: Warner Losh AuthorDate: 2021-11-19 04:21:46 +0000 Commit: Warner Losh CommitDate: 2021-11-22 00:45:28 +0000 Document that 13.x is the end of the line for FreeBSD/mips MFC After: 3 days Sponsored by: Netflix Reviewed by: brooks, jhb, emaste Differential Revision: https://reviews.freebsd.org/D32852 (cherry picked from commit a721ac948e9bec965a8a0434acede2a672b41a51) --- share/man/man7/arch.7 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 45df736b8a37..2a1ad6917a8c 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -97,15 +97,15 @@ architectures, the final release. .It armv7 Ta 12.0 .It ia64 Ta 5.0 Ta 10.4 .It i386 Ta 1.0 -.It mips Ta 8.0 -.It mipsel Ta 9.0 -.It mipselhf Ta 12.0 -.It mipshf Ta 12.0 -.It mipsn32 Ta 9.0 -.It mips64 Ta 9.0 -.It mips64el Ta 9.0 -.It mips64elhf Ta 12.0 -.It mips64hf Ta 12.0 +.It mips Ta 8.0 Ta 13.x +.It mipsel Ta 9.0 Ta 13.x +.It mipselhf Ta 12.0 Ta 13.x +.It mipshf Ta 12.0 Ta 13.x +.It mipsn32 Ta 9.0 Ta 13.x +.It mips64 Ta 9.0 Ta 13.x +.It mips64el Ta 9.0 Ta 13.x +.It mips64elhf Ta 12.0 Ta 13.x +.It mips64hf Ta 12.0 Ta 13.x .It pc98 Ta 2.2 Ta 11.4 .It powerpc Ta 6.0 .It powerpcspe Ta 12.0 From nobody Mon Nov 22 00:46:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 82A171888242; Mon, 22 Nov 2021 00:46: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 4Hy7qq2qMdz4bVX; Mon, 22 Nov 2021 00:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32574196CB; Mon, 22 Nov 2021 00:46: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 1AM0kFM8098864; Mon, 22 Nov 2021 00:46:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM0kF17098863; Mon, 22 Nov 2021 00:46:15 GMT (envelope-from git) Date: Mon, 22 Nov 2021 00:46:15 GMT Message-Id: <202111220046.1AM0kF17098863@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: 8d5fd8e04f3c - stable/13 - Add warning that MIPS is being removed in FreeBSD 14.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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d5fd8e04f3ce014b8f83bdebdb27dddccea3dda Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8d5fd8e04f3ce014b8f83bdebdb27dddccea3dda commit 8d5fd8e04f3ce014b8f83bdebdb27dddccea3dda Author: Warner Losh AuthorDate: 2021-11-19 04:21:55 +0000 Commit: Warner Losh CommitDate: 2021-11-22 00:45:28 +0000 Add warning that MIPS is being removed in FreeBSD 14.0 MFC After: 3 days Sponsored by: Netflix Reviewed by: brooks, jhb Differential Revision: https://reviews.freebsd.org/D32853 (cherry picked from commit 27a04f59646bea70e8461095eb835e92066702ef) --- Makefile.inc1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 4fa955779c1f..4439b9ef67d4 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1182,6 +1182,10 @@ _ncpu_cmd=sysctl -n hw.ncpu 2>/dev/null || nproc 2>/dev/null || echo unknown buildworld_prologue: .PHONY @echo "--------------------------------------------------------------" @echo ">>> World build started on `LC_ALL=C date`" +.if ${TARGET:Mmips} + @echo "--------------------------------------------------------------" + @echo "WARNING: MIPS architecture is gone in FreeBSD 14.0" +.endif @echo "--------------------------------------------------------------" buildworld_epilogue: .PHONY @@ -1191,6 +1195,10 @@ buildworld_epilogue: .PHONY @seconds=$$(($$(date '+%s') - ${_BUILDWORLD_START})); \ echo -n ">>> World built in $$seconds seconds, "; \ echo "ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" +.if ${TARGET:Mmips} + @echo "--------------------------------------------------------------" + @echo "WARNING: MIPS architecture is gone in FreeBSD 14.0" +.endif @echo "--------------------------------------------------------------" # From nobody Mon Nov 22 00:46:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 29D5D18885C2; Mon, 22 Nov 2021 00:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hy7r50Vmwz4byn; Mon, 22 Nov 2021 00:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E586819541; Mon, 22 Nov 2021 00:46: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 1AM0kSGh099001; Mon, 22 Nov 2021 00:46:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM0kSEK099000; Mon, 22 Nov 2021 00:46:28 GMT (envelope-from git) Date: Mon, 22 Nov 2021 00:46:28 GMT Message-Id: <202111220046.1AM0kSEK099000@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: 117dd8828432 - stable/12 - Document that 13.x is the end of the line for FreeBSD/mips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: 117dd8828432e54a4684d78c1d23753c7515ee67 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=117dd8828432e54a4684d78c1d23753c7515ee67 commit 117dd8828432e54a4684d78c1d23753c7515ee67 Author: Warner Losh AuthorDate: 2021-11-19 04:21:46 +0000 Commit: Warner Losh CommitDate: 2021-11-22 00:43:30 +0000 Document that 13.x is the end of the line for FreeBSD/mips MFC After: 3 days Sponsored by: Netflix Reviewed by: brooks, jhb, emaste Differential Revision: https://reviews.freebsd.org/D32852 (cherry picked from commit a721ac948e9bec965a8a0434acede2a672b41a51) --- share/man/man7/arch.7 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 3f2456f4f14d..7bf8923b5ac7 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -99,15 +99,15 @@ architectures, the final release. .It armv7 Ta 12.0 .It ia64 Ta 5.0 Ta 10.4 .It i386 Ta 1.0 -.It mips Ta 8.0 -.It mipsel Ta 9.0 -.It mipselhf Ta 12.0 -.It mipshf Ta 12.0 -.It mipsn32 Ta 9.0 -.It mips64 Ta 9.0 -.It mips64el Ta 9.0 -.It mips64elhf Ta 12.0 -.It mips64hf Ta 12.0 +.It mips Ta 8.0 Ta 13.x +.It mipsel Ta 9.0 Ta 13.x +.It mipselhf Ta 12.0 Ta 13.x +.It mipshf Ta 12.0 Ta 13.x +.It mipsn32 Ta 9.0 Ta 13.x +.It mips64 Ta 9.0 Ta 13.x +.It mips64el Ta 9.0 Ta 13.x +.It mips64elhf Ta 12.0 Ta 13.x +.It mips64hf Ta 12.0 Ta 13.x .It pc98 Ta 2.2 Ta 11.4 .It powerpc Ta 6.0 .It powerpcspe Ta 12.0 From nobody Mon Nov 22 00:46:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EE0FC1888648; Mon, 22 Nov 2021 00:46: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 4Hy7r63cDtz4bw9; Mon, 22 Nov 2021 00:46:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1292619595; Mon, 22 Nov 2021 00:46: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 1AM0kTwW099029; Mon, 22 Nov 2021 00:46:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM0kTnP099028; Mon, 22 Nov 2021 00:46:29 GMT (envelope-from git) Date: Mon, 22 Nov 2021 00:46:29 GMT Message-Id: <202111220046.1AM0kTnP099028@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: 46f1cb6cd485 - stable/12 - Add warning that MIPS is being removed in FreeBSD 14.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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 46f1cb6cd485ab3566596609fedf20ff22001070 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=46f1cb6cd485ab3566596609fedf20ff22001070 commit 46f1cb6cd485ab3566596609fedf20ff22001070 Author: Warner Losh AuthorDate: 2021-11-19 04:21:55 +0000 Commit: Warner Losh CommitDate: 2021-11-22 00:43:30 +0000 Add warning that MIPS is being removed in FreeBSD 14.0 MFC After: 3 days Sponsored by: Netflix Reviewed by: brooks, jhb Differential Revision: https://reviews.freebsd.org/D32853 (cherry picked from commit 27a04f59646bea70e8461095eb835e92066702ef) --- Makefile.inc1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index c5b903e8ed90..1b1f8b162d92 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1186,12 +1186,20 @@ buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .PHONY buildworld_prologue: .PHONY @echo "--------------------------------------------------------------" @echo ">>> World build started on `LC_ALL=C date`" +.if ${TARGET:Mmips} + @echo "--------------------------------------------------------------" + @echo "WARNING: MIPS architecture is gone in FreeBSD 14.0" +.endif @echo "--------------------------------------------------------------" buildworld_epilogue: .PHONY @echo @echo "--------------------------------------------------------------" @echo ">>> World build completed on `LC_ALL=C date`" +.if ${TARGET:Mmips} + @echo "--------------------------------------------------------------" + @echo "WARNING: MIPS architecture is gone in FreeBSD 14.0" +.endif @echo "--------------------------------------------------------------" # From nobody Mon Nov 22 01:54:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8D698188B401; Mon, 22 Nov 2021 01:54: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 4Hy9LP3ZsRz4xh8; Mon, 22 Nov 2021 01:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5AAE61A49B; Mon, 22 Nov 2021 01:54: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 1AM1sLo8091174; Mon, 22 Nov 2021 01:54:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM1sLhS091173; Mon, 22 Nov 2021 01:54:21 GMT (envelope-from git) Date: Mon, 22 Nov 2021 01:54:21 GMT Message-Id: <202111220154.1AM1sLhS091173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: a00f531cc28b - stable/13 - pf: Remove duplicate declaration of pf_ioctl_maxcount. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a00f531cc28be227c1d86e4546c9fe2c14f75b1b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a00f531cc28be227c1d86e4546c9fe2c14f75b1b commit a00f531cc28be227c1d86e4546c9fe2c14f75b1b Author: John Baldwin AuthorDate: 2021-09-15 16:03:18 +0000 Commit: Kristof Provost CommitDate: 2021-11-22 01:53:33 +0000 pf: Remove duplicate declaration of pf_ioctl_maxcount. Fixes a -Wredundant-decls warning with GCC 9. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D31944 (cherry picked from commit df005aa9b3d8d5bf78bff749b261e9ae5bea80a3) --- sys/netpfil/pf/pf_ioctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 7b68110b0f99..6fdce31ad308 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -274,8 +274,6 @@ pfsync_detach_ifnet_t *pfsync_detach_ifnet_ptr; /* pflog */ pflog_packet_t *pflog_packet_ptr = NULL; -extern u_long pf_ioctl_maxcount; - #define ERROUT_FUNCTION(target, x) \ do { \ error = (x); \ From nobody Mon Nov 22 01:54:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 39545188B584; Mon, 22 Nov 2021 01:54: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 4Hy9LR5l5Mz4xSt; Mon, 22 Nov 2021 01:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E3DE19F6D; Mon, 22 Nov 2021 01:54: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 1AM1sNBo091283; Mon, 22 Nov 2021 01:54:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM1sNjt091282; Mon, 22 Nov 2021 01:54:23 GMT (envelope-from git) Date: Mon, 22 Nov 2021 01:54:23 GMT Message-Id: <202111220154.1AM1sNjt091282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 2107407b25ee - stable/12 - pf: Remove duplicate declaration of pf_ioctl_maxcount. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2107407b25eeeab89556c36ad789a4b23ec9a5f7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2107407b25eeeab89556c36ad789a4b23ec9a5f7 commit 2107407b25eeeab89556c36ad789a4b23ec9a5f7 Author: John Baldwin AuthorDate: 2021-09-15 16:03:18 +0000 Commit: Kristof Provost CommitDate: 2021-11-22 01:53:41 +0000 pf: Remove duplicate declaration of pf_ioctl_maxcount. Fixes a -Wredundant-decls warning with GCC 9. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D31944 (cherry picked from commit df005aa9b3d8d5bf78bff749b261e9ae5bea80a3) --- sys/netpfil/pf/pf_ioctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index ff7e4d4235a6..f5d7626c6754 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -274,8 +274,6 @@ pfsync_detach_ifnet_t *pfsync_detach_ifnet_ptr; /* pflog */ pflog_packet_t *pflog_packet_ptr = NULL; -extern u_long pf_ioctl_maxcount; - #define ERROUT_FUNCTION(target, x) \ do { \ error = (x); \ From nobody Mon Nov 22 02:23:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6C841189CAAB; Mon, 22 Nov 2021 02:23: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 4HyB090syvz584D; Mon, 22 Nov 2021 02:23:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EEF411AC08; Mon, 22 Nov 2021 02:23: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 1AM2NaA7031832; Mon, 22 Nov 2021 02:23:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM2Nadl031831; Mon, 22 Nov 2021 02:23:36 GMT (envelope-from git) Date: Mon, 22 Nov 2021 02:23:36 GMT Message-Id: <202111220223.1AM2Nadl031831@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: 093cf7905697 - main - makefs: remove set but not used variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 093cf790569775b80662926efea6d9d3464bde94 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=093cf790569775b80662926efea6d9d3464bde94 commit 093cf790569775b80662926efea6d9d3464bde94 Author: Ed Maste AuthorDate: 2021-11-22 02:19:43 +0000 Commit: Ed Maste CommitDate: 2021-11-22 02:21:34 +0000 makefs: remove set but not used variables These were leftovers from the port from NetBSD (where they are used). Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/msdos.c | 2 -- usr.sbin/makefs/msdos/msdosfs_vfsops.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/usr.sbin/makefs/msdos.c b/usr.sbin/makefs/msdos.c index 74d55a7f490f..ec38c1d207dd 100644 --- a/usr.sbin/makefs/msdos.c +++ b/usr.sbin/makefs/msdos.c @@ -150,7 +150,6 @@ msdos_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts) struct m_vnode vp, rootvp; struct timeval start; struct msdosfsmount *pmp; - uint32_t flags; assert(image != NULL); assert(dir != NULL); @@ -184,7 +183,6 @@ msdos_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts) fsopts->fd = open(image, O_RDWR); vp.fs = fsopts; - flags = 0; if ((pmp = m_msdosfs_mount(&vp)) == NULL) err(1, "msdosfs_mount"); diff --git a/usr.sbin/makefs/msdos/msdosfs_vfsops.c b/usr.sbin/makefs/msdos/msdosfs_vfsops.c index 508e044ac1ca..d543adc2bbcd 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vfsops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vfsops.c @@ -83,7 +83,6 @@ m_msdosfs_mount(struct m_vnode *devvp) struct byte_bpb710 *b710; uint8_t SecPerClust; int ronly = 0, error; - int bsize; unsigned secsize = 512; MSDOSFS_DPRINTF(("%s(bread 0)\n", __func__)); @@ -103,7 +102,6 @@ m_msdosfs_mount(struct m_vnode *devvp) error = EINVAL; goto error_exit; } - bsize = 0; pmp = ecalloc(1, sizeof(*pmp)); /* From nobody Mon Nov 22 02:46:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BFBA518A7ED4; Mon, 22 Nov 2021 02:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HyBVG57SBz3H9s; Mon, 22 Nov 2021 02:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A67B1B052; Mon, 22 Nov 2021 02:46: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 1AM2kE4x058704; Mon, 22 Nov 2021 02:46:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM2kEoD058703; Mon, 22 Nov 2021 02:46:14 GMT (envelope-from git) Date: Mon, 22 Nov 2021 02:46:14 GMT Message-Id: <202111220246.1AM2kEoD058703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Guangyuan Yang Subject: git: 28ba36c65db8 - main - bridge(4): Use American spelling of "behavior" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ygy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28ba36c65db8b4d95abcd543b97f2ec5161cdae5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ygy (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=28ba36c65db8b4d95abcd543b97f2ec5161cdae5 commit 28ba36c65db8b4d95abcd543b97f2ec5161cdae5 Author: Guangyuan Yang AuthorDate: 2021-11-22 02:41:49 +0000 Commit: Guangyuan Yang CommitDate: 2021-11-22 02:43:56 +0000 bridge(4): Use American spelling of "behavior" Fixes: 8406182dbeb972698775e2468902bc5f6e593d72 MFC after: 3 days Reported by: Pau Amma --- share/man/man4/bridge.4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4 index c79e5da69837..e193724928ca 100644 --- a/share/man/man4/bridge.4 +++ b/share/man/man4/bridge.4 @@ -180,7 +180,7 @@ This situation is clearly against the description in Section 5, RFC 4007. Although it works in most cases, -it can cause some counterintuitive or undesirable behaviour in some +it can cause some counterintuitive or undesirable behavior in some edge cases when both, the .Nm interface and one of the member interfaces, have an IPv6 address @@ -198,7 +198,7 @@ interface has IPv6 addresses, IPv6 addresses on the member interface will be automatically removed before the interface is added. .Pp -This behaviour can be disabled by setting +This behavior can be disabled by setting .Xr sysctl 8 variable .Va net.link.bridge.allow_llz_overlap @@ -250,7 +250,7 @@ When filtering is enabled, bridged packets will pass through the filter inbound on the originating interface, on the bridge interface and outbound on the appropriate interfaces. Either stage can be disabled. -The filtering behaviour can be controlled using +The filtering behavior can be controlled using .Xr sysctl 8 : .Bl -tag -width ".Va net.link.bridge.pfil_onlyip" .It Va net.link.bridge.pfil_onlyip From nobody Mon Nov 22 05:16:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 43DCD18AA912; Mon, 22 Nov 2021 05:16: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 4HyFq43KN5z4k3L; Mon, 22 Nov 2021 05:16:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E4051CB41; Mon, 22 Nov 2021 05:16: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 1AM5G0nV059271; Mon, 22 Nov 2021 05:16:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM5G0Hg059270; Mon, 22 Nov 2021 05:16:00 GMT (envelope-from git) Date: Mon, 22 Nov 2021 05:16:00 GMT Message-Id: <202111220516.1AM5G0Hg059270@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 0909e05779ee - stable/13 - carp: deal with negative net.inet.carp.demotion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0909e05779eed325fa0c2d4c1daa6916dbbc83e3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0909e05779eed325fa0c2d4c1daa6916dbbc83e3 commit 0909e05779eed325fa0c2d4c1daa6916dbbc83e3 Author: Marius Halden AuthorDate: 2021-10-31 20:18:42 +0000 Commit: Kristof Provost CommitDate: 2021-11-22 01:55:02 +0000 carp: deal with negative net.inet.carp.demotion Given nodes 1 and 2, where node 1 has an advskew of 0 and node 2 has an advskew of 100, making them master and backup respectively. If net.inet.carp.demotion is set to a negative value on node 1, node 2 might become master while node 1 still retains it master status. Wether or not node 2 becomes master seems to depend on the nodes advskew and what the demotion sysctl was set to on node 1. The reason for node 2 becoming master seems to be that the calculated advskew taking demotion into account is truncated to a single unsigned byte when copied into the carp header for sending, and node 1 stays master since it takes uses the whole non-truncated calculated advskew when deciding wether to stay master. PR: 259528 Reviewed by: donner, glebius MFC after: 3 weeks Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D32759 (cherry picked from commit 1019354b54161c140d10a8203ff1e849c09c8010) --- sys/netinet/ip_carp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 9a551a70c3ad..7554becb974e 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -304,7 +304,9 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_carp, OID_AUTO, stats, struct carpstats, #define DEMOTE_ADVSKEW(sc) \ (((sc)->sc_advskew + V_carp_demotion > CARP_MAXSKEW) ? \ - CARP_MAXSKEW : ((sc)->sc_advskew + V_carp_demotion)) + CARP_MAXSKEW : \ + (((sc)->sc_advskew + V_carp_demotion < 0) ? \ + 0 : ((sc)->sc_advskew + V_carp_demotion))) static void carp_input_c(struct mbuf *, struct carp_header *, sa_family_t); static struct carp_softc From nobody Mon Nov 22 05:16:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 43E2918AA88E; Mon, 22 Nov 2021 05:16: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 4HyFq51X4pz4k0w; Mon, 22 Nov 2021 05:16:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 111871CAFA; Mon, 22 Nov 2021 05:16: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 1AM5G08T059358; Mon, 22 Nov 2021 05:16:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM5G0YY059357; Mon, 22 Nov 2021 05:16:00 GMT (envelope-from git) Date: Mon, 22 Nov 2021 05:16:00 GMT Message-Id: <202111220516.1AM5G0YY059357@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 1c16de99bd7d - stable/12 - carp: deal with negative net.inet.carp.demotion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1c16de99bd7ddddad9d5877ba0f91aa2a2f57eb3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1c16de99bd7ddddad9d5877ba0f91aa2a2f57eb3 commit 1c16de99bd7ddddad9d5877ba0f91aa2a2f57eb3 Author: Marius Halden AuthorDate: 2021-10-31 20:18:42 +0000 Commit: Kristof Provost CommitDate: 2021-11-22 01:55:13 +0000 carp: deal with negative net.inet.carp.demotion Given nodes 1 and 2, where node 1 has an advskew of 0 and node 2 has an advskew of 100, making them master and backup respectively. If net.inet.carp.demotion is set to a negative value on node 1, node 2 might become master while node 1 still retains it master status. Wether or not node 2 becomes master seems to depend on the nodes advskew and what the demotion sysctl was set to on node 1. The reason for node 2 becoming master seems to be that the calculated advskew taking demotion into account is truncated to a single unsigned byte when copied into the carp header for sending, and node 1 stays master since it takes uses the whole non-truncated calculated advskew when deciding wether to stay master. PR: 259528 Reviewed by: donner, glebius MFC after: 3 weeks Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D32759 (cherry picked from commit 1019354b54161c140d10a8203ff1e849c09c8010) --- sys/netinet/ip_carp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index f4f051d14fee..acf819df694a 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -301,7 +301,9 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_carp, OID_AUTO, stats, struct carpstats, #define DEMOTE_ADVSKEW(sc) \ (((sc)->sc_advskew + V_carp_demotion > CARP_MAXSKEW) ? \ - CARP_MAXSKEW : ((sc)->sc_advskew + V_carp_demotion)) + CARP_MAXSKEW : \ + (((sc)->sc_advskew + V_carp_demotion < 0) ? \ + 0 : ((sc)->sc_advskew + V_carp_demotion))) static void carp_input_c(struct mbuf *, struct carp_header *, sa_family_t); static struct carp_softc From nobody Mon Nov 22 05:16:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4596D18AA5EB; Mon, 22 Nov 2021 05:16: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 4HyFq54cqzz4kLr; Mon, 22 Nov 2021 05:16:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 714B61CFBE; Mon, 22 Nov 2021 05:16: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 1AM5G1Im059382; Mon, 22 Nov 2021 05:16:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM5G1LM059381; Mon, 22 Nov 2021 05:16:01 GMT (envelope-from git) Date: Mon, 22 Nov 2021 05:16:01 GMT Message-Id: <202111220516.1AM5G1LM059381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: b6237b80891f - stable/13 - carp tests: negative demotion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b6237b80891f1a6e9808f630a4626eab6ea203bc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b6237b80891f1a6e9808f630a4626eab6ea203bc commit b6237b80891f1a6e9808f630a4626eab6ea203bc Author: Marius Halden AuthorDate: 2021-10-31 20:22:10 +0000 Commit: Kristof Provost CommitDate: 2021-11-22 01:55:07 +0000 carp tests: negative demotion PR: 259528 Reviewed by: donner MFC after: 3 weeks Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D32760 (cherry picked from commit 847b0d07c43c1190f0015c4c93a9e8fd953e3ab5) --- tests/sys/netinet/carp.sh | 67 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 59 insertions(+), 8 deletions(-) diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index 30ae79c93c8d..267e70ebf0dc 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -48,6 +48,15 @@ wait_for_carp() done } +carp_init() +{ + if ! kldstat -q -m carp; then + atf_skip "This test requires carp" + fi + + vnet_init +} + atf_test_case "basic_v4" "cleanup" basic_v4_head() { @@ -57,11 +66,8 @@ basic_v4_head() basic_v4_body() { - if ! kldstat -q -m carp; then - atf_skip "This test requires carp" - fi + carp_init - vnet_init bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -104,11 +110,8 @@ basic_v6_head() basic_v6_body() { - if ! kldstat -q -m carp; then - atf_skip "This test requires carp" - fi + carp_init - vnet_init bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -145,8 +148,56 @@ basic_v6_cleanup() vnet_cleanup } +atf_test_case "negative_demotion" "cleanup" +negative_demotion_head() +{ + atf_set descr 'Test PR #259528' + atf_set require.user root +} + +negative_demotion_body() +{ + carp_init + + epair=$(vnet_mkepair) + + vnet_mkjail one ${epair}a + jexec one sysctl net.inet.carp.preempt=1 + jexec one ifconfig ${epair}a 192.0.2.1/24 up + jexec one ifconfig ${epair}a add vhid 1 192.0.2.254/24 \ + advskew 0 pass foobar + + vnet_mkjail two ${epair}b + jexec two sysctl net.inet.carp.preempt=1 + jexec two ifconfig ${epair}b 192.0.2.2/24 up + jexec two ifconfig ${epair}b add vhid 1 192.0.2.254/24 \ + advskew 100 pass foobar + + # Allow things to settle + wait_for_carp one ${epair}a two ${epair}b + + if is_master one ${epair}a && is_master two ${epair}b + then + atf_fail "Two masters!" + fi + + jexec one sysctl net.inet.carp.demotion=-1 + sleep 3 + + if is_master one ${epair}a && is_master two ${epair}b + then + atf_fail "Two masters!" + fi +} + +negative_demotion_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic_v4" atf_add_test_case "basic_v6" + atf_add_test_case "negative_demotion" } From nobody Mon Nov 22 05:16:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B02F918AA669; Mon, 22 Nov 2021 05:16: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 4HyFq62Dfdz4k0x; Mon, 22 Nov 2021 05:16:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2BB951CAFB; Mon, 22 Nov 2021 05:16: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 1AM5G2lE059406; Mon, 22 Nov 2021 05:16:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM5G2sQ059405; Mon, 22 Nov 2021 05:16:02 GMT (envelope-from git) Date: Mon, 22 Nov 2021 05:16:02 GMT Message-Id: <202111220516.1AM5G2sQ059405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 64bb05e04fc3 - stable/12 - carp tests: Basic functionality 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 64bb05e04fc3ec16541b6c1fb2074c4df207f173 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=64bb05e04fc3ec16541b6c1fb2074c4df207f173 commit 64bb05e04fc3ec16541b6c1fb2074c4df207f173 Author: Kristof Provost AuthorDate: 2020-04-12 16:13:05 +0000 Commit: Kristof Provost CommitDate: 2021-11-22 01:57:50 +0000 carp tests: Basic functionality test Set up three vnet jails, bridged together. Run carp between two of them. Attempt to provoke locking / epoch issues. Reviewed by: mav (previous version), melifaro, asomers Differential Revision: https://reviews.freebsd.org/D24303 (cherry picked from commit 47308803e7b92c15326707f76739bcb6dc1383c7) --- tests/sys/netinet/Makefile | 2 +- tests/sys/netinet/carp.sh | 152 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+), 1 deletion(-) diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index f5b465557282..47f32e46aae9 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -8,7 +8,7 @@ TESTS_SUBDIRS+= libalias ATF_TESTS_C= ip_reass_test \ so_reuseport_lb_test -ATF_TESTS_SH= fibs_test arp +ATF_TESTS_SH= carp fibs_test arp PROGS= udp_dontroute tcp_user_cookie diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh new file mode 100755 index 000000000000..4c7dbaa022a8 --- /dev/null +++ b/tests/sys/netinet/carp.sh @@ -0,0 +1,152 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2020 Kristof Provost +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/../common/vnet.subr + +is_master() +{ + jail=$1 + itf=$2 + + jexec ${jail} ifconfig ${itf} | grep carp | grep MASTER +} + +wait_for_carp() +{ + jail1=$1 + itf1=$2 + jail2=$3 + itf2=$4 + + while [ -z "$(is_master ${jail1} ${itf1})" ] && + [ -z "$(is_master ${jail2} ${itf2})" ]; do + sleep 1 + done +} + +atf_test_case "basic_v4" "cleanup" +basic_v4_head() +{ + atf_set descr 'Basic CARP test (IPv4)' + atf_set require.user root +} + +basic_v4_body() +{ + if ! kldstat -q -m carp; then + atf_skip "This test requires carp" + fi + + vnet_init + bridge=$(vnet_mkbridge) + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + + vnet_mkjail carp_basic_v4_one ${bridge} ${epair_one}a ${epair_two}a + vnet_mkjail carp_basic_v4_two ${epair_one}b + vnet_mkjail carp_basic_v4_three ${epair_two}b + + jexec carp_basic_v4_one ifconfig ${bridge} 192.0.2.4/29 up + jexec carp_basic_v4_one ifconfig ${bridge} addm ${epair_one}a \ + addm ${epair_two}a + jexec carp_basic_v4_one ifconfig ${epair_one}a up + jexec carp_basic_v4_one ifconfig ${epair_two}a up + + jexec carp_basic_v4_two ifconfig ${epair_one}b 192.0.2.202/29 up + jexec carp_basic_v4_two ifconfig ${epair_one}b add vhid 1 192.0.2.1/29 + + jexec carp_basic_v4_three ifconfig ${epair_two}b 192.0.2.203/29 up + jexec carp_basic_v4_three ifconfig ${epair_two}b add vhid 1 \ + 192.0.2.1/29 + + wait_for_carp carp_basic_v4_two ${epair_one}b \ + carp_basic_v4_three ${epair_two}b + + atf_check -s exit:0 -o ignore jexec carp_basic_v4_one \ + ping -c 3 192.0.2.1 +} + +basic_v4_cleanup() +{ + vnet_cleanup +} + +atf_test_case "basic_v6" "cleanup" +basic_v6_head() +{ + atf_set descr 'Basic CARP test (IPv6)' + atf_set require.user root +} + +basic_v6_body() +{ + if ! kldstat -q -m carp; then + atf_skip "This test requires carp" + fi + + vnet_init + bridge=$(vnet_mkbridge) + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + + vnet_mkjail carp_basic_v6_one ${bridge} ${epair_one}a ${epair_two}a + vnet_mkjail carp_basic_v6_two ${epair_one}b + vnet_mkjail carp_basic_v6_three ${epair_two}b + + jexec carp_basic_v6_one ifconfig ${bridge} inet6 2001:db8::0:4/64 up \ + no_dad + jexec carp_basic_v6_one ifconfig ${bridge} addm ${epair_one}a \ + addm ${epair_two}a + jexec carp_basic_v6_one ifconfig ${epair_one}a up + jexec carp_basic_v6_one ifconfig ${epair_two}a up + + jexec carp_basic_v6_two ifconfig ${epair_one}b inet6 \ + 2001:db8::1:2/64 up no_dad + jexec carp_basic_v6_two ifconfig ${epair_one}b inet6 add vhid 1 \ + 2001:db8::0:1/64 + + jexec carp_basic_v6_three ifconfig ${epair_two}b inet6 2001:db8::1:3/64 up no_dad + jexec carp_basic_v6_three ifconfig ${epair_two}b inet6 add vhid 1 \ + 2001:db8::0:1/64 + + wait_for_carp carp_basic_v6_two ${epair_one}b \ + carp_basic_v6_three ${epair_two}b + + atf_check -s exit:0 -o ignore jexec carp_basic_v6_one \ + ping6 -c 3 2001:db8::0:1 +} + +basic_v6_cleanup() +{ + vnet_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "basic_v4" + atf_add_test_case "basic_v6" +} From nobody Mon Nov 22 05:16:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CFECA18AA939; Mon, 22 Nov 2021 05:16: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 4HyFq84WMnz4k5n; Mon, 22 Nov 2021 05:16:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E0CF1CEB8; Mon, 22 Nov 2021 05:16: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 1AM5G3jA059477; Mon, 22 Nov 2021 05:16:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM5G3rj059476; Mon, 22 Nov 2021 05:16:03 GMT (envelope-from git) Date: Mon, 22 Nov 2021 05:16:03 GMT Message-Id: <202111220516.1AM5G3rj059476@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: d42231181626 - stable/12 - carp tests: negative demotion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d42231181626b2fe0f75514c9b5753083cdf362b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d42231181626b2fe0f75514c9b5753083cdf362b commit d42231181626b2fe0f75514c9b5753083cdf362b Author: Marius Halden AuthorDate: 2021-10-31 20:22:10 +0000 Commit: Kristof Provost CommitDate: 2021-11-22 01:58:10 +0000 carp tests: negative demotion PR: 259528 Reviewed by: donner MFC after: 3 weeks Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D32760 (cherry picked from commit 847b0d07c43c1190f0015c4c93a9e8fd953e3ab5) --- tests/sys/netinet/carp.sh | 67 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 59 insertions(+), 8 deletions(-) diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index 4c7dbaa022a8..76fc483cd4a4 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -48,6 +48,15 @@ wait_for_carp() done } +carp_init() +{ + if ! kldstat -q -m carp; then + atf_skip "This test requires carp" + fi + + vnet_init +} + atf_test_case "basic_v4" "cleanup" basic_v4_head() { @@ -57,11 +66,8 @@ basic_v4_head() basic_v4_body() { - if ! kldstat -q -m carp; then - atf_skip "This test requires carp" - fi + carp_init - vnet_init bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -104,11 +110,8 @@ basic_v6_head() basic_v6_body() { - if ! kldstat -q -m carp; then - atf_skip "This test requires carp" - fi + carp_init - vnet_init bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -145,8 +148,56 @@ basic_v6_cleanup() vnet_cleanup } +atf_test_case "negative_demotion" "cleanup" +negative_demotion_head() +{ + atf_set descr 'Test PR #259528' + atf_set require.user root +} + +negative_demotion_body() +{ + carp_init + + epair=$(vnet_mkepair) + + vnet_mkjail one ${epair}a + jexec one sysctl net.inet.carp.preempt=1 + jexec one ifconfig ${epair}a 192.0.2.1/24 up + jexec one ifconfig ${epair}a add vhid 1 192.0.2.254/24 \ + advskew 0 pass foobar + + vnet_mkjail two ${epair}b + jexec two sysctl net.inet.carp.preempt=1 + jexec two ifconfig ${epair}b 192.0.2.2/24 up + jexec two ifconfig ${epair}b add vhid 1 192.0.2.254/24 \ + advskew 100 pass foobar + + # Allow things to settle + wait_for_carp one ${epair}a two ${epair}b + + if is_master one ${epair}a && is_master two ${epair}b + then + atf_fail "Two masters!" + fi + + jexec one sysctl net.inet.carp.demotion=-1 + sleep 3 + + if is_master one ${epair}a && is_master two ${epair}b + then + atf_fail "Two masters!" + fi +} + +negative_demotion_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic_v4" atf_add_test_case "basic_v6" + atf_add_test_case "negative_demotion" } From nobody Mon Nov 22 07:36:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DEC2A189ECEB; Mon, 22 Nov 2021 07:36: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 4HyJxW5zz1z3trF; Mon, 22 Nov 2021 07:36:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AAD151E578; Mon, 22 Nov 2021 07:36: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 1AM7alQH044914; Mon, 22 Nov 2021 07:36:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AM7albM044913; Mon, 22 Nov 2021 07:36:47 GMT (envelope-from git) Date: Mon, 22 Nov 2021 07:36:47 GMT Message-Id: <202111220736.1AM7albM044913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: f266886dd0bc - releng/12.3 - MFC: rc.d/rctl: unbreak for distinct /usr filesystem List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.3 X-Git-Reftype: branch X-Git-Commit: f266886dd0bcf052ea5e4f85505b75df06dd2ab3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.3 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=f266886dd0bcf052ea5e4f85505b75df06dd2ab3 commit f266886dd0bcf052ea5e4f85505b75df06dd2ab3 Author: Eugene Grosbein AuthorDate: 2021-11-20 08:54:39 +0000 Commit: Eugene Grosbein CommitDate: 2021-11-22 07:36:39 +0000 MFC: rc.d/rctl: unbreak for distinct /usr filesystem Both rctl and used xargs utility live in /usr/bin so add REQUIRE: FILESYSTEMS Approved by: re (gjb) Reported by: Peter (cherry picked from commit 0c54fe172ad365e7e60d6249484a7579c18b7d2d) (cherry picked from commit 92b40444d07aeef2bf4b20109f3f90ac343b90df) --- libexec/rc/rc.d/rctl | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rc/rc.d/rctl b/libexec/rc/rc.d/rctl index ed5665454dde..f1b001a6ad79 100755 --- a/libexec/rc/rc.d/rctl +++ b/libexec/rc/rc.d/rctl @@ -4,6 +4,7 @@ # # PROVIDE: rctl +# REQUIRE: FILESYSTEMS # BEFORE: LOGIN # KEYWORD: nojail From nobody Mon Nov 22 13:46:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 67DC818A0FC6; Mon, 22 Nov 2021 13:46: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 4HyT7x2S00z3lSt; Mon, 22 Nov 2021 13:46:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 361EF23BDB; Mon, 22 Nov 2021 13: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 1AMDkLGN037509; Mon, 22 Nov 2021 13: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 1AMDkLbQ037508; Mon, 22 Nov 2021 13:46:21 GMT (envelope-from git) Date: Mon, 22 Nov 2021 13:46:21 GMT Message-Id: <202111221346.1AMDkLbQ037508@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: 0d900a16d0df - stable/13 - vm_pager: Optimize an assertion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0d900a16d0df1334be01f2dd6313cd5103ede8d2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0d900a16d0df1334be01f2dd6313cd5103ede8d2 commit 0d900a16d0df1334be01f2dd6313cd5103ede8d2 Author: Mark Johnston AuthorDate: 2021-11-15 16:33:30 +0000 Commit: Mark Johnston CommitDate: 2021-11-22 13:44:08 +0000 vm_pager: Optimize an assertion Obtained from: jeff (object_concurrency patches) Reviewed by: kib (cherry picked from commit b0acc3f11ba31f0aea8ca5ce2720b481dfa79d1b) --- sys/vm/vm_pager.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c index 640e3d977e99..791fc1ebfe11 100644 --- a/sys/vm/vm_pager.c +++ b/sys/vm/vm_pager.c @@ -329,12 +329,11 @@ vm_pager_get_pages(vm_object_t object, vm_page_t *m, int count, int *rbehind, * updated the array. */ #ifdef INVARIANTS - VM_OBJECT_RLOCK(object); - KASSERT(m[i] == vm_page_lookup(object, pindex++), + KASSERT(m[i] == vm_page_relookup(object, pindex++), ("%s: mismatch page %p pindex %ju", __func__, m[i], (uintmax_t )pindex - 1)); - VM_OBJECT_RUNLOCK(object); #endif + /* * Zero out partially filled data. */ From nobody Mon Nov 22 13:46:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E70DA18A0EE1; Mon, 22 Nov 2021 13: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 4HyT7y47WYz3lbg; Mon, 22 Nov 2021 13:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DFA8238D2; Mon, 22 Nov 2021 13:46: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 1AMDkMLn037533; Mon, 22 Nov 2021 13:46:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMDkMAY037532; Mon, 22 Nov 2021 13:46:22 GMT (envelope-from git) Date: Mon, 22 Nov 2021 13:46:22 GMT Message-Id: <202111221346.1AMDkMAY037532@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: 291166ab493a - stable/13 - amd64: Annotate an unlikely condition in smp_targeted_tlb_shootdown() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 291166ab493aed7fdc08dc43dc91be739f68c5e4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=291166ab493aed7fdc08dc43dc91be739f68c5e4 commit 291166ab493aed7fdc08dc43dc91be739f68c5e4 Author: Mark Johnston AuthorDate: 2021-11-15 17:40:00 +0000 Commit: Mark Johnston CommitDate: 2021-11-22 13:44:27 +0000 amd64: Annotate an unlikely condition in smp_targeted_tlb_shootdown() Reviewed by: alc, kib Sponsored by: The FreeBSD Foundation (cherry picked from commit 42c2cd1ffbdfa706764362eca1b7bf5eeeee2aef) --- sys/amd64/amd64/mp_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index cf8408c2afb0..cbc4b33841ba 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -625,7 +625,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, * It is not necessary to signal other CPUs while booting or * when in the debugger. */ - if (kdb_active || KERNEL_PANICKED() || !smp_started) + if (__predict_false(kdb_active || KERNEL_PANICKED() || !smp_started)) goto local_cb; KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); From nobody Mon Nov 22 13:46:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4A49E18A1300; Mon, 22 Nov 2021 13:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HyT7z5Ztfz3lTC; Mon, 22 Nov 2021 13:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71D54235F7; Mon, 22 Nov 2021 13:46: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 1AMDkNYf037557; Mon, 22 Nov 2021 13:46:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMDkNFk037556; Mon, 22 Nov 2021 13:46:23 GMT (envelope-from git) Date: Mon, 22 Nov 2021 13:46:23 GMT Message-Id: <202111221346.1AMDkNFk037556@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: 686b143f37c5 - stable/13 - timecounter: Initialize tc_lock earlier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 686b143f37c501c79c0ddbbcb55ce852cc0bc846 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=686b143f37c501c79c0ddbbcb55ce852cc0bc846 commit 686b143f37c501c79c0ddbbcb55ce852cc0bc846 Author: Mark Johnston AuthorDate: 2021-11-19 22:29:28 +0000 Commit: Mark Johnston CommitDate: 2021-11-22 13:44:49 +0000 timecounter: Initialize tc_lock earlier Hyper-V wants to register its MSR-based timecounter during SI_SUB_HYPERVISOR, before SI_SUB_LOCK, since an emulated 8254 may not be available for DELAY(). So we cannot use MTX_SYSINIT to initialize the timecounter lock. PR: 259878 Reviewed by: kib Sponsored by: The FreeBSD Foundation (cherry picked from commit 3339950117bedb5f880f6c08982dcc5dd43f9c34) --- sys/kern/kern_tc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 135279d48a22..989457b82434 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -100,7 +100,6 @@ static struct timecounter *timecounters = &dummy_timecounter; /* Mutex to protect the timecounter list. */ static struct mtx tc_lock; -MTX_SYSINIT(tc_lock, &tc_lock, "tc", MTX_DEF); int tc_min_ticktock_freq = 1; @@ -1982,6 +1981,8 @@ inittimehands(void *dummy) TUNABLE_STR_FETCH("kern.timecounter.hardware", tc_from_tunable, sizeof(tc_from_tunable)); + + mtx_init(&tc_lock, "tc", NULL, MTX_DEF); } SYSINIT(timehands, SI_SUB_TUNABLES, SI_ORDER_ANY, inittimehands, NULL); From nobody Mon Nov 22 13:46:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5BD8618A1196; Mon, 22 Nov 2021 13:46: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 4HyT806XtPz3lYT; Mon, 22 Nov 2021 13:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 958F523BDC; Mon, 22 Nov 2021 13:46: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 1AMDkOCA037581; Mon, 22 Nov 2021 13:46:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMDkONK037580; Mon, 22 Nov 2021 13:46:24 GMT (envelope-from git) Date: Mon, 22 Nov 2021 13:46:24 GMT Message-Id: <202111221346.1AMDkONK037580@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: 200d47320207 - stable/13 - hyperv: Register the MSR-based timecounter during SI_SUB_HYPERVISOR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 200d4732020742eb17f51b6e1c553cfac878a559 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=200d4732020742eb17f51b6e1c553cfac878a559 commit 200d4732020742eb17f51b6e1c553cfac878a559 Author: Mark Johnston AuthorDate: 2021-11-19 22:30:05 +0000 Commit: Mark Johnston CommitDate: 2021-11-22 13:45:34 +0000 hyperv: Register the MSR-based timecounter during SI_SUB_HYPERVISOR This reverts commit 9ef7df022a46 ("hyperv: Register hyperv_timecounter later during boot") and adds a comment explaining why the timecounter needs to be registered as early as it is. PR: 259878 Fixes: 9ef7df022a46 ("hyperv: Register hyperv_timecounter later during boot") Reviewed by: kib Sponsored by: The FreeBSD Foundation (cherry picked from commit ed6a9452be01c1b7805d0a7311211b8cf381a9dd) --- sys/dev/hyperv/vmbus/hyperv.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/dev/hyperv/vmbus/hyperv.c b/sys/dev/hyperv/vmbus/hyperv.c index 2c413664cd07..01e0ad9610d9 100644 --- a/sys/dev/hyperv/vmbus/hyperv.c +++ b/sys/dev/hyperv/vmbus/hyperv.c @@ -247,15 +247,12 @@ hyperv_init(void *dummy __unused) /* Set guest id */ wrmsr(MSR_HV_GUEST_OS_ID, MSR_HV_GUESTID_FREEBSD); -} -SYSINIT(hyperv_initialize, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, hyperv_init, - NULL); - -static void -hyperv_tc_init(void *arg __unused) -{ if (hyperv_features & CPUID_HV_MSR_TIME_REFCNT) { - /* Register Hyper-V timecounter */ + /* + * Register Hyper-V timecounter. This should be done as early + * as possible to let DELAY() work, since the 8254 PIT is not + * reliably emulated or even available. + */ tc_init(&hyperv_timecounter); /* @@ -265,7 +262,8 @@ hyperv_tc_init(void *arg __unused) hyperv_tc64 = hyperv_tc64_rdmsr; } } -SYSINIT(hyperv_tc_init, SI_SUB_DRIVERS, SI_ORDER_FIRST, hyperv_tc_init, NULL); +SYSINIT(hyperv_initialize, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, hyperv_init, + NULL); static void hypercall_memfree(void) From nobody Mon Nov 22 13:46:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 132A618A1329; Mon, 22 Nov 2021 13:46: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 4HyT826z5Lz3lc4; Mon, 22 Nov 2021 13:46:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2DBA23C13; Mon, 22 Nov 2021 13:46: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 1AMDkPIR037609; Mon, 22 Nov 2021 13:46:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMDkPrW037608; Mon, 22 Nov 2021 13:46:25 GMT (envelope-from git) Date: Mon, 22 Nov 2021 13:46:25 GMT Message-Id: <202111221346.1AMDkPrW037608@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: d16fbc488e60 - stable/13 - clock: Group the "clocks" SYSINIT with the function definition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d16fbc488e604d5bad295c2951aa67da885a62f5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d16fbc488e604d5bad295c2951aa67da885a62f5 commit d16fbc488e604d5bad295c2951aa67da885a62f5 Author: Mark Johnston AuthorDate: 2021-11-15 20:31:03 +0000 Commit: Mark Johnston CommitDate: 2021-11-22 13:45:47 +0000 clock: Group the "clocks" SYSINIT with the function definition This is how most SYSINITs are defined. Also annotate the dummy parameter with __unused. No functional change intended. Sponsored by: The FreeBSD Foundation (cherry picked from commit 2287ced2f5686aeda69676342d6a1ff6257f5f6d) --- sys/kern/kern_clock.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index c215471ab2d9..3998ffd2a607 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -90,9 +90,6 @@ PMC_SOFT_DEFINE_EX( , , clock, prof, \ extern void hardclock_device_poll(void); #endif /* DEVICE_POLLING */ -static void initclocks(void *dummy); -SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL); - /* Spin-lock protecting profiling statistics. */ static struct mtx time_lock; @@ -391,9 +388,8 @@ static int devpoll_run = 0; /* * Initialize clock frequencies and start both clocks running. */ -/* ARGSUSED*/ static void -initclocks(void *dummy) +initclocks(void *dummy __unused) { int i; @@ -421,6 +417,7 @@ initclocks(void *dummy) wdog_software_attach = watchdog_attach; #endif } +SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL); static __noinline void hardclock_itimer(struct thread *td, struct pstats *pstats, int cnt, int usermode) From nobody Mon Nov 22 15:30:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E5467188FA61; Mon, 22 Nov 2021 15:30: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 4HyWS469pxz4rF6; Mon, 22 Nov 2021 15:30:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A9F4C249EB; Mon, 22 Nov 2021 15:30: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 1AMFUSFs079804; Mon, 22 Nov 2021 15:30:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMFUSle079803; Mon, 22 Nov 2021 15:30:28 GMT (envelope-from git) Date: Mon, 22 Nov 2021 15:30:28 GMT Message-Id: <202111221530.1AMFUSle079803@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: 4a4053e1b053 - main - bhyve: move 64 bit BAR location to match OVMF assumptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4a4053e1b053e840cf167a629f8d2b8ae76e6da7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=4a4053e1b053e840cf167a629f8d2b8ae76e6da7 commit 4a4053e1b053e840cf167a629f8d2b8ae76e6da7 Author: Corvin Köhne AuthorDate: 2021-11-22 15:22:48 +0000 Commit: Emmanuel Vadot CommitDate: 2021-11-22 15:22:48 +0000 bhyve: move 64 bit BAR location to match OVMF assumptions OVMF will fail, if large 64 bit BARs are used. GCD-Map doesn't cover 64 bit addresses of BARs. OVMF assumes that 64 bit addresses of BARS are located on next 32 GB boundary behind Top of High RAM. This patch moves 64 bit BARs on next 32 GB boundary behind Top of High RAM to match OVMF assumptions. Differential Revision: https://reviews.freebsd.org/D27970 Sponsored by: Beckhoff Automation GmbH & Co. KG --- usr.sbin/bhyve/pci_emul.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index bd94859c4ea1..cbcd8154b2b1 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -33,9 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include #include #include @@ -49,8 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include "acpi.h" @@ -73,6 +68,8 @@ __FBSDID("$FreeBSD$"); #define MAXSLOTS (PCI_SLOTMAX + 1) #define MAXFUNCS (PCI_FUNCMAX + 1) +#define GB (1024 * 1024 * 1024UL) + struct funcinfo { nvlist_t *fi_config; struct pci_devemu *fi_pde; @@ -114,6 +111,7 @@ static uint64_t pci_emul_memlim64; SYSRES_MEM(PCI_EMUL_ECFG_BASE, PCI_EMUL_ECFG_SIZE); #define PCI_EMUL_MEMLIMIT32 PCI_EMUL_ECFG_BASE +#define PCI_EMUL_MEMSIZE64 (32*GB) static struct pci_devemu *pci_emul_finddev(const char *name); static void pci_lintr_route(struct pci_devinst *pi); @@ -1155,25 +1153,15 @@ init_pci(struct vmctx *ctx) nvlist_t *nvl; const char *emul; size_t lowmem; - uint64_t cpu_maxphysaddr, pci_emul_memresv64; - u_int regs[4]; - int bus, slot, func, error; + int bus, slot, func; + int error; pci_emul_iobase = PCI_EMUL_IOBASE; pci_emul_membase32 = vm_get_lowmem_limit(ctx); - do_cpuid(0x80000008, regs); - cpu_maxphysaddr = 1ULL << (regs[0] & 0xff); - if (cpu_maxphysaddr > VM_MAXUSER_ADDRESS_LA48) - cpu_maxphysaddr = VM_MAXUSER_ADDRESS_LA48; - pci_emul_memresv64 = cpu_maxphysaddr / 4; - /* - * Max power of 2 that is less then - * cpu_maxphysaddr - pci_emul_memresv64. - */ - pci_emul_membase64 = 1ULL << (flsl(cpu_maxphysaddr - - pci_emul_memresv64) - 1); - pci_emul_memlim64 = cpu_maxphysaddr; + pci_emul_membase64 = 4*GB + vm_get_highmem_size(ctx); + pci_emul_membase64 = roundup2(pci_emul_membase64, PCI_EMUL_MEMSIZE64); + pci_emul_memlim64 = pci_emul_membase64 + PCI_EMUL_MEMSIZE64; for (bus = 0; bus < MAXBUSES; bus++) { snprintf(node_name, sizeof(node_name), "pci.%d", bus); From nobody Mon Nov 22 15:30:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 175C0189029F; Mon, 22 Nov 2021 15:30: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 4HyWS56wp3z4r5N; Mon, 22 Nov 2021 15:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C41EC2522E; Mon, 22 Nov 2021 15:30: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 1AMFUTDE079828; Mon, 22 Nov 2021 15:30:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMFUT27079827; Mon, 22 Nov 2021 15:30:29 GMT (envelope-from git) Date: Mon, 22 Nov 2021 15:30:29 GMT Message-Id: <202111221530.1AMFUT27079827@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: 5cf21e48ccf1 - main - bhyve: use a fixed 32 bit BAR base address List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5cf21e48ccf114928da9c6564c7e5dec7d6119c5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5cf21e48ccf114928da9c6564c7e5dec7d6119c5 commit 5cf21e48ccf114928da9c6564c7e5dec7d6119c5 Author: Corvin Köhne AuthorDate: 2021-11-22 15:24:47 +0000 Commit: Emmanuel Vadot CommitDate: 2021-11-22 15:24:47 +0000 bhyve: use a fixed 32 bit BAR base address OVMF always uses 0xC0000000 as base address for 32 bit PCI MMIO space. For that reason, we should use that address too. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D31051 Sponsored by: Beckhoff Automation GmbH & Co. KG --- usr.sbin/bhyve/pci_emul.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index cbcd8154b2b1..3eec3eb6f5f9 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -110,6 +111,11 @@ static uint64_t pci_emul_memlim64; #define PCI_EMUL_ECFG_SIZE (MAXBUSES * 1024 * 1024) /* 1MB per bus */ SYSRES_MEM(PCI_EMUL_ECFG_BASE, PCI_EMUL_ECFG_SIZE); +/* + * OVMF always uses 0xC0000000 as base address for 32 bit PCI MMIO. Don't + * change this address without changing it in OVMF. + */ +#define PCI_EMUL_MEMBASE32 0xC0000000 #define PCI_EMUL_MEMLIMIT32 PCI_EMUL_ECFG_BASE #define PCI_EMUL_MEMSIZE64 (32*GB) @@ -1156,8 +1162,11 @@ init_pci(struct vmctx *ctx) int bus, slot, func; int error; + if (vm_get_lowmem_limit(ctx) > PCI_EMUL_MEMBASE32) + errx(EX_OSERR, "Invalid lowmem limit"); + pci_emul_iobase = PCI_EMUL_IOBASE; - pci_emul_membase32 = vm_get_lowmem_limit(ctx); + pci_emul_membase32 = PCI_EMUL_MEMBASE32; pci_emul_membase64 = 4*GB + vm_get_highmem_size(ctx); pci_emul_membase64 = roundup2(pci_emul_membase64, PCI_EMUL_MEMSIZE64); @@ -1262,8 +1271,8 @@ init_pci(struct vmctx *ctx) /* * The guest physical memory map looks like the following: * [0, lowmem) guest system memory - * [lowmem, lowmem_limit) memory hole (may be absent) - * [lowmem_limit, 0xE0000000) PCI hole (32-bit BAR allocation) + * [lowmem, 0xC0000000) memory hole (may be absent) + * [0xC0000000, 0xE0000000) PCI hole (32-bit BAR allocation) * [0xE0000000, 0xF0000000) PCI extended config window * [0xF0000000, 4GB) LAPIC, IOAPIC, HPET, firmware * [4GB, 4GB + highmem) From nobody Mon Nov 22 15:30:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 781E01890305; Mon, 22 Nov 2021 15:30: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 4HyWS72Kjlz4rBF; Mon, 22 Nov 2021 15:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D4512522F; Mon, 22 Nov 2021 15:30: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 1AMFUUbJ079856; Mon, 22 Nov 2021 15:30:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMFUUJn079855; Mon, 22 Nov 2021 15:30:30 GMT (envelope-from git) Date: Mon, 22 Nov 2021 15:30:30 GMT Message-Id: <202111221530.1AMFUUJn079855@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: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2eb2079554f4d54c4283410b4ee1aca549b29616 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2eb2079554f4d54c4283410b4ee1aca549b29616 commit 2eb2079554f4d54c4283410b4ee1aca549b29616 Author: Corvin Köhne AuthorDate: 2021-11-22 15:26:03 +0000 Commit: Emmanuel Vadot CommitDate: 2021-11-22 15:26:03 +0000 bhyve: keep physical and virtual COMMAND reg in sync On startup all virtual BARs are registered. Additionally, the encoding bit in the virtual cmd register is set. After that, the passthru emulation overwrites the virtual cmd register with the physical one. This could lead to a mismatch between registered BARs and the encoding bits in the cmd register. Instead of writing the physical to the virtual cmd register, write the virtual to the physical cmd register to solve this issue. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D32687 Sponsored by: Beckhoff Automation GmbH & Co. KG --- usr.sbin/bhyve/pci_passthru.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 29142749abb4..ed5d880ea8d1 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -593,8 +593,8 @@ cfginit(struct vmctx *ctx, struct pci_devinst *pi, int bus, int slot, int func) goto done; } - pci_set_cfgdata16(pi, PCIR_COMMAND, read_config(&sc->psc_sel, - PCIR_COMMAND, 2)); + write_config(&sc->psc_sel, PCIR_COMMAND, 2, + pci_get_cfgdata16(pi, PCIR_COMMAND)); error = 0; /* success */ done: From nobody Mon Nov 22 15:30:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 97BAB189030A; Mon, 22 Nov 2021 15:30: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 4HyWS82MRbz4rKG; Mon, 22 Nov 2021 15:30:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B81024E59; Mon, 22 Nov 2021 15:30: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 1AMFUVNZ079883; Mon, 22 Nov 2021 15:30:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMFUVT3079882; Mon, 22 Nov 2021 15:30:31 GMT (envelope-from git) Date: Mon, 22 Nov 2021 15:30:31 GMT Message-Id: <202111221530.1AMFUVT3079882@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: fe66bcf9ff86 - main - bhyve: emulate reads of MSI-X capabilities for passthru 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe66bcf9ff8623bf69a183c9eb8c5ce72cce7db6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=fe66bcf9ff8623bf69a183c9eb8c5ce72cce7db6 commit fe66bcf9ff8623bf69a183c9eb8c5ce72cce7db6 Author: Corvin Köhne AuthorDate: 2021-11-22 15:27:33 +0000 Commit: Emmanuel Vadot CommitDate: 2021-11-22 15:27:33 +0000 bhyve: emulate reads of MSI-X capabilities for passthru devices Reads of the MSI-X capabilites aren't emulated by passthru devices yet. The guest will read the host MSI-X capabilites which could cause issues. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D32686 Sponsored by: Beckhoff Automation GmbH & Co. KG --- usr.sbin/bhyve/pci_passthru.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index ed5d880ea8d1..9ad19f440e37 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -744,7 +744,8 @@ passthru_cfgread(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, /* * PCI BARs and MSI capability is emulated. */ - if (bar_access(coff) || msicap_access(sc, coff)) + if (bar_access(coff) || msicap_access(sc, coff) || + msixcap_access(sc, coff)) return (-1); #ifdef LEGACY_SUPPORT From nobody Mon Nov 22 16:03:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D321918A29F5; Mon, 22 Nov 2021 16:03: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 4HyX9d5bMmz3LFK; Mon, 22 Nov 2021 16:03:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A061C25B1C; Mon, 22 Nov 2021 16:03: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 1AMG31YC024690; Mon, 22 Nov 2021 16:03:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMG31h8024689; Mon, 22 Nov 2021 16:03:01 GMT (envelope-from git) Date: Mon, 22 Nov 2021 16:03:01 GMT Message-Id: <202111221603.1AMG31h8024689@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: 4faff19d6305 - stable/12 - When copying types from one CTF container to another, ensure that we always copy intrinsic data types before copying bitfields which are based on those types. This ensures the type ordering in the destination CTF container matches the assumption made elsewhere in the CTF code that instrinsic data types will always appear before bitfields based on those types. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: 4faff19d63053defffe707312c6208c2b1e934ef Auto-Submitted: auto-generated X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4faff19d63053defffe707312c6208c2b1e934ef commit 4faff19d63053defffe707312c6208c2b1e934ef Author: Jonathan T. Looney AuthorDate: 2020-11-17 14:07:27 +0000 Commit: Mark Johnston CommitDate: 2021-11-22 16:02:42 +0000 When copying types from one CTF container to another, ensure that we always copy intrinsic data types before copying bitfields which are based on those types. This ensures the type ordering in the destination CTF container matches the assumption made elsewhere in the CTF code that instrinsic data types will always appear before bitfields based on those types. This resolves the following error message some users have seen after r366908: "/usr/lib/dtrace/ipfw.d", line 121: failed to copy type of 'ip6p': Conflicting type is already defined Reviewed by: markj Sponsored by: Netflix (cherry picked from commit 3cbb4cc200f8a0ad7ed08233425ea54524a21f1c) --- cddl/contrib/opensolaris/common/ctf/ctf_create.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/cddl/contrib/opensolaris/common/ctf/ctf_create.c b/cddl/contrib/opensolaris/common/ctf/ctf_create.c index bf9b3b26b200..2f9d4b1c7953 100644 --- a/cddl/contrib/opensolaris/common/ctf/ctf_create.c +++ b/cddl/contrib/opensolaris/common/ctf/ctf_create.c @@ -1312,7 +1312,7 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_file_t *src_fp, ctf_id_t src_type) uint_t kind, flag, vlen; ctf_bundle_t src, dst; - ctf_encoding_t src_en, dst_en; + ctf_encoding_t src_en, main_en, dst_en; ctf_arinfo_t src_ar, dst_ar; ctf_dtdef_t *dtd; @@ -1427,6 +1427,27 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_file_t *src_fp, ctf_id_t src_type) if (ctf_type_encoding(src_fp, src_type, &src_en) != 0) return (ctf_set_errno(dst_fp, ctf_errno(src_fp))); + /* + * This could be a bitfield, and the CTF library assumes + * intrinsics will appear before bitfields. Therefore, + * try to copy over the intrinsic prior to copying the + * bitfield. + */ + if (dst_type == CTF_ERR && name[0] != '\0' && + (hep = ctf_hash_lookup(&src_fp->ctf_names, src_fp, name, + strlen(name))) != NULL && + src_type != (ctf_id_t)hep->h_type) { + if (ctf_type_encoding(src_fp, (ctf_id_t)hep->h_type, + &main_en) != 0) { + return (ctf_set_errno(dst_fp, + ctf_errno(src_fp))); + } + if (bcmp(&src_en, &main_en, sizeof (ctf_encoding_t)) && + ctf_add_type(dst_fp, src_fp, + (ctf_id_t)hep->h_type) == CTF_ERR) + return (CTF_ERR); /* errno is set for us */ + } + if (dst_type != CTF_ERR) { if (ctf_type_encoding(dst_fp, dst_type, &dst_en) != 0) return (CTF_ERR); /* errno is set for us */ From nobody Mon Nov 22 16:14:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1DE2618A76CB; Mon, 22 Nov 2021 16:14: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 4HyXQP0NMWz3P2S; Mon, 22 Nov 2021 16:14:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E11F825E11; Mon, 22 Nov 2021 16:14: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 1AMGE4j0038441; Mon, 22 Nov 2021 16:14:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMGE4YF038440; Mon, 22 Nov 2021 16:14:04 GMT (envelope-from git) Date: Mon, 22 Nov 2021 16:14:04 GMT Message-Id: <202111221614.1AMGE4YF038440@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: fc7207c87795 - main - bhyve: Fix compile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: fc7207c87795da4533dc7f97287638f6da85b3b0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=fc7207c87795da4533dc7f97287638f6da85b3b0 commit fc7207c87795da4533dc7f97287638f6da85b3b0 Author: Emmanuel Vadot AuthorDate: 2021-11-22 16:13:09 +0000 Commit: Emmanuel Vadot CommitDate: 2021-11-22 16:13:09 +0000 bhyve: Fix compile We need err.h Fixes: 5cf21e48ccf11 ("bhyve: use a fixed 32 bit BAR base address") Sponsored by: Bechoff Automation GmbH & Co. KG --- usr.sbin/bhyve/pci_emul.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index 3eec3eb6f5f9..0b46bcc6200e 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include From nobody Mon Nov 22 16:34:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 88A3E1889886; Mon, 22 Nov 2021 16:34: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 4HyXtK3DWMz3lY5; Mon, 22 Nov 2021 16:34:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F880261EC; Mon, 22 Nov 2021 16: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 1AMGYnil064343; Mon, 22 Nov 2021 16: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 1AMGYncN064342; Mon, 22 Nov 2021 16:34:49 GMT (envelope-from git) Date: Mon, 22 Nov 2021 16:34:49 GMT Message-Id: <202111221634.1AMGYncN064342@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: 22082f15f9bb - releng/12.3 - When copying types from one CTF container to another, ensure that we always copy intrinsic data types before copying bitfields which are based on those types. This ensures the type ordering in the destination CTF container matches the assumption made elsewhere in the CTF code that instrinsic data types will always appear before bitfields based on those types. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/releng/12.3 X-Git-Reftype: branch X-Git-Commit: 22082f15f9bbc06c43cdc75a5c77a92ac96f612c Auto-Submitted: auto-generated X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=22082f15f9bbc06c43cdc75a5c77a92ac96f612c commit 22082f15f9bbc06c43cdc75a5c77a92ac96f612c Author: Jonathan T. Looney AuthorDate: 2020-11-17 14:07:27 +0000 Commit: Mark Johnston CommitDate: 2021-11-22 16:31:45 +0000 When copying types from one CTF container to another, ensure that we always copy intrinsic data types before copying bitfields which are based on those types. This ensures the type ordering in the destination CTF container matches the assumption made elsewhere in the CTF code that instrinsic data types will always appear before bitfields based on those types. This resolves the following error message some users have seen after r366908: "/usr/lib/dtrace/ipfw.d", line 121: failed to copy type of 'ip6p': Conflicting type is already defined Reviewed by: markj Approved by: re (gjb) Sponsored by: Netflix (cherry picked from commit 3cbb4cc200f8a0ad7ed08233425ea54524a21f1c) (cherry picked from commit 4faff19d63053defffe707312c6208c2b1e934ef) --- cddl/contrib/opensolaris/common/ctf/ctf_create.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/cddl/contrib/opensolaris/common/ctf/ctf_create.c b/cddl/contrib/opensolaris/common/ctf/ctf_create.c index a2ca81960f73..46e2b7faf437 100644 --- a/cddl/contrib/opensolaris/common/ctf/ctf_create.c +++ b/cddl/contrib/opensolaris/common/ctf/ctf_create.c @@ -1258,7 +1258,7 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_file_t *src_fp, ctf_id_t src_type) uint_t kind, flag, vlen; ctf_bundle_t src, dst; - ctf_encoding_t src_en, dst_en; + ctf_encoding_t src_en, main_en, dst_en; ctf_arinfo_t src_ar, dst_ar; ctf_dtdef_t *dtd; @@ -1373,6 +1373,27 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_file_t *src_fp, ctf_id_t src_type) if (ctf_type_encoding(src_fp, src_type, &src_en) != 0) return (ctf_set_errno(dst_fp, ctf_errno(src_fp))); + /* + * This could be a bitfield, and the CTF library assumes + * intrinsics will appear before bitfields. Therefore, + * try to copy over the intrinsic prior to copying the + * bitfield. + */ + if (dst_type == CTF_ERR && name[0] != '\0' && + (hep = ctf_hash_lookup(&src_fp->ctf_names, src_fp, name, + strlen(name))) != NULL && + src_type != (ctf_id_t)hep->h_type) { + if (ctf_type_encoding(src_fp, (ctf_id_t)hep->h_type, + &main_en) != 0) { + return (ctf_set_errno(dst_fp, + ctf_errno(src_fp))); + } + if (bcmp(&src_en, &main_en, sizeof (ctf_encoding_t)) && + ctf_add_type(dst_fp, src_fp, + (ctf_id_t)hep->h_type) == CTF_ERR) + return (CTF_ERR); /* errno is set for us */ + } + if (dst_type != CTF_ERR) { if (ctf_type_encoding(dst_fp, dst_type, &dst_en) != 0) return (CTF_ERR); /* errno is set for us */ From nobody Mon Nov 22 16:34:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CB9A81889892; Mon, 22 Nov 2021 16: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 4HyXtL4Zqkz3lCD; Mon, 22 Nov 2021 16:34:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BF3C2609A; Mon, 22 Nov 2021 16: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 1AMGYopm064367; Mon, 22 Nov 2021 16: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 1AMGYoK4064366; Mon, 22 Nov 2021 16:34:50 GMT (envelope-from git) Date: Mon, 22 Nov 2021 16:34:50 GMT Message-Id: <202111221634.1AMGYoK4064366@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: 68396709e73a - releng/12.3 - libctf: Improve check for duplicate SOU definitions in ctf_add_type() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.3 X-Git-Reftype: branch X-Git-Commit: 68396709e73a4cd392ffc06fde6bfa44d79118a7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=68396709e73a4cd392ffc06fde6bfa44d79118a7 commit 68396709e73a4cd392ffc06fde6bfa44d79118a7 Author: Mark Johnston AuthorDate: 2021-10-04 16:28:22 +0000 Commit: Mark Johnston CommitDate: 2021-11-22 16:32:18 +0000 libctf: Improve check for duplicate SOU definitions in ctf_add_type() When copying a struct or union from one CTF container to another, ctf_add_type() checks whether it matches an existing type in the destination container. It does so by looking for a type with the same name and kind as the new type, and if one exists, it iterates over all members of the source type and checks whether a member with matching name and offset exists in the matched destination type. This can produce false positives, for example because member types are not compared, but this is not expected to arise in practice. If the match fails, ctf_add_type() returns an error. The procedure used for member comparison breaks down in the face of anonymous struct and union members. ctf_member_iter() visits each member in the source definition and looks up the corresponding member in the desination definition by name using ctf_member_info(), but this function will descend into anonymous members and thus fail to match. Fix the problem by introducing a custom comparison routine which does not assume member names are unique. This should also be faster for types with many members; in the previous scheme, membcmp() would perform a linear scan of the desination type's members to perform a lookup by name. The new routine steps through the members of both types in a single loop. Approved by: re (gjb) PR: 258763 Sponsored by: The FreeBSD Foundation (cherry picked from commit 105fd928b0b5b35ab529e5f6914788dc49582901) (cherry picked from commit 39545ce06ca8088aecc68b92c028b78bcae888a2) --- cddl/contrib/opensolaris/common/ctf/ctf_create.c | 100 +++++++++++++++++------ 1 file changed, 73 insertions(+), 27 deletions(-) diff --git a/cddl/contrib/opensolaris/common/ctf/ctf_create.c b/cddl/contrib/opensolaris/common/ctf/ctf_create.c index 46e2b7faf437..2f9d4b1c7953 100644 --- a/cddl/contrib/opensolaris/common/ctf/ctf_create.c +++ b/cddl/contrib/opensolaris/common/ctf/ctf_create.c @@ -1196,17 +1196,6 @@ enumadd(const char *name, int value, void *arg) name, value) == CTF_ERR); } -/*ARGSUSED*/ -static int -membcmp(const char *name, ctf_id_t type, ulong_t offset, void *arg) -{ - ctf_bundle_t *ctb = arg; - ctf_membinfo_t ctm; - - return (ctf_member_info(ctb->ctb_file, ctb->ctb_type, - name, &ctm) == CTF_ERR || ctm.ctm_offset != offset); -} - static int membadd(const char *name, ctf_id_t type, ulong_t offset, void *arg) { @@ -1240,6 +1229,71 @@ membadd(const char *name, ctf_id_t type, ulong_t offset, void *arg) return (0); } +static long +soucmp(ctf_file_t *src_fp, ctf_id_t src_type, ctf_file_t *dst_fp, + ctf_id_t dst_type) +{ + const struct ctf_type *src_tp, *dst_tp; + const char *src_name, *dst_name; + ssize_t src_sz, dst_sz, src_inc, dst_inc; + uint_t kind, n; + + if ((src_type = ctf_type_resolve(src_fp, src_type)) == CTF_ERR) + return (CTF_ERR); + if ((dst_type = ctf_type_resolve(dst_fp, dst_type)) == CTF_ERR) + return (CTF_ERR); + + if ((src_tp = ctf_lookup_by_id(&src_fp, src_type)) == NULL) + return (CTF_ERR); + if ((dst_tp = ctf_lookup_by_id(&dst_fp, dst_type)) == NULL) + return (CTF_ERR); + + if ((kind = LCTF_INFO_KIND(src_fp, src_tp->ctt_info)) != + LCTF_INFO_KIND(dst_fp, dst_tp->ctt_info)) + return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + if (kind != CTF_K_STRUCT && kind != CTF_K_UNION) + return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + if ((n = LCTF_INFO_VLEN(src_fp, src_tp->ctt_info)) != + LCTF_INFO_VLEN(dst_fp, dst_tp->ctt_info)) + return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + + (void) ctf_get_ctt_size(src_fp, src_tp, &src_sz, &src_inc); + (void) ctf_get_ctt_size(dst_fp, dst_tp, &dst_sz, &dst_inc); + if (src_sz != dst_sz || src_inc != dst_inc) + return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + + if (src_sz < CTF_LSTRUCT_THRESH) { + const ctf_member_t *src_mp, *dst_mp; + + src_mp = (const ctf_member_t *)((uintptr_t)src_tp + src_inc); + dst_mp = (const ctf_member_t *)((uintptr_t)dst_tp + dst_inc); + for (; n != 0; n--, src_mp++, dst_mp++) { + if (src_mp->ctm_offset != dst_mp->ctm_offset) + return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + src_name = ctf_strptr(src_fp, src_mp->ctm_name); + dst_name = ctf_strptr(dst_fp, dst_mp->ctm_name); + if (strcmp(src_name, dst_name) != 0) + return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + } + } else { + const ctf_lmember_t *src_mp, *dst_mp; + + src_mp = (const ctf_lmember_t *)((uintptr_t)src_tp + src_inc); + dst_mp = (const ctf_lmember_t *)((uintptr_t)dst_tp + dst_inc); + for (; n != 0; n--, src_mp++, dst_mp++) { + if (src_mp->ctlm_offsethi != dst_mp->ctlm_offsethi || + src_mp->ctlm_offsetlo != dst_mp->ctlm_offsetlo) + return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + src_name = ctf_strptr(src_fp, src_mp->ctlm_name); + dst_name = ctf_strptr(dst_fp, dst_mp->ctlm_name); + if (strcmp(src_name, dst_name) != 0) + return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + } + } + + return (0); +} + /* * The ctf_add_type routine is used to copy a type from a source CTF container * to a dynamic destination container. This routine operates recursively by @@ -1460,23 +1514,15 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_file_t *src_fp, ctf_id_t src_type) ctf_dmdef_t *dmd; int errs = 0; - /* - * Technically to match a struct or union we need to check both - * ways (src members vs. dst, dst members vs. src) but we make - * this more optimal by only checking src vs. dst and comparing - * the total size of the structure (which we must do anyway) - * which covers the possibility of dst members not in src. - * This optimization can be defeated for unions, but is so - * pathological as to render it irrelevant for our purposes. - */ if (dst_type != CTF_ERR && dst_kind != CTF_K_FORWARD) { - if (ctf_type_size(src_fp, src_type) != - ctf_type_size(dst_fp, dst_type)) - return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); - - if (ctf_member_iter(src_fp, src_type, membcmp, &dst)) - return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); - + /* + * Compare the sizes and fields of the two types. + * The field comparisons only check the names and + * offsets, so this is not perfect but is good enough + * for scenarios that we care about. + */ + if (soucmp(src_fp, src_type, dst_fp, dst_type) != 0) + return (CTF_ERR); /* errno is set for us */ break; } From nobody Mon Nov 22 16:38:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6DA17188BDBB; Mon, 22 Nov 2021 16:38:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HyXyh2m5vz3mrs; Mon, 22 Nov 2021 16:38:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from [IPV6:2601:648:8601:8b20:7de4:e77a:791:6f5] (unknown [IPv6:2601:648:8601:8b20:7de4:e77a:791:6f5]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id BCDD98AFE; Mon, 22 Nov 2021 16:38:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <428e410d-33c1-7ff8-9689-41943db3d9c3@FreeBSD.org> Date: Mon, 22 Nov 2021 08:38:33 -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.14; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync Content-Language: en-US To: Emmanuel Vadot , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202111221530.1AMFUUJn079855@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202111221530.1AMFUUJn079855@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N On 11/22/21 7:30 AM, Emmanuel Vadot wrote: > The branch main has been updated by manu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2eb2079554f4d54c4283410b4ee1aca549b29616 > > commit 2eb2079554f4d54c4283410b4ee1aca549b29616 > Author: Corvin Köhne > AuthorDate: 2021-11-22 15:26:03 +0000 > Commit: Emmanuel Vadot > CommitDate: 2021-11-22 15:26:03 +0000 > > bhyve: keep physical and virtual COMMAND reg in sync > > On startup all virtual BARs are registered. > Additionally, the encoding bit in the virtual cmd register is set. > After that, the passthru emulation overwrites the virtual cmd register with > the physical one. > This could lead to a mismatch between registered BARs and the encoding > bits in the cmd register. > Instead of writing the physical to the virtual cmd register, > write the virtual to the physical cmd register to solve this issue. > > Reviewed by: markj > Differential Revision: https://reviews.freebsd.org/D32687 > Sponsored by: Beckhoff Automation GmbH & Co. KG Humm, I wonder if my older patch that tries to handle the command register more deterministically might have handled this. The patch tried to fix an open bug where you can't use a XHCI controller via passthru after you have rebooted a Linux guest. It makes this write here conditional: https://reviews.freebsd.org/D20623 -- John Baldwin From nobody Mon Nov 22 17:13:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C6C8B18A02FB; Mon, 22 Nov 2021 17:13: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 4HyYkg5HrFz4Wt0; Mon, 22 Nov 2021 17:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 964DC26868; Mon, 22 Nov 2021 17:13: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 1AMHDF7h017686; Mon, 22 Nov 2021 17:13:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMHDFmH017685; Mon, 22 Nov 2021 17:13:15 GMT (envelope-from git) Date: Mon, 22 Nov 2021 17:13:15 GMT Message-Id: <202111221713.1AMHDFmH017685@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: a11983366ea7 - main - pchtherm: Let the driver be compiled into the kernel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a11983366ea72165809837a667d58e2ad440c496 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a11983366ea72165809837a667d58e2ad440c496 commit a11983366ea72165809837a667d58e2ad440c496 Author: N.J. Mann AuthorDate: 2021-11-22 17:04:05 +0000 Commit: Mark Johnston CommitDate: 2021-11-22 17:12:37 +0000 pchtherm: Let the driver be compiled into the kernel PR: 259776 MFC after: 1 week --- sys/conf/files.x86 | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index 5018a52673e3..739ce6886384 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -143,6 +143,7 @@ dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/ichwd/ichwd.c optional ichwd dev/imcsmb/imcsmb.c optional imcsmb dev/imcsmb/imcsmb_pci.c optional imcsmb pci +dev/intel/pchtherm.c optional pchtherm dev/intel/spi.c optional intelspi dev/io/iodev.c optional io dev/iommu/busdma_iommu.c optional acpi iommu pci From nobody Mon Nov 22 17:25:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8DF2818A76D4 for ; Mon, 22 Nov 2021 17:25:52 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (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 4HyZ1D2xPJz4c67 for ; Mon, 22 Nov 2021 17:25:52 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x82c.google.com with SMTP id t11so17278042qtw.3 for ; Mon, 22 Nov 2021 09:25:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=l3Tp6AKMR0e55GDgrU79P/yJxcwdPCOmAAkhYbVICl4=; b=B7ha8e9m9rHyq8cDBNIkxmHO6cyKSODeaQ+at8/aHcf2zNoK/qCWDyMMLXl3jmGNcc OwCslhuoMFzJipRKx3V7I0NWvF/DchJFVY/1vwOGzzEA05k+KGyXWya8Qq2zRTLktWhA eIYFwt7NUeir0HFgNMdeUtF5JD/PJyskyRXAKGE4Jgw6I3xNMR3dRcxTH8fkQ4in9x7x /e3+2TFZLyWO3i/A+WoQhhffrRC7jpVobYZr1eGD8iXLdSww6xG4CyPOKebKATWB3BzC W9hFt5eUROVbnvN2+dj/AOsVnJAxp2yYv+gkVcSQZ5BaLp1zKe8Z49jaIK1vgr0z+VAK YIYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=l3Tp6AKMR0e55GDgrU79P/yJxcwdPCOmAAkhYbVICl4=; b=gUCb1yJ15c2hU92UtXX/IrYTX9B8rhdQKWJFtMBBVhuPxakoTUSlihK4tXIZCOGYxc LceRR2OG9QT2xlNB+DJSenNQj6ufWo1Yxgc79QJTGgVGVSWmMjxjLc1UrXrmT2GLh5Ar na6ilVUwfu7BqY98FpxiU1sUwuFFKB5FMH8PI6Paa9aaeyTwZf44gEGqN64Jc5Kfh6lq U1MfX2eEGE5Vf2CiKCWHOh69awxJ5djaBqpvTkBekzSQvdAUhuNOJPjX0wYul7ztqubA 9VRi7Qs6MzGbyihFHZtNuA86ELC6dNLLUN+wQwFAAjYdmDT+g1bZsLCp822DswGW+RbC 5/Ag== X-Gm-Message-State: AOAM533+os+tQUMb5hquW3E/67VsIg/9N27PdaMU9a3x+p5y0iGH4HZE 31h/MlpLjOE7L6cwDIy0lyCH6A== X-Google-Smtp-Source: ABdhPJxsI7WTEjqtd1rzl1yAfsLa1sJEZaKuX8zoofIH2fo039zlz4ukcqidChrqm0Fh8euYBncwqg== X-Received: by 2002:ac8:7d46:: with SMTP id h6mr33059613qtb.379.1637601946150; Mon, 22 Nov 2021 09:25:46 -0800 (PST) Received: from mutt-hbsd (pool-100-16-224-136.bltmmd.fios.verizon.net. [100.16.224.136]) by smtp.gmail.com with ESMTPSA id k16sm4623559qtx.92.2021.11.22.09.25.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Nov 2021 09:25:45 -0800 (PST) Date: Mon, 22 Nov 2021 12:25:44 -0500 From: Shawn Webb To: Mark Johnston Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: 68396709e73a - releng/12.3 - libctf: Improve check for duplicate SOU definitions in ctf_add_type() Message-ID: <20211122172544.a3wi636tajsnsfme@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 14.0-CURRENT-HBSD FreeBSD 14.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202111221634.1AMGYoK4064366@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6n2yojvmhxmacvco" Content-Disposition: inline In-Reply-To: <202111221634.1AMGYoK4064366@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4HyZ1D2xPJz4c67 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --6n2yojvmhxmacvco Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 22, 2021 at 04:34:50PM +0000, Mark Johnston wrote: > The branch releng/12.3 has been updated by markj: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D68396709e73a4cd392ffc06fde= 6bfa44d79118a7 >=20 > commit 68396709e73a4cd392ffc06fde6bfa44d79118a7 > Author: Mark Johnston > AuthorDate: 2021-10-04 16:28:22 +0000 > Commit: Mark Johnston > CommitDate: 2021-11-22 16:32:18 +0000 >=20 > libctf: Improve check for duplicate SOU definitions in ctf_add_type() > =20 > When copying a struct or union from one CTF container to another, > ctf_add_type() checks whether it matches an existing type in the > destination container. It does so by looking for a type with the same > name and kind as the new type, and if one exists, it iterates over all > members of the source type and checks whether a member with matching > name and offset exists in the matched destination type. This can > produce false positives, for example because member types are not > compared, but this is not expected to arise in practice. If the match > fails, ctf_add_type() returns an error. > =20 > The procedure used for member comparison breaks down in the face of > anonymous struct and union members. ctf_member_iter() visits each > member in the source definition and looks up the corresponding member= in > the desination definition by name using ctf_member_info(), but this > function will descend into anonymous members and thus fail to match. > Fix the problem by introducing a custom comparison routine which does > not assume member names are unique. This should also be faster for > types with many members; in the previous scheme, membcmp() would perf= orm > a linear scan of the desination type's members to perform a lookup by > name. The new routine steps through the members of both types in a > single loop. Hey Mark, Out of curiosity, would commits to releng branches necessitate an EN? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --6n2yojvmhxmacvco Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmGb0pUACgkQ/y5nonf4 4foDzQ//X8YXxXyUOJW4tZd8G/YkAjFYeGrEKZebnhb5HWBjZMlaM62jZ4HngxQA hw7C5biyZk9AWsghnvbuccLOzFn7IXV2CHJTDFWeNKLxfZ9xdwigBOVf9omAw0kE A6Zif1OT3QysH4YmrK5I3JuOhc02MIVP4lwjCH040c/k+fwgA5WToMO8MpDULuRk k9U2UbATWkZKpvKLrWD9m36/BkmmpfwjLot+3RpQXeDy9lwLrgEiA8gOO21holAt igyxJj/aqW3qB4wOsKIazCbW+aV654EUrQB1Sr7nzXyigEwg9+z8QSztAM86s7RG bZYBkQb8EZqDyKajHF+kuBcGZI8QhFs4S5AZrMHew1UuB2wD39fwHHhcOTpcdttT eGF2jrr3hpr3L3L0zFZgRuCHuucONm5pGClmTpTi69woFe4dQn4431bPpGkVj6vb BOMO5YynK729WPX0qA5jkq0gI+Yt/4pm8Oej+NUNbmq6XjTUTXXNhppNS+LXfHwd Ws6s49xVlqv4bwv7/SUaJPcdJ1HHbco6ZFB7Yd4lJ/RhirOw+NmkF3bUflKK2lyg r5xMfnK7Y+EJcSvFBJVEVD3utEVZ+lFc3Qbp1Fjh/ko6IJezHNI4FimJJMBiiKq8 rDf8kJ6paZoIdZ4MlZgGu4JSIi832L0JSCj03worELN4NM0sBjY= =64oi -----END PGP SIGNATURE----- --6n2yojvmhxmacvco-- From nobody Mon Nov 22 17:58:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7D7DD1890DAC; Mon, 22 Nov 2021 17:58:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HyZkv2wLnz4qwG; Mon, 22 Nov 2021 17:58:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 38F589630; Mon, 22 Nov 2021 17:58:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f48.google.com with SMTP id b17so13031718qvl.9; Mon, 22 Nov 2021 09:58:31 -0800 (PST) X-Gm-Message-State: AOAM533jHtAuxFtQhSuVxAkJFL3/h9JQlvef4NUceoK5H0MTgh4Skh6W /4E3D0ZzSJLWdlr+sOTtU7ZAKsfUyLL1JCYGfVo= X-Google-Smtp-Source: ABdhPJyc+6XdnL9lpc9IurF8KNhQ9/chXr9g2fF5waqrUn/cv6ZtX5XJboxu9VsBzfszzjI+8rJrl/wdZ8x9guZrJqc= X-Received: by 2002:a0c:fa07:: with SMTP id q7mr102838644qvn.18.1637603910671; Mon, 22 Nov 2021 09:58:30 -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: <202111221634.1AMGYoK4064366@gitrepo.freebsd.org> <20211122172544.a3wi636tajsnsfme@mutt-hbsd> In-Reply-To: <20211122172544.a3wi636tajsnsfme@mutt-hbsd> From: Kyle Evans Date: Mon, 22 Nov 2021 11:58:19 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 68396709e73a - releng/12.3 - libctf: Improve check for duplicate SOU definitions in ctf_add_type() To: Shawn Webb Cc: Mark Johnston , src-committers , "" , dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-ThisMailContainsUnwantedMimeParts: N On Mon, Nov 22, 2021 at 11:25 AM Shawn Webb wrote: > > On Mon, Nov 22, 2021 at 04:34:50PM +0000, Mark Johnston wrote: > > The branch releng/12.3 has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=68396709e73a4cd392ffc06fde6bfa44d79118a7 > > > > commit 68396709e73a4cd392ffc06fde6bfa44d79118a7 > > Author: Mark Johnston > > AuthorDate: 2021-10-04 16:28:22 +0000 > > Commit: Mark Johnston > > CommitDate: 2021-11-22 16:32:18 +0000 > > > > libctf: Improve check for duplicate SOU definitions in ctf_add_type() > > > > When copying a struct or union from one CTF container to another, > > ctf_add_type() checks whether it matches an existing type in the > > destination container. It does so by looking for a type with the same > > name and kind as the new type, and if one exists, it iterates over all > > members of the source type and checks whether a member with matching > > name and offset exists in the matched destination type. This can > > produce false positives, for example because member types are not > > compared, but this is not expected to arise in practice. If the match > > fails, ctf_add_type() returns an error. > > > > The procedure used for member comparison breaks down in the face of > > anonymous struct and union members. ctf_member_iter() visits each > > member in the source definition and looks up the corresponding member in > > the desination definition by name using ctf_member_info(), but this > > function will descend into anonymous members and thus fail to match. > > Fix the problem by introducing a custom comparison routine which does > > not assume member names are unique. This should also be faster for > > types with many members; in the previous scheme, membcmp() would perform > > a linear scan of the desination type's members to perform a lookup by > > name. The new routine steps through the members of both types in a > > single loop. > > Hey Mark, > > Out of curiosity, would commits to releng branches necessitate an EN? > > Thanks, > This is just the in-progress release branch, so not here, at least. From nobody Mon Nov 22 18:03:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 070B718940A1; Mon, 22 Nov 2021 18:03: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 4HyZrd6jx9z4srf; Mon, 22 Nov 2021 18:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C69F627593; Mon, 22 Nov 2021 18:03: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 1AMI3TnB084451; Mon, 22 Nov 2021 18:03:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMI3TqW084450; Mon, 22 Nov 2021 18:03:29 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:03:29 GMT Message-Id: <202111221803.1AMI3TqW084450@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: 5bbfa333cfc4 - main - ipresend(1): Make the build slightly less broken. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5bbfa333cfc435c16cdfee20d84b17954972f610 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=5bbfa333cfc435c16cdfee20d84b17954972f610 commit 5bbfa333cfc435c16cdfee20d84b17954972f610 Author: Allan Jude AuthorDate: 2021-11-22 17:58:08 +0000 Commit: Allan Jude CommitDate: 2021-11-22 18:03:24 +0000 ipresend(1): Make the build slightly less broken. X-NetApp-PR: 35 Sponsored by: NetApp, Inc. Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D27335 --- contrib/ipfilter/ipsend/sock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index 7754ef9d8e1c..51418d64d1fe 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -42,6 +42,7 @@ typedef int boolean_t; #include #include #include +#define _WANT_SOCKET #include #include # include From nobody Mon Nov 22 18:10:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 396091897FE0; Mon, 22 Nov 2021 18:10: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 4Hyb1C1CYjz3C6p; Mon, 22 Nov 2021 18:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F388327343; Mon, 22 Nov 2021 18:10: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 1AMIAsBk093271; Mon, 22 Nov 2021 18:10:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIAs2C093270; Mon, 22 Nov 2021 18:10:54 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:10:54 GMT Message-Id: <202111221810.1AMIAs2C093270@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: d9bb798725cf - main - openssl: Fix detection of ARMv7 and ARM64 CPU features List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d9bb798725cfce9c72b80440659b48e8668eb10d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=d9bb798725cfce9c72b80440659b48e8668eb10d commit d9bb798725cfce9c72b80440659b48e8668eb10d Author: Allan Jude AuthorDate: 2021-11-19 15:14:30 +0000 Commit: Allan Jude CommitDate: 2021-11-22 18:10:43 +0000 openssl: Fix detection of ARMv7 and ARM64 CPU features OpenSSL assumes the same value for AT_HWCAP=16 (Linux) So it ends up calling elf_auxv_info() with AT_CANARY which returns ENOENT, and all acceleration features are disabled. With this, my ARM64 test machine runs the benchmark `openssl speed -evp aes-256-gcm` nearly 20x faster going from 100 MB/sec to 2000 MB/sec It also improves sha256 from 300 MB/sec to 1800 MB/sec This fix has been accepted but not yet merged upstream: https://github.com/openssl/openssl/pull/17082 PR: 259937 Reviewed by: manu, imp MFC after: immediate Relnotes: yes Fixes: 88e852c0b5c872b1a ("OpenSSL: Merge OpenSSL 1.1.1j") Sponsored by: Ampere Computing LLC Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D33060 --- crypto/openssl/crypto/armcap.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crypto/openssl/crypto/armcap.c b/crypto/openssl/crypto/armcap.c index c5685bde5891..48c5d4d64e32 100644 --- a/crypto/openssl/crypto/armcap.c +++ b/crypto/openssl/crypto/armcap.c @@ -106,20 +106,23 @@ static unsigned long getauxval(unsigned long key) * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas * AArch64 used AT_HWCAP. */ +# ifndef AT_HWCAP +# define AT_HWCAP 16 +# endif +# ifndef AT_HWCAP2 +# define AT_HWCAP2 26 +# endif # if defined(__arm__) || defined (__arm) -# define HWCAP 16 - /* AT_HWCAP */ +# define HWCAP AT_HWCAP # define HWCAP_NEON (1 << 12) -# define HWCAP_CE 26 - /* AT_HWCAP2 */ +# define HWCAP_CE AT_HWCAP2 # define HWCAP_CE_AES (1 << 0) # define HWCAP_CE_PMULL (1 << 1) # define HWCAP_CE_SHA1 (1 << 2) # define HWCAP_CE_SHA256 (1 << 3) # elif defined(__aarch64__) -# define HWCAP 16 - /* AT_HWCAP */ +# define HWCAP AT_HWCAP # define HWCAP_NEON (1 << 1) # define HWCAP_CE HWCAP From nobody Mon Nov 22 18:14:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0C010189B870; Mon, 22 Nov 2021 18:14: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 4Hyb516rDlz3DsC; Mon, 22 Nov 2021 18:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA94F27722; Mon, 22 Nov 2021 18:14: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 1AMIEDxg098243; Mon, 22 Nov 2021 18:14:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIED8D098242; Mon, 22 Nov 2021 18:14:13 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:14:13 GMT Message-Id: <202111221814.1AMIED8D098242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Allan Jude Subject: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 32a2fed6e71f896266d4c695754104d82a72c60d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=32a2fed6e71f896266d4c695754104d82a72c60d commit 32a2fed6e71f896266d4c695754104d82a72c60d Author: Allan Jude AuthorDate: 2021-11-19 15:14:30 +0000 Commit: Allan Jude CommitDate: 2021-11-22 18:12:20 +0000 openssl: Fix detection of ARMv7 and ARM64 CPU features OpenSSL assumes the same value for AT_HWCAP=16 (Linux) So it ends up calling elf_auxv_info() with AT_CANARY which returns ENOENT, and all acceleration features are disabled. With this, my ARM64 test machine runs the benchmark `openssl speed -evp aes-256-gcm` nearly 20x faster going from 100 MB/sec to 2000 MB/sec It also improves sha256 from 300 MB/sec to 1800 MB/sec This fix has been accepted but not yet merged upstream: https://github.com/openssl/openssl/pull/17082 PR: 259937 Reviewed by: manu, imp MFC after: immediate Relnotes: yes Fixes: 88e852c0b5c872b1a ("OpenSSL: Merge OpenSSL 1.1.1j") Sponsored by: Ampere Computing LLC Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D33060 (cherry picked from commit d9bb798725cfce9c72b80440659b48e8668eb10d) --- crypto/openssl/crypto/armcap.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crypto/openssl/crypto/armcap.c b/crypto/openssl/crypto/armcap.c index c5685bde5891..48c5d4d64e32 100644 --- a/crypto/openssl/crypto/armcap.c +++ b/crypto/openssl/crypto/armcap.c @@ -106,20 +106,23 @@ static unsigned long getauxval(unsigned long key) * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas * AArch64 used AT_HWCAP. */ +# ifndef AT_HWCAP +# define AT_HWCAP 16 +# endif +# ifndef AT_HWCAP2 +# define AT_HWCAP2 26 +# endif # if defined(__arm__) || defined (__arm) -# define HWCAP 16 - /* AT_HWCAP */ +# define HWCAP AT_HWCAP # define HWCAP_NEON (1 << 12) -# define HWCAP_CE 26 - /* AT_HWCAP2 */ +# define HWCAP_CE AT_HWCAP2 # define HWCAP_CE_AES (1 << 0) # define HWCAP_CE_PMULL (1 << 1) # define HWCAP_CE_SHA1 (1 << 2) # define HWCAP_CE_SHA256 (1 << 3) # elif defined(__aarch64__) -# define HWCAP 16 - /* AT_HWCAP */ +# define HWCAP AT_HWCAP # define HWCAP_NEON (1 << 1) # define HWCAP_CE HWCAP From nobody Mon Nov 22 18:16:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 36E9E189BE4B for ; Mon, 22 Nov 2021 18:16:16 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (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 4Hyb7N0czxz3FX4 for ; Mon, 22 Nov 2021 18:16:16 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x82b.google.com with SMTP id p19so17357014qtw.12 for ; Mon, 22 Nov 2021 10:16:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=wWoZkPpLfahSZA+1EzULmiSKQcNOmq6SLUuMzur7IF0=; b=cAUoolXnHJwS2PR5dZFe9KysVyDWB8RgpcOTjt/YadUIQBxZbuoRQ3rHWOCWy2jlg+ 7R30gwEqwVRbiYGHLru2sLhj52RPaoonn0Ly5tkcS/ygXYnUXOfxygyLpeXAHG2iatEk Ul6SmdSEBk4Z/dIjHJvWRVlrpQF8T1WebYEa0+gKn7jCWj0lgFy24aCy5Racx40ks+m4 U+I4gTzZzNSqCGUZI3J9ZeFkcFDHSoDgxxRIZ9blHvMFMsCWcROfZ8jm01M6O04Rz8o7 ph+LEz09YzWlk1fTh++TAvrFmVz7w/hCaUVrg9oIFFFk2uHxxTw0d3psQOmeiK4tHlDW ehJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wWoZkPpLfahSZA+1EzULmiSKQcNOmq6SLUuMzur7IF0=; b=Rd9Zy/eK6G1UKt+764+CXUkBz+N9o1l+TFC3CTvY8zQd/1hePsg1pb4q63uN0WQZZa 9zMpeHy+hrCVstqflc3UXfXKMnIip0O3/BLFAlHNE5h9UcRPlD7LbGXG9vvQrwLsgb5g NKCM5YnQ2nw1Q1y9ZUfVrj0Mrat8zMGyVCwkJm0xVE0pSehqwDJcVu9LxYIf3GfUXDPs QPP6P+jxcZ/EIE5Q/rIeu8IfFBul1C1JYnZTjJmx6CAz7SfvgIDgIGaiGTft1kivEXZ8 Npxj0eyWCA29qmP2rMV4mIqC//aN2GAEJQp49xF5x7OpG9Jib9ESt4sfaQN4fOEXI2Uq 0wGw== X-Gm-Message-State: AOAM5335yHbu78ysMd/qyPonUWs7oFPH77DSDZa1rlbSsdSk/ZC85h5f PTlRf3DTX3xL/DB5+wbmYZY1Jg== X-Google-Smtp-Source: ABdhPJzsfSUKW5WJChOnFwurBNAEUH6yxdw05ZaZk0YQ9ZJNxO7bOKlXmqw8UijQUIhcf5tB5bQtiQ== X-Received: by 2002:a05:622a:590:: with SMTP id c16mr33411716qtb.289.1637604975667; Mon, 22 Nov 2021 10:16:15 -0800 (PST) Received: from mutt-hbsd (pool-100-16-224-136.bltmmd.fios.verizon.net. [100.16.224.136]) by smtp.gmail.com with ESMTPSA id bk25sm4760284qkb.13.2021.11.22.10.16.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Nov 2021 10:16:15 -0800 (PST) Date: Mon, 22 Nov 2021 13:16:14 -0500 From: Shawn Webb To: Kyle Evans Cc: Mark Johnston , src-committers , "" , dev-commits-src-branches@freebsd.org Subject: Re: git: 68396709e73a - releng/12.3 - libctf: Improve check for duplicate SOU definitions in ctf_add_type() Message-ID: <20211122181614.qiprd2oawy3h5ysa@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 14.0-CURRENT-HBSD FreeBSD 14.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202111221634.1AMGYoK4064366@gitrepo.freebsd.org> <20211122172544.a3wi636tajsnsfme@mutt-hbsd> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: 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-sha256; protocol="application/pgp-signature"; boundary="nvehbcspcrnalesi" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Hyb7N0czxz3FX4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --nvehbcspcrnalesi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 22, 2021 at 11:58:19AM -0600, Kyle Evans wrote: > On Mon, Nov 22, 2021 at 11:25 AM Shawn Webb = wrote: > > > > On Mon, Nov 22, 2021 at 04:34:50PM +0000, Mark Johnston wrote: > > > The branch releng/12.3 has been updated by markj: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D68396709e73a4cd392ffc0= 6fde6bfa44d79118a7 > > > > > > commit 68396709e73a4cd392ffc06fde6bfa44d79118a7 > > > Author: Mark Johnston > > > AuthorDate: 2021-10-04 16:28:22 +0000 > > > Commit: Mark Johnston > > > CommitDate: 2021-11-22 16:32:18 +0000 > > > > > > libctf: Improve check for duplicate SOU definitions in ctf_add_ty= pe() > > > > > > When copying a struct or union from one CTF container to another, > > > ctf_add_type() checks whether it matches an existing type in the > > > destination container. It does so by looking for a type with the= same > > > name and kind as the new type, and if one exists, it iterates ove= r all > > > members of the source type and checks whether a member with match= ing > > > name and offset exists in the matched destination type. This can > > > produce false positives, for example because member types are not > > > compared, but this is not expected to arise in practice. If the = match > > > fails, ctf_add_type() returns an error. > > > > > > The procedure used for member comparison breaks down in the face = of > > > anonymous struct and union members. ctf_member_iter() visits each > > > member in the source definition and looks up the corresponding me= mber in > > > the desination definition by name using ctf_member_info(), but th= is > > > function will descend into anonymous members and thus fail to mat= ch. > > > Fix the problem by introducing a custom comparison routine which = does > > > not assume member names are unique. This should also be faster f= or > > > types with many members; in the previous scheme, membcmp() would = perform > > > a linear scan of the desination type's members to perform a looku= p by > > > name. The new routine steps through the members of both types in= a > > > single loop. > > > > Hey Mark, > > > > Out of curiosity, would commits to releng branches necessitate an EN? > > > > Thanks, > > >=20 > This is just the in-progress release branch, so not here, at least. Ah. I should've paid closer attention. Thanks for the clarification. :-) --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --nvehbcspcrnalesi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmGb3mwACgkQ/y5nonf4 4fp8OQ//ZRMSX8uWU9qOGlTlvRxuoQrv09MexQAkHCpSa26Q0oR+zu+HoNggnsuX 7L+4i7JLoU46Qi4fgCtjRKdUOgFWT9nidc4/WnnWPasFKvthpE7a+3XEzvmXu53W cg1tviXkVSZpx7uR4SO0VQwgiJoiCpohKq5sD7hdDFmxivN+u/RPdr4/3iPKjs+C hPHYBfO+lsAhVDnyVvgLRxRnvo8J9gHCU4dgcTODNTQtD3vjs39xlzP54b03AH/u e5GyrPsuEGBn/Lc6osOWFvfIMENCE+/Sg3HEobu/fZfbVEkoMISKiytB/j6wNoFI QSSukNu7p6aj8+vBwovcCxiz3Y5fJ5vGKX6+jZ4ToWI/OgqE49UBIfPXGpCXnD/l c3vzSf5GYUA73HmKWUOqoEBKg99N+siA9EB4IhZZpZ+ol2tg4NtywH6BFKNymU66 X8FnIb0Oq0habX0SQrBt/nyOzVaGmvUZ3dxZDJJQXYWm6efmQ49SVHg8yZ7pRWm3 J+HjaKP4v9k25MOfMplttxOTfaL9Iwebxl0s4BpTYbXY11/B0Wf63LI3cXCjVUV0 DVl83hqGYc2v79nAW2IUHY7SGQAK+xde6UIrj4EGyhXLKA9jDrBQO00m+Mp9tXF3 z90CcyLnya7O3ckVdNMSqYzjnUtP+NrgH1sX/qum14744ZskQZM= =4mFH -----END PGP SIGNATURE----- --nvehbcspcrnalesi-- From nobody Mon Nov 22 18:19:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DCFCC189FC5E; Mon, 22 Nov 2021 18:20: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 4HybCh5vbHz3HQ5; Mon, 22 Nov 2021 18:20:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABE96273F8; Mon, 22 Nov 2021 18:20: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 1AMIK0QW099528; Mon, 22 Nov 2021 18:20:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIJwq2098785; Mon, 22 Nov 2021 18:19:58 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:19:58 GMT Message-Id: <202111221819.1AMIJwq2098785@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: ffd3ed2b58fb - stable/12 - wpa: Import wpa_supplicant/hostapd commits up to b4f7506ff List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ffd3ed2b58fb09435a08d4e32df3181038990a1f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ffd3ed2b58fb09435a08d4e32df3181038990a1f commit ffd3ed2b58fb09435a08d4e32df3181038990a1f Author: Cy Schubert AuthorDate: 2021-09-03 13:07:19 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:19:30 +0000 wpa: Import wpa_supplicant/hostapd commits up to b4f7506ff Merge vendor commits 40c7ff83e74eabba5a7e2caefeea12372b2d3f9a, efec8223892b3e677acb46eae84ec3534989971f, and 2f6c3ea9600b494d24cac5a38c1cea0ac192245e. Tested by: philip (cherry picked from commit c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5) --- contrib/wpa/CONTRIBUTIONS | 5 +- contrib/wpa/hostapd/Android.mk | 1152 ++ contrib/wpa/hostapd/ChangeLog | 4 +- contrib/wpa/hostapd/Makefile | 1375 +++ contrib/wpa/hostapd/android.config | 214 + contrib/wpa/hostapd/config_file.c | 453 +- contrib/wpa/hostapd/ctrl_iface.c | 908 +- contrib/wpa/hostapd/defconfig | 35 +- contrib/wpa/hostapd/hostapd.android.rc | 19 + contrib/wpa/hostapd/hostapd.conf | 367 +- contrib/wpa/hostapd/hostapd.wpa_psk | 6 + contrib/wpa/hostapd/hostapd_cli.c | 128 +- contrib/wpa/hostapd/main.c | 22 +- contrib/wpa/hostapd/sae_pk_gen.c | 196 + contrib/wpa/hs20/client/Makefile | 55 +- contrib/wpa/hs20/client/est.c | 7 +- contrib/wpa/hs20/client/oma_dm_client.c | 2 +- contrib/wpa/hs20/client/osu_client.c | 27 +- contrib/wpa/hs20/client/osu_client.h | 2 + contrib/wpa/hs20/client/spp_client.c | 2 +- contrib/wpa/hs20/server/Makefile | 42 + contrib/wpa/hs20/server/ca/clean.sh | 13 + contrib/wpa/hs20/server/ca/est-csrattrs.cnf | 17 + contrib/wpa/hs20/server/ca/est-csrattrs.sh | 4 + contrib/wpa/hs20/server/ca/hs20.oid | 7 + contrib/wpa/hs20/server/ca/ocsp-req.sh | 11 + contrib/wpa/hs20/server/ca/ocsp-responder-ica.sh | 3 + contrib/wpa/hs20/server/ca/ocsp-responder.sh | 3 + contrib/wpa/hs20/server/ca/ocsp-update-cache.sh | 11 + contrib/wpa/hs20/server/ca/openssl-root.cnf | 125 + contrib/wpa/hs20/server/ca/openssl.cnf | 200 + contrib/wpa/hs20/server/ca/setup.sh | 209 + contrib/wpa/hs20/server/ca/w1fi_logo.png | Bin 0 -> 7549 bytes contrib/wpa/hs20/server/hs20-osu-server.txt | 262 + contrib/wpa/hs20/server/hs20_spp_server.c | 207 + contrib/wpa/hs20/server/spp_server.c | 2933 +++++ contrib/wpa/hs20/server/spp_server.h | 36 + contrib/wpa/hs20/server/sql-example.txt | 17 + contrib/wpa/hs20/server/sql.txt | 108 + contrib/wpa/hs20/server/www/add-free.php | 50 + contrib/wpa/hs20/server/www/add-mo.php | 56 + contrib/wpa/hs20/server/www/cert-enroll.php | 39 + contrib/wpa/hs20/server/www/config.php | 7 + contrib/wpa/hs20/server/www/est.php | 232 + contrib/wpa/hs20/server/www/free-remediation.php | 19 + contrib/wpa/hs20/server/www/free.php | 23 + contrib/wpa/hs20/server/www/redirect.php | 32 + contrib/wpa/hs20/server/www/remediation-pw.php | 41 + contrib/wpa/hs20/server/www/remediation.php | 55 + contrib/wpa/hs20/server/www/signup.php | 59 + contrib/wpa/hs20/server/www/spp.php | 168 + contrib/wpa/hs20/server/www/terms.php | 87 + contrib/wpa/hs20/server/www/users.php | 377 + contrib/wpa/src/Makefile | 12 + contrib/wpa/src/ap/Makefile | 60 + contrib/wpa/src/ap/acs.c | 357 +- contrib/wpa/src/ap/airtime_policy.c | 12 +- contrib/wpa/src/ap/ap_config.c | 298 +- contrib/wpa/src/ap/ap_config.h | 135 +- contrib/wpa/src/ap/ap_drv_ops.c | 158 +- contrib/wpa/src/ap/ap_drv_ops.h | 51 +- contrib/wpa/src/ap/ap_list.c | 4 - contrib/wpa/src/ap/authsrv.c | 87 +- contrib/wpa/src/ap/beacon.c | 609 +- contrib/wpa/src/ap/beacon.h | 2 + contrib/wpa/src/ap/ctrl_iface_ap.c | 85 +- contrib/wpa/src/ap/dfs.c | 330 +- contrib/wpa/src/ap/dfs.h | 3 + contrib/wpa/src/ap/dhcp_snoop.c | 8 +- contrib/wpa/src/ap/dpp_hostapd.c | 1025 +- contrib/wpa/src/ap/dpp_hostapd.h | 11 + contrib/wpa/src/ap/drv_callbacks.c | 362 +- contrib/wpa/src/ap/fils_hlp.c | 36 +- contrib/wpa/src/ap/gas_serv.c | 10 +- contrib/wpa/src/ap/hostapd.c | 282 +- contrib/wpa/src/ap/hostapd.h | 59 +- contrib/wpa/src/ap/hs20.c | 6 +- contrib/wpa/src/ap/hw_features.c | 373 +- contrib/wpa/src/ap/hw_features.h | 22 +- contrib/wpa/src/ap/ieee802_11.c | 2516 +++- contrib/wpa/src/ap/ieee802_11.h | 24 +- contrib/wpa/src/ap/ieee802_11_auth.c | 172 +- contrib/wpa/src/ap/ieee802_11_auth.h | 17 +- contrib/wpa/src/ap/ieee802_11_he.c | 189 +- contrib/wpa/src/ap/ieee802_11_ht.c | 30 +- contrib/wpa/src/ap/ieee802_11_shared.c | 189 +- contrib/wpa/src/ap/ieee802_11_vht.c | 176 +- contrib/wpa/src/ap/ieee802_1x.c | 482 +- contrib/wpa/src/ap/ieee802_1x.h | 7 +- contrib/wpa/src/ap/neighbor_db.c | 58 +- contrib/wpa/src/ap/neighbor_db.h | 1 + contrib/wpa/src/ap/pmksa_cache_auth.c | 6 + contrib/wpa/src/ap/preauth_auth.c | 2 +- contrib/wpa/src/ap/sta_info.c | 111 +- contrib/wpa/src/ap/sta_info.h | 54 +- contrib/wpa/src/ap/utils.c | 4 + contrib/wpa/src/ap/vlan_init.c | 5 +- contrib/wpa/src/ap/wmm.c | 14 +- contrib/wpa/src/ap/wnm_ap.c | 83 +- contrib/wpa/src/ap/wpa_auth.c | 1415 ++- contrib/wpa/src/ap/wpa_auth.h | 103 +- contrib/wpa/src/ap/wpa_auth_ft.c | 385 +- contrib/wpa/src/ap/wpa_auth_glue.c | 343 +- contrib/wpa/src/ap/wpa_auth_i.h | 71 +- contrib/wpa/src/ap/wpa_auth_ie.c | 444 +- contrib/wpa/src/ap/wpa_auth_ie.h | 35 - contrib/wpa/src/ap/wpa_auth_kay.c | 12 +- contrib/wpa/src/ap/wps_hostapd.c | 237 +- contrib/wpa/src/build.rules | 109 + contrib/wpa/src/common/Makefile | 16 + contrib/wpa/src/common/brcm_vendor.h | 156 + contrib/wpa/src/common/common_module_tests.c | 513 +- contrib/wpa/src/common/defs.h | 86 +- contrib/wpa/src/common/dhcp.h | 2 +- contrib/wpa/src/common/dpp.c | 11695 +++++------------- contrib/wpa/src/common/dpp.h | 248 +- contrib/wpa/src/common/dpp_auth.c | 1977 +++ contrib/wpa/src/common/dpp_backup.c | 1265 ++ contrib/wpa/src/common/dpp_crypto.c | 3329 +++++ contrib/wpa/src/common/dpp_i.h | 160 + contrib/wpa/src/common/dpp_pkex.c | 1324 ++ contrib/wpa/src/common/dpp_reconfig.c | 958 ++ contrib/wpa/src/common/dpp_tcp.c | 1824 +++ contrib/wpa/src/common/gas_server.c | 140 +- contrib/wpa/src/common/gas_server.h | 9 +- contrib/wpa/src/common/hw_features_common.c | 427 +- contrib/wpa/src/common/hw_features_common.h | 26 +- contrib/wpa/src/common/ieee802_11_common.c | 789 +- contrib/wpa/src/common/ieee802_11_common.h | 70 +- contrib/wpa/src/common/ieee802_11_defs.h | 249 +- contrib/wpa/src/common/linux_bridge.h | 39 + contrib/wpa/src/common/linux_vlan.h | 52 + contrib/wpa/src/common/ocv.c | 39 +- contrib/wpa/src/common/ocv.h | 13 +- contrib/wpa/src/common/privsep_commands.h | 1 + contrib/wpa/src/common/ptksa_cache.c | 321 + contrib/wpa/src/common/ptksa_cache.h | 79 + contrib/wpa/src/common/qca-vendor.h | 4187 ++++++- contrib/wpa/src/common/sae.c | 1387 ++- contrib/wpa/src/common/sae.h | 109 +- contrib/wpa/src/common/sae_pk.c | 884 ++ contrib/wpa/src/common/version.h | 2 +- contrib/wpa/src/common/wpa_common.c | 1240 +- contrib/wpa/src/common/wpa_common.h | 207 +- contrib/wpa/src/common/wpa_ctrl.c | 5 +- contrib/wpa/src/common/wpa_ctrl.h | 41 +- contrib/wpa/src/crypto/Makefile | 60 + contrib/wpa/src/crypto/crypto.h | 49 +- contrib/wpa/src/crypto/crypto_module_tests.c | 150 + contrib/wpa/src/crypto/crypto_openssl.c | 250 + contrib/wpa/src/crypto/crypto_wolfssl.c | 77 +- contrib/wpa/src/crypto/sha256.c | 6 +- contrib/wpa/src/crypto/sha384-tlsprf.c | 71 + contrib/wpa/src/crypto/sha384.c | 6 +- contrib/wpa/src/crypto/sha384.h | 3 + contrib/wpa/src/crypto/sha512.c | 6 +- contrib/wpa/src/crypto/tls.h | 14 + contrib/wpa/src/crypto/tls_openssl.c | 304 +- contrib/wpa/src/crypto/tls_wolfssl.c | 65 +- contrib/wpa/src/drivers/Makefile | 9 + contrib/wpa/src/drivers/android_drv.h | 56 + contrib/wpa/src/drivers/driver.h | 716 +- contrib/wpa/src/drivers/driver_atheros.c | 41 +- contrib/wpa/src/drivers/driver_bsd.c | 659 +- contrib/wpa/src/drivers/driver_common.c | 21 + contrib/wpa/src/drivers/driver_hostap.c | 24 +- contrib/wpa/src/drivers/driver_hostap.h | 210 + contrib/wpa/src/drivers/driver_macsec_linux.c | 87 +- contrib/wpa/src/drivers/driver_macsec_qca.c | 34 +- contrib/wpa/src/drivers/driver_ndis.c | 47 +- contrib/wpa/src/drivers/driver_nl80211.c | 12229 +++++++++++++++++++ contrib/wpa/src/drivers/driver_nl80211.h | 65 +- contrib/wpa/src/drivers/driver_nl80211_android.c | 4 +- contrib/wpa/src/drivers/driver_nl80211_capa.c | 579 +- contrib/wpa/src/drivers/driver_nl80211_event.c | 580 +- contrib/wpa/src/drivers/driver_nl80211_monitor.c | 3 + contrib/wpa/src/drivers/driver_nl80211_scan.c | 51 +- contrib/wpa/src/drivers/driver_none.c | 77 + contrib/wpa/src/drivers/driver_openbsd.c | 10 +- contrib/wpa/src/drivers/driver_privsep.c | 18 +- contrib/wpa/src/drivers/driver_roboswitch.c | 487 + contrib/wpa/src/drivers/driver_wext.c | 2499 ++++ contrib/wpa/src/drivers/driver_wext.h | 77 + contrib/wpa/src/drivers/drivers.mak | 220 + contrib/wpa/src/drivers/drivers.mk | 196 + contrib/wpa/src/drivers/linux_ioctl.c | 237 + contrib/wpa/src/drivers/linux_ioctl.h | 23 + contrib/wpa/src/drivers/linux_wext.h | 45 + contrib/wpa/src/drivers/netlink.c | 226 + contrib/wpa/src/drivers/netlink.h | 28 + contrib/wpa/src/drivers/nl80211_copy.h | 973 +- contrib/wpa/src/drivers/priv_netlink.h | 109 + contrib/wpa/src/drivers/rfkill.c | 224 + contrib/wpa/src/drivers/rfkill.h | 25 + contrib/wpa/src/eap_common/Makefile | 18 + contrib/wpa/src/eap_common/eap_common.c | 8 +- contrib/wpa/src/eap_common/eap_common.h | 8 +- contrib/wpa/src/eap_common/eap_defs.h | 4 +- contrib/wpa/src/eap_common/eap_sim_common.c | 28 + contrib/wpa/src/eap_common/eap_teap_common.c | 72 +- contrib/wpa/src/eap_common/eap_teap_common.h | 22 +- contrib/wpa/src/eap_peer/Makefile | 7 + contrib/wpa/src/eap_peer/eap.c | 220 +- contrib/wpa/src/eap_peer/eap.h | 13 +- contrib/wpa/src/eap_peer/eap_aka.c | 48 +- contrib/wpa/src/eap_peer/eap_config.h | 408 +- contrib/wpa/src/eap_peer/eap_eke.c | 16 +- contrib/wpa/src/eap_peer/eap_fast.c | 54 +- contrib/wpa/src/eap_peer/eap_gpsk.c | 14 +- contrib/wpa/src/eap_peer/eap_gtc.c | 8 +- contrib/wpa/src/eap_peer/eap_i.h | 42 +- contrib/wpa/src/eap_peer/eap_ikev2.c | 28 +- contrib/wpa/src/eap_peer/eap_leap.c | 44 +- contrib/wpa/src/eap_peer/eap_md5.c | 12 +- contrib/wpa/src/eap_peer/eap_methods.c | 12 +- contrib/wpa/src/eap_peer/eap_methods.h | 14 +- contrib/wpa/src/eap_peer/eap_mschapv2.c | 32 +- contrib/wpa/src/eap_peer/eap_otp.c | 8 +- contrib/wpa/src/eap_peer/eap_pax.c | 50 +- contrib/wpa/src/eap_peer/eap_peap.c | 71 +- contrib/wpa/src/eap_peer/eap_psk.c | 22 +- contrib/wpa/src/eap_peer/eap_pwd.c | 22 +- contrib/wpa/src/eap_peer/eap_sake.c | 26 +- contrib/wpa/src/eap_peer/eap_sim.c | 44 +- contrib/wpa/src/eap_peer/eap_teap.c | 201 +- contrib/wpa/src/eap_peer/eap_tls.c | 42 +- contrib/wpa/src/eap_peer/eap_tls_common.c | 103 +- contrib/wpa/src/eap_peer/eap_tls_common.h | 10 +- contrib/wpa/src/eap_peer/eap_tnc.c | 32 +- contrib/wpa/src/eap_peer/eap_ttls.c | 88 +- contrib/wpa/src/eap_peer/eap_vendor_test.c | 16 +- contrib/wpa/src/eap_peer/eap_wsc.c | 24 +- contrib/wpa/src/eap_peer/ikev2.c | 10 +- contrib/wpa/src/eap_peer/tncc.c | 5 +- contrib/wpa/src/eap_server/Makefile | 8 + contrib/wpa/src/eap_server/eap.h | 172 +- contrib/wpa/src/eap_server/eap_i.h | 67 +- contrib/wpa/src/eap_server/eap_methods.h | 9 +- contrib/wpa/src/eap_server/eap_server.c | 291 +- contrib/wpa/src/eap_server/eap_server_aka.c | 74 +- contrib/wpa/src/eap_server/eap_server_eke.c | 39 +- contrib/wpa/src/eap_server/eap_server_fast.c | 106 +- contrib/wpa/src/eap_server/eap_server_gpsk.c | 37 +- contrib/wpa/src/eap_server/eap_server_gtc.c | 12 +- contrib/wpa/src/eap_server/eap_server_identity.c | 14 +- contrib/wpa/src/eap_server/eap_server_ikev2.c | 22 +- contrib/wpa/src/eap_server/eap_server_md5.c | 14 +- contrib/wpa/src/eap_server/eap_server_methods.c | 10 +- contrib/wpa/src/eap_server/eap_server_mschapv2.c | 22 +- contrib/wpa/src/eap_server/eap_server_pax.c | 32 +- contrib/wpa/src/eap_server/eap_server_peap.c | 103 +- contrib/wpa/src/eap_server/eap_server_psk.c | 34 +- contrib/wpa/src/eap_server/eap_server_pwd.c | 22 +- contrib/wpa/src/eap_server/eap_server_sake.c | 38 +- contrib/wpa/src/eap_server/eap_server_sim.c | 66 +- contrib/wpa/src/eap_server/eap_server_teap.c | 309 +- contrib/wpa/src/eap_server/eap_server_tls.c | 54 +- contrib/wpa/src/eap_server/eap_server_tls_common.c | 93 +- contrib/wpa/src/eap_server/eap_server_tnc.c | 26 +- contrib/wpa/src/eap_server/eap_server_ttls.c | 96 +- .../wpa/src/eap_server/eap_server_vendor_test.c | 12 +- contrib/wpa/src/eap_server/eap_server_wsc.c | 32 +- contrib/wpa/src/eap_server/eap_tls_common.h | 2 +- contrib/wpa/src/eap_server/tncs.c | 5 +- contrib/wpa/src/eapol_auth/Makefile | 2 + contrib/wpa/src/eapol_auth/eapol_auth_sm.c | 206 +- contrib/wpa/src/eapol_auth/eapol_auth_sm.h | 26 +- contrib/wpa/src/eapol_auth/eapol_auth_sm_i.h | 40 +- contrib/wpa/src/eapol_supp/Makefile | 5 + contrib/wpa/src/eapol_supp/eapol_supp_sm.c | 218 +- contrib/wpa/src/eapol_supp/eapol_supp_sm.h | 29 +- contrib/wpa/src/fst/fst.c | 25 +- contrib/wpa/src/fst/fst.h | 23 +- contrib/wpa/src/fst/fst_ctrl_aux.h | 4 +- contrib/wpa/src/fst/fst_ctrl_iface.c | 48 +- contrib/wpa/src/fst/fst_ctrl_iface.h | 2 +- contrib/wpa/src/fst/fst_group.c | 10 +- contrib/wpa/src/fst/fst_group.h | 4 +- contrib/wpa/src/fst/fst_iface.c | 8 +- contrib/wpa/src/fst/fst_iface.h | 8 +- contrib/wpa/src/fst/fst_session.c | 96 +- contrib/wpa/src/fst/fst_session.h | 12 +- contrib/wpa/src/l2_packet/Makefile | 3 + contrib/wpa/src/l2_packet/l2_packet.h | 4 + contrib/wpa/src/l2_packet/l2_packet_freebsd.c | 5 +- contrib/wpa/src/l2_packet/l2_packet_linux.c | 515 + contrib/wpa/src/l2_packet/l2_packet_ndis.c | 3 +- contrib/wpa/src/l2_packet/l2_packet_none.c | 4 +- contrib/wpa/src/l2_packet/l2_packet_pcap.c | 400 + contrib/wpa/src/l2_packet/l2_packet_privsep.c | 3 +- contrib/wpa/src/l2_packet/l2_packet_winpcap.c | 350 + contrib/wpa/src/lib.rules | 29 + contrib/wpa/src/objs.mk | 3 + contrib/wpa/src/p2p/Makefile | 16 + contrib/wpa/src/p2p/p2p.c | 147 +- contrib/wpa/src/p2p/p2p.h | 31 +- contrib/wpa/src/p2p/p2p_go_neg.c | 9 + contrib/wpa/src/p2p/p2p_i.h | 5 + contrib/wpa/src/p2p/p2p_invitation.c | 5 +- contrib/wpa/src/p2p/p2p_utils.c | 39 + contrib/wpa/src/pae/ieee802_1x_cp.c | 177 +- contrib/wpa/src/pae/ieee802_1x_cp.h | 10 +- contrib/wpa/src/pae/ieee802_1x_kay.c | 608 +- contrib/wpa/src/pae/ieee802_1x_kay.h | 68 +- contrib/wpa/src/pae/ieee802_1x_kay_i.h | 40 +- contrib/wpa/src/pae/ieee802_1x_secy_ops.c | 22 +- contrib/wpa/src/pae/ieee802_1x_secy_ops.h | 8 +- contrib/wpa/src/radius/Makefile | 9 + contrib/wpa/src/radius/radius.c | 2 +- contrib/wpa/src/radius/radius.h | 3 + contrib/wpa/src/radius/radius_client.c | 55 +- contrib/wpa/src/radius/radius_client.h | 5 + contrib/wpa/src/radius/radius_server.c | 283 +- contrib/wpa/src/radius/radius_server.h | 142 +- contrib/wpa/src/rsn_supp/Makefile | 14 + contrib/wpa/src/rsn_supp/pmksa_cache.c | 54 +- contrib/wpa/src/rsn_supp/pmksa_cache.h | 7 +- contrib/wpa/src/rsn_supp/preauth.c | 24 +- contrib/wpa/src/rsn_supp/tdls.c | 71 +- contrib/wpa/src/rsn_supp/wpa.c | 759 +- contrib/wpa/src/rsn_supp/wpa.h | 93 +- contrib/wpa/src/rsn_supp/wpa_ft.c | 399 +- contrib/wpa/src/rsn_supp/wpa_i.h | 88 +- contrib/wpa/src/rsn_supp/wpa_ie.c | 317 +- contrib/wpa/src/rsn_supp/wpa_ie.h | 52 +- contrib/wpa/src/tls/Makefile | 25 + contrib/wpa/src/tls/asn1.c | 396 +- contrib/wpa/src/tls/asn1.h | 146 +- contrib/wpa/src/tls/pkcs1.c | 55 +- contrib/wpa/src/tls/pkcs5.c | 78 +- contrib/wpa/src/tls/pkcs8.c | 59 +- contrib/wpa/src/tls/rsa.c | 23 +- contrib/wpa/src/tls/tlsv1_client.c | 29 +- contrib/wpa/src/tls/tlsv1_client_i.h | 4 +- contrib/wpa/src/tls/tlsv1_client_ocsp.c | 180 +- contrib/wpa/src/tls/tlsv1_client_read.c | 10 +- contrib/wpa/src/tls/tlsv1_client_write.c | 18 +- contrib/wpa/src/tls/tlsv1_cred.c | 247 +- contrib/wpa/src/tls/x509v3.c | 419 +- contrib/wpa/src/tls/x509v3.h | 7 + contrib/wpa/src/utils/Makefile | 30 + contrib/wpa/src/utils/base64.c | 59 +- contrib/wpa/src/utils/base64.h | 13 +- contrib/wpa/src/utils/browser-android.c | 2 +- contrib/wpa/src/utils/browser-system.c | 2 +- contrib/wpa/src/utils/browser-wpadebug.c | 2 +- contrib/wpa/src/utils/browser.c | 210 +- contrib/wpa/src/utils/browser.h | 4 +- contrib/wpa/src/utils/common.c | 38 +- contrib/wpa/src/utils/common.h | 8 +- contrib/wpa/src/utils/config.c | 97 + contrib/wpa/src/utils/config.h | 29 + contrib/wpa/src/utils/eloop.c | 47 +- contrib/wpa/src/utils/eloop_win.c | 8 +- contrib/wpa/src/utils/ext_password.c | 3 + contrib/wpa/src/utils/ext_password_file.c | 136 + contrib/wpa/src/utils/ext_password_i.h | 4 + contrib/wpa/src/utils/http-utils.h | 6 +- contrib/wpa/src/utils/includes.h | 1 + contrib/wpa/src/utils/json.c | 122 +- contrib/wpa/src/utils/json.h | 15 + contrib/wpa/src/utils/list.h | 8 +- contrib/wpa/src/utils/os_internal.c | 6 + contrib/wpa/src/utils/os_unix.c | 46 +- contrib/wpa/src/utils/platform.h | 23 +- contrib/wpa/src/utils/radiotap.c | 12 +- contrib/wpa/src/utils/radiotap.h | 407 +- contrib/wpa/src/utils/state_machine.h | 8 +- contrib/wpa/src/utils/trace.c | 11 + contrib/wpa/src/utils/utils_module_tests.c | 39 +- contrib/wpa/src/utils/wpa_debug.c | 147 +- contrib/wpa/src/utils/wpa_debug.h | 3 - contrib/wpa/src/utils/wpabuf.h | 27 + contrib/wpa/src/utils/xml_libxml2.c | 2 +- contrib/wpa/src/wps/Makefile | 28 + contrib/wpa/src/wps/upnp_xml.c | 2 +- contrib/wpa/src/wps/wps.h | 23 +- contrib/wpa/src/wps/wps_attr_build.c | 15 +- contrib/wpa/src/wps/wps_attr_process.c | 9 +- contrib/wpa/src/wps/wps_dev_attr.c | 17 + contrib/wpa/src/wps/wps_dev_attr.h | 1 + contrib/wpa/src/wps/wps_enrollee.c | 11 + contrib/wpa/src/wps/wps_er.c | 4 +- contrib/wpa/src/wps/wps_registrar.c | 139 +- contrib/wpa/src/wps/wps_upnp.c | 28 +- contrib/wpa/src/wps/wps_upnp_ap.c | 4 +- contrib/wpa/src/wps/wps_upnp_event.c | 27 +- contrib/wpa/src/wps/wps_upnp_i.h | 9 +- contrib/wpa/src/wps/wps_upnp_web.c | 4 +- contrib/wpa/wpa_supplicant/Android.mk | 114 +- contrib/wpa/wpa_supplicant/ChangeLog | 10 +- contrib/wpa/wpa_supplicant/Makefile | 2073 ++++ contrib/wpa/wpa_supplicant/README | 4 +- contrib/wpa/wpa_supplicant/README-DPP | 71 +- contrib/wpa/wpa_supplicant/README-HS20 | 2 +- contrib/wpa/wpa_supplicant/android.config | 16 +- contrib/wpa/wpa_supplicant/ap.c | 257 +- contrib/wpa/wpa_supplicant/binder/binder.h | 2 +- contrib/wpa/wpa_supplicant/bss.c | 145 +- contrib/wpa/wpa_supplicant/bss.h | 25 +- contrib/wpa/wpa_supplicant/bssid_ignore.c | 221 + contrib/wpa/wpa_supplicant/bssid_ignore.h | 33 + contrib/wpa/wpa_supplicant/config.c | 644 +- contrib/wpa/wpa_supplicant/config.h | 129 +- contrib/wpa/wpa_supplicant/config_file.c | 243 +- contrib/wpa/wpa_supplicant/config_ssid.h | 155 +- contrib/wpa/wpa_supplicant/config_winreg.c | 1061 ++ contrib/wpa/wpa_supplicant/ctrl_iface.c | 1375 ++- contrib/wpa/wpa_supplicant/ctrl_iface.h | 16 +- contrib/wpa/wpa_supplicant/ctrl_iface_named_pipe.c | 7 +- contrib/wpa/wpa_supplicant/ctrl_iface_udp.c | 63 +- contrib/wpa/wpa_supplicant/ctrl_iface_unix.c | 73 +- contrib/wpa/wpa_supplicant/dbus/dbus_common.c | 23 +- contrib/wpa/wpa_supplicant/dbus/dbus_new.c | 76 +- .../wpa/wpa_supplicant/dbus/dbus_new_handlers.c | 424 +- .../wpa/wpa_supplicant/dbus/dbus_new_handlers.h | 6 + .../wpa_supplicant/dbus/dbus_new_handlers_p2p.c | 84 +- .../wpa/wpa_supplicant/dbus/dbus_new_introspect.c | 2 +- contrib/wpa/wpa_supplicant/defconfig | 45 +- contrib/wpa/wpa_supplicant/doc/docbook/Makefile | 28 + .../wpa/wpa_supplicant/doc/docbook/eapol_test.sgml | 209 + .../wpa_supplicant/doc/docbook/wpa_background.sgml | 105 + .../wpa/wpa_supplicant/doc/docbook/wpa_cli.sgml | 360 + .../wpa/wpa_supplicant/doc/docbook/wpa_gui.sgml | 106 + .../wpa_supplicant/doc/docbook/wpa_passphrase.sgml | 77 + .../wpa/wpa_supplicant/doc/docbook/wpa_priv.sgml | 152 + .../doc/docbook/wpa_supplicant.conf.sgml | 243 + .../wpa_supplicant/doc/docbook/wpa_supplicant.sgml | 764 ++ contrib/wpa/wpa_supplicant/dpp_supplicant.c | 1808 ++- contrib/wpa/wpa_supplicant/dpp_supplicant.h | 15 + contrib/wpa/wpa_supplicant/driver_i.h | 109 +- contrib/wpa/wpa_supplicant/eapol_test.c | 15 +- contrib/wpa/wpa_supplicant/events.c | 1537 ++- contrib/wpa/wpa_supplicant/examples/dpp-nfc.py | 1186 ++ .../wpa_supplicant/examples/p2p-action-udhcp.sh | 4 +- contrib/wpa/wpa_supplicant/examples/p2p-action.sh | 4 +- .../wpa/wpa_supplicant/examples/p2p/p2p_connect.py | 18 +- .../wpa_supplicant/examples/p2p/p2p_disconnect.py | 2 +- .../wpa/wpa_supplicant/examples/p2p/p2p_find.py | 2 +- .../wpa/wpa_supplicant/examples/p2p/p2p_flush.py | 2 +- .../wpa_supplicant/examples/p2p/p2p_group_add.py | 14 +- .../wpa/wpa_supplicant/examples/p2p/p2p_invite.py | 10 +- .../wpa/wpa_supplicant/examples/p2p/p2p_listen.py | 2 +- .../wpa_supplicant/examples/p2p/p2p_stop_find.py | 2 +- .../wpa/wpa_supplicant/examples/udhcpd-p2p.conf | 12 +- contrib/wpa/wpa_supplicant/gas_query.c | 62 +- contrib/wpa/wpa_supplicant/gas_query.h | 2 +- contrib/wpa/wpa_supplicant/hs20_supplicant.c | 30 +- contrib/wpa/wpa_supplicant/ibss_rsn.c | 45 +- contrib/wpa/wpa_supplicant/interworking.c | 66 +- contrib/wpa/wpa_supplicant/interworking.h | 2 +- contrib/wpa/wpa_supplicant/main.c | 10 +- contrib/wpa/wpa_supplicant/main_winmain.c | 78 + contrib/wpa/wpa_supplicant/main_winsvc.c | 458 + contrib/wpa/wpa_supplicant/mbo.c | 30 + contrib/wpa/wpa_supplicant/mesh.c | 243 +- contrib/wpa/wpa_supplicant/mesh.h | 6 +- contrib/wpa/wpa_supplicant/mesh_mpm.c | 49 +- contrib/wpa/wpa_supplicant/mesh_rsn.c | 27 +- contrib/wpa/wpa_supplicant/nmake.mak | 2 +- contrib/wpa/wpa_supplicant/notify.c | 10 +- contrib/wpa/wpa_supplicant/offchannel.c | 6 +- contrib/wpa/wpa_supplicant/op_classes.c | 239 +- contrib/wpa/wpa_supplicant/p2p_supplicant.c | 667 +- contrib/wpa/wpa_supplicant/p2p_supplicant.h | 32 +- contrib/wpa/wpa_supplicant/pasn_supplicant.c | 1714 +++ contrib/wpa/wpa_supplicant/preauth_test.c | 20 +- contrib/wpa/wpa_supplicant/robust_av.c | 155 + contrib/wpa/wpa_supplicant/rrm.c | 91 +- contrib/wpa/wpa_supplicant/scan.c | 703 +- contrib/wpa/wpa_supplicant/scan.h | 33 + contrib/wpa/wpa_supplicant/sme.c | 531 +- contrib/wpa/wpa_supplicant/sme.h | 8 +- .../systemd/wpa_supplicant-nl80211.service.arg.in | 2 +- .../systemd/wpa_supplicant-wired.service.arg.in | 2 +- .../systemd/wpa_supplicant.service.arg.in | 2 +- contrib/wpa/wpa_supplicant/twt.c | 142 + .../vs2005/eapol_test/eapol_test.vcproj | 6 +- .../vs2005/wpa_supplicant/wpa_supplicant.vcproj | 6 +- .../wpa/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj | 6 +- contrib/wpa/wpa_supplicant/wmm_ac.c | 2 +- contrib/wpa/wpa_supplicant/wnm_sta.c | 33 +- contrib/wpa/wpa_supplicant/wpa_cli.c | 339 +- contrib/wpa/wpa_supplicant/wpa_passphrase.c | 8 +- contrib/wpa/wpa_supplicant/wpa_priv.c | 32 +- contrib/wpa/wpa_supplicant/wpa_supplicant.c | 1283 +- contrib/wpa/wpa_supplicant/wpa_supplicant.conf | 196 +- contrib/wpa/wpa_supplicant/wpa_supplicant_i.h | 249 +- contrib/wpa/wpa_supplicant/wpas_glue.c | 222 +- contrib/wpa/wpa_supplicant/wpas_glue.h | 2 + contrib/wpa/wpa_supplicant/wpas_kay.c | 12 +- contrib/wpa/wpa_supplicant/wpas_module_tests.c | 85 +- contrib/wpa/wpa_supplicant/wps_supplicant.c | 85 +- contrib/wpa/wpa_supplicant/wps_supplicant.h | 5 + usr.sbin/wpa/src/common/Makefile | 2 + usr.sbin/wpa/src/crypto/Makefile | 5 +- usr.sbin/wpa/src/utils/Makefile | 2 + usr.sbin/wpa/wpa_supplicant/Makefile | 7 +- 498 files changed, 92625 insertions(+), 20522 deletions(-) diff --git a/contrib/wpa/CONTRIBUTIONS b/contrib/wpa/CONTRIBUTIONS index c81ad640995a..1b4caf7ac811 100644 --- a/contrib/wpa/CONTRIBUTIONS +++ b/contrib/wpa/CONTRIBUTIONS @@ -56,6 +56,9 @@ In general, the best way of generating a suitable formatted patch file is by committing the changes to a cloned git repository and using git format-patch. The patch can then be sent, e.g., with git send-email. +A list of pending patches waiting for review is available in +Patchwork: https://patchwork.ozlabs.org/project/hostap/list/ + History of license and contributions terms ------------------------------------------ @@ -140,7 +143,7 @@ The license terms used for hostap.git files Modified BSD license (no advertisement clause): -Copyright (c) 2002-2019, Jouni Malinen and contributors +Copyright (c) 2002-2021, Jouni Malinen and contributors All Rights Reserved. Redistribution and use in source and binary forms, with or without diff --git a/contrib/wpa/hostapd/Android.mk b/contrib/wpa/hostapd/Android.mk new file mode 100644 index 000000000000..dd8aa2450d7e --- /dev/null +++ b/contrib/wpa/hostapd/Android.mk @@ -0,0 +1,1152 @@ +# Copyright (C) 2008 The Android Open Source Project +# +# This software may be distributed under the terms of the BSD license. +# See README for more details. +# + +LOCAL_PATH := $(call my-dir) + +WPA_BUILD_HOSTAPD := false +ifneq ($(BOARD_HOSTAPD_DRIVER),) + WPA_BUILD_HOSTAPD := true + CONFIG_DRIVER_$(BOARD_HOSTAPD_DRIVER) := y +endif + +ifeq ($(WPA_BUILD_HOSTAPD),true) + +include $(LOCAL_PATH)/android.config + +# To ignore possible wrong network configurations +L_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS + +L_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\" + +# Set Android log name +L_CFLAGS += -DANDROID_LOG_NAME=\"hostapd\" + +# Disable unused parameter warnings +L_CFLAGS += -Wno-unused-parameter + +# Set Android extended P2P functionality +L_CFLAGS += -DANDROID_P2P + +ifeq ($(BOARD_HOSTAPD_PRIVATE_LIB),) +L_CFLAGS += -DANDROID_LIB_STUB +endif + +ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB_EVENT),) +L_CFLAGS += -DANDROID_LIB_EVENT +endif + +# Use Android specific directory for control interface sockets +L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\" +L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/system/hostapd\" + +# Use Android specific directory for hostapd_cli command completion history +L_CFLAGS += -DCONFIG_HOSTAPD_CLI_HISTORY_DIR=\"/data/misc/wifi\" + +# To force sizeof(enum) = 4 +ifeq ($(TARGET_ARCH),arm) +L_CFLAGS += -mabi=aapcs-linux +endif + +INCLUDES = $(LOCAL_PATH) +INCLUDES += $(LOCAL_PATH)/src +INCLUDES += $(LOCAL_PATH)/src/utils +INCLUDES += system/security/keystore/include +ifdef CONFIG_DRIVER_NL80211 +ifneq ($(wildcard external/libnl),) +INCLUDES += external/libnl/include +else +INCLUDES += external/libnl-headers +endif +endif + + +ifndef CONFIG_OS +ifdef CONFIG_NATIVE_WINDOWS +CONFIG_OS=win32 +else +CONFIG_OS=unix +endif +endif + +ifeq ($(CONFIG_OS), internal) +L_CFLAGS += -DOS_NO_C_LIB_DEFINES +endif + +ifdef CONFIG_NATIVE_WINDOWS +L_CFLAGS += -DCONFIG_NATIVE_WINDOWS +LIBS += -lws2_32 +endif + +OBJS = main.c +OBJS += config_file.c + +OBJS += src/ap/hostapd.c +OBJS += src/ap/wpa_auth_glue.c +OBJS += src/ap/drv_callbacks.c +OBJS += src/ap/ap_drv_ops.c +OBJS += src/ap/utils.c +OBJS += src/ap/authsrv.c +OBJS += src/ap/ieee802_1x.c +OBJS += src/ap/ap_config.c +OBJS += src/ap/eap_user_db.c +OBJS += src/ap/ieee802_11_auth.c +OBJS += src/ap/sta_info.c +OBJS += src/ap/wpa_auth.c +OBJS += src/ap/tkip_countermeasures.c +OBJS += src/ap/ap_mlme.c +OBJS += src/ap/wpa_auth_ie.c +OBJS += src/ap/preauth_auth.c +OBJS += src/ap/pmksa_cache_auth.c +OBJS += src/ap/ieee802_11_shared.c +OBJS += src/ap/beacon.c +OBJS += src/ap/bss_load.c +OBJS += src/ap/neighbor_db.c +OBJS += src/ap/rrm.c +OBJS_d = +OBJS_p = +LIBS = +LIBS_c = +HOBJS = +LIBS_h = + +NEED_RC4=y +NEED_AES=y +NEED_MD5=y +NEED_SHA1=y + +OBJS += src/drivers/drivers.c +L_CFLAGS += -DHOSTAPD + +ifdef CONFIG_WPA_TRACE +L_CFLAGS += -DWPA_TRACE +OBJS += src/utils/trace.c +HOBJS += src/utils/trace.c +LDFLAGS += -rdynamic +L_CFLAGS += -funwind-tables +ifdef CONFIG_WPA_TRACE_BFD +L_CFLAGS += -DWPA_TRACE_BFD +LIBS += -lbfd +LIBS_c += -lbfd +LIBS_h += -lbfd +endif +endif + +OBJS += src/utils/eloop.c + +ifdef CONFIG_ELOOP_POLL +L_CFLAGS += -DCONFIG_ELOOP_POLL +endif + +ifdef CONFIG_ELOOP_EPOLL +L_CFLAGS += -DCONFIG_ELOOP_EPOLL +endif + +OBJS += src/utils/common.c +OBJS += src/utils/wpa_debug.c +OBJS += src/utils/wpabuf.c +OBJS += src/utils/os_$(CONFIG_OS).c +OBJS += src/utils/ip_addr.c +OBJS += src/utils/crc32.c + +OBJS += src/common/ieee802_11_common.c +OBJS += src/common/wpa_common.c +OBJS += src/common/hw_features_common.c + +OBJS += src/eapol_auth/eapol_auth_sm.c + + +ifndef CONFIG_NO_DUMP_STATE +# define HOSTAPD_DUMP_STATE to include support for dumping internal state +# through control interface commands (undefine it, if you want to save in +# binary size) +L_CFLAGS += -DHOSTAPD_DUMP_STATE +OBJS += src/eapol_auth/eapol_auth_dump.c +endif + +ifdef CONFIG_NO_RADIUS +L_CFLAGS += -DCONFIG_NO_RADIUS +CONFIG_NO_ACCOUNTING=y +else +OBJS += src/radius/radius.c +OBJS += src/radius/radius_client.c +OBJS += src/radius/radius_das.c +endif + +ifdef CONFIG_NO_ACCOUNTING +L_CFLAGS += -DCONFIG_NO_ACCOUNTING +else +OBJS += src/ap/accounting.c +endif + +ifdef CONFIG_NO_VLAN +L_CFLAGS += -DCONFIG_NO_VLAN +else +OBJS += src/ap/vlan_init.c +OBJS += src/ap/vlan_ifconfig.c +OBJS += src/ap/vlan.c +ifdef CONFIG_FULL_DYNAMIC_VLAN +# Define CONFIG_FULL_DYNAMIC_VLAN to have hostapd manipulate bridges +# and VLAN interfaces for the VLAN feature. +L_CFLAGS += -DCONFIG_FULL_DYNAMIC_VLAN +OBJS += src/ap/vlan_full.c +ifdef CONFIG_VLAN_NETLINK +OBJS += src/ap/vlan_util.c +else +OBJS += src/ap/vlan_ioctl.c +endif +endif +endif + +ifdef CONFIG_NO_CTRL_IFACE +L_CFLAGS += -DCONFIG_NO_CTRL_IFACE +else +OBJS += src/common/ctrl_iface_common.c +OBJS += ctrl_iface.c +OBJS += src/ap/ctrl_iface_ap.c +endif + +L_CFLAGS += -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX + +ifdef CONFIG_RSN_PREAUTH +L_CFLAGS += -DCONFIG_RSN_PREAUTH +CONFIG_L2_PACKET=y +endif + +ifdef CONFIG_HS20 +CONFIG_PROXYARP=y +endif + +ifdef CONFIG_PROXYARP +CONFIG_L2_PACKET=y +endif + +ifdef CONFIG_SUITEB +L_CFLAGS += -DCONFIG_SUITEB +endif + +ifdef CONFIG_SUITEB192 +L_CFLAGS += -DCONFIG_SUITEB192 +NEED_SHA384=y +endif + +ifdef CONFIG_OCV +L_CFLAGS += -DCONFIG_OCV +OBJS += src/common/ocv.c +endif + +ifdef CONFIG_IEEE80211R +L_CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP +OBJS += src/ap/wpa_auth_ft.c +NEED_AES_UNWRAP=y +NEED_AES_SIV=y +NEED_ETH_P_OUI=y +NEED_HMAC_SHA256_KDF=y +endif + +ifdef NEED_ETH_P_OUI +L_CFLAGS += -DCONFIG_ETH_P_OUI +OBJS += src/ap/eth_p_oui.c +endif + +ifdef CONFIG_SAE +L_CFLAGS += -DCONFIG_SAE +OBJS += src/common/sae.c +ifdef CONFIG_SAE_PK +L_CFLAGS += -DCONFIG_SAE_PK +OBJS += src/common/sae_pk.c +endif +NEED_ECC=y +NEED_DH_GROUPS=y +NEED_HMAC_SHA256_KDF=y +NEED_DRAGONFLY=y +endif + +ifdef CONFIG_OWE +L_CFLAGS += -DCONFIG_OWE +NEED_ECC=y +NEED_HMAC_SHA256_KDF=y +NEED_HMAC_SHA384_KDF=y +NEED_HMAC_SHA512_KDF=y +NEED_SHA384=y +NEED_SHA512=y +endif + +ifdef CONFIG_FILS +L_CFLAGS += -DCONFIG_FILS +OBJS += src/ap/fils_hlp.c +NEED_SHA384=y +NEED_AES_SIV=y +ifdef CONFIG_FILS_SK_PFS +L_CFLAGS += -DCONFIG_FILS_SK_PFS +NEED_ECC=y +endif +endif + +ifdef CONFIG_WNM +L_CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP +OBJS += src/ap/wnm_ap.c +endif + +ifdef CONFIG_IEEE80211AC +L_CFLAGS += -DCONFIG_IEEE80211AC +endif + +ifdef CONFIG_IEEE80211AX +L_CFLAGS += -DCONFIG_IEEE80211AX +endif + +ifdef CONFIG_MBO +L_CFLAGS += -DCONFIG_MBO +OBJS += src/ap/mbo_ap.c +endif + +ifdef CONFIG_FST +L_CFLAGS += -DCONFIG_FST +OBJS += src/fst/fst.c +OBJS += src/fst/fst_group.c +OBJS += src/fst/fst_iface.c +OBJS += src/fst/fst_session.c +OBJS += src/fst/fst_ctrl_aux.c +ifdef CONFIG_FST_TEST +L_CFLAGS += -DCONFIG_FST_TEST +endif +ifndef CONFIG_NO_CTRL_IFACE +OBJS += src/fst/fst_ctrl_iface.c +endif +endif + +ifdef CONFIG_WEP +L_CFLAGS += -DCONFIG_WEP +endif + +ifdef CONFIG_NO_TKIP +L_CFLAGS += -DCONFIG_NO_TKIP +endif + + +include $(LOCAL_PATH)/src/drivers/drivers.mk + +OBJS += $(DRV_AP_OBJS) +L_CFLAGS += $(DRV_AP_CFLAGS) +LDFLAGS += $(DRV_AP_LDFLAGS) +LIBS += $(DRV_AP_LIBS) + +ifdef CONFIG_L2_PACKET +ifdef CONFIG_DNET_PCAP +ifdef CONFIG_L2_FREEBSD +LIBS += -lpcap +OBJS += src/l2_packet/l2_packet_freebsd.c +else +LIBS += -ldnet -lpcap +OBJS += src/l2_packet/l2_packet_pcap.c +endif +else +OBJS += src/l2_packet/l2_packet_linux.c +endif +else +OBJS += src/l2_packet/l2_packet_none.c +endif + + +ifdef CONFIG_EAP_MD5 +L_CFLAGS += -DEAP_SERVER_MD5 +OBJS += src/eap_server/eap_server_md5.c +CHAP=y +endif + +ifdef CONFIG_EAP_TLS +L_CFLAGS += -DEAP_SERVER_TLS +OBJS += src/eap_server/eap_server_tls.c +TLS_FUNCS=y +endif + +ifdef CONFIG_EAP_UNAUTH_TLS +L_CFLAGS += -DEAP_SERVER_UNAUTH_TLS +ifndef CONFIG_EAP_TLS +OBJS += src/eap_server/eap_server_tls.c +TLS_FUNCS=y +endif +endif + +ifdef CONFIG_EAP_PEAP +L_CFLAGS += -DEAP_SERVER_PEAP +OBJS += src/eap_server/eap_server_peap.c +OBJS += src/eap_common/eap_peap_common.c +TLS_FUNCS=y +CONFIG_EAP_MSCHAPV2=y +endif + +ifdef CONFIG_EAP_TTLS +L_CFLAGS += -DEAP_SERVER_TTLS +OBJS += src/eap_server/eap_server_ttls.c +TLS_FUNCS=y +CHAP=y +endif + +ifdef CONFIG_EAP_MSCHAPV2 +L_CFLAGS += -DEAP_SERVER_MSCHAPV2 +OBJS += src/eap_server/eap_server_mschapv2.c +MS_FUNCS=y +endif + +ifdef CONFIG_EAP_GTC +L_CFLAGS += -DEAP_SERVER_GTC +OBJS += src/eap_server/eap_server_gtc.c +endif + +ifdef CONFIG_EAP_SIM +L_CFLAGS += -DEAP_SERVER_SIM +OBJS += src/eap_server/eap_server_sim.c +CONFIG_EAP_SIM_COMMON=y +NEED_AES_CBC=y +endif + +ifdef CONFIG_EAP_AKA +L_CFLAGS += -DEAP_SERVER_AKA +OBJS += src/eap_server/eap_server_aka.c +CONFIG_EAP_SIM_COMMON=y +NEED_AES_CBC=y +endif + +ifdef CONFIG_EAP_AKA_PRIME +L_CFLAGS += -DEAP_SERVER_AKA_PRIME +endif + +ifdef CONFIG_EAP_SIM_COMMON +OBJS += src/eap_common/eap_sim_common.c +# Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be +# replaced with another file implementing the interface specified in +# eap_sim_db.h. +OBJS += src/eap_server/eap_sim_db.c +NEED_FIPS186_2_PRF=y +endif + +ifdef CONFIG_EAP_PAX +L_CFLAGS += -DEAP_SERVER_PAX +OBJS += src/eap_server/eap_server_pax.c src/eap_common/eap_pax_common.c +endif + +ifdef CONFIG_EAP_PSK +L_CFLAGS += -DEAP_SERVER_PSK +OBJS += src/eap_server/eap_server_psk.c src/eap_common/eap_psk_common.c +NEED_AES_ENCBLOCK=y +NEED_AES_EAX=y +endif + *** 156373 LINES SKIPPED *** From nobody Mon Nov 22 18:20:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0DA31189FCEC; Mon, 22 Nov 2021 18:20: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 4HybCj6hN0z3HXd; Mon, 22 Nov 2021 18:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C39F12772B; Mon, 22 Nov 2021 18:20: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 1AMIK1J5000620; Mon, 22 Nov 2021 18:20:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIK1W6000618; Mon, 22 Nov 2021 18:20:01 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:20:01 GMT Message-Id: <202111221820.1AMIK1W6000618@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: 4f5592a6f45b - stable/12 - wpa: Enable MBO List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4f5592a6f45b6274d7fcde25ba3eb90172ba6db2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=4f5592a6f45b6274d7fcde25ba3eb90172ba6db2 commit 4f5592a6f45b6274d7fcde25ba3eb90172ba6db2 Author: Cy Schubert AuthorDate: 2021-09-03 13:14:01 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:19:31 +0000 wpa: Enable MBO Enable WiFi 6 MBO (Multi Band Operation). MBO is a prereq to 802.11ax. MBO allows the efficient use of multiple frequency bands (channels). To facilitate MBO, WNM (Wireless Network Monitoring) is a prerequisite. It is required to build. Tested by: philip (cherry picked from commit 3968b47cd974e503df303265f3be9ba5865499ab) --- usr.sbin/wpa/Makefile.inc | 3 +++ usr.sbin/wpa/src/ap/Makefile | 2 ++ usr.sbin/wpa/wpa_supplicant/Makefile | 2 ++ 3 files changed, 7 insertions(+) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index a6d54812f5f9..16b2e94959f3 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -66,6 +66,9 @@ CFLAGS+=-DEAP_SERVER_TLS CFLAGS+=-DEAP_SERVER_TTLS CFLAGS+=-DEAP_SERVER_WSC CFLAGS+=-DEAP_TLS_FUNCS +CFLAGS+=-DCONFIG_WNM +CFLAGS+=-DCONFIG_WNM_AP +CFLAGS+=-DCONFIG_MBO .if ${MK_WPA_SUPPLICANT_EAPOL} != "no" CFLAGS+=-DCONFIG_HS20 \ diff --git a/usr.sbin/wpa/src/ap/Makefile b/usr.sbin/wpa/src/ap/Makefile index b6d53b0d5dbb..162b8b5444aa 100644 --- a/usr.sbin/wpa/src/ap/Makefile +++ b/usr.sbin/wpa/src/ap/Makefile @@ -28,6 +28,7 @@ SRCS= accounting.c \ ieee802_11_shared.c \ ieee802_11_vht.c \ ieee802_1x.c \ + mbo_ap.c \ neighbor_db.c \ pmksa_cache_auth.c \ preauth_auth.c \ @@ -39,6 +40,7 @@ SRCS= accounting.c \ vlan_ifconfig.c \ vlan_init.c \ wmm.c \ + wnm_ap.c \ wpa_auth.c \ wpa_auth_glue.c \ wpa_auth_ie.c \ diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index edebe05b4515..e71b491ebe8b 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -22,6 +22,7 @@ SRCS= bss.c \ events.c \ gas_query.c \ main.c \ + mbo.c \ notify.c \ op_classes.c \ offchannel.c \ @@ -31,6 +32,7 @@ SRCS= bss.c \ scan.c \ twt.c \ wmm_ac.c \ + wnm_sta.c \ wpa_supplicant.c \ wpas_glue.c From nobody Mon Nov 22 18:20:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 82B9A189FD69; Mon, 22 Nov 2021 18:20: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 4HybCl1Jp9z3HbC; Mon, 22 Nov 2021 18:20:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE64F2778E; Mon, 22 Nov 2021 18:20: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 1AMIK2eC000834; Mon, 22 Nov 2021 18:20:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIK25e000832; Mon, 22 Nov 2021 18:20:02 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:20:02 GMT Message-Id: <202111221820.1AMIK25e000832@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: f8fe2b8c5f61 - stable/12 - wpa: Enable RSN Preauthentication List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f8fe2b8c5f613e11e6fe89534547e99244cbd512 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f8fe2b8c5f613e11e6fe89534547e99244cbd512 commit f8fe2b8c5f613e11e6fe89534547e99244cbd512 Author: Cy Schubert AuthorDate: 2021-09-03 13:14:59 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:19:31 +0000 wpa: Enable RSN Preauthentication RSN Preauthentication allows a station autnetnicate to an AP that it is not associated with yet while associated with a different AP. This allows athentication to multiple APs simulteneously. Tested by: philip (cherry picked from commit bd452dcbede69b1862c769f244948f94b86448b5) --- usr.sbin/wpa/Makefile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index 16b2e94959f3..e9a2053c6095 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -69,6 +69,7 @@ CFLAGS+=-DEAP_TLS_FUNCS CFLAGS+=-DCONFIG_WNM CFLAGS+=-DCONFIG_WNM_AP CFLAGS+=-DCONFIG_MBO +CFLAGS+=-DCONFIG_RSN_PREAUTH .if ${MK_WPA_SUPPLICANT_EAPOL} != "no" CFLAGS+=-DCONFIG_HS20 \ From nobody Mon Nov 22 18:20:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4AC1B189FF0E; Mon, 22 Nov 2021 18:20: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 4HybCm50FRz3HdM; Mon, 22 Nov 2021 18:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 005BE2780E; Mon, 22 Nov 2021 18:20: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 1AMIK3C9001048; Mon, 22 Nov 2021 18:20:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIK3Lj001046; Mon, 22 Nov 2021 18:20:03 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:20:03 GMT Message-Id: <202111221820.1AMIK3Lj001046@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: 3c24623a825f - stable/12 - wpa: Address CTRL-EVENT-SCAN-FAILED List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3c24623a825f9b01b37f9fb48db0085c75d5b8ac Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3c24623a825f9b01b37f9fb48db0085c75d5b8ac commit 3c24623a825f9b01b37f9fb48db0085c75d5b8ac Author: Cy Schubert AuthorDate: 2021-09-07 01:48:39 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:19:31 +0000 wpa: Address CTRL-EVENT-SCAN-FAILED Some installations may experience CTRL-EVENT-SCAN-FAILED when associating to an AP. Installations that specify ifconfig_wlan0="WPA ... up" in rc.conf do not experience the problem whereas those which specify ifconfig_wlan0="WPA" without the "up" will experience CTRL-EVENT-SCAN_FAILED. However those that specify "up" in ifconfig_wlan0 will be able to reproduce this problem by service netif stop wlan0; service netif start wlan0. Interestingly The service netif stop/start problem is reproducible on the older wpa 2.9 as well. Reported by: dhw Reported by: "Oleg V. Nauman" Reported by: Filipe da Silva Santos Reported by: Jakob Alvermark (cherry picked from commit 5fcdc19a81115d975e238270754e28557a2fcfc5) --- libexec/rc/rc.d/wpa_supplicant | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libexec/rc/rc.d/wpa_supplicant b/libexec/rc/rc.d/wpa_supplicant index 8a86fec90e4d..3c5c9d243f68 100755 --- a/libexec/rc/rc.d/wpa_supplicant +++ b/libexec/rc/rc.d/wpa_supplicant @@ -12,6 +12,7 @@ name="wpa_supplicant" desc="WPA/802.11i Supplicant for wireless network devices" +start_postcmd="wpa_poststart" rcvar= ifn="$2" @@ -27,6 +28,10 @@ is_ndis_interface() esac } +wpa_poststart() { + ifconfig ${ifn} up +} + if is_wired_interface ${ifn} ; then driver="wired" elif is_ndis_interface ${ifn} ; then From nobody Mon Nov 22 18:20:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0F47A18A008D; Mon, 22 Nov 2021 18:20: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 4HybCn245Qz3HbV; Mon, 22 Nov 2021 18:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1576C273F9; Mon, 22 Nov 2021 18:20: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 1AMIK4nv001261; Mon, 22 Nov 2021 18:20:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIK4bc001259; Mon, 22 Nov 2021 18:20:04 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:20:04 GMT Message-Id: <202111221820.1AMIK4bc001259@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: 354f82a53a68 - stable/12 - wpa: Address CTRL-EVENT-SCAN-FAILED List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 354f82a53a68c0383a49abdbef01a047b371a2e6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=354f82a53a68c0383a49abdbef01a047b371a2e6 commit 354f82a53a68c0383a49abdbef01a047b371a2e6 Author: Cy Schubert AuthorDate: 2021-09-09 00:20:52 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:19:31 +0000 wpa: Address CTRL-EVENT-SCAN-FAILED 5fcdc19a8111 didn't fully resolve the issue. There remains a report that an ifconfig wlan0 up by itself is insufficient. Ifconfig down must precede it. Reported by: Filipe da Silva Santos Fixes: 5fcdc19a8111 (cherry picked from commit d06d7eb09131edea666bf049d6c0c55672726f76) --- libexec/rc/rc.d/wpa_supplicant | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libexec/rc/rc.d/wpa_supplicant b/libexec/rc/rc.d/wpa_supplicant index 3c5c9d243f68..9e5f64a5373f 100755 --- a/libexec/rc/rc.d/wpa_supplicant +++ b/libexec/rc/rc.d/wpa_supplicant @@ -29,6 +29,8 @@ is_ndis_interface() } wpa_poststart() { + ifconfig ${ifn} down + sleep 2 ifconfig ${ifn} up } From nobody Mon Nov 22 18:20:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3EAB2189FF24; Mon, 22 Nov 2021 18:20: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 4HybCp3rg5z3HQV; Mon, 22 Nov 2021 18:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F1332772C; Mon, 22 Nov 2021 18:20: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 1AMIK6q8001478; Mon, 22 Nov 2021 18:20:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIK6oO001476; Mon, 22 Nov 2021 18:20:06 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:20:06 GMT Message-Id: <202111221820.1AMIK6oO001476@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: d8b607c5a9a3 - stable/12 - wpa: Fix WITHOUT_CRYPT build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d8b607c5a9a36fbac6ee4e97314869a7f5306832 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d8b607c5a9a36fbac6ee4e97314869a7f5306832 commit d8b607c5a9a36fbac6ee4e97314869a7f5306832 Author: Cy Schubert AuthorDate: 2021-10-28 23:55:48 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:19:31 +0000 wpa: Fix WITHOUT_CRYPT build PASN requires CRYPT and when built WITHOUT_CRYPT buildworld fails. Only enable PASN when MK_CRYPT is enabled (default). PR: 259517 Reported by: emaste Fixes: c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5 (cherry picked from commit a30e8044aa4753858c189f3384dae2b2f25a150b) --- usr.sbin/wpa/Makefile.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index e9a2053c6095..013973dde14e 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -54,7 +54,6 @@ CFLAGS+=-DCONFIG_TDLS CFLAGS+=-DCONFIG_TERMINATE_ONLASTIF CFLAGS+=-DCONFIG_TLS=openssl CFLAGS+=-DCONFIG_MATCH_IFACE -CFLAGS+=-DCONFIG_PASN CFLAGS+=-DCONFIG_PTKSA_CACHE CFLAGS+=-DEAP_SERVER CFLAGS+=-DEAP_SERVER_GTC @@ -89,6 +88,10 @@ NEED_AES_ENCBLOCK=y NEED_AES_OMAC1=y .endif +.if ${MK_CRYPT} != "no" +CFLAGS+=-DCONFIG_PASN +.endif + .if !empty(CFLAGS:M*-DEAP_AKA) NEED_SIM_COMMON=y NEED_AES_CBC=y From nobody Mon Nov 22 18:20:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D7D0918A0133; Mon, 22 Nov 2021 18:20: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 4HybCq43VLz3HT3; Mon, 22 Nov 2021 18:20:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D8C2271EE; Mon, 22 Nov 2021 18:20: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 1AMIK7wS001692; Mon, 22 Nov 2021 18:20:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIK7mN001690; Mon, 22 Nov 2021 18:20:07 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:20:07 GMT Message-Id: <202111221820.1AMIK7mN001690@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: 33ec402fce28 - stable/12 - wpa: Remove duplicate options definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 33ec402fce2806ffda0095b48dc56d8c5450fd6c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=33ec402fce2806ffda0095b48dc56d8c5450fd6c commit 33ec402fce2806ffda0095b48dc56d8c5450fd6c Author: Cy Schubert AuthorDate: 2021-11-09 00:16:46 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:19:31 +0000 wpa: Remove duplicate options definitions Global options are defined in usr.sbin/wpa/Makefile.inc. Those in usr.sbin/wpa/src/crypto/Makefile are duplicates of those found above. Remove them. (cherry picked from commit 3332f1b444d4a73238e9f59cca27bfc95fe936bd) --- usr.sbin/wpa/src/crypto/Makefile | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/usr.sbin/wpa/src/crypto/Makefile b/usr.sbin/wpa/src/crypto/Makefile index c95834279c21..eede671aa7db 100644 --- a/usr.sbin/wpa/src/crypto/Makefile +++ b/usr.sbin/wpa/src/crypto/Makefile @@ -139,20 +139,6 @@ SRCS+= dh_groups.c .endif .if ${MK_WPA_SUPPLICANT_EAPOL} != "no" -CFLAGS+=-DCONFIG_WPS \ - -DCONFIG_HS20 \ - -DCONFIG_INTERWORKING \ - -DEAP_GTC \ - -DEAP_LEAP \ - -DEAP_MD5 \ - -DEAP_MSCHAPv2 \ - -DEAP_OTP \ - -DEAP_PEAP \ - -DEAP_PSK \ - -DEAP_TLS \ - -DEAP_TTLS \ - -DEAP_WSC \ - -DIEEE8021X_EAPOL SRCS+= ms_funcs.c .endif From nobody Mon Nov 22 18:20:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E329F18A0204; Mon, 22 Nov 2021 18:20: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 4HybCr67XTz3HNF; Mon, 22 Nov 2021 18:20:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53FC8273FA; Mon, 22 Nov 2021 18:20: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 1AMIK8Yi001907; Mon, 22 Nov 2021 18:20:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIK8dM001905; Mon, 22 Nov 2021 18:20:08 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:20:08 GMT Message-Id: <202111221820.1AMIK8dM001905@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: 6aa78e230fa9 - stable/12 - Revert "wpa: Fix WITHOUT_CRYPT build" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6aa78e230fa953f99e3defb9a7f956ef80794da7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=6aa78e230fa953f99e3defb9a7f956ef80794da7 commit 6aa78e230fa953f99e3defb9a7f956ef80794da7 Author: Cy Schubert AuthorDate: 2021-11-09 22:17:01 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:19:32 +0000 Revert "wpa: Fix WITHOUT_CRYPT build" This reverts commit a30e8044aa4753858c189f3384dae2b2f25a150b. WITHOUT_OPENSSL build is a subset of WITHOUT_CRYPT build. It was incorrect to label this patch as fixing WITHOUT_CRYPT when in fact it fixes WITHOUT_OPENSSL. The build failure will be addressed in a fix for WITHOUT_OPENSSL build. (cherry picked from commit 96e2ac9c48baae6a352eb5574af87f81e01ff021) --- usr.sbin/wpa/Makefile.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index 013973dde14e..e9a2053c6095 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -54,6 +54,7 @@ CFLAGS+=-DCONFIG_TDLS CFLAGS+=-DCONFIG_TERMINATE_ONLASTIF CFLAGS+=-DCONFIG_TLS=openssl CFLAGS+=-DCONFIG_MATCH_IFACE +CFLAGS+=-DCONFIG_PASN CFLAGS+=-DCONFIG_PTKSA_CACHE CFLAGS+=-DEAP_SERVER CFLAGS+=-DEAP_SERVER_GTC @@ -88,10 +89,6 @@ NEED_AES_ENCBLOCK=y NEED_AES_OMAC1=y .endif -.if ${MK_CRYPT} != "no" -CFLAGS+=-DCONFIG_PASN -.endif - .if !empty(CFLAGS:M*-DEAP_AKA) NEED_SIM_COMMON=y NEED_AES_CBC=y From nobody Mon Nov 22 18:20:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E7F0518A0213; Mon, 22 Nov 2021 18:20:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HybCt1sCrz3HW3; Mon, 22 Nov 2021 18:20:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CEBA27885; Mon, 22 Nov 2021 18:20: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 1AMIK9hu002120; Mon, 22 Nov 2021 18:20:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIK9H1002117; Mon, 22 Nov 2021 18:20:09 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:20:09 GMT Message-Id: <202111221820.1AMIK9H1002117@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: 4e67a8cc1c3d - stable/12 - wpa: Fix WITHOUT_OPENSSL build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4e67a8cc1c3dcb2cd27c6dc8c254d62a5ef0d509 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=4e67a8cc1c3dcb2cd27c6dc8c254d62a5ef0d509 commit 4e67a8cc1c3dcb2cd27c6dc8c254d62a5ef0d509 Author: Cy Schubert AuthorDate: 2021-11-09 22:52:44 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:19:32 +0000 wpa: Fix WITHOUT_OPENSSL build PR: 259517 Reported by: emaste, FreeBSD Build Option Survey https://callfortesting.org/results/bos-2021-11-04/ Fixes: c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5 (cherry picked from commit ba5de3c2b3b84fd547ddcc0e678a013e5df87db1) --- usr.sbin/wpa/Makefile.inc | 5 ++++- usr.sbin/wpa/src/tls/Makefile | 9 +++++---- usr.sbin/wpa/wpa_supplicant/Makefile | 5 ++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index e9a2053c6095..71ec3f8510d1 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -54,7 +54,6 @@ CFLAGS+=-DCONFIG_TDLS CFLAGS+=-DCONFIG_TERMINATE_ONLASTIF CFLAGS+=-DCONFIG_TLS=openssl CFLAGS+=-DCONFIG_MATCH_IFACE -CFLAGS+=-DCONFIG_PASN CFLAGS+=-DCONFIG_PTKSA_CACHE CFLAGS+=-DEAP_SERVER CFLAGS+=-DEAP_SERVER_GTC @@ -89,6 +88,10 @@ NEED_AES_ENCBLOCK=y NEED_AES_OMAC1=y .endif +.if ${MK_OPENSSL} != "no" +CFLAGS+=-DCONFIG_PASN +.endif + .if !empty(CFLAGS:M*-DEAP_AKA) NEED_SIM_COMMON=y NEED_AES_CBC=y diff --git a/usr.sbin/wpa/src/tls/Makefile b/usr.sbin/wpa/src/tls/Makefile index e5fdf96444d6..fbb57b9c4c10 100644 --- a/usr.sbin/wpa/src/tls/Makefile +++ b/usr.sbin/wpa/src/tls/Makefile @@ -29,13 +29,14 @@ SRCS+= asn1.c \ tlsv1_server_read.c \ tlsv1_server_write.c \ x509v3.c -.endif -.endif CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \ - -DCONFIG_CRYPTO_INTERNAL \ - -DCONFIG_TLSV11 \ + -DCONFIG_CRYPTO_INTERNAL +.else +CFLAGS+=-DCONFIG_TLSV11 \ -DCONFIG_TLSV12 +.endif +.endif # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index e71b491ebe8b..bd31338243ff 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -26,7 +26,6 @@ SRCS= bss.c \ notify.c \ op_classes.c \ offchannel.c \ - pasn_supplicant.c \ robust_av.c \ rrm.c \ scan.c \ @@ -36,6 +35,10 @@ SRCS= bss.c \ wpa_supplicant.c \ wpas_glue.c +.if ${MK_OPENSSL} != "no" +SRCS+= pasn_supplicant.c +.endif + MAN= wpa_supplicant.8 wpa_supplicant.conf.5 .if ${MK_EXAMPLES} != "no" From nobody Mon Nov 22 18:20:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 39BD718A0314; Mon, 22 Nov 2021 18:20: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 4HybCw3Skfz3HTV; Mon, 22 Nov 2021 18:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83F0A271EF; Mon, 22 Nov 2021 18:20: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 1AMIKAsN002334; Mon, 22 Nov 2021 18:20:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIKArV002332; Mon, 22 Nov 2021 18:20:10 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:20:10 GMT Message-Id: <202111221820.1AMIKArV002332@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: d90f00d7ee70 - stable/12 - wpa: Fix WITHOUT_WPA_SUPPLICANT_EAPOL build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d90f00d7ee70e88384154730cf7d1e5921235de9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d90f00d7ee70e88384154730cf7d1e5921235de9 commit d90f00d7ee70e88384154730cf7d1e5921235de9 Author: Cy Schubert AuthorDate: 2021-11-10 03:05:03 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:19:32 +0000 wpa: Fix WITHOUT_WPA_SUPPLICANT_EAPOL build Reported by: FreeBSD Build Option Survey https://callfortesting.org/results/bos-2021-11-04/ Fixes: c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5 (cherry picked from commit c9516b83c14f2dcec57bd175e418c152a0cec947) --- usr.sbin/wpa/Makefile.inc | 12 ++++++------ usr.sbin/wpa/src/ap/Makefile | 9 ++++++--- usr.sbin/wpa/src/crypto/Makefile | 2 -- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index 71ec3f8510d1..cee89dfc4a82 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -40,11 +40,6 @@ CFLAGS+=-DCONFIG_IEEE80211R CFLAGS+=-DCONFIG_IEEE80211W CFLAGS+=-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\" CFLAGS+=-DCONFIG_DEBUG_SYSLOG -CFLAGS+=-DCONFIG_WPS -CFLAGS+=-DCONFIG_WPS2 -CFLAGS+=-DCONFIG_WPS_UPNP -CFLAGS+=-DCONFIG_WPS_OOB -CFLAGS+=-DCONFIG_INTERWORKING CFLAGS+=-DPKCS12_FUNCS CFLAGS+=-DCONFIG_GAS CFLAGS+=-DCONFIG_PEERKEY @@ -82,7 +77,12 @@ CFLAGS+=-DCONFIG_HS20 \ -DEAP_TLS \ -DEAP_TTLS \ -DEAP_WSC \ - -DIEEE8021X_EAPOL + -DIEEE8021X_EAPOL \ + -DCONFIG_INTERWORKING \ + -DCONFIG_WPS \ + -DCONFIG_WPS2 \ + -DCONFIG_WPS_UPNP \ + -DCONFIG_WPS_OOB NEED_AES_EAX=y NEED_AES_ENCBLOCK=y NEED_AES_OMAC1=y diff --git a/usr.sbin/wpa/src/ap/Makefile b/usr.sbin/wpa/src/ap/Makefile index 162b8b5444aa..801f45fca8a6 100644 --- a/usr.sbin/wpa/src/ap/Makefile +++ b/usr.sbin/wpa/src/ap/Makefile @@ -20,9 +20,7 @@ SRCS= accounting.c \ dfs.c \ drv_callbacks.c \ eap_user_db.c \ - gas_serv.c \ hostapd.c \ - hs20.c \ ieee802_11_auth.c \ ieee802_11_ht.c \ ieee802_11_shared.c \ @@ -43,8 +41,13 @@ SRCS= accounting.c \ wnm_ap.c \ wpa_auth.c \ wpa_auth_glue.c \ - wpa_auth_ie.c \ + wpa_auth_ie.c + +.if ${MK_WPA_SUPPLICANT_EAPOL} != "no" +SRCS+= gas_serv.c \ + hs20.c \ wps_hostapd.c +.endif CFLAGS+=-DHOSTAPD diff --git a/usr.sbin/wpa/src/crypto/Makefile b/usr.sbin/wpa/src/crypto/Makefile index eede671aa7db..d71b740bb816 100644 --- a/usr.sbin/wpa/src/crypto/Makefile +++ b/usr.sbin/wpa/src/crypto/Makefile @@ -138,9 +138,7 @@ SRCS+= dh_group5.c SRCS+= dh_groups.c .endif -.if ${MK_WPA_SUPPLICANT_EAPOL} != "no" SRCS+= ms_funcs.c -.endif CFLAGS+=-DCONFIG_CRYPTO_INTERNAL \ -DCONFIG_TLS_INTERNAL_CLIENT \ From nobody Mon Nov 22 18:22:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2510C18A2442; Mon, 22 Nov 2021 18:22:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HybGr4kRpz3Lbl; Mon, 22 Nov 2021 18:22:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8248427754; Mon, 22 Nov 2021 18:22: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 1AMIMioC011810; Mon, 22 Nov 2021 18:22:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIMiYn011809; Mon, 22 Nov 2021 18:22:44 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:22:44 GMT Message-Id: <202111221822.1AMIMiYn011809@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Allan Jude Subject: git: 0ed191d116f5 - stable/12 - openssl: Fix detection of ARMv7 and ARM64 CPU features List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/12 X-Git-Reftype: branch X-Git-Commit: 0ed191d116f511c1e67338f05386d87aad53076f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=0ed191d116f511c1e67338f05386d87aad53076f commit 0ed191d116f511c1e67338f05386d87aad53076f Author: Allan Jude AuthorDate: 2021-11-19 15:14:30 +0000 Commit: Allan Jude CommitDate: 2021-11-22 18:22:36 +0000 openssl: Fix detection of ARMv7 and ARM64 CPU features OpenSSL assumes the same value for AT_HWCAP=16 (Linux) So it ends up calling elf_auxv_info() with AT_CANARY which returns ENOENT, and all acceleration features are disabled. With this, my ARM64 test machine runs the benchmark `openssl speed -evp aes-256-gcm` nearly 20x faster going from 100 MB/sec to 2000 MB/sec It also improves sha256 from 300 MB/sec to 1800 MB/sec This fix has been accepted but not yet merged upstream: https://github.com/openssl/openssl/pull/17082 PR: 259937 Reviewed by: manu, imp MFC after: immediate Relnotes: yes Fixes: 88e852c0b5c872b1a ("OpenSSL: Merge OpenSSL 1.1.1j") Sponsored by: Ampere Computing LLC Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D33060 (cherry picked from commit d9bb798725cfce9c72b80440659b48e8668eb10d) --- crypto/openssl/crypto/armcap.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crypto/openssl/crypto/armcap.c b/crypto/openssl/crypto/armcap.c index c5685bde5891..48c5d4d64e32 100644 --- a/crypto/openssl/crypto/armcap.c +++ b/crypto/openssl/crypto/armcap.c @@ -106,20 +106,23 @@ static unsigned long getauxval(unsigned long key) * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas * AArch64 used AT_HWCAP. */ +# ifndef AT_HWCAP +# define AT_HWCAP 16 +# endif +# ifndef AT_HWCAP2 +# define AT_HWCAP2 26 +# endif # if defined(__arm__) || defined (__arm) -# define HWCAP 16 - /* AT_HWCAP */ +# define HWCAP AT_HWCAP # define HWCAP_NEON (1 << 12) -# define HWCAP_CE 26 - /* AT_HWCAP2 */ +# define HWCAP_CE AT_HWCAP2 # define HWCAP_CE_AES (1 << 0) # define HWCAP_CE_PMULL (1 << 1) # define HWCAP_CE_SHA1 (1 << 2) # define HWCAP_CE_SHA256 (1 << 3) # elif defined(__aarch64__) -# define HWCAP 16 - /* AT_HWCAP */ +# define HWCAP AT_HWCAP # define HWCAP_NEON (1 << 1) # define HWCAP_CE HWCAP From nobody Mon Nov 22 18:35:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E156118A92B0; Mon, 22 Nov 2021 18:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HybYx665Pz3QhS; Mon, 22 Nov 2021 18:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE6D327958; Mon, 22 Nov 2021 18:35: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 1AMIZnTD025134; Mon, 22 Nov 2021 18:35:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIZn1f025133; Mon, 22 Nov 2021 18:35:49 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:35:49 GMT Message-Id: <202111221835.1AMIZn1f025133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: c0601c3e0162 - main - RELNOTES: Add comment about WiFi 6 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0601c3e0162a7ccf6160b32cfa7596bba7bb869 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c0601c3e0162a7ccf6160b32cfa7596bba7bb869 commit c0601c3e0162a7ccf6160b32cfa7596bba7bb869 Author: Cy Schubert AuthorDate: 2021-11-22 18:34:42 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:34:42 +0000 RELNOTES: Add comment about WiFi 6 support --- RELNOTES | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/RELNOTES b/RELNOTES index 44b777e9b7ab..56ae5235c4ff 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,10 +10,8 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. -ba48d52ca6c8,4ac3d08a9693,2533eca1c2b9: - The default bell tone is now 800Hz. It may be set with kbdcontrol - again. There's devd integration for people wishing to use their sound - cards for the beep. +c1d255d3ffdb, 3968b47cd974, bd452dcbede6: + Add WiFi 6 support. 92b3e07229ba: net.inet.tcp.nolocaltimewait enabled by default. It prevents From nobody Mon Nov 22 18:42:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EFD4C18AD905; Mon, 22 Nov 2021 18:42: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 4HybjZ6W6Hz3kYd; Mon, 22 Nov 2021 18:42:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF501279D0; Mon, 22 Nov 2021 18:42: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 1AMIgQ4F037955; Mon, 22 Nov 2021 18:42:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMIgQVp037954; Mon, 22 Nov 2021 18:42:26 GMT (envelope-from git) Date: Mon, 22 Nov 2021 18:42:26 GMT Message-Id: <202111221842.1AMIgQVp037954@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: 7ae7d3862ece - stable/13 - RELNOTES: Add comment about WiFi 6 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7ae7d3862ece7c62cb2bf8c725ac6b69b8b91ed5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=7ae7d3862ece7c62cb2bf8c725ac6b69b8b91ed5 commit 7ae7d3862ece7c62cb2bf8c725ac6b69b8b91ed5 Author: Cy Schubert AuthorDate: 2021-11-22 18:42:11 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 18:42:11 +0000 RELNOTES: Add comment about WiFi 6 support --- RELNOTES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELNOTES b/RELNOTES index 72d2d5282645..30dcf22c52f4 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +0a6760a1de32, 3f3676a71266, 580c04df4db6: + Add WiFi 6 support. + various: Add support for the HiFive Unmatched RISC-V board. From nobody Mon Nov 22 19:00:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1E5241890901; Mon, 22 Nov 2021 19:00:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyc5v0NjRz3s9F; Mon, 22 Nov 2021 19:00:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E221127CCC; Mon, 22 Nov 2021 19:00: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 1AMJ02pe055002; Mon, 22 Nov 2021 19:00:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMJ02MB054999; Mon, 22 Nov 2021 19:00:02 GMT (envelope-from git) Date: Mon, 22 Nov 2021 19:00:02 GMT Message-Id: <202111221900.1AMJ02MB054999@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Allan Jude Subject: git: 8ffcfb399b20 - releng/12.3 - openssl: Fix detection of ARMv7 and ARM64 CPU features List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/releng/12.3 X-Git-Reftype: branch X-Git-Commit: 8ffcfb399b20f027cb50afe41c7f83c52c008191 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.3 has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=8ffcfb399b20f027cb50afe41c7f83c52c008191 commit 8ffcfb399b20f027cb50afe41c7f83c52c008191 Author: Allan Jude AuthorDate: 2021-11-19 15:14:30 +0000 Commit: Allan Jude CommitDate: 2021-11-22 18:59:32 +0000 openssl: Fix detection of ARMv7 and ARM64 CPU features OpenSSL assumes the same value for AT_HWCAP=16 (Linux) So it ends up calling elf_auxv_info() with AT_CANARY which returns ENOENT, and all acceleration features are disabled. With this, my ARM64 test machine runs the benchmark `openssl speed -evp aes-256-gcm` nearly 20x faster going from 100 MB/sec to 2000 MB/sec It also improves sha256 from 300 MB/sec to 1800 MB/sec This fix has been accepted but not yet merged upstream: https://github.com/openssl/openssl/pull/17082 PR: 259937 Reviewed by: manu, imp Approved by: re (gjb) Relnotes: yes Fixes: 88e852c0b5c872b1a ("OpenSSL: Merge OpenSSL 1.1.1j") Sponsored by: Ampere Computing LLC Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D33060 (cherry picked from commit d9bb798725cfce9c72b80440659b48e8668eb10d) (cherry picked from commit 0ed191d116f511c1e67338f05386d87aad53076f) --- crypto/openssl/crypto/armcap.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crypto/openssl/crypto/armcap.c b/crypto/openssl/crypto/armcap.c index c5685bde5891..48c5d4d64e32 100644 --- a/crypto/openssl/crypto/armcap.c +++ b/crypto/openssl/crypto/armcap.c @@ -106,20 +106,23 @@ static unsigned long getauxval(unsigned long key) * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas * AArch64 used AT_HWCAP. */ +# ifndef AT_HWCAP +# define AT_HWCAP 16 +# endif +# ifndef AT_HWCAP2 +# define AT_HWCAP2 26 +# endif # if defined(__arm__) || defined (__arm) -# define HWCAP 16 - /* AT_HWCAP */ +# define HWCAP AT_HWCAP # define HWCAP_NEON (1 << 12) -# define HWCAP_CE 26 - /* AT_HWCAP2 */ +# define HWCAP_CE AT_HWCAP2 # define HWCAP_CE_AES (1 << 0) # define HWCAP_CE_PMULL (1 << 1) # define HWCAP_CE_SHA1 (1 << 2) # define HWCAP_CE_SHA256 (1 << 3) # elif defined(__aarch64__) -# define HWCAP 16 - /* AT_HWCAP */ +# define HWCAP AT_HWCAP # define HWCAP_NEON (1 << 1) # define HWCAP_CE HWCAP From nobody Mon Nov 22 20:04:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6816618910E9; Mon, 22 Nov 2021 20:04: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 4HydWm2WCRz4hhv; Mon, 22 Nov 2021 20:04:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37011AD9; Mon, 22 Nov 2021 20:04: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 1AMK44e8046961; Mon, 22 Nov 2021 20:04:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMK44se046960; Mon, 22 Nov 2021 20:04:04 GMT (envelope-from git) Date: Mon, 22 Nov 2021 20:04:04 GMT Message-Id: <202111222004.1AMK44se046960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 22b1cbec8e9e - main - Revert "RELNOTES: Add comment about WiFi 6 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22b1cbec8e9e0ad3311257e99ded781fedd5c871 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=22b1cbec8e9e0ad3311257e99ded781fedd5c871 commit 22b1cbec8e9e0ad3311257e99ded781fedd5c871 Author: Cy Schubert AuthorDate: 2021-11-22 20:01:36 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 20:01:36 +0000 Revert "RELNOTES: Add comment about WiFi 6 support" This reverts commit c0601c3e0162a7ccf6160b32cfa7596bba7bb869. --- RELNOTES | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/RELNOTES b/RELNOTES index 56ae5235c4ff..44b777e9b7ab 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,8 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. -c1d255d3ffdb, 3968b47cd974, bd452dcbede6: - Add WiFi 6 support. +ba48d52ca6c8,4ac3d08a9693,2533eca1c2b9: + The default bell tone is now 800Hz. It may be set with kbdcontrol + again. There's devd integration for people wishing to use their sound + cards for the beep. 92b3e07229ba: net.inet.tcp.nolocaltimewait enabled by default. It prevents From nobody Mon Nov 22 20:04:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CAE201890FE7; Mon, 22 Nov 2021 20:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HydWn4jdyz4htN; Mon, 22 Nov 2021 20:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59AA3CDE; Mon, 22 Nov 2021 20:04: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 1AMK45jO046985; Mon, 22 Nov 2021 20:04:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMK45US046984; Mon, 22 Nov 2021 20:04:05 GMT (envelope-from git) Date: Mon, 22 Nov 2021 20:04:05 GMT Message-Id: <202111222004.1AMK45US046984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: e383c423c492 - main - RELNOTES: Add comment about WiFi 6 support to wpa List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e383c423c492781bd7e7a0de9dfe433e4d6a4eed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e383c423c492781bd7e7a0de9dfe433e4d6a4eed commit e383c423c492781bd7e7a0de9dfe433e4d6a4eed Author: Cy Schubert AuthorDate: 2021-11-22 20:03:34 +0000 Commit: Cy Schubert CommitDate: 2021-11-22 20:03:34 +0000 RELNOTES: Add comment about WiFi 6 support to wpa --- RELNOTES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELNOTES b/RELNOTES index 44b777e9b7ab..3b772bba1ba0 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +c1d255d3ffdb, 3968b47cd974, bd452dcbede6: + Add WiFi 6 support to wpa. + ba48d52ca6c8,4ac3d08a9693,2533eca1c2b9: The default bell tone is now 800Hz. It may be set with kbdcontrol again. There's devd integration for people wishing to use their sound From nobody Mon Nov 22 22:37:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C95E81892195; Mon, 22 Nov 2021 22:37: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 4HyhwZ5FNxz4XGF; Mon, 22 Nov 2021 22:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93CA52CAB; Mon, 22 Nov 2021 22:37: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 1AMMbI16046587; Mon, 22 Nov 2021 22:37:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbIlZ046586; Mon, 22 Nov 2021 22:37:18 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:18 GMT Message-Id: <202111222237.1AMMbIlZ046586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 88dfcfa2a08a - main - sys_sigaltstack: use struct sigaltstack arg List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88dfcfa2a08a05070767f39160834f5a7277b4d6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=88dfcfa2a08a05070767f39160834f5a7277b4d6 commit 88dfcfa2a08a05070767f39160834f5a7277b4d6 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:53 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:53 +0000 sys_sigaltstack: use struct sigaltstack arg This is idential to stack_t and more amenable to prepending "32" to for freebsd32. Reviewed by: kib --- sys/kern/syscalls.master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index a4dcac75b2b3..a12e9121811e 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -388,8 +388,8 @@ } 53 AUE_SIGALTSTACK STD|CAPENABLED { int sigaltstack( - _In_opt_ const stack_t *ss, - _Out_opt_ stack_t *oss + _In_opt_ const struct sigaltstack *ss, + _Out_opt_ struct sigaltstack *oss ); } 54 AUE_IOCTL STD|CAPENABLED { From nobody Mon Nov 22 22:37:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 718AC18920DA; Mon, 22 Nov 2021 22:37: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 4Hyhwb6qTDz4XTc; Mon, 22 Nov 2021 22:37:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD2E72E36; Mon, 22 Nov 2021 22:37: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 1AMMbJYJ046611; Mon, 22 Nov 2021 22:37:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbJLO046610; Mon, 22 Nov 2021 22:37:19 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:19 GMT Message-Id: <202111222237.1AMMbJLO046610@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 97e4bec56d28 - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97e4bec56d288214d661def3b82054cbe0d82112 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=97e4bec56d288214d661def3b82054cbe0d82112 commit 97e4bec56d288214d661def3b82054cbe0d82112 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:53 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:53 +0000 syscalls: regen --- sys/kern/systrace_args.c | 8 ++++---- sys/sys/sysproto.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 140dbea1474e..2efb4888e7b6 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -336,8 +336,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* sigaltstack */ case 53: { struct sigaltstack_args *p = params; - uarg[0] = (intptr_t)p->ss; /* const stack_t * */ - uarg[1] = (intptr_t)p->oss; /* stack_t * */ + uarg[0] = (intptr_t)p->ss; /* const struct sigaltstack * */ + uarg[1] = (intptr_t)p->oss; /* struct sigaltstack * */ *n_args = 2; break; } @@ -3924,10 +3924,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 53: switch (ndx) { case 0: - p = "userland const stack_t *"; + p = "userland const struct sigaltstack *"; break; case 1: - p = "userland stack_t *"; + p = "userland struct sigaltstack *"; break; default: break; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 64d38cbff42f..0ca483654829 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -213,8 +213,8 @@ struct osigpending_args { register_t dummy; }; struct sigaltstack_args { - char ss_l_[PADL_(const stack_t *)]; const stack_t * ss; char ss_r_[PADR_(const stack_t *)]; - char oss_l_[PADL_(stack_t *)]; stack_t * oss; char oss_r_[PADR_(stack_t *)]; + char ss_l_[PADL_(const struct sigaltstack *)]; const struct sigaltstack * ss; char ss_r_[PADR_(const struct sigaltstack *)]; + char oss_l_[PADL_(struct sigaltstack *)]; struct sigaltstack * oss; char oss_r_[PADR_(struct sigaltstack *)]; }; struct ioctl_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; From nobody Mon Nov 22 22:37:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2984B1892320; Mon, 22 Nov 2021 22:37: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 4Hyhwd01zrz4Xfb; Mon, 22 Nov 2021 22:37:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5B4C2EEE; Mon, 22 Nov 2021 22:37: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 1AMMbKbS046635; Mon, 22 Nov 2021 22:37:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbK5Y046634; Mon, 22 Nov 2021 22:37:20 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:20 GMT Message-Id: <202111222237.1AMMbK5Y046634@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: d8bd949bebb3 - main - sys___sysctl: regularize argument struct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8bd949bebb3a6c46e42cb9666bc10cee1389892 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d8bd949bebb3a6c46e42cb9666bc10cee1389892 commit d8bd949bebb3a6c46e42cb9666bc10cee1389892 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:54 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:54 +0000 sys___sysctl: regularize argument struct Let makesyscalls generate the normal struct __sysctl_args structure. It works fine. Reviewed by: kib --- sys/kern/kern_sysctl.c | 4 ++-- sys/kern/syscalls.master | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index c472db18aac7..3d55a0e65883 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -2310,7 +2310,7 @@ out: } #ifndef _SYS_SYSPROTO_H_ -struct sysctl_args { +struct __sysctl_args { int *name; u_int namelen; void *old; @@ -2320,7 +2320,7 @@ struct sysctl_args { }; #endif int -sys___sysctl(struct thread *td, struct sysctl_args *uap) +sys___sysctl(struct thread *td, struct __sysctl_args *uap) { int error, i, name[CTL_MAXNAME]; size_t j; diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index a12e9121811e..5f4890f422df 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1198,7 +1198,7 @@ _In_reads_bytes_opt_(newlen) const void *new, size_t newlen ); - } __sysctl sysctl_args int + } 203 AUE_MLOCK STD|CAPENABLED { int mlock( _In_ const void *addr, From nobody Mon Nov 22 22:37:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ACC6D1892388; Mon, 22 Nov 2021 22:37: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 4Hyhwf1Y5Mz4Xfl; Mon, 22 Nov 2021 22:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC1532EEF; Mon, 22 Nov 2021 22:37: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 1AMMbLax046666; Mon, 22 Nov 2021 22:37:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbLm8046665; Mon, 22 Nov 2021 22:37:21 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:21 GMT Message-Id: <202111222237.1AMMbLm8046665@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e58e9a8cbd7c - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e58e9a8cbd7c5e1ef886377d168ec0a662af8e79 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e58e9a8cbd7c5e1ef886377d168ec0a662af8e79 commit e58e9a8cbd7c5e1ef886377d168ec0a662af8e79 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:54 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:54 +0000 syscalls: regen --- sys/kern/init_sysent.c | 2 +- sys/kern/systrace_args.c | 2 +- sys/sys/sysproto.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index b58ee2859108..64528318bf8f 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -257,7 +257,7 @@ struct sysent sysent[] = { { compat6(AS(freebsd6_lseek_args),lseek), .sy_auevent = AUE_LSEEK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 199 = freebsd6 lseek */ { compat6(AS(freebsd6_truncate_args),truncate), .sy_auevent = AUE_TRUNCATE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 200 = freebsd6 truncate */ { compat6(AS(freebsd6_ftruncate_args),ftruncate), .sy_auevent = AUE_FTRUNCATE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 201 = freebsd6 ftruncate */ - { .sy_narg = AS(sysctl_args), .sy_call = (sy_call_t *)sys___sysctl, .sy_auevent = AUE_SYSCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 202 = __sysctl */ + { .sy_narg = AS(__sysctl_args), .sy_call = (sy_call_t *)sys___sysctl, .sy_auevent = AUE_SYSCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 202 = __sysctl */ { .sy_narg = AS(mlock_args), .sy_call = (sy_call_t *)sys_mlock, .sy_auevent = AUE_MLOCK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 203 = mlock */ { .sy_narg = AS(munlock_args), .sy_call = (sy_call_t *)sys_munlock, .sy_auevent = AUE_MUNLOCK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 204 = munlock */ { .sy_narg = AS(undelete_args), .sy_call = (sy_call_t *)sys_undelete, .sy_auevent = AUE_UNDELETE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 205 = undelete */ diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 2efb4888e7b6..41817ad0e5f7 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -967,7 +967,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* __sysctl */ case 202: { - struct sysctl_args *p = params; + struct __sysctl_args *p = params; uarg[0] = (intptr_t)p->name; /* int * */ uarg[1] = p->namelen; /* u_int */ uarg[2] = (intptr_t)p->old; /* void * */ diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 0ca483654829..bce8ba97de14 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -555,7 +555,7 @@ struct __setrlimit_args { char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; char rlp_l_[PADL_(struct rlimit *)]; struct rlimit * rlp; char rlp_r_[PADR_(struct rlimit *)]; }; -struct sysctl_args { +struct __sysctl_args { char name_l_[PADL_(int *)]; int * name; char name_r_[PADR_(int *)]; char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)]; char old_l_[PADL_(void *)]; void * old; char old_r_[PADR_(void *)]; @@ -1975,7 +1975,7 @@ int sys_pathconf(struct thread *, struct pathconf_args *); int sys_fpathconf(struct thread *, struct fpathconf_args *); int sys_getrlimit(struct thread *, struct __getrlimit_args *); int sys_setrlimit(struct thread *, struct __setrlimit_args *); -int sys___sysctl(struct thread *, struct sysctl_args *); +int sys___sysctl(struct thread *, struct __sysctl_args *); int sys_mlock(struct thread *, struct mlock_args *); int sys_munlock(struct thread *, struct munlock_args *); int sys_undelete(struct thread *, struct undelete_args *); From nobody Mon Nov 22 22:37:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2810518922C0; Mon, 22 Nov 2021 22:37: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 4Hyhwg74gKz4XZp; Mon, 22 Nov 2021 22:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18EE62E37; Mon, 22 Nov 2021 22:37: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 1AMMbN2n046690; Mon, 22 Nov 2021 22:37:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbMAS046689; Mon, 22 Nov 2021 22:37:22 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:22 GMT Message-Id: <202111222237.1AMMbMAS046689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 717e7fb27af9 - main - syscalls: struct ucontext4 -> struct freebsd4_ucontext List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 717e7fb27af9c9efc79b6efcced71eb29b058bf9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=717e7fb27af9c9efc79b6efcced71eb29b058bf9 commit 717e7fb27af9c9efc79b6efcced71eb29b058bf9 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:54 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:54 +0000 syscalls: struct ucontext4 -> struct freebsd4_ucontext This aligns with struct freebsd4_ucontext32 in freebsd32. Reviewed by: kib --- sys/i386/i386/exec_machdep.c | 4 ++-- sys/i386/i386/genassym.c | 4 ++-- sys/i386/include/sigframe.h | 2 +- sys/kern/syscalls.master | 2 +- sys/sys/ucontext.h | 6 +++--- tools/tools/shlib-compat/makesyscalls-fake.sh | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/i386/i386/exec_machdep.c b/sys/i386/i386/exec_machdep.c index 7d3022fbc406..469b0ebc9a78 100644 --- a/sys/i386/i386/exec_machdep.c +++ b/sys/i386/i386/exec_machdep.c @@ -653,9 +653,9 @@ osigreturn(struct thread *td, struct osigreturn_args *uap) int freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) { - struct ucontext4 uc; + struct freebsd4_ucontext uc; struct trapframe *regs; - struct ucontext4 *ucp; + struct freebsd4_ucontext *ucp; int cs, eflags, error; ksiginfo_t ksi; diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c index c6901fc33c8f..bde452b44c95 100644 --- a/sys/i386/i386/genassym.c +++ b/sys/i386/i386/genassym.c @@ -171,8 +171,8 @@ ASSYM(SC_GS, offsetof(struct osigcontext, sc_gs)); ASSYM(SC_TRAPNO, offsetof(struct osigcontext, sc_trapno)); #endif #ifdef COMPAT_FREEBSD4 -ASSYM(UC4_EFLAGS, offsetof(struct ucontext4, uc_mcontext.mc_eflags)); -ASSYM(UC4_GS, offsetof(struct ucontext4, uc_mcontext.mc_gs)); +ASSYM(UC4_EFLAGS, offsetof(struct freebsd4_ucontext, uc_mcontext.mc_eflags)); +ASSYM(UC4_GS, offsetof(struct freebsd4_ucontext, uc_mcontext.mc_gs)); #endif ASSYM(UC_EFLAGS, offsetof(ucontext_t, uc_mcontext.mc_eflags)); ASSYM(UC_GS, offsetof(ucontext_t, uc_mcontext.mc_gs)); diff --git a/sys/i386/include/sigframe.h b/sys/i386/include/sigframe.h index 922100edb3ad..0f07b998cf91 100644 --- a/sys/i386/include/sigframe.h +++ b/sys/i386/include/sigframe.h @@ -85,7 +85,7 @@ struct sigframe4 { __siginfohandler_t *sf_action; __sighandler_t *sf_handler; } sf_ahu; - struct ucontext4 sf_uc; /* = *sf_ucontext */ + struct freebsd4_ucontext sf_uc; /* = *sf_ucontext */ siginfo_t sf_si; /* = *sf_siginfo (SA_SIGINFO case) */ }; #endif diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 5f4890f422df..71c96896da2e 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1777,7 +1777,7 @@ } 344 AUE_SIGRETURN COMPAT4|CAPENABLED { int sigreturn( - _In_ const struct ucontext4 *sigcntxp + _In_ const struct freebsd4_ucontext *sigcntxp ); } 345 AUE_SIGWAIT STD|CAPENABLED { diff --git a/sys/sys/ucontext.h b/sys/sys/ucontext.h index 1a1f7b7ccbdb..f86258d4b1f8 100644 --- a/sys/sys/ucontext.h +++ b/sys/sys/ucontext.h @@ -41,15 +41,15 @@ #if defined(_KERNEL) && defined(COMPAT_FREEBSD4) #if defined(__i386__) -struct ucontext4 { +struct freebsd4_ucontext { sigset_t uc_sigmask; struct mcontext4 uc_mcontext; - struct ucontext4 *uc_link; + struct freebsd4_ucontext *uc_link; stack_t uc_stack; int __spare__[8]; }; #else /* __i386__ */ -#define ucontext4 ucontext +#define freebsd4_ucontext ucontext #endif /* __i386__ */ #endif /* _KERNEL */ diff --git a/tools/tools/shlib-compat/makesyscalls-fake.sh b/tools/tools/shlib-compat/makesyscalls-fake.sh index 1d073dabb1b7..badf63b45ee5 100755 --- a/tools/tools/shlib-compat/makesyscalls-fake.sh +++ b/tools/tools/shlib-compat/makesyscalls-fake.sh @@ -82,7 +82,7 @@ s/\$//g printf "struct msqid_ds_old;\n" printf "struct shmid_ds_old;\n" # TODO - printf "struct ucontext4;\n" + printf "struct freebsd4_ucontext;\n" printf "struct sctp_sndrcvinfo;\n" printf "\n" } From nobody Mon Nov 22 22:37:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1E255189214B; Mon, 22 Nov 2021 22:37: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 4Hyhwh6B8Jz4XlV; Mon, 22 Nov 2021 22:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F2142D5E; Mon, 22 Nov 2021 22:37: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 1AMMbOQv046714; Mon, 22 Nov 2021 22:37:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbOU4046713; Mon, 22 Nov 2021 22:37:24 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:24 GMT Message-Id: <202111222237.1AMMbOU4046713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 27f5b514a0db - main - syscalls: update a few return types to ssize_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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27f5b514a0db6b0cd0cbb257f36327143932aa87 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=27f5b514a0db6b0cd0cbb257f36327143932aa87 commit 27f5b514a0db6b0cd0cbb257f36327143932aa87 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:54 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:54 +0000 syscalls: update a few return types to ssize_t Reviewed by: kib --- sys/kern/syscalls.master | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 71c96896da2e..e6c65f34ec0a 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -235,21 +235,21 @@ ); } 27 AUE_RECVMSG STD|CAPENABLED { - int recvmsg( + ssize_t recvmsg( int s, _Inout_ struct msghdr *msg, int flags ); } 28 AUE_SENDMSG STD|CAPENABLED { - int sendmsg( + ssize_t sendmsg( int s, _In_ const struct msghdr *msg, int flags ); } 29 AUE_RECVFROM STD|CAPENABLED { - int recvfrom( + ssize_t recvfrom( int s, _Out_writes_bytes_(len) void *buf, size_t len, @@ -841,7 +841,7 @@ ); } 133 AUE_SENDTO STD|CAPENABLED { - int sendto( + ssize_t sendto( int s, _In_reads_bytes_(len) const void *buf, size_t len, From nobody Mon Nov 22 22:37:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 333F218924C7; Mon, 22 Nov 2021 22:37: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 4Hyhwk1Mvsz4XV8; Mon, 22 Nov 2021 22:37:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5998629F2; Mon, 22 Nov 2021 22:37: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 1AMMbPH7046738; Mon, 22 Nov 2021 22:37:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbPfx046737; Mon, 22 Nov 2021 22:37:25 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:25 GMT Message-Id: <202111222237.1AMMbPfx046737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 4b2e1f14805d - main - syscalls: umask returns a mode_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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b2e1f14805d8d6ecdacfd5c4719cc628ca66029 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=4b2e1f14805d8d6ecdacfd5c4719cc628ca66029 commit 4b2e1f14805d8d6ecdacfd5c4719cc628ca66029 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:54 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:54 +0000 syscalls: umask returns a mode_t Reviewed by: kib --- sys/kern/syscalls.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index e6c65f34ec0a..8236985d116a 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -430,7 +430,7 @@ ); } 60 AUE_UMASK STD|CAPENABLED { - int umask( + mode_t umask( mode_t newmask ); } From nobody Mon Nov 22 22:37:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AC08F189216B; Mon, 22 Nov 2021 22:37: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 4Hyhwl157gz4Xld; Mon, 22 Nov 2021 22:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AEC63009; Mon, 22 Nov 2021 22:37: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 1AMMbQmD046762; Mon, 22 Nov 2021 22:37:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbQ1n046761; Mon, 22 Nov 2021 22:37:26 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:26 GMT Message-Id: <202111222237.1AMMbQ1n046761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 00e0a4c0d749 - main - syscalls: abort2 doesn't return so declare as 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00e0a4c0d749563aa9865c302765c2e580e7d485 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=00e0a4c0d749563aa9865c302765c2e580e7d485 commit 00e0a4c0d749563aa9865c302765c2e580e7d485 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:54 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:54 +0000 syscalls: abort2 doesn't return so declare as void Reviewed by: kib --- sys/kern/syscalls.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 8236985d116a..9c1de91aa475 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -2455,7 +2455,7 @@ ); } 463 AUE_NULL STD|CAPENABLED { - int abort2( + void abort2( _In_z_ const char *why, int nargs, _In_reads_(nargs) void **args From nobody Mon Nov 22 22:37:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2D9F3189270A; Mon, 22 Nov 2021 22:37: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 4Hyhwm0tFyz4XRl; Mon, 22 Nov 2021 22:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91CAC2F83; Mon, 22 Nov 2021 22:37: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 1AMMbRXq046791; Mon, 22 Nov 2021 22:37:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbRm8046789; Mon, 22 Nov 2021 22:37:27 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:27 GMT Message-Id: <202111222237.1AMMbRm8046789@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: d3308574392a - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d3308574392a8ac9c2ec64552dd81f5625c0d661 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d3308574392a8ac9c2ec64552dd81f5625c0d661 commit d3308574392a8ac9c2ec64552dd81f5625c0d661 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:54 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:54 +0000 syscalls: regen --- sys/kern/systrace_args.c | 12 ++++++------ sys/sys/sysproto.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 41817ad0e5f7..c71c29cf63dd 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -9238,17 +9238,17 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* recvmsg */ case 27: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* sendmsg */ case 28: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* recvfrom */ case 29: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* accept */ case 30: @@ -9361,7 +9361,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* umask */ case 60: if (ndx == 0 || ndx == 1) - p = "int"; + p = "mode_t"; break; /* chroot */ case 61: @@ -9562,7 +9562,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* sendto */ case 133: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* shutdown */ case 134: @@ -10556,7 +10556,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* abort2 */ case 463: if (ndx == 0 || ndx == 1) - p = "int"; + p = "void"; break; /* thr_set_name */ case 464: diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index bce8ba97de14..49022b50a4f9 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -2476,7 +2476,7 @@ struct freebsd4_sigaction_args { char oact_l_[PADL_(struct sigaction *)]; struct sigaction * oact; char oact_r_[PADR_(struct sigaction *)]; }; struct freebsd4_sigreturn_args { - char sigcntxp_l_[PADL_(const struct ucontext4 *)]; const struct ucontext4 * sigcntxp; char sigcntxp_r_[PADR_(const struct ucontext4 *)]; + char sigcntxp_l_[PADL_(const struct freebsd4_ucontext *)]; const struct freebsd4_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd4_ucontext *)]; }; int freebsd4_getfsstat(struct thread *, struct freebsd4_getfsstat_args *); int freebsd4_statfs(struct thread *, struct freebsd4_statfs_args *); From nobody Mon Nov 22 22:37:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 03E681892553; Mon, 22 Nov 2021 22:37: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 4Hyhwq5h3pz4XbS; Mon, 22 Nov 2021 22:37:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 10CD82D5F; Mon, 22 Nov 2021 22:37: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 1AMMbU5d046864; Mon, 22 Nov 2021 22:37:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbUDN046863; Mon, 22 Nov 2021 22:37:30 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:30 GMT Message-Id: <202111222237.1AMMbUDN046863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e11f2743ff45 - main - freebsd32: [gs]etgroups take an int gidsetsize List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e11f2743ff45bb777bb116b945b3efa601c90369 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e11f2743ff45bb777bb116b945b3efa601c90369 commit e11f2743ff45bb777bb116b945b3efa601c90369 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:55 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:55 +0000 freebsd32: [gs]etgroups take an int gidsetsize Reviewed by: kib --- sys/compat/freebsd32/syscalls.master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 18b58ad91874..cf9f562f88fc 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -187,9 +187,9 @@ 77 AUE_NULL OBSOL vlimit 78 AUE_MINCORE NOPROTO { int mincore(const void *addr, size_t len, \ char *vec); } -79 AUE_GETGROUPS NOPROTO { int getgroups(u_int gidsetsize, \ +79 AUE_GETGROUPS NOPROTO { int getgroups(int gidsetsize, \ gid_t *gidset); } -80 AUE_SETGROUPS NOPROTO { int setgroups(u_int gidsetsize, \ +80 AUE_SETGROUPS NOPROTO { int setgroups(int gidsetsize, \ const gid_t *gidset); } 81 AUE_GETPGRP NOPROTO { int getpgrp(void); } 82 AUE_SETPGRP NOPROTO { int setpgid(int pid, int pgid); } From nobody Mon Nov 22 22:37:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9C1D31892904; Mon, 22 Nov 2021 22: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 4Hyhwv3GG9z4XVh; Mon, 22 Nov 2021 22:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72F1C2D60; Mon, 22 Nov 2021 22:37: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 1AMMbYIn046942; Mon, 22 Nov 2021 22: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 1AMMbYnW046941; Mon, 22 Nov 2021 22:37:34 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:34 GMT Message-Id: <202111222237.1AMMbYnW046941@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6f5eb383bd36 - main - freebsd32: sync some osig* audit flags with default ABI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f5eb383bd36641f77235f6b0fc6b9f64fa21146 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6f5eb383bd36641f77235f6b0fc6b9f64fa21146 commit 6f5eb383bd36641f77235f6b0fc6b9f64fa21146 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:55 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:55 +0000 freebsd32: sync some osig* audit flags with default ABI Discussed with: rwatson Reviewed by: kib --- sys/compat/freebsd32/syscalls.master | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index a05c241976c7..1503a1ad7453 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -241,9 +241,9 @@ 108 AUE_NULL COMPAT { int freebsd32_sigvec(int signum, \ struct sigvec32 *nsv, \ struct sigvec32 *osv); } -109 AUE_O_SIGBLOCK COMPAT|NOPROTO { int sigblock(int mask); } -110 AUE_O_SIGSETMASK COMPAT|NOPROTO { int sigsetmask(int mask); } -111 AUE_SIGSUSPEND COMPAT|NOPROTO { int sigsuspend( int mask); } +109 AUE_NULL COMPAT|NOPROTO { int sigblock(int mask); } +110 AUE_NULL COMPAT|NOPROTO { int sigsetmask(int mask); } +111 AUE_NULL COMPAT|NOPROTO { int sigsuspend( int mask); } 112 AUE_NULL COMPAT { int freebsd32_sigstack( \ struct sigstack32 *nss, \ struct sigstack32 *oss); } From nobody Mon Nov 22 22:37:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4DBDE18927A6; Mon, 22 Nov 2021 22:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyhwp3JVXz4Xgg; Mon, 22 Nov 2021 22:37:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C00D72CAC; Mon, 22 Nov 2021 22:37: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 1AMMbSYl046816; Mon, 22 Nov 2021 22:37:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbS1h046815; Mon, 22 Nov 2021 22:37:28 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:28 GMT Message-Id: <202111222237.1AMMbS1h046815@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 1eacca4397d3 - main - freebsd32: make fcntl's arg argument int32_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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1eacca4397d3ae5ede0c71e3806d56d7f88b1cef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1eacca4397d3ae5ede0c71e3806d56d7f88b1cef commit 1eacca4397d3ae5ede0c71e3806d56d7f88b1cef Author: Brooks Davis AuthorDate: 2021-11-22 22:36:54 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:54 +0000 freebsd32: make fcntl's arg argument int32_t It's a long in the default ABI so this is consistant with other caes. Reviewed by: kib --- sys/compat/freebsd32/syscalls.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 9dd902df04af..a97b8fc12eb4 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -209,7 +209,7 @@ 90 AUE_DUP2 NOPROTO { int dup2(u_int from, u_int to); } 91 AUE_NULL RESERVED 92 AUE_FCNTL STD { int freebsd32_fcntl(int fd, int cmd, \ - int arg); } + int32_t arg); } 93 AUE_SELECT STD { int freebsd32_select(int nd, fd_set *in, \ fd_set *ou, fd_set *ex, \ struct timeval32 *tv); } From nobody Mon Nov 22 22:37:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4C36C1892B03; Mon, 22 Nov 2021 22:37: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 4Hyhwx6pkDz4Y9Z; Mon, 22 Nov 2021 22:37:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A63F02E39; Mon, 22 Nov 2021 22: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 1AMMbZEk046966; Mon, 22 Nov 2021 22:37:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbZOu046965; Mon, 22 Nov 2021 22:37:35 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:35 GMT Message-Id: <202111222237.1AMMbZOu046965@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 2d691434d531 - main - freebsd32: declare ogetsockname correctly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d691434d531316a1ca795efbe68566c992ddfe2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=2d691434d531316a1ca795efbe68566c992ddfe2 commit 2d691434d531316a1ca795efbe68566c992ddfe2 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:55 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:55 +0000 freebsd32: declare ogetsockname correctly Reviewed by: kib --- sys/compat/freebsd32/syscalls.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 1503a1ad7453..26291f52ec32 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -309,7 +309,7 @@ 148 AUE_QUOTACTL NOPROTO { int quotactl(const char *path, int cmd, \ int uid, void *arg); } 149 AUE_O_QUOTA COMPAT|NOPROTO { int quota(void); } -150 AUE_GETSOCKNAME COMPAT|NOPROTO getsockname +150 AUE_GETSOCKNAME COMPAT|NOPROTO { int getsockname(int fdec, struct sockaddr *asa, __socklen_t *alen); } getsockname getsockname_args int 151 AUE_NULL RESERVED 152 AUE_NULL RESERVED From nobody Mon Nov 22 22:37:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E2F531892827; Mon, 22 Nov 2021 22: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 4Hyhwt2GLRz4Xm4; Mon, 22 Nov 2021 22:37:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50E0A2EF0; Mon, 22 Nov 2021 22: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 1AMMbXKd046914; Mon, 22 Nov 2021 22: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 1AMMbXjV046913; Mon, 22 Nov 2021 22:37:33 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:33 GMT Message-Id: <202111222237.1AMMbXjV046913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 802280ada847 - main - freebsd32: sctp syscalls take struct iovec32 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 802280ada8479111d8b959fe255b1def4ae5afa5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=802280ada8479111d8b959fe255b1def4ae5afa5 commit 802280ada8479111d8b959fe255b1def4ae5afa5 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:55 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:55 +0000 freebsd32: sctp syscalls take struct iovec32 Reviewed by: kib --- sys/compat/freebsd32/syscalls.master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 2afc453783cf..a05c241976c7 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -887,10 +887,10 @@ int sd, void *msg, int mlen, \ const struct sockaddr *to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } -473 AUE_SCTP_GENERIC_SENDMSG_IOV NOPROTO|NOSTD { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ +473 AUE_SCTP_GENERIC_SENDMSG_IOV NOPROTO|NOSTD { int sctp_generic_sendmsg_iov(int sd, struct iovec32 *iov, int iovlen, \ const struct sockaddr *to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } -474 AUE_SCTP_GENERIC_RECVMSG NOPROTO|NOSTD { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ +474 AUE_SCTP_GENERIC_RECVMSG NOPROTO|NOSTD { int sctp_generic_recvmsg(int sd, struct iovec32 *iov, int iovlen, \ struct sockaddr * from, __socklen_t *fromlenaddr, \ struct sctp_sndrcvinfo *sinfo, int *msg_flags); } #ifdef PAD64_REQUIRED From nobody Mon Nov 22 22:37:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6F3CA18927B4; Mon, 22 Nov 2021 22:37: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 4Hyhwr64Gbz4Xgs; Mon, 22 Nov 2021 22:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D57C2E38; Mon, 22 Nov 2021 22:37: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 1AMMbWJA046888; Mon, 22 Nov 2021 22:37:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbWMN046887; Mon, 22 Nov 2021 22:37:32 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:32 GMT Message-Id: <202111222237.1AMMbWMN046887@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 06759303ec0f - main - freebsd32: aio_cancel takes a struct aiocb32 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06759303ec0fbb80aef3225f454a4bdef37b5304 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=06759303ec0fbb80aef3225f454a4bdef37b5304 commit 06759303ec0fbb80aef3225f454a4bdef37b5304 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:55 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:55 +0000 freebsd32: aio_cancel takes a struct aiocb32 Strictly speaking, it takes a virtual address and doesn't touch the object directly, but this is consistant with other aio_*() syscalls. Reviewed by: kib --- sys/compat/freebsd32/freebsd32_systrace_args.c | 4 ++-- sys/compat/freebsd32/syscalls.master | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index fb52e939ef79..23af58fe1ffa 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1481,7 +1481,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 316: { struct aio_cancel_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->aiocbp; /* struct aiocb * */ + uarg[1] = (intptr_t)p->aiocbp; /* struct aiocb32 * */ *n_args = 2; break; } @@ -5816,7 +5816,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct aiocb *"; + p = "userland struct aiocb32 *"; break; default: break; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index cf9f562f88fc..2afc453783cf 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -598,7 +598,7 @@ uint32_t * aiocbp, int nent, \ const struct timespec32 *timeout); } 316 AUE_AIO_CANCEL NOPROTO { int aio_cancel(int fd, \ - struct aiocb *aiocbp); } + struct aiocb32 *aiocbp); } 317 AUE_AIO_ERROR STD { int freebsd32_aio_error( \ struct aiocb32 *aiocbp); } 318 AUE_AIO_READ COMPAT6 { int freebsd32_aio_read( \ From nobody Mon Nov 22 22:37:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4DE3418927A7; Mon, 22 Nov 2021 22:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyhwp6n6bz4XYC; Mon, 22 Nov 2021 22:37:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD34C300A; Mon, 22 Nov 2021 22:37: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 1AMMbTYv046840; Mon, 22 Nov 2021 22:37:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbTf3046839; Mon, 22 Nov 2021 22:37:29 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:29 GMT Message-Id: <202111222237.1AMMbTf3046839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e54a870e358e - main - freebsd32: make semsys take int 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e54a870e358e4891875e80a696a6fa0bca136902 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e54a870e358e4891875e80a696a6fa0bca136902 commit e54a870e358e4891875e80a696a6fa0bca136902 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:54 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:54 +0000 freebsd32: make semsys take int arguments This matches the default ABI. Reviewed by: kib --- sys/compat/freebsd32/syscalls.master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index a97b8fc12eb4..18b58ad91874 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -343,8 +343,8 @@ int a3, int a4, int a5); } 170 AUE_MSGSYS NOSTD { int freebsd32_msgsys(int which, int a2, \ int a3, int a4, int a5, int a6); } -171 AUE_SHMSYS NOSTD { int freebsd32_shmsys(uint32_t which, uint32_t a2, \ - uint32_t a3, uint32_t a4); } +171 AUE_SHMSYS NOSTD { int freebsd32_shmsys(int which, int a2, \ + int a3, int a4); } 172 AUE_NULL RESERVED 173 AUE_PREAD COMPAT6 { ssize_t freebsd32_pread(int fd, void *buf, \ size_t nbyte, int pad, \ From nobody Mon Nov 22 22:37:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B4F701892B8C; Mon, 22 Nov 2021 22:37: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 4Hyhwy6pN3z4XmK; Mon, 22 Nov 2021 22:37:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DBE4B2E3A; Mon, 22 Nov 2021 22: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 1AMMbbJM047014; Mon, 22 Nov 2021 22: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 1AMMbbNG047013; Mon, 22 Nov 2021 22:37:37 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:37 GMT Message-Id: <202111222237.1AMMbbNG047013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 151ddfec6f82 - main - freebsd32: add _'s to _umtx_(un)lock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 151ddfec6f8211b1c9614be8a183606849a5c3a6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=151ddfec6f8211b1c9614be8a183606849a5c3a6 commit 151ddfec6f8211b1c9614be8a183606849a5c3a6 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:55 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:55 +0000 freebsd32: add _'s to _umtx_(un)lock This aligns with the default ABI's configuration. Reviewed by: kib --- sys/compat/freebsd32/syscalls.master | 4 ++-- sys/kern/kern_umtx.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 839372f5cdcd..2e11fdb03a17 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -811,9 +811,9 @@ 431 AUE_THR_EXIT NOPROTO { void thr_exit(int32_t *state); } 432 AUE_NULL NOPROTO { int thr_self(int32_t *id); } 433 AUE_THR_KILL NOPROTO { int thr_kill(int32_t id, int sig); } -434 AUE_NULL COMPAT10 { int freebsd32_umtx_lock( \ +434 AUE_NULL COMPAT10 { int freebsd32__umtx_lock( \ struct umtx *umtx); } -435 AUE_NULL COMPAT10 { int freebsd32_umtx_unlock( \ +435 AUE_NULL COMPAT10 { int freebsd32__umtx_unlock( \ struct umtx *umtx); } 436 AUE_JAIL_ATTACH NOPROTO { int jail_attach(int jid); } 437 AUE_EXTATTR_LIST_FD NOPROTO { ssize_t extattr_list_fd(int fd, \ diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 5e3ab095facc..97673ed77e11 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -4856,15 +4856,15 @@ sys__umtx_op(struct thread *td, struct _umtx_op_args *uap) #ifdef COMPAT_FREEBSD32 #ifdef COMPAT_FREEBSD10 int -freebsd10_freebsd32_umtx_lock(struct thread *td, - struct freebsd10_freebsd32_umtx_lock_args *uap) +freebsd10_freebsd32__umtx_lock(struct thread *td, + struct freebsd10_freebsd32__umtx_lock_args *uap) { return (do_lock_umtx32(td, (uint32_t *)uap->umtx, td->td_tid, NULL)); } int -freebsd10_freebsd32_umtx_unlock(struct thread *td, - struct freebsd10_freebsd32_umtx_unlock_args *uap) +freebsd10_freebsd32__umtx_unlock(struct thread *td, + struct freebsd10_freebsd32__umtx_unlock_args *uap) { return (do_unlock_umtx32(td, (uint32_t *)uap->umtx, td->td_tid)); } From nobody Mon Nov 22 22:37:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7DB411892C32; Mon, 22 Nov 2021 22:37:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyhx13BrFz4YP0; Mon, 22 Nov 2021 22:37:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2634D2EF2; Mon, 22 Nov 2021 22:37: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 1AMMbeLG047068; Mon, 22 Nov 2021 22:37:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbe8B047067; Mon, 22 Nov 2021 22:37:40 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:40 GMT Message-Id: <202111222237.1AMMbe8B047067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6eefabd4ca40 - main - syscalls: improve nstat, nfstat, nlstat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6eefabd4ca40348f0bc0ab829bceb3a308e577b7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6eefabd4ca40348f0bc0ab829bceb3a308e577b7 commit 6eefabd4ca40348f0bc0ab829bceb3a308e577b7 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:56 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:56 +0000 syscalls: improve nstat, nfstat, nlstat Optionally return errors when truncating dev_t, ino_t, and nlink_t. In the interest of code reuse, use freebsd11_cvtstat() to perform the truncation and error handling and then convert the resulting struct freebsd11_stat to struct nstat. Add missing freebsd32 compat syscalls. These syscalls require translation because struct nstat contains four instances of struct timespec which in turn contains a time_t and a long. Reviewed by: kib --- sys/compat/freebsd32/freebsd32.h | 25 ++++++++++ sys/compat/freebsd32/freebsd32_misc.c | 87 +++++++++++++++++++++++++++++++++++ sys/compat/freebsd32/syscalls.master | 10 ++-- sys/kern/kern_descrip.c | 7 +-- sys/kern/vfs_syscalls.c | 56 +++++++++++++--------- sys/sys/vnode.h | 2 +- 6 files changed, 157 insertions(+), 30 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index e5bb253aef78..4d5cea688a21 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -167,6 +167,31 @@ struct ostatfs32 { int32_t f_spare[2]; }; +struct nstat32 { + __uint32_t st_dev; /* inode's device */ + __uint32_t st_ino; /* inode's number */ + __uint32_t st_mode; /* inode protection mode */ + __uint32_t st_nlink; /* number of hard links */ + uid_t st_uid; /* user ID of the file's owner */ + gid_t st_gid; /* group ID of the file's group */ + __uint32_t st_rdev; /* device type */ + struct timespec32 st_atim; /* time of last access */ + struct timespec32 st_mtim; /* time of last data modification */ + struct timespec32 st_ctim; /* time of last file status change */ + off_t st_size; /* file size, in bytes */ + blkcnt_t st_blocks; /* blocks allocated for file */ + blksize_t st_blksize; /* optimal blocksize for I/O */ + fflags_t st_flags; /* user defined flags for file */ + __uint32_t st_gen; /* file generation number */ + struct timespec32 st_birthtim; /* time of file creation */ + /* + * See comment in the definition of struct freebsd11_stat + * in sys/stat.h about the following padding. + */ + unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec32)); + unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec32)); +}; + struct iovec32 { u_int32_t iov_base; int iov_len; diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 69ae3a1cd85d..e81148d3577c 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2473,6 +2473,93 @@ freebsd11_freebsd32_fhstat(struct thread *td, error = copyout(&sb32, uap->sb, sizeof (sb32)); return (error); } + +static int +freebsd11_cvtnstat32(struct stat *sb, struct nstat32 *nsb32) +{ + struct nstat nsb; + int error; + + error = freebsd11_cvtnstat(sb, &nsb); + if (error != 0) + return (error); + + bzero(nsb32, sizeof(*nsb32)); + CP(nsb, *nsb32, st_dev); + CP(nsb, *nsb32, st_ino); + CP(nsb, *nsb32, st_mode); + CP(nsb, *nsb32, st_nlink); + CP(nsb, *nsb32, st_uid); + CP(nsb, *nsb32, st_gid); + CP(nsb, *nsb32, st_rdev); + CP(nsb, *nsb32, st_atim.tv_sec); + CP(nsb, *nsb32, st_atim.tv_nsec); + CP(nsb, *nsb32, st_mtim.tv_sec); + CP(nsb, *nsb32, st_mtim.tv_nsec); + CP(nsb, *nsb32, st_ctim.tv_sec); + CP(nsb, *nsb32, st_ctim.tv_nsec); + CP(nsb, *nsb32, st_size); + CP(nsb, *nsb32, st_blocks); + CP(nsb, *nsb32, st_blksize); + CP(nsb, *nsb32, st_flags); + CP(nsb, *nsb32, st_gen); + CP(nsb, *nsb32, st_birthtim.tv_sec); + CP(nsb, *nsb32, st_birthtim.tv_nsec); + return (0); +} + +int +freebsd11_freebsd32_nstat(struct thread *td, + struct freebsd11_freebsd32_nstat_args *uap) +{ + struct stat sb; + struct nstat32 nsb; + int error; + + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, + &sb, NULL); + if (error != 0) + return (error); + error = freebsd11_cvtnstat32(&sb, &nsb); + if (error != 0) + error = copyout(&nsb, uap->ub, sizeof (nsb)); + return (error); +} + +int +freebsd11_freebsd32_nlstat(struct thread *td, + struct freebsd11_freebsd32_nlstat_args *uap) +{ + struct stat sb; + struct nstat32 nsb; + int error; + + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, + UIO_USERSPACE, &sb, NULL); + if (error != 0) + return (error); + error = freebsd11_cvtnstat32(&sb, &nsb); + if (error == 0) + error = copyout(&nsb, uap->ub, sizeof (nsb)); + return (error); +} + +int +freebsd11_freebsd32_nfstat(struct thread *td, + struct freebsd11_freebsd32_nfstat_args *uap) +{ + struct nstat32 nub; + struct stat ub; + int error; + + error = kern_fstat(td, uap->fd, &ub); + if (error != 0) + return (error); + error = freebsd11_cvtnstat32(&ub, &nub); + if (error == 0) + error = copyout(&nub, uap->sb, sizeof(nub)); + return (error); +} #endif int diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 2e11fdb03a17..4fd7b2235d99 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -525,11 +525,11 @@ 276 AUE_LUTIMES STD { int freebsd32_lutimes(const char *path, \ const struct timeval32 *tptr); } 277 AUE_NULL OBSOL netbsd_msync -278 AUE_STAT COMPAT11|NOPROTO { int nstat(const char *path, \ - struct nstat *ub); } -279 AUE_FSTAT COMPAT11|NOPROTO { int nfstat(int fd, struct nstat *sb); } -280 AUE_LSTAT COMPAT11|NOPROTO { int nlstat(const char *path, \ - struct nstat *ub); } +278 AUE_STAT COMPAT11 { int freebsd32_nstat(const char *path, \ + struct nstat32 *ub); } +279 AUE_FSTAT COMPAT11 { int freebsd32_nfstat(int fd, struct nstat32 *sb); } +280 AUE_LSTAT COMPAT11 { int freebsd32_nlstat(const char *path, \ + struct nstat32 *ub); } 281 AUE_NULL RESERVED 282 AUE_NULL RESERVED 283 AUE_NULL RESERVED diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 37d978e96de5..37fec097dcfc 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1561,10 +1561,11 @@ freebsd11_nfstat(struct thread *td, struct freebsd11_nfstat_args *uap) int error; error = kern_fstat(td, uap->fd, &ub); - if (error == 0) { - freebsd11_cvtnstat(&ub, &nub); + if (error != 0) + return (error); + error = freebsd11_cvtnstat(&ub, &nub); + if (error != 0) error = copyout(&nub, uap->sb, sizeof(nub)); - } return (error); } #endif /* COMPAT_FREEBSD11 */ diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 1cffe903aef3..4391853337bd 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -44,6 +44,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef COMPAT_FREEBSD11 +#include +#endif #include #include #include @@ -2475,27 +2478,34 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, /* * Implementation of the NetBSD [l]stat() functions. */ -void +int freebsd11_cvtnstat(struct stat *sb, struct nstat *nsb) { + struct freebsd11_stat sb11; + int error; + + error = freebsd11_cvtstat(sb, &sb11); + if (error != 0) + return (error); bzero(nsb, sizeof(*nsb)); - nsb->st_dev = sb->st_dev; - nsb->st_ino = sb->st_ino; - nsb->st_mode = sb->st_mode; - nsb->st_nlink = sb->st_nlink; - nsb->st_uid = sb->st_uid; - nsb->st_gid = sb->st_gid; - nsb->st_rdev = sb->st_rdev; - nsb->st_atim = sb->st_atim; - nsb->st_mtim = sb->st_mtim; - nsb->st_ctim = sb->st_ctim; - nsb->st_size = sb->st_size; - nsb->st_blocks = sb->st_blocks; - nsb->st_blksize = sb->st_blksize; - nsb->st_flags = sb->st_flags; - nsb->st_gen = sb->st_gen; - nsb->st_birthtim = sb->st_birthtim; + CP(sb11, *nsb, st_dev); + CP(sb11, *nsb, st_ino); + CP(sb11, *nsb, st_mode); + CP(sb11, *nsb, st_nlink); + CP(sb11, *nsb, st_uid); + CP(sb11, *nsb, st_gid); + CP(sb11, *nsb, st_rdev); + CP(sb11, *nsb, st_atim); + CP(sb11, *nsb, st_mtim); + CP(sb11, *nsb, st_ctim); + CP(sb11, *nsb, st_size); + CP(sb11, *nsb, st_blocks); + CP(sb11, *nsb, st_blksize); + CP(sb11, *nsb, st_flags); + CP(sb11, *nsb, st_gen); + CP(sb11, *nsb, st_birthtim); + return (0); } #ifndef _SYS_SYSPROTO_H_ @@ -2515,8 +2525,10 @@ freebsd11_nstat(struct thread *td, struct freebsd11_nstat_args *uap) &sb, NULL); if (error != 0) return (error); - freebsd11_cvtnstat(&sb, &nsb); - return (copyout(&nsb, uap->ub, sizeof (nsb))); + error = freebsd11_cvtnstat(&sb, &nsb); + if (error == 0) + error = copyout(&nsb, uap->ub, sizeof (nsb)); + return (error); } /* @@ -2539,8 +2551,10 @@ freebsd11_nlstat(struct thread *td, struct freebsd11_nlstat_args *uap) UIO_USERSPACE, &sb, NULL); if (error != 0) return (error); - freebsd11_cvtnstat(&sb, &nsb); - return (copyout(&nsb, uap->ub, sizeof (nsb))); + error = freebsd11_cvtnstat(&sb, &nsb); + if (error == 0) + error = copyout(&nsb, uap->ub, sizeof (nsb)); + return (error); } #endif /* COMPAT_FREEBSD11 */ diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 1a202abfd4dd..3d04b6f68784 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -682,7 +682,7 @@ cache_validate(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) void cache_fast_lookup_enabled_recalc(void); int change_dir(struct vnode *vp, struct thread *td); void cvtstat(struct stat *st, struct ostat *ost); -void freebsd11_cvtnstat(struct stat *sb, struct nstat *nsb); +int freebsd11_cvtnstat(struct stat *sb, struct nstat *nsb); int freebsd11_cvtstat(struct stat *st, struct freebsd11_stat *ost); int getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops, struct vnode **vpp); From nobody Mon Nov 22 22:37:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 547FE18926D5; Mon, 22 Nov 2021 22:37: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 4Hyhwx6RVlz4Y9N; Mon, 22 Nov 2021 22:37:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3F6B2F84; Mon, 22 Nov 2021 22: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 1AMMbaJ9046990; Mon, 22 Nov 2021 22: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 1AMMba44046989; Mon, 22 Nov 2021 22:37:36 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:36 GMT Message-Id: <202111222237.1AMMba44046989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: b2be098e5216 - main - freebsd32: enable orecvfrom List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2be098e52160177ff394e72d5709ce5986436de Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b2be098e52160177ff394e72d5709ce5986436de commit b2be098e52160177ff394e72d5709ce5986436de Author: Brooks Davis AuthorDate: 2021-11-22 22:36:55 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:55 +0000 freebsd32: enable orecvfrom It requires no translation, just a correct decleration. Reviewed by: kib --- sys/compat/freebsd32/syscalls.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 26291f52ec32..839372f5cdcd 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -269,7 +269,7 @@ const struct timezone *tzp); } 123 AUE_FCHOWN NOPROTO { int fchown(int fd, int uid, int gid); } 124 AUE_FCHMOD NOPROTO { int fchmod(int fd, mode_t mode); } -125 AUE_RECVFROM OBSOL orecvfrom +125 AUE_RECVFROM COMPAT|NOPROTO { int recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, __socklen_t *fromlenaddr); } recvfrom recvfrom_args int 126 AUE_SETREUID NOPROTO { int setreuid(int ruid, int euid); } 127 AUE_SETREGID NOPROTO { int setregid(int rgid, int egid); } 128 AUE_RENAME NOPROTO { int rename(const char *from, \ From nobody Mon Nov 22 22:37:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 502DB1892970; Mon, 22 Nov 2021 22: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 4Hyhx31w7Sz4YLZ; Mon, 22 Nov 2021 22:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BCAF300B; Mon, 22 Nov 2021 22:37: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 1AMMbgde047116; Mon, 22 Nov 2021 22:37:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbgME047115; Mon, 22 Nov 2021 22:37:42 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:42 GMT Message-Id: <202111222237.1AMMbgME047115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 97fdcfcaf799 - main - freebsd32: remove unnecessicary headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97fdcfcaf7990edbfb7f8048403005189d4a7cb5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=97fdcfcaf7990edbfb7f8048403005189d4a7cb5 commit 97fdcfcaf7990edbfb7f8048403005189d4a7cb5 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:56 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:56 +0000 freebsd32: remove unnecessicary headers Reviewed by: kib --- sys/compat/freebsd32/freebsd32_sysent.c | 3 --- sys/compat/freebsd32/syscalls.master | 3 --- 2 files changed, 6 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 7c355814e563..3143cccbb3f5 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -8,9 +8,6 @@ #include #include #include -#include -#include -#include #include #define AS(name) (sizeof(struct name) / sizeof(register_t)) diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 4fd7b2235d99..96708924c394 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -50,9 +50,6 @@ #include #include #include -#include -#include -#include #include #if !defined(PAD64_REQUIRED) && !defined(__amd64__) From nobody Mon Nov 22 22:37:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6FCBE189294C; Mon, 22 Nov 2021 22:37:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyhwz5DlVz4YBF; Mon, 22 Nov 2021 22:37:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC2532EF1; Mon, 22 Nov 2021 22:37: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 1AMMbc2G047040; Mon, 22 Nov 2021 22:37:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbcMr047039; Mon, 22 Nov 2021 22:37:38 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:38 GMT Message-Id: <202111222237.1AMMbcMr047039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8460d3e9e6cb - main - freebsd32: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8460d3e9e6cbc78f4ae363b7894d765189b2ad44 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8460d3e9e6cbc78f4ae363b7894d765189b2ad44 commit 8460d3e9e6cbc78f4ae363b7894d765189b2ad44 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:55 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:55 +0000 freebsd32: regen --- sys/compat/freebsd32/freebsd32_proto.h | 22 ++++++++-------- sys/compat/freebsd32/freebsd32_syscall.h | 6 ++--- sys/compat/freebsd32/freebsd32_syscalls.c | 6 ++--- sys/compat/freebsd32/freebsd32_sysent.c | 14 +++++----- sys/compat/freebsd32/freebsd32_systrace_args.c | 36 +++++++++++++------------- 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 9e95d74621da..1a7a8fe933e6 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -90,7 +90,7 @@ struct freebsd32_getitimer_args { struct freebsd32_fcntl_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char arg_l_[PADL_(int)]; int arg; char arg_r_[PADR_(int)]; + char arg_l_[PADL_(int32_t)]; int32_t arg; char arg_r_[PADR_(int32_t)]; }; struct freebsd32_select_args { char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)]; @@ -149,10 +149,10 @@ struct freebsd32_msgsys_args { char a6_l_[PADL_(int)]; int a6; char a6_r_[PADR_(int)]; }; struct freebsd32_shmsys_args { - char which_l_[PADL_(uint32_t)]; uint32_t which; char which_r_[PADR_(uint32_t)]; - char a2_l_[PADL_(uint32_t)]; uint32_t a2; char a2_r_[PADR_(uint32_t)]; - char a3_l_[PADL_(uint32_t)]; uint32_t a3; char a3_r_[PADR_(uint32_t)]; - char a4_l_[PADL_(uint32_t)]; uint32_t a4; char a4_r_[PADR_(uint32_t)]; + char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)]; + char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)]; + char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)]; + char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)]; }; struct freebsd32_ntp_adjtime_args { char tp_l_[PADL_(struct timex32 *)]; struct timex32 * tp; char tp_r_[PADR_(struct timex32 *)]; @@ -1250,10 +1250,10 @@ int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_ #ifdef PAD64_REQUIRED #else #endif -struct freebsd10_freebsd32_umtx_lock_args { +struct freebsd10_freebsd32__umtx_lock_args { char umtx_l_[PADL_(struct umtx *)]; struct umtx * umtx; char umtx_r_[PADR_(struct umtx *)]; }; -struct freebsd10_freebsd32_umtx_unlock_args { +struct freebsd10_freebsd32__umtx_unlock_args { char umtx_l_[PADL_(struct umtx *)]; struct umtx * umtx; char umtx_r_[PADR_(struct umtx *)]; }; #ifdef PAD64_REQUIRED @@ -1271,8 +1271,8 @@ struct freebsd10_freebsd32_umtx_unlock_args { #ifdef PAD64_REQUIRED #else #endif -int freebsd10_freebsd32_umtx_lock(struct thread *, struct freebsd10_freebsd32_umtx_lock_args *); -int freebsd10_freebsd32_umtx_unlock(struct thread *, struct freebsd10_freebsd32_umtx_unlock_args *); +int freebsd10_freebsd32__umtx_lock(struct thread *, struct freebsd10_freebsd32__umtx_lock_args *); +int freebsd10_freebsd32__umtx_unlock(struct thread *, struct freebsd10_freebsd32__umtx_unlock_args *); #endif /* COMPAT_FREEBSD10 */ @@ -1486,8 +1486,8 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_getcontext AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_setcontext AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_swapcontext AUE_NULL -#define FREEBSD32_SYS_AUE_freebsd10_freebsd32_umtx_lock AUE_NULL -#define FREEBSD32_SYS_AUE_freebsd10_freebsd32_umtx_unlock AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd10_freebsd32__umtx_lock AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd10_freebsd32__umtx_unlock AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_ksem_timedwait AUE_SEMWAIT #define FREEBSD32_SYS_AUE_freebsd32_thr_suspend AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32__umtx_op AUE_NULL diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index ac9f042c3061..38ccc95b9d89 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -127,7 +127,7 @@ #define FREEBSD32_SYS_freebsd32_settimeofday 122 #define FREEBSD32_SYS_fchown 123 #define FREEBSD32_SYS_fchmod 124 - /* 125 is obsolete orecvfrom */ + /* 125 is old recvfrom */ #define FREEBSD32_SYS_setreuid 126 #define FREEBSD32_SYS_setregid 127 #define FREEBSD32_SYS_rename 128 @@ -359,8 +359,8 @@ #define FREEBSD32_SYS_thr_exit 431 #define FREEBSD32_SYS_thr_self 432 #define FREEBSD32_SYS_thr_kill 433 -#define FREEBSD32_SYS_freebsd10_freebsd32_umtx_lock 434 -#define FREEBSD32_SYS_freebsd10_freebsd32_umtx_unlock 435 +#define FREEBSD32_SYS_freebsd10_freebsd32__umtx_lock 434 +#define FREEBSD32_SYS_freebsd10_freebsd32__umtx_unlock 435 #define FREEBSD32_SYS_jail_attach 436 #define FREEBSD32_SYS_extattr_list_fd 437 #define FREEBSD32_SYS_extattr_list_file 438 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 95153d6a94b5..fa7e58f91bfb 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -134,7 +134,7 @@ const char *freebsd32_syscallnames[] = { "freebsd32_settimeofday", /* 122 = freebsd32_settimeofday */ "fchown", /* 123 = fchown */ "fchmod", /* 124 = fchmod */ - "obs_orecvfrom", /* 125 = obsolete orecvfrom */ + "compat.recvfrom", /* 125 = old recvfrom */ "setreuid", /* 126 = setreuid */ "setregid", /* 127 = setregid */ "rename", /* 128 = rename */ @@ -448,8 +448,8 @@ const char *freebsd32_syscallnames[] = { "thr_exit", /* 431 = thr_exit */ "thr_self", /* 432 = thr_self */ "thr_kill", /* 433 = thr_kill */ - "compat10.freebsd32_umtx_lock", /* 434 = freebsd10 freebsd32_umtx_lock */ - "compat10.freebsd32_umtx_unlock", /* 435 = freebsd10 freebsd32_umtx_unlock */ + "compat10.freebsd32__umtx_lock", /* 434 = freebsd10 freebsd32__umtx_lock */ + "compat10.freebsd32__umtx_unlock", /* 435 = freebsd10 freebsd32__umtx_unlock */ "jail_attach", /* 436 = jail_attach */ "extattr_list_fd", /* 437 = extattr_list_fd */ "extattr_list_file", /* 438 = extattr_list_file */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 69457336de93..0a93641f7f16 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -171,9 +171,9 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(listen_args), .sy_call = (sy_call_t *)sys_listen, .sy_auevent = AUE_LISTEN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 106 = listen */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 107 = obsolete vtimes */ { compat(AS(ofreebsd32_sigvec_args),freebsd32_sigvec), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 108 = old freebsd32_sigvec */ - { compat(AS(osigblock_args),sigblock), .sy_auevent = AUE_O_SIGBLOCK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 109 = old sigblock */ - { compat(AS(osigsetmask_args),sigsetmask), .sy_auevent = AUE_O_SIGSETMASK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 110 = old sigsetmask */ - { compat(AS(osigsuspend_args),sigsuspend), .sy_auevent = AUE_SIGSUSPEND, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 111 = old sigsuspend */ + { compat(AS(osigblock_args),sigblock), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 109 = old sigblock */ + { compat(AS(osigsetmask_args),sigsetmask), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 110 = old sigsetmask */ + { compat(AS(osigsuspend_args),sigsuspend), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 111 = old sigsuspend */ { compat(AS(ofreebsd32_sigstack_args),freebsd32_sigstack), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 112 = old freebsd32_sigstack */ { compat(AS(ofreebsd32_recvmsg_args),freebsd32_recvmsg), .sy_auevent = AUE_RECVMSG, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 113 = old freebsd32_recvmsg */ { compat(AS(ofreebsd32_sendmsg_args),freebsd32_sendmsg), .sy_auevent = AUE_SENDMSG, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 114 = old freebsd32_sendmsg */ @@ -187,7 +187,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_settimeofday_args), .sy_call = (sy_call_t *)freebsd32_settimeofday, .sy_auevent = AUE_SETTIMEOFDAY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 122 = freebsd32_settimeofday */ { .sy_narg = AS(fchown_args), .sy_call = (sy_call_t *)sys_fchown, .sy_auevent = AUE_FCHOWN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 123 = fchown */ { .sy_narg = AS(fchmod_args), .sy_call = (sy_call_t *)sys_fchmod, .sy_auevent = AUE_FCHMOD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 124 = fchmod */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 125 = obsolete orecvfrom */ + { compat(AS(recvfrom_args),recvfrom), .sy_auevent = AUE_RECVFROM, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 125 = old recvfrom */ { .sy_narg = AS(setreuid_args), .sy_call = (sy_call_t *)sys_setreuid, .sy_auevent = AUE_SETREUID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 126 = setreuid */ { .sy_narg = AS(setregid_args), .sy_call = (sy_call_t *)sys_setregid, .sy_auevent = AUE_SETREGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 127 = setregid */ { .sy_narg = AS(rename_args), .sy_call = (sy_call_t *)sys_rename, .sy_auevent = AUE_RENAME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 128 = rename */ @@ -212,7 +212,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)sys_setsid, .sy_auevent = AUE_SETSID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 147 = setsid */ { .sy_narg = AS(quotactl_args), .sy_call = (sy_call_t *)sys_quotactl, .sy_auevent = AUE_QUOTACTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 148 = quotactl */ { compat(0,quota), .sy_auevent = AUE_O_QUOTA, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 149 = old quota */ - { compat(0,getsockname), .sy_auevent = AUE_GETSOCKNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 150 = old getsockname */ + { compat(AS(getsockname_args),getsockname), .sy_auevent = AUE_GETSOCKNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 150 = old getsockname */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 151 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 152 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 153 = reserved for local use */ @@ -501,8 +501,8 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(thr_exit_args), .sy_call = (sy_call_t *)sys_thr_exit, .sy_auevent = AUE_THR_EXIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 431 = thr_exit */ { .sy_narg = AS(thr_self_args), .sy_call = (sy_call_t *)sys_thr_self, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 432 = thr_self */ { .sy_narg = AS(thr_kill_args), .sy_call = (sy_call_t *)sys_thr_kill, .sy_auevent = AUE_THR_KILL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 433 = thr_kill */ - { compat10(AS(freebsd10_freebsd32_umtx_lock_args),freebsd32_umtx_lock), .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = freebsd10 freebsd32_umtx_lock */ - { compat10(AS(freebsd10_freebsd32_umtx_unlock_args),freebsd32_umtx_unlock), .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = freebsd10 freebsd32_umtx_unlock */ + { compat10(AS(freebsd10_freebsd32__umtx_lock_args),freebsd32__umtx_lock), .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = freebsd10 freebsd32__umtx_lock */ + { compat10(AS(freebsd10_freebsd32__umtx_unlock_args),freebsd32__umtx_unlock), .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = freebsd10 freebsd32__umtx_unlock */ { .sy_narg = AS(jail_attach_args), .sy_call = (sy_call_t *)sys_jail_attach, .sy_auevent = AUE_JAIL_ATTACH, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = jail_attach */ { .sy_narg = AS(extattr_list_fd_args), .sy_call = (sy_call_t *)sys_extattr_list_fd, .sy_auevent = AUE_EXTATTR_LIST_FD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 437 = extattr_list_fd */ { .sy_narg = AS(extattr_list_file_args), .sy_call = (sy_call_t *)sys_extattr_list_file, .sy_auevent = AUE_EXTATTR_LIST_FILE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 438 = extattr_list_file */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 23af58fe1ffa..d23213b5cb8b 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -473,7 +473,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* getgroups */ case 79: { struct getgroups_args *p = params; - uarg[0] = p->gidsetsize; /* u_int */ + iarg[0] = p->gidsetsize; /* int */ uarg[1] = (intptr_t)p->gidset; /* gid_t * */ *n_args = 2; break; @@ -481,7 +481,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* setgroups */ case 80: { struct setgroups_args *p = params; - uarg[0] = p->gidsetsize; /* u_int */ + iarg[0] = p->gidsetsize; /* int */ uarg[1] = (intptr_t)p->gidset; /* const gid_t * */ *n_args = 2; break; @@ -541,7 +541,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct freebsd32_fcntl_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->cmd; /* int */ - iarg[2] = p->arg; /* int */ + iarg[2] = p->arg; /* int32_t */ *n_args = 3; break; } @@ -863,10 +863,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_shmsys */ case 171: { struct freebsd32_shmsys_args *p = params; - uarg[0] = p->which; /* uint32_t */ - uarg[1] = p->a2; /* uint32_t */ - uarg[2] = p->a3; /* uint32_t */ - uarg[3] = p->a4; /* uint32_t */ + iarg[0] = p->which; /* int */ + iarg[1] = p->a2; /* int */ + iarg[2] = p->a3; /* int */ + iarg[3] = p->a4; /* int */ *n_args = 4; break; } @@ -2357,7 +2357,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 473: { struct sctp_generic_sendmsg_iov_args *p = params; iarg[0] = p->sd; /* int */ - uarg[1] = (intptr_t)p->iov; /* struct iovec * */ + uarg[1] = (intptr_t)p->iov; /* struct iovec32 * */ iarg[2] = p->iovlen; /* int */ uarg[3] = (intptr_t)p->to; /* const struct sockaddr * */ iarg[4] = p->tolen; /* __socklen_t */ @@ -2370,7 +2370,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 474: { struct sctp_generic_recvmsg_args *p = params; iarg[0] = p->sd; /* int */ - uarg[1] = (intptr_t)p->iov; /* struct iovec * */ + uarg[1] = (intptr_t)p->iov; /* struct iovec32 * */ iarg[2] = p->iovlen; /* int */ uarg[3] = (intptr_t)p->from; /* struct sockaddr * */ uarg[4] = (intptr_t)p->fromlenaddr; /* __socklen_t * */ @@ -4188,7 +4188,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 79: switch (ndx) { case 0: - p = "u_int"; + p = "int"; break; case 1: p = "userland gid_t *"; @@ -4201,7 +4201,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 80: switch (ndx) { case 0: - p = "u_int"; + p = "int"; break; case 1: p = "userland const gid_t *"; @@ -4291,7 +4291,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 2: - p = "int"; + p = "int32_t"; break; default: break; @@ -4849,16 +4849,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 171: switch (ndx) { case 0: - p = "uint32_t"; + p = "int"; break; case 1: - p = "uint32_t"; + p = "int"; break; case 2: - p = "uint32_t"; + p = "int"; break; case 3: - p = "uint32_t"; + p = "int"; break; default: break; @@ -7285,7 +7285,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct iovec *"; + p = "userland struct iovec32 *"; break; case 2: p = "int"; @@ -7313,7 +7313,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct iovec *"; + p = "userland struct iovec32 *"; break; case 2: p = "int"; From nobody Mon Nov 22 22:37:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 54BE31892AC6; Mon, 22 Nov 2021 22: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 4Hyhx20hx9z4YJ4; Mon, 22 Nov 2021 22:37:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46C7A2E3B; Mon, 22 Nov 2021 22:37: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 1AMMbflW047092; Mon, 22 Nov 2021 22:37:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbfFJ047091; Mon, 22 Nov 2021 22:37:41 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:41 GMT Message-Id: <202111222237.1AMMbfFJ047091@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: bcd07aaa4ebd - main - freebsd32: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bcd07aaa4ebd3fe8c6d9bed5db7bc6b7df952f60 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=bcd07aaa4ebd3fe8c6d9bed5db7bc6b7df952f60 commit bcd07aaa4ebd3fe8c6d9bed5db7bc6b7df952f60 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:56 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:56 +0000 freebsd32: regen --- sys/compat/freebsd32/freebsd32_proto.h | 18 ++++++++++++++++++ sys/compat/freebsd32/freebsd32_syscall.h | 6 +++--- sys/compat/freebsd32/freebsd32_syscalls.c | 6 +++--- sys/compat/freebsd32/freebsd32_sysent.c | 6 +++--- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 1a7a8fe933e6..2da70e33d2ac 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -1300,6 +1300,18 @@ struct freebsd11_freebsd32_getdirentries_args { char count_l_[PADL_(u_int)]; u_int count; char count_r_[PADR_(u_int)]; char basep_l_[PADL_(int32_t *)]; int32_t * basep; char basep_r_[PADR_(int32_t *)]; }; +struct freebsd11_freebsd32_nstat_args { + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char ub_l_[PADL_(struct nstat32 *)]; struct nstat32 * ub; char ub_r_[PADR_(struct nstat32 *)]; +}; +struct freebsd11_freebsd32_nfstat_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char sb_l_[PADL_(struct nstat32 *)]; struct nstat32 * sb; char sb_r_[PADR_(struct nstat32 *)]; +}; +struct freebsd11_freebsd32_nlstat_args { + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char ub_l_[PADL_(struct nstat32 *)]; struct nstat32 * ub; char ub_r_[PADR_(struct nstat32 *)]; +}; #ifdef PAD64_REQUIRED #else #endif @@ -1345,6 +1357,9 @@ int freebsd11_freebsd32_stat(struct thread *, struct freebsd11_freebsd32_stat_ar int freebsd11_freebsd32_fstat(struct thread *, struct freebsd11_freebsd32_fstat_args *); int freebsd11_freebsd32_lstat(struct thread *, struct freebsd11_freebsd32_lstat_args *); int freebsd11_freebsd32_getdirentries(struct thread *, struct freebsd11_freebsd32_getdirentries_args *); +int freebsd11_freebsd32_nstat(struct thread *, struct freebsd11_freebsd32_nstat_args *); +int freebsd11_freebsd32_nfstat(struct thread *, struct freebsd11_freebsd32_nfstat_args *); +int freebsd11_freebsd32_nlstat(struct thread *, struct freebsd11_freebsd32_nlstat_args *); int freebsd11_freebsd32_fhstat(struct thread *, struct freebsd11_freebsd32_fhstat_args *); int freebsd11_freebsd32_kevent(struct thread *, struct freebsd11_freebsd32_kevent_args *); int freebsd11_freebsd32_getfsstat(struct thread *, struct freebsd11_freebsd32_getfsstat_args *); @@ -1453,6 +1468,9 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_aio_write AUE_AIO_WRITE #define FREEBSD32_SYS_AUE_freebsd32_lio_listio AUE_LIO_LISTIO #define FREEBSD32_SYS_AUE_freebsd32_lutimes AUE_LUTIMES +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_nstat AUE_STAT +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_nfstat AUE_FSTAT +#define FREEBSD32_SYS_AUE_freebsd11_freebsd32_nlstat AUE_LSTAT #define FREEBSD32_SYS_AUE_freebsd32_preadv AUE_PREADV #define FREEBSD32_SYS_AUE_freebsd32_pwritev AUE_PWRITEV #define FREEBSD32_SYS_AUE_freebsd32_preadv AUE_PREADV diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 38ccc95b9d89..5783d3d4fed7 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -235,9 +235,9 @@ /* 275 is obsolete netbsd_lchown */ #define FREEBSD32_SYS_freebsd32_lutimes 276 /* 277 is obsolete netbsd_msync */ -#define FREEBSD32_SYS_freebsd11_nstat 278 -#define FREEBSD32_SYS_freebsd11_nfstat 279 -#define FREEBSD32_SYS_freebsd11_nlstat 280 +#define FREEBSD32_SYS_freebsd11_freebsd32_nstat 278 +#define FREEBSD32_SYS_freebsd11_freebsd32_nfstat 279 +#define FREEBSD32_SYS_freebsd11_freebsd32_nlstat 280 #define FREEBSD32_SYS_freebsd32_preadv 289 #define FREEBSD32_SYS_freebsd32_pwritev 290 #define FREEBSD32_SYS_freebsd32_preadv 289 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index fa7e58f91bfb..90be1e623c4d 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -287,9 +287,9 @@ const char *freebsd32_syscallnames[] = { "obs_netbsd_lchown", /* 275 = obsolete netbsd_lchown */ "freebsd32_lutimes", /* 276 = freebsd32_lutimes */ "obs_netbsd_msync", /* 277 = obsolete netbsd_msync */ - "compat11.nstat", /* 278 = freebsd11 nstat */ - "compat11.nfstat", /* 279 = freebsd11 nfstat */ - "compat11.nlstat", /* 280 = freebsd11 nlstat */ + "compat11.freebsd32_nstat", /* 278 = freebsd11 freebsd32_nstat */ + "compat11.freebsd32_nfstat", /* 279 = freebsd11 freebsd32_nfstat */ + "compat11.freebsd32_nlstat", /* 280 = freebsd11 freebsd32_nlstat */ "#281", /* 281 = reserved for local use */ "#282", /* 282 = reserved for local use */ "#283", /* 283 = reserved for local use */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 0a93641f7f16..7c355814e563 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -340,9 +340,9 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 275 = obsolete netbsd_lchown */ { .sy_narg = AS(freebsd32_lutimes_args), .sy_call = (sy_call_t *)freebsd32_lutimes, .sy_auevent = AUE_LUTIMES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 276 = freebsd32_lutimes */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 277 = obsolete netbsd_msync */ - { compat11(AS(freebsd11_nstat_args),nstat), .sy_auevent = AUE_STAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 278 = freebsd11 nstat */ - { compat11(AS(freebsd11_nfstat_args),nfstat), .sy_auevent = AUE_FSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 279 = freebsd11 nfstat */ - { compat11(AS(freebsd11_nlstat_args),nlstat), .sy_auevent = AUE_LSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 280 = freebsd11 nlstat */ + { compat11(AS(freebsd11_freebsd32_nstat_args),freebsd32_nstat), .sy_auevent = AUE_STAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 278 = freebsd11 freebsd32_nstat */ + { compat11(AS(freebsd11_freebsd32_nfstat_args),freebsd32_nfstat), .sy_auevent = AUE_FSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 279 = freebsd11 freebsd32_nfstat */ + { compat11(AS(freebsd11_freebsd32_nlstat_args),freebsd32_nlstat), .sy_auevent = AUE_LSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 280 = freebsd11 freebsd32_nlstat */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 281 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 282 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 283 = reserved for local use */ From nobody Mon Nov 22 22:37:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4F6EA1892B5F; Mon, 22 Nov 2021 22:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyhx36xZDz4YCL; Mon, 22 Nov 2021 22:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F64D2EF3; Mon, 22 Nov 2021 22: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 1AMMbhGw047140; Mon, 22 Nov 2021 22: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 1AMMbhkD047139; Mon, 22 Nov 2021 22:37:43 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:43 GMT Message-Id: <202111222237.1AMMbhkD047139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 5203efead709 - main - makesyscalls: Remove _native suffix 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5203efead7092974bbeac20661143702be3921bd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5203efead7092974bbeac20661143702be3921bd commit 5203efead7092974bbeac20661143702be3921bd Author: Brooks Davis AuthorDate: 2021-11-22 22:36:56 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:56 +0000 makesyscalls: Remove _native suffix handling This supported a hack we used in CheriBSD which has been removed. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index a390be8b6154..f34d34b89d94 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -581,7 +581,6 @@ local function process_args(args) -- XX TODO: Forward declarations? See: sysstubfwd in CheriBSD if abi_change then local abi_type_suffix = config["abi_type_suffix"] - argtype = argtype:gsub("_native ", "") argtype = argtype:gsub("(struct [^ ]*)", "%1" .. abi_type_suffix) argtype = argtype:gsub("(union [^ ]*)", "%1" .. From nobody Mon Nov 22 22:37:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6F51C1892D89; Mon, 22 Nov 2021 22:37: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 4Hyhx661fmz4Xmt; Mon, 22 Nov 2021 22:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A915E2E3C; Mon, 22 Nov 2021 22:37: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 1AMMbiLH047164; Mon, 22 Nov 2021 22:37:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbijI047163; Mon, 22 Nov 2021 22:37:44 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:44 GMT Message-Id: <202111222237.1AMMbijI047163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 818aa9543de8 - main - makesyscalls: Fix expression for time_t_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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 818aa9543de8c403f222d3174742186a36539fd4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=818aa9543de8c403f222d3174742186a36539fd4 commit 818aa9543de8c403f222d3174742186a36539fd4 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:56 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:56 +0000 makesyscalls: Fix expression for time_t_size Reviewed by: kevans --- sys/tools/makesyscalls.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index f34d34b89d94..1f646d64e2e4 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -134,7 +134,7 @@ local known_abi_flags = { }, time_t_size = { value = 0x00000002, - expr = "_Contains[a-z_]*_timet_/", + expr = "_Contains[a-z_]*_timet_", }, pointer_args = { value = 0x00000004, From nobody Mon Nov 22 22:37:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C54191892AF8; Mon, 22 Nov 2021 22:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyhx75YT2z4YRl; Mon, 22 Nov 2021 22:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB43B2E3D; Mon, 22 Nov 2021 22:37: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 1AMMbjpK047194; Mon, 22 Nov 2021 22:37:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbjgX047193; Mon, 22 Nov 2021 22:37:45 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:45 GMT Message-Id: <202111222237.1AMMbjgX047193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: ed8a4423fba4 - main - makesyscalls: allow multiple expressions for each abi change List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed8a4423fba42f0aca5cfa3ce4aa1c763fdf578d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ed8a4423fba42f0aca5cfa3ce4aa1c763fdf578d commit ed8a4423fba42f0aca5cfa3ce4aa1c763fdf578d Author: Brooks Davis AuthorDate: 2021-11-22 22:36:56 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:56 +0000 makesyscalls: allow multiple expressions for each abi change Limitations in lua patterns means we need to be able to match more than one possible expression. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 1f646d64e2e4..622a6ad4b1dd 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -130,18 +130,24 @@ end local known_abi_flags = { long_size = { value = 0x00000001, - expr = "_Contains[a-z_]*_long_", + exprs = { + "_Contains[a-z_]*_long_", + }, }, time_t_size = { value = 0x00000002, - expr = "_Contains[a-z_]*_timet_", + exprs = { + "_Contains[a-z_]*_timet_", + }, }, pointer_args = { value = 0x00000004, }, pointer_size = { value = 0x00000008, - expr = "_Contains[a-z_]*_ptr_", + exprs = { + "_Contains[a-z_]*_ptr_", + }, }, } @@ -552,9 +558,13 @@ end local function check_abi_changes(arg) for k, v in pairs(known_abi_flags) do - local expr = v["expr"] - if abi_changes(k) and expr ~= nil and arg:find(expr) then - return true + local exprs = v["exprs"] + if abi_changes(k) and exprs ~= nil then + for _, e in pairs(exprs) do + if arg:find(e) then + return true + end + end end end From nobody Mon Nov 22 22:37:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A2AED1892DB3; Mon, 22 Nov 2021 22:37:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyhx86pZzz4YRn; Mon, 22 Nov 2021 22:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED6E12CAD; Mon, 22 Nov 2021 22:37: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 1AMMbkQo047218; Mon, 22 Nov 2021 22:37:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbkuo047217; Mon, 22 Nov 2021 22:37:46 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:46 GMT Message-Id: <202111222237.1AMMbkuo047217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 3f8f46a0ae4f - main - makesyscalls: Add a way to include per-ABI headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f8f46a0ae4f7dbe886ade676917a0d68ca1f86e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=3f8f46a0ae4f7dbe886ade676917a0d68ca1f86e commit 3f8f46a0ae4f7dbe886ade676917a0d68ca1f86e Author: Brooks Davis AuthorDate: 2021-11-22 22:36:56 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:56 +0000 makesyscalls: Add a way to include per-ABI headers When the string %%ABI_HEADERS%% is found in syscalls.master, replace it with the contents of the abi_headers config variable. This allows an ABI-specific syscalls.conf to add lines like: #include when working from a shared syscalls.master. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 622a6ad4b1dd..fef991296316 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -60,6 +60,7 @@ local config = { abi_type_suffix = "", abi_flags = "", abi_flags_mask = 0, + abi_headers = "", ptr_intptr_t_cast = "intptr_t", } @@ -438,6 +439,16 @@ local pattern_table = { write_line_pfile('systrace.*', line) end, }, + { + dump_prevline = true, + pattern = "%%ABI_HEADERS%%", + process = function() + if config['abi_headers'] ~= "" then + line = config['abi_headers'] .. "\n" + write_line('sysinc', line) + end + end, + }, { -- Buffer anything else pattern = ".+", From nobody Mon Nov 22 22:37:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BA12F1892E32; Mon, 22 Nov 2021 22:37:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HyhxB2HSCz4YDB; Mon, 22 Nov 2021 22:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D9FE29F3; Mon, 22 Nov 2021 22:37: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 1AMMbmUR047242; Mon, 22 Nov 2021 22:37:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbmOB047241; Mon, 22 Nov 2021 22:37:48 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:48 GMT Message-Id: <202111222237.1AMMbmOB047241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 37b425bd05ef - main - makesyscalls: intptr_t arguments are pointers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37b425bd05ef43fb6d874a1b454950d701669ba5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=37b425bd05ef43fb6d874a1b454950d701669ba5 commit 37b425bd05ef43fb6d874a1b454950d701669ba5 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:56 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:56 +0000 makesyscalls: intptr_t arguments are pointers Match intptr_t arguments as pointers. Currently this is a no-op change to systrace_args.c. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index fef991296316..f967bd84fa87 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -399,8 +399,8 @@ local function write_line_pfile(tmppat, line) end local function isptrtype(type) - return type:find("*") or type:find("caddr_t") - -- XXX NOTYET: or type:find("intptr_t") + return type:find("*") or type:find("caddr_t") or + type:find("intptr_t") end local process_syscall_def From nobody Mon Nov 22 22:37:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5F2D71892DCE; Mon, 22 Nov 2021 22:37:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HyhxB3HX9z4YDK; Mon, 22 Nov 2021 22:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 332F32D61; Mon, 22 Nov 2021 22:37: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 1AMMbnVb047266; Mon, 22 Nov 2021 22:37:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbnLr047265; Mon, 22 Nov 2021 22:37:49 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:49 GMT Message-Id: <202111222237.1AMMbnLr047265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: f0cfbffc3631 - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0cfbffc3631aa1e7cab10aae7a25818dfe101c1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f0cfbffc3631aa1e7cab10aae7a25818dfe101c1 commit f0cfbffc3631aa1e7cab10aae7a25818dfe101c1 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:56 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:56 +0000 syscalls: regen --- sys/amd64/linux/linux_systrace_args.c | 50 +++++++++++++++---------------- sys/amd64/linux32/linux32_systrace_args.c | 46 ++++++++++++++-------------- sys/arm64/linux/linux_systrace_args.c | 50 +++++++++++++++---------------- sys/i386/linux/linux_systrace_args.c | 40 ++++++++++++------------- 4 files changed, 93 insertions(+), 93 deletions(-) diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 9db01b6b7440..4093a29b6b8d 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -374,7 +374,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 42: { struct linux_connect_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->name; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->name; /* l_uintptr_t */ iarg[2] = p->namelen; /* l_int */ *n_args = 3; break; @@ -383,8 +383,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 43: { struct linux_accept_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } @@ -392,10 +392,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 44: { struct linux_sendto_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->len; /* l_size_t */ iarg[3] = p->flags; /* l_uint */ - iarg[4] = p->to; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->to; /* l_uintptr_t */ iarg[5] = p->tolen; /* l_int */ *n_args = 6; break; @@ -404,11 +404,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 45: { struct linux_recvfrom_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->buf; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->buf; /* l_uintptr_t */ iarg[2] = p->len; /* l_size_t */ iarg[3] = p->flags; /* l_uint */ - iarg[4] = p->from; /* l_uintptr_t */ - iarg[5] = p->fromlen; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->from; /* l_uintptr_t */ + uarg[5] = (intptr_t)p->fromlen; /* l_uintptr_t */ *n_args = 6; break; } @@ -416,7 +416,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 46: { struct linux_sendmsg_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->flags; /* l_uint */ *n_args = 3; break; @@ -425,7 +425,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 47: { struct linux_recvmsg_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->flags; /* l_uint */ *n_args = 3; break; @@ -442,7 +442,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 49: { struct linux_bind_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->name; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->name; /* l_uintptr_t */ iarg[2] = p->namelen; /* l_int */ *n_args = 3; break; @@ -459,8 +459,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 51: { struct linux_getsockname_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } @@ -468,8 +468,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 52: { struct linux_getpeername_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } @@ -479,7 +479,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->domain; /* l_int */ iarg[1] = p->type; /* l_int */ iarg[2] = p->protocol; /* l_int */ - iarg[3] = p->rsv; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->rsv; /* l_uintptr_t */ *n_args = 4; break; } @@ -489,7 +489,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->s; /* l_int */ iarg[1] = p->level; /* l_int */ iarg[2] = p->optname; /* l_int */ - iarg[3] = p->optval; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->optval; /* l_uintptr_t */ iarg[4] = p->optlen; /* l_int */ *n_args = 5; break; @@ -500,8 +500,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->s; /* l_int */ iarg[1] = p->level; /* l_int */ iarg[2] = p->optname; /* l_int */ - iarg[3] = p->optval; /* l_uintptr_t */ - iarg[4] = p->optlen; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->optval; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->optlen; /* l_uintptr_t */ *n_args = 5; break; } @@ -1282,10 +1282,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 157: { struct linux_prctl_args *p = params; iarg[0] = p->option; /* l_int */ - iarg[1] = p->arg2; /* l_uintptr_t */ - iarg[2] = p->arg3; /* l_uintptr_t */ - iarg[3] = p->arg4; /* l_uintptr_t */ - iarg[4] = p->arg5; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->arg2; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->arg3; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->arg4; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->arg5; /* l_uintptr_t */ *n_args = 5; break; } @@ -2201,8 +2201,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 288: { struct linux_accept4_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ iarg[3] = p->flags; /* l_int */ *n_args = 4; break; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 8ff6242542f3..f3da83cf473f 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -355,7 +355,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct linux_ioctl_args *p = params; iarg[0] = p->fd; /* l_uint */ iarg[1] = p->cmd; /* l_uint */ - uarg[2] = p->arg; /* uintptr_t */ + uarg[2] = (intptr_t)p->arg; /* uintptr_t */ *n_args = 3; break; } @@ -364,7 +364,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct linux_fcntl_args *p = params; iarg[0] = p->fd; /* l_uint */ iarg[1] = p->cmd; /* l_uint */ - uarg[2] = p->arg; /* uintptr_t */ + uarg[2] = (intptr_t)p->arg; /* uintptr_t */ *n_args = 3; break; } @@ -786,7 +786,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[1] = p->arg1; /* l_int */ iarg[2] = p->arg2; /* l_int */ iarg[3] = p->arg3; /* l_uint */ - iarg[4] = p->ptr; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->ptr; /* l_uintptr_t */ iarg[5] = p->arg5; /* l_uint */ *n_args = 6; break; @@ -1548,7 +1548,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct linux_fcntl64_args *p = params; iarg[0] = p->fd; /* l_uint */ iarg[1] = p->cmd; /* l_uint */ - uarg[2] = p->arg; /* uintptr_t */ + uarg[2] = (intptr_t)p->arg; /* uintptr_t */ *n_args = 3; break; } @@ -2625,7 +2625,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->domain; /* l_int */ iarg[1] = p->type; /* l_int */ iarg[2] = p->protocol; /* l_int */ - iarg[3] = p->rsv; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->rsv; /* l_uintptr_t */ *n_args = 4; break; } @@ -2633,7 +2633,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 361: { struct linux_bind_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->name; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->name; /* l_uintptr_t */ iarg[2] = p->namelen; /* l_int */ *n_args = 3; break; @@ -2642,7 +2642,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 362: { struct linux_connect_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->name; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->name; /* l_uintptr_t */ iarg[2] = p->namelen; /* l_int */ *n_args = 3; break; @@ -2659,8 +2659,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 364: { struct linux_accept4_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ iarg[3] = p->flags; /* l_int */ *n_args = 4; break; @@ -2671,8 +2671,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->s; /* l_int */ iarg[1] = p->level; /* l_int */ iarg[2] = p->optname; /* l_int */ - iarg[3] = p->optval; /* l_uintptr_t */ - iarg[4] = p->optlen; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->optval; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->optlen; /* l_uintptr_t */ *n_args = 5; break; } @@ -2682,7 +2682,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->s; /* l_int */ iarg[1] = p->level; /* l_int */ iarg[2] = p->optname; /* l_int */ - iarg[3] = p->optval; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->optval; /* l_uintptr_t */ iarg[4] = p->optlen; /* l_int */ *n_args = 5; break; @@ -2691,8 +2691,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 367: { struct linux_getsockname_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } @@ -2700,8 +2700,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 368: { struct linux_getpeername_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } @@ -2709,10 +2709,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 369: { struct linux_sendto_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->len; /* l_int */ iarg[3] = p->flags; /* l_int */ - iarg[4] = p->to; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->to; /* l_uintptr_t */ iarg[5] = p->tolen; /* l_int */ *n_args = 6; break; @@ -2721,7 +2721,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 370: { struct linux_sendmsg_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->flags; /* l_int */ *n_args = 3; break; @@ -2730,11 +2730,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 371: { struct linux_recvfrom_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->buf; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->buf; /* l_uintptr_t */ iarg[2] = p->len; /* l_size_t */ iarg[3] = p->flags; /* l_int */ - iarg[4] = p->from; /* l_uintptr_t */ - iarg[5] = p->fromlen; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->from; /* l_uintptr_t */ + uarg[5] = (intptr_t)p->fromlen; /* l_uintptr_t */ *n_args = 6; break; } @@ -2742,7 +2742,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 372: { struct linux_recvmsg_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->flags; /* l_int */ *n_args = 3; break; diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index 42f37dbff137..223548aff4c5 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -1317,10 +1317,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 167: { struct linux_prctl_args *p = params; iarg[0] = p->option; /* l_int */ - iarg[1] = p->arg2; /* l_uintptr_t */ - iarg[2] = p->arg3; /* l_uintptr_t */ - iarg[3] = p->arg4; /* l_uintptr_t */ - iarg[4] = p->arg5; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->arg2; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->arg3; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->arg4; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->arg5; /* l_uintptr_t */ *n_args = 5; break; } @@ -1572,7 +1572,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->domain; /* l_int */ iarg[1] = p->type; /* l_int */ iarg[2] = p->protocol; /* l_int */ - iarg[3] = p->rsv; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->rsv; /* l_uintptr_t */ *n_args = 4; break; } @@ -1580,7 +1580,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 200: { struct linux_bind_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->name; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->name; /* l_uintptr_t */ iarg[2] = p->namelen; /* l_int */ *n_args = 3; break; @@ -1597,8 +1597,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 202: { struct linux_accept_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } @@ -1606,7 +1606,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 203: { struct linux_connect_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->name; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->name; /* l_uintptr_t */ iarg[2] = p->namelen; /* l_int */ *n_args = 3; break; @@ -1615,8 +1615,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 204: { struct linux_getsockname_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } @@ -1624,8 +1624,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 205: { struct linux_getpeername_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } @@ -1633,10 +1633,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 206: { struct linux_sendto_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->len; /* l_size_t */ iarg[3] = p->flags; /* l_uint */ - iarg[4] = p->to; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->to; /* l_uintptr_t */ iarg[5] = p->tolen; /* l_int */ *n_args = 6; break; @@ -1645,11 +1645,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 207: { struct linux_recvfrom_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->buf; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->buf; /* l_uintptr_t */ iarg[2] = p->len; /* l_size_t */ iarg[3] = p->flags; /* l_uint */ - iarg[4] = p->from; /* l_uintptr_t */ - iarg[5] = p->fromlen; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->from; /* l_uintptr_t */ + uarg[5] = (intptr_t)p->fromlen; /* l_uintptr_t */ *n_args = 6; break; } @@ -1659,7 +1659,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->s; /* l_int */ iarg[1] = p->level; /* l_int */ iarg[2] = p->optname; /* l_int */ - iarg[3] = p->optval; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->optval; /* l_uintptr_t */ iarg[4] = p->optlen; /* l_int */ *n_args = 5; break; @@ -1670,8 +1670,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->s; /* l_int */ iarg[1] = p->level; /* l_int */ iarg[2] = p->optname; /* l_int */ - iarg[3] = p->optval; /* l_uintptr_t */ - iarg[4] = p->optlen; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->optval; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->optlen; /* l_uintptr_t */ *n_args = 5; break; } @@ -1687,7 +1687,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 211: { struct linux_sendmsg_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->flags; /* l_uint */ *n_args = 3; break; @@ -1696,7 +1696,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 212: { struct linux_recvmsg_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->flags; /* l_uint */ *n_args = 3; break; @@ -1909,8 +1909,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 242: { struct linux_accept4_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ iarg[3] = p->flags; /* l_int */ *n_args = 4; break; diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index baee524e5a6d..0e13ff94aa57 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -815,7 +815,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[1] = p->arg1; /* l_int */ iarg[2] = p->arg2; /* l_int */ iarg[3] = p->arg3; /* l_uint */ - iarg[4] = p->ptr; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->ptr; /* l_uintptr_t */ iarg[5] = p->arg5; /* l_uint */ *n_args = 6; break; @@ -2664,7 +2664,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->domain; /* l_int */ iarg[1] = p->type; /* l_int */ iarg[2] = p->protocol; /* l_int */ - iarg[3] = p->rsv; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->rsv; /* l_uintptr_t */ *n_args = 4; break; } @@ -2672,7 +2672,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 361: { struct linux_bind_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->name; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->name; /* l_uintptr_t */ iarg[2] = p->namelen; /* l_int */ *n_args = 3; break; @@ -2681,7 +2681,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 362: { struct linux_connect_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->name; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->name; /* l_uintptr_t */ iarg[2] = p->namelen; /* l_int */ *n_args = 3; break; @@ -2698,8 +2698,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 364: { struct linux_accept4_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ iarg[3] = p->flags; /* l_int */ *n_args = 4; break; @@ -2710,8 +2710,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->s; /* l_int */ iarg[1] = p->level; /* l_int */ iarg[2] = p->optname; /* l_int */ - iarg[3] = p->optval; /* l_uintptr_t */ - iarg[4] = p->optlen; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->optval; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->optlen; /* l_uintptr_t */ *n_args = 5; break; } @@ -2721,7 +2721,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->s; /* l_int */ iarg[1] = p->level; /* l_int */ iarg[2] = p->optname; /* l_int */ - iarg[3] = p->optval; /* l_uintptr_t */ + uarg[3] = (intptr_t)p->optval; /* l_uintptr_t */ iarg[4] = p->optlen; /* l_int */ *n_args = 5; break; @@ -2730,8 +2730,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 367: { struct linux_getsockname_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } @@ -2739,8 +2739,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 368: { struct linux_getpeername_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->addr; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } @@ -2748,10 +2748,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 369: { struct linux_sendto_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->len; /* l_int */ iarg[3] = p->flags; /* l_int */ - iarg[4] = p->to; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->to; /* l_uintptr_t */ iarg[5] = p->tolen; /* l_int */ *n_args = 6; break; @@ -2760,7 +2760,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 370: { struct linux_sendmsg_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->flags; /* l_int */ *n_args = 3; break; @@ -2769,11 +2769,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 371: { struct linux_recvfrom_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->buf; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->buf; /* l_uintptr_t */ iarg[2] = p->len; /* l_size_t */ iarg[3] = p->flags; /* l_int */ - iarg[4] = p->from; /* l_uintptr_t */ - iarg[5] = p->fromlen; /* l_uintptr_t */ + uarg[4] = (intptr_t)p->from; /* l_uintptr_t */ + uarg[5] = (intptr_t)p->fromlen; /* l_uintptr_t */ *n_args = 6; break; } @@ -2781,7 +2781,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 372: { struct linux_recvmsg_args *p = params; iarg[0] = p->s; /* l_int */ - iarg[1] = p->msg; /* l_uintptr_t */ + uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ iarg[2] = p->flags; /* l_int */ *n_args = 3; break; From nobody Mon Nov 22 22:37:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C19EA1892FAB; Mon, 22 Nov 2021 22:37:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HyhxC2StTz4YDV; Mon, 22 Nov 2021 22:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E6D12D62; Mon, 22 Nov 2021 22:37: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 1AMMbobE047290; Mon, 22 Nov 2021 22:37:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMboqH047289; Mon, 22 Nov 2021 22:37:50 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:50 GMT Message-Id: <202111222237.1AMMboqH047289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: b85fb3904712 - main - makesyscalls.lua: Allow translation of intptr_t 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b85fb39047123185707ade51bd6294bd404ff413 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b85fb39047123185707ade51bd6294bd404ff413 commit b85fb39047123185707ade51bd6294bd404ff413 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:57 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:57 +0000 makesyscalls.lua: Allow translation of intptr_t arguments Translate instances of intptr_t to the config value abi_intptr_t (defaults to "intptr_t"). Used in CheriABI to translate intptr_t to intcap_t for hybrid kernels. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index f967bd84fa87..1023e2faa0e6 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -61,6 +61,7 @@ local config = { abi_flags = "", abi_flags_mask = 0, abi_headers = "", + abi_intptr_t = "intptr_t", ptr_intptr_t_cast = "intptr_t", } @@ -398,9 +399,11 @@ local function write_line_pfile(tmppat, line) end end +-- Check both literal intptr_t and the abi version because this needs +-- to work both before and after the substitution local function isptrtype(type) return type:find("*") or type:find("caddr_t") or - type:find("intptr_t") + type:find("intptr_t") or type:find(config['abi_intptr_t']) end local process_syscall_def @@ -599,6 +602,8 @@ local function process_args(args) goto out end + argtype = argtype:gsub("intptr_t", config["abi_intptr_t"]) + -- XX TODO: Forward declarations? See: sysstubfwd in CheriBSD if abi_change then local abi_type_suffix = config["abi_type_suffix"] From nobody Mon Nov 22 22:37:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3C24B1892CF4; Mon, 22 Nov 2021 22:37: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 4HyhxD07qgz4YQ5; Mon, 22 Nov 2021 22:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6830A2F85; Mon, 22 Nov 2021 22:37: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 1AMMbppM047322; Mon, 22 Nov 2021 22:37:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbpwX047321; Mon, 22 Nov 2021 22:37:51 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:51 GMT Message-Id: <202111222237.1AMMbpwX047321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 0a4e16446b02 - main - makesyscalls: handle longs in ABI compat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a4e16446b02f2aa0701ee0977366678987fba43 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0a4e16446b02f2aa0701ee0977366678987fba43 commit 0a4e16446b02f2aa0701ee0977366678987fba43 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:57 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:57 +0000 makesyscalls: handle longs in ABI compat Replace long-derived types with their abi equivalent where required by the target ABI. There are two cases: - All pointers to types that go from 64-bit to 32-bit between the default ABI and the target ABI. - Signed arguments that go from 64-bit to 32-bit (these require sign-extension before passing to general kernel ABIs). This adds four new config variables: abi_long, semid_t, abi_size_t, and abi_u_long which default to long, size_t, and u_long respectively. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 1023e2faa0e6..a4250e072277 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -62,6 +62,10 @@ local config = { abi_flags_mask = 0, abi_headers = "", abi_intptr_t = "intptr_t", + abi_size_t = "size_t", + abi_u_long = "u_long", + abi_long = "long", + abi_semid_t = "semid_t", ptr_intptr_t_cast = "intptr_t", } @@ -134,6 +138,16 @@ local known_abi_flags = { value = 0x00000001, exprs = { "_Contains[a-z_]*_long_", + "^long [a-z0-9_]+$", + "long [*]", + "size_t [*]", + -- semid_t is not included because it is only used + -- as an argument or written out individually and + -- said writes are handled by the ksem framework. + -- Technically a sign-extension issue exists for + -- arguments, but because semid_t is actually a file + -- descriptor negative 32-bit values are invalid + -- regardless of sign-extension. }, }, time_t_size = { @@ -603,6 +617,15 @@ local function process_args(args) end argtype = argtype:gsub("intptr_t", config["abi_intptr_t"]) + argtype = argtype:gsub("semid_t", config["abi_semid_t"]) + if isptrtype(argtype) then + argtype = argtype:gsub("size_t", config["abi_size_t"]) + argtype = argtype:gsub("^long", config["abi_long"]); + argtype = argtype:gsub("^u_long", config["abi_u_long"]); + argtype = argtype:gsub("^const u_long", "const " .. config["abi_u_long"]); + elseif argtype:find("^long$") then + argtype = config["abi_long"] + end -- XX TODO: Forward declarations? See: sysstubfwd in CheriBSD if abi_change then From nobody Mon Nov 22 22:37:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C139F1892E57; Mon, 22 Nov 2021 22:37: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 4HyhxG0HqXz4YF0; Mon, 22 Nov 2021 22:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D4472F86; Mon, 22 Nov 2021 22:37: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 1AMMbqIm047346; Mon, 22 Nov 2021 22:37:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbqbN047345; Mon, 22 Nov 2021 22:37:52 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:52 GMT Message-Id: <202111222237.1AMMbqbN047345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 79634eb90bff - main - makesyscalls: handle arrays of pointers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79634eb90bff52e9b651bdae6f57082741778d1b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=79634eb90bff52e9b651bdae6f57082741778d1b commit 79634eb90bff52e9b651bdae6f57082741778d1b Author: Brooks Davis AuthorDate: 2021-11-22 22:36:57 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:57 +0000 makesyscalls: handle arrays of pointers When the config variable abi_intptr_t is not "", transform arrays of pointers to arrays of abi_intptr_t. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index a4250e072277..a5387463e4e2 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -66,6 +66,7 @@ local config = { abi_u_long = "u_long", abi_long = "long", abi_semid_t = "semid_t", + abi_ptr_array_t = "", ptr_intptr_t_cast = "intptr_t", } @@ -163,6 +164,7 @@ local known_abi_flags = { value = 0x00000008, exprs = { "_Contains[a-z_]*_ptr_", + "[*][*]", }, }, } @@ -420,6 +422,10 @@ local function isptrtype(type) type:find("intptr_t") or type:find(config['abi_intptr_t']) end +local function isptrarraytype(type) + return type:find("[*][*]") or type:find("[*][ ]*const[ ]*[*]") +end + local process_syscall_def -- These patterns are processed in order on any line that isn't empty. @@ -626,6 +632,12 @@ local function process_args(args) elseif argtype:find("^long$") then argtype = config["abi_long"] end + if isptrarraytype(argtype) and config["abi_ptr_array_t"] ~= "" then + -- `* const *` -> `**` + argtype = argtype:gsub("[*][ ]*const[ ]*[*]", "**") + -- e.g., `struct aiocb **` -> `uint32_t *` + argtype = argtype:gsub("[^*]*[*]", config["abi_ptr_array_t"] .. " ", 1) + end -- XX TODO: Forward declarations? See: sysstubfwd in CheriBSD if abi_change then From nobody Mon Nov 22 22:37:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8D7111893185; Mon, 22 Nov 2021 22:37: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 4HyhxH5whFz4YFM; Mon, 22 Nov 2021 22:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 170D32F87; Mon, 22 Nov 2021 22:37: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 1AMMbtBY047394; Mon, 22 Nov 2021 22:37:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbs7M047393; Mon, 22 Nov 2021 22:37:54 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:54 GMT Message-Id: <202111222237.1AMMbs7M047393@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6b7c23a026f0 - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b7c23a026f0991b0e5ec447b91913d871901924 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6b7c23a026f0991b0e5ec447b91913d871901924 commit 6b7c23a026f0991b0e5ec447b91913d871901924 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:57 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:57 +0000 syscalls: regen --- sys/amd64/linux/linux_systrace_args.c | 1505 ++++++++--------- sys/amd64/linux32/linux32_systrace_args.c | 1775 ++++++++++---------- sys/arm64/linux/linux_systrace_args.c | 1343 +++++++-------- sys/compat/freebsd32/freebsd32_systrace_args.c | 2099 ++++++++++++------------ sys/i386/linux/linux_systrace_args.c | 1773 ++++++++++---------- sys/kern/systrace_args.c | 1987 +++++++++++----------- 6 files changed, 5244 insertions(+), 5238 deletions(-) diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 4093a29b6b8d..eec96830a242 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -10,217 +10,218 @@ static void systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) { int64_t *iarg = (int64_t *)uarg; + int a = 0; switch (sysnum) { #define nosys linux_nosys /* read */ case 0: { struct read_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->buf; /* char * */ - iarg[2] = p->nbyte; /* l_size_t */ + iarg[a++] = p->fd; /* int */ + uarg[a++] = (intptr_t)p->buf; /* char * */ + iarg[a++] = p->nbyte; /* l_size_t */ *n_args = 3; break; } /* write */ case 1: { struct write_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->buf; /* char * */ - iarg[2] = p->nbyte; /* l_size_t */ + iarg[a++] = p->fd; /* int */ + uarg[a++] = (intptr_t)p->buf; /* char * */ + iarg[a++] = p->nbyte; /* l_size_t */ *n_args = 3; break; } /* linux_open */ case 2: { struct linux_open_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ - iarg[1] = p->flags; /* l_int */ - iarg[2] = p->mode; /* l_mode_t */ + uarg[a++] = (intptr_t)p->path; /* char * */ + iarg[a++] = p->flags; /* l_int */ + iarg[a++] = p->mode; /* l_mode_t */ *n_args = 3; break; } /* close */ case 3: { struct close_args *p = params; - iarg[0] = p->fd; /* int */ + iarg[a++] = p->fd; /* int */ *n_args = 1; break; } /* linux_newstat */ case 4: { struct linux_newstat_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ - uarg[1] = (intptr_t)p->buf; /* struct l_newstat * */ + uarg[a++] = (intptr_t)p->path; /* char * */ + uarg[a++] = (intptr_t)p->buf; /* struct l_newstat * */ *n_args = 2; break; } /* linux_newfstat */ case 5: { struct linux_newfstat_args *p = params; - iarg[0] = p->fd; /* l_uint */ - uarg[1] = (intptr_t)p->buf; /* struct l_newstat * */ + iarg[a++] = p->fd; /* l_uint */ + uarg[a++] = (intptr_t)p->buf; /* struct l_newstat * */ *n_args = 2; break; } /* linux_newlstat */ case 6: { struct linux_newlstat_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ - uarg[1] = (intptr_t)p->buf; /* struct l_newstat * */ + uarg[a++] = (intptr_t)p->path; /* char * */ + uarg[a++] = (intptr_t)p->buf; /* struct l_newstat * */ *n_args = 2; break; } /* linux_poll */ case 7: { struct linux_poll_args *p = params; - uarg[0] = (intptr_t)p->fds; /* struct pollfd * */ - uarg[1] = p->nfds; /* u_int */ - iarg[2] = p->timeout; /* int */ + uarg[a++] = (intptr_t)p->fds; /* struct pollfd * */ + uarg[a++] = p->nfds; /* u_int */ + iarg[a++] = p->timeout; /* int */ *n_args = 3; break; } /* linux_lseek */ case 8: { struct linux_lseek_args *p = params; - iarg[0] = p->fdes; /* l_uint */ - iarg[1] = p->off; /* l_off_t */ - iarg[2] = p->whence; /* l_int */ + iarg[a++] = p->fdes; /* l_uint */ + iarg[a++] = p->off; /* l_off_t */ + iarg[a++] = p->whence; /* l_int */ *n_args = 3; break; } /* linux_mmap2 */ case 9: { struct linux_mmap2_args *p = params; - iarg[0] = p->addr; /* l_ulong */ - iarg[1] = p->len; /* l_ulong */ - iarg[2] = p->prot; /* l_ulong */ - iarg[3] = p->flags; /* l_ulong */ - iarg[4] = p->fd; /* l_ulong */ - iarg[5] = p->pgoff; /* l_ulong */ + iarg[a++] = p->addr; /* l_ulong */ + iarg[a++] = p->len; /* l_ulong */ + iarg[a++] = p->prot; /* l_ulong */ + iarg[a++] = p->flags; /* l_ulong */ + iarg[a++] = p->fd; /* l_ulong */ + iarg[a++] = p->pgoff; /* l_ulong */ *n_args = 6; break; } /* linux_mprotect */ case 10: { struct linux_mprotect_args *p = params; - iarg[0] = p->addr; /* l_ulong */ - iarg[1] = p->len; /* l_size_t */ - iarg[2] = p->prot; /* l_ulong */ + iarg[a++] = p->addr; /* l_ulong */ + iarg[a++] = p->len; /* l_size_t */ + iarg[a++] = p->prot; /* l_ulong */ *n_args = 3; break; } /* munmap */ case 11: { struct munmap_args *p = params; - uarg[0] = (intptr_t)p->addr; /* void * */ - iarg[1] = p->len; /* l_size_t */ + uarg[a++] = (intptr_t)p->addr; /* void * */ + iarg[a++] = p->len; /* l_size_t */ *n_args = 2; break; } /* linux_brk */ case 12: { struct linux_brk_args *p = params; - iarg[0] = p->dsend; /* l_ulong */ + iarg[a++] = p->dsend; /* l_ulong */ *n_args = 1; break; } /* linux_rt_sigaction */ case 13: { struct linux_rt_sigaction_args *p = params; - iarg[0] = p->sig; /* l_int */ - uarg[1] = (intptr_t)p->act; /* l_sigaction_t * */ - uarg[2] = (intptr_t)p->oact; /* l_sigaction_t * */ - iarg[3] = p->sigsetsize; /* l_size_t */ + iarg[a++] = p->sig; /* l_int */ + uarg[a++] = (intptr_t)p->act; /* l_sigaction_t * */ + uarg[a++] = (intptr_t)p->oact; /* l_sigaction_t * */ + iarg[a++] = p->sigsetsize; /* l_size_t */ *n_args = 4; break; } /* linux_rt_sigprocmask */ case 14: { struct linux_rt_sigprocmask_args *p = params; - iarg[0] = p->how; /* l_int */ - uarg[1] = (intptr_t)p->mask; /* l_sigset_t * */ - uarg[2] = (intptr_t)p->omask; /* l_sigset_t * */ - iarg[3] = p->sigsetsize; /* l_size_t */ + iarg[a++] = p->how; /* l_int */ + uarg[a++] = (intptr_t)p->mask; /* l_sigset_t * */ + uarg[a++] = (intptr_t)p->omask; /* l_sigset_t * */ + iarg[a++] = p->sigsetsize; /* l_size_t */ *n_args = 4; break; } /* linux_rt_sigreturn */ case 15: { struct linux_rt_sigreturn_args *p = params; - uarg[0] = (intptr_t)p->ucp; /* struct l_ucontext * */ + uarg[a++] = (intptr_t)p->ucp; /* struct l_ucontext * */ *n_args = 1; break; } /* linux_ioctl */ case 16: { struct linux_ioctl_args *p = params; - iarg[0] = p->fd; /* l_uint */ - iarg[1] = p->cmd; /* l_uint */ - iarg[2] = p->arg; /* l_ulong */ + iarg[a++] = p->fd; /* l_uint */ + iarg[a++] = p->cmd; /* l_uint */ + iarg[a++] = p->arg; /* l_ulong */ *n_args = 3; break; } /* linux_pread */ case 17: { struct linux_pread_args *p = params; - iarg[0] = p->fd; /* l_uint */ - uarg[1] = (intptr_t)p->buf; /* char * */ - iarg[2] = p->nbyte; /* l_size_t */ - iarg[3] = p->offset; /* l_loff_t */ + iarg[a++] = p->fd; /* l_uint */ + uarg[a++] = (intptr_t)p->buf; /* char * */ + iarg[a++] = p->nbyte; /* l_size_t */ + iarg[a++] = p->offset; /* l_loff_t */ *n_args = 4; break; } /* linux_pwrite */ case 18: { struct linux_pwrite_args *p = params; - iarg[0] = p->fd; /* l_uint */ - uarg[1] = (intptr_t)p->buf; /* char * */ - iarg[2] = p->nbyte; /* l_size_t */ - iarg[3] = p->offset; /* l_loff_t */ + iarg[a++] = p->fd; /* l_uint */ + uarg[a++] = (intptr_t)p->buf; /* char * */ + iarg[a++] = p->nbyte; /* l_size_t */ + iarg[a++] = p->offset; /* l_loff_t */ *n_args = 4; break; } /* readv */ case 19: { struct readv_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->iovp; /* struct iovec * */ - uarg[2] = p->iovcnt; /* u_int */ + iarg[a++] = p->fd; /* int */ + uarg[a++] = (intptr_t)p->iovp; /* struct iovec * */ + uarg[a++] = p->iovcnt; /* u_int */ *n_args = 3; break; } /* writev */ case 20: { struct writev_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->iovp; /* struct iovec * */ - uarg[2] = p->iovcnt; /* u_int */ + iarg[a++] = p->fd; /* int */ + uarg[a++] = (intptr_t)p->iovp; /* struct iovec * */ + uarg[a++] = p->iovcnt; /* u_int */ *n_args = 3; break; } /* linux_access */ case 21: { struct linux_access_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ - iarg[1] = p->amode; /* l_int */ + uarg[a++] = (intptr_t)p->path; /* char * */ + iarg[a++] = p->amode; /* l_int */ *n_args = 2; break; } /* linux_pipe */ case 22: { struct linux_pipe_args *p = params; - uarg[0] = (intptr_t)p->pipefds; /* l_int * */ + uarg[a++] = (intptr_t)p->pipefds; /* l_int * */ *n_args = 1; break; } /* linux_select */ case 23: { struct linux_select_args *p = params; - iarg[0] = p->nfds; /* l_int */ - uarg[1] = (intptr_t)p->readfds; /* l_fd_set * */ - uarg[2] = (intptr_t)p->writefds; /* l_fd_set * */ - uarg[3] = (intptr_t)p->exceptfds; /* l_fd_set * */ - uarg[4] = (intptr_t)p->timeout; /* struct l_timeval * */ + iarg[a++] = p->nfds; /* l_int */ + uarg[a++] = (intptr_t)p->readfds; /* l_fd_set * */ + uarg[a++] = (intptr_t)p->writefds; /* l_fd_set * */ + uarg[a++] = (intptr_t)p->exceptfds; /* l_fd_set * */ + uarg[a++] = (intptr_t)p->timeout; /* struct l_timeval * */ *n_args = 5; break; } @@ -232,80 +233,80 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* linux_mremap */ case 25: { struct linux_mremap_args *p = params; - iarg[0] = p->addr; /* l_ulong */ - iarg[1] = p->old_len; /* l_ulong */ - iarg[2] = p->new_len; /* l_ulong */ - iarg[3] = p->flags; /* l_ulong */ - iarg[4] = p->new_addr; /* l_ulong */ + iarg[a++] = p->addr; /* l_ulong */ + iarg[a++] = p->old_len; /* l_ulong */ + iarg[a++] = p->new_len; /* l_ulong */ + iarg[a++] = p->flags; /* l_ulong */ + iarg[a++] = p->new_addr; /* l_ulong */ *n_args = 5; break; } /* linux_msync */ case 26: { struct linux_msync_args *p = params; - iarg[0] = p->addr; /* l_ulong */ - iarg[1] = p->len; /* l_size_t */ - iarg[2] = p->fl; /* l_int */ + iarg[a++] = p->addr; /* l_ulong */ + iarg[a++] = p->len; /* l_size_t */ + iarg[a++] = p->fl; /* l_int */ *n_args = 3; break; } /* linux_mincore */ case 27: { struct linux_mincore_args *p = params; - iarg[0] = p->start; /* l_ulong */ - iarg[1] = p->len; /* l_size_t */ - uarg[2] = (intptr_t)p->vec; /* u_char * */ + iarg[a++] = p->start; /* l_ulong */ + iarg[a++] = p->len; /* l_size_t */ + uarg[a++] = (intptr_t)p->vec; /* u_char * */ *n_args = 3; break; } /* linux_madvise */ case 28: { struct linux_madvise_args *p = params; - iarg[0] = p->addr; /* l_ulong */ - iarg[1] = p->len; /* l_size_t */ - iarg[2] = p->behav; /* l_int */ + iarg[a++] = p->addr; /* l_ulong */ + iarg[a++] = p->len; /* l_size_t */ + iarg[a++] = p->behav; /* l_int */ *n_args = 3; break; } /* linux_shmget */ case 29: { struct linux_shmget_args *p = params; - iarg[0] = p->key; /* l_key_t */ - iarg[1] = p->size; /* l_size_t */ - iarg[2] = p->shmflg; /* l_int */ + iarg[a++] = p->key; /* l_key_t */ + iarg[a++] = p->size; /* l_size_t */ + iarg[a++] = p->shmflg; /* l_int */ *n_args = 3; break; } /* linux_shmat */ case 30: { struct linux_shmat_args *p = params; - iarg[0] = p->shmid; /* l_int */ - uarg[1] = (intptr_t)p->shmaddr; /* char * */ - iarg[2] = p->shmflg; /* l_int */ + iarg[a++] = p->shmid; /* l_int */ + uarg[a++] = (intptr_t)p->shmaddr; /* char * */ + iarg[a++] = p->shmflg; /* l_int */ *n_args = 3; break; } /* linux_shmctl */ case 31: { struct linux_shmctl_args *p = params; - iarg[0] = p->shmid; /* l_int */ - iarg[1] = p->cmd; /* l_int */ - uarg[2] = (intptr_t)p->buf; /* struct l_shmid_ds * */ + iarg[a++] = p->shmid; /* l_int */ + iarg[a++] = p->cmd; /* l_int */ + uarg[a++] = (intptr_t)p->buf; /* struct l_shmid_ds * */ *n_args = 3; break; } /* dup */ case 32: { struct dup_args *p = params; - uarg[0] = p->fd; /* u_int */ + uarg[a++] = p->fd; /* u_int */ *n_args = 1; break; } /* dup2 */ case 33: { struct dup2_args *p = params; - uarg[0] = p->from; /* u_int */ - uarg[1] = p->to; /* u_int */ + uarg[a++] = p->from; /* u_int */ + uarg[a++] = p->to; /* u_int */ *n_args = 2; break; } @@ -317,32 +318,32 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* linux_nanosleep */ case 35: { struct linux_nanosleep_args *p = params; - uarg[0] = (intptr_t)p->rqtp; /* const struct l_timespec * */ - uarg[1] = (intptr_t)p->rmtp; /* struct l_timespec * */ + uarg[a++] = (intptr_t)p->rqtp; /* const struct l_timespec * */ + uarg[a++] = (intptr_t)p->rmtp; /* struct l_timespec * */ *n_args = 2; break; } /* linux_getitimer */ case 36: { struct linux_getitimer_args *p = params; - iarg[0] = p->which; /* l_int */ - uarg[1] = (intptr_t)p->itv; /* struct l_itimerval * */ + iarg[a++] = p->which; /* l_int */ + uarg[a++] = (intptr_t)p->itv; /* struct l_itimerval * */ *n_args = 2; break; } /* linux_alarm */ case 37: { struct linux_alarm_args *p = params; - iarg[0] = p->secs; /* l_uint */ + iarg[a++] = p->secs; /* l_uint */ *n_args = 1; break; } /* linux_setitimer */ case 38: { struct linux_setitimer_args *p = params; - iarg[0] = p->which; /* l_int */ - uarg[1] = (intptr_t)p->itv; /* struct l_itimerval * */ - uarg[2] = (intptr_t)p->oitv; /* struct l_itimerval * */ + iarg[a++] = p->which; /* l_int */ + uarg[a++] = (intptr_t)p->itv; /* struct l_itimerval * */ + uarg[a++] = (intptr_t)p->oitv; /* struct l_itimerval * */ *n_args = 3; break; } @@ -354,165 +355,165 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* linux_sendfile */ case 40: { struct linux_sendfile_args *p = params; - iarg[0] = p->out; /* l_int */ - iarg[1] = p->in; /* l_int */ - uarg[2] = (intptr_t)p->offset; /* l_off_t * */ - iarg[3] = p->count; /* l_size_t */ + iarg[a++] = p->out; /* l_int */ + iarg[a++] = p->in; /* l_int */ + uarg[a++] = (intptr_t)p->offset; /* l_off_t * */ + iarg[a++] = p->count; /* l_size_t */ *n_args = 4; break; } /* linux_socket */ case 41: { struct linux_socket_args *p = params; - iarg[0] = p->domain; /* l_int */ - iarg[1] = p->type; /* l_int */ - iarg[2] = p->protocol; /* l_int */ + iarg[a++] = p->domain; /* l_int */ + iarg[a++] = p->type; /* l_int */ + iarg[a++] = p->protocol; /* l_int */ *n_args = 3; break; } /* linux_connect */ case 42: { struct linux_connect_args *p = params; - iarg[0] = p->s; /* l_int */ - uarg[1] = (intptr_t)p->name; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_int */ + iarg[a++] = p->s; /* l_int */ + uarg[a++] = (intptr_t)p->name; /* l_uintptr_t */ + iarg[a++] = p->namelen; /* l_int */ *n_args = 3; break; } /* linux_accept */ case 43: { struct linux_accept_args *p = params; - iarg[0] = p->s; /* l_int */ - uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ - uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ + iarg[a++] = p->s; /* l_int */ + uarg[a++] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[a++] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } /* linux_sendto */ case 44: { struct linux_sendto_args *p = params; - iarg[0] = p->s; /* l_int */ - uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ - iarg[2] = p->len; /* l_size_t */ - iarg[3] = p->flags; /* l_uint */ - uarg[4] = (intptr_t)p->to; /* l_uintptr_t */ - iarg[5] = p->tolen; /* l_int */ + iarg[a++] = p->s; /* l_int */ + uarg[a++] = (intptr_t)p->msg; /* l_uintptr_t */ + iarg[a++] = p->len; /* l_size_t */ + iarg[a++] = p->flags; /* l_uint */ + uarg[a++] = (intptr_t)p->to; /* l_uintptr_t */ + iarg[a++] = p->tolen; /* l_int */ *n_args = 6; break; } /* linux_recvfrom */ case 45: { struct linux_recvfrom_args *p = params; - iarg[0] = p->s; /* l_int */ - uarg[1] = (intptr_t)p->buf; /* l_uintptr_t */ - iarg[2] = p->len; /* l_size_t */ - iarg[3] = p->flags; /* l_uint */ - uarg[4] = (intptr_t)p->from; /* l_uintptr_t */ - uarg[5] = (intptr_t)p->fromlen; /* l_uintptr_t */ + iarg[a++] = p->s; /* l_int */ + uarg[a++] = (intptr_t)p->buf; /* l_uintptr_t */ + iarg[a++] = p->len; /* l_size_t */ + iarg[a++] = p->flags; /* l_uint */ + uarg[a++] = (intptr_t)p->from; /* l_uintptr_t */ + uarg[a++] = (intptr_t)p->fromlen; /* l_uintptr_t */ *n_args = 6; break; } /* linux_sendmsg */ case 46: { struct linux_sendmsg_args *p = params; - iarg[0] = p->s; /* l_int */ - uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ - iarg[2] = p->flags; /* l_uint */ + iarg[a++] = p->s; /* l_int */ + uarg[a++] = (intptr_t)p->msg; /* l_uintptr_t */ + iarg[a++] = p->flags; /* l_uint */ *n_args = 3; break; } /* linux_recvmsg */ case 47: { struct linux_recvmsg_args *p = params; - iarg[0] = p->s; /* l_int */ - uarg[1] = (intptr_t)p->msg; /* l_uintptr_t */ - iarg[2] = p->flags; /* l_uint */ + iarg[a++] = p->s; /* l_int */ + uarg[a++] = (intptr_t)p->msg; /* l_uintptr_t */ + iarg[a++] = p->flags; /* l_uint */ *n_args = 3; break; } /* linux_shutdown */ case 48: { struct linux_shutdown_args *p = params; - iarg[0] = p->s; /* l_int */ - iarg[1] = p->how; /* l_int */ + iarg[a++] = p->s; /* l_int */ + iarg[a++] = p->how; /* l_int */ *n_args = 2; break; } /* linux_bind */ case 49: { struct linux_bind_args *p = params; - iarg[0] = p->s; /* l_int */ - uarg[1] = (intptr_t)p->name; /* l_uintptr_t */ - iarg[2] = p->namelen; /* l_int */ + iarg[a++] = p->s; /* l_int */ + uarg[a++] = (intptr_t)p->name; /* l_uintptr_t */ + iarg[a++] = p->namelen; /* l_int */ *n_args = 3; break; } /* linux_listen */ case 50: { struct linux_listen_args *p = params; - iarg[0] = p->s; /* l_int */ - iarg[1] = p->backlog; /* l_int */ + iarg[a++] = p->s; /* l_int */ + iarg[a++] = p->backlog; /* l_int */ *n_args = 2; break; } /* linux_getsockname */ case 51: { struct linux_getsockname_args *p = params; - iarg[0] = p->s; /* l_int */ - uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ - uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ + iarg[a++] = p->s; /* l_int */ + uarg[a++] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[a++] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } /* linux_getpeername */ case 52: { struct linux_getpeername_args *p = params; - iarg[0] = p->s; /* l_int */ - uarg[1] = (intptr_t)p->addr; /* l_uintptr_t */ - uarg[2] = (intptr_t)p->namelen; /* l_uintptr_t */ + iarg[a++] = p->s; /* l_int */ + uarg[a++] = (intptr_t)p->addr; /* l_uintptr_t */ + uarg[a++] = (intptr_t)p->namelen; /* l_uintptr_t */ *n_args = 3; break; } /* linux_socketpair */ case 53: { struct linux_socketpair_args *p = params; - iarg[0] = p->domain; /* l_int */ - iarg[1] = p->type; /* l_int */ - iarg[2] = p->protocol; /* l_int */ - uarg[3] = (intptr_t)p->rsv; /* l_uintptr_t */ + iarg[a++] = p->domain; /* l_int */ + iarg[a++] = p->type; /* l_int */ + iarg[a++] = p->protocol; /* l_int */ + uarg[a++] = (intptr_t)p->rsv; /* l_uintptr_t */ *n_args = 4; break; } /* linux_setsockopt */ case 54: { struct linux_setsockopt_args *p = params; - iarg[0] = p->s; /* l_int */ - iarg[1] = p->level; /* l_int */ - iarg[2] = p->optname; /* l_int */ - uarg[3] = (intptr_t)p->optval; /* l_uintptr_t */ - iarg[4] = p->optlen; /* l_int */ + iarg[a++] = p->s; /* l_int */ + iarg[a++] = p->level; /* l_int */ + iarg[a++] = p->optname; /* l_int */ + uarg[a++] = (intptr_t)p->optval; /* l_uintptr_t */ + iarg[a++] = p->optlen; /* l_int */ *n_args = 5; break; } /* linux_getsockopt */ case 55: { struct linux_getsockopt_args *p = params; - iarg[0] = p->s; /* l_int */ - iarg[1] = p->level; /* l_int */ - iarg[2] = p->optname; /* l_int */ - uarg[3] = (intptr_t)p->optval; /* l_uintptr_t */ - uarg[4] = (intptr_t)p->optlen; /* l_uintptr_t */ + iarg[a++] = p->s; /* l_int */ + iarg[a++] = p->level; /* l_int */ + iarg[a++] = p->optname; /* l_int */ + uarg[a++] = (intptr_t)p->optval; /* l_uintptr_t */ + uarg[a++] = (intptr_t)p->optlen; /* l_uintptr_t */ *n_args = 5; break; } /* linux_clone */ case 56: { struct linux_clone_args *p = params; - iarg[0] = p->flags; /* l_ulong */ - iarg[1] = p->stack; /* l_ulong */ - uarg[2] = (intptr_t)p->parent_tidptr; /* l_int * */ - uarg[3] = (intptr_t)p->child_tidptr; /* l_int * */ - iarg[4] = p->tls; /* l_ulong */ + iarg[a++] = p->flags; /* l_ulong */ + iarg[a++] = p->stack; /* l_ulong */ + uarg[a++] = (intptr_t)p->parent_tidptr; /* l_int * */ + uarg[a++] = (intptr_t)p->child_tidptr; /* l_int * */ + iarg[a++] = p->tls; /* l_ulong */ *n_args = 5; break; } @@ -529,353 +530,353 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* linux_execve */ case 59: { struct linux_execve_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ - uarg[1] = (intptr_t)p->argp; /* char ** */ - uarg[2] = (intptr_t)p->envp; /* char ** */ + uarg[a++] = (intptr_t)p->path; /* char * */ + uarg[a++] = (intptr_t)p->argp; /* char ** */ + uarg[a++] = (intptr_t)p->envp; /* char ** */ *n_args = 3; break; } /* linux_exit */ case 60: { struct linux_exit_args *p = params; - iarg[0] = p->rval; /* l_int */ + iarg[a++] = p->rval; /* l_int */ *n_args = 1; break; } /* linux_wait4 */ case 61: { struct linux_wait4_args *p = params; - iarg[0] = p->pid; /* l_pid_t */ - uarg[1] = (intptr_t)p->status; /* l_int * */ - iarg[2] = p->options; /* l_int */ - uarg[3] = (intptr_t)p->rusage; /* struct rusage * */ + iarg[a++] = p->pid; /* l_pid_t */ + uarg[a++] = (intptr_t)p->status; /* l_int * */ + iarg[a++] = p->options; /* l_int */ + uarg[a++] = (intptr_t)p->rusage; /* struct rusage * */ *n_args = 4; break; } /* linux_kill */ case 62: { struct linux_kill_args *p = params; - iarg[0] = p->pid; /* l_pid_t */ - iarg[1] = p->signum; /* l_int */ + iarg[a++] = p->pid; /* l_pid_t */ + iarg[a++] = p->signum; /* l_int */ *n_args = 2; break; } /* linux_newuname */ case 63: { struct linux_newuname_args *p = params; - uarg[0] = (intptr_t)p->buf; /* struct l_new_utsname * */ + uarg[a++] = (intptr_t)p->buf; /* struct l_new_utsname * */ *n_args = 1; break; } /* linux_semget */ case 64: { struct linux_semget_args *p = params; - iarg[0] = p->key; /* l_key_t */ - iarg[1] = p->nsems; /* l_int */ - iarg[2] = p->semflg; /* l_int */ + iarg[a++] = p->key; /* l_key_t */ + iarg[a++] = p->nsems; /* l_int */ + iarg[a++] = p->semflg; /* l_int */ *n_args = 3; break; } /* linux_semop */ case 65: { struct linux_semop_args *p = params; - iarg[0] = p->semid; /* l_int */ - uarg[1] = (intptr_t)p->tsops; /* struct l_sembuf * */ - iarg[2] = p->nsops; /* l_uint */ + iarg[a++] = p->semid; /* l_int */ + uarg[a++] = (intptr_t)p->tsops; /* struct l_sembuf * */ + iarg[a++] = p->nsops; /* l_uint */ *n_args = 3; break; } /* linux_semctl */ case 66: { struct linux_semctl_args *p = params; - iarg[0] = p->semid; /* l_int */ - iarg[1] = p->semnum; /* l_int */ - iarg[2] = p->cmd; /* l_int */ - uarg[3] = p->arg.buf; /* union l_semun */ + iarg[a++] = p->semid; /* l_int */ + iarg[a++] = p->semnum; /* l_int */ + iarg[a++] = p->cmd; /* l_int */ + uarg[a++] = p->arg.buf; /* union l_semun */ *n_args = 4; break; } /* linux_shmdt */ case 67: { struct linux_shmdt_args *p = params; - uarg[0] = (intptr_t)p->shmaddr; /* char * */ + uarg[a++] = (intptr_t)p->shmaddr; /* char * */ *n_args = 1; break; } /* linux_msgget */ case 68: { struct linux_msgget_args *p = params; - iarg[0] = p->key; /* l_key_t */ - iarg[1] = p->msgflg; /* l_int */ + iarg[a++] = p->key; /* l_key_t */ + iarg[a++] = p->msgflg; /* l_int */ *n_args = 2; break; } /* linux_msgsnd */ case 69: { struct linux_msgsnd_args *p = params; - iarg[0] = p->msqid; /* l_int */ - uarg[1] = (intptr_t)p->msgp; /* struct l_msgbuf * */ - iarg[2] = p->msgsz; /* l_size_t */ - iarg[3] = p->msgflg; /* l_int */ + iarg[a++] = p->msqid; /* l_int */ + uarg[a++] = (intptr_t)p->msgp; /* struct l_msgbuf * */ + iarg[a++] = p->msgsz; /* l_size_t */ + iarg[a++] = p->msgflg; /* l_int */ *n_args = 4; break; } /* linux_msgrcv */ case 70: { struct linux_msgrcv_args *p = params; - iarg[0] = p->msqid; /* l_int */ - uarg[1] = (intptr_t)p->msgp; /* struct l_msgbuf * */ - iarg[2] = p->msgsz; /* l_size_t */ - iarg[3] = p->msgtyp; /* l_long */ - iarg[4] = p->msgflg; /* l_int */ + iarg[a++] = p->msqid; /* l_int */ + uarg[a++] = (intptr_t)p->msgp; /* struct l_msgbuf * */ + iarg[a++] = p->msgsz; /* l_size_t */ + iarg[a++] = p->msgtyp; /* l_long */ + iarg[a++] = p->msgflg; /* l_int */ *n_args = 5; break; } /* linux_msgctl */ case 71: { struct linux_msgctl_args *p = params; - iarg[0] = p->msqid; /* l_int */ - iarg[1] = p->cmd; /* l_int */ - uarg[2] = (intptr_t)p->buf; /* struct l_msqid_ds * */ + iarg[a++] = p->msqid; /* l_int */ + iarg[a++] = p->cmd; /* l_int */ + uarg[a++] = (intptr_t)p->buf; /* struct l_msqid_ds * */ *n_args = 3; break; } /* linux_fcntl */ case 72: { struct linux_fcntl_args *p = params; - iarg[0] = p->fd; /* l_uint */ - iarg[1] = p->cmd; /* l_uint */ - iarg[2] = p->arg; /* l_ulong */ + iarg[a++] = p->fd; /* l_uint */ + iarg[a++] = p->cmd; /* l_uint */ + iarg[a++] = p->arg; /* l_ulong */ *n_args = 3; break; } /* flock */ case 73: { struct flock_args *p = params; - iarg[0] = p->fd; /* int */ - iarg[1] = p->how; /* int */ + iarg[a++] = p->fd; /* int */ + iarg[a++] = p->how; /* int */ *n_args = 2; break; } /* fsync */ case 74: { struct fsync_args *p = params; - iarg[0] = p->fd; /* int */ + iarg[a++] = p->fd; /* int */ *n_args = 1; break; } /* linux_fdatasync */ case 75: { struct linux_fdatasync_args *p = params; - iarg[0] = p->fd; /* l_uint */ + iarg[a++] = p->fd; /* l_uint */ *n_args = 1; break; } /* linux_truncate */ case 76: { struct linux_truncate_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ - iarg[1] = p->length; /* l_long */ + uarg[a++] = (intptr_t)p->path; /* char * */ + iarg[a++] = p->length; /* l_long */ *n_args = 2; break; } /* linux_ftruncate */ case 77: { struct linux_ftruncate_args *p = params; - iarg[0] = p->fd; /* l_int */ - iarg[1] = p->length; /* l_ulong */ + iarg[a++] = p->fd; /* l_int */ + iarg[a++] = p->length; /* l_ulong */ *n_args = 2; break; } /* linux_getdents */ case 78: { struct linux_getdents_args *p = params; - iarg[0] = p->fd; /* l_uint */ - uarg[1] = (intptr_t)p->dent; /* void * */ - iarg[2] = p->count; /* l_uint */ + iarg[a++] = p->fd; /* l_uint */ + uarg[a++] = (intptr_t)p->dent; /* void * */ + iarg[a++] = p->count; /* l_uint */ *n_args = 3; break; } /* linux_getcwd */ case 79: { struct linux_getcwd_args *p = params; - uarg[0] = (intptr_t)p->buf; /* char * */ - iarg[1] = p->bufsize; /* l_ulong */ + uarg[a++] = (intptr_t)p->buf; /* char * */ + iarg[a++] = p->bufsize; /* l_ulong */ *n_args = 2; break; } /* linux_chdir */ case 80: { struct linux_chdir_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ + uarg[a++] = (intptr_t)p->path; /* char * */ *n_args = 1; break; } /* fchdir */ case 81: { struct fchdir_args *p = params; - iarg[0] = p->fd; /* int */ + iarg[a++] = p->fd; /* int */ *n_args = 1; break; } /* linux_rename */ case 82: { struct linux_rename_args *p = params; - uarg[0] = (intptr_t)p->from; /* char * */ - uarg[1] = (intptr_t)p->to; /* char * */ + uarg[a++] = (intptr_t)p->from; /* char * */ + uarg[a++] = (intptr_t)p->to; /* char * */ *n_args = 2; break; } /* linux_mkdir */ case 83: { struct linux_mkdir_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ - iarg[1] = p->mode; /* l_mode_t */ + uarg[a++] = (intptr_t)p->path; /* char * */ + iarg[a++] = p->mode; /* l_mode_t */ *n_args = 2; break; } /* linux_rmdir */ case 84: { struct linux_rmdir_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ + uarg[a++] = (intptr_t)p->path; /* char * */ *n_args = 1; break; } /* linux_creat */ case 85: { struct linux_creat_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ - iarg[1] = p->mode; /* l_mode_t */ + uarg[a++] = (intptr_t)p->path; /* char * */ + iarg[a++] = p->mode; /* l_mode_t */ *n_args = 2; break; } /* linux_link */ case 86: { struct linux_link_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ - uarg[1] = (intptr_t)p->to; /* char * */ + uarg[a++] = (intptr_t)p->path; /* char * */ + uarg[a++] = (intptr_t)p->to; /* char * */ *n_args = 2; break; } /* linux_unlink */ case 87: { struct linux_unlink_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ *** 20990 LINES SKIPPED *** From nobody Mon Nov 22 22:37:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0B45D189309E; Mon, 22 Nov 2021 22:37: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 4HyhxJ0SNJz4YV1; Mon, 22 Nov 2021 22:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B073F2E3E; Mon, 22 Nov 2021 22:37: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 1AMMbrcK047370; Mon, 22 Nov 2021 22:37:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbrrg047369; Mon, 22 Nov 2021 22:37:53 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:53 GMT Message-Id: <202111222237.1AMMbrrg047369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 64007b000a2f - main - makesyscalls: handle 64-bit args on 32-bit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 64007b000a2fdbac64c35aa05dd192609325a0a3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=64007b000a2fdbac64c35aa05dd192609325a0a3 commit 64007b000a2fdbac64c35aa05dd192609325a0a3 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:57 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:57 +0000 makesyscalls: handle 64-bit args on 32-bit On 32-bit architectures, 64-bit arguments are passed in pairs of registers. On non-x86 architectures these arguments must be in evenly aligned registers which necessiciates inserting a pad register into the argument list. This has historically been supported by adding ifdefs around padded and unpadded syscall defintions in syscalls.master. In order to enable generation of 32-bit support files from the base syscalls.master, pull this support in to makesyscalls.lua enabled by adding pair_64bit to abi_flags. The changes to sys_proto.h simply add #ifdef PAD64_REQUIRED around pad arguments in struct _args. In systrace_args(), replace static syscall index values with post-incremented indexs allowing a simple ifdef around the argument. Under -O1 or higher code generation is identical. systrace_entry_setargdesc() is a bit more complicated as we switch on argument indices. Solve this with some use of define/undef pairs to compute the correct indices. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 106 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 87 insertions(+), 19 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index a5387463e4e2..1e66a6b319f3 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -167,6 +167,14 @@ local known_abi_flags = { "[*][*]", }, }, + pair_64bit = { + value = 0x00000010, + exprs = { + "^dev_t[ ]*$", + "^id_t[ ]*$", + "^off_t[ ]*$", + }, + }, } local known_flags = { @@ -426,6 +434,11 @@ local function isptrarraytype(type) return type:find("[*][*]") or type:find("[*][ ]*const[ ]*[*]") end +-- Find types that are always 64-bits wide +local function is64bittype(type) + return type:find("^dev_t[ ]*$") or type:find("^id_t[ ]*$") or type:find("^off_t[ ]*$") +end + local process_syscall_def -- These patterns are processed in order on any line that isn't empty. @@ -648,10 +661,27 @@ local function process_args(args) abi_type_suffix) end - funcargs[#funcargs + 1] = { - type = argtype, - name = argname, - } + if abi_changes("pair_64bit") and is64bittype(argtype) then + if #funcargs % 2 == 1 then + funcargs[#funcargs + 1] = { + type = "int", + name = "_pad", + } + end + funcargs[#funcargs + 1] = { + type = "uint32_t", + name = argname .. "1", + } + funcargs[#funcargs + 1] = { + type = "uint32_t", + name = argname .. "2", + } + else + funcargs[#funcargs + 1] = { + type = argtype, + name = argname, + } + end end ::out:: @@ -686,45 +716,62 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, write_line("systrace", string.format( "\t\tstruct %s *p = params;\n", argalias)) - local argtype, argname + + local argtype, argname, desc, padding + padding = "" for idx, arg in ipairs(funcargs) do argtype = arg["type"] argname = arg["name"] argtype = trim(argtype:gsub("__restrict$", ""), nil) + if argtype == "int" and argname == "_pad" and abi_changes("pair_64bit") then + write_line("systracetmp", "#ifdef PAD64_REQUIRED\n") + end -- Pointer arg? if argtype:find("*") then - write_line("systracetmp", string.format( - "\t\tcase %d:\n\t\t\tp = \"userland %s\";\n\t\t\tbreak;\n", - idx - 1, argtype)) + desc = "userland " .. argtype else - write_line("systracetmp", string.format( - "\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", - idx - 1, argtype)) + desc = argtype; + end + write_line("systracetmp", string.format( + "\t\tcase %d%s:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", + idx - 1, padding, desc)) + if argtype == "int" and argname == "_pad" and abi_changes("pair_64bit") then + padding = " - _P_" + write_line("systracetmp", "#define _P_ 0\n#else\n#define _P_ 1\n#endif\n") end if isptrtype(argtype) then write_line("systrace", string.format( - "\t\tuarg[%d] = (%s)p->%s; /* %s */\n", - idx - 1, config["ptr_intptr_t_cast"], + "\t\tuarg[a++] = (%s)p->%s; /* %s */\n", + config["ptr_intptr_t_cast"], argname, argtype)) elseif argtype == "union l_semun" then write_line("systrace", string.format( - "\t\tuarg[%d] = p->%s.buf; /* %s */\n", - idx - 1, argname, argtype)) + "\t\tuarg[a++] = p->%s.buf; /* %s */\n", + argname, argtype)) elseif argtype:sub(1,1) == "u" or argtype == "size_t" then write_line("systrace", string.format( - "\t\tuarg[%d] = p->%s; /* %s */\n", - idx - 1, argname, argtype)) + "\t\tuarg[a++] = p->%s; /* %s */\n", + argname, argtype)) else + if argtype == "int" and argname == "_pad" and abi_changes("pair_64bit") then + write_line("systrace", "#ifdef PAD64_REQUIRED\n") + end write_line("systrace", string.format( - "\t\tiarg[%d] = p->%s; /* %s */\n", - idx - 1, argname, argtype)) + "\t\tiarg[a++] = p->%s; /* %s */\n", + argname, argtype)) + if argtype == "int" and argname == "_pad" and abi_changes("pair_64bit") then + write_line("systrace", "#endif\n") + end end end write_line("systracetmp", "\t\tdefault:\n\t\t\tbreak;\n\t\t};\n") + if padding ~= "" then + write_line("systracetmp", "#undef _P_\n\n") + end write_line("systraceret", string.format([[ if (ndx == 0 || ndx == 1) @@ -743,11 +790,17 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, argalias)) for _, v in ipairs(funcargs) do local argname, argtype = v["name"], v["type"] + if argtype == "int" and argname == "_pad" and abi_changes("pair_64bit") then + write_line("sysarg", "#ifdef PAD64_REQUIRED\n") + end write_line("sysarg", string.format( "\tchar %s_l_[PADL_(%s)]; %s %s; char %s_r_[PADR_(%s)];\n", argname, argtype, argtype, argname, argname, argtype)) + if argtype == "int" and argname == "_pad" and abi_changes("pair_64bit") then + write_line("sysarg", "#endif\n") + end end write_line("sysarg", "};\n") else @@ -1284,6 +1337,20 @@ struct thread; ]], generated_tag, config['os_id_keyword'], config['sysproto_h'], config['sysproto_h'])) +if abi_changes("pair_64bit") then + write_line("sysarg", string.format([[ +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) +#define PAD64_REQUIRED +#endif +]])) +end +if abi_changes("pair_64bit") then + write_line("systrace", string.format([[ +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) +#define PAD64_REQUIRED +#endif +]])) +end for _, v in pairs(compat_options) do write_line(v["tmp"], string.format("\n#ifdef %s\n\n", v["definition"])) end @@ -1324,6 +1391,7 @@ static void systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) { int64_t *iarg = (int64_t *)uarg; + int a = 0; switch (sysnum) { ]], generated_tag, config['os_id_keyword'])) From nobody Mon Nov 22 22:37:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 60FB31893304; Mon, 22 Nov 2021 22:38: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 4HyhxN1jDJz4YSf; Mon, 22 Nov 2021 22:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A7942D64; Mon, 22 Nov 2021 22:37: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 1AMMbvFK047448; Mon, 22 Nov 2021 22:37:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbvAV047447; Mon, 22 Nov 2021 22:37:57 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:57 GMT Message-Id: <202111222237.1AMMbvAV047447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 30bc335a0501 - main - freebsd32: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30bc335a0501c65f0724fe8579e54746b1260224 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=30bc335a0501c65f0724fe8579e54746b1260224 commit 30bc335a0501c65f0724fe8579e54746b1260224 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:57 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:57 +0000 freebsd32: regen --- sys/compat/freebsd32/freebsd32_proto.h | 339 +--------- sys/compat/freebsd32/freebsd32_syscall.h | 14 - sys/compat/freebsd32/freebsd32_syscalls.c | 35 -- sys/compat/freebsd32/freebsd32_sysent.c | 35 -- sys/compat/freebsd32/freebsd32_systrace_args.c | 824 ++++++------------------- 5 files changed, 209 insertions(+), 1038 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 2da70e33d2ac..33323c902745 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -247,12 +247,13 @@ struct freebsd32_lutimes_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char tptr_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * tptr; char tptr_r_[PADR_(const struct timeval32 *)]; }; -#ifdef PAD64_REQUIRED struct freebsd32_preadv_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; @@ -260,26 +261,12 @@ struct freebsd32_pwritev_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; -#else -struct freebsd32_preadv_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; - char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; - char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; - char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; -}; -struct freebsd32_pwritev_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; - char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; - char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; - char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; -}; -#endif struct freebsd32_modstat_args { char modid_l_[PADL_(int)]; int modid; char modid_r_[PADR_(int)]; char stat_l_[PADL_(struct module_stat32 *)]; struct module_stat32 * stat; char stat_r_[PADR_(struct module_stat32 *)]; @@ -424,12 +411,13 @@ struct freebsd32_aio_fsync_args { char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; }; -#ifdef PAD64_REQUIRED struct freebsd32_pread_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; @@ -437,7 +425,9 @@ struct freebsd32_pwrite_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; @@ -447,86 +437,46 @@ struct freebsd32_mmap_args { char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char pos1_l_[PADL_(uint32_t)]; uint32_t pos1; char pos1_r_[PADR_(uint32_t)]; char pos2_l_[PADL_(uint32_t)]; uint32_t pos2; char pos2_r_[PADR_(uint32_t)]; }; struct freebsd32_lseek_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct freebsd32_truncate_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; }; struct freebsd32_ftruncate_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; }; -#else -struct freebsd32_pread_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; - char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; - char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; - char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; -}; -struct freebsd32_pwrite_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; - char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; - char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; - char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; -}; -struct freebsd32_mmap_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; - char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; - char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pos1_l_[PADL_(uint32_t)]; uint32_t pos1; char pos1_r_[PADR_(uint32_t)]; - char pos2_l_[PADL_(uint32_t)]; uint32_t pos2; char pos2_r_[PADR_(uint32_t)]; -}; -struct freebsd32_lseek_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; - char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; - char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; -}; -struct freebsd32_truncate_args { - char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; - char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; -}; -struct freebsd32_ftruncate_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; - char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; -}; -#endif -#ifdef PAD64_REQUIRED struct freebsd32_cpuset_setid_args { char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char setid_l_[PADL_(cpusetid_t)]; cpusetid_t setid; char setid_r_[PADR_(cpusetid_t)]; }; -#else -struct freebsd32_cpuset_setid_args { - char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; - char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; - char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; - char setid_l_[PADL_(cpusetid_t)]; cpusetid_t setid; char setid_r_[PADR_(cpusetid_t)]; -}; -#endif struct freebsd32_cpuset_getid_args { char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)]; char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; @@ -594,10 +544,11 @@ struct freebsd32_pselect_args { char ts_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * ts; char ts_r_[PADR_(const struct timespec32 *)]; char sm_l_[PADL_(const sigset_t *)]; const sigset_t * sm; char sm_r_[PADR_(const sigset_t *)]; }; -#ifdef PAD64_REQUIRED struct freebsd32_posix_fallocate_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; char len1_l_[PADL_(uint32_t)]; uint32_t len1; char len1_r_[PADR_(uint32_t)]; @@ -605,7 +556,9 @@ struct freebsd32_posix_fallocate_args { }; struct freebsd32_posix_fadvise_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; char len1_l_[PADL_(uint32_t)]; uint32_t len1; char len1_r_[PADR_(uint32_t)]; @@ -614,7 +567,9 @@ struct freebsd32_posix_fadvise_args { }; struct freebsd32_wait6_args { char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; @@ -622,32 +577,6 @@ struct freebsd32_wait6_args { char wrusage_l_[PADL_(struct __wrusage32 *)]; struct __wrusage32 * wrusage; char wrusage_r_[PADR_(struct __wrusage32 *)]; char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; }; -#else -struct freebsd32_posix_fallocate_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; - char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; - char len1_l_[PADL_(uint32_t)]; uint32_t len1; char len1_r_[PADR_(uint32_t)]; - char len2_l_[PADL_(uint32_t)]; uint32_t len2; char len2_r_[PADR_(uint32_t)]; -}; -struct freebsd32_posix_fadvise_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; - char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; - char len1_l_[PADL_(uint32_t)]; uint32_t len1; char len1_r_[PADR_(uint32_t)]; - char len2_l_[PADL_(uint32_t)]; uint32_t len2; char len2_r_[PADR_(uint32_t)]; - char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)]; -}; -struct freebsd32_wait6_args { - char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; - char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; - char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; - char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; - char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)]; - char wrusage_l_[PADL_(struct __wrusage32 *)]; struct __wrusage32 * wrusage; char wrusage_r_[PADR_(struct __wrusage32 *)]; - char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; -}; -#endif struct freebsd32_cap_ioctls_limit_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char cmds_l_[PADL_(const uint32_t *)]; const uint32_t * cmds; char cmds_r_[PADR_(const uint32_t *)]; @@ -661,24 +590,16 @@ struct freebsd32_cap_ioctls_get_args { struct freebsd32_aio_mlock_args { char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; }; -#ifdef PAD64_REQUIRED struct freebsd32_procctl_args { char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char com_l_[PADL_(int)]; int com; char com_r_[PADR_(int)]; char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)]; }; -#else -struct freebsd32_procctl_args { - char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; - char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; - char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; - char com_l_[PADL_(int)]; int com; char com_r_[PADR_(int)]; - char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)]; -}; -#endif struct freebsd32_ppoll_args { char fds_l_[PADL_(struct pollfd *)]; struct pollfd * fds; char fds_r_[PADR_(struct pollfd *)]; char nfds_l_[PADL_(u_int)]; u_int nfds; char nfds_r_[PADR_(u_int)]; @@ -714,24 +635,16 @@ struct freebsd32_getfsstat_args { char bufsize_l_[PADL_(int32_t)]; int32_t bufsize; char bufsize_r_[PADR_(int32_t)]; char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; }; -#ifdef PAD64_REQUIRED struct freebsd32_mknodat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; +#ifdef PAD64_REQUIRED char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; +#endif char dev1_l_[PADL_(uint32_t)]; uint32_t dev1; char dev1_r_[PADR_(uint32_t)]; char dev2_l_[PADL_(uint32_t)]; uint32_t dev2; char dev2_r_[PADR_(uint32_t)]; }; -#else -struct freebsd32_mknodat_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; - char dev1_l_[PADL_(uint32_t)]; uint32_t dev1; char dev1_r_[PADR_(uint32_t)]; - char dev2_l_[PADL_(uint32_t)]; uint32_t dev2; char dev2_r_[PADR_(uint32_t)]; -}; -#endif struct freebsd32_kevent_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char changelist_l_[PADL_(const struct kevent32 *)]; const struct kevent32 * changelist; char changelist_r_[PADR_(const struct kevent32 *)]; @@ -772,9 +685,6 @@ struct freebsd32_aio_writev_args { struct freebsd32_aio_readv_args { char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; }; -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif int freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *); int freebsd32_ptrace(struct thread *, struct freebsd32_ptrace_args *); int freebsd32_recvmsg(struct thread *, struct freebsd32_recvmsg_args *); @@ -818,13 +728,8 @@ int freebsd32_aio_read(struct thread *, struct freebsd32_aio_read_args *); int freebsd32_aio_write(struct thread *, struct freebsd32_aio_write_args *); int freebsd32_lio_listio(struct thread *, struct freebsd32_lio_listio_args *); int freebsd32_lutimes(struct thread *, struct freebsd32_lutimes_args *); -#ifdef PAD64_REQUIRED -int freebsd32_preadv(struct thread *, struct freebsd32_preadv_args *); -int freebsd32_pwritev(struct thread *, struct freebsd32_pwritev_args *); -#else int freebsd32_preadv(struct thread *, struct freebsd32_preadv_args *); int freebsd32_pwritev(struct thread *, struct freebsd32_pwritev_args *); -#endif int freebsd32_modstat(struct thread *, struct freebsd32_modstat_args *); int freebsd32_kldstat(struct thread *, struct freebsd32_kldstat_args *); int freebsd32_aio_return(struct thread *, struct freebsd32_aio_return_args *); @@ -856,26 +761,13 @@ int freebsd32_kmq_timedsend(struct thread *, struct freebsd32_kmq_timedsend_args int freebsd32_kmq_notify(struct thread *, struct freebsd32_kmq_notify_args *); int freebsd32_abort2(struct thread *, struct freebsd32_abort2_args *); int freebsd32_aio_fsync(struct thread *, struct freebsd32_aio_fsync_args *); -#ifdef PAD64_REQUIRED int freebsd32_pread(struct thread *, struct freebsd32_pread_args *); int freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *); int freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *); int freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *); int freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *); int freebsd32_ftruncate(struct thread *, struct freebsd32_ftruncate_args *); -#else -int freebsd32_pread(struct thread *, struct freebsd32_pread_args *); -int freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *); -int freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *); -int freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *); -int freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *); -int freebsd32_ftruncate(struct thread *, struct freebsd32_ftruncate_args *); -#endif -#ifdef PAD64_REQUIRED -int freebsd32_cpuset_setid(struct thread *, struct freebsd32_cpuset_setid_args *); -#else int freebsd32_cpuset_setid(struct thread *, struct freebsd32_cpuset_setid_args *); -#endif int freebsd32_cpuset_getid(struct thread *, struct freebsd32_cpuset_getid_args *); int freebsd32_cpuset_getaffinity(struct thread *, struct freebsd32_cpuset_getaffinity_args *); int freebsd32_cpuset_setaffinity(struct thread *, struct freebsd32_cpuset_setaffinity_args *); @@ -887,23 +779,13 @@ int freebsd32___semctl(struct thread *, struct freebsd32___semctl_args *); int freebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *); int freebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *); int freebsd32_pselect(struct thread *, struct freebsd32_pselect_args *); -#ifdef PAD64_REQUIRED int freebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *); int freebsd32_posix_fadvise(struct thread *, struct freebsd32_posix_fadvise_args *); int freebsd32_wait6(struct thread *, struct freebsd32_wait6_args *); -#else -int freebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *); -int freebsd32_posix_fadvise(struct thread *, struct freebsd32_posix_fadvise_args *); -int freebsd32_wait6(struct thread *, struct freebsd32_wait6_args *); -#endif int freebsd32_cap_ioctls_limit(struct thread *, struct freebsd32_cap_ioctls_limit_args *); int freebsd32_cap_ioctls_get(struct thread *, struct freebsd32_cap_ioctls_get_args *); int freebsd32_aio_mlock(struct thread *, struct freebsd32_aio_mlock_args *); -#ifdef PAD64_REQUIRED -int freebsd32_procctl(struct thread *, struct freebsd32_procctl_args *); -#else int freebsd32_procctl(struct thread *, struct freebsd32_procctl_args *); -#endif int freebsd32_ppoll(struct thread *, struct freebsd32_ppoll_args *); int freebsd32_futimens(struct thread *, struct freebsd32_futimens_args *); int freebsd32_utimensat(struct thread *, struct freebsd32_utimensat_args *); @@ -911,11 +793,7 @@ int freebsd32_fstat(struct thread *, struct freebsd32_fstat_args *); int freebsd32_fstatat(struct thread *, struct freebsd32_fstatat_args *); int freebsd32_fhstat(struct thread *, struct freebsd32_fhstat_args *); int freebsd32_getfsstat(struct thread *, struct freebsd32_getfsstat_args *); -#ifdef PAD64_REQUIRED int freebsd32_mknodat(struct thread *, struct freebsd32_mknodat_args *); -#else -int freebsd32_mknodat(struct thread *, struct freebsd32_mknodat_args *); -#endif int freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *); int freebsd32_cpuset_getdomain(struct thread *, struct freebsd32_cpuset_getdomain_args *); int freebsd32_cpuset_setdomain(struct thread *, struct freebsd32_cpuset_setdomain_args *); @@ -925,9 +803,6 @@ int freebsd32_aio_readv(struct thread *, struct freebsd32_aio_readv_args *); #ifdef COMPAT_43 -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif struct ofreebsd32_lseek_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char offset_l_[PADL_(int32_t)]; int32_t offset; char offset_r_[PADR_(int32_t)]; @@ -997,24 +872,6 @@ struct ofreebsd32_getdirentries_args { char count_l_[PADL_(u_int)]; u_int count; char count_r_[PADR_(u_int)]; char basep_l_[PADL_(int32_t *)]; int32_t * basep; char basep_r_[PADR_(int32_t *)]; }; -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif int ofreebsd32_lseek(struct thread *, struct ofreebsd32_lseek_args *); int ofreebsd32_stat(struct thread *, struct ofreebsd32_stat_args *); int ofreebsd32_lstat(struct thread *, struct ofreebsd32_lstat_args *); @@ -1036,9 +893,6 @@ int ofreebsd32_getdirentries(struct thread *, struct ofreebsd32_getdirentries_ar #ifdef COMPAT_FREEBSD4 -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif struct freebsd4_freebsd32_getfsstat_args { char buf_l_[PADL_(struct ostatfs32 *)]; struct ostatfs32 * buf; char buf_r_[PADR_(struct ostatfs32 *)]; char bufsize_l_[PADL_(int32_t)]; int32_t bufsize; char bufsize_r_[PADR_(int32_t)]; @@ -1052,9 +906,6 @@ struct freebsd4_freebsd32_fstatfs_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(struct ostatfs32 *)]; struct ostatfs32 * buf; char buf_r_[PADR_(struct ostatfs32 *)]; }; -#ifdef PAD64_REQUIRED -#else -#endif struct freebsd4_freebsd32_fhstatfs_args { char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; char buf_l_[PADL_(struct ostatfs32 *)]; struct ostatfs32 * buf; char buf_r_[PADR_(struct ostatfs32 *)]; @@ -1077,21 +928,6 @@ struct freebsd4_freebsd32_sigaction_args { struct freebsd4_freebsd32_sigreturn_args { char sigcntxp_l_[PADL_(const struct freebsd4_ucontext32 *)]; const struct freebsd4_ucontext32 * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd4_ucontext32 *)]; }; -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif int freebsd4_freebsd32_getfsstat(struct thread *, struct freebsd4_freebsd32_getfsstat_args *); int freebsd4_freebsd32_statfs(struct thread *, struct freebsd4_freebsd32_statfs_args *); int freebsd4_freebsd32_fstatfs(struct thread *, struct freebsd4_freebsd32_fstatfs_args *); @@ -1105,9 +941,6 @@ int freebsd4_freebsd32_sigreturn(struct thread *, struct freebsd4_freebsd32_sigr #ifdef COMPAT_FREEBSD6 -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif struct freebsd6_freebsd32_pread_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; @@ -1153,9 +986,6 @@ struct freebsd6_freebsd32_ftruncate_args { char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; }; -#ifdef PAD64_REQUIRED -#else -#endif struct freebsd6_freebsd32_aio_read_args { char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)]; }; @@ -1168,21 +998,6 @@ struct freebsd6_freebsd32_lio_listio_args { char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; char sig_l_[PADL_(struct osigevent32 *)]; struct osigevent32 * sig; char sig_r_[PADR_(struct osigevent32 *)]; }; -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif int freebsd6_freebsd32_pread(struct thread *, struct freebsd6_freebsd32_pread_args *); int freebsd6_freebsd32_pwrite(struct thread *, struct freebsd6_freebsd32_pwrite_args *); int freebsd6_freebsd32_mmap(struct thread *, struct freebsd6_freebsd32_mmap_args *); @@ -1198,9 +1013,6 @@ int freebsd6_freebsd32_lio_listio(struct thread *, struct freebsd6_freebsd32_lio #ifdef COMPAT_FREEBSD7 -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif struct freebsd7_freebsd32___semctl_args { char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; @@ -1217,24 +1029,6 @@ struct freebsd7_freebsd32_shmctl_args { char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; char buf_l_[PADL_(struct shmid_ds_old32 *)]; struct shmid_ds_old32 * buf; char buf_r_[PADR_(struct shmid_ds_old32 *)]; }; -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif int freebsd7_freebsd32___semctl(struct thread *, struct freebsd7_freebsd32___semctl_args *); int freebsd7_freebsd32_msgctl(struct thread *, struct freebsd7_freebsd32_msgctl_args *); int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_args *); @@ -1244,33 +1038,12 @@ int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_ #ifdef COMPAT_FREEBSD10 -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif -#ifdef PAD64_REQUIRED -#else -#endif struct freebsd10_freebsd32__umtx_lock_args { char umtx_l_[PADL_(struct umtx *)]; struct umtx * umtx; char umtx_r_[PADR_(struct umtx *)]; }; struct freebsd10_freebsd32__umtx_unlock_args { char umtx_l_[PADL_(struct umtx *)]; struct umtx * umtx; char umtx_r_[PADR_(struct umtx *)]; }; -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif int freebsd10_freebsd32__umtx_lock(struct thread *, struct freebsd10_freebsd32__umtx_lock_args *); int freebsd10_freebsd32__umtx_unlock(struct thread *, struct freebsd10_freebsd32__umtx_unlock_args *); @@ -1279,9 +1052,6 @@ int freebsd10_freebsd32__umtx_unlock(struct thread *, struct freebsd10_freebsd32 #ifdef COMPAT_FREEBSD11 -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif struct freebsd11_freebsd32_stat_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * ub; char ub_r_[PADR_(struct freebsd11_stat32 *)]; @@ -1312,9 +1082,6 @@ struct freebsd11_freebsd32_nlstat_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct nstat32 *)]; struct nstat32 * ub; char ub_r_[PADR_(struct nstat32 *)]; }; -#ifdef PAD64_REQUIRED -#else -#endif struct freebsd11_freebsd32_fhstat_args { char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; char sb_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * sb; char sb_r_[PADR_(struct freebsd11_stat32 *)]; @@ -1332,27 +1099,12 @@ struct freebsd11_freebsd32_getfsstat_args { char bufsize_l_[PADL_(int32_t)]; int32_t bufsize; char bufsize_r_[PADR_(int32_t)]; char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; }; -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif struct freebsd11_freebsd32_fstatat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char buf_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * buf; char buf_r_[PADR_(struct freebsd11_stat32 *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif int freebsd11_freebsd32_stat(struct thread *, struct freebsd11_freebsd32_stat_args *); int freebsd11_freebsd32_fstat(struct thread *, struct freebsd11_freebsd32_fstat_args *); int freebsd11_freebsd32_lstat(struct thread *, struct freebsd11_freebsd32_lstat_args *); @@ -1370,27 +1122,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #ifdef COMPAT_FREEBSD12 -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif -#ifdef PAD64_REQUIRED -#else -#endif #endif /* COMPAT_FREEBSD12 */ @@ -1473,8 +1204,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd11_freebsd32_nlstat AUE_LSTAT #define FREEBSD32_SYS_AUE_freebsd32_preadv AUE_PREADV #define FREEBSD32_SYS_AUE_freebsd32_pwritev AUE_PWRITEV -#define FREEBSD32_SYS_AUE_freebsd32_preadv AUE_PREADV -#define FREEBSD32_SYS_AUE_freebsd32_pwritev AUE_PWRITEV #define FREEBSD32_SYS_AUE_freebsd4_freebsd32_fhstatfs AUE_FHSTATFS #define FREEBSD32_SYS_AUE_freebsd11_freebsd32_fhstat AUE_FHSTAT #define FREEBSD32_SYS_AUE_freebsd32_modstat AUE_NULL @@ -1524,13 +1253,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_lseek AUE_LSEEK #define FREEBSD32_SYS_AUE_freebsd32_truncate AUE_TRUNCATE #define FREEBSD32_SYS_AUE_freebsd32_ftruncate AUE_FTRUNCATE -#define FREEBSD32_SYS_AUE_freebsd32_pread AUE_PREAD -#define FREEBSD32_SYS_AUE_freebsd32_pwrite AUE_PWRITE -#define FREEBSD32_SYS_AUE_freebsd32_mmap AUE_MMAP -#define FREEBSD32_SYS_AUE_freebsd32_lseek AUE_LSEEK -#define FREEBSD32_SYS_AUE_freebsd32_truncate AUE_TRUNCATE -#define FREEBSD32_SYS_AUE_freebsd32_ftruncate AUE_FTRUNCATE -#define FREEBSD32_SYS_AUE_freebsd32_cpuset_setid AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_cpuset_setid AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_cpuset_getid AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_cpuset_getaffinity AUE_NULL @@ -1547,14 +1269,10 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_POSIX_FALLOCATE #define FREEBSD32_SYS_AUE_freebsd32_posix_fadvise AUE_POSIX_FADVISE #define FREEBSD32_SYS_AUE_freebsd32_wait6 AUE_WAIT6 -#define FREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_POSIX_FALLOCATE -#define FREEBSD32_SYS_AUE_freebsd32_posix_fadvise AUE_POSIX_FADVISE -#define FREEBSD32_SYS_AUE_freebsd32_wait6 AUE_WAIT6 #define FREEBSD32_SYS_AUE_freebsd32_cap_ioctls_limit AUE_CAP_IOCTLS_LIMIT #define FREEBSD32_SYS_AUE_freebsd32_cap_ioctls_get AUE_CAP_IOCTLS_GET #define FREEBSD32_SYS_AUE_freebsd32_aio_mlock AUE_AIO_MLOCK #define FREEBSD32_SYS_AUE_freebsd32_procctl AUE_PROCCTL -#define FREEBSD32_SYS_AUE_freebsd32_procctl AUE_PROCCTL #define FREEBSD32_SYS_AUE_freebsd32_ppoll AUE_POLL #define FREEBSD32_SYS_AUE_freebsd32_futimens AUE_FUTIMES #define FREEBSD32_SYS_AUE_freebsd32_utimensat AUE_FUTIMESAT @@ -1563,7 +1281,6 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta #define FREEBSD32_SYS_AUE_freebsd32_fhstat AUE_FHSTAT #define FREEBSD32_SYS_AUE_freebsd32_getfsstat AUE_GETFSSTAT #define FREEBSD32_SYS_AUE_freebsd32_mknodat AUE_MKNODAT -#define FREEBSD32_SYS_AUE_freebsd32_mknodat AUE_MKNODAT #define FREEBSD32_SYS_AUE_freebsd32_kevent AUE_KEVENT #define FREEBSD32_SYS_AUE_freebsd32_cpuset_getdomain AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_cpuset_setdomain AUE_NULL diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 5783d3d4fed7..a79331c931f9 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -239,8 +239,6 @@ #define FREEBSD32_SYS_freebsd11_freebsd32_nfstat 279 #define FREEBSD32_SYS_freebsd11_freebsd32_nlstat 280 #define FREEBSD32_SYS_freebsd32_preadv 289 -#define FREEBSD32_SYS_freebsd32_pwritev 290 -#define FREEBSD32_SYS_freebsd32_preadv 289 #define FREEBSD32_SYS_freebsd32_pwritev 290 /* 297 is freebsd4 freebsd32_fhstatfs */ #define FREEBSD32_SYS_fhopen 298 @@ -402,18 +400,11 @@ #define FREEBSD32_SYS_freebsd32_lseek 478 #define FREEBSD32_SYS_freebsd32_truncate 479 #define FREEBSD32_SYS_freebsd32_ftruncate 480 -#define FREEBSD32_SYS_freebsd32_pread 475 -#define FREEBSD32_SYS_freebsd32_pwrite 476 -#define FREEBSD32_SYS_freebsd32_mmap 477 -#define FREEBSD32_SYS_freebsd32_lseek 478 -#define FREEBSD32_SYS_freebsd32_truncate 479 -#define FREEBSD32_SYS_freebsd32_ftruncate 480 #define FREEBSD32_SYS_thr_kill2 481 #define FREEBSD32_SYS_freebsd12_shm_open 482 #define FREEBSD32_SYS_shm_unlink 483 #define FREEBSD32_SYS_cpuset 484 #define FREEBSD32_SYS_freebsd32_cpuset_setid 485 -#define FREEBSD32_SYS_freebsd32_cpuset_setid 485 #define FREEBSD32_SYS_freebsd32_cpuset_getid 486 #define FREEBSD32_SYS_freebsd32_cpuset_getaffinity 487 #define FREEBSD32_SYS_freebsd32_cpuset_setaffinity 488 @@ -460,9 +451,6 @@ #define FREEBSD32_SYS_freebsd32_posix_fallocate 530 #define FREEBSD32_SYS_freebsd32_posix_fadvise 531 #define FREEBSD32_SYS_freebsd32_wait6 532 -#define FREEBSD32_SYS_freebsd32_posix_fallocate 530 -#define FREEBSD32_SYS_freebsd32_posix_fadvise 531 -#define FREEBSD32_SYS_freebsd32_wait6 532 #define FREEBSD32_SYS_cap_rights_limit 533 #define FREEBSD32_SYS_freebsd32_cap_ioctls_limit 534 #define FREEBSD32_SYS_freebsd32_cap_ioctls_get 535 @@ -475,7 +463,6 @@ #define FREEBSD32_SYS_pipe2 542 #define FREEBSD32_SYS_freebsd32_aio_mlock 543 #define FREEBSD32_SYS_freebsd32_procctl 544 -#define FREEBSD32_SYS_freebsd32_procctl 544 #define FREEBSD32_SYS_freebsd32_ppoll 545 #define FREEBSD32_SYS_freebsd32_futimens 546 #define FREEBSD32_SYS_freebsd32_utimensat 547 @@ -491,7 +478,6 @@ #define FREEBSD32_SYS_freebsd32_getfsstat 557 #define FREEBSD32_SYS_fhstatfs 558 #define FREEBSD32_SYS_freebsd32_mknodat 559 -#define FREEBSD32_SYS_freebsd32_mknodat 559 #define FREEBSD32_SYS_freebsd32_kevent 560 #define FREEBSD32_SYS_freebsd32_cpuset_getdomain 561 #define FREEBSD32_SYS_freebsd32_cpuset_setdomain 562 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 90be1e623c4d..1a384c1bd475 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -6,9 +6,6 @@ */ const char *freebsd32_syscallnames[] = { -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif "syscall", /* 0 = syscall */ "exit", /* 1 = exit */ "fork", /* 2 = fork */ @@ -298,13 +295,8 @@ const char *freebsd32_syscallnames[] = { "#286", /* 286 = reserved for local use */ "#287", /* 287 = reserved for local use */ "#288", /* 288 = reserved for local use */ -#ifdef PAD64_REQUIRED "freebsd32_preadv", /* 289 = freebsd32_preadv */ "freebsd32_pwritev", /* 290 = freebsd32_pwritev */ -#else - "freebsd32_preadv", /* 289 = freebsd32_preadv */ - "freebsd32_pwritev", /* 290 = freebsd32_pwritev */ -#endif "#291", /* 291 = reserved for local use */ "#292", /* 292 = reserved for local use */ "#293", /* 293 = reserved for local use */ @@ -489,30 +481,17 @@ const char *freebsd32_syscallnames[] = { "sctp_generic_sendmsg", /* 472 = sctp_generic_sendmsg */ "sctp_generic_sendmsg_iov", /* 473 = sctp_generic_sendmsg_iov */ "sctp_generic_recvmsg", /* 474 = sctp_generic_recvmsg */ -#ifdef PAD64_REQUIRED - "freebsd32_pread", /* 475 = freebsd32_pread */ - "freebsd32_pwrite", /* 476 = freebsd32_pwrite */ - "freebsd32_mmap", /* 477 = freebsd32_mmap */ - "freebsd32_lseek", /* 478 = freebsd32_lseek */ - "freebsd32_truncate", /* 479 = freebsd32_truncate */ - "freebsd32_ftruncate", /* 480 = freebsd32_ftruncate */ -#else "freebsd32_pread", /* 475 = freebsd32_pread */ "freebsd32_pwrite", /* 476 = freebsd32_pwrite */ "freebsd32_mmap", /* 477 = freebsd32_mmap */ "freebsd32_lseek", /* 478 = freebsd32_lseek */ "freebsd32_truncate", /* 479 = freebsd32_truncate */ "freebsd32_ftruncate", /* 480 = freebsd32_ftruncate */ -#endif "thr_kill2", /* 481 = thr_kill2 */ "compat12.shm_open", /* 482 = freebsd12 shm_open */ "shm_unlink", /* 483 = shm_unlink */ "cpuset", /* 484 = cpuset */ -#ifdef PAD64_REQUIRED - "freebsd32_cpuset_setid", /* 485 = freebsd32_cpuset_setid */ -#else "freebsd32_cpuset_setid", /* 485 = freebsd32_cpuset_setid */ -#endif "freebsd32_cpuset_getid", /* 486 = freebsd32_cpuset_getid */ "freebsd32_cpuset_getaffinity", /* 487 = freebsd32_cpuset_getaffinity */ "freebsd32_cpuset_setaffinity", /* 488 = freebsd32_cpuset_setaffinity */ @@ -557,15 +536,9 @@ const char *freebsd32_syscallnames[] = { "rctl_get_limits", /* 527 = rctl_get_limits */ "rctl_add_rule", /* 528 = rctl_add_rule */ "rctl_remove_rule", /* 529 = rctl_remove_rule */ -#ifdef PAD64_REQUIRED "freebsd32_posix_fallocate", /* 530 = freebsd32_posix_fallocate */ "freebsd32_posix_fadvise", /* 531 = freebsd32_posix_fadvise */ "freebsd32_wait6", /* 532 = freebsd32_wait6 */ -#else - "freebsd32_posix_fallocate", /* 530 = freebsd32_posix_fallocate */ - "freebsd32_posix_fadvise", /* 531 = freebsd32_posix_fadvise */ - "freebsd32_wait6", /* 532 = freebsd32_wait6 */ -#endif "cap_rights_limit", /* 533 = cap_rights_limit */ "freebsd32_cap_ioctls_limit", /* 534 = freebsd32_cap_ioctls_limit */ "freebsd32_cap_ioctls_get", /* 535 = freebsd32_cap_ioctls_get */ @@ -577,11 +550,7 @@ const char *freebsd32_syscallnames[] = { "accept4", /* 541 = accept4 */ "pipe2", /* 542 = pipe2 */ "freebsd32_aio_mlock", /* 543 = freebsd32_aio_mlock */ -#ifdef PAD64_REQUIRED - "freebsd32_procctl", /* 544 = freebsd32_procctl */ -#else "freebsd32_procctl", /* 544 = freebsd32_procctl */ -#endif "freebsd32_ppoll", /* 545 = freebsd32_ppoll */ "freebsd32_futimens", /* 546 = freebsd32_futimens */ "freebsd32_utimensat", /* 547 = freebsd32_utimensat */ @@ -596,11 +565,7 @@ const char *freebsd32_syscallnames[] = { "fstatfs", /* 556 = fstatfs */ "freebsd32_getfsstat", /* 557 = freebsd32_getfsstat */ "fhstatfs", /* 558 = fhstatfs */ -#ifdef PAD64_REQUIRED - "freebsd32_mknodat", /* 559 = freebsd32_mknodat */ -#else "freebsd32_mknodat", /* 559 = freebsd32_mknodat */ -#endif "freebsd32_kevent", /* 560 = freebsd32_kevent */ "freebsd32_cpuset_getdomain", /* 561 = freebsd32_cpuset_getdomain */ "freebsd32_cpuset_setdomain", /* 562 = freebsd32_cpuset_setdomain */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 3143cccbb3f5..56a88edf3c6d 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -56,9 +56,6 @@ /* The casts are bogus but will do for now. */ struct sysent freebsd32_sysent[] = { -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 0 = syscall */ { .sy_narg = AS(sys_exit_args), .sy_call = (sy_call_t *)sys_sys_exit, .sy_auevent = AUE_EXIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 1 = exit */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_fork, .sy_auevent = AUE_FORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 2 = fork */ @@ -348,13 +345,8 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 286 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 287 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 288 = reserved for local use */ -#ifdef PAD64_REQUIRED - { .sy_narg = AS(freebsd32_preadv_args), .sy_call = (sy_call_t *)freebsd32_preadv, .sy_auevent = AUE_PREADV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 289 = freebsd32_preadv */ - { .sy_narg = AS(freebsd32_pwritev_args), .sy_call = (sy_call_t *)freebsd32_pwritev, .sy_auevent = AUE_PWRITEV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 290 = freebsd32_pwritev */ -#else { .sy_narg = AS(freebsd32_preadv_args), .sy_call = (sy_call_t *)freebsd32_preadv, .sy_auevent = AUE_PREADV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 289 = freebsd32_preadv */ { .sy_narg = AS(freebsd32_pwritev_args), .sy_call = (sy_call_t *)freebsd32_pwritev, .sy_auevent = AUE_PWRITEV, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 290 = freebsd32_pwritev */ -#endif { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 291 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 292 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 293 = reserved for local use */ @@ -539,30 +531,17 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(sctp_generic_sendmsg_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_ABSENT }, /* 472 = sctp_generic_sendmsg */ { .sy_narg = AS(sctp_generic_sendmsg_iov_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_ABSENT }, /* 473 = sctp_generic_sendmsg_iov */ { .sy_narg = AS(sctp_generic_recvmsg_args), .sy_call = (sy_call_t *)lkmressys, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_ABSENT }, /* 474 = sctp_generic_recvmsg */ -#ifdef PAD64_REQUIRED - { .sy_narg = AS(freebsd32_pread_args), .sy_call = (sy_call_t *)freebsd32_pread, .sy_auevent = AUE_PREAD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 475 = freebsd32_pread */ - { .sy_narg = AS(freebsd32_pwrite_args), .sy_call = (sy_call_t *)freebsd32_pwrite, .sy_auevent = AUE_PWRITE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 476 = freebsd32_pwrite */ - { .sy_narg = AS(freebsd32_mmap_args), .sy_call = (sy_call_t *)freebsd32_mmap, .sy_auevent = AUE_MMAP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 477 = freebsd32_mmap */ - { .sy_narg = AS(freebsd32_lseek_args), .sy_call = (sy_call_t *)freebsd32_lseek, .sy_auevent = AUE_LSEEK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 478 = freebsd32_lseek */ - { .sy_narg = AS(freebsd32_truncate_args), .sy_call = (sy_call_t *)freebsd32_truncate, .sy_auevent = AUE_TRUNCATE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 479 = freebsd32_truncate */ - { .sy_narg = AS(freebsd32_ftruncate_args), .sy_call = (sy_call_t *)freebsd32_ftruncate, .sy_auevent = AUE_FTRUNCATE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ -#else { .sy_narg = AS(freebsd32_pread_args), .sy_call = (sy_call_t *)freebsd32_pread, .sy_auevent = AUE_PREAD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 475 = freebsd32_pread */ { .sy_narg = AS(freebsd32_pwrite_args), .sy_call = (sy_call_t *)freebsd32_pwrite, .sy_auevent = AUE_PWRITE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 476 = freebsd32_pwrite */ { .sy_narg = AS(freebsd32_mmap_args), .sy_call = (sy_call_t *)freebsd32_mmap, .sy_auevent = AUE_MMAP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 477 = freebsd32_mmap */ { .sy_narg = AS(freebsd32_lseek_args), .sy_call = (sy_call_t *)freebsd32_lseek, .sy_auevent = AUE_LSEEK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 478 = freebsd32_lseek */ { .sy_narg = AS(freebsd32_truncate_args), .sy_call = (sy_call_t *)freebsd32_truncate, .sy_auevent = AUE_TRUNCATE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 479 = freebsd32_truncate */ { .sy_narg = AS(freebsd32_ftruncate_args), .sy_call = (sy_call_t *)freebsd32_ftruncate, .sy_auevent = AUE_FTRUNCATE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ -#endif { .sy_narg = AS(thr_kill2_args), .sy_call = (sy_call_t *)sys_thr_kill2, .sy_auevent = AUE_THR_KILL2, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 481 = thr_kill2 */ { compat12(AS(freebsd12_shm_open_args),shm_open), .sy_auevent = AUE_SHMOPEN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 482 = freebsd12 shm_open */ { .sy_narg = AS(shm_unlink_args), .sy_call = (sy_call_t *)sys_shm_unlink, .sy_auevent = AUE_SHMUNLINK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 483 = shm_unlink */ { .sy_narg = AS(cpuset_args), .sy_call = (sy_call_t *)sys_cpuset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 484 = cpuset */ -#ifdef PAD64_REQUIRED { .sy_narg = AS(freebsd32_cpuset_setid_args), .sy_call = (sy_call_t *)freebsd32_cpuset_setid, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 485 = freebsd32_cpuset_setid */ -#else - { .sy_narg = AS(freebsd32_cpuset_setid_args), .sy_call = (sy_call_t *)freebsd32_cpuset_setid, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 485 = freebsd32_cpuset_setid */ -#endif { .sy_narg = AS(freebsd32_cpuset_getid_args), .sy_call = (sy_call_t *)freebsd32_cpuset_getid, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 486 = freebsd32_cpuset_getid */ { .sy_narg = AS(freebsd32_cpuset_getaffinity_args), .sy_call = (sy_call_t *)freebsd32_cpuset_getaffinity, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 487 = freebsd32_cpuset_getaffinity */ { .sy_narg = AS(freebsd32_cpuset_setaffinity_args), .sy_call = (sy_call_t *)freebsd32_cpuset_setaffinity, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 488 = freebsd32_cpuset_setaffinity */ @@ -607,15 +586,9 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(rctl_get_limits_args), .sy_call = (sy_call_t *)sys_rctl_get_limits, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 527 = rctl_get_limits */ { .sy_narg = AS(rctl_add_rule_args), .sy_call = (sy_call_t *)sys_rctl_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 528 = rctl_add_rule */ { .sy_narg = AS(rctl_remove_rule_args), .sy_call = (sy_call_t *)sys_rctl_remove_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 529 = rctl_remove_rule */ -#ifdef PAD64_REQUIRED { .sy_narg = AS(freebsd32_posix_fallocate_args), .sy_call = (sy_call_t *)freebsd32_posix_fallocate, .sy_auevent = AUE_POSIX_FALLOCATE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ { .sy_narg = AS(freebsd32_posix_fadvise_args), .sy_call = (sy_call_t *)freebsd32_posix_fadvise, .sy_auevent = AUE_POSIX_FADVISE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ { .sy_narg = AS(freebsd32_wait6_args), .sy_call = (sy_call_t *)freebsd32_wait6, .sy_auevent = AUE_WAIT6, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 532 = freebsd32_wait6 */ -#else - { .sy_narg = AS(freebsd32_posix_fallocate_args), .sy_call = (sy_call_t *)freebsd32_posix_fallocate, .sy_auevent = AUE_POSIX_FALLOCATE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ - { .sy_narg = AS(freebsd32_posix_fadvise_args), .sy_call = (sy_call_t *)freebsd32_posix_fadvise, .sy_auevent = AUE_POSIX_FADVISE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ - { .sy_narg = AS(freebsd32_wait6_args), .sy_call = (sy_call_t *)freebsd32_wait6, .sy_auevent = AUE_WAIT6, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 532 = freebsd32_wait6 */ -#endif { .sy_narg = AS(cap_rights_limit_args), .sy_call = (sy_call_t *)sys_cap_rights_limit, .sy_auevent = AUE_CAP_RIGHTS_LIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 533 = cap_rights_limit */ { .sy_narg = AS(freebsd32_cap_ioctls_limit_args), .sy_call = (sy_call_t *)freebsd32_cap_ioctls_limit, .sy_auevent = AUE_CAP_IOCTLS_LIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 534 = freebsd32_cap_ioctls_limit */ { .sy_narg = AS(freebsd32_cap_ioctls_get_args), .sy_call = (sy_call_t *)freebsd32_cap_ioctls_get, .sy_auevent = AUE_CAP_IOCTLS_GET, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 535 = freebsd32_cap_ioctls_get */ @@ -627,11 +600,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(accept4_args), .sy_call = (sy_call_t *)sys_accept4, .sy_auevent = AUE_ACCEPT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 541 = accept4 */ { .sy_narg = AS(pipe2_args), .sy_call = (sy_call_t *)sys_pipe2, .sy_auevent = AUE_PIPE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 542 = pipe2 */ { .sy_narg = AS(freebsd32_aio_mlock_args), .sy_call = (sy_call_t *)freebsd32_aio_mlock, .sy_auevent = AUE_AIO_MLOCK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 543 = freebsd32_aio_mlock */ -#ifdef PAD64_REQUIRED { .sy_narg = AS(freebsd32_procctl_args), .sy_call = (sy_call_t *)freebsd32_procctl, .sy_auevent = AUE_PROCCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 544 = freebsd32_procctl */ -#else - { .sy_narg = AS(freebsd32_procctl_args), .sy_call = (sy_call_t *)freebsd32_procctl, .sy_auevent = AUE_PROCCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 544 = freebsd32_procctl */ -#endif { .sy_narg = AS(freebsd32_ppoll_args), .sy_call = (sy_call_t *)freebsd32_ppoll, .sy_auevent = AUE_POLL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 545 = freebsd32_ppoll */ { .sy_narg = AS(freebsd32_futimens_args), .sy_call = (sy_call_t *)freebsd32_futimens, .sy_auevent = AUE_FUTIMES, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 546 = freebsd32_futimens */ { .sy_narg = AS(freebsd32_utimensat_args), .sy_call = (sy_call_t *)freebsd32_utimensat, .sy_auevent = AUE_FUTIMESAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 547 = freebsd32_utimensat */ @@ -646,11 +615,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(fstatfs_args), .sy_call = (sy_call_t *)sys_fstatfs, .sy_auevent = AUE_FSTATFS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 556 = fstatfs */ { .sy_narg = AS(freebsd32_getfsstat_args), .sy_call = (sy_call_t *)freebsd32_getfsstat, .sy_auevent = AUE_GETFSSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 557 = freebsd32_getfsstat */ { .sy_narg = AS(fhstatfs_args), .sy_call = (sy_call_t *)sys_fhstatfs, .sy_auevent = AUE_FHSTATFS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 558 = fhstatfs */ -#ifdef PAD64_REQUIRED { .sy_narg = AS(freebsd32_mknodat_args), .sy_call = (sy_call_t *)freebsd32_mknodat, .sy_auevent = AUE_MKNODAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 559 = freebsd32_mknodat */ -#else - { .sy_narg = AS(freebsd32_mknodat_args), .sy_call = (sy_call_t *)freebsd32_mknodat, .sy_auevent = AUE_MKNODAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 559 = freebsd32_mknodat */ -#endif { .sy_narg = AS(freebsd32_kevent_args), .sy_call = (sy_call_t *)freebsd32_kevent, .sy_auevent = AUE_KEVENT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 560 = freebsd32_kevent */ { .sy_narg = AS(freebsd32_cpuset_getdomain_args), .sy_call = (sy_call_t *)freebsd32_cpuset_getdomain, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 561 = freebsd32_cpuset_getdomain */ { .sy_narg = AS(freebsd32_cpuset_setdomain_args), .sy_call = (sy_call_t *)freebsd32_cpuset_setdomain, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 562 = freebsd32_cpuset_setdomain */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 93fd27afe654..e4dad59ea7dd 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1,3 +1,6 @@ +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) +#define PAD64_REQUIRED +#endif /* * System call argument to DTrace register array converstion. * @@ -12,9 +15,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) int64_t *iarg = (int64_t *)uarg; int a = 0; switch (sysnum) { -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif /* nosys */ case 0: { *n_args = 0; @@ -1308,14 +1308,15 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 2; break; } *** 1414 LINES SKIPPED *** From nobody Mon Nov 22 22:37:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 530AB1893398; Mon, 22 Nov 2021 22:38: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 4HyhxN5RMFz4YVb; Mon, 22 Nov 2021 22:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0C6129F4; Mon, 22 Nov 2021 22:37: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 1AMMbx96047496; Mon, 22 Nov 2021 22:37:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbx1G047495; Mon, 22 Nov 2021 22:37:59 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:59 GMT Message-Id: <202111222237.1AMMbx1G047495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 804a84fbf26b - main - makesyscalls.lua: Add the ABI function prefix reliably. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 804a84fbf26b7caf17713f811c7d2d06b43f29ff Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=804a84fbf26b7caf17713f811c7d2d06b43f29ff commit 804a84fbf26b7caf17713f811c7d2d06b43f29ff Author: Brooks Davis AuthorDate: 2021-11-22 22:36:58 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:58 +0000 makesyscalls.lua: Add the ABI function prefix reliably. The previous code mostly worked, but ended up adding bogus sys_() declerations. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 78f0e2e906e9..e723346f1679 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -1192,25 +1192,29 @@ process_syscall_def = function(line) end local argprefix = '' + local funcprefix = '' if abi_changes("pointer_args") then for _, v in ipairs(funcargs) do if isptrtype(v["type"]) then -- argalias should be: -- COMPAT_PREFIX + ABI Prefix + funcname argprefix = config['abi_func_prefix'] - funcalias = config['abi_func_prefix'] .. - funcname + funcprefix = config['abi_func_prefix'] + funcalias = funcprefix .. funcname goto ptrfound end end ::ptrfound:: end + if funcname ~= nil then + funcname = funcprefix .. funcname + end if funcalias == nil or funcalias == "" then funcalias = funcname end if argalias == nil and funcname ~= nil then - argalias = argprefix .. funcname .. "_args" + argalias = funcname .. "_args" for _, v in pairs(compat_options) do local mask = v["mask"] if (flags & mask) ~= 0 then From nobody Mon Nov 22 22:37:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D334318933A2; Mon, 22 Nov 2021 22:38: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 4HyhxN2Hgdz4YQW; Mon, 22 Nov 2021 22:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 421872D63; Mon, 22 Nov 2021 22:37: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 1AMMbug8047418; Mon, 22 Nov 2021 22:37:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbuCb047417; Mon, 22 Nov 2021 22:37:56 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:56 GMT Message-Id: <202111222237.1AMMbuCb047417@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: faa67c2b20bc - main - freebsd32: generate splits of 64-bit 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: faa67c2b20bc3a7f1043cfb8ee1c3c037a661812 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=faa67c2b20bc3a7f1043cfb8ee1c3c037a661812 commit faa67c2b20bc3a7f1043cfb8ee1c3c037a661812 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:57 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:57 +0000 freebsd32: generate splits of 64-bit arguments This eliminates the need for ifdefs in syscalls.master and contains the largest set of diff to generated files on the way to switching to using the default ABI's syscalls.master. Reviewed by: kevans --- sys/compat/freebsd32/syscalls.conf | 1 + sys/compat/freebsd32/syscalls.master | 136 ++++++++--------------------------- 2 files changed, 30 insertions(+), 107 deletions(-) diff --git a/sys/compat/freebsd32/syscalls.conf b/sys/compat/freebsd32/syscalls.conf index 6817bd25b787..4ccf7f545dde 100644 --- a/sys/compat/freebsd32/syscalls.conf +++ b/sys/compat/freebsd32/syscalls.conf @@ -10,4 +10,5 @@ switchname="freebsd32_sysent" namesname="freebsd32_syscallnames" systrace="freebsd32_systrace_args.c" abi_func_prefix="freebsd32_" +abi_flags="pair_64bit" capabilities_conf="capabilities.conf" diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 96708924c394..d4e309c8f68b 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -52,10 +52,6 @@ #include #include -#if !defined(PAD64_REQUIRED) && !defined(__amd64__) -#define PAD64_REQUIRED -#endif - ; Reserved/unimplemented system calls in the range 0-150 inclusive ; are reserved for use in future Berkeley releases. ; Additional system calls implemented in vendor and other @@ -345,10 +341,10 @@ 172 AUE_NULL RESERVED 173 AUE_PREAD COMPAT6 { ssize_t freebsd32_pread(int fd, void *buf, \ size_t nbyte, int pad, \ - uint32_t offset1, uint32_t offset2); } + off_t offset); } 174 AUE_PWRITE COMPAT6 { ssize_t freebsd32_pwrite(int fd, \ const void *buf, size_t nbyte, int pad, \ - uint32_t offset1, uint32_t offset2); } + off_t offset); } 175 AUE_SETFIB NOPROTO { int setfib(int fibnum); } 176 AUE_NTP_ADJTIME STD { int freebsd32_ntp_adjtime( \ struct timex32 *tp); } @@ -384,17 +380,17 @@ char *buf, u_int count, int32_t *basep); } 197 AUE_MMAP COMPAT6 { void *freebsd32_mmap(void *addr, \ size_t len, int prot, int flags, int fd, \ - int pad, uint32_t pos1, uint32_t pos2); } + int pad, off_t pos); } 198 AUE_NULL NOPROTO { int nosys(void); } __syscall \ __syscall_args int 199 AUE_LSEEK COMPAT6 { off_t freebsd32_lseek(int fd, int pad, \ - uint32_t offset1, uint32_t offset2, \ + off_t offset, \ int whence); } 200 AUE_TRUNCATE COMPAT6 { int freebsd32_truncate(const char *path, \ int pad, uint32_t length1, \ uint32_t length2); } 201 AUE_FTRUNCATE COMPAT6 { int freebsd32_ftruncate(int fd, int pad, \ - uint32_t length1, uint32_t length2); } + off_t length); } 202 AUE_SYSCTL STD { int freebsd32___sysctl(int *name, \ u_int namelen, void *old, \ uint32_t *oldlenp, const void *new, \ @@ -482,7 +478,7 @@ 245 AUE_NULL RESERVED 246 AUE_NULL RESERVED 247 AUE_NULL STD { int freebsd32_clock_getcpuclockid2(\ - uint32_t id1, uint32_t id2,\ + id_t id,\ int which, clockid_t *clock_id); } 248 AUE_NULL UNIMPL ntp_gettime 249 AUE_NULL RESERVED @@ -535,27 +531,14 @@ 286 AUE_NULL RESERVED 287 AUE_NULL RESERVED 288 AUE_NULL RESERVED -#ifdef PAD64_REQUIRED -289 AUE_PREADV STD { ssize_t freebsd32_preadv(int fd, \ - struct iovec32 *iovp, \ - u_int iovcnt, \ - int _pad, \ - uint32_t offset1, uint32_t offset2); } -290 AUE_PWRITEV STD { ssize_t freebsd32_pwritev(int fd, \ - struct iovec32 *iovp, \ - u_int iovcnt, \ - int _pad, \ - uint32_t offset1, uint32_t offset2); } -#else 289 AUE_PREADV STD { ssize_t freebsd32_preadv(int fd, \ struct iovec32 *iovp, \ u_int iovcnt, \ - uint32_t offset1, uint32_t offset2); } + off_t offset); } 290 AUE_PWRITEV STD { ssize_t freebsd32_pwritev(int fd, \ struct iovec32 *iovp, \ u_int iovcnt, \ - uint32_t offset1, uint32_t offset2); } -#endif + off_t offset); } 291 AUE_NULL RESERVED 292 AUE_NULL RESERVED 293 AUE_NULL RESERVED @@ -630,7 +613,7 @@ struct timespec32 *interval); } 335 AUE_NULL NOPROTO { int utrace(const void *addr, size_t len); } 336 AUE_SENDFILE COMPAT4 { int freebsd32_sendfile(int fd, int s, \ - uint32_t offset1, uint32_t offset2, \ + off_t offset, \ size_t nbytes, struct sf_hdtr32 *hdtr, \ off_t *sbytes, int flags); } 337 AUE_NULL UNIMPL kldsym @@ -735,7 +718,7 @@ 392 AUE_NULL NOPROTO { int uuidgen(struct uuid *store, \ int count); } 393 AUE_SENDFILE STD { int freebsd32_sendfile(int fd, int s, \ - uint32_t offset1, uint32_t offset2, \ + off_t offset, \ size_t nbytes, struct sf_hdtr32 *hdtr, \ off_t *sbytes, int flags); } 394 AUE_NULL UNIMPL mac_syscall @@ -890,74 +873,42 @@ 474 AUE_SCTP_GENERIC_RECVMSG NOPROTO|NOSTD { int sctp_generic_recvmsg(int sd, struct iovec32 *iov, int iovlen, \ struct sockaddr * from, __socklen_t *fromlenaddr, \ struct sctp_sndrcvinfo *sinfo, int *msg_flags); } -#ifdef PAD64_REQUIRED 475 AUE_PREAD STD { ssize_t freebsd32_pread(int fd, \ void *buf,size_t nbyte, \ - int _pad, \ - uint32_t offset1, uint32_t offset2); } + off_t offset); } 476 AUE_PWRITE STD { ssize_t freebsd32_pwrite(int fd, \ const void *buf, size_t nbyte, \ - int _pad, \ - uint32_t offset1, uint32_t offset2); } + off_t offset); } 477 AUE_MMAP STD { void *freebsd32_mmap(void *addr, \ size_t len, int prot, int flags, int fd, \ - int _pad, \ - uint32_t pos1, uint32_t pos2); } + off_t pos); } 478 AUE_LSEEK STD { off_t freebsd32_lseek(int fd, \ - int _pad, \ - uint32_t offset1, uint32_t offset2, \ + off_t offset, \ int whence); } 479 AUE_TRUNCATE STD { int freebsd32_truncate(const char *path, \ - int _pad, \ - uint32_t length1, uint32_t length2); } + off_t length); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ - int _pad, \ - uint32_t length1, uint32_t length2); } -#else -475 AUE_PREAD STD { ssize_t freebsd32_pread(int fd, \ - void *buf,size_t nbyte, \ - uint32_t offset1, uint32_t offset2); } -476 AUE_PWRITE STD { ssize_t freebsd32_pwrite(int fd, \ - const void *buf, size_t nbyte, \ - uint32_t offset1, uint32_t offset2); } -477 AUE_MMAP STD { void *freebsd32_mmap(void *addr, \ - size_t len, int prot, int flags, int fd, \ - uint32_t pos1, uint32_t pos2); } -478 AUE_LSEEK STD { off_t freebsd32_lseek(int fd, \ - uint32_t offset1, uint32_t offset2, \ - int whence); } -479 AUE_TRUNCATE STD { int freebsd32_truncate(const char *path, \ - uint32_t length1, uint32_t length2); } -480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ - uint32_t length1, uint32_t length2); } -#endif + off_t length); } 481 AUE_THR_KILL2 NOPROTO { int thr_kill2(pid_t pid, int32_t id, int sig); } 482 AUE_SHMOPEN COMPAT12|NOPROTO { int shm_open( \ const char *path, int flags, mode_t mode); } 483 AUE_SHMUNLINK NOPROTO { int shm_unlink(const char *path); } 484 AUE_NULL NOPROTO { int cpuset(cpusetid_t *setid); } -#ifdef PAD64_REQUIRED 485 AUE_NULL STD { int freebsd32_cpuset_setid(cpuwhich_t which, \ - int _pad, \ - uint32_t id1, uint32_t id2, \ + id_t id, \ cpusetid_t setid); } -#else -485 AUE_NULL STD { int freebsd32_cpuset_setid(cpuwhich_t which, \ - uint32_t id1, uint32_t id2, \ - cpusetid_t setid); } -#endif 486 AUE_NULL STD { int freebsd32_cpuset_getid(cpulevel_t level, \ cpuwhich_t which, \ - uint32_t id1, uint32_t id2, \ + id_t id, \ cpusetid_t *setid); } 487 AUE_NULL STD { int freebsd32_cpuset_getaffinity( \ cpulevel_t level, cpuwhich_t which, \ - uint32_t id1, uint32_t id2, \ + id_t id, \ size_t cpusetsize, \ cpuset_t *mask); } 488 AUE_NULL STD { int freebsd32_cpuset_setaffinity( \ cpulevel_t level, cpuwhich_t which, \ - uint32_t id1, uint32_t id2, \ + id_t id, \ size_t cpusetsize, \ const cpuset_t *mask); } 489 AUE_FACCESSAT NOPROTO { int faccessat(int fd, const char *path, \ @@ -1041,35 +992,18 @@ 529 AUE_NULL NOPROTO { int rctl_remove_rule(const void *inbufp, \ size_t inbuflen, void *outbufp, \ size_t outbuflen); } -#ifdef PAD64_REQUIRED -530 AUE_POSIX_FALLOCATE STD { int freebsd32_posix_fallocate(int fd, \ - int _pad, \ - uint32_t offset1, uint32_t offset2,\ - uint32_t len1, uint32_t len2); } -531 AUE_POSIX_FADVISE STD { int freebsd32_posix_fadvise(int fd, \ - int _pad, \ - uint32_t offset1, uint32_t offset2,\ - uint32_t len1, uint32_t len2, \ - int advice); } -532 AUE_WAIT6 STD { int freebsd32_wait6(idtype_t idtype, int _pad, \ - uint32_t id1, uint32_t id2, \ - int *status, int options, \ - struct __wrusage32 *wrusage, \ - struct siginfo32 *info); } -#else 530 AUE_POSIX_FALLOCATE STD { int freebsd32_posix_fallocate(int fd,\ - uint32_t offset1, uint32_t offset2,\ - uint32_t len1, uint32_t len2); } + off_t offset, \ + off_t len); } 531 AUE_POSIX_FADVISE STD { int freebsd32_posix_fadvise(int fd, \ - uint32_t offset1, uint32_t offset2,\ - uint32_t len1, uint32_t len2, \ + off_t offset, \ + off_t len, \ int advice); } 532 AUE_WAIT6 STD { int freebsd32_wait6(idtype_t idtype, \ - uint32_t id1, uint32_t id2, \ + id_t id, \ int *status, int options, \ struct __wrusage32 *wrusage, \ struct siginfo32 *info); } -#endif 533 AUE_CAP_RIGHTS_LIMIT NOPROTO { \ int cap_rights_limit(int fd, \ cap_rights_t *rightsp); } @@ -1098,15 +1032,9 @@ 542 AUE_PIPE NOPROTO { int pipe2(int *fildes, int flags); } 543 AUE_AIO_MLOCK STD { int freebsd32_aio_mlock( \ struct aiocb32 *aiocbp); } -#ifdef PAD64_REQUIRED -544 AUE_PROCCTL STD { int freebsd32_procctl(idtype_t idtype, int _pad, \ - uint32_t id1, uint32_t id2, int com, \ - void *data); } -#else 544 AUE_PROCCTL STD { int freebsd32_procctl(idtype_t idtype, \ - uint32_t id1, uint32_t id2, int com, \ + id_t id, int com, \ void *data); } -#endif 545 AUE_POLL STD { int freebsd32_ppoll(struct pollfd *fds, \ u_int nfds, const struct timespec32 *ts, \ const sigset_t *set); } @@ -1137,15 +1065,9 @@ int32_t bufsize, int mode); } 558 AUE_FHSTATFS NOPROTO { int fhstatfs(const struct fhandle *u_fhp, \ struct statfs *buf); } -#ifdef PAD64_REQUIRED -559 AUE_MKNODAT STD { int freebsd32_mknodat(int fd, \ - const char *path, mode_t mode, \ - int _pad, uint32_t dev1, uint32_t dev2); } -#else 559 AUE_MKNODAT STD { int freebsd32_mknodat(int fd, \ const char *path, mode_t mode, \ - uint32_t dev1, uint32_t dev2); } -#endif + dev_t dev); } 560 AUE_KEVENT STD { int freebsd32_kevent(int fd, \ const struct kevent32 *changelist, \ int nchanges, \ @@ -1153,11 +1075,11 @@ int nevents, \ const struct timespec32 *timeout); } 561 AUE_NULL STD { int freebsd32_cpuset_getdomain(cpulevel_t level, \ - cpuwhich_t which, uint32_t id1, uint32_t id2, \ + cpuwhich_t which, id_t id, \ size_t domainsetsize, domainset_t *mask, \ int *policy); } 562 AUE_NULL STD { int freebsd32_cpuset_setdomain(cpulevel_t level, \ - cpuwhich_t which, uint32_t id1, uint32_t id2, \ + cpuwhich_t which, id_t id, \ size_t domainsetsize, domainset_t *mask, \ int policy); } 563 AUE_NULL NOPROTO { int getrandom(void *buf, size_t buflen, \ From nobody Mon Nov 22 22:37:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AD1871893289; Mon, 22 Nov 2021 22:38: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 4HyhxN2Yzhz4YQX; Mon, 22 Nov 2021 22:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FBDF300C; Mon, 22 Nov 2021 22:37: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 1AMMbw0F047472; Mon, 22 Nov 2021 22:37:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbw8X047471; Mon, 22 Nov 2021 22:37:58 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:58 GMT Message-Id: <202111222237.1AMMbw8X047471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 5e7093118478 - main - makesyscalls: allow config to force OBSOL and UNIMPL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e709311847834a2f69662550cbe771f28831270 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5e709311847834a2f69662550cbe771f28831270 commit 5e709311847834a2f69662550cbe771f28831270 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:57 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:57 +0000 makesyscalls: allow config to force OBSOL and UNIMPL The obsol and unimpl config variables are space-seperated lists of syscalls that should treated as being declared OBSOL and UNIMPL. The allows an ABI to exclude select system calls listed in syscalls.master. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 53 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 1e66a6b319f3..78f0e2e906e9 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -68,6 +68,10 @@ local config = { abi_semid_t = "semid_t", abi_ptr_array_t = "", ptr_intptr_t_cast = "intptr_t", + obsol = "", + obsol_dict = {}, + unimpl = "", + unimpl_dict = {}, } local config_modified = {} @@ -373,6 +377,20 @@ local function process_abi_flags() config["abi_flags_mask"] = mask end +local function process_obsol() + local obsol = config["obsol"] + for syscall in obsol:gmatch("([^ ]+)") do + config["obsol_dict"][syscall] = true + end +end + +local function process_unimpl() + local unimpl = config["unimpl"] + for syscall in unimpl:gmatch("([^ ]+)") do + config["unimpl_dict"][syscall] = true + end +end + local function abi_changes(name) if known_abi_flags[name] == nil then abort(1, "abi_changes: unknown flag: " .. name) @@ -1134,6 +1152,24 @@ process_syscall_def = function(line) funcname = trim(funcname) + if config["obsol_dict"][funcname] then + local compat_prefix = "" + for _, v in pairs(compat_options) do + if flags & v["mask"] ~= 0 then + compat_prefix = v["prefix"] + goto obsol_compat_done + end + end + ::obsol_compat_done:: + args = nil + flags = known_flags['OBSOL'] + funcomment = compat_prefix .. funcname + end + if config["unimpl_dict"][funcname] then + flags = known_flags['UNIMPL'] + funcomment = funcname + end + sysflags = "0" -- NODEF events do not get audited @@ -1192,8 +1228,13 @@ process_syscall_def = function(line) local ncompatflags = get_mask({"STD", "NODEF", "NOARGS", "NOPROTO", "NOSTD"}) local compatflags = get_mask_pat("COMPAT.*") - -- Now try compat... - if flags & compatflags ~= 0 then + if flags & known_flags["OBSOL"] ~= 0 then + handle_obsol(sysnum, funcname, funcomment) + elseif flags & known_flags["RESERVED"] ~= 0 then + handle_reserved(sysnum, sysstart, sysend) + elseif flags & known_flags["UNIMPL"] ~= 0 then + handle_unimpl(sysnum, sysstart, sysend, funcomment) + elseif flags & compatflags ~= 0 then if flags & known_flags['STD'] ~= 0 then abort(1, "Incompatible COMPAT/STD: " .. line) end @@ -1203,12 +1244,6 @@ process_syscall_def = function(line) handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, auditev, syscallret, funcname, funcalias, funcargs, argalias) - elseif flags & known_flags["OBSOL"] ~= 0 then - handle_obsol(sysnum, funcname, funcomment) - elseif flags & known_flags["RESERVED"] ~= 0 then - handle_reserved(sysnum, sysstart, sysend) - elseif flags & known_flags["UNIMPL"] ~= 0 then - handle_unimpl(sysnum, sysstart, sysend, funcomment) else abort(1, "Bad flags? " .. line) end @@ -1257,6 +1292,8 @@ elseif config["capenabled"] ~= "" then end process_compat() process_abi_flags() +process_obsol() +process_unimpl() if not lfs.mkdir(tmpspace) then error("Failed to create tempdir " .. tmpspace) From nobody Mon Nov 22 22:38:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 97FE11893145; Mon, 22 Nov 2021 22:38: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 4HyhxP3NpQz4YQc; Mon, 22 Nov 2021 22:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B20DC2EF4; Mon, 22 Nov 2021 22:38: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 1AMMc0IJ047520; Mon, 22 Nov 2021 22:38:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMc0rJ047519; Mon, 22 Nov 2021 22:38:00 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:38:00 GMT Message-Id: <202111222238.1AMMc0rJ047519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 988e8db3c041 - main - makesyscalls: automate detection of ABI 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 988e8db3c041e39db0da9fbb0edde9e0e3d53326 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=988e8db3c041e39db0da9fbb0edde9e0e3d53326 commit 988e8db3c041e39db0da9fbb0edde9e0e3d53326 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:58 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:58 +0000 makesyscalls: automate detection of ABI changes Use pattern matching including matches of _Contains_*_ argument annotations to (mostly) determine which system calls require ABI-specific handling. Automatically treat syscalls as NOPROTO if no ABI changes are present. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index e723346f1679..48ad05eb0469 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -638,9 +638,11 @@ end local function process_args(args) local funcargs = {} + local changes_abi = false for arg in args:gmatch("([^,]+)") do - local abi_change = not isptrtype(arg) or check_abi_changes(arg) + local arg_abi_change = check_abi_changes(arg) + changes_abi = changes_abi or arg_abi_change arg = strip_arg_annotations(arg) @@ -653,6 +655,10 @@ local function process_args(args) goto out end + -- is64bittype() needs a bare type so check it after argname + -- is removed + changes_abi = changes_abi or (abi_changes("pair_64bit") and is64bittype(argtype)) + argtype = argtype:gsub("intptr_t", config["abi_intptr_t"]) argtype = argtype:gsub("semid_t", config["abi_semid_t"]) if isptrtype(argtype) then @@ -671,7 +677,7 @@ local function process_args(args) end -- XX TODO: Forward declarations? See: sysstubfwd in CheriBSD - if abi_change then + if arg_abi_change then local abi_type_suffix = config["abi_type_suffix"] argtype = argtype:gsub("(struct [^ ]*)", "%1" .. abi_type_suffix) @@ -703,7 +709,7 @@ local function process_args(args) end ::out:: - return funcargs + return funcargs, changes_abi end local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, @@ -1187,25 +1193,31 @@ process_syscall_def = function(line) end local funcargs = {} + local changes_abi = false if args ~= nil then - funcargs = process_args(args) + funcargs, changes_abi = process_args(args) end + local noproto = config["abi_flags"] ~= "" and not changes_abi local argprefix = '' local funcprefix = '' if abi_changes("pointer_args") then for _, v in ipairs(funcargs) do if isptrtype(v["type"]) then - -- argalias should be: - -- COMPAT_PREFIX + ABI Prefix + funcname - argprefix = config['abi_func_prefix'] - funcprefix = config['abi_func_prefix'] - funcalias = funcprefix .. funcname + changes_abi = true goto ptrfound end end ::ptrfound:: end + if changes_abi then + -- argalias should be: + -- COMPAT_PREFIX + ABI Prefix + funcname + argprefix = config['abi_func_prefix'] + funcprefix = config['abi_func_prefix'] + funcalias = funcprefix .. funcname + noproto = false + end if funcname ~= nil then funcname = funcprefix .. funcname end @@ -1232,6 +1244,9 @@ process_syscall_def = function(line) local ncompatflags = get_mask({"STD", "NODEF", "NOARGS", "NOPROTO", "NOSTD"}) local compatflags = get_mask_pat("COMPAT.*") + if noproto then + flags = flags | known_flags["NOPROTO"]; + end if flags & known_flags["OBSOL"] ~= 0 then handle_obsol(sysnum, funcname, funcomment) elseif flags & known_flags["RESERVED"] ~= 0 then From nobody Mon Nov 22 22:38:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 109FA18932E0; Mon, 22 Nov 2021 22:38: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 4HyhxS0HFgz4YQn; Mon, 22 Nov 2021 22:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD69B2F0F; Mon, 22 Nov 2021 22:38: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 1AMMc1YK047544; Mon, 22 Nov 2021 22:38:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMc1aA047543; Mon, 22 Nov 2021 22:38:01 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:38:01 GMT Message-Id: <202111222238.1AMMc1aA047543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 64cc9803ab6f - main - makesyscalls: add override of ABI change detection List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 64cc9803ab6fe661cf56c708e26b23d87f4b4ce6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=64cc9803ab6fe661cf56c708e26b23d87f4b4ce6 commit 64cc9803ab6fe661cf56c708e26b23d87f4b4ce6 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:58 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:58 +0000 makesyscalls: add override of ABI change detection While we can detect most ABI changes through analysis of syscalls.master with suitable annotations, to cases are handled in the core implementation and others have changes that can not be infered. Add two new config variables syscall_abi_change and syscall_no_abi_change which override the detected value. Both are space-seperated lists of syscall names. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 48ad05eb0469..386a79e44eeb 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -68,6 +68,10 @@ local config = { abi_semid_t = "semid_t", abi_ptr_array_t = "", ptr_intptr_t_cast = "intptr_t", + syscall_abi_change = "", + sys_abi_change = {}, + syscall_no_abi_change = "", + sys_no_abi_change = {}, obsol = "", obsol_dict = {}, unimpl = "", @@ -391,6 +395,18 @@ local function process_unimpl() end end +local function process_syscall_abi_change() + local changes_abi = config["syscall_abi_change"] + for syscall in changes_abi:gmatch("([^ ]+)") do + config["sys_abi_change"][syscall] = true + end + + local no_changes = config["syscall_no_abi_change"] + for syscall in no_changes:gmatch("([^ ]+)") do + config["sys_no_abi_change"][syscall] = true + end +end + local function abi_changes(name) if known_abi_flags[name] == nil then abort(1, "abi_changes: unknown flag: " .. name) @@ -1197,6 +1213,9 @@ process_syscall_def = function(line) if args ~= nil then funcargs, changes_abi = process_args(args) end + if config["sys_no_abi_change"][funcname] then + changes_abi = false + end local noproto = config["abi_flags"] ~= "" and not changes_abi local argprefix = '' @@ -1204,12 +1223,19 @@ process_syscall_def = function(line) if abi_changes("pointer_args") then for _, v in ipairs(funcargs) do if isptrtype(v["type"]) then + if config["sys_no_abi_change"][funcname] then + print("WARNING: " .. funcname .. + " in syscall_no_abi_change, but pointers args are present") + end changes_abi = true goto ptrfound end end ::ptrfound:: end + if config["sys_abi_change"][funcname] then + changes_abi = true + end if changes_abi then -- argalias should be: -- COMPAT_PREFIX + ABI Prefix + funcname @@ -1311,6 +1337,7 @@ elseif config["capenabled"] ~= "" then end process_compat() process_abi_flags() +process_syscall_abi_change() process_obsol() process_unimpl() From nobody Mon Nov 22 22:38:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E93F81893464; Mon, 22 Nov 2021 22:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HyhxT1wxTz4YMx; Mon, 22 Nov 2021 22:38:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 06A732E3F; Mon, 22 Nov 2021 22:38: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 1AMMc2gw047574; Mon, 22 Nov 2021 22:38:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMc2SB047573; Mon, 22 Nov 2021 22:38:02 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:38:02 GMT Message-Id: <202111222238.1AMMc2SB047573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: f260a69decbe - main - makesyscalls: strip _Contains_ argument annotations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f260a69decbec827f0cd9b8169fc5b5194e289a8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f260a69decbec827f0cd9b8169fc5b5194e289a8 commit f260a69decbec827f0cd9b8169fc5b5194e289a8 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:58 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:58 +0000 makesyscalls: strip _Contains_ argument annotations Reviewed by: kevans --- sys/tools/makesyscalls.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 386a79e44eeb..e8f882f6641d 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -632,6 +632,7 @@ local function align_sysent_comment(col) end local function strip_arg_annotations(arg) + arg = arg:gsub("_Contains_[^ ]*[_)] ?", "") arg = arg:gsub("_In[^ ]*[_)] ?", "") arg = arg:gsub("_Out[^ ]*[_)] ?", "") return trim(arg) From nobody Mon Nov 22 22:38:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 595F41893331; Mon, 22 Nov 2021 22:38: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 4HyhxW3bFrz4YW2; Mon, 22 Nov 2021 22:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27BD42D65; Mon, 22 Nov 2021 22: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 1AMMc4cx047598; Mon, 22 Nov 2021 22: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 1AMMc4iS047597; Mon, 22 Nov 2021 22:38:04 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:38:04 GMT Message-Id: <202111222238.1AMMc4iS047597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 799ce8b8d2a0 - main - syscalls: annotate args pointing to long, pointer, or time_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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 799ce8b8d2a061db1ca1e379fef638e2d22b6f29 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=799ce8b8d2a061db1ca1e379fef638e2d22b6f29 commit 799ce8b8d2a061db1ca1e379fef638e2d22b6f29 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:58 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:58 +0000 syscalls: annotate args pointing to long, pointer, or time_t Add _Contains_ annotations indicating that the data pointed to by a pointer argument contains types that vary between FreeBSD ABIs. The supported set is long (including size_t), pointer (including intptr_t), and time_t. The first two vary between 32- and 64-bit ABIs. The laste betwen i386 and everything else. These will be used to detect which syscalls require handling on particular ABIs. Reviewed by: kevans, kib --- sys/kern/syscalls.master | 308 ++++++++++++++++++++++++----------------------- 1 file changed, 160 insertions(+), 148 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 9c1de91aa475..b606503e3ba3 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -74,6 +74,18 @@ ; for an array of n elements. ; _In_reads_bytes_(n), _Out_writes_bytes_(n), _Inout_updates_bytes(n): ; for a buffer of n-bytes. +; +; In addition to SAL annotations, pointers are annotated to indicate +; that they point to types that change between ABIs. That means that +; they contain long, pointer, or time_t types. This is indicated with +; a _Contains_ annotation followed immediately by one or more of: +; +; long_ Object contains a direct (or typedef'd) long value and varies +; between 32- and 64-bit ABIs. This includes size_t. +; ptr_ Object contains pointers (or intptr_t) and varies between +; 32- and 64-bit ABIs. +; timet_ Object contains a time_t and varies between i386 and other +; ABIs. ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master @@ -128,7 +140,7 @@ int pid, _Out_opt_ int *status, int options, - _Out_opt_ struct rusage *rusage + _Out_opt_ _Contains_long_timet_ struct rusage *rusage ); } 8 AUE_CREAT COMPAT { @@ -186,7 +198,7 @@ } 18 AUE_GETFSSTAT COMPAT4 { int getfsstat( - _Out_writes_bytes_opt_(bufsize) struct ostatfs *buf, + _Out_writes_bytes_opt_(bufsize) _Contains_long_ struct ostatfs *buf, long bufsize, int mode ); @@ -230,21 +242,21 @@ int ptrace( int req, pid_t pid, - _Inout_opt_ caddr_t addr, + _Inout_opt_ _Contains_long_ptr_ caddr_t addr, int data ); } 27 AUE_RECVMSG STD|CAPENABLED { ssize_t recvmsg( int s, - _Inout_ struct msghdr *msg, + _Inout_ _Contains_ptr_ struct msghdr *msg, int flags ); } 28 AUE_SENDMSG STD|CAPENABLED { ssize_t sendmsg( int s, - _In_ const struct msghdr *msg, + _In_ _Contains_ptr_ const struct msghdr *msg, int flags ); } @@ -309,7 +321,7 @@ 38 AUE_STAT COMPAT { int stat( _In_z_ const char *path, - _Out_ struct ostat *ub + _Out_ _Contains_timet_ struct ostat *ub ); } 39 AUE_GETPPID STD|CAPENABLED { @@ -318,7 +330,7 @@ 40 AUE_LSTAT COMPAT { int lstat( _In_z_ const char *path, - _Out_ struct ostat *ub + _Out_ _Contains_timet_ struct ostat *ub ); } 41 AUE_DUP STD|CAPENABLED { @@ -351,8 +363,8 @@ 46 AUE_SIGACTION COMPAT|CAPENABLED { int sigaction( int signum, - _In_opt_ struct osigaction *nsa, - _Out_opt_ struct osigaction *osa + _In_opt_ _Contains_ptr_ struct osigaction *nsa, + _Out_opt_ _Contains_ptr_ struct osigaction *osa ); } 47 AUE_GETGID STD|CAPENABLED { @@ -388,15 +400,15 @@ } 53 AUE_SIGALTSTACK STD|CAPENABLED { int sigaltstack( - _In_opt_ const struct sigaltstack *ss, - _Out_opt_ struct sigaltstack *oss + _In_opt_ _Contains_long_ptr_ const struct sigaltstack *ss, + _Out_opt_ _Contains_long_ptr_ struct sigaltstack *oss ); } 54 AUE_IOCTL STD|CAPENABLED { int ioctl( int fd, u_long com, - _Inout_opt_ char *data + _Inout_opt_ _Contains_long_ptr_ char *data ); } 55 AUE_REBOOT STD { @@ -442,7 +454,7 @@ 62 AUE_FSTAT COMPAT|CAPENABLED { int fstat( int fd, - _Out_ struct ostat *sb + _Out_ _Contains_timet_ struct ostat *sb ); } 63 AUE_NULL COMPAT { @@ -546,8 +558,8 @@ 83 AUE_SETITIMER STD|CAPENABLED { int setitimer( int which, - _In_ const struct itimerval *itv, - _Out_opt_ struct itimerval *oitv + _In_ _Contains_timet_ const struct itimerval *itv, + _Out_opt_ _Contains_timet_ struct itimerval *oitv ); } 84 AUE_WAIT4 COMPAT { @@ -561,7 +573,7 @@ 86 AUE_GETITIMER STD|CAPENABLED { int getitimer( int which, - _Out_ struct itimerval *itv + _Out_ _Contains_timet_ struct itimerval *itv ); } 87 AUE_SYSCTL COMPAT|CAPENABLED { @@ -601,7 +613,7 @@ _Inout_opt_ fd_set *in, _Inout_opt_ fd_set *ou, _Inout_opt_ fd_set *ex, - _In_opt_ struct timeval *tv + _In_opt_ _Contains_long_timet_ struct timeval *tv ); } 94 AUE_NULL RESERVED @@ -691,8 +703,8 @@ 108 AUE_NULL COMPAT|CAPENABLED { int sigvec( int signum, - _In_opt_ struct sigvec *nsv, - _Out_opt_ struct sigvec *osv + _In_opt_ _Contains_ptr_ struct sigvec *nsv, + _Out_opt_ _Contains_ptr_ struct sigvec *osv ); } 109 AUE_NULL COMPAT|CAPENABLED { @@ -714,35 +726,35 @@ ; us the mask, not a pointer to it. 112 AUE_NULL COMPAT|CAPENABLED { int sigstack( - _In_opt_ struct sigstack *nss, - _Out_opt_ struct sigstack *oss + _In_opt_ _Contains_ptr_ struct sigstack *nss, + _Out_opt_ _Contains_ptr_ struct sigstack *oss ); } 113 AUE_RECVMSG COMPAT|CAPENABLED { int recvmsg( int s, - _Inout_ struct omsghdr *msg, + _Inout_ _Contains_ptr_ struct omsghdr *msg, int flags ); } 114 AUE_SENDMSG COMPAT|CAPENABLED { int sendmsg( int s, - _In_ const struct omsghdr *msg, + _In_ _Contains_ptr_ const struct omsghdr *msg, int flags ); } 115 AUE_NULL OBSOL vtrace 116 AUE_GETTIMEOFDAY STD|CAPENABLED { int gettimeofday( - _Out_ struct timeval *tp, + _Out_ _Contains_long_timet_ struct timeval *tp, _Out_opt_ struct timezone *tzp ); } 117 AUE_GETRUSAGE STD|CAPENABLED { int getrusage( int who, - _Out_ struct rusage *rusage + _Out_ _Contains_long_ struct rusage *rusage ); } 118 AUE_GETSOCKOPT STD|CAPENABLED { @@ -758,20 +770,20 @@ 120 AUE_READV STD|CAPENABLED { int readv( int fd, - _Inout_updates_(iovcnt) struct iovec *iovp, + _Inout_updates_(iovcnt) _Contains_long_ptr_ struct iovec *iovp, u_int iovcnt ); } 121 AUE_WRITEV STD|CAPENABLED { int writev( int fd, - _In_reads_opt_(iovcnt) struct iovec *iovp, + _In_reads_opt_(iovcnt) _Contains_long_ptr_ struct iovec *iovp, u_int iovcnt ); } 122 AUE_SETTIMEOFDAY STD { int settimeofday( - _In_ const struct timeval *tv, + _In_ _Contains_long_timet_ const struct timeval *tv, _In_opt_ const struct timezone *tzp ); } @@ -878,14 +890,14 @@ 138 AUE_UTIMES STD { int utimes( _In_z_ const char *path, - _In_ const struct timeval *tptr + _In_ _Contains_long_timet_ const struct timeval *tptr ); } 139 AUE_NULL OBSOL 4.2 sigreturn 140 AUE_ADJTIME STD { int adjtime( - _In_ const struct timeval *delta, - _Out_opt_ struct timeval *olddelta + _In_ _Contains_long_timet_ const struct timeval *delta, + _Out_opt_ _Contains_long_timet_ struct timeval *olddelta ); } 141 AUE_GETPEERNAME COMPAT|CAPENABLED { @@ -970,13 +982,13 @@ 157 AUE_STATFS COMPAT4 { int statfs( _In_z_ const char *path, - _Out_ struct ostatfs *buf + _Out_ _Contains_long_ struct ostatfs *buf ); } 158 AUE_FSTATFS COMPAT4|CAPENABLED { int fstatfs( int fd, - _Out_ struct ostatfs *buf + _Out_ _Contains_long_ struct ostatfs *buf ); } 159 AUE_NULL RESERVED @@ -1079,7 +1091,7 @@ } 176 AUE_NTP_ADJTIME STD { int ntp_adjtime( - _Inout_ struct timex *tp + _Inout_ _Contains_long_ struct timex *tp ); } 177-180 AUE_NULL RESERVED @@ -1105,19 +1117,19 @@ 188 AUE_STAT COMPAT11 { int stat( _In_z_ const char *path, - _Out_ struct freebsd11_stat *ub + _Out_ _Contains_timet_ struct freebsd11_stat *ub ); } 189 AUE_FSTAT COMPAT11|CAPENABLED { int fstat( int fd, - _Out_ struct freebsd11_stat *sb + _Out_ _Contains_timet_ struct freebsd11_stat *sb ); } 190 AUE_LSTAT COMPAT11 { int lstat( _In_z_ const char *path, - _Out_ struct freebsd11_stat *ub + _Out_ _Contains_timet_ struct freebsd11_stat *ub ); } 191 AUE_PATHCONF STD { @@ -1219,7 +1231,7 @@ 206 AUE_FUTIMES STD|CAPENABLED { int futimes( int fd, - _In_reads_(2) const struct timeval *tptr + _In_reads_(2) _Contains_long_timet_ const struct timeval *tptr ); } 207 AUE_GETPGID STD|CAPENABLED { @@ -1254,7 +1266,7 @@ int semid, int semnum, int cmd, - union semun_old *arg + _Contains_ptr_ union semun_old *arg ); } 221 AUE_SEMGET NOSTD { @@ -1276,7 +1288,7 @@ int msgctl( int msqid, int cmd, - struct msqid_ds_old *buf + _Contains_long_ptr_timet_ struct msqid_ds_old *buf ); } 225 AUE_MSGGET NOSTD { @@ -1288,7 +1300,7 @@ 226 AUE_MSGSND NOSTD { int msgsnd( int msqid, - _In_reads_bytes_(msgsz) const void *msgp, + _In_reads_bytes_(msgsz) _Contains_long_ const void *msgp, size_t msgsz, int msgflg ); @@ -1296,7 +1308,7 @@ 227 AUE_MSGRCV NOSTD { ssize_t msgrcv( int msqid, - _Out_writes_bytes_(msgsz) void *msgp, + _Out_writes_bytes_(msgsz) _Contains_long_ void *msgp, size_t msgsz, long msgtyp, int msgflg @@ -1313,7 +1325,7 @@ int shmctl( int shmid, int cmd, - struct shmid_ds_old *buf + _Contains_long_ struct shmid_ds_old *buf ); } 230 AUE_SHMDT NOSTD { @@ -1331,25 +1343,25 @@ 232 AUE_NULL STD|CAPENABLED { int clock_gettime( clockid_t clock_id, - _Out_ struct timespec *tp + _Out_ _Contains_long_timet_ struct timespec *tp ); } 233 AUE_CLOCK_SETTIME STD { int clock_settime( clockid_t clock_id, - _In_ const struct timespec *tp + _In_ _Contains_long_timet_ const struct timespec *tp ); } 234 AUE_NULL STD|CAPENABLED { int clock_getres( clockid_t clock_id, - _Out_ struct timespec *tp + _Out_ _Contains_long_timet_ struct timespec *tp ); } 235 AUE_NULL STD|CAPENABLED { int ktimer_create( clockid_t clock_id, - _In_ struct sigevent *evp, + _In_ _Contains_long_ptr_ struct sigevent *evp, _Out_ int *timerid ); } @@ -1362,14 +1374,14 @@ int ktimer_settime( int timerid, int flags, - _In_ const struct itimerspec *value, - _Out_opt_ struct itimerspec *ovalue + _In_ _Contains_long_timet_ const struct itimerspec *value, + _Out_opt_ _Contains_long_timet_ struct itimerspec *ovalue ); } 238 AUE_NULL STD|CAPENABLED { int ktimer_gettime( int timerid, - _Out_ struct itimerspec *value + _Out_ _Contains_long_timet_ struct itimerspec *value ); } 239 AUE_NULL STD|CAPENABLED { @@ -1379,8 +1391,8 @@ } 240 AUE_NULL STD|CAPENABLED { int nanosleep( - _In_ const struct timespec *rqtp, - _Out_opt_ struct timespec *rmtp + _In_ _Contains_long_timet_ const struct timespec *rqtp, + _Out_opt_ _Contains_long_timet_ struct timespec *rmtp ); } 241 AUE_NULL STD { @@ -1390,20 +1402,20 @@ } 242 AUE_NULL STD { int ffclock_setestimate( - _In_ struct ffclock_estimate *cest + _In_ _Contains_timet_ struct ffclock_estimate *cest ); } 243 AUE_NULL STD { int ffclock_getestimate( - _Out_ struct ffclock_estimate *cest + _Out_ _Contains_timet_ struct ffclock_estimate *cest ); } 244 AUE_NULL STD { int clock_nanosleep( clockid_t clock_id, int flags, - _In_ const struct timespec *rqtp, - _Out_opt_ struct timespec *rmtp + _In_ _Contains_long_timet_ const struct timespec *rqtp, + _Out_opt_ _Contains_long_timet_ struct timespec *rmtp ); } 245-246 AUE_NULL RESERVED @@ -1416,7 +1428,7 @@ } 248 AUE_NULL STD|CAPENABLED { int ntp_gettime( - _Out_ struct ntptimeval *ntvp + _Out_ _Contains_long_timet_ struct ntptimeval *ntvp ); } 249 AUE_NULL RESERVED @@ -1445,20 +1457,20 @@ } 255 AUE_AIO_READ STD|CAPENABLED { int aio_read( - _Inout_ struct aiocb *aiocbp + _Inout_ _Contains_long_ptr_ struct aiocb *aiocbp ); } 256 AUE_AIO_WRITE STD|CAPENABLED { int aio_write( - _Inout_ struct aiocb *aiocbp + _Inout_ _Contains_long_ptr_ struct aiocb *aiocbp ); } 257 AUE_LIO_LISTIO STD|CAPENABLED { int lio_listio( int mode, - _Inout_updates_(nent) struct aiocb * const *acb_list, + _Inout_updates_(nent) _Contains_long_ptr_ struct aiocb * const *acb_list, int nent, - _In_opt_ struct sigevent *sig + _In_opt_ _Contains_long_ptr_ struct sigevent *sig ); } 258-271 AUE_NULL RESERVED @@ -1480,33 +1492,33 @@ 276 AUE_LUTIMES STD { int lutimes( _In_z_ const char *path, - _In_ const struct timeval *tptr + _In_ _Contains_long_timet_ const struct timeval *tptr ); } 277 AUE_NULL OBSOL netbsd_msync 278 AUE_STAT COMPAT11 { int nstat( _In_z_ const char *path, - _Out_ struct nstat *ub + _Out_ _Contains_long_timet_ struct nstat *ub ); } 279 AUE_FSTAT COMPAT11 { int nfstat( int fd, - _Out_ struct nstat *sb + _Out_ _Contains_long_timet_ struct nstat *sb ); } 280 AUE_LSTAT COMPAT11 { int nlstat( _In_z_ const char *path, - _Out_ struct nstat *ub + _Out_ _Contains_long_timet_ struct nstat *ub ); } 281-288 AUE_NULL RESERVED 289 AUE_PREADV STD|CAPENABLED { ssize_t preadv( int fd, - _In_reads_(iovcnt) struct iovec *iovp, + _In_reads_(iovcnt) _Contains_long_ptr_ struct iovec *iovp, u_int iovcnt, off_t offset ); @@ -1514,7 +1526,7 @@ 290 AUE_PWRITEV STD|CAPENABLED { ssize_t pwritev( int fd, - _In_reads_(iovcnt) struct iovec *iovp, + _In_reads_(iovcnt) _Contains_long_ptr_ struct iovec *iovp, u_int iovcnt, off_t offset ); @@ -1523,7 +1535,7 @@ 297 AUE_FHSTATFS COMPAT4 { int fhstatfs( _In_ const struct fhandle *u_fhp, - _Out_ struct ostatfs *buf + _Out_ _Contains_long_ struct ostatfs *buf ); } 298 AUE_FHOPEN STD { @@ -1535,7 +1547,7 @@ 299 AUE_FHSTAT COMPAT11 { int fhstat( _In_ const struct fhandle *u_fhp, - _Out_ struct freebsd11_stat *sb + _Out_ _Contains_long_timet_ struct freebsd11_stat *sb ); } 300 AUE_NULL STD { @@ -1546,7 +1558,7 @@ 301 AUE_NULL STD { int modstat( int modid, - _Out_ struct module_stat *stat + _Out_ _Contains_long_ struct module_stat *stat ); } 302 AUE_NULL STD { @@ -1582,7 +1594,7 @@ 308 AUE_NULL STD { int kldstat( int fileid, - _Out_ struct kld_file_stat *stat + _Out_ _Contains_long_ptr_ struct kld_file_stat *stat ); } 309 AUE_NULL STD { @@ -1612,43 +1624,43 @@ 313 AUE_NULL OBSOL signanosleep 314 AUE_AIO_RETURN STD|CAPENABLED { ssize_t aio_return( - _Inout_ struct aiocb *aiocbp + _Inout_ _Contains_long_ptr_ struct aiocb *aiocbp ); } 315 AUE_AIO_SUSPEND STD|CAPENABLED { int aio_suspend( - _Inout_updates_(nent) struct aiocb * const * aiocbp, + _Inout_updates_(nent) _Contains_long_ptr_ struct aiocb * const * aiocbp, int nent, - _In_opt_ const struct timespec *timeout + _In_opt_ _Contains_long_timet_ const struct timespec *timeout ); } 316 AUE_AIO_CANCEL STD|CAPENABLED { int aio_cancel( int fd, - _In_opt_ struct aiocb *aiocbp + _In_opt_ _Contains_long_ptr_ struct aiocb *aiocbp ); } 317 AUE_AIO_ERROR STD|CAPENABLED { int aio_error( - _In_ struct aiocb *aiocbp + _In_ _Contains_long_ptr_ struct aiocb *aiocbp ); } 318 AUE_AIO_READ COMPAT6|CAPENABLED { int aio_read( - _Inout_ struct oaiocb *aiocbp + _Inout_ _Contains_long_ptr_ struct oaiocb *aiocbp ); } 319 AUE_AIO_WRITE COMPAT6|CAPENABLED { int aio_write( - _Inout_ struct oaiocb *aiocbp + _Inout_ _Contains_long_ptr_ struct oaiocb *aiocbp ); } 320 AUE_LIO_LISTIO COMPAT6|CAPENABLED { int lio_listio( int mode, - _Inout_updates_(nent) struct oaiocb * const *acb_list, + _Inout_updates_(nent) _Contains_long_ptr_ struct oaiocb * const *acb_list, int nent, - _In_opt_ struct osigevent *sig + _In_opt_ _Contains_ptr_ struct osigevent *sig ); } 321 AUE_NULL STD|CAPENABLED { @@ -1710,7 +1722,7 @@ 334 AUE_NULL STD|CAPENABLED { int sched_rr_get_interval( pid_t pid, - _Out_ struct timespec *interval + _Out_ _Contains_long_timet_ struct timespec *interval ); } 335 AUE_NULL STD|CAPENABLED { @@ -1725,7 +1737,7 @@ int s, off_t offset, size_t nbytes, - _In_opt_ struct sf_hdtr *hdtr, + _In_opt_ _Contains_ptr_ struct sf_hdtr *hdtr, _Out_opt_ off_t *sbytes, int flags ); @@ -1734,12 +1746,12 @@ int kldsym( int fileid, int cmd, - _In_ void *data + _In_ _Contains_long_ptr_ void *data ); } 338 AUE_JAIL STD { int jail( - _In_ struct jail *jail + _In_ _Contains_ptr_ struct jail *jail ); } 339 AUE_NULL NOSTD|NOTSTATIC { @@ -1766,8 +1778,8 @@ 342 AUE_SIGACTION COMPAT4|CAPENABLED { int sigaction( int sig, - _In_opt_ const struct sigaction *act, - _Out_opt_ struct sigaction *oact + _In_opt_ _Contains_ptr_ const struct sigaction *act, + _Out_opt_ _Contains_ptr_ struct sigaction *oact ); } 343 AUE_SIGPENDING STD|CAPENABLED { @@ -1777,20 +1789,20 @@ } 344 AUE_SIGRETURN COMPAT4|CAPENABLED { int sigreturn( - _In_ const struct freebsd4_ucontext *sigcntxp + _In_ _Contains_long_ptr_ const struct freebsd4_ucontext *sigcntxp ); } 345 AUE_SIGWAIT STD|CAPENABLED { int sigtimedwait( _In_ const sigset_t *set, - _Out_opt_ struct siginfo *info, - _In_opt_ const struct timespec *timeout + _Out_opt_ _Contains_long_ptr_ struct siginfo *info, + _In_opt_ _Contains_long_timet_ const struct timespec *timeout ); } 346 AUE_NULL STD|CAPENABLED { int sigwaitinfo( _In_ const sigset_t *set, - _Out_opt_ struct siginfo *info + _Out_opt_ _Contains_long_ptr_ struct siginfo *info ); } 347 AUE_ACL_GET_FILE STD { @@ -1884,7 +1896,7 @@ 359 AUE_AIO_WAITCOMPLETE STD|CAPENABLED { ssize_t aio_waitcomplete( _Outptr_result_maybenull_ struct aiocb **aiocbp, - _In_opt_ struct timespec *timeout + _In_opt_ _Contains_long_timet_ struct timespec *timeout ); } 360 AUE_GETRESUID STD|CAPENABLED { @@ -1907,11 +1919,11 @@ 363 AUE_KEVENT COMPAT11|CAPENABLED { int kevent( int fd, - _In_reads_opt_(nchanges) const struct freebsd11_kevent *changelist, + _In_reads_opt_(nchanges) _Contains_ptr_ const struct freebsd11_kevent *changelist, int nchanges, - _Out_writes_opt_(nevents) struct freebsd11_kevent *eventlist, + _Out_writes_opt_(nevents) _Contains_ptr_ struct freebsd11_kevent *eventlist, int nevents, - _In_opt_ const struct timespec *timeout + _In_opt_ _Contains_long_timet_ const struct timespec *timeout ); } 364 AUE_NULL OBSOL __cap_get_proc @@ -1971,7 +1983,7 @@ } 378 AUE_NMOUNT STD { int nmount( - _In_reads_(iovcnt) struct iovec *iovp, + _In_reads_(iovcnt) _Contains_long_ptr_ struct iovec *iovp, unsigned int iovcnt, int flags ); @@ -1983,36 +1995,36 @@ 383 AUE_NULL OBSOL kse_release 384 AUE_NULL STD|CAPENABLED { int __mac_get_proc( - _In_ struct mac *mac_p + _In_ _Contains_long_ptr_ struct mac *mac_p ); } 385 AUE_NULL STD|CAPENABLED { int __mac_set_proc( - _In_ struct mac *mac_p + _In_ _Contains_long_ptr_ struct mac *mac_p ); } 386 AUE_NULL STD|CAPENABLED { int __mac_get_fd( int fd, - _In_ struct mac *mac_p + _In_ _Contains_long_ptr_ struct mac *mac_p ); } 387 AUE_NULL STD { int __mac_get_file( _In_z_ const char *path_p, - _In_ struct mac *mac_p + _In_ _Contains_long_ptr_ struct mac *mac_p ); } 388 AUE_NULL STD|CAPENABLED { int __mac_set_fd( int fd, - _In_ struct mac *mac_p + _In_ _Contains_long_ptr_ struct mac *mac_p ); } 389 AUE_NULL STD { int __mac_set_file( _In_z_ const char *path_p, - _In_ struct mac *mac_p + _In_ _Contains_long_ptr_ struct mac *mac_p ); } 390 AUE_NULL STD { @@ -2041,7 +2053,7 @@ int s, off_t offset, size_t nbytes, - _In_opt_ struct sf_hdtr *hdtr, + _In_opt_ _Contains_ptr_ struct sf_hdtr *hdtr, _Out_opt_ off_t *sbytes, int flags ); @@ -2133,19 +2145,19 @@ 409 AUE_NULL STD { int __mac_get_pid( pid_t pid, - _In_ struct mac *mac_p + _In_ _Contains_long_ptr_ struct mac *mac_p ); } 410 AUE_NULL STD { int __mac_get_link( _In_z_ const char *path_p, - _In_ struct mac *mac_p + _In_ _Contains_long_ptr_ struct mac *mac_p ); } 411 AUE_NULL STD { int __mac_set_link( _In_z_ const char *path_p, - _In_ struct mac *mac_p + _In_ _Contains_long_ptr_ struct mac *mac_p ); } 412 AUE_EXTATTR_SET_LINK STD { @@ -2178,36 +2190,36 @@ _In_z_ const char *fname, _In_ char **argv, _In_ char **envv, - _In_ struct mac *mac_p + _In_ _Contains_long_ptr_ struct mac *mac_p ); } 416 AUE_SIGACTION STD|CAPENABLED { int sigaction( int sig, - _In_opt_ const struct sigaction *act, - _Out_opt_ struct sigaction *oact + _In_opt_ _Contains_ptr_ const struct sigaction *act, + _Out_opt_ _Contains_ptr_ struct sigaction *oact ); } 417 AUE_SIGRETURN STD|CAPENABLED { int sigreturn( - _In_ const struct __ucontext *sigcntxp + _In_ _Contains_long_ptr_ const struct __ucontext *sigcntxp ); } 418-420 AUE_NULL RESERVED 421 AUE_NULL STD|CAPENABLED { int getcontext( - _Out_ struct __ucontext *ucp + _Out_ _Contains_long_ptr_ struct __ucontext *ucp ); } 422 AUE_NULL STD|CAPENABLED { int setcontext( - _In_ const struct __ucontext *ucp + _In_ _Contains_long_ptr_ const struct __ucontext *ucp ); } 423 AUE_NULL STD { int swapcontext( - _Out_ struct __ucontext *oucp, - _In_ const struct __ucontext *ucp + _Out_ _Contains_long_ptr_ struct __ucontext *oucp, + _In_ _Contains_long_ptr_ const struct __ucontext *ucp ); } 424 AUE_SWAPOFF STD { @@ -2250,7 +2262,7 @@ } 430 AUE_THR_CREATE STD|CAPENABLED { int thr_create( - _In_ ucontext_t *ctx, + _In_ _Contains_long_ptr_ ucontext_t *ctx, _Out_ long *id, int flags ); @@ -2318,12 +2330,12 @@ 441 AUE_SEMWAIT NOSTD { int ksem_timedwait( semid_t id, - _In_opt_ const struct timespec *abstime + _In_opt_ _Contains_long_timet_ const struct timespec *abstime ); } 442 AUE_NULL STD|CAPENABLED { int thr_suspend( - _In_opt_ const struct timespec *timeout + _In_opt_ _Contains_long_timet_ const struct timespec *timeout ); } 443 AUE_NULL STD|CAPENABLED { @@ -2398,7 +2410,7 @@ } 455 AUE_THR_NEW STD|CAPENABLED { int thr_new( - _In_ struct thr_param *param, + _In_ _Contains_long_ptr_ struct thr_param *param, int param_size ); } @@ -2415,14 +2427,14 @@ _In_z_ const char *path, int flags, mode_t mode, - _In_opt_ const struct mq_attr *attr + _In_opt_ _Contains_long_ const struct mq_attr *attr ); } 458 AUE_MQ_SETATTR NOSTD|CAPENABLED { int kmq_setattr( int mqd, - _In_opt_ const struct mq_attr *attr, - _Out_opt_ struct mq_attr *oattr + _In_opt_ _Contains_long_ const struct mq_attr *attr, + _Out_opt_ _Contains_long_ struct mq_attr *oattr ); } 459 AUE_MQ_TIMEDRECEIVE NOSTD|CAPENABLED { @@ -2431,7 +2443,7 @@ _Out_writes_bytes_(msg_len) char *msg_ptr, size_t msg_len, _Out_opt_ unsigned *msg_prio, - _In_opt_ const struct timespec *abs_timeout + _In_opt_ _Contains_long_timet_ const struct timespec *abs_timeout ); } 460 AUE_MQ_TIMEDSEND NOSTD|CAPENABLED { @@ -2440,13 +2452,13 @@ _In_reads_bytes_(msg_len) const char *msg_ptr, size_t msg_len, unsigned msg_prio, - _In_opt_ const struct timespec *abs_timeout + _In_opt_ _Contains_long_timet_ const struct timespec *abs_timeout ); } 461 AUE_MQ_NOTIFY NOSTD|CAPENABLED { int kmq_notify( int mqd, - _In_opt_ const struct sigevent *sigev + _In_opt_ _Contains_long_ptr_ const struct sigevent *sigev ); } 462 AUE_MQ_UNLINK NOSTD { @@ -2470,7 +2482,7 @@ 465 AUE_AIO_FSYNC STD|CAPENABLED { int aio_fsync( int op, - _In_ struct aiocb *aiocbp + _In_ _Contains_long_ptr_ struct aiocb *aiocbp ); } 466 AUE_RTPRIO STD|CAPENABLED { @@ -2501,7 +2513,7 @@ 473 AUE_SCTP_GENERIC_SENDMSG_IOV NOSTD|CAPENABLED { int sctp_generic_sendmsg_iov( int sd, - _In_reads_(iovlen) struct iovec *iov, + _In_reads_(iovlen) _Contains_long_ptr_ struct iovec *iov, int iovlen, _In_reads_bytes_(tolen) const struct sockaddr *to, __socklen_t tolen, @@ -2512,7 +2524,7 @@ 474 AUE_SCTP_GENERIC_RECVMSG NOSTD|CAPENABLED { int sctp_generic_recvmsg( int sd, - _In_reads_(iovlen) struct iovec *iov, + _In_reads_(iovlen) _Contains_long_ptr_ struct iovec *iov, int iovlen, _Out_writes_bytes_(*fromlenaddr) struct sockaddr *from, _Out_ __socklen_t *fromlenaddr, @@ -2658,7 +2670,7 @@ int fstatat( int fd, _In_z_ const char *path, - _Out_ struct freebsd11_stat *buf, + _Out_ _Contains_long_timet_ struct freebsd11_stat *buf, int flag ); } @@ -2666,7 +2678,7 @@ int futimesat( int fd, _In_z_ const char *path, - _In_reads_(2) const struct timeval *times + _In_reads_(2) _Contains_long_timet_ const struct timeval *times ); } 495 AUE_LINKAT STD|CAPENABLED { @@ -2752,14 +2764,14 @@ } 506 AUE_JAIL_GET STD { int jail_get( - _In_reads_(iovcnt) struct iovec *iovp, + _In_reads_(iovcnt) _Contains_long_ptr_ struct iovec *iovp, unsigned int iovcnt, int flags ); } 507 AUE_JAIL_SET STD { int jail_set( - _In_reads_(iovcnt) struct iovec *iovp, + _In_reads_(iovcnt) _Contains_long_ptr_ struct iovec *iovp, *** 137 LINES SKIPPED *** From nobody Mon Nov 22 22:38:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AD2FC1893575; Mon, 22 Nov 2021 22:38: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 4HyhxY1mphz4YYJ; Mon, 22 Nov 2021 22:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 529452F88; Mon, 22 Nov 2021 22:38: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 1AMMc5tA047622; Mon, 22 Nov 2021 22:38:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMc5w9047621; Mon, 22 Nov 2021 22:38:05 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:38:05 GMT Message-Id: <202111222238.1AMMc5w9047621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: be67ea40c5a0 - main - freebsd32: generate from sys/kern/syscalls.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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be67ea40c5a0fd375d754a92e6cd8a3bfc508ba3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=be67ea40c5a0fd375d754a92e6cd8a3bfc508ba3 commit be67ea40c5a0fd375d754a92e6cd8a3bfc508ba3 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:58 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:58 +0000 freebsd32: generate from sys/kern/syscalls.master This avoids the need to keep a freebsd32-specific syscalls.master in sync with the default ABI. As evidenced by the number of commits required to sync the two, it is extremely easy for them to get out of sync due to misunderstandings and user errors. Reviewed by: kevans, kib --- sys/compat/freebsd32/Makefile | 2 +- sys/compat/freebsd32/capabilities.conf | 784 ---------------------- sys/compat/freebsd32/syscalls.conf | 49 +- sys/compat/freebsd32/syscalls.master | 1127 -------------------------------- sys/kern/syscalls.master | 22 +- 5 files changed, 67 insertions(+), 1917 deletions(-) diff --git a/sys/compat/freebsd32/Makefile b/sys/compat/freebsd32/Makefile index 8777b1992768..b4f72fcc2bca 100644 --- a/sys/compat/freebsd32/Makefile +++ b/sys/compat/freebsd32/Makefile @@ -3,6 +3,6 @@ # $FreeBSD$ GENERATED_PREFIX= freebsd32_ -CAPABILITIES_CONF= capabilities.conf +SYSENT_FILE= ${SYSDIR}/kern/syscalls.master .include "../../conf/sysent.mk" diff --git a/sys/compat/freebsd32/capabilities.conf b/sys/compat/freebsd32/capabilities.conf deleted file mode 100644 index 3ec922d54920..000000000000 --- a/sys/compat/freebsd32/capabilities.conf +++ /dev/null @@ -1,784 +0,0 @@ -## -## Copyright (c) 2008-2010 Robert N. M. Watson -## All rights reserved. -## -## This software was developed at the University of Cambridge Computer -## Laboratory with support from a grant from Google, Inc. -## -## 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. -## -## List of system calls enabled in capability mode, one name per line. -## -## System calls listed here operate either fully or partially in the absence -## of global namespaces or ambient authority. In capability mode system calls -## that operate only on global namespaces or require ambient authority have no -## utility and thus are not permitted. -## -## Notes: -## - sys_exit(2), abort2(2) and close(2) are very important. -## - Sorted alphabetically, please keep it that way. -## -## $FreeBSD$ -## - -## -## Allow ACL and MAC label operations by file descriptor, subject to -## capability rights. Allow MAC label operations on the current process but -## we will need to scope __mac_get_pid(2). -## -__acl_aclcheck_fd -__acl_delete_fd -__acl_get_fd -__acl_set_fd -__mac_get_fd -#__mac_get_pid -__mac_get_proc -__mac_set_fd -__mac_set_proc - -## -## Allow creating special file descriptors like eventfd(2). -## -__specialfd - -## -## Allow sysctl(2) as we scope internal to the call; this is a global -## namespace, but there are several critical sysctls required for almost -## anything to run, such as hw.pagesize. For now that policy lives in the -## kernel for performance and simplicity, but perhaps it could move to a -## proxying daemon in userspace. -## -__sysctl -__sysctlbyname - -## -## Allow umtx operations as these are scoped by address space. -## -## XXRW: Need to check this very carefully. -## -_umtx_op - -## -## Allow process termination using abort2(2). -## -abort2 - -## -## Allow accept(2) since it doesn't manipulate namespaces directly, rather -## relies on existing bindings on a socket, subject to capability rights. -## -accept -accept4 - -## -## Allow AIO operations by file descriptor, subject to capability rights. -## -aio_cancel -aio_error -aio_fsync -aio_read -aio_return -aio_suspend -aio_waitcomplete -aio_write -aio_writev -aio_readv - -## -## audit(2) is a global operation, submitting to the global trail, but it is -## controlled by privilege, and it might be useful to be able to submit -## records from sandboxes. For now, disallow, but we may want to think about -## providing some sort of proxy service for this. -## -#audit - -## -## Allow bindat(2). -## -bindat - -## -## Allow capability mode and capability system calls. -## -cap_enter -cap_fcntls_get -cap_fcntls_limit -cap_getmode -cap_ioctls_get -cap_ioctls_limit -__cap_rights_get -cap_rights_limit - -## -## Allow read-only clock operations. -## -clock_getres -clock_gettime - -## -## Always allow file descriptor close(2). -## -close -close_range -closefrom - -## -## Allow connectat(2). -## -connectat - -## -## copy_file_range(2) reads from one descriptor and writes to the other. -## -copy_file_range - -## -## cpuset(2) and related calls are limited to caller's own process/thread. -## -#cpuset -cpuset_getaffinity -cpuset_getdomain -#cpuset_getid -cpuset_setaffinity -cpuset_setdomain -#cpuset_setid - -## -## Always allow dup(2) and dup2(2) manipulation of the file descriptor table. -## -dup -dup2 - -## -## Allow extended attribute operations by file descriptor, subject to -## capability rights. -## -extattr_delete_fd -extattr_get_fd -extattr_list_fd -extattr_set_fd - -## -## Allow changing file flags, mode, and owner by file descriptor, subject to -## capability rights. -## -fchflags -fchmod -fchown - -## -## For now, allow fcntl(2), subject to capability rights, but this probably -## needs additional scoping. -## -fcntl - -## -## Allow fexecve(2), subject to capability rights. We perform some scoping, -## such as disallowing privilege escalation. -## -fexecve - -## -## Allow flock(2), subject to capability rights. -## -flock - -## -## Allow fork(2), even though it returns pids -- some applications seem to -## prefer this interface. -## -fork - -## -## Allow fpathconf(2), subject to capability rights. -## -fpathconf - -## -## Allow various file descriptor-based I/O operations, subject to capability -## rights. -## -freebsd11_fstat -freebsd11_fstatat -freebsd11_getdirentries -freebsd11_fstatfs -freebsd11_mknodat -freebsd6_ftruncate -freebsd6_lseek -freebsd6_mmap -freebsd6_pread -freebsd6_pwrite - -## -## Allow I/O-related file operations, subject to capability rights. -## -fspacectl - -## -## Allow querying file and file system state with fstat(2) and fstatfs(2), -## subject to capability rights. -## -fstat -fstatfs - -## -## Allow further file descriptor-based I/O operations, subject to capability -## rights. -## -fdatasync -fsync -ftruncate - -## -## Allow futimens(2) and futimes(2), subject to capability rights. -## -futimens -futimes - -## -## Allow querying process audit state, subject to normal access control. -## -getaudit -getaudit_addr -getauid - -## -## Allow thread context management with getcontext(2). -## -getcontext - -## -## Allow directory I/O on a file descriptor, subject to capability rights. -## Originally we had separate capabilities for directory-specific read -## operations, but on BSD we allow reading the raw directory data, so we just -## rely on CAP_READ now. -## -getdents -getdirentries - -## -## Allow querying certain trivial global state. -## -getdomainname - -## -## Allow querying certain per-process resource limit state. -## -getdtablesize - -## -## Allow querying current process credential state. -## -getegid -geteuid - -## -## Allow querying certain trivial global state. -## -gethostid -gethostname - -## -## Allow querying per-process timer. -## -getitimer - -## -## Allow querying current process credential state. -## -getgid -getgroups -getlogin -getloginclass - -## -## Allow querying certain trivial global state. -## -getpagesize -getpeername - -## -## Allow querying certain per-process scheduling, resource limit, and -## credential state. -## -## XXXRW: getpgid(2) needs scoping. It's not clear if it's worth scoping -## getppid(2). getpriority(2) needs scoping. getrusage(2) needs scoping. -## getsid(2) needs scoping. -## -getpgid -getpgrp -getpid -getppid -getpriority -getresgid -getresuid -getrlimit -getrusage -getsid - -## -## Allow getrandom -## -getrandom - -## -## Allow querying socket state, subject to capability rights. -## -## XXXRW: getsockopt(2) may need more attention. -## -getsockname -getsockopt - -## -## Allow querying the global clock. -## -gettimeofday - -## -## Allow querying current process credential state. -## -getuid - -## -## Allow ioctl(2), which hopefully will be limited by applications only to -## required commands with cap_ioctls_limit(2) syscall. -## -ioctl - -## -## Allow querying current process credential state. -## -issetugid - -## -## Allow kevent(2), as we will authorize based on capability rights on the -## target descriptor. -## -kevent - -## -## Allow kill(2), as we allow the process to send signals only to himself. -## -kill - -## -## Allow message queue operations on file descriptors, subject to capability -## rights. -## NOTE: Corresponding sysents are initialized in sys/kern/uipc_mqueue.c with -## SYF_CAPENABLED. -## -kmq_notify -kmq_setattr -kmq_timedreceive -kmq_timedsend - -## -## Allow kqueue(2), we will control use. -## -kqueue - -## -## Allow managing per-process timers. -## -ktimer_create -ktimer_delete -ktimer_getoverrun -ktimer_gettime -ktimer_settime - -## -## We can't allow ktrace(2) because it relies on a global namespace, but we -## might want to introduce an fktrace(2) of some sort. -## -#ktrace - -## -## Allow AIO operations by file descriptor, subject to capability rights. -## -lio_listio - -## -## Allow listen(2), subject to capability rights. -## -## XXXRW: One might argue this manipulates a global namespace. -## -listen - -## -## Allow I/O-related file descriptors, subject to capability rights. -## -lseek - -## -## Allow simple VM operations on the current process. -## -madvise -mincore -minherit -mlock -mlockall - -## -## Allow memory mapping a file descriptor, and updating protections, subject -## to capability rights. -## -mmap -mprotect - -## -## Allow simple VM operations on the current process. -## -msync -munlock -munlockall -munmap - -## -## Allow the current process to sleep. -## -nanosleep - -## -## Allow querying the global clock. -## -ntp_gettime - -## -## Allow AIO operations by file descriptor, subject to capability rights. -## -oaio_read -oaio_write - -## -## Allow simple VM operations on the current process. -## -break - -## -## Allow AIO operations by file descriptor, subject to capability rights. -## -olio_listio - -## -## Operations relative to directory capabilities. -## -chflagsat -faccessat -fchmodat -fchownat -fstatat -futimesat -linkat -mkdirat -mkfifoat -mknodat -openat -readlinkat -renameat -symlinkat -unlinkat -funlinkat -utimensat - -## -## Process descriptor-related system calls are allowed. -## -pdfork -pdgetpid -pdkill -#pdwait4 # not yet implemented - -## -## Allow pipe(2). -## -pipe -pipe2 - -## -## Allow poll(2), which will be scoped by capability rights. -## -poll -ppoll - -## -## Allow I/O-related file descriptors, subject to capability rights. -## -posix_fallocate -pread -preadv - -## -## Allow access to profiling state on the current process. -## -profil - -## -## Disallow ptrace(2) for now, but we do need debugging facilities in -## capability mode, so we will want to revisit this, possibly by scoping its -## operation. -## -#ptrace - -## -## Allow I/O-related file descriptors, subject to capability rights. -## -pwrite -pwritev -read -readv -recv -recvfrom -recvmsg - -## -## Allow real-time scheduling primitives to be used. -## -## XXXRW: These require scoping. -## -rtprio -rtprio_thread - -## -## Allow simple VM operations on the current process. -## -sbrk - -## -## Allow querying trivial global scheduler state. -## -sched_get_priority_max -sched_get_priority_min -sched_getcpu - -## -## Allow various thread/process scheduler operations. -## -## XXXRW: Some of these require further scoping. -## -sched_getparam -sched_getscheduler -sched_rr_get_interval -sched_setparam -sched_setscheduler -sched_yield - -## -## Allow I/O-related file descriptors, subject to capability rights. -## NOTE: Corresponding sysents are initialized in sys/netinet/sctp_syscalls.c -## with SYF_CAPENABLED. -## -sctp_generic_recvmsg -sctp_generic_sendmsg -sctp_generic_sendmsg_iov -sctp_peeloff - -## -## Allow pselect(2) and select(2), which will be scoped by capability rights. -## -## XXXRW: But is it? -## -pselect -select - -## -## Allow I/O-related file descriptors, subject to capability rights. Use of -## explicit addresses here is restricted by the system calls themselves. -## -send -sendfile -sendmsg -sendto - -## -## Allow setting per-process audit state, which is controlled separately by -## privileges. -## -setaudit -setaudit_addr -setauid - -## -## Allow setting thread context. -## -setcontext - -## -## Allow setting current process credential state, which is controlled -## separately by privilege. -## -setegid -seteuid -setgid - -## -## Allow use of the process interval timer. -## -setitimer - -## -## Allow setpriority(2). -## -## XXXRW: Requires scoping. -## -setpriority - -## -## Allow setting current process credential state, which is controlled -## separately by privilege. -## -setregid -setresgid -setresuid -setreuid - -## -## Allow setting process resource limits with setrlimit(2). -## -setrlimit - -## -## Allow creating a new session with setsid(2). -## -setsid - -## -## Allow setting socket options with setsockopt(2), subject to capability -## rights. -## -## XXXRW: Might require scoping. -## -setsockopt - -## -## Allow setting current process credential state, which is controlled -## separately by privilege. -## -setuid - -## -## shm_open(2) is scoped so as to allow only access to new anonymous objects. -## -shm_open -shm_open2 - -## -## Allow I/O-related file descriptors, subject to capability rights. -## -shutdown - -## -## Allow signal control on current process. -## -sigaction -sigaltstack -sigblock -sigfastblock -sigpending -sigprocmask -sigqueue -sigreturn -sigsetmask -sigstack -sigsuspend -sigtimedwait -sigvec -sigwaitinfo -sigwait - -## -## Allow creating new socket pairs with socket(2) and socketpair(2). -## -socket -socketpair - -## -## Allow simple VM operations on the current process. -## -## XXXRW: Kernel doesn't implement this, so drop? -## -sstk - -## -## Do allow sync(2) for now, but possibly shouldn't. -## -sync - -## -## Always allow process termination with sys_exit(2). -## -sys_exit - -## -## sysarch(2) does rather diverse things, but is required on at least i386 -## in order to configure per-thread data. As such, it's scoped on each -## architecture. -## -sysarch - -## -## Allow thread operations operating only on current process. -## -thr_create -thr_exit -thr_kill - -## -## Disallow thr_kill2(2), as it may operate beyond the current process. -## -## XXXRW: Requires scoping. -## -#thr_kill2 - -## -## Allow thread operations operating only on current process. -## -thr_new -thr_self -thr_set_name -thr_suspend -thr_wake - -## -## Allow manipulation of the current process umask with umask(2). -## -umask - -## -## Allow submitting of process trace entries with utrace(2). -## -utrace - -## -## Allow generating UUIDs with uuidgen(2). -## -uuidgen - -## -## Allow I/O-related file descriptors, subject to capability rights. -## -write -writev - -## -## Allow processes to yield(2). -## -yield diff --git a/sys/compat/freebsd32/syscalls.conf b/sys/compat/freebsd32/syscalls.conf index 4ccf7f545dde..6b80018165df 100644 --- a/sys/compat/freebsd32/syscalls.conf +++ b/sys/compat/freebsd32/syscalls.conf @@ -9,6 +9,51 @@ syscallprefix="FREEBSD32_SYS_" switchname="freebsd32_sysent" namesname="freebsd32_syscallnames" systrace="freebsd32_systrace_args.c" +abi_flags="long_size|pointer_size|time_t_size|pair_64bit" abi_func_prefix="freebsd32_" -abi_flags="pair_64bit" -capabilities_conf="capabilities.conf" +abi_type_suffix="32" +abi_long="int32_t" +abi_u_long="uint32_t" +abi_semid_t="int32_t" +abi_size_t="uint32_t" +abi_ptr_array_t="uint32_t" +abi_headers="#include " + +# +# Variables below this line are exceptions to the ABI changes programatically +# detected by makesyscalls.lua. New system calls should not require an entry +# here in nearly virtually all cases. New entries are almost certainly +# representative of badly designed interfaces. +# + +# System calls that require freebsd32-specific handling: +# fcntl - need to sign extend arg unless it's a pointer +# ksem_init, ksem_open - XXX not required +# mprotect - i386 read-implies-exec +# msgsys, semsys, shmsys - some sub-syscalls require compat +# sigqueue - union sival requires special handing on big-endian +# sigreturn - struct osigcontext +# sysarch - always MD +# _umtx_lock _umtx_unlock _umtx_op - arguments require special handling +syscall_abi_change="fcntl ksem_init ksem_open mprotect msgsys semsys shmsys sigqueue sigreturn sysarch _umtx_lock _umtx_unlock _umtx_op" + +# System calls that appear to require handling, but don't: +# aio_cancel - the aiocb pointer is just a virtual address +# thr_* - the lack of sign extension of long args is OK +# sctp_generic_* - iovec differences handled internally +syscall_no_abi_change="aio_cancel thr_exit thr_kill thr_kill2 thr_self thr_set_name thr_wake sctp_generic_sendmsg_iov sctp_generic_recvmsg" + +# OBSOL syscalls +# getkerninfo - obsolete and can't be implemented (kernel virtual addresses can't fit in 32-bits) +obsol="getkerninfo" + +# Syscalls without implementations: +# *mac_* - should be implemented +# afs3_syscall - requires significant porting, probably doesn't make sense +# kldsym - can't be implemented (kernel virtual addresses can't fit in 32-bits) +# lgetfh - should be implemented +# nlm_syscall - requires significant porting, probably doesn't make sense +# nnpfs_syscall - requires significant porting, probably doesn't make sense +# ntp_gettime - should be implemented +# thr_create - was unimplemented and appears to be unnecessicary +unimpl="afs3_syscall kldsym __mac_get_proc __mac_set_proc __mac_get_fd __mac_get_file __mac_set_fd __mac_set_file __mac_get_pid __mac_get_link __mac_set_link __mac_execve mac_syscall nfssvc nlm_syscall ntp_gettime lgetfh nnpfs_syscall thr_create" diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master deleted file mode 100644 index d4e309c8f68b..000000000000 --- a/sys/compat/freebsd32/syscalls.master +++ /dev/null @@ -1,1127 +0,0 @@ - $FreeBSD$ -; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 -; from: src/sys/kern/syscalls.master 1.107 -; -; System call name/number master file. -; Processed to created init_sysent.c, syscalls.c and syscall.h. - -; Columns: number audit type name alt{name,tag,rtyp}/comments -; number system call number, must be in order -; audit the audit event associated with the system call -; A value of AUE_NULL means no auditing, but it also means that -; there is no audit event for the call at this time. For the -; case where the event exists, but we don't want auditing, the -; event should be #defined to AUE_NULL in audit_kevents.h. -; type one of STD, OBSOL, UNIMPL, COMPAT, COMPAT4, COMPAT6, -; COMPAT7, COMPAT11, COMPAT12, NODEF, NOARGS, NOPROTO, NOSTD -; The COMPAT* options may be combined with one or more NO* -; options separated by '|' with no spaces (e.g. COMPAT|NOARGS) -; name pseudo-prototype of syscall routine -; If one of the following alts is different, then all appear: -; altname name of system call if different -; alttag name of args struct tag if different from [o]`name'"_args" -; altrtyp return type if not int (bogus - syscalls always return int) -; for UNIMPL/OBSOL, name continues with comments - -; types: -; STD always included -; COMPAT included on COMPAT #ifdef -; COMPAT4 included on COMPAT_FREEBSD4 #ifdef (FreeBSD 4 compat) -; COMPAT6 included on COMPAT_FREEBSD6 #ifdef (FreeBSD 6 compat) -; COMPAT7 included on COMPAT_FREEBSD7 #ifdef (FreeBSD 7 compat) -; COMPAT10 included on COMPAT_FREEBSD10 #ifdef (FreeBSD 10 compat) -; COMPAT11 included on COMPAT_FREEBSD11 #ifdef (FreeBSD 11 compat) -; COMPAT12 included on COMPAT_FREEBSD12 #ifdef (FreeBSD 12 compat) -; OBSOL obsolete, not included in system, only specifies name -; UNIMPL not implemented, placeholder only -; NOSTD implemented but as a lkm that can be statically -; compiled in; sysent entry will be filled with lkmressys -; so the SYSCALL_MODULE macro works -; NOARGS same as STD except do not create structure in sys/sysproto.h -; NODEF same as STD except only have the entry in the syscall table -; added. Meaning - do not create structure or function -; prototype in sys/sysproto.h -; NOPROTO same as STD except do not create structure or -; function prototype in sys/sysproto.h. Does add a -; definition to syscall.h besides adding a sysent. - -; #ifdef's, etc. may be included, and are copied to the output files. - -#include -#include -#include -#include - -; Reserved/unimplemented system calls in the range 0-150 inclusive -; are reserved for use in future Berkeley releases. -; Additional system calls implemented in vendor and other -; redistributions should be placed in the reserved range at the end -; of the current calls. - -0 AUE_NULL NOPROTO { int nosys(void); } syscall nosys_args int -1 AUE_EXIT NOPROTO { void sys_exit(int rval); } exit \ - sys_exit_args void -2 AUE_FORK NOPROTO { int fork(void); } -3 AUE_READ NOPROTO { ssize_t read(int fd, void *buf, \ - size_t nbyte); } -4 AUE_WRITE NOPROTO { ssize_t write(int fd, const void *buf, \ - size_t nbyte); } -5 AUE_OPEN_RWTC NOPROTO { int open(const char *path, int flags, \ - mode_t mode); } -6 AUE_CLOSE NOPROTO { int close(int fd); } -7 AUE_WAIT4 STD { int freebsd32_wait4(int pid, int *status, \ - int options, struct rusage32 *rusage); } -8 AUE_CREAT COMPAT|NOPROTO { int creat(const char *path, \ - int mode); } -9 AUE_LINK NOPROTO { int link(const char *path, \ - const char *link); } -10 AUE_UNLINK NOPROTO { int unlink(const char *path); } -11 AUE_NULL OBSOL execv -12 AUE_CHDIR NOPROTO { int chdir(const char *path); } -13 AUE_FCHDIR NOPROTO { int fchdir(int fd); } -14 AUE_MKNOD COMPAT11|NOPROTO { int mknod(const char *path, \ - int mode, uint32_t dev); } -15 AUE_CHMOD NOPROTO { int chmod(const char *path, mode_t mode); } -16 AUE_CHOWN NOPROTO { int chown(const char *path, int uid, int gid); } -17 AUE_NULL NOPROTO { void *break(char *nsize); } -18 AUE_GETFSSTAT COMPAT4 { int freebsd32_getfsstat( \ - struct ostatfs32 *buf, int32_t bufsize, \ - int mode); } -19 AUE_LSEEK COMPAT { int freebsd32_lseek(int fd, int32_t offset, \ - int whence); } -20 AUE_GETPID NOPROTO { pid_t getpid(void); } -21 AUE_MOUNT NOPROTO { int mount(const char *type, \ - const char *path, \ - int flags, void *data); } *** 1077 LINES SKIPPED *** From nobody Mon Nov 22 22:38:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6190A1893702; Mon, 22 Nov 2021 22:38: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 4HyhxY43ryz4YL2; Mon, 22 Nov 2021 22:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 78BFA2E40; Mon, 22 Nov 2021 22:38: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 1AMMc6YT047646; Mon, 22 Nov 2021 22:38:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMc6aD047645; Mon, 22 Nov 2021 22:38:06 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:38:06 GMT Message-Id: <202111222238.1AMMc6aD047645@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: b92f4ae58a57 - main - freebsd32: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b92f4ae58a57fe736a2147662f7e2900b961c202 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b92f4ae58a57fe736a2147662f7e2900b961c202 commit b92f4ae58a57fe736a2147662f7e2900b961c202 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:58 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:58 +0000 freebsd32: regen There there are two changes here. First, ofreebsd32_sigreturn is declared to take a struct osigcontext rather than a struct ia32_sigcontext3. This type is incorrect, but harmlessly so. Second, the name of the unimplemented ogetkerninfo changes in freebsd32_syscallnames. --- sys/compat/freebsd32/freebsd32_proto.h | 2 +- sys/compat/freebsd32/freebsd32_syscalls.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 33323c902745..e7912d2fea0c 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -834,7 +834,7 @@ struct ofreebsd32_mmap_args { char pos_l_[PADL_(int32_t)]; int32_t pos; char pos_r_[PADR_(int32_t)]; }; struct ofreebsd32_sigreturn_args { - char sigcntxp_l_[PADL_(struct ia32_sigcontext3 *)]; struct ia32_sigcontext3 * sigcntxp; char sigcntxp_r_[PADR_(struct ia32_sigcontext3 *)]; + char sigcntxp_l_[PADL_(struct osigcontext *)]; struct osigcontext * sigcntxp; char sigcntxp_r_[PADR_(struct osigcontext *)]; }; struct ofreebsd32_sigvec_args { char signum_l_[PADL_(int)]; int signum; char signum_r_[PADR_(int)]; diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 1a384c1bd475..1f949cd90b19 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -69,7 +69,7 @@ const char *freebsd32_syscallnames[] = { "umask", /* 60 = umask */ "chroot", /* 61 = chroot */ "compat.freebsd32_fstat", /* 62 = old freebsd32_fstat */ - "obs_ogetkerninfo", /* 63 = obsolete ogetkerninfo */ + "obs_getkerninfo", /* 63 = obsolete ogetkerninfo */ "compat.getpagesize", /* 64 = old getpagesize */ "msync", /* 65 = msync */ "vfork", /* 66 = vfork */ From nobody Tue Nov 23 03:52:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3D37F18A5210; Tue, 23 Nov 2021 03:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyqvw1F1Sz3k56; Tue, 23 Nov 2021 03:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A55473F7; Tue, 23 Nov 2021 03:52: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 1AN3qBiI072533; Tue, 23 Nov 2021 03:52:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AN3qBSv072532; Tue, 23 Nov 2021 03:52:11 GMT (envelope-from git) Date: Tue, 23 Nov 2021 03:52:11 GMT Message-Id: <202111230352.1AN3qBSv072532@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: 8a6f38c8ac1b - main - ifnet: garbage collect drbr_*_drv(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8a6f38c8ac1b2d66624b6baef5795ef69b9b92c5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8a6f38c8ac1b2d66624b6baef5795ef69b9b92c5 commit 8a6f38c8ac1b2d66624b6baef5795ef69b9b92c5 Author: Gleb Smirnoff AuthorDate: 2021-11-23 03:49:57 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-23 03:49:57 +0000 ifnet: garbage collect drbr_*_drv(). They were left in 62d76917b8678 but after years proved not to be useful. --- sys/dev/bxe/bxe.c | 2 +- sys/net/if.c | 26 -------------------------- sys/net/if_var.h | 6 ------ 3 files changed, 1 insertion(+), 33 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 920a5a9bcbcb..62f608190f8e 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -5675,7 +5675,7 @@ bxe_tx_mq_start_locked(struct bxe_softc *sc, } /* fetch the depth of the driver queue */ - depth = drbr_inuse_drv(ifp, tx_br); + depth = drbr_inuse(ifp, tx_br); if (depth > fp->eth_q_stats.tx_max_drbr_queue_depth) { fp->eth_q_stats.tx_max_drbr_queue_depth = depth; } diff --git a/sys/net/if.c b/sys/net/if.c index c7a6706f41df..1cd44908ca0f 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4591,29 +4591,3 @@ if_setgetcounterfn(if_t ifp, if_get_counter_t fn) ifp->if_get_counter = fn; } - -/* Revisit these - These are inline functions originally. */ -int -drbr_inuse_drv(if_t ifh, struct buf_ring *br) -{ - return drbr_inuse(ifh, br); -} - -struct mbuf* -drbr_dequeue_drv(if_t ifh, struct buf_ring *br) -{ - return drbr_dequeue(ifh, br); -} - -int -drbr_needs_enqueue_drv(if_t ifh, struct buf_ring *br) -{ - return drbr_needs_enqueue(ifh, br); -} - -int -drbr_enqueue_drv(if_t ifh, struct buf_ring *br, struct mbuf *m) -{ - return drbr_enqueue(ifh, br, m); - -} diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 45fba9513a8b..c7e20edc537f 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -776,12 +776,6 @@ void if_settransmitfn(if_t ifp, if_transmit_fn_t); void if_setqflushfn(if_t ifp, if_qflush_fn_t); void if_setgetcounterfn(if_t ifp, if_get_counter_t); -/* Revisit the below. These are inline functions originally */ -int drbr_inuse_drv(if_t ifp, struct buf_ring *br); -struct mbuf* drbr_dequeue_drv(if_t ifp, struct buf_ring *br); -int drbr_needs_enqueue_drv(if_t ifp, struct buf_ring *br); -int drbr_enqueue_drv(if_t ifp, struct buf_ring *br, struct mbuf *m); - /* TSO */ void if_hw_tsomax_common(if_t ifp, struct ifnet_hw_tsomax *); int if_hw_tsomax_update(if_t ifp, struct ifnet_hw_tsomax *); From nobody Tue Nov 23 03:52:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1D7E218A50F6; Tue, 23 Nov 2021 03:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyqvx4BcMz3k5H; Tue, 23 Nov 2021 03:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43A3E6F6B; Tue, 23 Nov 2021 03:52: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 1AN3qDrx072557; Tue, 23 Nov 2021 03:52:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AN3qDh2072556; Tue, 23 Nov 2021 03:52:13 GMT (envelope-from git) Date: Tue, 23 Nov 2021 03:52:13 GMT Message-Id: <202111230352.1AN3qDh2072556@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: ce40632a316c - main - ifnet: append if_debug.c to if.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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce40632a316c597437fcac323eeac13dda76448f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ce40632a316c597437fcac323eeac13dda76448f commit ce40632a316c597437fcac323eeac13dda76448f Author: Gleb Smirnoff AuthorDate: 2021-11-23 03:49:57 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-23 03:49:57 +0000 ifnet: append if_debug.c to if.c With this change if_index can become static. There is nothing that if_debug.c would want to isolate from if.c. Potentially if.c wants to share everything with if_debug.c. Move Bjoern's copyright to if.c. Reviewed by: bz --- sys/conf/files | 1 - sys/net/if.c | 94 +++++++++++++++++++++++++++++++++++- sys/net/if_debug.c | 138 ----------------------------------------------------- 3 files changed, 93 insertions(+), 140 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 8854d827bcc3..fdf133068ad3 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4144,7 +4144,6 @@ net/if.c standard net/if_bridge.c optional bridge inet | if_bridge inet net/if_clone.c standard net/if_dead.c standard -net/if_debug.c optional ddb net/if_disc.c optional disc net/if_edsc.c optional edsc net/if_enc.c optional enc inet | enc inet6 diff --git a/sys/net/if.c b/sys/net/if.c index 1cd44908ca0f..0d6aa10d64dc 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,6 +1,7 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * + * Copyright (c) 2010 Bjoern A. Zeeb * Copyright (c) 1980, 1986, 1993 * The Regents of the University of California. All rights reserved. * @@ -66,6 +67,10 @@ #include #include +#ifdef DDB +#include +#endif + #include #include @@ -308,7 +313,7 @@ VNET_DEFINE(struct ifgrouphead, ifg_head); VNET_DEFINE_STATIC(int, if_indexlim) = 8; /* Table of ifnet by index. */ -VNET_DEFINE(struct ifnet **, ifindex_table); +VNET_DEFINE_STATIC(struct ifnet **, ifindex_table); #define V_if_indexlim VNET(if_indexlim) #define V_ifindex_table VNET(ifindex_table) @@ -4591,3 +4596,90 @@ if_setgetcounterfn(if_t ifp, if_get_counter_t fn) ifp->if_get_counter = fn; } + +#ifdef DDB +static void +if_show_ifnet(struct ifnet *ifp) +{ + + if (ifp == NULL) + return; + db_printf("%s:\n", ifp->if_xname); +#define IF_DB_PRINTF(f, e) db_printf(" %s = " f "\n", #e, ifp->e); + IF_DB_PRINTF("%s", if_dname); + IF_DB_PRINTF("%d", if_dunit); + IF_DB_PRINTF("%s", if_description); + IF_DB_PRINTF("%u", if_index); + IF_DB_PRINTF("%u", if_refcount); + IF_DB_PRINTF("%d", if_index_reserved); + IF_DB_PRINTF("%p", if_softc); + IF_DB_PRINTF("%p", if_l2com); + IF_DB_PRINTF("%p", if_llsoftc); + IF_DB_PRINTF("%d", if_amcount); + IF_DB_PRINTF("%p", if_addr); + IF_DB_PRINTF("%p", if_broadcastaddr); + IF_DB_PRINTF("%p", if_afdata); + IF_DB_PRINTF("%d", if_afdata_initialized); + IF_DB_PRINTF("%u", if_fib); + IF_DB_PRINTF("%p", if_vnet); + IF_DB_PRINTF("%p", if_home_vnet); + IF_DB_PRINTF("%p", if_vlantrunk); + IF_DB_PRINTF("%p", if_bpf); + IF_DB_PRINTF("%u", if_pcount); + IF_DB_PRINTF("%p", if_bridge); + IF_DB_PRINTF("%p", if_lagg); + IF_DB_PRINTF("%p", if_pf_kif); + IF_DB_PRINTF("%p", if_carp); + IF_DB_PRINTF("%p", if_label); + IF_DB_PRINTF("%p", if_netmap); + IF_DB_PRINTF("0x%08x", if_flags); + IF_DB_PRINTF("0x%08x", if_drv_flags); + IF_DB_PRINTF("0x%08x", if_capabilities); + IF_DB_PRINTF("0x%08x", if_capenable); + IF_DB_PRINTF("%p", if_snd.ifq_head); + IF_DB_PRINTF("%p", if_snd.ifq_tail); + IF_DB_PRINTF("%d", if_snd.ifq_len); + IF_DB_PRINTF("%d", if_snd.ifq_maxlen); + IF_DB_PRINTF("%p", if_snd.ifq_drv_head); + IF_DB_PRINTF("%p", if_snd.ifq_drv_tail); + IF_DB_PRINTF("%d", if_snd.ifq_drv_len); + IF_DB_PRINTF("%d", if_snd.ifq_drv_maxlen); + IF_DB_PRINTF("%d", if_snd.altq_type); + IF_DB_PRINTF("%x", if_snd.altq_flags); +#undef IF_DB_PRINTF +} + +DB_SHOW_COMMAND(ifnet, db_show_ifnet) +{ + + if (!have_addr) { + db_printf("usage: show ifnet \n"); + return; + } + + if_show_ifnet((struct ifnet *)addr); +} + +DB_SHOW_ALL_COMMAND(ifnets, db_show_all_ifnets) +{ + VNET_ITERATOR_DECL(vnet_iter); + struct ifnet *ifp; + u_short idx; + + VNET_FOREACH(vnet_iter) { + CURVNET_SET_QUIET(vnet_iter); +#ifdef VIMAGE + db_printf("vnet=%p\n", curvnet); +#endif + for (idx = 1; idx <= V_if_index; idx++) { + ifp = V_ifindex_table[idx].ife_ifnet; + if (ifp == NULL) + continue; + db_printf( "%20s ifp=%p\n", ifp->if_xname, ifp); + if (db_pager_quit) + break; + } + CURVNET_RESTORE(); + } +} +#endif /* DDB */ diff --git a/sys/net/if_debug.c b/sys/net/if_debug.c deleted file mode 100644 index 4a8e49e3dea6..000000000000 --- a/sys/net/if_debug.c +++ /dev/null @@ -1,138 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2010 Bjoern A. Zeeb - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD$"); - -#include "opt_ddb.h" - -#include -#include -#include - -#ifdef DDB -#include -#endif - -#include -#include -#include -#include - -#ifdef DDB -struct ifindex_entry { - struct ifnet *ife_ifnet; -}; -VNET_DECLARE(struct ifindex_entry *, ifindex_table); -#define V_ifindex_table VNET(ifindex_table) - -static void -if_show_ifnet(struct ifnet *ifp) -{ - - if (ifp == NULL) - return; - db_printf("%s:\n", ifp->if_xname); -#define IF_DB_PRINTF(f, e) db_printf(" %s = " f "\n", #e, ifp->e); - IF_DB_PRINTF("%s", if_dname); - IF_DB_PRINTF("%d", if_dunit); - IF_DB_PRINTF("%s", if_description); - IF_DB_PRINTF("%u", if_index); - IF_DB_PRINTF("%u", if_refcount); - IF_DB_PRINTF("%d", if_index_reserved); - IF_DB_PRINTF("%p", if_softc); - IF_DB_PRINTF("%p", if_l2com); - IF_DB_PRINTF("%p", if_llsoftc); - IF_DB_PRINTF("%d", if_amcount); - IF_DB_PRINTF("%p", if_addr); - IF_DB_PRINTF("%p", if_broadcastaddr); - IF_DB_PRINTF("%p", if_afdata); - IF_DB_PRINTF("%d", if_afdata_initialized); - IF_DB_PRINTF("%u", if_fib); - IF_DB_PRINTF("%p", if_vnet); - IF_DB_PRINTF("%p", if_home_vnet); - IF_DB_PRINTF("%p", if_vlantrunk); - IF_DB_PRINTF("%p", if_bpf); - IF_DB_PRINTF("%u", if_pcount); - IF_DB_PRINTF("%p", if_bridge); - IF_DB_PRINTF("%p", if_lagg); - IF_DB_PRINTF("%p", if_pf_kif); - IF_DB_PRINTF("%p", if_carp); - IF_DB_PRINTF("%p", if_label); - IF_DB_PRINTF("%p", if_netmap); - IF_DB_PRINTF("0x%08x", if_flags); - IF_DB_PRINTF("0x%08x", if_drv_flags); - IF_DB_PRINTF("0x%08x", if_capabilities); - IF_DB_PRINTF("0x%08x", if_capenable); - IF_DB_PRINTF("%p", if_snd.ifq_head); - IF_DB_PRINTF("%p", if_snd.ifq_tail); - IF_DB_PRINTF("%d", if_snd.ifq_len); - IF_DB_PRINTF("%d", if_snd.ifq_maxlen); - IF_DB_PRINTF("%p", if_snd.ifq_drv_head); - IF_DB_PRINTF("%p", if_snd.ifq_drv_tail); - IF_DB_PRINTF("%d", if_snd.ifq_drv_len); - IF_DB_PRINTF("%d", if_snd.ifq_drv_maxlen); - IF_DB_PRINTF("%d", if_snd.altq_type); - IF_DB_PRINTF("%x", if_snd.altq_flags); -#undef IF_DB_PRINTF -} - -DB_SHOW_COMMAND(ifnet, db_show_ifnet) -{ - - if (!have_addr) { - db_printf("usage: show ifnet \n"); - return; - } - - if_show_ifnet((struct ifnet *)addr); -} - -DB_SHOW_ALL_COMMAND(ifnets, db_show_all_ifnets) -{ - VNET_ITERATOR_DECL(vnet_iter); - struct ifnet *ifp; - u_short idx; - - VNET_FOREACH(vnet_iter) { - CURVNET_SET_QUIET(vnet_iter); -#ifdef VIMAGE - db_printf("vnet=%p\n", curvnet); -#endif - for (idx = 1; idx <= V_if_index; idx++) { - ifp = V_ifindex_table[idx].ife_ifnet; - if (ifp == NULL) - continue; - db_printf( "%20s ifp=%p\n", ifp->if_xname, ifp); - if (db_pager_quit) - break; - } - CURVNET_RESTORE(); - } -} -#endif From nobody Tue Nov 23 03:52:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 013A318A5487; Tue, 23 Nov 2021 03:52: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 4Hyqvz5WjWz3k7r; Tue, 23 Nov 2021 03:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EA8973F8; Tue, 23 Nov 2021 03:52: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 1AN3qFbW072612; Tue, 23 Nov 2021 03:52:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AN3qFSs072611; Tue, 23 Nov 2021 03:52:15 GMT (envelope-from git) Date: Tue, 23 Nov 2021 03:52:15 GMT Message-Id: <202111230352.1AN3qFSs072611@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: 4787572d0580 - main - ifnet: make if_alloc_domain() never fail List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4787572d0580c6fdf818fd64efa3089de88720f0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=4787572d0580c6fdf818fd64efa3089de88720f0 commit 4787572d0580c6fdf818fd64efa3089de88720f0 Author: Gleb Smirnoff AuthorDate: 2021-11-23 03:49:57 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-23 03:49:57 +0000 ifnet: make if_alloc_domain() never fail The last consumer of if_com_alloc() is firewire. It never fails to allocate. Most likely the if_com_alloc() KPI will go away together with if_fwip(), less likely new consumers of if_com_alloc() will be added, but they would need to follow the no fail KPI. --- sys/net/if.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index f840fa369474..9f971d958030 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -406,7 +406,7 @@ ifindex_alloc(void **old) } static void -ifindex_free_locked(u_short idx) +ifindex_free(u_short idx) { IFNET_WLOCK_ASSERT(); @@ -417,15 +417,6 @@ ifindex_free_locked(u_short idx) V_if_index--; } -static void -ifindex_free(u_short idx) -{ - - IFNET_WLOCK(); - ifindex_free_locked(idx); - IFNET_WUNLOCK(); -} - static void ifnet_setbyindex(u_short idx, struct ifnet *ifp) { @@ -636,11 +627,8 @@ if_alloc_domain(u_char type, int numa_domain) #endif if (if_com_alloc[type] != NULL) { ifp->if_l2com = if_com_alloc[type](type, ifp); - if (ifp->if_l2com == NULL) { - free(ifp, M_IFNET); - ifindex_free(idx); - return (NULL); - } + KASSERT(ifp->if_l2com, ("%s: if_com_alloc[%u] failed", __func__, + type)); } IF_ADDR_LOCK_INIT(ifp); @@ -735,7 +723,7 @@ if_free(struct ifnet *ifp) KASSERT(ifp == ifnet_byindex(ifp->if_index), ("%s: freeing unallocated ifnet", ifp->if_xname)); - ifindex_free_locked(ifp->if_index); + ifindex_free(ifp->if_index); IFNET_WUNLOCK(); if (refcount_release(&ifp->if_refcount)) @@ -1356,7 +1344,7 @@ if_vmove(struct ifnet *ifp, struct vnet *new_vnet) * or we'd lock on one vnet and unlock on another. */ IFNET_WLOCK(); - ifindex_free_locked(ifp->if_index); + ifindex_free(ifp->if_index); IFNET_WUNLOCK(); /* From nobody Tue Nov 23 03:52:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 18AC618A5403; Tue, 23 Nov 2021 03:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyqvy6B8Kz3k7c; Tue, 23 Nov 2021 03:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5849C778E; Tue, 23 Nov 2021 03:52: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 1AN3qE3b072581; Tue, 23 Nov 2021 03:52:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AN3qEgc072580; Tue, 23 Nov 2021 03:52:14 GMT (envelope-from git) Date: Tue, 23 Nov 2021 03:52:14 GMT Message-Id: <202111230352.1AN3qEgc072580@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: 1e3ca25d9296 - main - ifnet: make if_alloc_domain() 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e3ca25d92966ca2d288821179f03f9140185db8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=1e3ca25d92966ca2d288821179f03f9140185db8 commit 1e3ca25d92966ca2d288821179f03f9140185db8 Author: Gleb Smirnoff AuthorDate: 2021-11-23 03:49:57 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-23 03:49:57 +0000 ifnet: make if_alloc_domain() static --- sys/net/if.c | 2 +- sys/net/if_var.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 0d6aa10d64dc..f840fa369474 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -602,7 +602,7 @@ if_grow(void) * common structure will also be allocated if an allocation routine is * registered for the passed type. */ -struct ifnet * +static struct ifnet * if_alloc_domain(u_char type, int numa_domain) { struct ifnet *ifp; diff --git a/sys/net/if_var.h b/sys/net/if_var.h index c7e20edc537f..a0739fd6b76b 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -649,7 +649,6 @@ int if_addmulti(struct ifnet *, struct sockaddr *, struct ifmultiaddr **); int if_allmulti(struct ifnet *, int); struct ifnet* if_alloc(u_char); struct ifnet* if_alloc_dev(u_char, device_t dev); -struct ifnet* if_alloc_domain(u_char, int numa_domain); void if_attach(struct ifnet *); void if_dead(struct ifnet *); int if_delmulti(struct ifnet *, struct sockaddr *); From nobody Tue Nov 23 03:59:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EE3971889088; Tue, 23 Nov 2021 03:59: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 4Hyr4b6JNMz3mx6; Tue, 23 Nov 2021 03:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8384716E; Tue, 23 Nov 2021 03:59: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 1AN3xh1H073317; Tue, 23 Nov 2021 03:59:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AN3xhhw073316; Tue, 23 Nov 2021 03:59:43 GMT (envelope-from git) Date: Tue, 23 Nov 2021 03:59:43 GMT Message-Id: <202111230359.1AN3xhhw073316@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: fe499a8452cd - main - ifnet: merge if_destroy() and if_free_internal() into one List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: fe499a8452cd9c25a4949c33f4396966872ae589 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=fe499a8452cd9c25a4949c33f4396966872ae589 commit fe499a8452cd9c25a4949c33f4396966872ae589 Author: Gleb Smirnoff AuthorDate: 2021-11-23 03:53:12 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-23 03:53:12 +0000 ifnet: merge if_destroy() and if_free_internal() into one New function has more meaningful name if_free_deferred() and has its header comment fixed to reflect reality. NFC --- sys/net/if.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 9f971d958030..3e640ebfa679 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -671,15 +671,16 @@ if_alloc(u_char type) } /* * Do the actual work of freeing a struct ifnet, and layer 2 common - * structure. This call is made when the last reference to an - * interface is released. + * structure. This call is made when the network epoch guarantees + * us that nobody holds a pointer to the interface. */ static void -if_free_internal(struct ifnet *ifp) +if_free_deferred(epoch_context_t ctx) { + struct ifnet *ifp = __containerof(ctx, struct ifnet, if_epoch_ctx); KASSERT((ifp->if_flags & IFF_DYING), - ("if_free_internal: interface not dying")); + ("%s: interface not dying", __func__)); if (if_com_free[ifp->if_alloctype] != NULL) if_com_free[ifp->if_alloctype](ifp->if_l2com, @@ -700,15 +701,6 @@ if_free_internal(struct ifnet *ifp) free(ifp, M_IFNET); } -static void -if_destroy(epoch_context_t ctx) -{ - struct ifnet *ifp; - - ifp = __containerof(ctx, struct ifnet, if_epoch_ctx); - if_free_internal(ifp); -} - /* * Deregister an interface and free the associated storage. */ @@ -727,7 +719,7 @@ if_free(struct ifnet *ifp) IFNET_WUNLOCK(); if (refcount_release(&ifp->if_refcount)) - NET_EPOCH_CALL(if_destroy, &ifp->if_epoch_ctx); + NET_EPOCH_CALL(if_free_deferred, &ifp->if_epoch_ctx); CURVNET_RESTORE(); } @@ -759,7 +751,7 @@ if_rele(struct ifnet *ifp) if (!refcount_release(&ifp->if_refcount)) return; - NET_EPOCH_CALL(if_destroy, &ifp->if_epoch_ctx); + NET_EPOCH_CALL(if_free_deferred, &ifp->if_epoch_ctx); } void From nobody Tue Nov 23 03:59:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 49FC01888F97; Tue, 23 Nov 2021 03:59: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 4Hyr4d0wLCz3mjk; Tue, 23 Nov 2021 03:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E05277880; Tue, 23 Nov 2021 03:59: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 1AN3xi1E073341; Tue, 23 Nov 2021 03:59:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AN3xiXs073340; Tue, 23 Nov 2021 03:59:44 GMT (envelope-from git) Date: Tue, 23 Nov 2021 03:59:44 GMT Message-Id: <202111230359.1AN3xiXs073340@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: 3bc40f39fd86 - main - if_free: add a comment explaining why ifindex_free() is performed here List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3bc40f39fd8668f0be71ca6ee5da513054080d7d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3bc40f39fd8668f0be71ca6ee5da513054080d7d commit 3bc40f39fd8668f0be71ca6ee5da513054080d7d Author: Gleb Smirnoff AuthorDate: 2021-11-23 03:53:12 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-23 03:59:27 +0000 if_free: add a comment explaining why ifindex_free() is performed here --- sys/net/if.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/net/if.c b/sys/net/if.c index 3e640ebfa679..85bf7e91fe1c 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -710,6 +710,22 @@ if_free(struct ifnet *ifp) ifp->if_flags |= IFF_DYING; /* XXX: Locking */ + /* + * XXXGL: An interface index is really an alias to ifp pointer. + * Why would we clear the alias now, and not in the deferred + * context? Indeed there is nothing wrong with some network + * thread obtaining ifp via ifnet_byindex() inside the network + * epoch and then dereferencing ifp while we peform if_free(), + * and after if_free() finished, too. + * + * The reason is the VIMAGE. For some reason it was designed + * to require all sockets drained before destroying, but not all + * ifnets. A vnet destruction calls if_vmove() on ifnet, which + * causes ID change. But ID change and a possible misidentification + * of an ifnet later is a lesser problem, as it doesn't crash kernel. + * A worse problem is that removed interface may outlive the vnet it + * belongs too! The if_free_deferred() would see ifp->if_vnet freed. + */ CURVNET_SET_QUIET(ifp->if_vnet); IFNET_WLOCK(); KASSERT(ifp == ifnet_byindex(ifp->if_index), From nobody Tue Nov 23 08:09:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 12887188F33B; Tue, 23 Nov 2021 08:09:32 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "vtr.rulingia.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyxcq0QPQz4Xmc; Tue, 23 Nov 2021 08:09:30 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (2001-44b8-31fc-0d00-31f0-2684-db50-01b3.static.ipv6.internode.on.net [IPv6:2001:44b8:31fc:d00:31f0:2684:db50:1b3]) by vtr.rulingia.com (8.16.1/8.16.1) with ESMTPS id 1AN89EPw021546 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 Nov 2021 19:09:20 +1100 (AEDT) (envelope-from peter@rulingia.com) DKIM-Filter: OpenDKIM Filter v2.10.3 vtr.rulingia.com 1AN89EPw021546 X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.16.1/8.16.1) with ESMTPS id 1AN898eE086750 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 23 Nov 2021 19:09:08 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.16.1/8.16.1/Submit) id 1AN898p6086749; Tue, 23 Nov 2021 19:09:08 +1100 (AEDT) (envelope-from peter) Date: Tue, 23 Nov 2021 19:09:08 +1100 From: Peter Jeremy To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8ef0c11e7ce7 - main - nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers Message-ID: References: <202111161714.1AGHEtBA084291@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Hxj8mYM555kBddIP" Content-Disposition: inline In-Reply-To: <202111161714.1AGHEtBA084291@gitrepo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-Rspamd-Queue-Id: 4Hyxcq0QPQz4Xmc X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=quarantine) header.from=rulingia.com; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-5.90 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[peter]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[rulingia.com,quarantine]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --Hxj8mYM555kBddIP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-Nov-16 17:14:55 +0000, Konstantin Belousov wrote: > nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to = flush buffers > =20 > VOP_FSYNC() asserts that the vnode is exclusively locked for NFS. > If we try to execute file with recently modified content, the assert is > triggered. I have a diskless arm64 system configured with swap over NFS and I'm now consistently getting a panic during shutdown. I haven't specificially confirmed that it's this commit but the content is suggestive. panic: upgrade of unlocked lock (lockmgr) nfs @ /usr/src/sys/fs/nfsclient/n= fs_clvnops.c:855 cpuid =3D 3 time =3D 1637166551 KDB: stack backtrace: db_trace_self() at db_trace_self db_trace_self_wrapper() at db_trace_self_wrapper+0x30 vpanic() at vpanic+0x178 panic() at panic+0x44 witness_upgrade() at witness_upgrade+0x104 lockmgr_upgrade() at lockmgr_upgrade+0x164 nfs_lock() at nfs_lock+0x2c vop_sigdefer() at vop_sigdefer+0x30 _vn_lock() at _vn_lock+0x54 nfs_close() at nfs_close+0xc8 vop_sigdefer() at vop_sigdefer+0x30 VOP_CLOSE_APV() at VOP_CLOSE_APV+0x2c swapdev_close() at swapdev_close+0x3c swapoff_one() at swapoff_one+0x598 sys_swapoff() at sys_swapoff+0x12c do_el0_sync() at do_el0_sync+0x498 handle_el0_sync() at handle_el0_sync+0x90 --- exception, esr 0x56000000 I presume this isn't intended. Can you suggest where I should start looking for the problem? --=20 Peter Jeremy --Hxj8mYM555kBddIP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmGcoZtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzShqg//RQMm2oSJsE4VwdVkwuhN7uYCCOF4qJPYpgBsEBkVctXPVBfs1HZ04t4k SC7DRyuqT1I2DHAKbfM/ryKft+4pbPTgcZnvoDxZJ/DMPmx54FIfckm4zuRy1Uhx urxsUWAAD+H0NnXG3ipOZIF1alEROiRqOv3UnOy44vqXSEELsvBeetdFL/QrQ2RB Fm5WK4MxVNF6cdlpCB2/9x3F5Wy+oIsN7+RzVGa01vXD03XxNsx8vGPzTiGwUuqL W2I06iJMa4HodZS/7otMJmW8cTRhI2eOHJ2e2bbXlfTl6EuymvOZUDnyHUznYiDE VIbH4foIqb7I7EOykciSfDl4aAh3PBoBtYj0q3UCojk/FkSa+0kAKP0iCrdZgKpn mC5LijOx9j14QkELMHE+hVviZUdW+EavCa3phx5S7iWvApYkYWgIBA5nJb2pGOZN aZM0eRIMd9xVkP62nt5hxGkqepkAjAWux+JjscIrZ9f9aNSVKHfKBU40TpRgli3J vg2h1mnWzg3jOQr2lggRBITKwID8IgNDGPR4T9mbfXL+uvPXrJ5LG9p9qdLkis1Z /56PZWkJHOqmOac9VB6fKgXH2OFDAitcwTtxQJXKFHNxC8SGyIuwo2r/kxWvsimn 8pYBjZAWGxspf/IypyOBbWAUWuTEh7TxCUiaaWi52Z/WYlA/Ylw= =4qID -----END PGP SIGNATURE----- --Hxj8mYM555kBddIP-- From nobody Tue Nov 23 08:30:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2A5CE1899D36; Tue, 23 Nov 2021 08:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyy4X488tz4f3S; Tue, 23 Nov 2021 08:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B3CD132D4; Tue, 23 Nov 2021 08:30: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 1AN8U4M7046632; Tue, 23 Nov 2021 08:30:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AN8U4r9046629; Tue, 23 Nov 2021 08:30:04 GMT (envelope-from git) Date: Tue, 23 Nov 2021 08:30:04 GMT Message-Id: <202111230830.1AN8U4r9046629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: f085bb0e6219 - stable/13 - rc.d/rctl: unbreak for distinct /usr filesystem List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f085bb0e6219f024e1f78b11b6015687148aff29 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637656204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=09yyMC6ZFnLNbw0evV0yOxklGF0F60lYiok37IR8b9k=; b=xsnMA+C4hfHy/BVsVKCWqaC3bMXOTkmrpHPAwjlGA6b7lfDH3q8lK/PLu7myCWbrD/5Gow U4yN/5dovdiB0CsMlXAZgljE7a5fPWlGbrREo+stO6YLR5ohNAyQS8kBXfekndyTjRJ/U3 Jg1xl9KPAaHXauneEmS7NjslxQgpl2uh3vTm4WwuwZtw0Jl0yyzDyHIMwEm81m5jttjFZd 9/e/7IvI+4RazrKcdJyMoC8A0NfsiioTOKwkYu40q5qjPxWMy02aaSy4J7pfRRmnVwTgi6 Jhj0M88+9QmeXJCKql4gcfaJYniWxuC2a3K0tEGhG21xYTCb5vHfEotfymDEWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637656204; a=rsa-sha256; cv=none; b=o2fCeLR4EaoAbgzVAy8dxqrYPVKckmm1UoaNptnFuDC7Q0dEoLFenUac3b8dPn9JsEo+0s i0sp03FLd8tfO49f1Lne2WeP8H9itAkI5r6yu3lkAU+LFryVsjeiRiTargUqcuCa/cnfCR ZA1wttp38pLiumk4FvHs6elKNln4W/6jENFobQu2H/mhiTkuhMNqbf0gBTtVhhmoMWEGTh u8W5HE6LtUY8x2TJYClMSlpk+XfmxyjsC1fGW7TWbet9vEd9wtkZgxNLfImbRrQF3pwhtN VFv/C/OkFQNWLZ6eM5/wwh9g+Tkj4pVUwk2w9SOMJnYj8jI4zzusqDqrFuyggQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=f085bb0e6219f024e1f78b11b6015687148aff29 commit f085bb0e6219f024e1f78b11b6015687148aff29 Author: Eugene Grosbein AuthorDate: 2021-11-20 08:54:39 +0000 Commit: Eugene Grosbein CommitDate: 2021-11-23 08:29:41 +0000 rc.d/rctl: unbreak for distinct /usr filesystem Both rctl and used xargs utility live in /usr/bin so add REQUIRE: FILESYSTEMS Reported by: Peter (cherry picked from commit 0c54fe172ad365e7e60d6249484a7579c18b7d2d) --- libexec/rc/rc.d/rctl | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rc/rc.d/rctl b/libexec/rc/rc.d/rctl index ed5665454dde..f1b001a6ad79 100755 --- a/libexec/rc/rc.d/rctl +++ b/libexec/rc/rc.d/rctl @@ -4,6 +4,7 @@ # # PROVIDE: rctl +# REQUIRE: FILESYSTEMS # BEFORE: LOGIN # KEYWORD: nojail From nobody Tue Nov 23 08:32:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F2DBB189A819; Tue, 23 Nov 2021 08:32: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 4Hyy734MGhz4fJM; Tue, 23 Nov 2021 08:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7758B132FC; Tue, 23 Nov 2021 08:32: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 1AN8WFpZ057244; Tue, 23 Nov 2021 08:32:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AN8WFJK057243; Tue, 23 Nov 2021 08:32:15 GMT (envelope-from git) Date: Tue, 23 Nov 2021 08:32:15 GMT Message-Id: <202111230832.1AN8WFJK057243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 9738f62caca6 - stable/11 - MFC: rc.d/rctl: unbreak for distinct /usr filesystem List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 9738f62caca6d14061e9003c8e69c502fe08fbf6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637656335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwamfTQj7VhkJW5chJ/Qx8LPHXdgcxY5gV47SWnXK2c=; b=jHVVENEsEkH/4XNYnbLRqdaEjPLRhwLtHKOh9OMznEHk67e4x/chOJrRJy8BHuNQHiZt9K VuEIoMjnSKbuemmG6HvgyBExD0wGhfHDMVgNUTfjjVBj9xAaJ7uGXXAp5HoMuIzPpBsT26 NVdPrabwKBm3iecWV/C5LXsUiiEXnKdgS9S8/DlEP+NI4Z+n0u4cwAufQu/cfoo88y2NDY WjB51aR2OdRaImMifWM0wrNbQhrVFYrP0B4zi/fPFUJHte0+5opd+kSXe9zzINV1xNtRRw mViOhEd1YcbpqswHLQOSfAq1IXq6v0dscOtWxtSfTVBNLasjP87TbgksABtPTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637656335; a=rsa-sha256; cv=none; b=CWoimMb3YKOYnq/We4uqkFqQJLSLbVEu1c5rhw1XKrEI0WoA1NmU70fNrHZgHFDI4B8Aak wytrAp7kk1bbCQ7oE9tHhxIoorDPn9RpeymdNUdzdPSqIhsC9ElTe+dEj58R2g3s4HVd/x G7iQSPFnJEraI3AfKiRGWuWGyP2W6jhVS1il+6U3QtZoO0G3l858FO76h0Prqy3TEH0NZl 1Xzph5uBqIoqSovdo68jKhp5J0foJltGQTWURlm9Z5yIRjNA1A7xL5YwKTQTdtexuHA+DC D7w3c7S29S2c+ch0UXejL1vIPKkqvMJaeQJFbcIl+FMObU58LneyeqkbVPTAVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/11 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=9738f62caca6d14061e9003c8e69c502fe08fbf6 commit 9738f62caca6d14061e9003c8e69c502fe08fbf6 Author: Eugene Grosbein AuthorDate: 2021-11-23 08:31:04 +0000 Commit: Eugene Grosbein CommitDate: 2021-11-23 08:32:05 +0000 MFC: rc.d/rctl: unbreak for distinct /usr filesystem Both rctl and used xargs utility live in /usr/bin so add REQUIRE: FILESYSTEMS Reported by: Peter --- etc/rc.d/rctl | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/rc.d/rctl b/etc/rc.d/rctl index ed5665454dde..f1b001a6ad79 100755 --- a/etc/rc.d/rctl +++ b/etc/rc.d/rctl @@ -4,6 +4,7 @@ # # PROVIDE: rctl +# REQUIRE: FILESYSTEMS # BEFORE: LOGIN # KEYWORD: nojail From nobody Tue Nov 23 09:19:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8C7861895CAC; Tue, 23 Nov 2021 09:19:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyz9h1j3Lz3Dp6; Tue, 23 Nov 2021 09:19:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1AN9JLWc094798 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 23 Nov 2021 11:19:24 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1AN9JLWc094798 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1AN9JLpK094797; Tue, 23 Nov 2021 11:19:21 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 23 Nov 2021 11:19:21 +0200 From: Konstantin Belousov To: Peter Jeremy Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8ef0c11e7ce7 - main - nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers Message-ID: References: <202111161714.1AGHEtBA084291@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4Hyz9h1j3Lz3Dp6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Tue, Nov 23, 2021 at 07:09:08PM +1100, Peter Jeremy wrote: > On 2021-Nov-16 17:14:55 +0000, Konstantin Belousov wrote: > > nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers > > > > VOP_FSYNC() asserts that the vnode is exclusively locked for NFS. > > If we try to execute file with recently modified content, the assert is > > triggered. > > I have a diskless arm64 system configured with swap over NFS and I'm > now consistently getting a panic during shutdown. I haven't > specificially confirmed that it's this commit but the content is > suggestive. > > panic: upgrade of unlocked lock (lockmgr) nfs @ /usr/src/sys/fs/nfsclient/nfs_clvnops.c:855 > cpuid = 3 > time = 1637166551 > KDB: stack backtrace: > db_trace_self() at db_trace_self > db_trace_self_wrapper() at db_trace_self_wrapper+0x30 > vpanic() at vpanic+0x178 > panic() at panic+0x44 > witness_upgrade() at witness_upgrade+0x104 > lockmgr_upgrade() at lockmgr_upgrade+0x164 > nfs_lock() at nfs_lock+0x2c > vop_sigdefer() at vop_sigdefer+0x30 > _vn_lock() at _vn_lock+0x54 > nfs_close() at nfs_close+0xc8 > vop_sigdefer() at vop_sigdefer+0x30 > VOP_CLOSE_APV() at VOP_CLOSE_APV+0x2c > swapdev_close() at swapdev_close+0x3c > swapoff_one() at swapoff_one+0x598 > sys_swapoff() at sys_swapoff+0x12c > do_el0_sync() at do_el0_sync+0x498 > handle_el0_sync() at handle_el0_sync+0x90 > --- exception, esr 0x56000000 > > I presume this isn't intended. Can you suggest where I should start > looking for the problem? Try this please. It might be also useful to enable DEBUG_VFS_LOCKS in your kernel config, to catch all related issues once. commit 815eb81d8bf24d62a4686673d83b7bf8ec9f7d90 Author: Konstantin Belousov Date: Tue Nov 23 11:16:53 2021 +0200 swap pager: lock vnode around VOP_CLOSE() Reported by: peterj MFC after: 1 week diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 9bc506c9b6b8..395c0fb72639 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -3057,9 +3057,9 @@ swapdev_strategy(struct buf *bp, struct swdevt *sp) static void swapdev_close(struct thread *td, struct swdevt *sp) { - + vn_lock(sp->sw_vp, LK_EXCLUSIVE | LK_RETRY); VOP_CLOSE(sp->sw_vp, FREAD | FWRITE, td->td_ucred, td); - vrele(sp->sw_vp); + vput(sp->sw_vp); } static int From nobody Tue Nov 23 09:33:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0D0E8189D1AE; Tue, 23 Nov 2021 09:33:11 +0000 (UTC) (envelope-from C.Koehne@beckhoff.com) Received: from Internet2.beckhoff.com (internet2.beckhoff.com [194.25.186.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.beckhoff.com", Issuer "Thawte TLS RSA CA G1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HyzTD0HhHz3Jk6; Tue, 23 Nov 2021 09:33:03 +0000 (UTC) (envelope-from C.Koehne@beckhoff.com) Received: from 172.17.2.171 by Internet2.beckhoff.com (Tls12, Aes256, Sha384, DiffieHellmanEllipticKey256); Tue, 23 Nov 2021 09:33:02 GMT Received: from ex04.beckhoff.com (172.17.5.170) by ex05.beckhoff.com (172.17.2.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.17; Tue, 23 Nov 2021 10:33:01 +0100 Received: from ex04.beckhoff.com ([fe80::e827:f858:3be0:ad6b]) by ex04.beckhoff.com ([fe80::e827:f858:3be0:ad6b%9]) with mapi id 15.01.2375.017; Tue, 23 Nov 2021 10:33:01 +0100 From: =?utf-8?B?Q29ydmluIEvDtmhuZQ==?= To: John Baldwin , Emmanuel Vadot , "src-committers@FreeBSD.org" , "dev-commits-src-all@FreeBSD.org" , "dev-commits-src-main@FreeBSD.org" Subject: RE: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync Thread-Topic: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync Thread-Index: AQHX4EhAtg1PhJfq9EuiAM/NMll7O6wQ1zVg Date: Tue, 23 Nov 2021 09:33:01 +0000 Message-ID: <084d5b5845554221901ce4902fb878d1@beckhoff.com> References: <202111221530.1AMFUUJn079855@gitrepo.freebsd.org> <428e410d-33c1-7ff8-9689-41943db3d9c3@FreeBSD.org> In-Reply-To: <428e410d-33c1-7ff8-9689-41943db3d9c3@FreeBSD.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [94.134.103.240] x-olx-disclaimer: EX05.BECKHOFF.COM Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 X-Rspamd-Queue-Id: 4HyzTD0HhHz3Jk6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N SGkgSm9obiwNCg0Kc3J5LCBJIGRpZG4ndCBzZWUgeW91ciBwYXRjaC4gU2VlbXMgbGlrZSB5b3Vy IHBhdGNoIGlzIHZlcnkgc2ltaWxhciB0bw0KbWluZS4gSG93ZXZlciwgeW91ciBwYXRjaCBnb2Vz IGEgYml0IGZ1cnRoZXIuIEl0IGluaXRpYWxpemVzIHRoZQ0KdmlydHVhbCBjbWQgcmVnaXN0ZXIg d2l0aCBpdCdzIHBoeXNpY2FsIHZhbHVlIGFuZCBhbHdheXMgZW5hYmxlcw0KYnVzIG1hc3Rlcmlu Zy4gQXJlIHlvdSBzdGlsbCBpbnRlcmVzdGVkIGluIHdvcmtpbmcgb24geW91ciBwYXRjaD8NCk90 aGVyd2lzZSwgSSdtIGdvaW5nIHRvIHByb2NlZWQgeW91ciB3b3JrLg0KDQoNCkJlc3QgcmVnYXJk cw0KQ29ydmluDQoNCkJlY2tob2ZmIEF1dG9tYXRpb24gR21iSCAmIENvLiBLRyB8IE1hbmFnaW5n IERpcmVjdG9yOiBEaXBsLiBQaHlzLiBIYW5zIEJlY2tob2ZmDQpSZWdpc3RlcmVkIG9mZmljZTog VmVybCwgR2VybWFueSB8IFJlZ2lzdGVyIGNvdXJ0OiBHdWV0ZXJzbG9oIEhSQSA3MDc1DQoNCg0K LS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IG93bmVyLXNyYy1jb21taXR0ZXJzQGZy ZWVic2Qub3JnIDxvd25lci1zcmMtY29tbWl0dGVyc0BmcmVlYnNkLm9yZz4gT24gQmVoYWxmIE9m IEpvaG4gQmFsZHdpbg0KU2VudDogTW9uZGF5LCBOb3ZlbWJlciAyMiwgMjAyMSA1OjM5IFBNDQpU bzogRW1tYW51ZWwgVmFkb3QgPG1hbnVARnJlZUJTRC5vcmc+OyBzcmMtY29tbWl0dGVyc0BGcmVl QlNELm9yZzsgZGV2LWNvbW1pdHMtc3JjLWFsbEBGcmVlQlNELm9yZzsgZGV2LWNvbW1pdHMtc3Jj LW1haW5ARnJlZUJTRC5vcmcNClN1YmplY3Q6IFJlOiBnaXQ6IDJlYjIwNzk1NTRmNCAtIG1haW4g LSBiaHl2ZToga2VlcCBwaHlzaWNhbCBhbmQgdmlydHVhbCBDT01NQU5EIHJlZyBpbiBzeW5jDQoN CkNBVVRJT046IEV4dGVybmFsIEVtYWlsISENCk9uIDExLzIyLzIxIDc6MzAgQU0sIEVtbWFudWVs IFZhZG90IHdyb3RlOg0KPiBUaGUgYnJhbmNoIG1haW4gaGFzIGJlZW4gdXBkYXRlZCBieSBtYW51 Og0KPg0KPiBVUkw6IGh0dHBzOi8vbm9zcGFtcHJveHl3ZWJwLmJlY2tob2ZmLmNvbS9lbnFzaWcv bGluaz9pZD1CQ0FBQUFCR2Q3bTNsZk1PTE9JaHgzdU5SXzFRYXY0RmZ4OC1qUUIwdG9yRDgydHNf S1lBQUFCNklwaXN4ZldoOGJNa01lY2xFaktVMENoNm5DMUwybHVJSnZVdDVscmNCZWQtS0ExZmph Q05YNGhCMGdpd2JmVEg5bG1YTEJOYVl2V0VKekJHNHpNb2xSZWJyclFvZnlpZ1g5Sl9HRHBLaGc3 MG9xclZmakdxdmp3eF9aVWo5UDJtc0F1ZE1lMkN1Nl9FLTFkdVdxOWZaMGVCWTBsMU52b1VJSUE3 M25KMWhyYmZ5MUhRMG9haHRVS3hQRS1qSTJNbFFpRm9tZV9wbUVFeWFRM0ozU2tTd2dGck04WU8w DQo+DQo+IGNvbW1pdCAyZWIyMDc5NTU0ZjRkNTRjNDI4MzQxMGI0ZWUxYWNhNTQ5YjI5NjE2DQo+ IEF1dGhvcjogICAgIENvcnZpbiBLw7ZobmUgPENvcnZpbktAYmVja2hvZmYuY29tPg0KPiBBdXRo b3JEYXRlOiAyMDIxLTExLTIyIDE1OjI2OjAzICswMDAwDQo+IENvbW1pdDogICAgIEVtbWFudWVs IFZhZG90IDxtYW51QEZyZWVCU0Qub3JnPg0KPiBDb21taXREYXRlOiAyMDIxLTExLTIyIDE1OjI2 OjAzICswMDAwDQo+DQo+ICAgICAgYmh5dmU6IGtlZXAgcGh5c2ljYWwgYW5kIHZpcnR1YWwgQ09N TUFORCByZWcgaW4gc3luYw0KPg0KPiAgICAgIE9uIHN0YXJ0dXAgYWxsIHZpcnR1YWwgQkFScyBh cmUgcmVnaXN0ZXJlZC4NCj4gICAgICBBZGRpdGlvbmFsbHksIHRoZSBlbmNvZGluZyBiaXQgaW4g dGhlIHZpcnR1YWwgY21kIHJlZ2lzdGVyIGlzIHNldC4NCj4gICAgICBBZnRlciB0aGF0LCB0aGUg cGFzc3RocnUgZW11bGF0aW9uIG92ZXJ3cml0ZXMgdGhlIHZpcnR1YWwgY21kIHJlZ2lzdGVyIHdp dGgNCj4gICAgICB0aGUgcGh5c2ljYWwgb25lLg0KPiAgICAgIFRoaXMgY291bGQgbGVhZCB0byBh IG1pc21hdGNoIGJldHdlZW4gcmVnaXN0ZXJlZCBCQVJzIGFuZCB0aGUgZW5jb2RpbmcNCj4gICAg ICBiaXRzIGluIHRoZSBjbWQgcmVnaXN0ZXIuDQo+ICAgICAgSW5zdGVhZCBvZiB3cml0aW5nIHRo ZSBwaHlzaWNhbCB0byB0aGUgdmlydHVhbCBjbWQgcmVnaXN0ZXIsDQo+ICAgICAgd3JpdGUgdGhl IHZpcnR1YWwgdG8gdGhlIHBoeXNpY2FsIGNtZCByZWdpc3RlciB0byBzb2x2ZSB0aGlzIGlzc3Vl Lg0KPg0KPiAgICAgIFJldmlld2VkIGJ5OiAgICAgIG1hcmtqDQo+ICAgICAgRGlmZmVyZW50aWFs IFJldmlzaW9uOiAgaHR0cHM6Ly9ub3NwYW1wcm94eXdlYnAuYmVja2hvZmYuY29tL2VucXNpZy9s aW5rP2lkPUJDQUFBQUJHZDdtM2xmTU9MT0loeDN1TlJfMVFhdjRGZng4LWpRQjB0b3JEODJ0c19I Z0FBQUJRWXc5N05HVDRTU2owYXJ4T1QyeXVRNzVydGVVejUxb1JFdnFsRC1HWlFucUNaSV85cHpS c1dzTV9USXdwbWtzdVVLZ1ZJZnNQOV9zTl9TRmlDSktnTUJuU1pBYmJvelBtQ1ZMamdWYmRnZ2Rm MEoxVkNCTWJnRmxYVkpacTBMR0pPVVloeU45TnNXUVk1RjlzcUJnVURWZkphVGUzcU9vMQ0KPiAg ICAgIFNwb25zb3JlZCBieTogICBCZWNraG9mZiBBdXRvbWF0aW9uIEdtYkggJiBDby4gS0cNCg0K SHVtbSwgSSB3b25kZXIgaWYgbXkgb2xkZXIgcGF0Y2ggdGhhdCB0cmllcyB0byBoYW5kbGUgdGhl IGNvbW1hbmQgcmVnaXN0ZXINCm1vcmUgZGV0ZXJtaW5pc3RpY2FsbHkgbWlnaHQgaGF2ZSBoYW5k bGVkIHRoaXMuICBUaGUgcGF0Y2ggdHJpZWQgdG8gZml4IGFuDQpvcGVuIGJ1ZyB3aGVyZSB5b3Ug Y2FuJ3QgdXNlIGEgWEhDSSBjb250cm9sbGVyIHZpYSBwYXNzdGhydSBhZnRlciB5b3UgaGF2ZQ0K cmVib290ZWQgYSBMaW51eCBndWVzdC4gIEl0IG1ha2VzIHRoaXMgd3JpdGUgaGVyZSBjb25kaXRp b25hbDoNCg0KaHR0cHM6Ly9ub3NwYW1wcm94eXdlYnAuYmVja2hvZmYuY29tL2VucXNpZy9saW5r P2lkPUJDQUFBQUJHZDdtM2xmTU9MT0loeDN1TlJfMVFhdjRGZng4LWpRQjB0b3JEODJ0c19IZ0FB QUFVOEZ4eVUxTGlVSm9SS255ck5TUnYtajJiVEJRcU9KaS1YUW1FTGd5ZXZ2cEVQVXlLUVhkM0FS ZF91ejF2SDVWdnV2MzE0eE1PRld2R1JIX2trVkNTbXY4cmVPRUMxQVMxTUJ6c2tGYktRX2hIU2JN aUk4OGhuajktakpySmFaVDNCNkZHOU1IcC1iUnY4UXlHT1NJMTlpTGVRbmx1dGtZMQ0KDQotLQ0K Sm9obiBCYWxkd2luDQoNCg== From nobody Tue Nov 23 10:00:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2B58D18AC3CA; Tue, 23 Nov 2021 10:00:56 +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 4Hz05J1DrPz3jtY; Tue, 23 Nov 2021 10:00:51 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.17.1/8.17.1/hmo17dec20) with ESMTPS id 1ANA0gEu055389 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 23 Nov 2021 11:00:42 +0100 (CET) (envelope-from freebsd@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.17.1/8.17.1/Submit) id 1ANA0g3x055387; Tue, 23 Nov 2021 11:00:42 +0100 (CET) (envelope-from freebsd@oldach.net) Message-Id: <202111231000.1ANA0g3x055387@nuc.oldach.net> Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features In-Reply-To: <202111221814.1AMIED8D098242@gitrepo.freebsd.org> from Allan Jude at "22 Nov 2021 18:14:13" To: allanjude@FreeBSD.org (Allan Jude) Date: Tue, 23 Nov 2021 11:00:42 +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) Sender: freebsd@oldach.net 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]); Tue, 23 Nov 2021 11:00:42 +0100 (CET) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:freebsd@oldach.net RCPT: X-Rspamd-Queue-Id: 4Hz05J1DrPz3jtY X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=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 X-Spamd-Result: default: False [-3.29 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[oldach.net]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.995]; FROM_NO_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N Hi, Allan Jude wrote on Mon, 22 Nov 2021 19:14:13 +0100 (CET): > The branch stable/13 has been updated by allanjude: > > URL: https://cgit.FreeBSD.org/src/commit/?id=32a2fed6e71f896266d4c695754104d82a72c60d > > commit 32a2fed6e71f896266d4c695754104d82a72c60d > Author: Allan Jude > AuthorDate: 2021-11-19 15:14:30 +0000 > Commit: Allan Jude > CommitDate: 2021-11-22 18:12:20 +0000 > > openssl: Fix detection of ARMv7 and ARM64 CPU features > > OpenSSL assumes the same value for AT_HWCAP=16 (Linux) > So it ends up calling elf_auxv_info() with AT_CANARY which > returns ENOENT, and all acceleration features are disabled. > > With this, my ARM64 test machine runs the benchmark > `openssl speed -evp aes-256-gcm` nearly 20x faster > going from 100 MB/sec to 2000 MB/sec > > It also improves sha256 from 300 MB/sec to 1800 MB/sec > > This fix has been accepted but not yet merged upstream: > https://github.com/openssl/openssl/pull/17082 > > PR: 259937 > Reviewed by: manu, imp > MFC after: immediate > Relnotes: yes > Fixes: 88e852c0b5c872b1a ("OpenSSL: Merge OpenSSL 1.1.1j") > Sponsored by: Ampere Computing LLC > Sponsored by: Klara Inc. > Differential Revision: https://reviews.freebsd.org/D33060 > > (cherry picked from commit d9bb798725cfce9c72b80440659b48e8668eb10d) Hmmm. On a RPi4/8G: Before (FreeBSD 13.0-STABLE (GENERIC) #366 stable/13-n248173-d16fbc488e6): | Doing aes-256-gcm for 3s on 16 size blocks: 6710997 aes-256-gcm's in 3.00s | Doing aes-256-gcm for 3s on 64 size blocks: 1806261 aes-256-gcm's in 3.00s | Doing aes-256-gcm for 3s on 256 size blocks: 468595 aes-256-gcm's in 3.00s | Doing aes-256-gcm for 3s on 1024 size blocks: 121282 aes-256-gcm's in 3.00s | Doing aes-256-gcm for 3s on 8192 size blocks: 14590 aes-256-gcm's in 3.00s | Doing aes-256-gcm for 3s on 16384 size blocks: 7258 aes-256-gcm's in 3.00s | OpenSSL 1.1.1l-freebsd 24 Aug 2021 | built on: reproducible build, date unspecified | options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) | compiler: clang | The 'numbers' are in 1000s of bytes per second processed. | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes | aes-256-gcm 35791.98k 38533.57k 39986.77k 41397.59k 39840.43k 39638.36k After (FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621) | Doing aes-256-gcm for 3s on 16 size blocks: 3999944 aes-256-gcm's in 3.01s | Doing aes-256-gcm for 3s on 64 size blocks: 1102925 aes-256-gcm's in 3.04s | Doing aes-256-gcm for 3s on 256 size blocks: 279608 aes-256-gcm's in 3.03s | Doing aes-256-gcm for 3s on 1024 size blocks: 69397 aes-256-gcm's in 3.00s | Doing aes-256-gcm for 3s on 8192 size blocks: 9160 aes-256-gcm's in 3.14s | Doing aes-256-gcm for 3s on 16384 size blocks: 4385 aes-256-gcm's in 3.00s | OpenSSL 1.1.1l-freebsd 24 Aug 2021 | built on: reproducible build, date unspecified | options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) | compiler: clang | The 'numbers' are in 1000s of bytes per second processed. | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes | aes-256-gcm 21277.62k 23226.64k 23613.90k 23687.51k 23892.93k 23947.95k It seems that AES throughput is actually cut by almost half? Kind regards Helge From nobody Tue Nov 23 10:39:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8D88F1898E06; Tue, 23 Nov 2021 10:39: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 4Hz0xt1cT0z3wBg; Tue, 23 Nov 2021 10:39:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16FC314CF9; Tue, 23 Nov 2021 10:39: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 1ANAdUST019675; Tue, 23 Nov 2021 10:39:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANAdUEF019674; Tue, 23 Nov 2021 10:39:30 GMT (envelope-from git) Date: Tue, 23 Nov 2021 10:39:30 GMT Message-Id: <202111231039.1ANAdUEF019674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: ee7485bef53d - main - os-release.5: Fix quoting of dots List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee7485bef53df9108a20e497dac6341d030248ce Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637663970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OH0TujOGPGRNUDrVlGEtabGx2uvSUJivmfvIy9r37xY=; b=DcKUOuj3aNPzJBXildtRH/5hasiKN3EAo6OaZYREVTaZweDN5R8qpGzjPjWPLUYjMc/rvJ VbePUDEsLhHMOhSEkAOtdoxOSiyCcEYejpZxfMSHCW90vqEFcDpTaEWMXyHKxUDkHy0xzo Hb9WQu3+qgkCS9NNQYkYwaM/522jTspsXvdYDzTAD4lUEXLII06rg3TILNMh3N03CAnStn tOop7mFo8yL0Mz4Qc5HN02AW6hw1o6CCwqRU66VsyT088gYsyMPutzr4NXjh0Ox3AYrrC/ XzxZdaMC28MxGtO7pFyA7yrefv0YTCifhoHiHRGIMi+EiQFHU1tau055qkJZ4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637663970; a=rsa-sha256; cv=none; b=sD7Q0b7Jt5Xxv4oCkrKPg/8fjcuAdHf8NwdW7GQ8KqR9Eh7giuEnt4otqJdhbjW0MNOOxQ uRJWzwtT+pHVzHVWEyZefr8WObkkvwy1ujExOAjrgfbZtDYI5RhoIf5b5JKXPa6xT+Sak5 wRvNQYhRJxpxpRJ05RAljkre4wBUD8biAEIQdaeO3E3UXTPPVkYaLamnGQbD1vl0AMuZiE c1Er/nvHAgKxltYRCluOtwjTI+pGHCG4wxIC6fMb1kNIxuNj4qfaGxaNvhvL2+KL8Cz2Xw 5sUo2PLQzkrvcoazyvhYM7Rp2ArOaqC6TFe29NGzVGUkWlJn2bg0RbV8AvAdrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ee7485bef53df9108a20e497dac6341d030248ce commit ee7485bef53df9108a20e497dac6341d030248ce Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-23 10:34:44 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-23 10:37:03 +0000 os-release.5: Fix quoting of dots Dots needs to escaped with \& to be places inside Ql quotes. MFC after: 3 days --- share/man/man5/os-release.5 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man5/os-release.5 b/share/man/man5/os-release.5 index ab56e477cf3d..a16ca33112d0 100644 --- a/share/man/man5/os-release.5 +++ b/share/man/man5/os-release.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2019 +.Dd November 23, 2021 .Dt OS-RELEASE 5 .Os .Sh NAME @@ -67,13 +67,13 @@ A string describing the preferred OS name. Version string for the OS, in its usual and customary format. .It Dv ID Lower case version of the name with only a-z, 0-9, -.Ql . , +.Ql \&. , .Ql - , and .Ql _ . .It Dv VERSION_ID Lower case version of the version with only a-z, 0-9, -.Ql . , +.Ql \&. , .Ql - , and .Ql _ . @@ -102,7 +102,7 @@ A string describing the variant of this operating system. This variable is optional. .It Dv VARIANT_ID Lower case version of the variant with only a-z, 0-9, -.Ql . , +.Ql \&. , .Ql - , and .Ql _ . From nobody Tue Nov 23 14:32:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C4852189F385; Tue, 23 Nov 2021 14:32:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hz67F3LH6z4bfJ; Tue, 23 Nov 2021 14:32:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5261218352; Tue, 23 Nov 2021 14:32: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 1ANEWv43039009; Tue, 23 Nov 2021 14:32:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANEWvv2039008; Tue, 23 Nov 2021 14:32:57 GMT (envelope-from git) Date: Tue, 23 Nov 2021 14:32:57 GMT Message-Id: <202111231432.1ANEWvv2039008@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: 8c29b0eeb0ce - stable/13 - aesni: Avoid a potential out-of-bounds load in AES_GCM_encrypt() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8c29b0eeb0ce4b7e6df524004d5edfbb6146e35b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637677977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zs3jNvqu3cip+f0COhZ9/m7lgx0FRCEhce/CzzpewMA=; b=WwtCdazZwwg7Sq1K4bT284ejPxTl5q5thJsWvQ1yAE30fwjjj6/KnQvvsXiXg1wXFNoV4j PdOnDycFxvpT52p8rCf5glvCRghffa3NmlPfO6v7vTQR1kbyXSIqzF/O48VQbbYUlp11kW CYurM12pL6+2obP34yEWbUu97nxUjmcDpRc7i0IjMZi6uko4U1vBwu4fpCovXvqIT1twV9 bRHO3rj8V0vUZQ6bIrSBSGeIwqNXEqpkRdwuvJDEfR+LnZduV4YBtlSDP1BXlznEWhfzGL 3sD2wDy4PuUHYoguNkD92SB4za0stlIYRN+EVR4SLIb4zrBMLZILVRLL+Tw5dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637677977; a=rsa-sha256; cv=none; b=cNe1FP7+uRoyHZcIWHV53pEGSneIzwMpiZOjVDlftTYzGpFgF7MZe3b4RFhlegplj4oouH 6R3+DBmlw/iDWRqiTTEJGUdbMWYM7Y5h6lOyPpSLEgaBAIEsYnXSD0uVcAbSklSN/0qpu4 2bY3+lBUE1p95uR71c5yGyAmXaBexVJfHiVBmV5Ks5M2udovISYDxgEqqnoPq6H646Iq1d q+mPRpXYtj2vErTgJRKgp5QzgAdc4TK1SUmtSF70rYC0pKkGsXOOuMj7wfD0MBYUrT3v8i aINQMhArrLAk9hkZ6cwHcuyj1QOlLi50ig8zHOOcZCxlNmtNQCnJRCkKbVBuSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8c29b0eeb0ce4b7e6df524004d5edfbb6146e35b commit 8c29b0eeb0ce4b7e6df524004d5edfbb6146e35b Author: Mark Johnston AuthorDate: 2021-11-16 14:16:16 +0000 Commit: Mark Johnston CommitDate: 2021-11-23 14:32:33 +0000 aesni: Avoid a potential out-of-bounds load in AES_GCM_encrypt() Reported by: Jenkins (KASAN job) Reviewed by: cem, jhb Sponsored by: The FreeBSD Foundation (cherry picked from commit 4285655adb7480336857bf8e051365d73db18011) --- sys/crypto/aesni/aesni_ghash.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/crypto/aesni/aesni_ghash.c b/sys/crypto/aesni/aesni_ghash.c index b0d1b6137ec6..a1295b6ccbda 100644 --- a/sys/crypto/aesni/aesni_ghash.c +++ b/sys/crypto/aesni/aesni_ghash.c @@ -504,9 +504,10 @@ AES_GCM_encrypt(const unsigned char *in, unsigned char *out, } tmp1 = _mm_aesenc_si128(tmp1, KEY[nr-1]); tmp1 = _mm_aesenclast_si128(tmp1, KEY[nr]); - tmp1 = _mm_xor_si128(tmp1, - _mm_loadu_si128(&((const __m128i *)in)[k])); - last_block = tmp1; + last_block = _mm_setzero_si128(); + memcpy(&last_block, &((const __m128i *)in)[k], + nbytes % 16); + last_block = _mm_xor_si128(last_block, tmp1); for (j=0; j To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 35dfdb88eafd - stable/13 - unix: Remove a write-only local 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 35dfdb88eafdb00f93dee35fabedc7212340b295 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637677978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dOdRKchDwSpr6q8H+Pa4rKRbbzsmJwma1YpLBVpr/Oc=; b=FXmsEZpKTVgkRJPPOFVH0PotjF7rg/MeLip0UztDyRrYmvav66mjJ2UBRs90hsXoBV3lek nMkHnkqS0/0AcOaxXX6fkZGHcnZQnJHs0invZOFHNKuObibKHPTvMLBpnIiYFzUbtXSKLh EVez/8n8emN7M7fXHsDg/+SOpXpY1Ds+tFii1WmZh8J2Uzc+r3QGaxJ5O0ByK7US6ISUgX lU8h78I/mww2gBz9z9p+kTlSrhGg8t/sFRnDMAMxHzKzUPvBP/KNQur+dY9y5AXcsuUTLn QrXOFV9BHwwHmEaJemLRB3XuQCGJfO5Mo9EfZpxA3FPbS1gb8TRUnHs7LhpTdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637677978; a=rsa-sha256; cv=none; b=yhpjYAR7O8bhRdUawpaVdPM8RVSYVoxtiyeaC9+gkW3TU3U3KIPfbcXadTnBrCXERn0sv7 jliM2aMX39TeIP988/rSwg1Bj9O0VkUinXbWFN60l2ctq62Qpja2WPVbEHZmQaWCXUq4vu 82eOzENr5OZys3xwO6q+G4aP4PbVEqZHZ6dTP476Q8YxPtZDC1qxVIxrQsqNUtDMkUK8TL KUyK4prMFgBoofNRCSlucMyV/uq1hzzYdKKrpKbbeC6Y7xOhTr8UXuR6hg17lh4GhSFh+7 15YAVC6TZDx8eqIbfOD2qzanQJVaH3YtbI9hs4SSnWpZT+GWCRAduVBxJLeY2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=35dfdb88eafdb00f93dee35fabedc7212340b295 commit 35dfdb88eafdb00f93dee35fabedc7212340b295 Author: Mark Johnston AuthorDate: 2021-11-16 14:43:33 +0000 Commit: Mark Johnston CommitDate: 2021-11-23 14:32:46 +0000 unix: Remove a write-only local variable Reported by: clang Sponsored by: The FreeBSD Foundation (cherry picked from commit 42188bb5c118f456af0606a2ce6ae26378716415) --- sys/kern/uipc_usrreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 5dca0714c400..35f2de7dbeb8 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1001,7 +1001,7 @@ uipc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, struct unpcb *unp, *unp2; struct socket *so2; u_int mbcnt, sbcc; - int freed, error; + int error; unp = sotounpcb(so); KASSERT(unp != NULL, ("%s: unp == NULL", __func__)); @@ -1009,7 +1009,7 @@ uipc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, so->so_type == SOCK_SEQPACKET, ("%s: socktype %d", __func__, so->so_type)); - freed = error = 0; + error = 0; if (flags & PRUS_OOB) { error = EOPNOTSUPP; goto release; From nobody Tue Nov 23 14:34:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 96AB518A0A57; Tue, 23 Nov 2021 14:34: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 4Hz69C1vNFz4cb8; Tue, 23 Nov 2021 14:34:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 182D2181EA; Tue, 23 Nov 2021 14:34: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 1ANEYcff039322; Tue, 23 Nov 2021 14:34:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANEYcVm039321; Tue, 23 Nov 2021 14:34:38 GMT (envelope-from git) Date: Tue, 23 Nov 2021 14:34:38 GMT Message-Id: <202111231434.1ANEYcVm039321@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: 83d0a7763a92 - stable/12 - aesni: Avoid a potential out-of-bounds load in AES_GCM_encrypt() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: 83d0a7763a92b893875548812d2a3aea651e971f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637678079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iCWjERb+Dr+mPO7U3L2EcGUj5oOhjVrwlWmcdv4lVek=; b=Co9VwF51Izm0gxqhBsymbQkoLvzD/LONxqmPUNtcdpRceuXYPKRmVgg9RKP+BtNvak3SOi Rv+oZmqebwTi9g/FH0PGnrNUcs/OXzFZxB/hAXKAxBIJ7jwh1snBYpi8/jjwdxEUqg6hj3 BCsbIoyaE8BRVTDd7jb/4y1O5hdCerLKYDBd3SmlhN2Csdkl6e4W4sTQaMmPy5yJ50NUtY e6SkYwIDc09T6ew/N5FDunbNLQcBzQJpxWdlI07C2D6NfQd5irCTkqLPFY71PdLXoObDa9 kAy9mJ3Sx2bhHf0H3F5GuANU9+NG5jZs7uuwpCBZb96pG6NESIth0019+oEyfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637678079; a=rsa-sha256; cv=none; b=tnDtDhnymLXkCDyIsQx0xkdZMn9Bg+pUjL4kdksa3H+v5bhtOA7oFncbpuGI8yjnUimTjb xpivd2mp/0MHxy4iiyqEHnk5nWDNwVzU06FkgbOz2sXmKasMvMFbRq7DcabKK4S3ejPorS UHqhga1wy4Gr6vhuePc2rYZHCpSNxsIZlZlN0GQ8Ayq2dlgq+P3IXcW3b3aONa+oOZKQhJ tjBq7tqT8M6x3fATWR/CeP8BAxEaThxuaBt/YvMi+Zt96HOl9h7HeWqFj7PqI/t2G7yMVN Pc2XaW6/s9olUVekcJTUqzgCKS1AZcLNIRygXTw6iDcEEFF0kjds8xcwQcOJTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=83d0a7763a92b893875548812d2a3aea651e971f commit 83d0a7763a92b893875548812d2a3aea651e971f Author: Mark Johnston AuthorDate: 2021-11-16 14:16:16 +0000 Commit: Mark Johnston CommitDate: 2021-11-23 14:33:38 +0000 aesni: Avoid a potential out-of-bounds load in AES_GCM_encrypt() Reported by: Jenkins (KASAN job) Reviewed by: cem, jhb Sponsored by: The FreeBSD Foundation (cherry picked from commit 4285655adb7480336857bf8e051365d73db18011) --- sys/crypto/aesni/aesni_ghash.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/crypto/aesni/aesni_ghash.c b/sys/crypto/aesni/aesni_ghash.c index b0d1b6137ec6..a1295b6ccbda 100644 --- a/sys/crypto/aesni/aesni_ghash.c +++ b/sys/crypto/aesni/aesni_ghash.c @@ -504,9 +504,10 @@ AES_GCM_encrypt(const unsigned char *in, unsigned char *out, } tmp1 = _mm_aesenc_si128(tmp1, KEY[nr-1]); tmp1 = _mm_aesenclast_si128(tmp1, KEY[nr]); - tmp1 = _mm_xor_si128(tmp1, - _mm_loadu_si128(&((const __m128i *)in)[k])); - last_block = tmp1; + last_block = _mm_setzero_si128(); + memcpy(&last_block, &((const __m128i *)in)[k], + nbytes % 16); + last_block = _mm_xor_si128(last_block, tmp1); for (j=0; j To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 44ca3690519b - main - Move the arm64 identify_cpu SYSINIT earlier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44ca3690519b653c7293c2366b6c47d8f510ff26 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637680288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NO1hIdH1HPbrn8EEFJ3PaKyZt0MWpphCnra2Epj29wo=; b=U5WkujSxSC3K4FVvGcWmuD6Yymp3QrCJw8vobPaP639O09mTAPmN4MbXYKmtr7LbszJNQN uU9TXE/duU9omSzv9aRUF+Hj0XEORP8Z9Ai+ALJicLm5vqoIeRh1sEy2W5yQDyo3rEH/VZ QRHmrYBF0NyBYzKfKh6WbeWiYzIfHTDlwntstRnejX0ex2zyVmAPjivS6PnuuNOOF4HGtM /J4KgViP50gJZQF6jIsRPaO8HgZcPN4xoNff8+c0UDUUamLtqPw8yqSgXI7SR88y0evdT5 VXvJCEoFP3GSA2UKRYQjzeA2gMWLbMpTODohfnXuBRxWlwTNZ2uNZu1mF//UuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637680288; a=rsa-sha256; cv=none; b=McRjyasbjFc39xjnKMxYqR/kisiCdmfmRhg+m58T0j1QdCpKXgqpW3Vqblq2XIxUhMORxN OA2c1PwIAsxtb4XVO0JXDtLCf79NqzPHdwPfXNj0zoLZX1Yok9XpEwOeZvdWNFWd4h7gac 0/afLd9vfVhrpHLuhB3Xb5I9j4756nZjVvCdxTTHNnzzqpZo7u8GCySh4PH18ZKCzl3bY8 /Yy5+EG9W9exMEFqGYICOEfz6zUxLYTVH8AJUM50kADmYwIWIyY1442Oytyh8VnZGfPrIi qlYQhXyFVp7v5O0sL+m+JlWg8wCfaGjrCM8wjqYaXIyom3I32E9gFnKSXDXkjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=44ca3690519b653c7293c2366b6c47d8f510ff26 commit 44ca3690519b653c7293c2366b6c47d8f510ff26 Author: Andrew Turner AuthorDate: 2021-11-22 10:25:01 +0000 Commit: Andrew Turner CommitDate: 2021-11-23 15:03:51 +0000 Move the arm64 identify_cpu SYSINIT earlier It is used by late ifunc resolvers so needs to be at an earlier stage of the boot. Previously it was at the same stage so may not have run before the ifunc resolvers. Sponsored by: The FreeBSD Foundation --- sys/arm64/arm64/identcpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index dabfe6f99d3a..29a438b0a2db 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1743,7 +1743,7 @@ identify_cpu_sysinit(void *dummy __unused) install_undef_handler(true, user_mrs_handler); } -SYSINIT(identify_cpu, SI_SUB_CPU, SI_ORDER_ANY, identify_cpu_sysinit, NULL); +SYSINIT(identify_cpu, SI_SUB_CPU, SI_ORDER_MIDDLE, identify_cpu_sysinit, NULL); static void cpu_features_sysinit(void *dummy __unused) From nobody Tue Nov 23 16:12:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D2B9A18AC181; Tue, 23 Nov 2021 16:12: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 4Hz8LX3s5xz3PWn; Tue, 23 Nov 2021 16:12:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64210194E6; Tue, 23 Nov 2021 16:12: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 1ANGCqWj074096; Tue, 23 Nov 2021 16:12:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANGCqdM074095; Tue, 23 Nov 2021 16:12:52 GMT (envelope-from git) Date: Tue, 23 Nov 2021 16:12:52 GMT Message-Id: <202111231612.1ANGCqdM074095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 7c2b681b33fc - stable/12 - if_epair: rework List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7c2b681b33fc78ed06c7e9e65eeebb2ab5420586 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637683972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bBpPZuOJNlMn58SmSbT9kONpSsPoar1yTm6S2Nectyc=; b=Bvz248ldyB8Fb3Ykcrr+Ywg6xOLhheWDVVdhGq4BK72sqxXREMLCbK+rBbg7L/Xw4hIlgw EAb0znkfTLcoKjjHuta8JzJ/Qdo/mPS/MamBq3Dc6vTLymN7QJrJ2bvs1mSYjfssz8hLu0 5r84o//uNBcAc0inqxud5gm8SIJ1VKnOO4iWlWowcbzrMhVuOspSLPG6/h1xXEZVzuJTU/ BTkHylUHdM9bCq5YuGjLSUBi/53WbABfKeUu/EpsCqG3zdd8wyB6H41Zj22WNpYeDFeEvf isKDifRjOz19PQBYycdfbNtwFCOo57CmXAgKvpFnI4KATeFydPkq06AMMDFNRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637683972; a=rsa-sha256; cv=none; b=Ygg29V87fdmZI+8P1aYhQdp1xGGtCLW6RYGRU0WyToquNX+jPFK+lsJE0Q+YpGyCqkxUOy +BvedcrUw//H9Hcshv3ZNoL/QP93vdt+ZqoOxsIGYj0SVNQqfgVwAQO2/4/iXNwvqrV3hF OuFgOrr5Jygxed6rX7vAjAy/CUoE6Rv7EbSxPvpEK4IyDYAh90SEVIRHRjVwoZA9LN5jPI P7eG28wg4Cvw9c73PzTwYWFJQPuvzJLBvoJtNA9DtO7yP9DdLHBf0kv/yMA6gPbZot5QPo cpp3ic/NoMKg/9AEIRZ41Qp0+/381JiKiEjSh3a28UTM15qqXIGPlwfS/+V7WQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7c2b681b33fc78ed06c7e9e65eeebb2ab5420586 commit 7c2b681b33fc78ed06c7e9e65eeebb2ab5420586 Author: Bjoern A. Zeeb AuthorDate: 2021-10-09 14:09:04 +0000 Commit: Kristof Provost CommitDate: 2021-11-23 16:11:46 +0000 if_epair: rework Rework if_epair(4) to no longer use netisr and dpcpu. Instead use mbufq and swi_net. This simplifies the code and seems to make it work better and no longer hang. Work largely by bz@, with minor tweaks by kp@. Reviewed by: bz, kp MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D31077 (cherry picked from commit 3dd5760aa5f876f8a3f0735afeebdf9ee414e1f5) --- sys/net/if_epair.c | 749 +++++++++++++++++------------------------------------ 1 file changed, 243 insertions(+), 506 deletions(-) diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index cd11036ad028..a182b336bcec 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -2,8 +2,8 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2008 The FreeBSD Foundation - * Copyright (c) 2009-2010 Bjoern A. Zeeb * All rights reserved. + * Copyright (c) 2009-2021 Bjoern A. Zeeb * * This software was developed by CK Software GmbH under sponsorship * from the FreeBSD Foundation. @@ -37,17 +37,6 @@ * This is mostly intended to be used to provide connectivity between * different virtual network stack instances. */ -/* - * Things to re-think once we have more experience: - * - ifp->if_reassign function once we can test with vimage. Depending on - * how if_vmove() is going to be improved. - * - Real random etheraddrs that are checked to be uniquish; we would need - * to re-do them in case we move the interface between network stacks - * in a private if_reassign function. - * In case we bridge to a real interface/network or between indepedent - * epairs on multiple stacks/machines, we may need this. - * For now let the user handle that case. - */ #include __FBSDID("$FreeBSD$"); @@ -61,13 +50,15 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include #include #include +#include +#include +#include #include #include @@ -80,120 +71,41 @@ __FBSDID("$FreeBSD$"); #include #include -SYSCTL_DECL(_net_link); -static SYSCTL_NODE(_net_link, OID_AUTO, epair, CTLFLAG_RW, 0, "epair sysctl"); - -#ifdef EPAIR_DEBUG -static int epair_debug = 0; -SYSCTL_INT(_net_link_epair, OID_AUTO, epair_debug, CTLFLAG_RW, - &epair_debug, 0, "if_epair(4) debugging."); -#define DPRINTF(fmt, arg...) \ - if (epair_debug) \ - printf("[%s:%d] " fmt, __func__, __LINE__, ##arg) -#else -#define DPRINTF(fmt, arg...) -#endif - -static void epair_nh_sintr(struct mbuf *); -static struct mbuf *epair_nh_m2cpuid(struct mbuf *, uintptr_t, u_int *); -static void epair_nh_drainedcpu(u_int); - -static void epair_start_locked(struct ifnet *); -static int epair_media_change(struct ifnet *); -static void epair_media_status(struct ifnet *, struct ifmediareq *); - static int epair_clone_match(struct if_clone *, const char *); static int epair_clone_create(struct if_clone *, char *, size_t, caddr_t); static int epair_clone_destroy(struct if_clone *, struct ifnet *); static const char epairname[] = "epair"; -static unsigned int next_index = 0; +#define RXRSIZE 4096 /* Probably overkill by 4-8x. */ -/* Netisr related definitions and sysctl. */ -static struct netisr_handler epair_nh = { - .nh_name = epairname, - .nh_proto = NETISR_EPAIR, - .nh_policy = NETISR_POLICY_CPU, - .nh_handler = epair_nh_sintr, - .nh_m2cpuid = epair_nh_m2cpuid, - .nh_drainedcpu = epair_nh_drainedcpu, -}; +static MALLOC_DEFINE(M_EPAIR, epairname, + "Pair of virtual cross-over connected Ethernet-like interfaces"); -static int -sysctl_epair_netisr_maxqlen(SYSCTL_HANDLER_ARGS) -{ - int error, qlimit; +VNET_DEFINE_STATIC(struct if_clone *, epair_cloner); +#define V_epair_cloner VNET(epair_cloner) - netisr_getqlimit(&epair_nh, &qlimit); - error = sysctl_handle_int(oidp, &qlimit, 0, req); - if (error || !req->newptr) - return (error); - if (qlimit < 1) - return (EINVAL); - return (netisr_setqlimit(&epair_nh, qlimit)); -} -SYSCTL_PROC(_net_link_epair, OID_AUTO, netisr_maxqlen, CTLTYPE_INT|CTLFLAG_RW, - 0, 0, sysctl_epair_netisr_maxqlen, "I", - "Maximum if_epair(4) netisr \"hw\" queue length"); +static unsigned int next_index = 0; +#define EPAIR_LOCK_INIT() mtx_init(&epair_n_index_mtx, "epairidx", \ + NULL, MTX_DEF) +#define EPAIR_LOCK_DESTROY() mtx_destroy(&epair_n_index_mtx) +#define EPAIR_LOCK() mtx_lock(&epair_n_index_mtx) +#define EPAIR_UNLOCK() mtx_unlock(&epair_n_index_mtx) + +static void *swi_cookie[MAXCPU]; /* swi(9). */ +static STAILQ_HEAD(, epair_softc) swi_sc[MAXCPU]; +static struct mtx epair_n_index_mtx; struct epair_softc { struct ifnet *ifp; /* This ifp. */ struct ifnet *oifp; /* other ifp of pair. */ + void *swi_cookie; /* swi(9). */ + struct buf_ring *rxring[2]; + volatile int ridx; /* 0 || 1 */ struct ifmedia media; /* Media config (fake). */ - u_int refcount; /* # of mbufs in flight. */ - u_int cpuid; /* CPU ID assigned upon creation. */ - void (*if_qflush)(struct ifnet *); - /* Original if_qflush routine. */ + uint32_t cpuidx; + STAILQ_ENTRY(epair_softc) entry; }; -/* - * Per-CPU list of ifps with data in the ifq that needs to be flushed - * to the netisr ``hw'' queue before we allow any further direct queuing - * to the ``hw'' queue. - */ -struct epair_ifp_drain { - STAILQ_ENTRY(epair_ifp_drain) ifp_next; - struct ifnet *ifp; -}; -STAILQ_HEAD(eid_list, epair_ifp_drain); - -#define EPAIR_LOCK_INIT(dpcpu) mtx_init(&(dpcpu)->if_epair_mtx, \ - "if_epair", NULL, MTX_DEF) -#define EPAIR_LOCK_DESTROY(dpcpu) mtx_destroy(&(dpcpu)->if_epair_mtx) -#define EPAIR_LOCK_ASSERT(dpcpu) mtx_assert(&(dpcpu)->if_epair_mtx, \ - MA_OWNED) -#define EPAIR_LOCK(dpcpu) mtx_lock(&(dpcpu)->if_epair_mtx) -#define EPAIR_UNLOCK(dpcpu) mtx_unlock(&(dpcpu)->if_epair_mtx) - -#ifdef INVARIANTS -#define EPAIR_REFCOUNT_INIT(r, v) refcount_init((r), (v)) -#define EPAIR_REFCOUNT_AQUIRE(r) refcount_acquire((r)) -#define EPAIR_REFCOUNT_RELEASE(r) refcount_release((r)) -#define EPAIR_REFCOUNT_ASSERT(a, p) KASSERT(a, p) -#else -#define EPAIR_REFCOUNT_INIT(r, v) -#define EPAIR_REFCOUNT_AQUIRE(r) -#define EPAIR_REFCOUNT_RELEASE(r) -#define EPAIR_REFCOUNT_ASSERT(a, p) -#endif - -static MALLOC_DEFINE(M_EPAIR, epairname, - "Pair of virtual cross-over connected Ethernet-like interfaces"); - -VNET_DEFINE_STATIC(struct if_clone *, epair_cloner); -#define V_epair_cloner VNET(epair_cloner) - -/* - * DPCPU area and functions. - */ -struct epair_dpcpu { - struct mtx if_epair_mtx; /* Per-CPU locking. */ - int epair_drv_flags; /* Per-CPU ``hw'' drv flags. */ - struct eid_list epair_ifp_drain_list; /* Per-CPU list of ifps with - * data in the ifq. */ -}; -DPCPU_DEFINE(struct epair_dpcpu, epair_dpcpu); - static void epair_clear_mbuf(struct mbuf *m) { @@ -201,313 +113,180 @@ epair_clear_mbuf(struct mbuf *m) } static void -epair_dpcpu_init(void) +epair_if_input(struct epair_softc *sc, int ridx) { - struct epair_dpcpu *epair_dpcpu; - struct eid_list *s; - u_int cpuid; - - CPU_FOREACH(cpuid) { - epair_dpcpu = DPCPU_ID_PTR(cpuid, epair_dpcpu); - - /* Initialize per-cpu lock. */ - EPAIR_LOCK_INIT(epair_dpcpu); - - /* Driver flags are per-cpu as are our netisr "hw" queues. */ - epair_dpcpu->epair_drv_flags = 0; - - /* - * Initialize per-cpu drain list. - * Manually do what STAILQ_HEAD_INITIALIZER would do. - */ - s = &epair_dpcpu->epair_ifp_drain_list; - s->stqh_first = NULL; - s->stqh_last = &s->stqh_first; - } -} + struct epoch_tracker et; + struct ifnet *ifp; + struct mbuf *m; -static void -epair_dpcpu_detach(void) -{ - struct epair_dpcpu *epair_dpcpu; - u_int cpuid; + ifp = sc->ifp; + NET_EPOCH_ENTER_ET(et); + do { + m = buf_ring_dequeue_sc(sc->rxring[ridx]); + if (m == NULL) + break; - CPU_FOREACH(cpuid) { - epair_dpcpu = DPCPU_ID_PTR(cpuid, epair_dpcpu); + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); + (*ifp->if_input)(ifp, m); - /* Destroy per-cpu lock. */ - EPAIR_LOCK_DESTROY(epair_dpcpu); - } + } while (1); + NET_EPOCH_EXIT_ET(et); } -/* - * Helper functions. - */ -static u_int -cpuid_from_ifp(struct ifnet *ifp) +static void +epair_sintr(struct epair_softc *sc) { - struct epair_softc *sc; + int ridx, nidx; - if (ifp == NULL) - return (0); - sc = ifp->if_softc; + if_ref(sc->ifp); + do { + ridx = sc->ridx; + nidx = (ridx == 0) ? 1 : 0; + } while (!atomic_cmpset_int(&sc->ridx, ridx, nidx)); + epair_if_input(sc, ridx); - return (sc->cpuid); + if_rele(sc->ifp); } -/* - * Netisr handler functions. - */ static void -epair_nh_sintr(struct mbuf *m) -{ - struct ifnet *ifp; - struct epair_softc *sc __unused; - - ifp = m->m_pkthdr.rcvif; - (*ifp->if_input)(ifp, m); - sc = ifp->if_softc; - EPAIR_REFCOUNT_RELEASE(&sc->refcount); - EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, - ("%s: ifp=%p sc->refcount not >= 1: %d", - __func__, ifp, sc->refcount)); - DPRINTF("ifp=%p refcount=%u\n", ifp, sc->refcount); -} - -static struct mbuf * -epair_nh_m2cpuid(struct mbuf *m, uintptr_t source, u_int *cpuid) +epair_intr(void *arg) { + struct epair_softc *sc; + uint32_t cpuidx; + + cpuidx = (uintptr_t)arg; + /* If this is a problem, this is a read-mostly situation. */ + EPAIR_LOCK(); + STAILQ_FOREACH(sc, &swi_sc[cpuidx], entry) { + /* Do this lockless. */ + if (buf_ring_empty(sc->rxring[sc->ridx])) + continue; + epair_sintr(sc); + } + EPAIR_UNLOCK(); - *cpuid = cpuid_from_ifp(m->m_pkthdr.rcvif); - - return (m); + return; } -static void -epair_nh_drainedcpu(u_int cpuid) +static int +epair_menq(struct mbuf *m, struct epair_softc *osc) { - struct epair_dpcpu *epair_dpcpu; - struct epair_ifp_drain *elm, *tvar; - struct ifnet *ifp; + struct ifnet *ifp, *oifp; + int len, ret; + int ridx; + short mflags; + bool was_empty; - epair_dpcpu = DPCPU_ID_PTR(cpuid, epair_dpcpu); - EPAIR_LOCK(epair_dpcpu); /* - * Assume our "hw" queue and possibly ifq will be emptied - * again. In case we will overflow the "hw" queue while - * draining, epair_start_locked will set IFF_DRV_OACTIVE - * again and we will stop and return. + * I know this looks weird. We pass the "other sc" as we need that one + * and can get both ifps from it as well. */ - STAILQ_FOREACH_SAFE(elm, &epair_dpcpu->epair_ifp_drain_list, - ifp_next, tvar) { - ifp = elm->ifp; - epair_dpcpu->epair_drv_flags &= ~IFF_DRV_OACTIVE; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - epair_start_locked(ifp); - - IFQ_LOCK(&ifp->if_snd); - if (IFQ_IS_EMPTY(&ifp->if_snd)) { - struct epair_softc *sc __unused; - - STAILQ_REMOVE(&epair_dpcpu->epair_ifp_drain_list, - elm, epair_ifp_drain, ifp_next); - /* The cached ifp goes off the list. */ - sc = ifp->if_softc; - EPAIR_REFCOUNT_RELEASE(&sc->refcount); - EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, - ("%s: ifp=%p sc->refcount not >= 1: %d", - __func__, ifp, sc->refcount)); - free(elm, M_EPAIR); - } - IFQ_UNLOCK(&ifp->if_snd); + oifp = osc->ifp; + ifp = osc->oifp; - if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) != 0) { - /* Our "hw"q overflew again. */ - epair_dpcpu->epair_drv_flags |= IFF_DRV_OACTIVE; - DPRINTF("hw queue length overflow at %u\n", - epair_nh.nh_qlimit); - break; - } - } - EPAIR_UNLOCK(epair_dpcpu); -} + M_ASSERTPKTHDR(m); + epair_clear_mbuf(m); + if_setrcvif(m, oifp); + M_SETFIB(m, oifp->if_fib); -/* - * Network interface (`if') related functions. - */ -static void -epair_remove_ifp_from_draining(struct ifnet *ifp) -{ - struct epair_dpcpu *epair_dpcpu; - struct epair_ifp_drain *elm, *tvar; - u_int cpuid; - - CPU_FOREACH(cpuid) { - epair_dpcpu = DPCPU_ID_PTR(cpuid, epair_dpcpu); - EPAIR_LOCK(epair_dpcpu); - STAILQ_FOREACH_SAFE(elm, &epair_dpcpu->epair_ifp_drain_list, - ifp_next, tvar) { - if (ifp == elm->ifp) { - struct epair_softc *sc __unused; - - STAILQ_REMOVE( - &epair_dpcpu->epair_ifp_drain_list, elm, - epair_ifp_drain, ifp_next); - /* The cached ifp goes off the list. */ - sc = ifp->if_softc; - EPAIR_REFCOUNT_RELEASE(&sc->refcount); - EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, - ("%s: ifp=%p sc->refcount not >= 1: %d", - __func__, ifp, sc->refcount)); - free(elm, M_EPAIR); - } - } - EPAIR_UNLOCK(epair_dpcpu); - } -} + /* Save values as once the mbuf is queued, it's not ours anymore. */ + len = m->m_pkthdr.len; + mflags = m->m_flags; -static int -epair_add_ifp_for_draining(struct ifnet *ifp) -{ - struct epair_dpcpu *epair_dpcpu; - struct epair_softc *sc; - struct epair_ifp_drain *elm = NULL; + MPASS(m->m_nextpkt == NULL); + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); - sc = ifp->if_softc; - epair_dpcpu = DPCPU_ID_PTR(sc->cpuid, epair_dpcpu); - EPAIR_LOCK_ASSERT(epair_dpcpu); - STAILQ_FOREACH(elm, &epair_dpcpu->epair_ifp_drain_list, ifp_next) - if (elm->ifp == ifp) - break; - /* If the ifp is there already, return success. */ - if (elm != NULL) + ridx = atomic_load_int(&osc->ridx); + was_empty = buf_ring_empty(osc->rxring[ridx]); + ret = buf_ring_enqueue(osc->rxring[ridx], m); + if (ret != 0) { + /* Ring is full. */ + m_freem(m); return (0); + } - elm = malloc(sizeof(struct epair_ifp_drain), M_EPAIR, M_NOWAIT|M_ZERO); - if (elm == NULL) - return (ENOMEM); + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + /* + * IFQ_HANDOFF_ADJ/ip_handoff() update statistics, + * but as we bypass all this we have to duplicate + * the logic another time. + */ + if_inc_counter(ifp, IFCOUNTER_OBYTES, len); + if (mflags & (M_BCAST|M_MCAST)) + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); + /* Someone else received the packet. */ + if_inc_counter(oifp, IFCOUNTER_IPACKETS, 1); - elm->ifp = ifp; - /* Add a reference for the ifp pointer on the list. */ - EPAIR_REFCOUNT_AQUIRE(&sc->refcount); - STAILQ_INSERT_TAIL(&epair_dpcpu->epair_ifp_drain_list, elm, ifp_next); + /* Kick the interrupt handler for the first packet. */ + if (was_empty && osc->swi_cookie != NULL) + swi_sched(osc->swi_cookie, 0); return (0); } static void -epair_start_locked(struct ifnet *ifp) +epair_start(struct ifnet *ifp) { - struct epair_dpcpu *epair_dpcpu; struct mbuf *m; struct epair_softc *sc; struct ifnet *oifp; - int error; - - DPRINTF("ifp=%p\n", ifp); - sc = ifp->if_softc; - epair_dpcpu = DPCPU_ID_PTR(sc->cpuid, epair_dpcpu); - EPAIR_LOCK_ASSERT(epair_dpcpu); - - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - return; - if ((ifp->if_flags & IFF_UP) == 0) - return; /* * We get packets here from ether_output via if_handoff() * and need to put them into the input queue of the oifp - * and call oifp->if_input() via netisr/epair_sintr(). + * and will put the packet into the receive-queue (rxq) of the + * other interface (oifp) of our pair. */ + sc = ifp->if_softc; oifp = sc->oifp; sc = oifp->if_softc; for (;;) { IFQ_DEQUEUE(&ifp->if_snd, m); if (m == NULL) break; + M_ASSERTPKTHDR(m); BPF_MTAP(ifp, m); - /* - * In case the outgoing interface is not usable, - * drop the packet. - */ - if ((oifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || - (oifp->if_flags & IFF_UP) ==0) { - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + /* In case either interface is not usable drop the packet. */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + (ifp->if_flags & IFF_UP) == 0 || + (oifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + (oifp->if_flags & IFF_UP) == 0) { m_freem(m); continue; } - DPRINTF("packet %s -> %s\n", ifp->if_xname, oifp->if_xname); - - epair_clear_mbuf(m); - - /* - * Add a reference so the interface cannot go while the - * packet is in transit as we rely on rcvif to stay valid. - */ - EPAIR_REFCOUNT_AQUIRE(&sc->refcount); - m->m_pkthdr.rcvif = oifp; - CURVNET_SET_QUIET(oifp->if_vnet); - error = netisr_queue(NETISR_EPAIR, m); - CURVNET_RESTORE(); - if (!error) { - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); - /* Someone else received the packet. */ - if_inc_counter(oifp, IFCOUNTER_IPACKETS, 1); - } else { - /* The packet was freed already. */ - epair_dpcpu->epair_drv_flags |= IFF_DRV_OACTIVE; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - (void) epair_add_ifp_for_draining(ifp); - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - EPAIR_REFCOUNT_RELEASE(&sc->refcount); - EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, - ("%s: ifp=%p sc->refcount not >= 1: %d", - __func__, oifp, sc->refcount)); - } - } -} -static void -epair_start(struct ifnet *ifp) -{ - struct epair_dpcpu *epair_dpcpu; - - epair_dpcpu = DPCPU_ID_PTR(cpuid_from_ifp(ifp), epair_dpcpu); - EPAIR_LOCK(epair_dpcpu); - epair_start_locked(ifp); - EPAIR_UNLOCK(epair_dpcpu); + (void) epair_menq(m, sc); + } } static int -epair_transmit_locked(struct ifnet *ifp, struct mbuf *m) +epair_transmit(struct ifnet *ifp, struct mbuf *m) { - struct epair_dpcpu *epair_dpcpu; struct epair_softc *sc; struct ifnet *oifp; int error, len; short mflags; - DPRINTF("ifp=%p m=%p\n", ifp, m); - sc = ifp->if_softc; - epair_dpcpu = DPCPU_ID_PTR(sc->cpuid, epair_dpcpu); - EPAIR_LOCK_ASSERT(epair_dpcpu); - if (m == NULL) return (0); - + + M_ASSERTPKTHDR(m); + /* * We are not going to use the interface en/dequeue mechanism * on the TX side. We are called from ether_output_frame() - * and will put the packet into the incoming queue of the - * other interface of our pair via the netsir. + * and will put the packet into the receive-queue (rxq) of the + * other interface (oifp) of our pair. */ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (ENXIO); } if ((ifp->if_flags & IFF_UP) == 0) { m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (ENETDOWN); } @@ -517,16 +296,16 @@ epair_transmit_locked(struct ifnet *ifp, struct mbuf *m) * In case the outgoing interface is not usable, * drop the packet. */ + sc = ifp->if_softc; oifp = sc->oifp; if ((oifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || - (oifp->if_flags & IFF_UP) ==0) { + (oifp->if_flags & IFF_UP) == 0) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); m_freem(m); return (0); } len = m->m_pkthdr.len; mflags = m->m_flags; - DPRINTF("packet %s -> %s\n", ifp->if_xname, oifp->if_xname); #ifdef ALTQ /* Support ALTQ via the classic if_start() path. */ @@ -540,99 +319,17 @@ epair_transmit_locked(struct ifnet *ifp, struct mbuf *m) if_inc_counter(ifp, IFCOUNTER_OBYTES, len); if (mflags & (M_BCAST|M_MCAST)) if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); - - if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) - epair_start_locked(ifp); - else - (void)epair_add_ifp_for_draining(ifp); + epair_start(ifp); } return (error); } IF_UNLOCK(&ifp->if_snd); #endif - if ((epair_dpcpu->epair_drv_flags & IFF_DRV_OACTIVE) != 0) { - /* - * Our hardware queue is full, try to fall back - * queuing to the ifq but do not call ifp->if_start. - * Either we are lucky or the packet is gone. - */ - IFQ_ENQUEUE(&ifp->if_snd, m, error); - if (!error) - (void)epair_add_ifp_for_draining(ifp); - return (error); - } - - epair_clear_mbuf(m); - - sc = oifp->if_softc; - /* - * Add a reference so the interface cannot go while the - * packet is in transit as we rely on rcvif to stay valid. - */ - EPAIR_REFCOUNT_AQUIRE(&sc->refcount); - m->m_pkthdr.rcvif = oifp; - CURVNET_SET_QUIET(oifp->if_vnet); - error = netisr_queue(NETISR_EPAIR, m); - CURVNET_RESTORE(); - if (!error) { - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); - /* - * IFQ_HANDOFF_ADJ/ip_handoff() update statistics, - * but as we bypass all this we have to duplicate - * the logic another time. - */ - if_inc_counter(ifp, IFCOUNTER_OBYTES, len); - if (mflags & (M_BCAST|M_MCAST)) - if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); - /* Someone else received the packet. */ - if_inc_counter(oifp, IFCOUNTER_IPACKETS, 1); - } else { - /* The packet was freed already. */ - epair_dpcpu->epair_drv_flags |= IFF_DRV_OACTIVE; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - EPAIR_REFCOUNT_RELEASE(&sc->refcount); - EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, - ("%s: ifp=%p sc->refcount not >= 1: %d", - __func__, oifp, sc->refcount)); - } - + error = epair_menq(m, oifp->if_softc); return (error); } -static int -epair_transmit(struct ifnet *ifp, struct mbuf *m) -{ - struct epair_dpcpu *epair_dpcpu; - int error; - - epair_dpcpu = DPCPU_ID_PTR(cpuid_from_ifp(ifp), epair_dpcpu); - EPAIR_LOCK(epair_dpcpu); - error = epair_transmit_locked(ifp, m); - EPAIR_UNLOCK(epair_dpcpu); - return (error); -} - -static void -epair_qflush(struct ifnet *ifp) -{ - struct epair_softc *sc; - - sc = ifp->if_softc; - KASSERT(sc != NULL, ("%s: ifp=%p, epair_softc gone? sc=%p\n", - __func__, ifp, sc)); - /* - * Remove this ifp from all backpointer lists. The interface will not - * usable for flushing anyway nor should it have anything to flush - * after if_qflush(). - */ - epair_remove_ifp_from_draining(ifp); - - if (sc->if_qflush) - sc->if_qflush(ifp); -} - static int epair_media_change(struct ifnet *ifp __unused) { @@ -701,8 +398,6 @@ epair_clone_match(struct if_clone *ifc, const char *name) { const char *cp; - DPRINTF("name='%s'\n", name); - /* * Our base name is epair. * Our interfaces will be named epair[ab]. @@ -791,16 +486,16 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) /* Allocate memory for both [ab] interfaces */ sca = malloc(sizeof(struct epair_softc), M_EPAIR, M_WAITOK | M_ZERO); - EPAIR_REFCOUNT_INIT(&sca->refcount, 1); sca->ifp = if_alloc(IFT_ETHER); if (sca->ifp == NULL) { free(sca, M_EPAIR); ifc_free_unit(ifc, unit); return (ENOSPC); } + sca->rxring[0] = buf_ring_alloc(RXRSIZE, M_EPAIR, M_WAITOK,NULL); + sca->rxring[1] = buf_ring_alloc(RXRSIZE, M_EPAIR, M_WAITOK, NULL); scb = malloc(sizeof(struct epair_softc), M_EPAIR, M_WAITOK | M_ZERO); - EPAIR_REFCOUNT_INIT(&scb->refcount, 1); scb->ifp = if_alloc(IFT_ETHER); if (scb->ifp == NULL) { free(scb, M_EPAIR); @@ -809,23 +504,59 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) ifc_free_unit(ifc, unit); return (ENOSPC); } - + + scb->rxring[0] = buf_ring_alloc(RXRSIZE, M_EPAIR, M_WAITOK, NULL); + scb->rxring[1] = buf_ring_alloc(RXRSIZE, M_EPAIR, M_WAITOK, NULL); + /* * Cross-reference the interfaces so we will be able to free both. */ sca->oifp = scb->ifp; scb->oifp = sca->ifp; - /* - * Calculate the cpuid for netisr queueing based on the - * ifIndex of the interfaces. As long as we cannot configure - * this or use cpuset information easily we cannot guarantee - * cache locality but we can at least allow parallelism. - */ - sca->cpuid = - netisr_get_cpuid(sca->ifp->if_index); - scb->cpuid = - netisr_get_cpuid(scb->ifp->if_index); + EPAIR_LOCK(); +#ifdef SMP + /* Get an approximate distribution. */ + hash = next_index % mp_ncpus; +#else + hash = 0; +#endif + if (swi_cookie[hash] == NULL) { + void *cookie; + + EPAIR_UNLOCK(); + error = swi_add(NULL, epairname, + epair_intr, (void *)(uintptr_t)hash, + SWI_NET, INTR_MPSAFE, &cookie); + if (error) { + buf_ring_free(scb->rxring[0], M_EPAIR); + buf_ring_free(scb->rxring[1], M_EPAIR); + if_free(scb->ifp); + free(scb, M_EPAIR); + buf_ring_free(sca->rxring[0], M_EPAIR); + buf_ring_free(sca->rxring[1], M_EPAIR); + if_free(sca->ifp); + free(sca, M_EPAIR); + ifc_free_unit(ifc, unit); + return (ENOSPC); + } + EPAIR_LOCK(); + /* Recheck under lock even though a race is very unlikely. */ + if (swi_cookie[hash] == NULL) { + swi_cookie[hash] = cookie; + } else { + EPAIR_UNLOCK(); + (void) swi_remove(cookie); + EPAIR_LOCK(); + } + } + sca->cpuidx = hash; + STAILQ_INSERT_TAIL(&swi_sc[hash], sca, entry); + sca->swi_cookie = swi_cookie[hash]; + scb->cpuidx = hash; + STAILQ_INSERT_TAIL(&swi_sc[hash], scb, entry); + scb->swi_cookie = swi_cookie[hash]; + EPAIR_UNLOCK(); /* Initialise pseudo media types. */ ifmedia_init(&sca->media, 0, epair_media_change, epair_media_status); @@ -862,12 +593,14 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) if (hostid == 0) arc4rand(&hostid, sizeof(hostid), 0); + EPAIR_LOCK(); if (ifp->if_index > next_index) next_index = ifp->if_index; else next_index++; key[0] = (uint32_t)next_index; + EPAIR_UNLOCK(); key[1] = (uint32_t)(hostid & 0xffffffff); key[2] = (uint32_t)((hostid >> 32) & 0xfffffffff); hash = jenkins_hash32(key, 3, 0); @@ -876,10 +609,8 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) memcpy(&eaddr[1], &hash, 4); eaddr[5] = 0x0a; ether_ifattach(ifp, eaddr); - sca->if_qflush = ifp->if_qflush; - ifp->if_qflush = epair_qflush; - ifp->if_transmit = epair_transmit; ifp->if_baudrate = IF_Gbps(10); /* arbitrary maximum */ + ifp->if_transmit = epair_transmit; /* Swap the name and finish initialization of interface b. */ *dp = 'b'; @@ -904,27 +635,40 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) strlcpy(name, scb->ifp->if_xname, len); epair_clone_add(ifc, scb); - scb->if_qflush = ifp->if_qflush; - ifp->if_qflush = epair_qflush; - ifp->if_transmit = epair_transmit; ifp->if_baudrate = IF_Gbps(10); /* arbitrary maximum */ + ifp->if_transmit = epair_transmit; /* * Restore name to a as the ifp for this will go into the * cloner list for the initial call. */ strlcpy(name, sca->ifp->if_xname, len); - DPRINTF("name='%s/%db' created sca=%p scb=%p\n", name, unit, sca, scb); /* Tell the world, that we are ready to rock. */ sca->ifp->if_drv_flags |= IFF_DRV_RUNNING; - scb->ifp->if_drv_flags |= IFF_DRV_RUNNING; if_link_state_change(sca->ifp, LINK_STATE_UP); + scb->ifp->if_drv_flags |= IFF_DRV_RUNNING; if_link_state_change(scb->ifp, LINK_STATE_UP); return (0); } +static void +epair_drain_rings(struct epair_softc *sc) +{ + int ridx; + struct mbuf *m; + + for (ridx = 0; ridx < 2; ridx++) { + do { + m = buf_ring_dequeue_sc(sc->rxring[ridx]); + if (m == NULL) + break; + m_freem(m); + } while (1); + } +} + static int epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) { @@ -932,8 +676,6 @@ epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) struct epair_softc *sca, *scb; int unit, error; - DPRINTF("ifp=%p\n", ifp); - /* * In case we called into if_clone_destroyif() ourselves * again to remove the second interface, the softc will be @@ -947,27 +689,26 @@ epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) oifp = sca->oifp; scb = oifp->if_softc; - DPRINTF("ifp=%p oifp=%p\n", ifp, oifp); + /* Frist get the interfaces down and detached. */ if_link_state_change(ifp, LINK_STATE_DOWN); - if_link_state_change(oifp, LINK_STATE_DOWN); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_link_state_change(oifp, LINK_STATE_DOWN); oifp->if_drv_flags &= ~IFF_DRV_RUNNING; - /* - * Get rid of our second half. As the other of the two - * interfaces may reside in a different vnet, we need to - * switch before freeing them. - */ - CURVNET_SET_QUIET(oifp->if_vnet); + ether_ifdetach(ifp); ether_ifdetach(oifp); - /* - * Wait for all packets to be dispatched to if_input. - * The numbers can only go down as the interface is - * detached so there is no need to use atomics. - */ - DPRINTF("scb refcnt=%u\n", scb->refcount); - EPAIR_REFCOUNT_ASSERT(scb->refcount == 1, - ("%s: ifp=%p scb->refcount!=1: %d", __func__, oifp, scb->refcount)); + + /* Second stop interrupt handler. */ + EPAIR_LOCK(); + STAILQ_REMOVE(&swi_sc[sca->cpuidx], sca, epair_softc, entry); + STAILQ_REMOVE(&swi_sc[scb->cpuidx], scb, epair_softc, entry); + EPAIR_UNLOCK(); + sca->swi_cookie = NULL; + scb->swi_cookie = NULL; + + /* Third free any queued packets and all the resources. */ + CURVNET_SET_QUIET(oifp->if_vnet); + epair_drain_rings(scb); oifp->if_softc = NULL; error = if_clone_destroyif(ifc, oifp); if (error) @@ -975,19 +716,19 @@ epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) __func__, error); if_free(oifp); ifmedia_removeall(&scb->media); + buf_ring_free(scb->rxring[0], M_EPAIR); + buf_ring_free(scb->rxring[1], M_EPAIR); free(scb, M_EPAIR); CURVNET_RESTORE(); - ether_ifdetach(ifp); *** 99 LINES SKIPPED *** From nobody Tue Nov 23 16:12:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F2C9D18AC0CE; Tue, 23 Nov 2021 16:12: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 4Hz8LX5Hqnz3Pjk; Tue, 23 Nov 2021 16:12:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95F44196D9; Tue, 23 Nov 2021 16:12: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 1ANGCqJS074158; Tue, 23 Nov 2021 16:12:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANGCqnD074157; Tue, 23 Nov 2021 16:12:52 GMT (envelope-from git) Date: Tue, 23 Nov 2021 16:12:52 GMT Message-Id: <202111231612.1ANGCqnD074157@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: f4aba8c9f0cb - stable/13 - if_epair: rework List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f4aba8c9f0cb55faa9201819614458afb64d68d1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637683972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zu6aO+HCy9o9tCT6GSXY7Anpv8+DaXK9XelgpWBXH2c=; b=CK4lkJLZCw11AaTZRFNUKesHJXc5xaIAnr7lBbMnnGRZu+tVgd1qSkuHEUwSR0yRFSzgK/ D0WTHu7Cn19PlTSoIGDBMjwOTe70xMRKDDcsAW9CVB1CI9GleS+o9icCQuMjPqtFSZ0Jfp t4CiIhfkMVUarQnO/HR33XS8Vr4OeJlD3c1e/kFIBQ1TDtB503HA2oQw17ha8+FEsu7ymL H4F7QfXgyx++4IWw7wlrL+re9kqWWWf8ojauxEawPs7+dx5dLFWSY8G/3QFrkBFS1yUfkv E8wOFHKPNY3cy2g9LS/IA8h0AuppRteA51TQpF1C3KKej9MxUapE+/c1nxmbuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637683972; a=rsa-sha256; cv=none; b=qgtXCCpJAXW4hYKC+6hQrsBkyPBoM578Gzij4CwpJQ5PqU+61Yl28z/j9xb6UOQjl7DmC4 kVlbk8Ib4pjICUq/lONeTHkGmHecAHzo0FUap5amj6K1BxYT1Q3t/RlPPMKo6c53XQs465 mg1+Y/N17BUIUe4wOkYe9Uhl4mAVVtDXh/OJ1MnzWxmI4BbT3QS7xPwS8kU//5q8UDxOAT 0xHdSNHK+DQ1cbZLnbllMb3bkF/3jA4kfg0D17VW+O83o20PL70aKpncdv1NGFR91/3w3O KpKvVwZNgbYYdBO5QDUZ9H22gPiZbqFP7gh8mEpM9VLr7HICE10ztD5m8weBEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f4aba8c9f0cb55faa9201819614458afb64d68d1 commit f4aba8c9f0cb55faa9201819614458afb64d68d1 Author: Bjoern A. Zeeb AuthorDate: 2021-10-09 14:09:04 +0000 Commit: Kristof Provost CommitDate: 2021-11-23 15:50:51 +0000 if_epair: rework Rework if_epair(4) to no longer use netisr and dpcpu. Instead use mbufq and swi_net. This simplifies the code and seems to make it work better and no longer hang. Work largely by bz@, with minor tweaks by kp@. Reviewed by: bz, kp MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D31077 (cherry picked from commit 3dd5760aa5f876f8a3f0735afeebdf9ee414e1f5) --- sys/net/if_epair.c | 746 +++++++++++++++++------------------------------------ 1 file changed, 240 insertions(+), 506 deletions(-) diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 2feefedb3cd9..89483db46337 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2008 The FreeBSD Foundation - * Copyright (c) 2009-2010 Bjoern A. Zeeb + * Copyright (c) 2009-2021 Bjoern A. Zeeb * * This software was developed by CK Software GmbH under sponsorship * from the FreeBSD Foundation. @@ -36,17 +36,6 @@ * This is mostly intended to be used to provide connectivity between * different virtual network stack instances. */ -/* - * Things to re-think once we have more experience: - * - ifp->if_reassign function once we can test with vimage. Depending on - * how if_vmove() is going to be improved. - * - Real random etheraddrs that are checked to be uniquish; we would need - * to re-do them in case we move the interface between network stacks - * in a private if_reassign function. - * In case we bridge to a real interface/network or between indepedent - * epairs on multiple stacks/machines, we may need this. - * For now let the user handle that case. - */ #include __FBSDID("$FreeBSD$"); @@ -60,13 +49,15 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include #include #include +#include +#include +#include #include #include @@ -79,122 +70,41 @@ __FBSDID("$FreeBSD$"); #include #include -SYSCTL_DECL(_net_link); -static SYSCTL_NODE(_net_link, OID_AUTO, epair, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, - "epair sysctl"); - -#ifdef EPAIR_DEBUG -static int epair_debug = 0; -SYSCTL_INT(_net_link_epair, OID_AUTO, epair_debug, CTLFLAG_RW, - &epair_debug, 0, "if_epair(4) debugging."); -#define DPRINTF(fmt, arg...) \ - if (epair_debug) \ - printf("[%s:%d] " fmt, __func__, __LINE__, ##arg) -#else -#define DPRINTF(fmt, arg...) -#endif - -static void epair_nh_sintr(struct mbuf *); -static struct mbuf *epair_nh_m2cpuid(struct mbuf *, uintptr_t, u_int *); -static void epair_nh_drainedcpu(u_int); - -static void epair_start_locked(struct ifnet *); -static int epair_media_change(struct ifnet *); -static void epair_media_status(struct ifnet *, struct ifmediareq *); - static int epair_clone_match(struct if_clone *, const char *); static int epair_clone_create(struct if_clone *, char *, size_t, caddr_t); static int epair_clone_destroy(struct if_clone *, struct ifnet *); static const char epairname[] = "epair"; -static unsigned int next_index = 0; +#define RXRSIZE 4096 /* Probably overkill by 4-8x. */ -/* Netisr related definitions and sysctl. */ -static struct netisr_handler epair_nh = { - .nh_name = epairname, - .nh_proto = NETISR_EPAIR, - .nh_policy = NETISR_POLICY_CPU, - .nh_handler = epair_nh_sintr, - .nh_m2cpuid = epair_nh_m2cpuid, - .nh_drainedcpu = epair_nh_drainedcpu, -}; +static MALLOC_DEFINE(M_EPAIR, epairname, + "Pair of virtual cross-over connected Ethernet-like interfaces"); -static int -sysctl_epair_netisr_maxqlen(SYSCTL_HANDLER_ARGS) -{ - int error, qlimit; +VNET_DEFINE_STATIC(struct if_clone *, epair_cloner); +#define V_epair_cloner VNET(epair_cloner) - netisr_getqlimit(&epair_nh, &qlimit); - error = sysctl_handle_int(oidp, &qlimit, 0, req); - if (error || !req->newptr) - return (error); - if (qlimit < 1) - return (EINVAL); - return (netisr_setqlimit(&epair_nh, qlimit)); -} -SYSCTL_PROC(_net_link_epair, OID_AUTO, netisr_maxqlen, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, - sysctl_epair_netisr_maxqlen, "I", - "Maximum if_epair(4) netisr \"hw\" queue length"); +static unsigned int next_index = 0; +#define EPAIR_LOCK_INIT() mtx_init(&epair_n_index_mtx, "epairidx", \ + NULL, MTX_DEF) +#define EPAIR_LOCK_DESTROY() mtx_destroy(&epair_n_index_mtx) +#define EPAIR_LOCK() mtx_lock(&epair_n_index_mtx) +#define EPAIR_UNLOCK() mtx_unlock(&epair_n_index_mtx) + +static void *swi_cookie[MAXCPU]; /* swi(9). */ +static STAILQ_HEAD(, epair_softc) swi_sc[MAXCPU]; +static struct mtx epair_n_index_mtx; struct epair_softc { struct ifnet *ifp; /* This ifp. */ struct ifnet *oifp; /* other ifp of pair. */ + void *swi_cookie; /* swi(9). */ + struct buf_ring *rxring[2]; + volatile int ridx; /* 0 || 1 */ struct ifmedia media; /* Media config (fake). */ - u_int refcount; /* # of mbufs in flight. */ - u_int cpuid; /* CPU ID assigned upon creation. */ - void (*if_qflush)(struct ifnet *); - /* Original if_qflush routine. */ + uint32_t cpuidx; + STAILQ_ENTRY(epair_softc) entry; }; -/* - * Per-CPU list of ifps with data in the ifq that needs to be flushed - * to the netisr ``hw'' queue before we allow any further direct queuing - * to the ``hw'' queue. - */ -struct epair_ifp_drain { - STAILQ_ENTRY(epair_ifp_drain) ifp_next; - struct ifnet *ifp; -}; -STAILQ_HEAD(eid_list, epair_ifp_drain); - -#define EPAIR_LOCK_INIT(dpcpu) mtx_init(&(dpcpu)->if_epair_mtx, \ - "if_epair", NULL, MTX_DEF) -#define EPAIR_LOCK_DESTROY(dpcpu) mtx_destroy(&(dpcpu)->if_epair_mtx) -#define EPAIR_LOCK_ASSERT(dpcpu) mtx_assert(&(dpcpu)->if_epair_mtx, \ - MA_OWNED) -#define EPAIR_LOCK(dpcpu) mtx_lock(&(dpcpu)->if_epair_mtx) -#define EPAIR_UNLOCK(dpcpu) mtx_unlock(&(dpcpu)->if_epair_mtx) - -#ifdef INVARIANTS -#define EPAIR_REFCOUNT_INIT(r, v) refcount_init((r), (v)) -#define EPAIR_REFCOUNT_AQUIRE(r) refcount_acquire((r)) -#define EPAIR_REFCOUNT_RELEASE(r) refcount_release((r)) -#define EPAIR_REFCOUNT_ASSERT(a, p) KASSERT(a, p) -#else -#define EPAIR_REFCOUNT_INIT(r, v) -#define EPAIR_REFCOUNT_AQUIRE(r) -#define EPAIR_REFCOUNT_RELEASE(r) -#define EPAIR_REFCOUNT_ASSERT(a, p) -#endif - -static MALLOC_DEFINE(M_EPAIR, epairname, - "Pair of virtual cross-over connected Ethernet-like interfaces"); - -VNET_DEFINE_STATIC(struct if_clone *, epair_cloner); -#define V_epair_cloner VNET(epair_cloner) - -/* - * DPCPU area and functions. - */ -struct epair_dpcpu { - struct mtx if_epair_mtx; /* Per-CPU locking. */ - int epair_drv_flags; /* Per-CPU ``hw'' drv flags. */ - struct eid_list epair_ifp_drain_list; /* Per-CPU list of ifps with - * data in the ifq. */ -}; -DPCPU_DEFINE(struct epair_dpcpu, epair_dpcpu); - static void epair_clear_mbuf(struct mbuf *m) { @@ -209,313 +119,179 @@ epair_clear_mbuf(struct mbuf *m) } static void -epair_dpcpu_init(void) +epair_if_input(struct epair_softc *sc, int ridx) { - struct epair_dpcpu *epair_dpcpu; - struct eid_list *s; - u_int cpuid; - - CPU_FOREACH(cpuid) { - epair_dpcpu = DPCPU_ID_PTR(cpuid, epair_dpcpu); - - /* Initialize per-cpu lock. */ - EPAIR_LOCK_INIT(epair_dpcpu); - - /* Driver flags are per-cpu as are our netisr "hw" queues. */ - epair_dpcpu->epair_drv_flags = 0; - - /* - * Initialize per-cpu drain list. - * Manually do what STAILQ_HEAD_INITIALIZER would do. - */ - s = &epair_dpcpu->epair_ifp_drain_list; - s->stqh_first = NULL; - s->stqh_last = &s->stqh_first; - } -} + struct epoch_tracker et; + struct ifnet *ifp; + struct mbuf *m; -static void -epair_dpcpu_detach(void) -{ - struct epair_dpcpu *epair_dpcpu; - u_int cpuid; + ifp = sc->ifp; + NET_EPOCH_ENTER(et); + do { + m = buf_ring_dequeue_sc(sc->rxring[ridx]); + if (m == NULL) + break; - CPU_FOREACH(cpuid) { - epair_dpcpu = DPCPU_ID_PTR(cpuid, epair_dpcpu); + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); + (*ifp->if_input)(ifp, m); - /* Destroy per-cpu lock. */ - EPAIR_LOCK_DESTROY(epair_dpcpu); - } + } while (1); + NET_EPOCH_EXIT(et); } -/* - * Helper functions. - */ -static u_int -cpuid_from_ifp(struct ifnet *ifp) +static void +epair_sintr(struct epair_softc *sc) { - struct epair_softc *sc; + int ridx, nidx; - if (ifp == NULL) - return (0); - sc = ifp->if_softc; + if_ref(sc->ifp); + do { + ridx = sc->ridx; + nidx = (ridx == 0) ? 1 : 0; + } while (!atomic_cmpset_int(&sc->ridx, ridx, nidx)); + epair_if_input(sc, ridx); - return (sc->cpuid); + if_rele(sc->ifp); } -/* - * Netisr handler functions. - */ static void -epair_nh_sintr(struct mbuf *m) -{ - struct ifnet *ifp; - struct epair_softc *sc __unused; - - ifp = m->m_pkthdr.rcvif; - (*ifp->if_input)(ifp, m); - sc = ifp->if_softc; - EPAIR_REFCOUNT_RELEASE(&sc->refcount); - EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, - ("%s: ifp=%p sc->refcount not >= 1: %d", - __func__, ifp, sc->refcount)); - DPRINTF("ifp=%p refcount=%u\n", ifp, sc->refcount); -} - -static struct mbuf * -epair_nh_m2cpuid(struct mbuf *m, uintptr_t source, u_int *cpuid) +epair_intr(void *arg) { + struct epair_softc *sc; + uint32_t cpuidx; + + cpuidx = (uintptr_t)arg; + /* If this is a problem, this is a read-mostly situation. */ + EPAIR_LOCK(); + STAILQ_FOREACH(sc, &swi_sc[cpuidx], entry) { + /* Do this lockless. */ + if (buf_ring_empty(sc->rxring[sc->ridx])) + continue; + epair_sintr(sc); + } + EPAIR_UNLOCK(); - *cpuid = cpuid_from_ifp(m->m_pkthdr.rcvif); - - return (m); + return; } -static void -epair_nh_drainedcpu(u_int cpuid) +static int +epair_menq(struct mbuf *m, struct epair_softc *osc) { - struct epair_dpcpu *epair_dpcpu; - struct epair_ifp_drain *elm, *tvar; - struct ifnet *ifp; + struct ifnet *ifp, *oifp; + int len, ret; + int ridx; + short mflags; + bool was_empty; - epair_dpcpu = DPCPU_ID_PTR(cpuid, epair_dpcpu); - EPAIR_LOCK(epair_dpcpu); /* - * Assume our "hw" queue and possibly ifq will be emptied - * again. In case we will overflow the "hw" queue while - * draining, epair_start_locked will set IFF_DRV_OACTIVE - * again and we will stop and return. + * I know this looks weird. We pass the "other sc" as we need that one + * and can get both ifps from it as well. */ - STAILQ_FOREACH_SAFE(elm, &epair_dpcpu->epair_ifp_drain_list, - ifp_next, tvar) { - ifp = elm->ifp; - epair_dpcpu->epair_drv_flags &= ~IFF_DRV_OACTIVE; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - epair_start_locked(ifp); - - IFQ_LOCK(&ifp->if_snd); - if (IFQ_IS_EMPTY(&ifp->if_snd)) { - struct epair_softc *sc __unused; - - STAILQ_REMOVE(&epair_dpcpu->epair_ifp_drain_list, - elm, epair_ifp_drain, ifp_next); - /* The cached ifp goes off the list. */ - sc = ifp->if_softc; - EPAIR_REFCOUNT_RELEASE(&sc->refcount); - EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, - ("%s: ifp=%p sc->refcount not >= 1: %d", - __func__, ifp, sc->refcount)); - free(elm, M_EPAIR); - } - IFQ_UNLOCK(&ifp->if_snd); + oifp = osc->ifp; + ifp = osc->oifp; - if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) != 0) { - /* Our "hw"q overflew again. */ - epair_dpcpu->epair_drv_flags |= IFF_DRV_OACTIVE; - DPRINTF("hw queue length overflow at %u\n", - epair_nh.nh_qlimit); - break; - } - } - EPAIR_UNLOCK(epair_dpcpu); -} + M_ASSERTPKTHDR(m); + epair_clear_mbuf(m); + if_setrcvif(m, oifp); + M_SETFIB(m, oifp->if_fib); -/* - * Network interface (`if') related functions. - */ -static void -epair_remove_ifp_from_draining(struct ifnet *ifp) -{ - struct epair_dpcpu *epair_dpcpu; - struct epair_ifp_drain *elm, *tvar; - u_int cpuid; - - CPU_FOREACH(cpuid) { - epair_dpcpu = DPCPU_ID_PTR(cpuid, epair_dpcpu); - EPAIR_LOCK(epair_dpcpu); - STAILQ_FOREACH_SAFE(elm, &epair_dpcpu->epair_ifp_drain_list, - ifp_next, tvar) { - if (ifp == elm->ifp) { - struct epair_softc *sc __unused; - - STAILQ_REMOVE( - &epair_dpcpu->epair_ifp_drain_list, elm, - epair_ifp_drain, ifp_next); - /* The cached ifp goes off the list. */ - sc = ifp->if_softc; - EPAIR_REFCOUNT_RELEASE(&sc->refcount); - EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, - ("%s: ifp=%p sc->refcount not >= 1: %d", - __func__, ifp, sc->refcount)); - free(elm, M_EPAIR); - } - } - EPAIR_UNLOCK(epair_dpcpu); - } -} + /* Save values as once the mbuf is queued, it's not ours anymore. */ + len = m->m_pkthdr.len; + mflags = m->m_flags; -static int -epair_add_ifp_for_draining(struct ifnet *ifp) -{ - struct epair_dpcpu *epair_dpcpu; - struct epair_softc *sc; - struct epair_ifp_drain *elm = NULL; + MPASS(m->m_nextpkt == NULL); + MPASS((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0); - sc = ifp->if_softc; - epair_dpcpu = DPCPU_ID_PTR(sc->cpuid, epair_dpcpu); - EPAIR_LOCK_ASSERT(epair_dpcpu); - STAILQ_FOREACH(elm, &epair_dpcpu->epair_ifp_drain_list, ifp_next) - if (elm->ifp == ifp) - break; - /* If the ifp is there already, return success. */ - if (elm != NULL) + ridx = atomic_load_int(&osc->ridx); + was_empty = buf_ring_empty(osc->rxring[ridx]); + ret = buf_ring_enqueue(osc->rxring[ridx], m); + if (ret != 0) { + /* Ring is full. */ + m_freem(m); return (0); + } - elm = malloc(sizeof(struct epair_ifp_drain), M_EPAIR, M_NOWAIT|M_ZERO); - if (elm == NULL) - return (ENOMEM); + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + /* + * IFQ_HANDOFF_ADJ/ip_handoff() update statistics, + * but as we bypass all this we have to duplicate + * the logic another time. + */ + if_inc_counter(ifp, IFCOUNTER_OBYTES, len); + if (mflags & (M_BCAST|M_MCAST)) + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); + /* Someone else received the packet. */ + if_inc_counter(oifp, IFCOUNTER_IPACKETS, 1); - elm->ifp = ifp; - /* Add a reference for the ifp pointer on the list. */ - EPAIR_REFCOUNT_AQUIRE(&sc->refcount); - STAILQ_INSERT_TAIL(&epair_dpcpu->epair_ifp_drain_list, elm, ifp_next); + /* Kick the interrupt handler for the first packet. */ + if (was_empty && osc->swi_cookie != NULL) + swi_sched(osc->swi_cookie, 0); return (0); } static void -epair_start_locked(struct ifnet *ifp) +epair_start(struct ifnet *ifp) { - struct epair_dpcpu *epair_dpcpu; struct mbuf *m; struct epair_softc *sc; struct ifnet *oifp; - int error; - - DPRINTF("ifp=%p\n", ifp); - sc = ifp->if_softc; - epair_dpcpu = DPCPU_ID_PTR(sc->cpuid, epair_dpcpu); - EPAIR_LOCK_ASSERT(epair_dpcpu); - - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - return; - if ((ifp->if_flags & IFF_UP) == 0) - return; /* * We get packets here from ether_output via if_handoff() * and need to put them into the input queue of the oifp - * and call oifp->if_input() via netisr/epair_sintr(). + * and will put the packet into the receive-queue (rxq) of the + * other interface (oifp) of our pair. */ + sc = ifp->if_softc; oifp = sc->oifp; sc = oifp->if_softc; for (;;) { IFQ_DEQUEUE(&ifp->if_snd, m); if (m == NULL) break; + M_ASSERTPKTHDR(m); BPF_MTAP(ifp, m); - /* - * In case the outgoing interface is not usable, - * drop the packet. - */ - if ((oifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || - (oifp->if_flags & IFF_UP) ==0) { - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + /* In case either interface is not usable drop the packet. */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + (ifp->if_flags & IFF_UP) == 0 || + (oifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + (oifp->if_flags & IFF_UP) == 0) { m_freem(m); continue; } - DPRINTF("packet %s -> %s\n", ifp->if_xname, oifp->if_xname); - - epair_clear_mbuf(m); - - /* - * Add a reference so the interface cannot go while the - * packet is in transit as we rely on rcvif to stay valid. - */ - EPAIR_REFCOUNT_AQUIRE(&sc->refcount); - m->m_pkthdr.rcvif = oifp; - CURVNET_SET_QUIET(oifp->if_vnet); - error = netisr_queue(NETISR_EPAIR, m); - CURVNET_RESTORE(); - if (!error) { - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); - /* Someone else received the packet. */ - if_inc_counter(oifp, IFCOUNTER_IPACKETS, 1); - } else { - /* The packet was freed already. */ - epair_dpcpu->epair_drv_flags |= IFF_DRV_OACTIVE; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - (void) epair_add_ifp_for_draining(ifp); - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - EPAIR_REFCOUNT_RELEASE(&sc->refcount); - EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, - ("%s: ifp=%p sc->refcount not >= 1: %d", - __func__, oifp, sc->refcount)); - } - } -} -static void -epair_start(struct ifnet *ifp) -{ - struct epair_dpcpu *epair_dpcpu; - - epair_dpcpu = DPCPU_ID_PTR(cpuid_from_ifp(ifp), epair_dpcpu); - EPAIR_LOCK(epair_dpcpu); - epair_start_locked(ifp); - EPAIR_UNLOCK(epair_dpcpu); + (void) epair_menq(m, sc); + } } static int -epair_transmit_locked(struct ifnet *ifp, struct mbuf *m) +epair_transmit(struct ifnet *ifp, struct mbuf *m) { - struct epair_dpcpu *epair_dpcpu; struct epair_softc *sc; struct ifnet *oifp; int error, len; short mflags; - DPRINTF("ifp=%p m=%p\n", ifp, m); - sc = ifp->if_softc; - epair_dpcpu = DPCPU_ID_PTR(sc->cpuid, epair_dpcpu); - EPAIR_LOCK_ASSERT(epair_dpcpu); - if (m == NULL) return (0); + M_ASSERTPKTHDR(m); /* * We are not going to use the interface en/dequeue mechanism * on the TX side. We are called from ether_output_frame() - * and will put the packet into the incoming queue of the - * other interface of our pair via the netsir. + * and will put the packet into the receive-queue (rxq) of the + * other interface (oifp) of our pair. */ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (ENXIO); } if ((ifp->if_flags & IFF_UP) == 0) { m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (ENETDOWN); } @@ -525,16 +301,16 @@ epair_transmit_locked(struct ifnet *ifp, struct mbuf *m) * In case the outgoing interface is not usable, * drop the packet. */ + sc = ifp->if_softc; oifp = sc->oifp; if ((oifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || - (oifp->if_flags & IFF_UP) ==0) { + (oifp->if_flags & IFF_UP) == 0) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); m_freem(m); return (0); } len = m->m_pkthdr.len; mflags = m->m_flags; - DPRINTF("packet %s -> %s\n", ifp->if_xname, oifp->if_xname); #ifdef ALTQ /* Support ALTQ via the classic if_start() path. */ @@ -548,99 +324,17 @@ epair_transmit_locked(struct ifnet *ifp, struct mbuf *m) if_inc_counter(ifp, IFCOUNTER_OBYTES, len); if (mflags & (M_BCAST|M_MCAST)) if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); - - if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) - epair_start_locked(ifp); - else - (void)epair_add_ifp_for_draining(ifp); + epair_start(ifp); } return (error); } IF_UNLOCK(&ifp->if_snd); #endif - if ((epair_dpcpu->epair_drv_flags & IFF_DRV_OACTIVE) != 0) { - /* - * Our hardware queue is full, try to fall back - * queuing to the ifq but do not call ifp->if_start. - * Either we are lucky or the packet is gone. - */ - IFQ_ENQUEUE(&ifp->if_snd, m, error); - if (!error) - (void)epair_add_ifp_for_draining(ifp); - return (error); - } - - epair_clear_mbuf(m); - - sc = oifp->if_softc; - /* - * Add a reference so the interface cannot go while the - * packet is in transit as we rely on rcvif to stay valid. - */ - EPAIR_REFCOUNT_AQUIRE(&sc->refcount); - m->m_pkthdr.rcvif = oifp; - CURVNET_SET_QUIET(oifp->if_vnet); - error = netisr_queue(NETISR_EPAIR, m); - CURVNET_RESTORE(); - if (!error) { - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); - /* - * IFQ_HANDOFF_ADJ/ip_handoff() update statistics, - * but as we bypass all this we have to duplicate - * the logic another time. - */ - if_inc_counter(ifp, IFCOUNTER_OBYTES, len); - if (mflags & (M_BCAST|M_MCAST)) - if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); - /* Someone else received the packet. */ - if_inc_counter(oifp, IFCOUNTER_IPACKETS, 1); - } else { - /* The packet was freed already. */ - epair_dpcpu->epair_drv_flags |= IFF_DRV_OACTIVE; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - EPAIR_REFCOUNT_RELEASE(&sc->refcount); - EPAIR_REFCOUNT_ASSERT((int)sc->refcount >= 1, - ("%s: ifp=%p sc->refcount not >= 1: %d", - __func__, oifp, sc->refcount)); - } - - return (error); -} - -static int -epair_transmit(struct ifnet *ifp, struct mbuf *m) -{ - struct epair_dpcpu *epair_dpcpu; - int error; - - epair_dpcpu = DPCPU_ID_PTR(cpuid_from_ifp(ifp), epair_dpcpu); - EPAIR_LOCK(epair_dpcpu); - error = epair_transmit_locked(ifp, m); - EPAIR_UNLOCK(epair_dpcpu); + error = epair_menq(m, oifp->if_softc); return (error); } -static void -epair_qflush(struct ifnet *ifp) -{ - struct epair_softc *sc; - - sc = ifp->if_softc; - KASSERT(sc != NULL, ("%s: ifp=%p, epair_softc gone? sc=%p\n", - __func__, ifp, sc)); - /* - * Remove this ifp from all backpointer lists. The interface will not - * usable for flushing anyway nor should it have anything to flush - * after if_qflush(). - */ - epair_remove_ifp_from_draining(ifp); - - if (sc->if_qflush) - sc->if_qflush(ifp); -} - static int epair_media_change(struct ifnet *ifp __unused) { @@ -708,8 +402,6 @@ epair_clone_match(struct if_clone *ifc, const char *name) { const char *cp; - DPRINTF("name='%s'\n", name); - /* * Our base name is epair. * Our interfaces will be named epair[ab]. @@ -798,16 +490,16 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) /* Allocate memory for both [ab] interfaces */ sca = malloc(sizeof(struct epair_softc), M_EPAIR, M_WAITOK | M_ZERO); - EPAIR_REFCOUNT_INIT(&sca->refcount, 1); sca->ifp = if_alloc(IFT_ETHER); if (sca->ifp == NULL) { free(sca, M_EPAIR); ifc_free_unit(ifc, unit); return (ENOSPC); } + sca->rxring[0] = buf_ring_alloc(RXRSIZE, M_EPAIR, M_WAITOK,NULL); + sca->rxring[1] = buf_ring_alloc(RXRSIZE, M_EPAIR, M_WAITOK, NULL); scb = malloc(sizeof(struct epair_softc), M_EPAIR, M_WAITOK | M_ZERO); - EPAIR_REFCOUNT_INIT(&scb->refcount, 1); scb->ifp = if_alloc(IFT_ETHER); if (scb->ifp == NULL) { free(scb, M_EPAIR); @@ -816,6 +508,8 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) ifc_free_unit(ifc, unit); return (ENOSPC); } + scb->rxring[0] = buf_ring_alloc(RXRSIZE, M_EPAIR, M_WAITOK, NULL); + scb->rxring[1] = buf_ring_alloc(RXRSIZE, M_EPAIR, M_WAITOK, NULL); /* * Cross-reference the interfaces so we will be able to free both. @@ -823,16 +517,49 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) sca->oifp = scb->ifp; scb->oifp = sca->ifp; - /* - * Calculate the cpuid for netisr queueing based on the - * ifIndex of the interfaces. As long as we cannot configure - * this or use cpuset information easily we cannot guarantee - * cache locality but we can at least allow parallelism. - */ - sca->cpuid = - netisr_get_cpuid(sca->ifp->if_index); - scb->cpuid = - netisr_get_cpuid(scb->ifp->if_index); + EPAIR_LOCK(); +#ifdef SMP + /* Get an approximate distribution. */ + hash = next_index % mp_ncpus; +#else + hash = 0; +#endif + if (swi_cookie[hash] == NULL) { + void *cookie; + + EPAIR_UNLOCK(); + error = swi_add(NULL, epairname, + epair_intr, (void *)(uintptr_t)hash, + SWI_NET, INTR_MPSAFE, &cookie); + if (error) { + buf_ring_free(scb->rxring[0], M_EPAIR); + buf_ring_free(scb->rxring[1], M_EPAIR); + if_free(scb->ifp); + free(scb, M_EPAIR); + buf_ring_free(sca->rxring[0], M_EPAIR); + buf_ring_free(sca->rxring[1], M_EPAIR); + if_free(sca->ifp); + free(sca, M_EPAIR); + ifc_free_unit(ifc, unit); + return (ENOSPC); + } + EPAIR_LOCK(); + /* Recheck under lock even though a race is very unlikely. */ + if (swi_cookie[hash] == NULL) { + swi_cookie[hash] = cookie; + } else { + EPAIR_UNLOCK(); + (void) swi_remove(cookie); + EPAIR_LOCK(); + } + } + sca->cpuidx = hash; + STAILQ_INSERT_TAIL(&swi_sc[hash], sca, entry); + sca->swi_cookie = swi_cookie[hash]; + scb->cpuidx = hash; + STAILQ_INSERT_TAIL(&swi_sc[hash], scb, entry); + scb->swi_cookie = swi_cookie[hash]; + EPAIR_UNLOCK(); /* Initialise pseudo media types. */ ifmedia_init(&sca->media, 0, epair_media_change, epair_media_status); @@ -849,6 +576,7 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) ifp->if_dname = epairname; ifp->if_dunit = unit; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_flags |= IFF_KNOWSEPOCH; ifp->if_capabilities = IFCAP_VLAN_MTU; ifp->if_capenable = IFCAP_VLAN_MTU; ifp->if_start = epair_start; @@ -869,12 +597,14 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) if (hostid == 0) arc4rand(&hostid, sizeof(hostid), 0); + EPAIR_LOCK(); if (ifp->if_index > next_index) next_index = ifp->if_index; else next_index++; key[0] = (uint32_t)next_index; + EPAIR_UNLOCK(); key[1] = (uint32_t)(hostid & 0xffffffff); key[2] = (uint32_t)((hostid >> 32) & 0xfffffffff); hash = jenkins_hash32(key, 3, 0); @@ -883,10 +613,8 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) memcpy(&eaddr[1], &hash, 4); eaddr[5] = 0x0a; ether_ifattach(ifp, eaddr); - sca->if_qflush = ifp->if_qflush; - ifp->if_qflush = epair_qflush; - ifp->if_transmit = epair_transmit; ifp->if_baudrate = IF_Gbps(10); /* arbitrary maximum */ + ifp->if_transmit = epair_transmit; /* Swap the name and finish initialization of interface b. */ *dp = 'b'; @@ -911,27 +639,40 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) strlcpy(name, scb->ifp->if_xname, len); epair_clone_add(ifc, scb); - scb->if_qflush = ifp->if_qflush; - ifp->if_qflush = epair_qflush; - ifp->if_transmit = epair_transmit; ifp->if_baudrate = IF_Gbps(10); /* arbitrary maximum */ + ifp->if_transmit = epair_transmit; /* * Restore name to a as the ifp for this will go into the * cloner list for the initial call. */ strlcpy(name, sca->ifp->if_xname, len); - DPRINTF("name='%s/%db' created sca=%p scb=%p\n", name, unit, sca, scb); /* Tell the world, that we are ready to rock. */ sca->ifp->if_drv_flags |= IFF_DRV_RUNNING; - scb->ifp->if_drv_flags |= IFF_DRV_RUNNING; if_link_state_change(sca->ifp, LINK_STATE_UP); + scb->ifp->if_drv_flags |= IFF_DRV_RUNNING; if_link_state_change(scb->ifp, LINK_STATE_UP); return (0); } +static void +epair_drain_rings(struct epair_softc *sc) +{ + int ridx; + struct mbuf *m; + + for (ridx = 0; ridx < 2; ridx++) { + do { + m = buf_ring_dequeue_sc(sc->rxring[ridx]); + if (m == NULL) + break; + m_freem(m); + } while (1); + } +} + static int epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) { @@ -939,8 +680,6 @@ epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) struct epair_softc *sca, *scb; int unit, error; - DPRINTF("ifp=%p\n", ifp); - /* * In case we called into if_clone_destroyif() ourselves * again to remove the second interface, the softc will be @@ -954,27 +693,26 @@ epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) oifp = sca->oifp; scb = oifp->if_softc; - DPRINTF("ifp=%p oifp=%p\n", ifp, oifp); + /* Frist get the interfaces down and detached. */ if_link_state_change(ifp, LINK_STATE_DOWN); - if_link_state_change(oifp, LINK_STATE_DOWN); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_link_state_change(oifp, LINK_STATE_DOWN); oifp->if_drv_flags &= ~IFF_DRV_RUNNING; - /* - * Get rid of our second half. As the other of the two - * interfaces may reside in a different vnet, we need to - * switch before freeing them. - */ - CURVNET_SET_QUIET(oifp->if_vnet); + ether_ifdetach(ifp); ether_ifdetach(oifp); - /* - * Wait for all packets to be dispatched to if_input. - * The numbers can only go down as the interface is - * detached so there is no need to use atomics. - */ - DPRINTF("scb refcnt=%u\n", scb->refcount); - EPAIR_REFCOUNT_ASSERT(scb->refcount == 1, - ("%s: ifp=%p scb->refcount!=1: %d", __func__, oifp, scb->refcount)); + + /* Second stop interrupt handler. */ + EPAIR_LOCK(); + STAILQ_REMOVE(&swi_sc[sca->cpuidx], sca, epair_softc, entry); + STAILQ_REMOVE(&swi_sc[scb->cpuidx], scb, epair_softc, entry); + EPAIR_UNLOCK(); + sca->swi_cookie = NULL; + scb->swi_cookie = NULL; + + /* Third free any queued packets and all the resources. */ + CURVNET_SET_QUIET(oifp->if_vnet); + epair_drain_rings(scb); oifp->if_softc = NULL; error = if_clone_destroyif(ifc, oifp); if (error) @@ -982,19 +720,19 @@ epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) __func__, error); if_free(oifp); ifmedia_removeall(&scb->media); + buf_ring_free(scb->rxring[0], M_EPAIR); *** 104 LINES SKIPPED *** From nobody Tue Nov 23 16:23:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 621351889622; Tue, 23 Nov 2021 16:23:19 +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 4Hz8ZZ73Zrz3jK1; Tue, 23 Nov 2021 16:23:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 3B43124707; Tue, 23 Nov 2021 16:23:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <0d0a6a77-b2d1-d0c2-f0de-e5c97307e140@FreeBSD.org> Date: Tue, 23 Nov 2021 08:23:16 -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.14; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync Content-Language: en-US To: =?UTF-8?Q?Corvin_K=c3=b6hne?= , Emmanuel Vadot , "src-committers@FreeBSD.org" , "dev-commits-src-all@FreeBSD.org" , "dev-commits-src-main@FreeBSD.org" References: <202111221530.1AMFUUJn079855@gitrepo.freebsd.org> <428e410d-33c1-7ff8-9689-41943db3d9c3@FreeBSD.org> <084d5b5845554221901ce4902fb878d1@beckhoff.com> From: John Baldwin In-Reply-To: <084d5b5845554221901ce4902fb878d1@beckhoff.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637684599; h=from:from:reply-to:subject: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=WS5yUPaQHcFfFZH5tb9WIQZfKuUA/f1JE0NAPVWOWME=; b=FZVD2el4QFMYFCx1TxEMZ77a2Tio7FdYho9M4IPXtXc0uvDTeTtobjY1Y/irTDNydnt9g0 5He5rzHRp7PfJYQ7wiKA3Ei0wC6cXHf3hOnjUOQs4i1xT+JQqrXJyRIrigMmBEvRE2Abpi ZGhFCXuyH8tGXxPTjaf4cDFxK39If3CSpT3tQJYOvViBC9/f56OQiOVlFlOEXMr06b9ph4 DFPKZATjucRf+Mq/wcBX7HipSju9WHr4rr5srbdAhJ7W/6I7O1NNoPMqXvYu8xiFh7xv3j 3ikNlsnz6cFLCz1SoeIu3kN/0xfk1bxiIFdm5wTGS/KEzHMqVssj1QRHUUutFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637684599; a=rsa-sha256; cv=none; b=e8PcmFlYueMusEpQ4KqPS8FPvSFZhkMGDUIbRH+eHGZjwkEiGlfXnb8FWgrFJPSruGZnV+ /hieAu51XlYjCmvREBhLuhor2I6RO1xXz0R1QhleVbQQemq1Om04c5u0R8zJ7i/nXV4sWb RTQ4m8WP/rnVJ6L6ZymGuku1uz+YfLrfcZ3xGHCvUDQZ2yQ0RtTwWjMgNT0hyCIqrX0Jlv Hpg1HEfRjntVdWSDghCfT4czhUKsULGfrXjvqlm1A/SezKqVpiymNcA1Y7cn8S7Q1tC1fg 8bI9fHucdgXQ+Y0C+KkLMa0iLbN+ksuxioZDW+rk9KFJzcpRok+O1gHznKc5Mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 11/23/21 1:33 AM, Corvin Köhne wrote: > Hi John, > > sry, I didn't see your patch. Seems like your patch is very similar to > mine. However, your patch goes a bit further. It initializes the > virtual cmd register with it's physical value and always enables > bus mastering. Are you still interested in working on your patch? > Otherwise, I'm going to proceed your work. Would you be able to test if that change works in your environment? I was never able to confirm that it fixed the bug I was trying to address, but I do think it is more correct. The busmastering thing is to work around Linux clearing that flag on shutdown of a guest, and I wanted to preserve other bits in the command register that weren't related to BARs, etc. > Best regards > Corvin > > Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff > Registered office: Verl, Germany | Register court: Guetersloh HRA 7075 > > > -----Original Message----- > From: owner-src-committers@freebsd.org On Behalf Of John Baldwin > Sent: Monday, November 22, 2021 5:39 PM > To: Emmanuel Vadot ; src-committers@FreeBSD.org; dev-commits-src-all@FreeBSD.org; dev-commits-src-main@FreeBSD.org > Subject: Re: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync > > CAUTION: External Email!! > On 11/22/21 7:30 AM, Emmanuel Vadot wrote: >> The branch main has been updated by manu: >> >> URL: https://nospamproxywebp.beckhoff.com/enqsig/link?id=BCAAAABGd7m3lfMOLOIhx3uNR_1Qav4Ffx8-jQB0torD82ts_KYAAAB6IpisxfWh8bMkMeclEjKU0Ch6nC1L2luIJvUt5lrcBed-KA1fjaCNX4hB0giwbfTH9lmXLBNaYvWEJzBG4zMolRebrrQofyigX9J_GDpKhg70oqrVfjGqvjwx_ZUj9P2msAudMe2Cu6_E-1duWq9fZ0eBY0l1NvoUIIA73nJ1hrbfy1HQ0oahtUKxPE-jI2MlQiFome_pmEEyaQ3J3SkSwgFrM8YO0 >> >> commit 2eb2079554f4d54c4283410b4ee1aca549b29616 >> Author: Corvin Köhne >> AuthorDate: 2021-11-22 15:26:03 +0000 >> Commit: Emmanuel Vadot >> CommitDate: 2021-11-22 15:26:03 +0000 >> >> bhyve: keep physical and virtual COMMAND reg in sync >> >> On startup all virtual BARs are registered. >> Additionally, the encoding bit in the virtual cmd register is set. >> After that, the passthru emulation overwrites the virtual cmd register with >> the physical one. >> This could lead to a mismatch between registered BARs and the encoding >> bits in the cmd register. >> Instead of writing the physical to the virtual cmd register, >> write the virtual to the physical cmd register to solve this issue. >> >> Reviewed by: markj >> Differential Revision: https://nospamproxywebp.beckhoff.com/enqsig/link?id=BCAAAABGd7m3lfMOLOIhx3uNR_1Qav4Ffx8-jQB0torD82ts_HgAAABQYw97NGT4SSj0arxOT2yuQ75rteUz51oREvqlD-GZQnqCZI_9pzRsWsM_TIwpmksuUKgVIfsP9_sN_SFiCJKgMBnSZAbbozPmCVLjgVbdggdf0J1VCBMbgFlXVJZq0LGJOUYhyN9NsWQY5F9sqBgUDVfJaTe3qOo1 >> Sponsored by: Beckhoff Automation GmbH & Co. KG > > Humm, I wonder if my older patch that tries to handle the command register > more deterministically might have handled this. The patch tried to fix an > open bug where you can't use a XHCI controller via passthru after you have > rebooted a Linux guest. It makes this write here conditional: > > https://nospamproxywebp.beckhoff.com/enqsig/link?id=BCAAAABGd7m3lfMOLOIhx3uNR_1Qav4Ffx8-jQB0torD82ts_HgAAAAU8FxyU1LiUJoRKnyrNSRv-j2bTBQqOJi-XQmELgyevvpEPUyKQXd3ARd_uz1vH5Vvuv314xMOFWvGRH_kkVCSmv8reOEC1AS1MBzskFbKQ_hHSbMiI88hnj9-jJrJaZT3B6FG9MHp-bRv8QyGOSI19iLeQnlutkY1 > > -- > John Baldwin > -- John Baldwin From nobody Tue Nov 23 17:48:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7DCB4188E319; Tue, 23 Nov 2021 17:48:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzBSW1s6hz4gwN; Tue, 23 Nov 2021 17:48:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19F301A97E; Tue, 23 Nov 2021 17:48: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 1ANHmB55095349; Tue, 23 Nov 2021 17:48:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANHmBm1095348; Tue, 23 Nov 2021 17:48:11 GMT (envelope-from git) Date: Tue, 23 Nov 2021 17:48:11 GMT Message-Id: <202111231748.1ANHmBm1095348@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: c36f90417b73 - main - pf: remove unused variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c36f90417b734e56ef938cc2d19601001c709f40 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637689691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I60F4LmoZqV6jylILxtNTFFYHo9P9Y6pI3QYV/PvuPA=; b=tgAKtvieQwGztTM5H1ZgyKXU9efI+9/jmMS3zHSsIU0D3ePPgQaIOvR/krL5JysACjH145 cDojThxXlDRtdL4DcMlTN9bkwtEu4I8Pf1FAnum7CeV+iBe9DP8yqI2LD8CFX4ca9df30+ CuoYIdZuf/SLUslFT2YFkyCxRQ1+5SsFanaFiPGwg1iRp77lEkQ7xJlyhi7NrgFrBiW8J7 zMikQ5gCs2Cyu+6kiXkofqErTyMzsTLOr32lyxgvs/47JkGvGhv+7M6YyFKgUbb4zi+5Nu gzqsZ1IDXI/RbpMt21lgxf7g49UDwSpva7Lh4fAodl/BWxIGDXH7HXrp+g4IpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637689691; a=rsa-sha256; cv=none; b=gfF4tS4UOZRaBd68K/6zU0fKO6CHrp0hSBJ9XJsLZTDOHMmfgBvrwmhC0hwBRAchyiVzSZ 24P8tDRZdD5b9z/7PlzqUYjzWAp12ZL/wuHXWkBpKNLyxgzcMXgnxmgFJBnSuyZQMTPdOX tg15lMhLh8stP7WNlHXaS0ibA7DWmpAwVTgCjlF+FESzfsw3fMhWnYJUTW83pI+ILmx32B S4Pm1MCmOBtHQkUg8Z9vOhOJduO/raxTq36XbGtLDte7hKTZzbDT9eWyvLZclthJQYmUDw veRm0mln1ZBfMA461arHVIypGlFPE9u5CY/uZGBk9yGP1xppFtYFfkUVzgKOPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c36f90417b734e56ef938cc2d19601001c709f40 commit c36f90417b734e56ef938cc2d19601001c709f40 Author: Kristof Provost AuthorDate: 2021-11-22 19:30:22 +0000 Commit: Kristof Provost CommitDate: 2021-11-23 15:44:37 +0000 pf: remove unused variables No functional change intended. Reviewed by: glebius MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33085 --- sys/netpfil/pf/pf.c | 3 --- sys/netpfil/pf/pf_norm.c | 2 -- 2 files changed, 5 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 8891ac75330a..1ddb61836e2e 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4946,7 +4946,6 @@ pf_test_state_tcp(struct pf_kstate **state, int direction, struct pfi_kkif *kif, int copyback = 0; int action; struct pf_state_peer *src, *dst; - struct pf_state_key *sk; bzero(&key, sizeof(key)); key.af = pd->af; @@ -4973,8 +4972,6 @@ pf_test_state_tcp(struct pf_kstate **state, int direction, struct pfi_kkif *kif, dst = &(*state)->src; } - sk = (*state)->key[pd->didx]; - if ((action = pf_synproxy(pd, state, reason)) != PF_PASS) return (action); diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 8e14fa35bf59..5827fb0b093b 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -1031,7 +1031,6 @@ pf_normalize_ip(struct mbuf **m0, int dir, struct pfi_kkif *kif, u_short *reason u_int16_t fragoff = (ntohs(h->ip_off) & IP_OFFMASK) << 3; u_int16_t max; int ip_len; - int ip_off; int tag = -1; int verdict; @@ -1104,7 +1103,6 @@ pf_normalize_ip(struct mbuf **m0, int dir, struct pfi_kkif *kif, u_short *reason } ip_len = ntohs(h->ip_len) - hlen; - ip_off = (ntohs(h->ip_off) & IP_OFFMASK) << 3; /* All fragments are 8 byte aligned */ if (mff && (ip_len & 0x7)) { From nobody Tue Nov 23 17:48:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E6070188E1AC; Tue, 23 Nov 2021 17:48: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 4HzBSX393Fz4hBh; Tue, 23 Nov 2021 17:48:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40FDD1A97F; Tue, 23 Nov 2021 17:48: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 1ANHmC5h095373; Tue, 23 Nov 2021 17:48:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANHmCgp095372; Tue, 23 Nov 2021 17:48:12 GMT (envelope-from git) Date: Tue, 23 Nov 2021 17:48:12 GMT Message-Id: <202111231748.1ANHmCgp095372@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: 18d04cd2d42c - main - pf: align IPv6 dummynet handling with IPv4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 18d04cd2d42c16209c8f615bb9735dded328915b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637689692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a9gnag3k41/VZOUjwSY7j9p8XxMPoR0osiMF+F3lzRE=; b=LvaG2QYN8S75l34P7RQNS8nkDagcHg/f4sIpqtMYuVtOGTu0xKaddbmvTWzBQYKkDrOJfZ z03nAbFhzE1e7pp3CTibZfeuS/YvQCloTzbI78M3uWPvuWFlIlkk6wzeERuCqjCvrhw1M9 70EBMFmYMm9ZukvWi3FBzG6/e0TcmRAt+Y+UB06GkXH6ByF0M3ng1FPp6iE9VenRnQnis1 +7dc0YI0f/lKCAKrNyvYhGsL9yV8OKATJbYjGiWS49+N9GnVVLPh2uG84bORnmAwI3/b/U IBHIuNGuu2VR3h4AsyMaFGlXcuoTsMYIYFCgLJYrJ+qjPQ5O0vNQAScpogNIOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637689692; a=rsa-sha256; cv=none; b=kK/L0jegZ5SgNQQefAcyBCncQCx7EBpJubcNg59oa/LfA2yys41TUvXgANdbBgU60Yv2Bx HGVoUE35aLUdabPOMOqNDz2Zt+/077o6b1pwqJNU9atPxZ+PF/jO2RpE5vyS6M7UU1ExTK ZbYj6cWoeoPvFFyGzs9fZBU4T88T+lLBha8gqfJXLNBcDbOFP2Op6CGOdPEvuu2fbqVVSD UpDOMDLASNtYTXUvhSZEZ0pNbnskKhxKTCAYB+SE68AHrpzrQSPYVEpSImIcfhcyFKm/RH OHBKYNdlCowmBJRztQ7Tn1LNZrOj++QDBTNHzVWmi798Pc0aBHer9ACOU15E6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=18d04cd2d42c16209c8f615bb9735dded328915b commit 18d04cd2d42c16209c8f615bb9735dded328915b Author: Kristof Provost AuthorDate: 2021-11-22 20:28:10 +0000 Commit: Kristof Provost CommitDate: 2021-11-23 15:46:15 +0000 pf: align IPv6 dummynet handling with IPv4 In e5c4987e3f we fixed issues with nat and dummynet, but only changed the IPv4 code. Make the same change for IPv6 as well. Reviewed by: glebius MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33086 --- sys/netpfil/pf/pf.c | 87 ++++++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 1ddb61836e2e..34fa7918d697 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6873,6 +6873,7 @@ done: if (ip_dn_io_ptr == NULL) { m_freem(*m0); *m0 = NULL; + action = PF_DROP; REASON_SET(&reason, PFRES_MEMORY); } else { struct ip_fw_args dnflow; @@ -6951,6 +6952,13 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb } pd.pf_mtag->flags |= PF_PACKET_LOOPED; m_tag_delete(m, ipfwtag); + if (rr->info & IPFW_IS_DUMMYNET) { + /* Dummynet re-injects packets after they've + * completed their delay. We've already + * processed them, so pass unconditionally. */ + PF_RULES_RUNLOCK(); + return (PF_PASS); + } } } else if (pf_normalize_ip6(m0, dir, kif, &reason, &pd) != PF_PASS) { action = PF_DROP; @@ -7211,47 +7219,6 @@ done: } #endif /* ALTQ */ - if (s && (s->dnpipe || s->dnrpipe)) { - pd.act.dnpipe = s->dnpipe; - pd.act.dnrpipe = s->dnrpipe; - pd.act.flags = s->state_flags; - } else { - pd.act.dnpipe = r->dnpipe; - pd.act.dnrpipe = r->dnrpipe; - pd.act.flags = r->free_flags; - } - if ((pd.act.dnpipe || pd.act.dnrpipe) && !PACKET_LOOPED(&pd)) { - if (ip_dn_io_ptr == NULL) { - action = PF_DROP; - REASON_SET(&reason, PFRES_MEMORY); - } else { - struct ip_fw_args dnflow; - - if (pd.pf_mtag == NULL && - ((pd.pf_mtag = pf_get_mtag(m)) == NULL)) { - action = PF_DROP; - REASON_SET(&reason, PFRES_MEMORY); - if (s) - PF_STATE_UNLOCK(s); - return (action); - } - - if (pf_pdesc_to_dnflow(dir, &pd, r, s, &dnflow)) { - ip_dn_io_ptr(m0, &dnflow); - - if (*m0 == NULL) { - if (s) - PF_STATE_UNLOCK(s); - return (action); - } else { - /* This is dummynet fast io processing */ - m_tag_delete(*m0, m_tag_first(*m0)); - pd.pf_mtag->flags &= ~PF_PACKET_LOOPED; - } - } - } - } - if (dir == PF_IN && action == PF_PASS && (pd.proto == IPPROTO_TCP || pd.proto == IPPROTO_UDP) && s != NULL && s->nat_rule.ptr != NULL && (s->nat_rule.ptr->action == PF_RDR || @@ -7348,6 +7315,44 @@ done: pf_route6(m0, r, dir, kif->pfik_ifp, s, &pd, inp); return (action); } + /* Dummynet processing. */ + if (s && (s->dnpipe || s->dnrpipe)) { + pd.act.dnpipe = s->dnpipe; + pd.act.dnrpipe = s->dnrpipe; + pd.act.flags = s->state_flags; + } else { + pd.act.dnpipe = r->dnpipe; + pd.act.dnrpipe = r->dnrpipe; + pd.act.flags = r->free_flags; + } + if (pd.act.dnpipe || pd.act.dnrpipe) { + if (ip_dn_io_ptr == NULL) { + m_freem(*m0); + *m0 = NULL; + action = PF_DROP; + REASON_SET(&reason, PFRES_MEMORY); + } else { + struct ip_fw_args dnflow; + + if (pd.pf_mtag == NULL && + ((pd.pf_mtag = pf_get_mtag(m)) == NULL)) { + m_freem(*m0); + *m0 = NULL; + action = PF_DROP; + REASON_SET(&reason, PFRES_MEMORY); + if (s) + PF_STATE_UNLOCK(s); + return (action); + } + + if (pf_pdesc_to_dnflow(dir, &pd, r, s, &dnflow)) { + ip_dn_io_ptr(m0, &dnflow); + + if (*m0 == NULL) + action = PF_DROP; + } + } + } break; } From nobody Tue Nov 23 17:48:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 57EE4188E320; Tue, 23 Nov 2021 17:48:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzBSY4tyyz4h2L; Tue, 23 Nov 2021 17:48:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 658601AE87; Tue, 23 Nov 2021 17:48: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 1ANHmDrg095397; Tue, 23 Nov 2021 17:48:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANHmDpJ095396; Tue, 23 Nov 2021 17:48:13 GMT (envelope-from git) Date: Tue, 23 Nov 2021 17:48:13 GMT Message-Id: <202111231748.1ANHmDpJ095396@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: 90c55481b273 - main - pf: fix netpfil.common.dummynet:pf_nat 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90c55481b2731224f9e3a013bb7957dfa3251ea8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637689693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qx+jFNpupzgYOOGxqmHOQaMXilWJOlNfMFP1W/cqMkA=; b=XLJ/0irjZJwJSxqAi65UQGURkIN1bDgTwLkl6J76uxBosJxV15/Hjl6aLmHjQQxsboiyto Varf3HU17ukzAnz2H9NsWHriZOstXFO+LE9jj3E6bcXr+barfYYTLhICkv5AzTPthRkE81 Rs9yXVcxycURMZfqZf5zEZ7kl/vlh8I8oXdoK5hC7bhZE+eMQN8zE6Qat6TSluSIveFanx 7WuVBBl7NYTBtIOn9geNZuB1j7GNrpJU9gdTB8oA94ol/hUTrbEvOmFa6SfPQwCu78qda6 G2VuTjI+ilD3RwsK9xJYkZnxQVxBytBWX4jfclbEEEr3vpn+nsgHpEojG8+leQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637689693; a=rsa-sha256; cv=none; b=v5EsobIDWW8Z+X/Kk8J1cY75AVAkI2nsY4GGkxyqcxFVOkImrWzRyaPlYThyjwFakt973/ gQQ7W4AUfdSOmMOZLR3DgCOj9paT55y/mKUM1+wfk8QNraouMvX/pGIXygZnjoO+c0sVhA /eOCyFAFHusqjOV2dLUogkvV8S3uGdbJWDpBHUFktnLvMKTeuNbRUGNpo2wQBy62vzg/1H Z4Uq1KCqN0Oo1DiVpcuskDKngbLUhjxGez36mT++nti5ROrD64wtfaaNoOX3EInchizT2z 05+QOCidaup0taBSWen856mbuu7SQBdZgzVKa25SvecGRDEx+F7unz/Yny4q1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=90c55481b2731224f9e3a013bb7957dfa3251ea8 commit 90c55481b2731224f9e3a013bb7957dfa3251ea8 Author: Kristof Provost AuthorDate: 2021-11-22 20:47:18 +0000 Commit: Kristof Provost CommitDate: 2021-11-23 15:46:35 +0000 pf: fix netpfil.common.dummynet:pf_nat test This test failed if ipfw was loaded (as well as pf). pf used the same tag as dummynet to indicate a packet had already gone through dummynet. However, ipfw removes this tag, so pf didn't realise the packet had already gone through dummynet. Introduce a separate flag, in the existing pf mtag rather than re-using the ipfw tag. There were no free flag bits, but PF_TAG_FRAGCACHE is no longer used so its bit can be re-purposed. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33087 --- sys/netpfil/pf/pf.c | 115 ++++++++++++++++++++++++----------------------- sys/netpfil/pf/pf_mtag.h | 2 +- 2 files changed, 60 insertions(+), 57 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 34fa7918d697..837417d6a43d 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6450,13 +6450,25 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * pd.pf_mtag = pf_find_mtag(m); + if (ip_dn_io_ptr != NULL && pd.pf_mtag != NULL && + pd.pf_mtag->flags & PF_TAG_DUMMYNET) { + /* Dummynet re-injects packets after they've + * completed their delay. We've already + * processed them, so pass unconditionally. */ + + /* But only once. We may see the packet multiple times (e.g. + * PFIL_IN/PFIL_OUT). */ + pd.pf_mtag->flags &= ~PF_TAG_DUMMYNET; + + return (PF_PASS); + } + PF_RULES_RLOCK(); - if ((__predict_false(ip_divert_ptr != NULL) || ip_dn_io_ptr != NULL) && + if (__predict_false(ip_divert_ptr != NULL) && ((ipfwtag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL)) != NULL)) { struct ipfw_rule_ref *rr = (struct ipfw_rule_ref *)(ipfwtag+1); - if ((rr->info & IPFW_IS_DIVERT && rr->rulenum == 0) || - (rr->info & IPFW_IS_DUMMYNET)) { + if (rr->info & IPFW_IS_DIVERT && rr->rulenum == 0) { if (pd.pf_mtag == NULL && ((pd.pf_mtag = pf_get_mtag(m)) == NULL)) { action = PF_DROP; @@ -6464,13 +6476,6 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * } pd.pf_mtag->flags |= PF_PACKET_LOOPED; m_tag_delete(m, ipfwtag); - if (rr->info & IPFW_IS_DUMMYNET) { - /* Dummynet re-injects packets after they've - * completed their delay. We've already - * processed them, so pass unconditionally. */ - PF_RULES_RUNLOCK(); - return (PF_PASS); - } } if (pd.pf_mtag && pd.pf_mtag->flags & PF_FASTFWD_OURS_PRESENT) { m->m_flags |= M_FASTFWD_OURS; @@ -6870,19 +6875,29 @@ done: pd.act.flags = r->free_flags; } if (pd.act.dnpipe || pd.act.dnrpipe) { + struct ip_fw_args dnflow; if (ip_dn_io_ptr == NULL) { m_freem(*m0); *m0 = NULL; action = PF_DROP; REASON_SET(&reason, PFRES_MEMORY); - } else { - struct ip_fw_args dnflow; + break; + } - if (pf_pdesc_to_dnflow(dir, &pd, r, s, &dnflow)) { - ip_dn_io_ptr(m0, &dnflow); - if (*m0 == NULL) - action = PF_DROP; - } + if (pd.pf_mtag == NULL && + ((pd.pf_mtag = pf_get_mtag(m)) == NULL)) { + m_freem(*m0); + *m0 = NULL; + action = PF_DROP; + REASON_SET(&reason, PFRES_MEMORY); + break; + } + + if (pf_pdesc_to_dnflow(dir, &pd, r, s, &dnflow)) { + pd.pf_mtag->flags |= PF_TAG_DUMMYNET; + ip_dn_io_ptr(m0, &dnflow); + if (*m0 == NULL) + action = PF_DROP; } } break; @@ -6905,7 +6920,6 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb u_short action, reason = 0, log = 0; struct mbuf *m = *m0, *n = NULL; struct m_tag *mtag; - struct m_tag *ipfwtag; struct ip6_hdr *h = NULL; struct pf_krule *a = NULL, *r = &V_pf_default_rule, *tr, *nr; struct pf_kstate *s = NULL; @@ -6938,29 +6952,19 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb if (m->m_flags & M_SKIP_FIREWALL) return (PF_PASS); + if (ip_dn_io_ptr != NULL && pd.pf_mtag != NULL && + pd.pf_mtag->flags & PF_TAG_DUMMYNET) { + pd.pf_mtag->flags &= ~PF_TAG_DUMMYNET; + /* Dummynet re-injects packets after they've + * completed their delay. We've already + * processed them, so pass unconditionally. */ + return (PF_PASS); + } + PF_RULES_RLOCK(); /* We do IP header normalization and packet reassembly here */ - if (ip_dn_io_ptr != NULL && - ((ipfwtag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL)) != NULL)) { - struct ipfw_rule_ref *rr = (struct ipfw_rule_ref *)(ipfwtag+1); - if (rr->info & IPFW_IS_DUMMYNET) { - if (pd.pf_mtag == NULL && - ((pd.pf_mtag = pf_get_mtag(m)) == NULL)) { - action = PF_DROP; - goto done; - } - pd.pf_mtag->flags |= PF_PACKET_LOOPED; - m_tag_delete(m, ipfwtag); - if (rr->info & IPFW_IS_DUMMYNET) { - /* Dummynet re-injects packets after they've - * completed their delay. We've already - * processed them, so pass unconditionally. */ - PF_RULES_RUNLOCK(); - return (PF_PASS); - } - } - } else if (pf_normalize_ip6(m0, dir, kif, &reason, &pd) != PF_PASS) { + if (pf_normalize_ip6(m0, dir, kif, &reason, &pd) != PF_PASS) { action = PF_DROP; goto done; } @@ -7326,31 +7330,30 @@ done: pd.act.flags = r->free_flags; } if (pd.act.dnpipe || pd.act.dnrpipe) { + struct ip_fw_args dnflow; + if (ip_dn_io_ptr == NULL) { m_freem(*m0); *m0 = NULL; action = PF_DROP; REASON_SET(&reason, PFRES_MEMORY); - } else { - struct ip_fw_args dnflow; - - if (pd.pf_mtag == NULL && - ((pd.pf_mtag = pf_get_mtag(m)) == NULL)) { - m_freem(*m0); - *m0 = NULL; - action = PF_DROP; - REASON_SET(&reason, PFRES_MEMORY); - if (s) - PF_STATE_UNLOCK(s); - return (action); - } + break; + } - if (pf_pdesc_to_dnflow(dir, &pd, r, s, &dnflow)) { - ip_dn_io_ptr(m0, &dnflow); + if (pd.pf_mtag == NULL && + ((pd.pf_mtag = pf_get_mtag(m)) == NULL)) { + m_freem(*m0); + *m0 = NULL; + action = PF_DROP; + REASON_SET(&reason, PFRES_MEMORY); + break; + } - if (*m0 == NULL) - action = PF_DROP; - } + if (pf_pdesc_to_dnflow(dir, &pd, r, s, &dnflow)) { + pd.pf_mtag->flags |= PF_TAG_DUMMYNET; + ip_dn_io_ptr(m0, &dnflow); + if (*m0 == NULL) + action = PF_DROP; } } break; diff --git a/sys/netpfil/pf/pf_mtag.h b/sys/netpfil/pf/pf_mtag.h index e3f6f85f21d0..e3b9426bacc8 100644 --- a/sys/netpfil/pf/pf_mtag.h +++ b/sys/netpfil/pf/pf_mtag.h @@ -37,7 +37,7 @@ #ifdef _KERNEL #define PF_TAG_GENERATED 0x01 -#define PF_TAG_FRAGCACHE 0x02 +#define PF_TAG_DUMMYNET 0x02 #define PF_TAG_TRANSLATE_LOCALHOST 0x04 #define PF_PACKET_LOOPED 0x08 #define PF_FASTFWD_OURS_PRESENT 0x10 From nobody Tue Nov 23 17:48:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 909B7188E229; Tue, 23 Nov 2021 17:48: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 4HzBSZ5Dfqz4hDr; Tue, 23 Nov 2021 17:48:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A1911AE88; Tue, 23 Nov 2021 17:48: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 1ANHmEm6095428; Tue, 23 Nov 2021 17:48:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANHmEtk095427; Tue, 23 Nov 2021 17:48:14 GMT (envelope-from git) Date: Tue, 23 Nov 2021 17:48:14 GMT Message-Id: <202111231748.1ANHmEtk095427@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: 76fe9df7a40c - main - RELNOTES: mention 6rd support in if_stf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 76fe9df7a40c7f1e185534565f7470b50110acd8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637689694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VOsFoFMNthkD2EIO7tw7+Qktu3e45iPLPpkYmK/W7XE=; b=b1NVvoxv9yDpOZDMIbRFsMoHBPfpm5Yw1lCgeZaqX6Dg6TLAbBeDN1QdwsDtJ7VbIixVW4 2+LQgmkNKEPpgKUqNBQDCVIcnwWk9/EsoLRTB/+hle03tGzMI5S8I4aA8RjNtTNAh0Za1R KAjJfcx5/pBXzi3wGjrrPRN4hE9z0J7IF3c5hiPpi/udXqhBZ96KLTmp3Jw2/5Gd06Mgkq dFWoH2sSjrjwhnHly0Tph1C1pCMztfQjxh+LqaOE168O5MiUf+bLhG2GThVnfQ7RVOUkjC U5IV/QUt3I7uqixSJTWRbsoAwZJ9dj9RKabxouW6LFKFGwcu+/LyE5O0BRo0wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637689694; a=rsa-sha256; cv=none; b=QYmwJIAsdYFWIDoC/2sNgr0rXJb7ypwqXT3IopJiMFB2Ppp3QB+s0Ax1qZ7rhFVx6Jyu3Y b0wLkcOhkLFKw6mYXE+OLHUns0afY4Tu5edoA0HieuDvlxix+xkIUiupT4qMndjzoaFWlX lHrPZycLjklRSV2WiCs/dgKcCRaxkZR7VU6ejeII4UsDE0dKgmoWGcfLjeG8SgnV2Pj+vB NcVXqCkIrOSSgJHUic0oAtIbPDiuQttLAGFTt0BqaqzLEi2BK1VrasvUCQGPav7lmXQQOa odVYPb7nmZ8DdCJ/6og0GRcy8nPD6zgeaSh0CPI8whwHzfOXezI/NBbvxb3ajw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=76fe9df7a40c7f1e185534565f7470b50110acd8 commit 76fe9df7a40c7f1e185534565f7470b50110acd8 Author: Kristof Provost AuthorDate: 2021-11-22 21:36:03 +0000 Commit: Kristof Provost CommitDate: 2021-11-23 15:49:12 +0000 RELNOTES: mention 6rd support in if_stf Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33088 --- RELNOTES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELNOTES b/RELNOTES index 3b772bba1ba0..acd726abdb40 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +19dc64451179: + if_stf now supports 6rd (RFC5969). + c1d255d3ffdb, 3968b47cd974, bd452dcbede6: Add WiFi 6 support to wpa. From nobody Tue Nov 23 18:06:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 62A211899D50; Tue, 23 Nov 2021 18: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 4HzBsk0c8Pz4pdZ; Tue, 23 Nov 2021 18:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E95C21B307; Tue, 23 Nov 2021 18: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 1ANI6X7Y022355; Tue, 23 Nov 2021 18: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 1ANI6XKF022354; Tue, 23 Nov 2021 18:06:33 GMT (envelope-from git) Date: Tue, 23 Nov 2021 18:06:33 GMT Message-Id: <202111231806.1ANI6XKF022354@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: 319e9fc642a1 - main - ng_bridge: count item allocation failures as memory failures List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 319e9fc642a13ac20e89d0bc05f8a09d1da5a502 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637690794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oBYHdV1mDNMHl9hjT+Dj4l0fdfHJfcvFlfARItgmm/c=; b=bG8x+Cj2B5IWFxPlaFR7A11QHPM49TvlD8Oy/fGyq/gxzlt7vDM43rzDP/UKCgIYK3V2k3 U5fQB6tCoFP5kq7IhNfzj1X513mwmxjdFl8UsHDTX/0Aj6CJvYYkkXQMM6XaYNEmy38ed9 Z3c5CImsfg9wqVhe0oD1FH1rClXRn6Ns5zdBIHukBzmqIVCacrf5HVYrk2hq3wWlGphW2N NQKJOVWClj0g2Nmf64miZvfwnXGzn2cUfI04jjJWWQMhmmxiC1Lnl4eUbKRMpKwnitSzMH Ow0W67guBZHPlAY82PaFq3Q7lPJfg1wv/+6yb3GlBucXjwhnMzIw8ILNbyMP4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637690794; a=rsa-sha256; cv=none; b=FH7eY9rVbn71CscczGAdsjZ5QrKJwnVdWRt2JbO52yzgfD9/as47sQo3Ll5wU+V8dyekEd 2T4lO0l6CBBT3GofIqcBpKuR2pKUL3f9p7/1lVbmto61jbW46+lQH6anldOVCy9kBoxfoD RF4jWp0arPKqpBPF++vioFukQqwdWhw1/6R6HOen8/hp7PM8JJ+AbIIfxaSULdgmqtR0Hl 4IMNMAx4zRJNYwnsnsD069XIRjQpEK2fZoKave/Z3meJXKj4Su7UQ1GTHtHt3pB/hiWqVf UhlHwCO9QZ8hZaOsE3Csha9kqd6vbJQotCS3H49WDlIKUTqk/O5MSABR1ordyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=319e9fc642a13ac20e89d0bc05f8a09d1da5a502 commit 319e9fc642a13ac20e89d0bc05f8a09d1da5a502 Author: Gleb Smirnoff AuthorDate: 2021-11-23 18:05:36 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-23 18:05:36 +0000 ng_bridge: count item allocation failures as memory failures Submitted by: Dmitry Luhtionov --- sys/netgraph/ng_bridge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c index 12cc619241b6..9f1d33ba4c85 100644 --- a/sys/netgraph/ng_bridge.c +++ b/sys/netgraph/ng_bridge.c @@ -695,6 +695,8 @@ ng_bridge_send_data(link_cp dst, int manycast, struct mbuf *m, item_p item) { NG_SEND_DATA_ONLY(error, dst->hook, m); if (error) { + if (error == ENOMEM) + counter_u64_add(dst->stats.memoryFailures, 1); /* The packet is still ours */ if (item != NULL) NG_FREE_ITEM(item); From nobody Tue Nov 23 19:14:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EA69618951E3; Tue, 23 Nov 2021 19:15:00 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from tor1-11.mx.scaleengine.net (tor1-11.mx.scaleengine.net [209.51.186.6]) (using TLSv1.3 with cipher TLS_AES_256_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 4HzDNh6H1gz3hGb; Tue, 23 Nov 2021 19:15:00 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.3] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by tor1-11.mx.scaleengine.net (Postfix) with ESMTPSA id 5B6A529872; Tue, 23 Nov 2021 19:14:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 tor1-11.mx.scaleengine.net 5B6A529872 Message-ID: Date: Tue, 23 Nov 2021 14:14:53 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features Content-Language: en-US To: Helge Oldach Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org References: <202111231000.1ANA0g3x055387@nuc.oldach.net> From: Allan Jude In-Reply-To: <202111231000.1ANA0g3x055387@nuc.oldach.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4HzDNh6H1gz3hGb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 11/23/2021 5:00 AM, Helge Oldach wrote: > Hi, > > Allan Jude wrote on Mon, 22 Nov 2021 19:14:13 +0100 (CET): >> The branch stable/13 has been updated by allanjude: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=32a2fed6e71f896266d4c695754104d82a72c60d >> >> commit 32a2fed6e71f896266d4c695754104d82a72c60d >> Author: Allan Jude >> AuthorDate: 2021-11-19 15:14:30 +0000 >> Commit: Allan Jude >> CommitDate: 2021-11-22 18:12:20 +0000 >> >> openssl: Fix detection of ARMv7 and ARM64 CPU features >> >> OpenSSL assumes the same value for AT_HWCAP=16 (Linux) >> So it ends up calling elf_auxv_info() with AT_CANARY which >> returns ENOENT, and all acceleration features are disabled. >> >> With this, my ARM64 test machine runs the benchmark >> `openssl speed -evp aes-256-gcm` nearly 20x faster >> going from 100 MB/sec to 2000 MB/sec >> >> It also improves sha256 from 300 MB/sec to 1800 MB/sec >> >> This fix has been accepted but not yet merged upstream: >> https://github.com/openssl/openssl/pull/17082 >> >> PR: 259937 >> Reviewed by: manu, imp >> MFC after: immediate >> Relnotes: yes >> Fixes: 88e852c0b5c872b1a ("OpenSSL: Merge OpenSSL 1.1.1j") >> Sponsored by: Ampere Computing LLC >> Sponsored by: Klara Inc. >> Differential Revision: https://reviews.freebsd.org/D33060 >> >> (cherry picked from commit d9bb798725cfce9c72b80440659b48e8668eb10d) > > Hmmm. On a RPi4/8G: > > Before (FreeBSD 13.0-STABLE (GENERIC) #366 stable/13-n248173-d16fbc488e6): > > | Doing aes-256-gcm for 3s on 16 size blocks: 6710997 aes-256-gcm's in 3.00s > | Doing aes-256-gcm for 3s on 64 size blocks: 1806261 aes-256-gcm's in 3.00s > | Doing aes-256-gcm for 3s on 256 size blocks: 468595 aes-256-gcm's in 3.00s > | Doing aes-256-gcm for 3s on 1024 size blocks: 121282 aes-256-gcm's in 3.00s > | Doing aes-256-gcm for 3s on 8192 size blocks: 14590 aes-256-gcm's in 3.00s > | Doing aes-256-gcm for 3s on 16384 size blocks: 7258 aes-256-gcm's in 3.00s > | OpenSSL 1.1.1l-freebsd 24 Aug 2021 > | built on: reproducible build, date unspecified > | options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) > | compiler: clang > | The 'numbers' are in 1000s of bytes per second processed. > | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > | aes-256-gcm 35791.98k 38533.57k 39986.77k 41397.59k 39840.43k 39638.36k > > After (FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621) > > | Doing aes-256-gcm for 3s on 16 size blocks: 3999944 aes-256-gcm's in 3.01s > | Doing aes-256-gcm for 3s on 64 size blocks: 1102925 aes-256-gcm's in 3.04s > | Doing aes-256-gcm for 3s on 256 size blocks: 279608 aes-256-gcm's in 3.03s > | Doing aes-256-gcm for 3s on 1024 size blocks: 69397 aes-256-gcm's in 3.00s > | Doing aes-256-gcm for 3s on 8192 size blocks: 9160 aes-256-gcm's in 3.14s > | Doing aes-256-gcm for 3s on 16384 size blocks: 4385 aes-256-gcm's in 3.00s > | OpenSSL 1.1.1l-freebsd 24 Aug 2021 > | built on: reproducible build, date unspecified > | options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) > | compiler: clang > | The 'numbers' are in 1000s of bytes per second processed. > | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > | aes-256-gcm 21277.62k 23226.64k 23613.90k 23687.51k 23892.93k 23947.95k > > It seems that AES throughput is actually cut by almost half? > > Kind regards > Helge > Do you know which of the CPU optimizations your RPi4 supports? You can set the environment variable OPENSSL_armcap to override OpenSSL's detection. Try: env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm And see if it gets a different result. -- Allan Jude From nobody Tue Nov 23 19:36:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 92FD418A03E8; Tue, 23 Nov 2021 19:36:44 +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 4HzDsl5GmSz3nhM; Tue, 23 Nov 2021 19:36:43 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.17.1/8.17.1/hmo17dec20) with ESMTPS id 1ANJaepX011756 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 23 Nov 2021 20:36:41 +0100 (CET) (envelope-from freebsd@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.17.1/8.17.1/Submit) id 1ANJaeDT011754; Tue, 23 Nov 2021 20:36:40 +0100 (CET) (envelope-from freebsd@oldach.net) Message-Id: <202111231936.1ANJaeDT011754@nuc.oldach.net> Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features In-Reply-To: from Allan Jude at "23 Nov 2021 14:14:53" To: allanjude@freebsd.org (Allan Jude) Date: Tue, 23 Nov 2021 20:36:40 +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]); Tue, 23 Nov 2021 20:36:41 +0100 (CET) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:freebsd@oldach.net RCPT: X-Rspamd-Queue-Id: 4HzDsl5GmSz3nhM X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=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 X-Spamd-Result: default: False [-3.26 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[oldach.net]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.956]; FROM_NO_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N Allan Jude wrote on Tue, 23 Nov 2021 20:14:53 +0100 (CET): > On 11/23/2021 5:00 AM, Helge Oldach wrote: > > Allan Jude wrote on Mon, 22 Nov 2021 19:14:13 +0100 (CET): > > Hmmm. On a RPi4/8G: > > > > Before (FreeBSD 13.0-STABLE (GENERIC) #366 stable/13-n248173-d16fbc488e6): > > | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > > | aes-256-gcm 35791.98k 38533.57k 39986.77k 41397.59k 39840.43k 39638.36k > > > > After (FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621) > > > > | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > > | aes-256-gcm 21277.62k 23226.64k 23613.90k 23687.51k 23892.93k 23947.95k > > > > It seems that AES throughput is actually cut by almost half? > > Do you know which of the CPU optimizations your RPi4 supports? Is this what you need? Instruction Set Attributes 0 = Instruction Set Attributes 1 = <> Processor Features 0 = Processor Features 1 = <> Memory Model Features 0 = Memory Model Features 1 = <8bit VMID> Memory Model Features 2 = <32bit CCIDX,48bit VA> Debug Features 0 = Debug Features 1 = <> Auxiliary Features 0 = <> Auxiliary Features 1 = <> AArch32 Instruction Set Attributes 5 = AArch32 Media and VFP Features 0 = AArch32 Media and VFP Features 1 = > You can set the environment variable OPENSSL_armcap to override > OpenSSL's detection. > > Try: env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm On FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621 again (i.e. after this commit): hmo@p48 ~ $ env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm Doing aes-256-gcm for 3s on 16 size blocks: 6445704 aes-256-gcm's in 3.08s Doing aes-256-gcm for 3s on 64 size blocks: 1861149 aes-256-gcm's in 3.00s Doing aes-256-gcm for 3s on 256 size blocks: 479664 aes-256-gcm's in 3.01s Doing aes-256-gcm for 3s on 1024 size blocks: 122853 aes-256-gcm's in 3.04s Doing aes-256-gcm for 3s on 8192 size blocks: 15181 aes-256-gcm's in 3.00s Doing aes-256-gcm for 3s on 16384 size blocks: 7796 aes-256-gcm's in 3.07s OpenSSL 1.1.1l-freebsd 24 Aug 2021 built on: reproducible build, date unspecified options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) compiler: clang The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes aes-256-gcm 33504.57k 39704.51k 40825.01k 41394.83k 41454.25k 41601.52k hmo@p48 ~ $ openssl speed -evp aes-256-gcm Doing aes-256-gcm for 3s on 16 size blocks: 4066201 aes-256-gcm's in 3.00s Doing aes-256-gcm for 3s on 64 size blocks: 1087387 aes-256-gcm's in 3.00s Doing aes-256-gcm for 3s on 256 size blocks: 280110 aes-256-gcm's in 3.03s Doing aes-256-gcm for 3s on 1024 size blocks: 70412 aes-256-gcm's in 3.04s Doing aes-256-gcm for 3s on 8192 size blocks: 8762 aes-256-gcm's in 3.00s Doing aes-256-gcm for 3s on 16384 size blocks: 4402 aes-256-gcm's in 3.02s OpenSSL 1.1.1l-freebsd 24 Aug 2021 built on: reproducible build, date unspecified options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) compiler: clang The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes aes-256-gcm 21686.41k 23197.59k 23656.30k 23725.04k 23926.10k 23916.23k hmo@p48 ~ $ Kind regards, Helge From nobody Tue Nov 23 19:50:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E831D18A7883; Tue, 23 Nov 2021 19:50: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 4HzFB04V2xz3s7y; Tue, 23 Nov 2021 19:50:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A0A51C911; Tue, 23 Nov 2021 19:50: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 1ANJom9F064832; Tue, 23 Nov 2021 19:50:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANJomSE064831; Tue, 23 Nov 2021 19:50:48 GMT (envelope-from git) Date: Tue, 23 Nov 2021 19:50:48 GMT Message-Id: <202111231950.1ANJomSE064831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: a0fc5094bf4c - stable/13 - rtsol/rtsold: Add option to skip random delay List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a0fc5094bf4c594f2717cd1b757b1b5daca61d3f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637697048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cnj1cDPfIPlvH29Yksb+o9C53cR7EMWrEo2Y0rUaWEs=; b=C0Q/ybGUE5tW9IXk6H4i3kTRc0WVpQbvvVHmB6BhcakL+k8YUBZDiCEI0vfkQJBhwwJQFd f8ey5mLPsp0VX+iU5L646p6mXSbs+uu0RgQaQbmEVe86dPF/XrMQ/PoHBkmFp6SLqjJ5PM LZ/rvL90LPS7OyUEDyCmDY6mdDTh1xgfo6X+a/l/YzWm2BIQ3/qrZduquj3NhCCTZpLgCn /KNCBF39W7kchOMhASRY0QK2ZUvDNHt4PaeMa4sK+gQGPDdeYDUeXxVnBRt7tbfJyiT68v 6N7CLABEeeV5nSVfNYYjRXiGY3SppipM+oZ8r3+Dcmrd9JiUGx+2KIoxKxYcHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637697048; a=rsa-sha256; cv=none; b=rwuRr/No3fiqh5lSyvzHygQGYlad+/Pn3+2a+D3k19At2/IPASlmsjIRHGNLFBWHqHjiEq IT1hPgHeATZjG/ksJH2UgK09qMobsVK3cwZx0cS9spXxfdhpUhqx9wT8u/YUEs85ZwqWr8 A1Md2/cOUu3gGn7UFbap6FcpQOvz9LoNh6jOR4GQtflh2gj+U1xbJxv3ra72q6+z1Crwhu eBbZCYomT/VaScNPA453HVEtwvNlZHIGgNEMkKnVavU4Y3EIXMnZGTrbyo4N+9qrBTLnM5 9agkfQbuAz+fSdc5DE0EB62hHSW4aj17pqSYmR3trSi6nKRzMm5oCjHE23C9aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a0fc5094bf4c594f2717cd1b757b1b5daca61d3f commit a0fc5094bf4c594f2717cd1b757b1b5daca61d3f Author: Colin Percival AuthorDate: 2021-11-16 18:24:05 +0000 Commit: Colin Percival CommitDate: 2021-11-23 19:48:50 +0000 rtsol/rtsold: Add option to skip random delay In accordance with a SHOULD in RFC 4861, rtsol and rtsold wait a random time between zero and one (aka MAX_RTR_SOLICITATION_DELAY) seconds before sending a Router Solicitation, in order to avoid network congestion if many hosts come online at once. (The question of how many hosts would be required to cause congestion by each sending a single packet on a Gbps+ network is left to the reader.) The new option -i disables this wait and instructs rtsol and rtsold to send the Router Solicitation immediately. Relnotes: yes Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D32956 (cherry picked from commit 231bac4ccc431381d70c966a5bd5a95fbfc1f163) --- usr.sbin/rtsold/rtsold.8 | 16 +++++++++++----- usr.sbin/rtsold/rtsold.c | 13 ++++++++++--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/usr.sbin/rtsold/rtsold.8 b/usr.sbin/rtsold/rtsold.8 index 84e4d3013ef4..6b0e64ab0fac 100644 --- a/usr.sbin/rtsold/rtsold.8 +++ b/usr.sbin/rtsold/rtsold.8 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 14, 2021 +.Dd November 12, 2021 .Dt RTSOLD 8 .Os .\" @@ -39,27 +39,27 @@ .\" .Sh SYNOPSIS .Nm -.Op Fl dDfFmu1 +.Op Fl dDfFimu1 .Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl p Ar pidfile .Op Fl R Ar script-name .Ar interface ... .Nm -.Op Fl dDfFmu1 +.Op Fl dDfFimu1 .Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl p Ar pidfile .Op Fl R Ar script-name .Fl a .Nm rtsol -.Op Fl dDu +.Op Fl dDiu .Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl R Ar script-name .Ar interface ... .Nm rtsol -.Op Fl dDu +.Op Fl dDiu .Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl R Ar script-name @@ -194,6 +194,12 @@ The settings may be changed manually with .Xr sysctl 8 and .Xr ifconfig 8 . +.It Fl i +Transmit Router Solicitation packets immediately, without waiting the +normal random (between 0 and 1 second) delay. +This option should not be used on networks where it might result in +congestion due to many hosts simultaneously (re)connecting and +sending such packets. .It Fl m Enable mobility support. If this option is specified, diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c index f58574cec731..8aad8a7b95f2 100644 --- a/usr.sbin/rtsold/rtsold.c +++ b/usr.sbin/rtsold/rtsold.c @@ -99,6 +99,7 @@ cap_channel_t *capllflags, *capscript, *capsendmsg, *capsyslog; /* static variables and functions */ static int mobile_node = 0; +static int no_solicitation_delay = 0; static sig_atomic_t do_dump, do_exit; static struct pidfh *pfh; @@ -125,11 +126,11 @@ main(int argc, char **argv) progname = basename(argv[0]); if (strcmp(progname, "rtsold") == 0) { - opts = "adDfFm1M:O:p:R:u"; + opts = "adDfFim1M:O:p:R:u"; once = 0; pidfilepath = NULL; } else { - opts = "adDFM:O:R:u"; + opts = "adDFiM:O:R:u"; fflag = 1; once = 1; } @@ -151,6 +152,9 @@ main(int argc, char **argv) case 'F': Fflag = 1; break; + case 'i': + no_solicitation_delay = 1; + break; case 'm': mobile_node = 1; break; @@ -720,7 +724,10 @@ rtsol_timer_update(struct ifinfo *ifi) ifi->timer = tm_max; /* stop timer(valid?) */ break; case IFS_DELAY: - interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * MILLION); + if (no_solicitation_delay) + interval = 0; + else + interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * MILLION); ifi->timer.tv_sec = interval / MILLION; ifi->timer.tv_nsec = (interval % MILLION) * 1000; break; From nobody Tue Nov 23 20:30:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AFF35189C847; Tue, 23 Nov 2021 20:30: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 4HzG3l37Clz4YkV; Tue, 23 Nov 2021 20:30:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B8941D0CB; Tue, 23 Nov 2021 20:30: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 1ANKURj8018562; Tue, 23 Nov 2021 20:30:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANKUR5A018561; Tue, 23 Nov 2021 20:30:27 GMT (envelope-from git) Date: Tue, 23 Nov 2021 20:30:27 GMT Message-Id: <202111232030.1ANKUR5A018561@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: 910919219716 - main - kqueue: Define older kqueue event types better List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9109192197166e72ce0c04e5f04fc82f35a82f40 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637699427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ofi7cJmRf13CbeoWLhqk+CEYx4qtFzM1YoeqtBGAC7Q=; b=gDYUPucXmMIuGFXM/94VI/e5rN/txKwN27MmMDI23p3hx4kK/QL1Yn1c6jONaJl0fHLwvb ulbw/vtUEtSz1TGYdyqUpD9oYOKph3PyNN92IgbC8WwYZwuvkqV7LR8EeKG+ny0VNNNvs+ Vxmi7pUm3icmY0bEHBzSnmnV2+blte+82lo/t3LfHGT8N/OHzwr0OWGFmxam05M1IHXvGs E224c/6wIMFABOjLMWvqB39f0FOJ5aeKr7vvFebmnfhyERUsPL5wQ3NOE1AcIhYlnNOs4O ZHWAu8iihCXI/RtZVEVc0cigPkj+6hUlSm7j620chxhOuzy6XeDkS22ixUaq3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637699427; a=rsa-sha256; cv=none; b=aBFSTxkSaIrJA5YjKlXl+kF27QRFkDnGpzprubNoPHjRMEXiPxuCvPg5Fjj0EqS7YN9KVK B1MFnaRlFakbPbjAUuZ94RREV2oDlzLc9NdLcrqHT9oUoCOrOVHnBIkVNg81YCCqON/9X6 QMbODX6FU1b/jzy/wqznyJhjwpYMK4FL6yx/Ab4IOzj2kuVwag3i5OfPJb4DZWFbaIbU1p M9pnNE/tXa0wNT0jkNjSeBnTuzqeJzrYZS/2Z+fOCcomqhAiZ5EBypFc+VxpKZ/265yn1s AyEXT4Is4T62XchqX8y7Be0UREidMBx43GnP9OnyHkiN0jJRDMgp4n2eFtfPmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9109192197166e72ce0c04e5f04fc82f35a82f40 commit 9109192197166e72ce0c04e5f04fc82f35a82f40 Author: Warner Losh AuthorDate: 2021-11-23 17:51:46 +0000 Commit: Warner Losh CommitDate: 2021-11-23 20:29:24 +0000 kqueue: Define older kqueue event types better struct kqueue is designed to live in a restricted namespace, but the older compat versions are not. Shift to using unsigned short instead of u_short, unsigned int instead of u_int and the __*int*_t types instead of the unprefiexed versions. Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D33056 --- sys/sys/event.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/sys/event.h b/sys/sys/event.h index 7d337d40c1e6..05eddfd681b1 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -105,29 +105,29 @@ struct freebsd11_kevent { #if defined(_WANT_KEVENT32) || (defined(_KERNEL) && defined(__LP64__)) struct kevent32 { - uint32_t ident; /* identifier for this event */ + __uint32_t ident; /* identifier for this event */ short filter; /* filter for event */ - u_short flags; - u_int fflags; + unsigned short flags; + unsigned int fflags; #ifndef __amd64__ - uint32_t pad0; + __uint32_t pad0; #endif - uint32_t data1, data2; - uint32_t udata; /* opaque user data identifier */ + __uint32_t data1, data2; + __uint32_t udata; /* opaque user data identifier */ #ifndef __amd64__ - uint32_t pad1; + __uint32_t pad1; #endif - uint32_t ext64[8]; + __uint32_t ext64[8]; }; #ifdef _WANT_FREEBSD11_KEVENT struct freebsd11_kevent32 { - u_int32_t ident; /* identifier for this event */ + __uint32_t ident; /* identifier for this event */ short filter; /* filter for event */ - u_short flags; - u_int fflags; - int32_t data; - u_int32_t udata; /* opaque user data identifier */ + unsigned short flags; + unsigned int fflags; + __int32_t data; + __uint32_t udata; /* opaque user data identifier */ }; #endif #endif From nobody Tue Nov 23 20:41:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E52CA18A3EE7; Tue, 23 Nov 2021 20:41: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 4HzGJr49jkz4dP3; Tue, 23 Nov 2021 20:41:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 702851D443; Tue, 23 Nov 2021 20:41: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 1ANKfmcD034904; Tue, 23 Nov 2021 20:41:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANKfm92034903; Tue, 23 Nov 2021 20:41:48 GMT (envelope-from git) Date: Tue, 23 Nov 2021 20:41:48 GMT Message-Id: <202111232041.1ANKfm92034903@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: afc5ab870d86 - main - Basic signal tests: Can we deliver a signal? List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: afc5ab870d8661a7dacdbd65554c2f3533aecb8d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637700108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NGdv37V8+GlfybK5CWe+ijlxdPx1jeUUcPay9gujQLg=; b=QLnzB+xYb3EqiH4jMcfnhc0vOC9mbBbMvC0NOGioLdNoaEMYgYx4SQIXwyBVaIkLK+B3ck 6YTFG/ZJ0+Q+I9jlRNDl/EuWp4WSPkeBieGM6vZEA3wLTbdRoDW+ucuxiZhcqj87VkPz2R rf1AlzGezvyKgHGCEdhlSZpMZ/VVm18QMzXyeiT3SwKg2BOH0mPyx8MMX98Mk1NLwGcsW4 xKo1SSEy/sg74qpsxacZCpRp5sTlnXGIujtyCiy9SDOneBvIg1yTxugxfXxjZ+SB6966uG jOJwr5Aa9BV380GGsBCI6LLvTCfKNs3JZEc+/rrvcTHXrIFPKgGMY1GgbewBng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637700108; a=rsa-sha256; cv=none; b=rtcfPDii7o6rS4QeeXyTEcI1vBm7eTX5b6GVCXaAxi1EZins7M5ax1Cwzvs6Lgjx3S2vLk g04MBdL7xYksq36SCHVrZFUJQ4yOlOscQRWEFcY3484MWH0SIBPsgNsHoqWFxvF9a7+Luq X9ZWVqgManEAruKLSRpOSpq8+py9m3Lq2W/jEuJO7PaG8dRRfTBgs46lPY+kiqqVCGz3uR 6Qc0moY7GlVWU/kg45mpocN3A9cqH1zUI3hgGcWWOaQYBnWByF8YVOL/bt4DiKSFBXj3Gi jKldEa3NFP2kxjWvgqrjc84caQfWKWA3eW6muHOwhwlL5mZJO7MN1Mw72VJjoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=afc5ab870d8661a7dacdbd65554c2f3533aecb8d commit afc5ab870d8661a7dacdbd65554c2f3533aecb8d Author: Warner Losh AuthorDate: 2021-11-23 20:37:14 +0000 Commit: Warner Losh CommitDate: 2021-11-23 20:37:14 +0000 Basic signal tests: Can we deliver a signal? Basic signal tests that tests can we deliver a signal via raise() and can we deliver one via SIGALARM asynchronously. In addition, tests whether or not on ARM T32 (Thumb) code can interrupt A32 (normal) and vice versa. While this test is aimed at ensuring basic qemu signals are working, it's good to have in the base. Sponsored by: Netflix Discussed with: kevans, cognet Differential Revision: https://reviews.freebsd.org/D33078 --- tests/sys/kern/Makefile | 1 + tests/sys/kern/basic_signal.c | 159 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index b0f83b97db41..b8fee0944c06 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -9,6 +9,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel TESTSDIR= ${TESTSBASE}/sys/kern +ATF_TESTS_C+= basic_signal #ATF_TESTS_C+= kcov ATF_TESTS_C+= kern_copyin ATF_TESTS_C+= kern_descrip_test diff --git a/tests/sys/kern/basic_signal.c b/tests/sys/kern/basic_signal.c new file mode 100644 index 000000000000..0b3200e2b8ab --- /dev/null +++ b/tests/sys/kern/basic_signal.c @@ -0,0 +1,159 @@ +/*- + * Copyright (c) 2021 Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include +#include + +static volatile sig_atomic_t signal_fired = 0; + +static void +sig_handler(int signo, siginfo_t *info __unused, void *ucp __unused) +{ + signal_fired++; +} + +ATF_TC(signal_test); + +ATF_TC_HEAD(signal_test, tc) +{ + + atf_tc_set_md_var(tc, "descr", "Testing delivery of a signal"); +} + +ATF_TC_BODY(signal_test, tc) +{ + /* + * Setup the signal handlers + */ + struct sigaction sa = { + .sa_sigaction = sig_handler, + .sa_flags = SA_SIGINFO, + }; + ATF_REQUIRE(sigemptyset(&sa.sa_mask) == 0); + ATF_REQUIRE(sigaction(SIGUSR1, &sa, NULL) == 0); + ATF_REQUIRE(sigaction(SIGUSR2, &sa, NULL) == 0); + ATF_REQUIRE(sigaction(SIGALRM, &sa, NULL) == 0); + + /* + * Fire SIGUSR1 + */ + ATF_CHECK(signal_fired == 0); + ATF_REQUIRE(raise(SIGUSR1) == 0); + ATF_CHECK(signal_fired == 1); + + /* + * Fire SIGUSR2 + */ + ATF_REQUIRE(raise(SIGUSR2) == 0); + ATF_CHECK(signal_fired == 2); + + /* + * Fire SIGALRM after a timeout + */ + ATF_REQUIRE(alarm(1) == 0); + ATF_REQUIRE(pause() == -1); + ATF_REQUIRE(errno == EINTR); + ATF_CHECK(signal_fired == 3); +} + +/* + * Special tests for 32-bit arm. We can call thumb code (really just t32) from + * normal (a32) mode and vice versa. Likewise, signals can interrupt a T32 + * context with A32 code and vice versa. Make sure these all work with a simple + * test that raises the signal and ensures that it executed. No other platform + * has these requirements. Also note: we only support thumb2, so there's no T16 + * vs T32 issues we have to test for. + */ +#ifdef __arm__ + +#define a32_isa __attribute__((target("arm"))) +#define t32_isa __attribute__((target("thumb"))) + +static volatile sig_atomic_t t32_fired = 0; +static volatile sig_atomic_t a32_fired = 0; + +a32_isa static void +sig_a32(int signo, siginfo_t *info __unused, void *ucp __unused) +{ + a32_fired++; +} + +t32_isa static void +sig_t32(int signo, siginfo_t *info __unused, void *ucp __unused) +{ + t32_fired++; +} + + +ATF_TC(signal_test_T32_to_A32); + +ATF_TC_HEAD(signal_test_T32_to_A32, tc) +{ + + atf_tc_set_md_var(tc, "descr", "Testing delivery of a signal from T32 to A32"); +} + +t32_isa ATF_TC_BODY(signal_test_T32_to_A32, tc) +{ + /* + * Setup the signal handlers + */ + struct sigaction sa = { + .sa_sigaction = sig_a32, + .sa_flags = SA_SIGINFO, + }; + ATF_REQUIRE(sigemptyset(&sa.sa_mask) == 0); + ATF_REQUIRE(sigaction(SIGUSR1, &sa, NULL) == 0); + + ATF_REQUIRE((((uintptr_t)sig_a32) & 1) == 0); /* Make sure compiled as not thumb */ + + ATF_CHECK(a32_fired == 0); + ATF_REQUIRE(raise(SIGUSR1) == 0); + ATF_CHECK(a32_fired == 1); +} + +ATF_TC(signal_test_A32_to_T32); + +ATF_TC_HEAD(signal_test_A32_to_T32, tc) +{ + + atf_tc_set_md_var(tc, "descr", "Testing delivery of a signal from A32 to T32"); +} + +a32_isa ATF_TC_BODY(signal_test_A32_to_T32, tc) +{ + /* + * Setup the signal handlers + */ + struct sigaction sa = { + .sa_sigaction = sig_t32, + .sa_flags = SA_SIGINFO, + }; + ATF_REQUIRE(sigemptyset(&sa.sa_mask) == 0); + ATF_REQUIRE(sigaction(SIGUSR1, &sa, NULL) == 0); + + ATF_REQUIRE((((uintptr_t)sig_t32) & 1) == 1); /* Make sure compiled as thumb */ + + ATF_CHECK(t32_fired == 0); + ATF_REQUIRE(raise(SIGUSR1) == 0); + ATF_CHECK(t32_fired == 1); +} +#endif + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, signal_test); +#ifdef __arm__ + ATF_TP_ADD_TC(tp, signal_test_T32_to_A32); + ATF_TP_ADD_TC(tp, signal_test_A32_to_T32); +#endif + + return (atf_no_error()); +} From nobody Tue Nov 23 22:14:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D145318AAA6C; Tue, 23 Nov 2021 22:14: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 4HzJND3sjMz3LqH; Tue, 23 Nov 2021 22:14:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 649FB1E71E; Tue, 23 Nov 2021 22:14: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 1ANMEqSs057222; Tue, 23 Nov 2021 22:14:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANMEqEa057221; Tue, 23 Nov 2021 22:14:52 GMT (envelope-from git) Date: Tue, 23 Nov 2021 22:14:52 GMT Message-Id: <202111232214.1ANMEqEa057221@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: 9cf1841c4aaf - main - ice(4): Update to version 0.29.4-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: 9cf1841c4aaf8fbab06132ab9f76094f34ad7c7b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637705692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Krp19tyeKcq4mczjZK3d7kXOzvkI06S26anAJPAgidI=; b=yoZxBwHRUIlMmpmSSQZoIQ4Cw4pqm+rdhB+60OLjbGuePlaxFmMgrB2A21Iopq/FWoWAfZ CSKgCovTZbK5NBdO7k24RNXYRQY/IiIEQ9kE4ju0mi78/aFlVIr4W+mmQBCiGT2GtmCzqv ryamemWnP+fkrPcNWFl4tDj7dWoyuHrmyriSdQyyC5rhrNEquP/NwZ1NoWnjUNydyS7KGB qBS9x0+9tm8LCIfT3bMotpB4Cz2wXrj1x1ZodfvQ7tZiq0ijpD88Q4xwhQfl3ylBnln8hb pETge1ZinoEhaOigdOmssrcm7oF0mHVvgvhv7ckzqIUxuZK/80UsmGEpDWilpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637705692; a=rsa-sha256; cv=none; b=gLv0alMaHs9vFIIPAWQKNi4gJ2qJ+8MGuz/muViWZ3+bKng85Q2i3chlAGNoATAkVT3ca5 Q8RYqndV2797jZauDZE4QJo4waOeMuj6mPO9UY2IV1U6O0W56C7dFMJXywPQB+8JYOnY4J ESZTs9Wk1+wo9F3DUSuEcieGuuhlN50/GYr0nTwqG7FmdQbhAQFCaosKg970YeM1mjeh6K odlU5eEM9yv6lWtBRzjRxpLf/u53Z2uBDjYh03jBqcwX4LE02kTBmUQN2ELRW61GrypDqg T42QyKx1xkcWxCZL5UIU17q+adSx6BIdmIoW4O8Ihfo64YLnC55uwF4sSLbCCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=9cf1841c4aaf8fbab06132ab9f76094f34ad7c7b commit 9cf1841c4aaf8fbab06132ab9f76094f34ad7c7b Author: Eric Joyner AuthorDate: 2021-06-23 20:41:54 +0000 Commit: Eric Joyner CommitDate: 2021-11-23 22:09:29 +0000 ice(4): Update to version 0.29.4-k Includes various feature improvements and bug fixes. Notable changes include: - Firmware logging support - Link management flow changes - New sysctl to report aggregated error counts - Health Status Event reporting from firmware (Use the new read-only tunables hw.ice.enable_health_events / dev.ice.#.enable_health_events to turn this off) Signed-off-by: Eric Joyner Sponsored by: Intel Corporation --- sys/dev/ice/ice_adminq_cmd.h | 344 ++++++---- sys/dev/ice/ice_bitops.h | 45 ++ sys/dev/ice/ice_common.c | 310 ++++++++- sys/dev/ice/ice_common.h | 13 + sys/dev/ice/ice_common_sysctls.h | 16 + sys/dev/ice/ice_controlq.c | 8 +- sys/dev/ice/ice_controlq.h | 5 +- sys/dev/ice/ice_drv_info.h | 16 +- sys/dev/ice/ice_features.h | 4 +- sys/dev/ice/ice_flex_pipe.c | 134 ++-- sys/dev/ice/ice_flex_pipe.h | 12 +- sys/dev/ice/ice_flex_type.h | 30 +- sys/dev/ice/ice_flow.c | 6 +- sys/dev/ice/ice_iflib.h | 3 + sys/dev/ice/ice_lan_tx_rx.h | 13 +- sys/dev/ice/ice_lib.c | 1207 ++++++++++++++++++++--------------- sys/dev/ice/ice_lib.h | 35 +- sys/dev/ice/ice_nvm.c | 1 + sys/dev/ice/ice_protocol_type.h | 4 + sys/dev/ice/ice_sched.c | 135 ++-- sys/dev/ice/ice_switch.c | 21 +- sys/dev/ice/ice_switch.h | 4 +- sys/dev/ice/ice_type.h | 15 +- sys/dev/ice/ice_vlan_mode.c | 239 ++++++- sys/dev/ice/ice_vlan_mode.h | 24 +- sys/dev/ice/if_ice_iflib.c | 27 +- sys/dev/ice/virtchnl.h | 513 ++++++++++++++- sys/dev/ice/virtchnl_inline_ipsec.h | 6 +- sys/dev/ice/virtchnl_lan_desc.h | 549 ++++++++++++++++ 29 files changed, 2865 insertions(+), 874 deletions(-) diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h index 9179b0ce1226..5e8560dccb1e 100644 --- a/sys/dev/ice/ice_adminq_cmd.h +++ b/sys/dev/ice/ice_adminq_cmd.h @@ -167,6 +167,7 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_SKU 0x0074 #define ICE_AQC_CAPS_PORT_MAP 0x0075 #define ICE_AQC_CAPS_PCIE_RESET_AVOIDANCE 0x0076 +#define ICE_AQC_CAPS_POST_UPDATE_RESET_RESTRICT 0x0077 #define ICE_AQC_CAPS_NVM_MGMT 0x0080 u8 major_ver; @@ -412,6 +413,40 @@ struct ice_aqc_get_allocd_res_desc { __le32 addr_low; }; +/* Request buffer for Set VLAN Mode AQ command (indirect 0x020C) */ +struct ice_aqc_set_vlan_mode { + u8 reserved; + u8 l2tag_prio_tagging; +#define ICE_AQ_VLAN_PRIO_TAG_S 0 +#define ICE_AQ_VLAN_PRIO_TAG_M (0x7 << ICE_AQ_VLAN_PRIO_TAG_S) +#define ICE_AQ_VLAN_PRIO_TAG_NOT_SUPPORTED 0x0 +#define ICE_AQ_VLAN_PRIO_TAG_STAG 0x1 +#define ICE_AQ_VLAN_PRIO_TAG_OUTER_CTAG 0x2 +#define ICE_AQ_VLAN_PRIO_TAG_OUTER_VLAN 0x3 +#define ICE_AQ_VLAN_PRIO_TAG_INNER_CTAG 0x4 +#define ICE_AQ_VLAN_PRIO_TAG_MAX 0x4 +#define ICE_AQ_VLAN_PRIO_TAG_ERROR 0x7 + u8 l2tag_reserved[64]; + u8 rdma_packet; +#define ICE_AQ_VLAN_RDMA_TAG_S 0 +#define ICE_AQ_VLAN_RDMA_TAG_M (0x3F << ICE_AQ_VLAN_RDMA_TAG_S) +#define ICE_AQ_SVM_VLAN_RDMA_PKT_FLAG_SETTING 0x10 +#define ICE_AQ_DVM_VLAN_RDMA_PKT_FLAG_SETTING 0x1A + u8 rdma_reserved[2]; + u8 mng_vlan_prot_id; +#define ICE_AQ_VLAN_MNG_PROTOCOL_ID_OUTER 0x10 +#define ICE_AQ_VLAN_MNG_PROTOCOL_ID_INNER 0x11 + u8 prot_id_reserved[30]; +}; + +/* Response buffer for Get VLAN Mode AQ command (indirect 0x020D) */ +struct ice_aqc_get_vlan_mode { + u8 vlan_mode; +#define ICE_AQ_VLAN_MODE_DVM_ENA BIT(0) + u8 l2tag_prio_tagging; + u8 reserved[98]; +}; + /* Add VSI (indirect 0x0210) * Update VSI (indirect 0x0211) * Get VSI (indirect 0x0212) @@ -485,108 +520,114 @@ struct ice_aqc_vsi_props { #define ICE_AQ_VSI_SW_FLAG_SRC_PRUNE BIT(7) u8 sw_flags2; #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_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_LAN_ENA BIT(4) u8 veb_stat_id; #define ICE_AQ_VSI_SW_VEB_STAT_ID_S 0 -#define ICE_AQ_VSI_SW_VEB_STAT_ID_M (0x1F << ICE_AQ_VSI_SW_VEB_STAT_ID_S) +#define ICE_AQ_VSI_SW_VEB_STAT_ID_M (0x1F << ICE_AQ_VSI_SW_VEB_STAT_ID_S) #define ICE_AQ_VSI_SW_VEB_STAT_ID_VALID BIT(5) /* security section */ u8 sec_flags; #define ICE_AQ_VSI_SEC_FLAG_ALLOW_DEST_OVRD BIT(0) #define ICE_AQ_VSI_SEC_FLAG_ENA_MAC_ANTI_SPOOF BIT(2) -#define ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S 4 -#define ICE_AQ_VSI_SEC_TX_PRUNE_ENA_M (0xF << ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S) +#define ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S 4 +#define ICE_AQ_VSI_SEC_TX_PRUNE_ENA_M (0xF << ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S) #define ICE_AQ_VSI_SEC_TX_VLAN_PRUNE_ENA BIT(0) u8 sec_reserved; /* VLAN section */ - __le16 pvid; /* VLANS include priority bits */ - u8 pvlan_reserved[2]; - u8 vlan_flags; -#define ICE_AQ_VSI_VLAN_MODE_S 0 -#define ICE_AQ_VSI_VLAN_MODE_M (0x3 << ICE_AQ_VSI_VLAN_MODE_S) -#define ICE_AQ_VSI_VLAN_MODE_UNTAGGED 0x1 -#define ICE_AQ_VSI_VLAN_MODE_TAGGED 0x2 -#define ICE_AQ_VSI_VLAN_MODE_ALL 0x3 -#define ICE_AQ_VSI_PVLAN_INSERT_PVID BIT(2) -#define ICE_AQ_VSI_VLAN_EMOD_S 3 -#define ICE_AQ_VSI_VLAN_EMOD_M (0x3 << ICE_AQ_VSI_VLAN_EMOD_S) -#define ICE_AQ_VSI_VLAN_EMOD_STR_BOTH (0x0 << ICE_AQ_VSI_VLAN_EMOD_S) -#define ICE_AQ_VSI_VLAN_EMOD_STR_UP (0x1 << ICE_AQ_VSI_VLAN_EMOD_S) -#define ICE_AQ_VSI_VLAN_EMOD_STR (0x2 << ICE_AQ_VSI_VLAN_EMOD_S) -#define ICE_AQ_VSI_VLAN_EMOD_NOTHING (0x3 << ICE_AQ_VSI_VLAN_EMOD_S) - u8 pvlan_reserved2[3]; + __le16 port_based_inner_vlan; /* VLANS include priority bits */ + u8 inner_vlan_reserved[2]; + u8 inner_vlan_flags; +#define ICE_AQ_VSI_INNER_VLAN_TX_MODE_S 0 +#define ICE_AQ_VSI_INNER_VLAN_TX_MODE_M (0x3 << ICE_AQ_VSI_INNER_VLAN_TX_MODE_S) +#define ICE_AQ_VSI_INNER_VLAN_TX_MODE_ACCEPTUNTAGGED 0x1 +#define ICE_AQ_VSI_INNER_VLAN_TX_MODE_ACCEPTTAGGED 0x2 +#define ICE_AQ_VSI_INNER_VLAN_TX_MODE_ALL 0x3 +#define ICE_AQ_VSI_INNER_VLAN_INSERT_PVID BIT(2) +#define ICE_AQ_VSI_INNER_VLAN_EMODE_S 3 +#define ICE_AQ_VSI_INNER_VLAN_EMODE_M (0x3 << ICE_AQ_VSI_INNER_VLAN_EMODE_S) +#define ICE_AQ_VSI_INNER_VLAN_EMODE_STR_BOTH (0x0 << ICE_AQ_VSI_INNER_VLAN_EMODE_S) +#define ICE_AQ_VSI_INNER_VLAN_EMODE_STR_UP (0x1 << ICE_AQ_VSI_INNER_VLAN_EMODE_S) +#define ICE_AQ_VSI_INNER_VLAN_EMODE_STR (0x2 << ICE_AQ_VSI_INNER_VLAN_EMODE_S) +#define ICE_AQ_VSI_INNER_VLAN_EMODE_NOTHING (0x3 << ICE_AQ_VSI_INNER_VLAN_EMODE_S) +#define ICE_AQ_VSI_INNER_VLAN_BLOCK_TX_DESC BIT(5) + u8 inner_vlan_reserved2[3]; /* ingress egress up sections */ __le32 ingress_table; /* bitmap, 3 bits per up */ -#define ICE_AQ_VSI_UP_TABLE_UP0_S 0 -#define ICE_AQ_VSI_UP_TABLE_UP0_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP0_S) -#define ICE_AQ_VSI_UP_TABLE_UP1_S 3 -#define ICE_AQ_VSI_UP_TABLE_UP1_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP1_S) -#define ICE_AQ_VSI_UP_TABLE_UP2_S 6 -#define ICE_AQ_VSI_UP_TABLE_UP2_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP2_S) -#define ICE_AQ_VSI_UP_TABLE_UP3_S 9 -#define ICE_AQ_VSI_UP_TABLE_UP3_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP3_S) -#define ICE_AQ_VSI_UP_TABLE_UP4_S 12 -#define ICE_AQ_VSI_UP_TABLE_UP4_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP4_S) -#define ICE_AQ_VSI_UP_TABLE_UP5_S 15 -#define ICE_AQ_VSI_UP_TABLE_UP5_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP5_S) -#define ICE_AQ_VSI_UP_TABLE_UP6_S 18 -#define ICE_AQ_VSI_UP_TABLE_UP6_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP6_S) -#define ICE_AQ_VSI_UP_TABLE_UP7_S 21 -#define ICE_AQ_VSI_UP_TABLE_UP7_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP7_S) +#define ICE_AQ_VSI_UP_TABLE_UP0_S 0 +#define ICE_AQ_VSI_UP_TABLE_UP0_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP0_S) +#define ICE_AQ_VSI_UP_TABLE_UP1_S 3 +#define ICE_AQ_VSI_UP_TABLE_UP1_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP1_S) +#define ICE_AQ_VSI_UP_TABLE_UP2_S 6 +#define ICE_AQ_VSI_UP_TABLE_UP2_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP2_S) +#define ICE_AQ_VSI_UP_TABLE_UP3_S 9 +#define ICE_AQ_VSI_UP_TABLE_UP3_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP3_S) +#define ICE_AQ_VSI_UP_TABLE_UP4_S 12 +#define ICE_AQ_VSI_UP_TABLE_UP4_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP4_S) +#define ICE_AQ_VSI_UP_TABLE_UP5_S 15 +#define ICE_AQ_VSI_UP_TABLE_UP5_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP5_S) +#define ICE_AQ_VSI_UP_TABLE_UP6_S 18 +#define ICE_AQ_VSI_UP_TABLE_UP6_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP6_S) +#define ICE_AQ_VSI_UP_TABLE_UP7_S 21 +#define ICE_AQ_VSI_UP_TABLE_UP7_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP7_S) __le32 egress_table; /* same defines as for ingress table */ /* outer tags section */ - __le16 outer_tag; - u8 outer_tag_flags; -#define ICE_AQ_VSI_OUTER_TAG_MODE_S 0 -#define ICE_AQ_VSI_OUTER_TAG_MODE_M (0x3 << ICE_AQ_VSI_OUTER_TAG_MODE_S) -#define ICE_AQ_VSI_OUTER_TAG_NOTHING 0x0 -#define ICE_AQ_VSI_OUTER_TAG_REMOVE 0x1 -#define ICE_AQ_VSI_OUTER_TAG_COPY 0x2 -#define ICE_AQ_VSI_OUTER_TAG_TYPE_S 2 -#define ICE_AQ_VSI_OUTER_TAG_TYPE_M (0x3 << ICE_AQ_VSI_OUTER_TAG_TYPE_S) -#define ICE_AQ_VSI_OUTER_TAG_NONE 0x0 -#define ICE_AQ_VSI_OUTER_TAG_STAG 0x1 -#define ICE_AQ_VSI_OUTER_TAG_VLAN_8100 0x2 -#define ICE_AQ_VSI_OUTER_TAG_VLAN_9100 0x3 -#define ICE_AQ_VSI_OUTER_TAG_INSERT BIT(4) -#define ICE_AQ_VSI_OUTER_TAG_ACCEPT_HOST BIT(6) - u8 outer_tag_reserved; + __le16 port_based_outer_vlan; + u8 outer_vlan_flags; +#define ICE_AQ_VSI_OUTER_VLAN_EMODE_S 0 +#define ICE_AQ_VSI_OUTER_VLAN_EMODE_M (0x3 << ICE_AQ_VSI_OUTER_VLAN_EMODE_S) +#define ICE_AQ_VSI_OUTER_VLAN_EMODE_SHOW_BOTH 0x0 +#define ICE_AQ_VSI_OUTER_VLAN_EMODE_SHOW_UP 0x1 +#define ICE_AQ_VSI_OUTER_VLAN_EMODE_SHOW 0x2 +#define ICE_AQ_VSI_OUTER_VLAN_EMODE_NOTHING 0x3 +#define ICE_AQ_VSI_OUTER_TAG_TYPE_S 2 +#define ICE_AQ_VSI_OUTER_TAG_TYPE_M (0x3 << ICE_AQ_VSI_OUTER_TAG_TYPE_S) +#define ICE_AQ_VSI_OUTER_TAG_NONE 0x0 +#define ICE_AQ_VSI_OUTER_TAG_STAG 0x1 +#define ICE_AQ_VSI_OUTER_TAG_VLAN_8100 0x2 +#define ICE_AQ_VSI_OUTER_TAG_VLAN_9100 0x3 +#define ICE_AQ_VSI_OUTER_VLAN_PORT_BASED_INSERT BIT(4) +#define ICE_AQ_VSI_OUTER_VLAN_TX_MODE_S 5 +#define ICE_AQ_VSI_OUTER_VLAN_TX_MODE_M (0x3 << ICE_AQ_VSI_OUTER_VLAN_TX_MODE_S) +#define ICE_AQ_VSI_OUTER_VLAN_TX_MODE_ACCEPTUNTAGGED 0x1 +#define ICE_AQ_VSI_OUTER_VLAN_TX_MODE_ACCEPTTAGGED 0x2 +#define ICE_AQ_VSI_OUTER_VLAN_TX_MODE_ALL 0x3 +#define ICE_AQ_VSI_OUTER_VLAN_BLOCK_TX_DESC BIT(7) + u8 outer_vlan_reserved; /* queue mapping section */ __le16 mapping_flags; -#define ICE_AQ_VSI_Q_MAP_CONTIG 0x0 -#define ICE_AQ_VSI_Q_MAP_NONCONTIG BIT(0) +#define ICE_AQ_VSI_Q_MAP_CONTIG 0x0 +#define ICE_AQ_VSI_Q_MAP_NONCONTIG BIT(0) __le16 q_mapping[16]; -#define ICE_AQ_VSI_Q_S 0 -#define ICE_AQ_VSI_Q_M (0x7FF << ICE_AQ_VSI_Q_S) +#define ICE_AQ_VSI_Q_S 0 +#define ICE_AQ_VSI_Q_M (0x7FF << ICE_AQ_VSI_Q_S) __le16 tc_mapping[8]; -#define ICE_AQ_VSI_TC_Q_OFFSET_S 0 -#define ICE_AQ_VSI_TC_Q_OFFSET_M (0x7FF << ICE_AQ_VSI_TC_Q_OFFSET_S) -#define ICE_AQ_VSI_TC_Q_NUM_S 11 -#define ICE_AQ_VSI_TC_Q_NUM_M (0xF << ICE_AQ_VSI_TC_Q_NUM_S) +#define ICE_AQ_VSI_TC_Q_OFFSET_S 0 +#define ICE_AQ_VSI_TC_Q_OFFSET_M (0x7FF << ICE_AQ_VSI_TC_Q_OFFSET_S) +#define ICE_AQ_VSI_TC_Q_NUM_S 11 +#define ICE_AQ_VSI_TC_Q_NUM_M (0xF << ICE_AQ_VSI_TC_Q_NUM_S) /* queueing option section */ u8 q_opt_rss; -#define ICE_AQ_VSI_Q_OPT_RSS_LUT_S 0 -#define ICE_AQ_VSI_Q_OPT_RSS_LUT_M (0x3 << ICE_AQ_VSI_Q_OPT_RSS_LUT_S) -#define ICE_AQ_VSI_Q_OPT_RSS_LUT_VSI 0x0 -#define ICE_AQ_VSI_Q_OPT_RSS_LUT_PF 0x2 -#define ICE_AQ_VSI_Q_OPT_RSS_LUT_GBL 0x3 -#define ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_S 2 -#define ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_M (0xF << ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_S) -#define ICE_AQ_VSI_Q_OPT_RSS_HASH_S 6 -#define ICE_AQ_VSI_Q_OPT_RSS_HASH_M (0x3 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) -#define ICE_AQ_VSI_Q_OPT_RSS_TPLZ (0x0 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) -#define ICE_AQ_VSI_Q_OPT_RSS_SYM_TPLZ (0x1 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) -#define ICE_AQ_VSI_Q_OPT_RSS_XOR (0x2 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) -#define ICE_AQ_VSI_Q_OPT_RSS_JHASH (0x3 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) +#define ICE_AQ_VSI_Q_OPT_RSS_LUT_S 0 +#define ICE_AQ_VSI_Q_OPT_RSS_LUT_M (0x3 << ICE_AQ_VSI_Q_OPT_RSS_LUT_S) +#define ICE_AQ_VSI_Q_OPT_RSS_LUT_VSI 0x0 +#define ICE_AQ_VSI_Q_OPT_RSS_LUT_PF 0x2 +#define ICE_AQ_VSI_Q_OPT_RSS_LUT_GBL 0x3 +#define ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_S 2 +#define ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_M (0xF << ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_S) +#define ICE_AQ_VSI_Q_OPT_RSS_HASH_S 6 +#define ICE_AQ_VSI_Q_OPT_RSS_HASH_M (0x3 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) +#define ICE_AQ_VSI_Q_OPT_RSS_TPLZ (0x0 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) +#define ICE_AQ_VSI_Q_OPT_RSS_SYM_TPLZ (0x1 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) +#define ICE_AQ_VSI_Q_OPT_RSS_XOR (0x2 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) +#define ICE_AQ_VSI_Q_OPT_RSS_JHASH (0x3 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) u8 q_opt_tc; -#define ICE_AQ_VSI_Q_OPT_TC_OVR_S 0 -#define ICE_AQ_VSI_Q_OPT_TC_OVR_M (0x1F << ICE_AQ_VSI_Q_OPT_TC_OVR_S) -#define ICE_AQ_VSI_Q_OPT_PROF_TC_OVR BIT(7) +#define ICE_AQ_VSI_Q_OPT_TC_OVR_S 0 +#define ICE_AQ_VSI_Q_OPT_TC_OVR_M (0x1F << ICE_AQ_VSI_Q_OPT_TC_OVR_S) +#define ICE_AQ_VSI_Q_OPT_PROF_TC_OVR BIT(7) u8 q_opt_flags; -#define ICE_AQ_VSI_Q_OPT_PE_FLTR_EN BIT(0) +#define ICE_AQ_VSI_Q_OPT_PE_FLTR_EN BIT(0) u8 q_opt_reserved[3]; /* outer up section */ __le32 outer_up_table; /* same structure and defines as ingress tbl */ @@ -594,27 +635,27 @@ struct ice_aqc_vsi_props { __le16 sect_10_reserved; /* flow director section */ __le16 fd_options; -#define ICE_AQ_VSI_FD_ENABLE BIT(0) -#define ICE_AQ_VSI_FD_TX_AUTO_ENABLE BIT(1) -#define ICE_AQ_VSI_FD_PROG_ENABLE BIT(3) +#define ICE_AQ_VSI_FD_ENABLE BIT(0) +#define ICE_AQ_VSI_FD_TX_AUTO_ENABLE BIT(1) +#define ICE_AQ_VSI_FD_PROG_ENABLE BIT(3) __le16 max_fd_fltr_dedicated; __le16 max_fd_fltr_shared; __le16 fd_def_q; -#define ICE_AQ_VSI_FD_DEF_Q_S 0 -#define ICE_AQ_VSI_FD_DEF_Q_M (0x7FF << ICE_AQ_VSI_FD_DEF_Q_S) -#define ICE_AQ_VSI_FD_DEF_GRP_S 12 -#define ICE_AQ_VSI_FD_DEF_GRP_M (0x7 << ICE_AQ_VSI_FD_DEF_GRP_S) +#define ICE_AQ_VSI_FD_DEF_Q_S 0 +#define ICE_AQ_VSI_FD_DEF_Q_M (0x7FF << ICE_AQ_VSI_FD_DEF_Q_S) +#define ICE_AQ_VSI_FD_DEF_GRP_S 12 +#define ICE_AQ_VSI_FD_DEF_GRP_M (0x7 << ICE_AQ_VSI_FD_DEF_GRP_S) __le16 fd_report_opt; -#define ICE_AQ_VSI_FD_REPORT_Q_S 0 -#define ICE_AQ_VSI_FD_REPORT_Q_M (0x7FF << ICE_AQ_VSI_FD_REPORT_Q_S) -#define ICE_AQ_VSI_FD_DEF_PRIORITY_S 12 -#define ICE_AQ_VSI_FD_DEF_PRIORITY_M (0x7 << ICE_AQ_VSI_FD_DEF_PRIORITY_S) -#define ICE_AQ_VSI_FD_DEF_DROP BIT(15) +#define ICE_AQ_VSI_FD_REPORT_Q_S 0 +#define ICE_AQ_VSI_FD_REPORT_Q_M (0x7FF << ICE_AQ_VSI_FD_REPORT_Q_S) +#define ICE_AQ_VSI_FD_DEF_PRIORITY_S 12 +#define ICE_AQ_VSI_FD_DEF_PRIORITY_M (0x7 << ICE_AQ_VSI_FD_DEF_PRIORITY_S) +#define ICE_AQ_VSI_FD_DEF_DROP BIT(15) /* PASID section */ __le32 pasid_id; -#define ICE_AQ_VSI_PASID_ID_S 0 -#define ICE_AQ_VSI_PASID_ID_M (0xFFFFF << ICE_AQ_VSI_PASID_ID_S) -#define ICE_AQ_VSI_PASID_ID_VALID BIT(31) +#define ICE_AQ_VSI_PASID_ID_S 0 +#define ICE_AQ_VSI_PASID_ID_M (0xFFFFF << ICE_AQ_VSI_PASID_ID_S) +#define ICE_AQ_VSI_PASID_ID_VALID BIT(31) u8 reserved[24]; }; @@ -992,7 +1033,8 @@ struct ice_aqc_txsched_move_grp_info_hdr { __le32 src_parent_teid; __le32 dest_parent_teid; __le16 num_elems; - __le16 reserved; + u8 flags; + u8 reserved; }; struct ice_aqc_move_elem { @@ -1197,16 +1239,18 @@ struct ice_aqc_get_phy_caps { __le16 param0; /* 18.0 - Report qualified modules */ #define ICE_AQC_GET_PHY_RQM BIT(0) - /* 18.1 - 18.2 : Report mode - * 00b - Report NVM capabilities - * 01b - Report topology capabilities - * 10b - Report SW configured + /* 18.1 - 18.3 : Report mode + * 000b - Report NVM capabilities + * 001b - Report topology capabilities + * 010b - Report SW configured + * 100b - Report default capabilities */ -#define ICE_AQC_REPORT_MODE_S 1 -#define ICE_AQC_REPORT_MODE_M (3 << ICE_AQC_REPORT_MODE_S) -#define ICE_AQC_REPORT_NVM_CAP 0 -#define ICE_AQC_REPORT_TOPO_CAP BIT(1) -#define ICE_AQC_REPORT_SW_CFG BIT(2) +#define ICE_AQC_REPORT_MODE_S 1 +#define ICE_AQC_REPORT_MODE_M (7 << ICE_AQC_REPORT_MODE_S) +#define ICE_AQC_REPORT_TOPO_CAP_NO_MEDIA 0 +#define ICE_AQC_REPORT_TOPO_CAP_MEDIA BIT(1) +#define ICE_AQC_REPORT_ACTIVE_CFG BIT(2) +#define ICE_AQC_REPORT_DFLT_CFG BIT(3) __le32 reserved1; __le32 addr_high; __le32 addr_low; @@ -1446,11 +1490,13 @@ struct ice_aqc_get_link_status_data { #define ICE_AQ_LINK_TOPO_UNDRUTIL_MEDIA BIT(6) #define ICE_AQ_LINK_TOPO_UNSUPP_MEDIA BIT(7) u8 link_cfg_err; -#define ICE_AQ_LINK_CFG_ERR BIT(0) -#define ICE_AQ_LINK_ACT_PORT_OPT_INVAL BIT(2) +#define ICE_AQ_LINK_CFG_ERR BIT(0) +#define ICE_AQ_LINK_ACT_PORT_OPT_INVAL BIT(2) #define ICE_AQ_LINK_FEAT_ID_OR_CONFIG_ID_INVAL BIT(3) #define ICE_AQ_LINK_TOPO_CRITICAL_SDP_ERR BIT(4) #define ICE_AQ_LINK_MODULE_POWER_UNSUPPORTED BIT(5) +#define ICE_AQ_LINK_EXTERNAL_PHY_LOAD_FAILURE BIT(6) +#define ICE_AQ_LINK_INVAL_MAX_POWER_LIMIT BIT(7) u8 link_info; #define ICE_AQ_LINK_UP BIT(0) /* Link Status */ #define ICE_AQ_LINK_FAULT BIT(1) @@ -1932,7 +1978,11 @@ struct ice_aqc_get_port_options { #define ICE_AQC_PORT_OPT_ACTIVE_M (0xF << ICE_AQC_PORT_OPT_ACTIVE_S) #define ICE_AQC_PORT_OPT_FORCED BIT(6) #define ICE_AQC_PORT_OPT_VALID BIT(7) - u8 rsvd[3]; + u8 pending_port_option_status; +#define ICE_AQC_PENDING_PORT_OPT_IDX_S 0 +#define ICE_AQC_PENDING_PORT_OPT_IDX_M (0xF << ICE_AQC_PENDING_PORT_OPT_IDX_S) +#define ICE_AQC_PENDING_PORT_OPT_VALID BIT(7) + u8 rsvd[2]; __le32 addr_high; __le32 addr_low; }; @@ -1957,6 +2007,7 @@ struct ice_aqc_get_port_options_elem { #define ICE_AQC_PORT_OPT_MAX_LANE_100G 7 u8 global_scid[2]; u8 phy_scid[2]; + u8 pf2port_cid[2]; }; /* Set Port Option (direct, 0x06EB) */ @@ -2021,6 +2072,25 @@ struct ice_aqc_sw_gpio { u8 rsvd[12]; }; +/* Program topology device NVM (direct, 0x06F2) */ +struct ice_aqc_program_topology_device_nvm { + u8 lport_num; + u8 lport_num_valid; + u8 node_type_ctx; + u8 index; + u8 rsvd[12]; +}; + +/* Read topology device NVM (indirect, 0x06F3) */ +struct ice_aqc_read_topology_device_nvm { + u8 lport_num; + u8 lport_num_valid; + u8 node_type_ctx; + u8 index; + __le32 start_address; + u8 data_read[8]; +}; + /* NVM Read command (indirect 0x0701) * NVM Erase commands (direct 0x0702) * NVM Write commands (indirect 0x0703) @@ -2050,6 +2120,7 @@ struct ice_aqc_nvm { #define ICE_AQC_NVM_POR_FLAG 0 /* Used by NVM Write completion on ARQ */ #define ICE_AQC_NVM_PERST_FLAG 1 #define ICE_AQC_NVM_EMPR_FLAG 2 +#define ICE_AQC_NVM_EMPR_ENA BIT(0) __le16 module_typeid; __le16 length; #define ICE_AQC_NVM_ERASE_LEN 0xFFFF @@ -2667,6 +2738,50 @@ struct ice_aqc_clear_health_status { __le32 reserved[4]; }; +/* Set FW Logging configuration (indirect 0xFF30) + * Register for FW Logging (indirect 0xFF31) + * Query FW Logging (indirect 0xFF32) + * FW Log Event (indirect 0xFF33) + * Get FW Log (indirect 0xFF34) + * Clear FW Log (indirect 0xFF35) + */ + +struct ice_aqc_fw_log { + u8 cmd_flags; +#define ICE_AQC_FW_LOG_CONF_UART_EN BIT(0) +#define ICE_AQC_FW_LOG_CONF_AQ_EN BIT(1) +#define ICE_AQC_FW_LOG_CONF_SET_VALID BIT(3) +#define ICE_AQC_FW_LOG_AQ_REGISTER BIT(0) +#define ICE_AQC_FW_LOG_AQ_QUERY BIT(2) +#define ICE_AQC_FW_LOG_PERSISTENT BIT(0) + u8 rsp_flag; +#define ICE_AQC_FW_LOG_MORE_DATA BIT(1) + __le16 fw_rt_msb; + union { + struct { + __le32 fw_rt_lsb; + } sync; + struct { + __le16 log_resolution; +#define ICE_AQC_FW_LOG_MIN_RESOLUTION (1) +#define ICE_AQC_FW_LOG_MAX_RESOLUTION (128) + __le16 mdl_cnt; + } cfg; + } ops; + __le32 addr_high; + __le32 addr_low; +}; + +/* Response Buffer for: + * Set Firmware Logging Configuration (0xFF30) + * Query FW Logging (0xFF32) + */ +struct ice_aqc_fw_log_cfg_resp { + __le16 module_identifier; + u8 log_level; + u8 rsvd0; +}; + /** * struct ice_aq_desc - Admin Queue (AQ) descriptor * @flags: ICE_AQ_FLAG_* flags @@ -2718,10 +2833,13 @@ struct ice_aq_desc { struct ice_aqc_dnl_read_log_command dnl_read_log; struct ice_aqc_dnl_read_log_response dnl_read_log_resp; struct ice_aqc_i2c read_write_i2c; + struct ice_aqc_read_i2c_resp read_i2c_resp; struct ice_aqc_mdio read_write_mdio; struct ice_aqc_gpio_by_func read_write_gpio_by_func; struct ice_aqc_gpio read_write_gpio; struct ice_aqc_set_led set_led; + struct ice_aqc_mdio read_mdio; + struct ice_aqc_mdio write_mdio; struct ice_aqc_sff_eeprom read_write_sff_param; struct ice_aqc_set_port_id_led set_port_id_led; struct ice_aqc_get_port_options get_port_options; @@ -2888,6 +3006,8 @@ enum ice_adminq_opc { ice_aqc_opc_alloc_res = 0x0208, ice_aqc_opc_free_res = 0x0209, ice_aqc_opc_get_allocd_res_desc = 0x020A, + ice_aqc_opc_set_vlan_mode_parameters = 0x020C, + ice_aqc_opc_get_vlan_mode_parameters = 0x020D, /* VSI commands */ ice_aqc_opc_add_vsi = 0x0210, @@ -2965,6 +3085,8 @@ enum ice_adminq_opc { ice_aqc_opc_sff_eeprom = 0x06EE, ice_aqc_opc_sw_set_gpio = 0x06EF, ice_aqc_opc_sw_get_gpio = 0x06F0, + ice_aqc_opc_program_topology_device_nvm = 0x06F2, + ice_aqc_opc_read_topology_device_nvm = 0x06F3, /* NVM commands */ ice_aqc_opc_nvm_read = 0x0701, @@ -3030,7 +3152,15 @@ enum ice_adminq_opc { ice_aqc_opc_set_health_status_config = 0xFF20, ice_aqc_opc_get_supported_health_status_codes = 0xFF21, ice_aqc_opc_get_health_status = 0xFF22, - ice_aqc_opc_clear_health_status = 0xFF23 + ice_aqc_opc_clear_health_status = 0xFF23, + + /* FW Logging Commands */ + ice_aqc_opc_fw_logs_config = 0xFF30, + ice_aqc_opc_fw_logs_register = 0xFF31, + ice_aqc_opc_fw_logs_query = 0xFF32, + ice_aqc_opc_fw_logs_event = 0xFF33, + ice_aqc_opc_fw_logs_get = 0xFF34, + ice_aqc_opc_fw_logs_clear = 0xFF35 }; #endif /* _ICE_ADMINQ_CMD_H_ */ diff --git a/sys/dev/ice/ice_bitops.h b/sys/dev/ice/ice_bitops.h index a7f729060b78..0e04cab87be9 100644 --- a/sys/dev/ice/ice_bitops.h +++ b/sys/dev/ice/ice_bitops.h @@ -477,6 +477,51 @@ ice_cmp_bitmap(ice_bitmap_t *bmp1, ice_bitmap_t *bmp2, u16 size) return true; } +/** + * ice_bitmap_from_array32 - copies u32 array source into bitmap destination + * @dst: the destination bitmap + * @src: the source u32 array + * @size: size of the bitmap (in bits) + * + * This function copies the src bitmap stored in an u32 array into the dst + * bitmap stored as an ice_bitmap_t. + */ +static inline void +ice_bitmap_from_array32(ice_bitmap_t *dst, u32 *src, u16 size) +{ + u32 remaining_bits, i; + +#define BITS_PER_U32 (sizeof(u32) * BITS_PER_BYTE) + /* clear bitmap so we only have to set when iterating */ + ice_zero_bitmap(dst, size); + + for (i = 0; i < (u32)(size / BITS_PER_U32); i++) { + u32 bit_offset = i * BITS_PER_U32; + u32 entry = src[i]; + u32 j; + + for (j = 0; j < BITS_PER_U32; j++) { + if (entry & BIT(j)) + ice_set_bit((u16)(j + bit_offset), dst); + } + } + + /* still need to check the leftover bits (i.e. if size isn't evenly + * divisible by BITS_PER_U32 + **/ + remaining_bits = size % BITS_PER_U32; + if (remaining_bits) { + u32 bit_offset = i * BITS_PER_U32; + u32 entry = src[i]; + u32 j; + + for (j = 0; j < remaining_bits; j++) { + if (entry & BIT(j)) + ice_set_bit((u16)(j + bit_offset), dst); + } + } +} + #undef BIT_CHUNK #undef BIT_IN_CHUNK #undef LAST_CHUNK_BITS diff --git a/sys/dev/ice/ice_common.c b/sys/dev/ice/ice_common.c index 5e2e4340c75c..1e5d6dcb7d30 100644 --- a/sys/dev/ice/ice_common.c +++ b/sys/dev/ice/ice_common.c @@ -189,6 +189,10 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, return ICE_ERR_PARAM; hw = pi->hw; + if (report_mode == ICE_AQC_REPORT_DFLT_CFG && + !ice_fw_supports_report_dflt_cfg(hw)) + return ICE_ERR_PARAM; + ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_phy_caps); if (qual_mods) @@ -222,7 +226,7 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, ice_debug(hw, ICE_DBG_LINK, " module_type[2] = 0x%x\n", pcaps->module_type[2]); - if (status == ICE_SUCCESS && report_mode == ICE_AQC_REPORT_TOPO_CAP) { + if (status == ICE_SUCCESS && report_mode == ICE_AQC_REPORT_TOPO_CAP_MEDIA) { pi->phy.phy_type_low = LE64_TO_CPU(pcaps->phy_type_low); pi->phy.phy_type_high = LE64_TO_CPU(pcaps->phy_type_high); ice_memcpy(pi->phy.link_info.module_type, &pcaps->module_type, @@ -454,6 +458,7 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, li->phy_type_high = LE64_TO_CPU(link_data.phy_type_high); *hw_media_type = ice_get_media_type(pi); li->link_info = link_data.link_info; + li->link_cfg_err = link_data.link_cfg_err; li->an_info = link_data.an_info; li->ext_info = link_data.ext_info; li->max_frame_size = LE16_TO_CPU(link_data.max_frame_size); @@ -803,10 +808,11 @@ enum ice_status ice_init_hw(struct ice_hw *hw) /* Initialize port_info struct with PHY capabilities */ status = ice_aq_get_phy_caps(hw->port_info, false, - ICE_AQC_REPORT_TOPO_CAP, pcaps, NULL); + ICE_AQC_REPORT_TOPO_CAP_MEDIA, pcaps, NULL); ice_free(hw, pcaps); if (status) - ice_debug(hw, ICE_DBG_PHY, "Get PHY capabilities failed, continuing anyway\n"); + ice_warn(hw, "Get PHY capabilities failed status = %d, continuing anyway\n", + status); /* Initialize port_info struct with link information */ status = ice_aq_get_link_info(hw->port_info, false, NULL, NULL); @@ -851,8 +857,6 @@ enum ice_status ice_init_hw(struct ice_hw *hw) goto err_unroll_fltr_mgmt_struct; ice_init_lock(&hw->tnl_lock); - ice_init_vlan_mode_ops(hw); - return ICE_SUCCESS; err_unroll_fltr_mgmt_struct: @@ -1363,6 +1367,97 @@ ice_clear_tx_drbell_q_ctx(struct ice_hw *hw, u32 tx_drbell_q_index) /* FW Admin Queue command wrappers */ +/** + * ice_should_retry_sq_send_cmd + * @opcode: AQ opcode + * + * Decide if we should retry the send command routine for the ATQ, depending + * on the opcode. + */ +static bool ice_should_retry_sq_send_cmd(u16 opcode) +{ + switch (opcode) { + case ice_aqc_opc_dnl_get_status: + case ice_aqc_opc_dnl_run: + case ice_aqc_opc_dnl_call: + case ice_aqc_opc_dnl_read_sto: + case ice_aqc_opc_dnl_write_sto: + case ice_aqc_opc_dnl_set_breakpoints: + case ice_aqc_opc_dnl_read_log: + case ice_aqc_opc_get_link_topo: + case ice_aqc_opc_done_alt_write: + case ice_aqc_opc_lldp_stop: + case ice_aqc_opc_lldp_start: + case ice_aqc_opc_lldp_filter_ctrl: + return true; + } + + return false; +} + +/** + * ice_sq_send_cmd_retry - send command to Control Queue (ATQ) + * @hw: pointer to the HW struct + * @cq: pointer to the specific Control queue + * @desc: prefilled descriptor describing the command + * @buf: buffer to use for indirect commands (or NULL for direct commands) + * @buf_size: size of buffer for indirect commands (or 0 for direct commands) + * @cd: pointer to command details structure + * + * Retry sending the FW Admin Queue command, multiple times, to the FW Admin + * Queue if the EBUSY AQ error is returned. + */ +static enum ice_status +ice_sq_send_cmd_retry(struct ice_hw *hw, struct ice_ctl_q_info *cq, + struct ice_aq_desc *desc, void *buf, u16 buf_size, + struct ice_sq_cd *cd) +{ + struct ice_aq_desc desc_cpy; + enum ice_status status; + bool is_cmd_for_retry; + u8 *buf_cpy = NULL; + u8 idx = 0; + u16 opcode; + + opcode = LE16_TO_CPU(desc->opcode); + is_cmd_for_retry = ice_should_retry_sq_send_cmd(opcode); + ice_memset(&desc_cpy, 0, sizeof(desc_cpy), ICE_NONDMA_MEM); + + if (is_cmd_for_retry) { + if (buf) { + buf_cpy = (u8 *)ice_malloc(hw, buf_size); + if (!buf_cpy) + return ICE_ERR_NO_MEMORY; + } + + ice_memcpy(&desc_cpy, desc, sizeof(desc_cpy), + ICE_NONDMA_TO_NONDMA); + } + + do { + status = ice_sq_send_cmd(hw, cq, desc, buf, buf_size, cd); + + if (!is_cmd_for_retry || status == ICE_SUCCESS || + hw->adminq.sq_last_status != ICE_AQ_RC_EBUSY) + break; + + if (buf_cpy) + ice_memcpy(buf, buf_cpy, buf_size, + ICE_NONDMA_TO_NONDMA); + + ice_memcpy(desc, &desc_cpy, sizeof(desc_cpy), + ICE_NONDMA_TO_NONDMA); + + ice_msec_delay(ICE_SQ_SEND_DELAY_TIME_MS, false); + + } while (++idx < ICE_SQ_SEND_MAX_EXECUTE); + + if (buf_cpy) + ice_free(hw, buf_cpy); + + return status; +} + /** * ice_aq_send_cmd - send FW Admin Queue command to FW Admin Queue * @hw: pointer to the HW struct @@ -1377,7 +1472,7 @@ enum ice_status ice_aq_send_cmd(struct ice_hw *hw, struct ice_aq_desc *desc, void *buf, u16 buf_size, struct ice_sq_cd *cd) { - return ice_sq_send_cmd(hw, &hw->adminq, desc, buf, buf_size, cd); + return ice_sq_send_cmd_retry(hw, &hw->adminq, desc, buf, buf_size, cd); } /** @@ -1817,15 +1912,15 @@ static u32 ice_get_num_per_func(struct ice_hw *hw, u32 max) * @hw: pointer to the ice_hw instance * @caps: pointer to common caps instance * @prefix: string to prefix when printing - * @debug: set to indicate debug print + * @dbg: set to indicate debug print */ static void ice_print_led_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, - char const *prefix, bool debug) + char const *prefix, bool dbg) { u8 i; - if (debug) + if (dbg) ice_debug(hw, ICE_DBG_INIT, "%s: led_pin_num = %d\n", prefix, caps->led_pin_num); else @@ -1836,7 +1931,7 @@ ice_print_led_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, if (!caps->led[i]) continue; - if (debug) + if (dbg) ice_debug(hw, ICE_DBG_INIT, "%s: led[%d] = %d\n", prefix, i, caps->led[i]); else @@ -1850,15 +1945,15 @@ ice_print_led_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, * @hw: pointer to the ice_hw instance * @caps: pointer to common caps instance * @prefix: string to prefix when printing - * @debug: set to indicate debug print + * @dbg: set to indicate debug print */ static void ice_print_sdp_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, - char const *prefix, bool debug) + char const *prefix, bool dbg) { u8 i; - if (debug) + if (dbg) ice_debug(hw, ICE_DBG_INIT, "%s: sdp_pin_num = %d\n", prefix, caps->sdp_pin_num); else @@ -1869,7 +1964,7 @@ ice_print_sdp_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, if (!caps->sdp[i]) continue; - if (debug) + if (dbg) ice_debug(hw, ICE_DBG_INIT, "%s: sdp[%d] = %d\n", prefix, i, caps->sdp[i]); else @@ -2825,7 +2920,7 @@ enum ice_status ice_update_link_info(struct ice_port_info *pi) if (!pcaps) return ICE_ERR_NO_MEMORY; - status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP, + status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP_MEDIA, pcaps, NULL); if (status == ICE_SUCCESS) @@ -2933,7 +3028,6 @@ ice_cfg_phy_fc(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, if (!pi || !cfg) return ICE_ERR_BAD_PTR; - switch (req_mode) { case ICE_FC_AUTO: { @@ -2944,11 +3038,10 @@ ice_cfg_phy_fc(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, ice_malloc(pi->hw, sizeof(*pcaps)); if (!pcaps) return ICE_ERR_NO_MEMORY; - /* Query the value of FC that both the NIC and attached media * can do. */ - status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP, + status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP_MEDIA, pcaps, NULL); if (status) { ice_free(pi->hw, pcaps); @@ -3017,8 +3110,9 @@ ice_set_fc(struct ice_port_info *pi, u8 *aq_failures, bool ena_auto_link_update) return ICE_ERR_NO_MEMORY; /* Get the current PHY config */ - status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_SW_CFG, pcaps, - NULL); + status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_ACTIVE_CFG, + pcaps, NULL); + if (status) { *aq_failures = ICE_SET_FC_AQ_FAIL_GET; goto out; @@ -3135,17 +3229,6 @@ ice_copy_phy_caps_to_cfg(struct ice_port_info *pi, cfg->link_fec_opt = caps->link_fec_options; cfg->module_compliance_enforcement = caps->module_compliance_enforcement; - - if (ice_fw_supports_link_override(pi->hw)) { - struct ice_link_default_override_tlv tlv; - - if (ice_get_link_default_override(&tlv, pi)) - return; - - if (tlv.options & ICE_LINK_OVERRIDE_STRICT_MODE) - cfg->module_compliance_enforcement |= - ICE_LINK_OVERRIDE_STRICT_MODE; - } } /** @@ -3172,8 +3255,11 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, if (!pcaps) return ICE_ERR_NO_MEMORY; - status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP, pcaps, - NULL); + status = ice_aq_get_phy_caps(pi, false, + (ice_fw_supports_report_dflt_cfg(hw) ? + ICE_AQC_REPORT_DFLT_CFG : + ICE_AQC_REPORT_TOPO_CAP_MEDIA), pcaps, NULL); + if (status) goto out; @@ -3212,7 +3298,8 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, break; } - if (fec == ICE_FEC_AUTO && ice_fw_supports_link_override(pi->hw)) { + if (fec == ICE_FEC_AUTO && ice_fw_supports_link_override(pi->hw) && + !ice_fw_supports_report_dflt_cfg(pi->hw)) { struct ice_link_default_override_tlv tlv; if (ice_get_link_default_override(&tlv, pi)) @@ -5167,6 +5254,141 @@ bool ice_is_phy_caps_an_enabled(struct ice_aqc_get_phy_caps_data *caps) return false; } +/** + * ice_is_fw_health_report_supported + * @hw: pointer to the hardware structure + * + * Return true if firmware supports health status reports, + * false otherwise + */ +bool ice_is_fw_health_report_supported(struct ice_hw *hw) +{ + if (hw->api_maj_ver > ICE_FW_API_HEALTH_REPORT_MAJ) + return true; + + if (hw->api_maj_ver == ICE_FW_API_HEALTH_REPORT_MAJ) { + if (hw->api_min_ver > ICE_FW_API_HEALTH_REPORT_MIN) + return true; + if (hw->api_min_ver == ICE_FW_API_HEALTH_REPORT_MIN && + hw->api_patch >= ICE_FW_API_HEALTH_REPORT_PATCH) + return true; + } + + return false; +} + +/** + * ice_aq_set_health_status_config - Configure FW health events + * @hw: pointer to the HW struct + * @event_source: type of diagnostic events to enable + * @cd: pointer to command details structure or NULL + * + * Configure the health status event types that the firmware will send to this + * PF. The supported event types are: PF-specific, all PFs, and global + */ +enum ice_status +ice_aq_set_health_status_config(struct ice_hw *hw, u8 event_source, + struct ice_sq_cd *cd) +{ + struct ice_aqc_set_health_status_config *cmd; + struct ice_aq_desc desc; + + cmd = &desc.params.set_health_status_config; + + ice_fill_dflt_direct_cmd_desc(&desc, + ice_aqc_opc_set_health_status_config); + + cmd->event_source = event_source; + + return ice_aq_send_cmd(hw, &desc, NULL, 0, cd); +} + +/** + * ice_aq_get_port_options + * @hw: pointer to the hw struct + * @options: buffer for the resultant port options + * @option_count: input - size of the buffer in port options structures, + * output - number of returned port options + * @lport: logical port to call the command with (optional) + * @lport_valid: when false, FW uses port owned by the PF instead of lport, + * when PF owns more than 1 port it must be true + * @active_option_idx: index of active port option in returned buffer + * @active_option_valid: active option in returned buffer is valid + * + * Calls Get Port Options AQC (0x06ea) and verifies result. + */ +enum ice_status +ice_aq_get_port_options(struct ice_hw *hw, + struct ice_aqc_get_port_options_elem *options, + u8 *option_count, u8 lport, bool lport_valid, + u8 *active_option_idx, bool *active_option_valid) +{ + struct ice_aqc_get_port_options *cmd; *** 4649 LINES SKIPPED *** From nobody Tue Nov 23 22:27:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3A12A188951F; Tue, 23 Nov 2021 22:27: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 4HzJfT024Cz3QRt; Tue, 23 Nov 2021 22:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D174F1E85E; Tue, 23 Nov 2021 22:27: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 1ANMRCjs070383; Tue, 23 Nov 2021 22:27:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANMRCYk070382; Tue, 23 Nov 2021 22:27:12 GMT (envelope-from git) Date: Tue, 23 Nov 2021 22:27:12 GMT Message-Id: <202111232227.1ANMRCYk070382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 3a60869237b8 - main - Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a60869237b8b315fe66497cf5299ec08b688533 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637706433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=We1zwekiQ1pl//iUSP/4XmfyClvKNLB99TL/dLixFrI=; b=CoJ8DG7XwBxld3g5RcO6ag6hU/PqMb+2WPDLCS8VTZG70ONJJ9fDhMMGWxiy7cqenRoFae 9gNvSU+KYrtNoR+cwFfCGWvH2HJCJIVn2wJ3XzT+M9dCPc1xJPtx/Hg/d0JdffxDkx9sfZ Q1Q7aRYriH9PPuYWbwHO0iEJeHAuXFvfrMijXkcLuxPc1vP40bWIaGlLCUR3y6BxCtxcNS 5s0E+uI0/ttZ8umTzxWkISjtW85v8Hv+i/w9GcnHEfWcyrx2bPvzwZh/MEm2iicqVCukbk 95VTduoZgbaT1zRhROfw+qB2uJgIEAVFgc7QCT1WHrLDIqXqw1dQneQW5nk1uQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637706433; a=rsa-sha256; cv=none; b=EKrPiAN8gLXPECx8wVAvl/g6rhT4eHYpDE9WVYGdEpNsH7EiWrYUsgAuiK8WL67Cmgcz6y kchBatszl/SKUVxQvltl+NnPHvxa4y+7WIbIOYL0ziWYjqwyD5+S6WRzq2TRAxPYaCfsIn RheLGsPyxi+F0sw83F3oyqKx2709XGuxv1wEfC/nI+yVAQ/WIqkaKSRxFaqSs5YTdsTuHW 0pVjWx70nRn6RZpNzQhLs4svctGXos/9sQry0zRtjcD2hz366A2v00pNcA4mIHnCpMnZhL X+jmDmunV2ScOMt+Md2h6Z980VIjNASYeBuXTggDuW5bdGFYZnj3RqMaRNcwcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3a60869237b8b315fe66497cf5299ec08b688533 commit 3a60869237b8b315fe66497cf5299ec08b688533 Author: Piotr Kubaj AuthorDate: 2021-11-22 02:28:46 +0000 Commit: Piotr Kubaj CommitDate: 2021-11-23 22:26:53 +0000 Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le Summary: 1. https://github.com/openssl/openssl/commit/34ab13b7d8e3e723adb60be8142e38b7c9cd382a needs to be merged for ELFv2 support on big-endian. 2. crypto/openssl/crypto/ppccap.c needs to be patched. Same reason as in https://github.com/openssl/openssl/pull/17082. Approved by: jkim, jhibbits MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33076 --- crypto/openssl/crypto/perlasm/ppc-xlate.pl | 8 +- crypto/openssl/crypto/ppccap.c | 12 +- secure/lib/libcrypto/Makefile | 50 +- secure/lib/libcrypto/Makefile.asm | 189 + secure/lib/libcrypto/Makefile.inc | 35 +- sys/crypto/openssl/powerpc/aes-ppc.S | 1562 +++++++ sys/crypto/openssl/powerpc/aesp8-ppc.S | 3643 +++++++++++++++ sys/crypto/openssl/powerpc/chacha-ppc.S | 1493 ++++++ sys/crypto/openssl/powerpc/ghashp8-ppc.S | 570 +++ sys/crypto/openssl/powerpc/poly1305-ppc.S | 313 ++ sys/crypto/openssl/powerpc/poly1305-ppcfp.S | 587 +++ sys/crypto/openssl/powerpc/ppc-mont.S | 1788 +++++++ sys/crypto/openssl/powerpc/ppc.S | 1856 ++++++++ sys/crypto/openssl/powerpc/ppccpuid.S | 357 ++ sys/crypto/openssl/powerpc/sha1-ppc.S | 1119 +++++ sys/crypto/openssl/powerpc/sha256-ppc.S | 1322 ++++++ sys/crypto/openssl/powerpc/sha256p8-ppc.S | 736 +++ sys/crypto/openssl/powerpc/sha512-ppc.S | 3072 +++++++++++++ sys/crypto/openssl/powerpc/sha512p8-ppc.S | 834 ++++ sys/crypto/openssl/powerpc/vpaes-ppc.S | 1469 ++++++ sys/crypto/openssl/powerpc64/aes-ppc.S | 1534 +++++++ sys/crypto/openssl/powerpc64/aesp8-ppc.S | 3660 +++++++++++++++ sys/crypto/openssl/powerpc64/chacha-ppc.S | 1500 ++++++ sys/crypto/openssl/powerpc64/ecp_nistz256-ppc64.S | 4855 ++++++++++++++++++++ sys/crypto/openssl/powerpc64/ghashp8-ppc.S | 577 +++ sys/crypto/openssl/powerpc64/keccak1600-ppc64.S | 671 +++ sys/crypto/openssl/powerpc64/poly1305-ppc.S | 186 + sys/crypto/openssl/powerpc64/poly1305-ppcfp.S | 597 +++ sys/crypto/openssl/powerpc64/ppc-mont.S | 1791 ++++++++ sys/crypto/openssl/powerpc64/ppc.S | 1877 ++++++++ sys/crypto/openssl/powerpc64/ppccpuid.S | 388 ++ sys/crypto/openssl/powerpc64/sha1-ppc.S | 1122 +++++ sys/crypto/openssl/powerpc64/sha256-ppc.S | 1325 ++++++ sys/crypto/openssl/powerpc64/sha256p8-ppc.S | 739 +++ sys/crypto/openssl/powerpc64/sha512-ppc.S | 1421 ++++++ sys/crypto/openssl/powerpc64/sha512p8-ppc.S | 837 ++++ sys/crypto/openssl/powerpc64/vpaes-ppc.S | 1480 ++++++ sys/crypto/openssl/powerpc64/x25519-ppc64.S | 350 ++ sys/crypto/openssl/powerpc64le/aes-ppc.S | 1582 +++++++ sys/crypto/openssl/powerpc64le/aesp8-ppc.S | 3660 +++++++++++++++ sys/crypto/openssl/powerpc64le/chacha-ppc.S | 1372 ++++++ .../openssl/powerpc64le/ecp_nistz256-ppc64.S | 4855 ++++++++++++++++++++ sys/crypto/openssl/powerpc64le/ghashp8-ppc.S | 577 +++ sys/crypto/openssl/powerpc64le/keccak1600-ppc64.S | 671 +++ sys/crypto/openssl/powerpc64le/poly1305-ppc.S | 163 + sys/crypto/openssl/powerpc64le/poly1305-ppcfp.S | 592 +++ sys/crypto/openssl/powerpc64le/ppc-mont.S | 1791 ++++++++ sys/crypto/openssl/powerpc64le/ppc.S | 1877 ++++++++ sys/crypto/openssl/powerpc64le/ppccpuid.S | 388 ++ sys/crypto/openssl/powerpc64le/sha1-ppc.S | 1170 +++++ sys/crypto/openssl/powerpc64le/sha256-ppc.S | 1373 ++++++ sys/crypto/openssl/powerpc64le/sha256p8-ppc.S | 747 +++ sys/crypto/openssl/powerpc64le/sha512-ppc.S | 1517 ++++++ sys/crypto/openssl/powerpc64le/sha512p8-ppc.S | 849 ++++ sys/crypto/openssl/powerpc64le/vpaes-ppc.S | 1480 ++++++ sys/crypto/openssl/powerpc64le/x25519-ppc64.S | 350 ++ 56 files changed, 70929 insertions(+), 10 deletions(-) diff --git a/crypto/openssl/crypto/perlasm/ppc-xlate.pl b/crypto/openssl/crypto/perlasm/ppc-xlate.pl index 08668b295bf6..f1a7fa835fc2 100755 --- a/crypto/openssl/crypto/perlasm/ppc-xlate.pl +++ b/crypto/openssl/crypto/perlasm/ppc-xlate.pl @@ -49,7 +49,7 @@ my $globl = sub { /osx/ && do { $name = "_$name"; last; }; - /linux.*(32|64le)/ + /linux.*(32|64(le|v2))/ && do { $ret .= ".globl $name"; if (!$$type) { $ret .= "\n.type $name,\@function"; @@ -80,7 +80,7 @@ my $globl = sub { }; my $text = sub { my $ret = ($flavour =~ /aix/) ? ".csect\t.text[PR],7" : ".text"; - $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64le/); + $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64(le|v2)/); $ret; }; my $machine = sub { @@ -186,7 +186,7 @@ my $vmr = sub { # Some ABIs specify vrsave, special-purpose register #256, as reserved # for system use. -my $no_vrsave = ($flavour =~ /aix|linux64le/); +my $no_vrsave = ($flavour =~ /aix|linux64(le|v2)/); my $mtspr = sub { my ($f,$idx,$ra) = @_; if ($idx == 256 && $no_vrsave) { @@ -318,7 +318,7 @@ while($line=<>) { if ($label) { my $xlated = ($GLOBALS{$label} or $label); print "$xlated:"; - if ($flavour =~ /linux.*64le/) { + if ($flavour =~ /linux.*64(le|v2)/) { if ($TYPES{$label} =~ /function/) { printf "\n.localentry %s,0\n",$xlated; } diff --git a/crypto/openssl/crypto/ppccap.c b/crypto/openssl/crypto/ppccap.c index eeaa47cc6b41..23bcf1f46e2e 100644 --- a/crypto/openssl/crypto/ppccap.c +++ b/crypto/openssl/crypto/ppccap.c @@ -239,14 +239,18 @@ static unsigned long getauxval(unsigned long key) #endif /* I wish was universally available */ -#define HWCAP 16 /* AT_HWCAP */ +#ifndef AT_HWCAP +# define AT_HWCAP 16 /* AT_HWCAP */ +#endif #define HWCAP_PPC64 (1U << 30) #define HWCAP_ALTIVEC (1U << 28) #define HWCAP_FPU (1U << 27) #define HWCAP_POWER6_EXT (1U << 9) #define HWCAP_VSX (1U << 7) -#define HWCAP2 26 /* AT_HWCAP2 */ +#ifndef AT_HWCAP2 +# define AT_HWCAP2 26 /* AT_HWCAP2 */ +#endif #define HWCAP_VEC_CRYPTO (1U << 25) #define HWCAP_ARCH_3_00 (1U << 23) @@ -337,8 +341,8 @@ void OPENSSL_cpuid_setup(void) #ifdef OSSL_IMPLEMENT_GETAUXVAL { - unsigned long hwcap = getauxval(HWCAP); - unsigned long hwcap2 = getauxval(HWCAP2); + unsigned long hwcap = getauxval(AT_HWCAP); + unsigned long hwcap2 = getauxval(AT_HWCAP2); if (hwcap & HWCAP_FPU) { OPENSSL_ppccap_P |= PPC_FPU; diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index ff9303c9edae..cf9259a19e16 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -28,6 +28,12 @@ SRCS+= x86_64cpuid.S SRCS+= armv4cpuid.S armcap.c .elif defined(ASM_i386) SRCS+= x86cpuid.S +.elif defined(ASM_powerpc) +SRCS+= ppccpuid.S ppccap.c +.elif defined(ASM_powerpc64) +SRCS+= ppccpuid.S ppccap.c +.elif defined(ASM_powerpc64le) +SRCS+= ppccpuid.S ppccap.c .else SRCS+= mem_clr.c .endif @@ -44,6 +50,12 @@ SRCS+= aesni-x86_64.S vpaes-x86_64.S SRCS+= aes-armv4.S aesv8-armx.S bsaes-armv7.S .elif defined(ASM_i386) SRCS+= aes_core.c aesni-x86.S vpaes-x86.S +.elif defined(ASM_powerpc) +SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S +.elif defined(ASM_powerpc64) +SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S +.elif defined(ASM_powerpc64le) +SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S .else SRCS+= aes_core.c .endif @@ -99,6 +111,12 @@ SRCS+= x86_64-mont.S x86_64-mont5.S SRCS+= armv4-gf2m.S armv4-mont.S bn_asm.c .elif defined(ASM_i386) SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S +.elif defined(ASM_powerpc) +SRCS+= ppc.S ppc-mont.S +.elif defined(ASM_powerpc64) +SRCS+= ppc.S ppc-mont.S +.elif defined(ASM_powerpc64le) +SRCS+= ppc.S ppc-mont.S .else SRCS+= bn_asm.c .endif @@ -128,6 +146,12 @@ SRCS+= chacha-x86_64.S SRCS+= chacha-armv4.S .elif defined(ASM_i386) SRCS+= chacha-x86.S +.elif defined(ASM_powerpc) +SRCS+= chacha-ppc.S +.elif defined(ASM_powerpc64) +SRCS+= chacha-ppc.S +.elif defined(ASM_powerpc64le) +SRCS+= chacha-ppc.S .else SRCS+= chacha_enc.c .endif @@ -189,6 +213,10 @@ SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S SRCS+= ecp_nistz256-armv4.S ecp_nistz256.c .elif defined(ASM_i386) SRCS+= ecp_nistz256-x86.S ecp_nistz256.c +.elif defined(ASM_powerpc64) +SRCS+= ecp_nistz256-ppc64.S ecp_nistz256.c x25519-ppc64.S +.elif defined(ASM_powerpc64le) +SRCS+= ecp_nistz256-ppc64.S ecp_nistz256.c x25519-ppc64.S .endif # engine @@ -250,6 +278,12 @@ SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S SRCS+= ghash-armv4.S ghashv8-armx.S .elif defined(ASM_i386) SRCS+= ghash-x86.S +.elif defined(ASM_powerpc) +SRCS+= ghashp8-ppc.S +.elif defined(ASM_powerpc64) +SRCS+= ghashp8-ppc.S +.elif defined(ASM_powerpc64le) +SRCS+= ghashp8-ppc.S .endif # objects @@ -282,6 +316,12 @@ SRCS+= poly1305-x86_64.S SRCS+= poly1305-armv4.S .elif defined(ASM_i386) SRCS+= poly1305-x86.S +.elif defined(ASM_powerpc) +SRCS+= poly1305-ppc.S poly1305-ppcfp.S +.elif defined(ASM_powerpc64) +SRCS+= poly1305-ppc.S poly1305-ppcfp.S +.elif defined(ASM_powerpc64le) +SRCS+= poly1305-ppc.S poly1305-ppcfp.S .endif # rand @@ -333,6 +373,12 @@ SRCS+= sha256-mb-x86_64.S sha256-x86_64.S sha512-x86_64.S SRCS+= keccak1600-armv4.S sha1-armv4-large.S sha256-armv4.S sha512-armv4.S .elif defined(ASM_i386) SRCS+= keccak1600.c sha1-586.S sha256-586.S sha512-586.S +.elif defined(ASM_powerpc) +SRCS+= keccak1600.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S +.elif defined(ASM_powerpc64) +SRCS+= keccak1600-ppc64.S sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S +.elif defined(ASM_powerpc64le) +SRCS+= keccak1600-ppc64.S sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S .else SRCS+= keccak1600.c .endif @@ -430,7 +476,7 @@ SRCS+= buildinf.h CLEANDIRS= openssl CLEANFILES= buildinf.h opensslconf.h opensslconf.h.tmp -.if defined(ASM_${MACHINE_CPUARCH}) +.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) _cmd1=/%%NO_ASM%%/d .else _cmd1=s/%%NO_ASM%%// @@ -471,6 +517,8 @@ PICFLAG+= -DOPENSSL_PIC .if defined(ASM_amd64) .PATH: ${LCRYPTO_SRC}/crypto/bn/asm .endif +.elif defined(ASM_${MACHINE_ARCH}) +.PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_ARCH} .endif .PATH: ${LCRYPTO_SRC}/crypto \ diff --git a/secure/lib/libcrypto/Makefile.asm b/secure/lib/libcrypto/Makefile.asm index 9480c3a59833..5e44285de0d9 100644 --- a/secure/lib/libcrypto/Makefile.asm +++ b/secure/lib/libcrypto/Makefile.asm @@ -295,6 +295,195 @@ CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} ${.IMPSRC:R:S/$/.s/} ;\ cat ${.IMPSRC:R:S/$/.s/} ;\ echo '#endif' ) > ${.TARGET} + +.elif defined(ASM_powerpc) + +.PATH: ${LCRYPTO_SRC}/crypto \ + ${LCRYPTO_SRC}/crypto/aes/asm \ + ${LCRYPTO_SRC}/crypto/bn/asm \ + ${LCRYPTO_SRC}/crypto/chacha/asm \ + ${LCRYPTO_SRC}/crypto/modes/asm \ + ${LCRYPTO_SRC}/crypto/poly1305/asm \ + ${LCRYPTO_SRC}/crypto/sha/asm + +PERLPATH= -I${LCRYPTO_SRC}/crypto/perlasm + +#cpuid +SRCS= ppccpuid.pl + +#bn +SRCS+= ppc.pl ppc-mont.pl + +#aes +SRCS+= aes-ppc.pl vpaes-ppc.pl aesp8-ppc.pl + +#sha1 +SRCS+= sha1-ppc.pl sha512-ppc.pl sha512p8-ppc.pl + +#modes +SRCS+= ghashp8-ppc.pl + +#chacha +SRCS+= chacha-ppc.pl + +#poly1305 +SRCS+= poly1305-ppc.pl poly1305-ppcfp.pl + +ASM= ${SRCS:R:S/$/.S/} sha256-ppc.S sha256p8-ppc.S + +all: ${ASM} + +CLEANFILES= ${ASM} +.SUFFIXES: .pl + +sha256-ppc.S: sha512-ppc.pl + env CC=cc perl ${.ALLSRC} linux32 ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +sha256p8-ppc.S: sha512p8-ppc.pl + env CC=cc perl ${.ALLSRC} linux32 ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +.pl.S: + env CC=cc perl ${.IMPSRC} linux32 ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +.elif defined(ASM_powerpc64) + +.PATH: ${LCRYPTO_SRC}/crypto \ + ${LCRYPTO_SRC}/crypto/aes/asm \ + ${LCRYPTO_SRC}/crypto/bn/asm \ + ${LCRYPTO_SRC}/crypto/chacha/asm \ + ${LCRYPTO_SRC}/crypto/ec/asm \ + ${LCRYPTO_SRC}/crypto/modes/asm \ + ${LCRYPTO_SRC}/crypto/poly1305/asm \ + ${LCRYPTO_SRC}/crypto/sha/asm + +PERLPATH= -I${LCRYPTO_SRC}/crypto/perlasm + +#cpuid +SRCS= ppccpuid.pl + +#bn +SRCS+= ppc.pl ppc-mont.pl + +#aes +SRCS+= aes-ppc.pl vpaes-ppc.pl aesp8-ppc.pl + +#sha1 +SRCS+= sha1-ppc.pl sha512-ppc.pl sha512p8-ppc.pl + +#modes +SRCS+= ghashp8-ppc.pl + +#chacha +SRCS+= chacha-ppc.pl + +#poly1305 +SRCS+= poly1305-ppc.pl poly1305-ppcfp.pl + +#ec +SRCS+= ecp_nistz256-ppc64.pl x25519-ppc64.pl + +#keccak1600 +SRCS+= keccak1600-ppc64.pl + +ASM= ${SRCS:R:S/$/.S/} sha256-ppc.S sha256p8-ppc.S + +all: ${ASM} + +CLEANFILES= ${ASM} +.SUFFIXES: .pl + +sha256-ppc.S: sha512-ppc.pl + env CC=cc perl ${.ALLSRC} linux64v2 ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +sha256p8-ppc.S: sha512p8-ppc.pl + env CC=cc perl ${.ALLSRC} linux64v2 ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +.pl.S: + env CC=cc perl ${.IMPSRC} linux64v2 ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +.elif defined(ASM_powerpc64le) + +.PATH: ${LCRYPTO_SRC}/crypto \ + ${LCRYPTO_SRC}/crypto/aes/asm \ + ${LCRYPTO_SRC}/crypto/bn/asm \ + ${LCRYPTO_SRC}/crypto/chacha/asm \ + ${LCRYPTO_SRC}/crypto/ec/asm \ + ${LCRYPTO_SRC}/crypto/modes/asm \ + ${LCRYPTO_SRC}/crypto/poly1305/asm \ + ${LCRYPTO_SRC}/crypto/sha/asm + +PERLPATH= -I${LCRYPTO_SRC}/crypto/perlasm + +#cpuid +SRCS= ppccpuid.pl + +#bn +SRCS+= ppc.pl ppc-mont.pl + +#aes +SRCS+= aes-ppc.pl vpaes-ppc.pl aesp8-ppc.pl + +#sha1 +SRCS+= sha1-ppc.pl sha512-ppc.pl sha512p8-ppc.pl + +#modes +SRCS+= ghashp8-ppc.pl + +#chacha +SRCS+= chacha-ppc.pl + +#poly1305 +SRCS+= poly1305-ppc.pl poly1305-ppcfp.pl + +#ec +SRCS+= ecp_nistz256-ppc64.pl x25519-ppc64.pl + +#keccak1600 +SRCS+= keccak1600-ppc64.pl + +ASM= ${SRCS:R:S/$/.S/} sha256-ppc.S sha256p8-ppc.S + +all: ${ASM} + +CLEANFILES= ${ASM} +.SUFFIXES: .pl + +sha256-ppc.S: sha512-ppc.pl + env CC=cc perl ${.ALLSRC} linux64le ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +sha256p8-ppc.S: sha512p8-ppc.pl + env CC=cc perl ${.ALLSRC} linux64le ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +.pl.S: + env CC=cc perl ${.IMPSRC} linux64le ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + .endif .include diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 7e37eda14cd2..f6221b7f74e0 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -23,9 +23,12 @@ CFLAGS+= -DB_ENDIAN .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" ASM_${MACHINE_CPUARCH}= +.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ + ${MACHINE_ARCH} == "powerpc64le" +ASM_${MACHINE_ARCH}= .endif -.if defined(ASM_${MACHINE_CPUARCH}) +.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) CFLAGS+= -DOPENSSL_CPUID_OBJ .if defined(ASM_aarch64) CFLAGS+= -DOPENSSL_BN_ASM_MONT @@ -69,6 +72,36 @@ CFLAGS+= -DGHASH_ASM CFLAGS+= -DECP_NISTZ256_ASM CFLAGS+= -DPADLOCK_ASM CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.elif defined(ASM_powerpc64le) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM .endif .endif diff --git a/sys/crypto/openssl/powerpc/aes-ppc.S b/sys/crypto/openssl/powerpc/aes-ppc.S new file mode 100644 index 000000000000..75eef3eb51f3 --- /dev/null +++ b/sys/crypto/openssl/powerpc/aes-ppc.S @@ -0,0 +1,1562 @@ +/* $FreeBSD$ */ +/* Do not modify. This file is auto-generated from aes-ppc.pl. */ +.machine "any" +.text + +.align 7 +.LAES_Te: + mflr 0 + bcl 20,31,$+4 + mflr 3 + addi 3,3,120 + mtlr 0 + blr +.long 0 +.byte 0,12,0x14,0,0,0,0,0 +.space 28 +.LAES_Td: + mflr 0 + bcl 20,31,$+4 + mflr 3 + addi 3,3,2360 + mtlr 0 + blr +.long 0 +.byte 0,12,0x14,0,0,0,0,0 +.space 28 +.long 0xc66363a5,0xc66363a5 +.long 0xf87c7c84,0xf87c7c84 +.long 0xee777799,0xee777799 +.long 0xf67b7b8d,0xf67b7b8d +.long 0xfff2f20d,0xfff2f20d +.long 0xd66b6bbd,0xd66b6bbd +.long 0xde6f6fb1,0xde6f6fb1 +.long 0x91c5c554,0x91c5c554 +.long 0x60303050,0x60303050 +.long 0x02010103,0x02010103 +.long 0xce6767a9,0xce6767a9 +.long 0x562b2b7d,0x562b2b7d +.long 0xe7fefe19,0xe7fefe19 +.long 0xb5d7d762,0xb5d7d762 +.long 0x4dababe6,0x4dababe6 +.long 0xec76769a,0xec76769a +.long 0x8fcaca45,0x8fcaca45 +.long 0x1f82829d,0x1f82829d +.long 0x89c9c940,0x89c9c940 +.long 0xfa7d7d87,0xfa7d7d87 +.long 0xeffafa15,0xeffafa15 +.long 0xb25959eb,0xb25959eb +.long 0x8e4747c9,0x8e4747c9 +.long 0xfbf0f00b,0xfbf0f00b +.long 0x41adadec,0x41adadec +.long 0xb3d4d467,0xb3d4d467 +.long 0x5fa2a2fd,0x5fa2a2fd +.long 0x45afafea,0x45afafea +.long 0x239c9cbf,0x239c9cbf +.long 0x53a4a4f7,0x53a4a4f7 +.long 0xe4727296,0xe4727296 +.long 0x9bc0c05b,0x9bc0c05b +.long 0x75b7b7c2,0x75b7b7c2 +.long 0xe1fdfd1c,0xe1fdfd1c +.long 0x3d9393ae,0x3d9393ae +.long 0x4c26266a,0x4c26266a +.long 0x6c36365a,0x6c36365a +.long 0x7e3f3f41,0x7e3f3f41 +.long 0xf5f7f702,0xf5f7f702 +.long 0x83cccc4f,0x83cccc4f +.long 0x6834345c,0x6834345c +.long 0x51a5a5f4,0x51a5a5f4 +.long 0xd1e5e534,0xd1e5e534 +.long 0xf9f1f108,0xf9f1f108 +.long 0xe2717193,0xe2717193 +.long 0xabd8d873,0xabd8d873 +.long 0x62313153,0x62313153 +.long 0x2a15153f,0x2a15153f +.long 0x0804040c,0x0804040c +.long 0x95c7c752,0x95c7c752 +.long 0x46232365,0x46232365 +.long 0x9dc3c35e,0x9dc3c35e +.long 0x30181828,0x30181828 +.long 0x379696a1,0x379696a1 +.long 0x0a05050f,0x0a05050f +.long 0x2f9a9ab5,0x2f9a9ab5 +.long 0x0e070709,0x0e070709 +.long 0x24121236,0x24121236 +.long 0x1b80809b,0x1b80809b +.long 0xdfe2e23d,0xdfe2e23d +.long 0xcdebeb26,0xcdebeb26 +.long 0x4e272769,0x4e272769 +.long 0x7fb2b2cd,0x7fb2b2cd +.long 0xea75759f,0xea75759f +.long 0x1209091b,0x1209091b +.long 0x1d83839e,0x1d83839e +.long 0x582c2c74,0x582c2c74 +.long 0x341a1a2e,0x341a1a2e +.long 0x361b1b2d,0x361b1b2d +.long 0xdc6e6eb2,0xdc6e6eb2 +.long 0xb45a5aee,0xb45a5aee +.long 0x5ba0a0fb,0x5ba0a0fb +.long 0xa45252f6,0xa45252f6 +.long 0x763b3b4d,0x763b3b4d +.long 0xb7d6d661,0xb7d6d661 +.long 0x7db3b3ce,0x7db3b3ce +.long 0x5229297b,0x5229297b +.long 0xdde3e33e,0xdde3e33e +.long 0x5e2f2f71,0x5e2f2f71 +.long 0x13848497,0x13848497 +.long 0xa65353f5,0xa65353f5 +.long 0xb9d1d168,0xb9d1d168 +.long 0x00000000,0x00000000 +.long 0xc1eded2c,0xc1eded2c +.long 0x40202060,0x40202060 +.long 0xe3fcfc1f,0xe3fcfc1f +.long 0x79b1b1c8,0x79b1b1c8 +.long 0xb65b5bed,0xb65b5bed +.long 0xd46a6abe,0xd46a6abe +.long 0x8dcbcb46,0x8dcbcb46 +.long 0x67bebed9,0x67bebed9 +.long 0x7239394b,0x7239394b +.long 0x944a4ade,0x944a4ade +.long 0x984c4cd4,0x984c4cd4 +.long 0xb05858e8,0xb05858e8 +.long 0x85cfcf4a,0x85cfcf4a +.long 0xbbd0d06b,0xbbd0d06b +.long 0xc5efef2a,0xc5efef2a +.long 0x4faaaae5,0x4faaaae5 +.long 0xedfbfb16,0xedfbfb16 +.long 0x864343c5,0x864343c5 +.long 0x9a4d4dd7,0x9a4d4dd7 +.long 0x66333355,0x66333355 +.long 0x11858594,0x11858594 +.long 0x8a4545cf,0x8a4545cf +.long 0xe9f9f910,0xe9f9f910 +.long 0x04020206,0x04020206 +.long 0xfe7f7f81,0xfe7f7f81 +.long 0xa05050f0,0xa05050f0 +.long 0x783c3c44,0x783c3c44 +.long 0x259f9fba,0x259f9fba +.long 0x4ba8a8e3,0x4ba8a8e3 +.long 0xa25151f3,0xa25151f3 +.long 0x5da3a3fe,0x5da3a3fe +.long 0x804040c0,0x804040c0 +.long 0x058f8f8a,0x058f8f8a +.long 0x3f9292ad,0x3f9292ad +.long 0x219d9dbc,0x219d9dbc +.long 0x70383848,0x70383848 +.long 0xf1f5f504,0xf1f5f504 +.long 0x63bcbcdf,0x63bcbcdf +.long 0x77b6b6c1,0x77b6b6c1 +.long 0xafdada75,0xafdada75 +.long 0x42212163,0x42212163 +.long 0x20101030,0x20101030 +.long 0xe5ffff1a,0xe5ffff1a +.long 0xfdf3f30e,0xfdf3f30e +.long 0xbfd2d26d,0xbfd2d26d +.long 0x81cdcd4c,0x81cdcd4c +.long 0x180c0c14,0x180c0c14 +.long 0x26131335,0x26131335 +.long 0xc3ecec2f,0xc3ecec2f +.long 0xbe5f5fe1,0xbe5f5fe1 +.long 0x359797a2,0x359797a2 +.long 0x884444cc,0x884444cc +.long 0x2e171739,0x2e171739 +.long 0x93c4c457,0x93c4c457 +.long 0x55a7a7f2,0x55a7a7f2 +.long 0xfc7e7e82,0xfc7e7e82 +.long 0x7a3d3d47,0x7a3d3d47 +.long 0xc86464ac,0xc86464ac +.long 0xba5d5de7,0xba5d5de7 +.long 0x3219192b,0x3219192b +.long 0xe6737395,0xe6737395 +.long 0xc06060a0,0xc06060a0 +.long 0x19818198,0x19818198 +.long 0x9e4f4fd1,0x9e4f4fd1 +.long 0xa3dcdc7f,0xa3dcdc7f +.long 0x44222266,0x44222266 +.long 0x542a2a7e,0x542a2a7e +.long 0x3b9090ab,0x3b9090ab +.long 0x0b888883,0x0b888883 +.long 0x8c4646ca,0x8c4646ca +.long 0xc7eeee29,0xc7eeee29 +.long 0x6bb8b8d3,0x6bb8b8d3 +.long 0x2814143c,0x2814143c +.long 0xa7dede79,0xa7dede79 +.long 0xbc5e5ee2,0xbc5e5ee2 +.long 0x160b0b1d,0x160b0b1d +.long 0xaddbdb76,0xaddbdb76 +.long 0xdbe0e03b,0xdbe0e03b +.long 0x64323256,0x64323256 +.long 0x743a3a4e,0x743a3a4e +.long 0x140a0a1e,0x140a0a1e +.long 0x924949db,0x924949db +.long 0x0c06060a,0x0c06060a +.long 0x4824246c,0x4824246c +.long 0xb85c5ce4,0xb85c5ce4 +.long 0x9fc2c25d,0x9fc2c25d +.long 0xbdd3d36e,0xbdd3d36e +.long 0x43acacef,0x43acacef +.long 0xc46262a6,0xc46262a6 +.long 0x399191a8,0x399191a8 +.long 0x319595a4,0x319595a4 +.long 0xd3e4e437,0xd3e4e437 +.long 0xf279798b,0xf279798b +.long 0xd5e7e732,0xd5e7e732 +.long 0x8bc8c843,0x8bc8c843 +.long 0x6e373759,0x6e373759 +.long 0xda6d6db7,0xda6d6db7 +.long 0x018d8d8c,0x018d8d8c +.long 0xb1d5d564,0xb1d5d564 +.long 0x9c4e4ed2,0x9c4e4ed2 +.long 0x49a9a9e0,0x49a9a9e0 +.long 0xd86c6cb4,0xd86c6cb4 +.long 0xac5656fa,0xac5656fa +.long 0xf3f4f407,0xf3f4f407 +.long 0xcfeaea25,0xcfeaea25 +.long 0xca6565af,0xca6565af +.long 0xf47a7a8e,0xf47a7a8e +.long 0x47aeaee9,0x47aeaee9 +.long 0x10080818,0x10080818 +.long 0x6fbabad5,0x6fbabad5 +.long 0xf0787888,0xf0787888 +.long 0x4a25256f,0x4a25256f +.long 0x5c2e2e72,0x5c2e2e72 +.long 0x381c1c24,0x381c1c24 +.long 0x57a6a6f1,0x57a6a6f1 +.long 0x73b4b4c7,0x73b4b4c7 +.long 0x97c6c651,0x97c6c651 +.long 0xcbe8e823,0xcbe8e823 +.long 0xa1dddd7c,0xa1dddd7c +.long 0xe874749c,0xe874749c +.long 0x3e1f1f21,0x3e1f1f21 +.long 0x964b4bdd,0x964b4bdd +.long 0x61bdbddc,0x61bdbddc +.long 0x0d8b8b86,0x0d8b8b86 +.long 0x0f8a8a85,0x0f8a8a85 +.long 0xe0707090,0xe0707090 +.long 0x7c3e3e42,0x7c3e3e42 +.long 0x71b5b5c4,0x71b5b5c4 +.long 0xcc6666aa,0xcc6666aa +.long 0x904848d8,0x904848d8 +.long 0x06030305,0x06030305 +.long 0xf7f6f601,0xf7f6f601 +.long 0x1c0e0e12,0x1c0e0e12 +.long 0xc26161a3,0xc26161a3 +.long 0x6a35355f,0x6a35355f +.long 0xae5757f9,0xae5757f9 +.long 0x69b9b9d0,0x69b9b9d0 +.long 0x17868691,0x17868691 +.long 0x99c1c158,0x99c1c158 +.long 0x3a1d1d27,0x3a1d1d27 +.long 0x279e9eb9,0x279e9eb9 +.long 0xd9e1e138,0xd9e1e138 +.long 0xebf8f813,0xebf8f813 +.long 0x2b9898b3,0x2b9898b3 +.long 0x22111133,0x22111133 +.long 0xd26969bb,0xd26969bb +.long 0xa9d9d970,0xa9d9d970 +.long 0x078e8e89,0x078e8e89 +.long 0x339494a7,0x339494a7 +.long 0x2d9b9bb6,0x2d9b9bb6 +.long 0x3c1e1e22,0x3c1e1e22 +.long 0x15878792,0x15878792 +.long 0xc9e9e920,0xc9e9e920 +.long 0x87cece49,0x87cece49 +.long 0xaa5555ff,0xaa5555ff +.long 0x50282878,0x50282878 +.long 0xa5dfdf7a,0xa5dfdf7a +.long 0x038c8c8f,0x038c8c8f +.long 0x59a1a1f8,0x59a1a1f8 +.long 0x09898980,0x09898980 +.long 0x1a0d0d17,0x1a0d0d17 +.long 0x65bfbfda,0x65bfbfda +.long 0xd7e6e631,0xd7e6e631 +.long 0x844242c6,0x844242c6 +.long 0xd06868b8,0xd06868b8 +.long 0x824141c3,0x824141c3 +.long 0x299999b0,0x299999b0 +.long 0x5a2d2d77,0x5a2d2d77 +.long 0x1e0f0f11,0x1e0f0f11 +.long 0x7bb0b0cb,0x7bb0b0cb +.long 0xa85454fc,0xa85454fc +.long 0x6dbbbbd6,0x6dbbbbd6 +.long 0x2c16163a,0x2c16163a +.byte 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5 +.byte 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76 +.byte 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0 +.byte 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0 +.byte 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc +.byte 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15 +.byte 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a +.byte 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75 +.byte 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0 +.byte 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84 +.byte 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b +.byte 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf +.byte 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85 +.byte 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8 +.byte 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5 +.byte 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2 +.byte 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17 +.byte 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73 +.byte 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88 +.byte 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb +.byte 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c +.byte 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79 +.byte 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9 +.byte 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08 +.byte 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6 +.byte 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a +.byte 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e +.byte 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e +.byte 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94 +.byte 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf +.byte 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68 +.byte 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 +.long 0x51f4a750,0x51f4a750 +.long 0x7e416553,0x7e416553 +.long 0x1a17a4c3,0x1a17a4c3 +.long 0x3a275e96,0x3a275e96 +.long 0x3bab6bcb,0x3bab6bcb +.long 0x1f9d45f1,0x1f9d45f1 +.long 0xacfa58ab,0xacfa58ab +.long 0x4be30393,0x4be30393 +.long 0x2030fa55,0x2030fa55 +.long 0xad766df6,0xad766df6 +.long 0x88cc7691,0x88cc7691 +.long 0xf5024c25,0xf5024c25 +.long 0x4fe5d7fc,0x4fe5d7fc +.long 0xc52acbd7,0xc52acbd7 +.long 0x26354480,0x26354480 +.long 0xb562a38f,0xb562a38f +.long 0xdeb15a49,0xdeb15a49 +.long 0x25ba1b67,0x25ba1b67 +.long 0x45ea0e98,0x45ea0e98 +.long 0x5dfec0e1,0x5dfec0e1 +.long 0xc32f7502,0xc32f7502 +.long 0x814cf012,0x814cf012 +.long 0x8d4697a3,0x8d4697a3 +.long 0x6bd3f9c6,0x6bd3f9c6 +.long 0x038f5fe7,0x038f5fe7 +.long 0x15929c95,0x15929c95 +.long 0xbf6d7aeb,0xbf6d7aeb +.long 0x955259da,0x955259da +.long 0xd4be832d,0xd4be832d +.long 0x587421d3,0x587421d3 +.long 0x49e06929,0x49e06929 +.long 0x8ec9c844,0x8ec9c844 +.long 0x75c2896a,0x75c2896a +.long 0xf48e7978,0xf48e7978 +.long 0x99583e6b,0x99583e6b +.long 0x27b971dd,0x27b971dd +.long 0xbee14fb6,0xbee14fb6 +.long 0xf088ad17,0xf088ad17 +.long 0xc920ac66,0xc920ac66 +.long 0x7dce3ab4,0x7dce3ab4 +.long 0x63df4a18,0x63df4a18 +.long 0xe51a3182,0xe51a3182 +.long 0x97513360,0x97513360 +.long 0x62537f45,0x62537f45 +.long 0xb16477e0,0xb16477e0 +.long 0xbb6bae84,0xbb6bae84 +.long 0xfe81a01c,0xfe81a01c +.long 0xf9082b94,0xf9082b94 +.long 0x70486858,0x70486858 +.long 0x8f45fd19,0x8f45fd19 +.long 0x94de6c87,0x94de6c87 +.long 0x527bf8b7,0x527bf8b7 +.long 0xab73d323,0xab73d323 +.long 0x724b02e2,0x724b02e2 +.long 0xe31f8f57,0xe31f8f57 +.long 0x6655ab2a,0x6655ab2a +.long 0xb2eb2807,0xb2eb2807 +.long 0x2fb5c203,0x2fb5c203 +.long 0x86c57b9a,0x86c57b9a +.long 0xd33708a5,0xd33708a5 +.long 0x302887f2,0x302887f2 +.long 0x23bfa5b2,0x23bfa5b2 +.long 0x02036aba,0x02036aba +.long 0xed16825c,0xed16825c +.long 0x8acf1c2b,0x8acf1c2b +.long 0xa779b492,0xa779b492 +.long 0xf307f2f0,0xf307f2f0 +.long 0x4e69e2a1,0x4e69e2a1 +.long 0x65daf4cd,0x65daf4cd +.long 0x0605bed5,0x0605bed5 +.long 0xd134621f,0xd134621f +.long 0xc4a6fe8a,0xc4a6fe8a +.long 0x342e539d,0x342e539d +.long 0xa2f355a0,0xa2f355a0 +.long 0x058ae132,0x058ae132 +.long 0xa4f6eb75,0xa4f6eb75 +.long 0x0b83ec39,0x0b83ec39 +.long 0x4060efaa,0x4060efaa +.long 0x5e719f06,0x5e719f06 +.long 0xbd6e1051,0xbd6e1051 +.long 0x3e218af9,0x3e218af9 +.long 0x96dd063d,0x96dd063d +.long 0xdd3e05ae,0xdd3e05ae +.long 0x4de6bd46,0x4de6bd46 +.long 0x91548db5,0x91548db5 +.long 0x71c45d05,0x71c45d05 +.long 0x0406d46f,0x0406d46f +.long 0x605015ff,0x605015ff +.long 0x1998fb24,0x1998fb24 +.long 0xd6bde997,0xd6bde997 +.long 0x894043cc,0x894043cc +.long 0x67d99e77,0x67d99e77 +.long 0xb0e842bd,0xb0e842bd +.long 0x07898b88,0x07898b88 +.long 0xe7195b38,0xe7195b38 +.long 0x79c8eedb,0x79c8eedb +.long 0xa17c0a47,0xa17c0a47 +.long 0x7c420fe9,0x7c420fe9 +.long 0xf8841ec9,0xf8841ec9 +.long 0x00000000,0x00000000 +.long 0x09808683,0x09808683 +.long 0x322bed48,0x322bed48 +.long 0x1e1170ac,0x1e1170ac +.long 0x6c5a724e,0x6c5a724e +.long 0xfd0efffb,0xfd0efffb +.long 0x0f853856,0x0f853856 +.long 0x3daed51e,0x3daed51e +.long 0x362d3927,0x362d3927 +.long 0x0a0fd964,0x0a0fd964 +.long 0x685ca621,0x685ca621 +.long 0x9b5b54d1,0x9b5b54d1 +.long 0x24362e3a,0x24362e3a +.long 0x0c0a67b1,0x0c0a67b1 +.long 0x9357e70f,0x9357e70f +.long 0xb4ee96d2,0xb4ee96d2 +.long 0x1b9b919e,0x1b9b919e +.long 0x80c0c54f,0x80c0c54f +.long 0x61dc20a2,0x61dc20a2 +.long 0x5a774b69,0x5a774b69 +.long 0x1c121a16,0x1c121a16 +.long 0xe293ba0a,0xe293ba0a +.long 0xc0a02ae5,0xc0a02ae5 +.long 0x3c22e043,0x3c22e043 +.long 0x121b171d,0x121b171d +.long 0x0e090d0b,0x0e090d0b +.long 0xf28bc7ad,0xf28bc7ad +.long 0x2db6a8b9,0x2db6a8b9 +.long 0x141ea9c8,0x141ea9c8 +.long 0x57f11985,0x57f11985 +.long 0xaf75074c,0xaf75074c +.long 0xee99ddbb,0xee99ddbb +.long 0xa37f60fd,0xa37f60fd *** 70499 LINES SKIPPED *** From nobody Tue Nov 23 23:05:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 05A6F189C535; Tue, 23 Nov 2021 23:05: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 4HzKVP3Xf4z3r26; Tue, 23 Nov 2021 23:05:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 527931F34D; Tue, 23 Nov 2021 23:05: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 1ANN5Hdq023707; Tue, 23 Nov 2021 23:05:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANN5Hbf023706; Tue, 23 Nov 2021 23:05:17 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:05:17 GMT Message-Id: <202111232305.1ANN5Hbf023706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 0fdc76eaabb7 - stable/13 - Allow GEOM utilities to specify a -v option. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0fdc76eaabb7d4760723dbb1c63d15d7d4f792f6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637708717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4y7UlC2OZsYv2Te6b08tJFbYFnIILMEwbsslQ/nkyJQ=; b=Ozpj8aOP+8zi3kbBrfBCwtgII6B6yG3pDben0vPRjAiK3aORTOuyHWBiiBba3h+lT9J22L LlbAEeRlqL4Na7imRgWEeprLu2Alax3KiAY6TwAEonCh8Bib6yFhe2FGcAQPHGlOEm+MqF xnK3bReTL2niQvHvF9ywrxByAs/IIIpQ7/FdOWQTJ9qvUax6T2daZCorNq0K0hiXDkZets I5pa1o5A4A591ujWK+fNHA9Y5NPbLbPxgWZ1PWAUpUScvcI4VGqESiPWTFrdfb7qTAk225 mzNRIsun5q/H3907Y4SJAZgNkmU152ADZmGd8IeGxii41W1h7FdDq8FHhkNDHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637708717; a=rsa-sha256; cv=none; b=NT2tnJnjzImryttlA16ap0PujYY+n/DoHWWOl5SILb/U1NAgJ5MwMtiA4yR6+eAT/Nybmo 4UaMSMdrkh0JyHr2wr/+RvLufFRV7/N7MKDXvK6K8btzY9AK0ImdWe7D2s043/uvi4rnlw eylo8hbfgUwuHC9/S5P2JgMAoJ0Dt35Uh05EpjQYxKijHOrFtKFZ2adBtMu4LyJWhR3V6d oIFLxAfScI+8isljPMBwE8DpPIYL61VWNCY//metoSbKtRppoJAo/lhBI77IElSJ2oSRG7 1b1CJksqL+2PKYDyOVFcek6tUBwhpEIYK75OZlFm+TbPHPKaCDKntx861+e/GA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=0fdc76eaabb7d4760723dbb1c63d15d7d4f792f6 commit 0fdc76eaabb7d4760723dbb1c63d15d7d4f792f6 Author: Kirk McKusick AuthorDate: 2021-10-29 05:49:48 +0000 Commit: Kirk McKusick CommitDate: 2021-11-23 23:04:33 +0000 Allow GEOM utilities to specify a -v option. (cherry picked from commit 68bff4a07e3fa6c30a0c0ff6cf5f0bef95dcbd72) --- sbin/geom/core/geom.c | 19 ++++++++++++------- sbin/geom/core/geom.h | 13 +++++++++++++ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index 58b33a067700..2e0d8683df49 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -314,7 +314,7 @@ parse_arguments(struct g_command *cmd, struct gctl_req *req, int *argc, struct g_option *opt; char opts[64]; unsigned i; - int ch; + int ch, vcount; *opts = '\0'; if ((cmd->gc_flags & G_FLAG_VERBOSE) != 0) @@ -336,17 +336,22 @@ parse_arguments(struct g_command *cmd, struct gctl_req *req, int *argc, /* * Add specified arguments. */ + vcount = 0; while ((ch = getopt(*argc, *argv, opts)) != -1) { /* Standard (not passed to kernel) options. */ - switch (ch) { - case 'v': + if (ch == 'v' && (cmd->gc_flags & G_FLAG_VERBOSE) != 0) verbose = 1; - continue; - } /* Options passed to kernel. */ opt = find_option(cmd, ch); - if (opt == NULL) + if (opt == NULL) { + if (ch == 'v' && (cmd->gc_flags & G_FLAG_VERBOSE) != 0){ + if (++vcount < 2) + continue; + else + warnx("Option 'v' specified twice."); + } usage(); + } if (!G_OPT_ISMULTI(opt) && G_OPT_ISDONE(opt)) { warnx("Option '%c' specified twice.", opt->go_char); usage(); @@ -440,7 +445,7 @@ set_flags(struct g_command *cmd) { unsigned flags = 0; - if ((cmd->gc_flags & G_FLAG_VERBOSE) != 0 && verbose) + if ((cmd->gc_flags & G_FLAG_VERBOSE) != 0) flags |= G_FLAG_VERBOSE; return (flags); diff --git a/sbin/geom/core/geom.h b/sbin/geom/core/geom.h index 89c5828c6429..38a99032f692 100644 --- a/sbin/geom/core/geom.h +++ b/sbin/geom/core/geom.h @@ -32,6 +32,19 @@ #define _GEOM_H_ #define G_LIB_VERSION 5 +/* + * The G_FLAG_VERBOSE flag on a command specification means that the + * comand will accept a -v option and the GEOM framework will print + * out status information after the command when it is run with -v. + * Additionally a GEOM command can explicitly specify a -v option and + * handle it as it would any other option. If both a -v option and + * G_FLAG_VERBOSE are specified for a command then both types of verbose + * information will be output when that command is run with -v. + * + * When the G_FLAG_LOADKLD is specified for a command, the GEOM kernel + * module will be loaded when that command is run if it has not yet been + * loaded. This flag is typically specified for the `create' command. + */ #define G_FLAG_NONE 0x0000 #define G_FLAG_VERBOSE 0x0001 #define G_FLAG_LOADKLD 0x0002 From nobody Tue Nov 23 23:05:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EEC56189C54A; Tue, 23 Nov 2021 23:05: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 4HzKVQ3vXWz3rWQ; Tue, 23 Nov 2021 23:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F1A21F260; Tue, 23 Nov 2021 23:05: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 1ANN5IE7023731; Tue, 23 Nov 2021 23:05:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANN5IE0023730; Tue, 23 Nov 2021 23:05:18 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:05:18 GMT Message-Id: <202111232305.1ANN5IE0023730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 8b495114eaa2 - stable/13 - Allow GEOM utilities to specify a -v option. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8b495114eaa23f448a0a5c5b34d7495880d2e2b8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637708718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fVyntxlaOPsfaifLvY0fkSmq8iYGBdZCfrrPSPdPjOY=; b=F29gBS+BqQ3CzkB2VPf/c65XAOLI7FV99fDHEotltvFQr+iv8t4FeIZFwUkRZZvY3nybzJ PMGiLMBiAvnNuNLzJVe4RGk8atWzrLGxbh6tkouYMVSxLifEXnV1V7icTy2EelUD9Z3psp 2wOY4t/9N8m/FA3Hw36pWDXh/sG024+bPd27AFqqv/05y1KN8K+EDxH53ZVG9AVgGqXPzt IkJ6cmtmyHOaXmE8Z7D7oaFr3xMjKdysyGek8rkmFJlOFHq0YvVfEm7Tft9zy+LW8FkRy8 vCEWvI82dhVaxMVaKAVZAlqVF1C7PwEkQ4vhi0SA1eY4+18t3GWYGIPzgphgUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637708718; a=rsa-sha256; cv=none; b=KiftHRx6hCbI906akAaffMydjhv2AsRaJ973n1FD4r7HdvC+NsYIlJR/YlyGtZCMa6zeTw KzHA2hlvWykbMQoy/uh2UlgS8s21Uj0XNppEF/ojVPpMkxFHrBkuUYtRBlFETGrupWJbRX DWztljUs2/8TcdqIv6wa9pmz/ZwyBzOT9caqHnfYGFO9XR4oc2g5nKCCKbmt5ZwWOacUyl o6sLaseDImXtMwVHSRFXk+bzooxOpSxwxIgOHpUIrGIQ6shrKETbdMDYdNWzrFzojISe1z skdIlaSfGG+a/W4cfDLpX+gdWCjyzu9bgOfewuBUyfo0mFNz0Gjqr5LFX1JBXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=8b495114eaa23f448a0a5c5b34d7495880d2e2b8 commit 8b495114eaa23f448a0a5c5b34d7495880d2e2b8 Author: Kirk McKusick AuthorDate: 2021-11-11 20:10:28 +0000 Commit: Kirk McKusick CommitDate: 2021-11-23 23:04:33 +0000 Allow GEOM utilities to specify a -v option. Follow up for 3c8192eb8267 (cherry picked from commit e38717c1282f8bc8b16389839bea015359413df8) --- sbin/geom/core/geom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index 2e0d8683df49..0202be9a063e 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -445,7 +445,7 @@ set_flags(struct g_command *cmd) { unsigned flags = 0; - if ((cmd->gc_flags & G_FLAG_VERBOSE) != 0) + if ((cmd->gc_flags & G_FLAG_VERBOSE) != 0 && verbose) flags |= G_FLAG_VERBOSE; return (flags); From nobody Tue Nov 23 23:12:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6431918A115D; Tue, 23 Nov 2021 23:12: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 4HzKfy029Qz3vgG; Tue, 23 Nov 2021 23:12:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D61F71F721; Tue, 23 Nov 2021 23:12: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 1ANNCfPi037410; Tue, 23 Nov 2021 23:12:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCfDe037409; Tue, 23 Nov 2021 23:12:41 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:41 GMT Message-Id: <202111232312.1ANNCfDe037409@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7ec9f24cdb88 - stable/13 - crypto: Don't assert on valid IV length for Chacha20-Poly1305. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7ec9f24cdb8835dbd383c0b04e2cfda5ccccc38d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=49r0hzhHimXpPYsZzRaJm8qxU/cb9VSB/SA5Swd4dBs=; b=in1rBahYEZJAQLM0zssjgzLTsd6RMTbp+mw2NsMc7KIwZNNa1CS63lhjFhsHb1DRq6F1SX jMr+4dxgJRCPfH946zCxX1GNSS9LguMVZAfctS+V4NhFy08RlyhKpk8+68pVY2AL1X98Qi HE+zu9Biu8IsTPag7A/LD6ApP2dpd82wpyG7GQm6o3Txy9E+uyRyHA7aRZVWzCFxW5vhnb +BgHbmwSxgIzd+k+mvVQcrxuf4PPNfKi21Nk/Uhe7J1nFbqhHUgBu3PKJZN9OwszEeVEkY IdKxb4hePNlDlnuToiGNL86Qdsfq1xf6N0IWIiA5O+s1wPEX3eBXFUF7LGfZlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709162; a=rsa-sha256; cv=none; b=vYhCYZz1y+8pamDEmLy6Q094h5hEBuslawo1HpjkuQkTzWEgNRItRiMVjlV0nXrhBWUakV S08QxGUeM95nO4D3r8ZYcaBixabbCV8AZYVrYTnZ3DOh9DnLTcr9WIWgGet6kOnYiFQ2+Q 6A9qWYjVIyPnJPDZ24Dx1L/kXmg79WMuPQMbyiLqeFNsTGlwBd0SuIGWoKsGK6MY56Y7a0 cO9gbT4c7LFGT0Tu8tVLUoowc1Z2FFyNC1uKJ0yLG2XfObQtMqjkEjF33sdOhYTyrNR6y2 gdOeaNH23W871qsZF45XIOeBgWamminc/FjwbobFTQkjHiS0WAPZrBQszwDi5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7ec9f24cdb8835dbd383c0b04e2cfda5ccccc38d commit 7ec9f24cdb8835dbd383c0b04e2cfda5ccccc38d Author: John Baldwin AuthorDate: 2021-11-09 18:52:30 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:34 +0000 crypto: Don't assert on valid IV length for Chacha20-Poly1305. The assertion checking for valid IV lengths added in 1833d6042c9a was not properly updated to permit an IV length of 8 in commit 42dcd39528c6. Reported by: syzbot+f0c0559b8be1d6eb28c7@syzkaller.appspotmail.com Reviewed by: markj Fixes: 42dcd39528c6 crypto: Support Chacha20-Poly1305 with a nonce size of 8 bytes. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32860 (cherry picked from commit 442ad83e38e8fda46d9facbd1ddd92bc23e3773e) --- sys/opencrypto/xform_chacha20_poly1305.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/opencrypto/xform_chacha20_poly1305.c b/sys/opencrypto/xform_chacha20_poly1305.c index f593faa9b5ef..9e3414887efc 100644 --- a/sys/opencrypto/xform_chacha20_poly1305.c +++ b/sys/opencrypto/xform_chacha20_poly1305.c @@ -55,7 +55,7 @@ chacha20_poly1305_reinit(void *vctx, const uint8_t *iv, size_t ivlen) { struct chacha20_poly1305_cipher_ctx *ctx = vctx; - KASSERT(ivlen == sizeof(ctx->nonce), + KASSERT(ivlen == 8 || ivlen == sizeof(ctx->nonce), ("%s: invalid nonce length", __func__)); /* Block 0 is used for the poly1305 key. */ From nobody Tue Nov 23 23:12:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6D4A118A124A; Tue, 23 Nov 2021 23:12: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 4HzKfz35bXz3vVP; Tue, 23 Nov 2021 23:12:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 135261F54C; Tue, 23 Nov 2021 23:12: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 1ANNCgLW037434; Tue, 23 Nov 2021 23:12:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCg0X037433; Tue, 23 Nov 2021 23:12:42 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:42 GMT Message-Id: <202111232312.1ANNCg0X037433@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b07b1f890e47 - stable/13 - Stop creating socket aio kprocs during boot. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b07b1f890e473591b66e2ccbb0d776dc5334e09a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DsKDi3UwXiLdFIQLRRmt0vdsfz+6sE66bo3gw9xaI48=; b=qrcZUY+gCfeZTLZsH3Tu7kgXqKi8YpSCfuH0i1IsAS3cO8G7y3JDV8oxh/SqJ9p8SsuUR5 4FMAeOzbip+t8Aa/1brZD9NEXFFJ999ENoWN/LkgXSsHAhTDXBhhboqKmv2HCW8VeVJeYJ MVYkSVxTfeIUMrxhLxEuAonWOOSZKKnhotFM2/j9iwvY7ErkNfsdMR6kt1IFffMvTk7yP3 izJKkz7pyddgit9mJE7okOFNUSeH/8ZgQER/SURcI+CljoyBP/XFoqitJlppvJy9bESCB9 uvamtbTH/sg5v/rQqUcv5eQRGYtE4b4HCLQ6+XaW+PfQbm/epUVRx1EcGmqvXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709163; a=rsa-sha256; cv=none; b=NGU3oayX/cE+aC0/9+tIBE8gEivB1j+2ZbpRkLFCGkyfQQrsn5EJ9tAfoDO3n+uw76nm2h xzQ98ZSg2LlVx0Zd8gSnGulZsQrztHF5yLE/PuPXmnVsvR03FseAfHtHK/NfJQxWN61YZG q9WYGaL7Sw9Qgxqilb+RF2HBi++0C/gQnHkkqh/UHX85lKvX97cnnVp1ba52qOlzQA19i6 z5Rz6YY3bpBOxt90/+mAH0XHI0ZGOoSkU5+unygQFUfb9DVDxQOeElfDpgHKH3cVpO2JOx oNlS4HIkT8E35T2c2GxUb3mTIhUk3eqU/VwP8GruwJAEQi+kTXA02m6QL9CNeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b07b1f890e473591b66e2ccbb0d776dc5334e09a commit b07b1f890e473591b66e2ccbb0d776dc5334e09a Author: John Baldwin AuthorDate: 2021-10-12 21:03:07 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:43 +0000 Stop creating socket aio kprocs during boot. Create the initial pool of kprocs on demand when the first socket AIO request is submitted instead. The pool of kprocs used for other AIO requests is similarly created on first use. Reviewed by: asomers Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D32468 (cherry picked from commit d1b6fef0751b70819e632d7d4722efbc8f94b80b) --- sys/kern/sys_socket.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index e53b0367960b..8ac24a048093 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -583,8 +583,6 @@ soaio_init(void) mtx_init(&soaio_jobs_lock, "soaio jobs", NULL, MTX_DEF); soaio_kproc_unr = new_unrhdr(1, INT_MAX, NULL); TASK_INIT(&soaio_kproc_task, 0, soaio_kproc_create, NULL); - if (soaio_target_procs > 0) - taskqueue_enqueue(taskqueue_thread, &soaio_kproc_task); } SYSINIT(soaio, SI_SUB_VFS, SI_ORDER_ANY, soaio_init, NULL); From nobody Tue Nov 23 23:12:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D2AE918A1260; Tue, 23 Nov 2021 23:12: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 4HzKg033Qrz3vSP; Tue, 23 Nov 2021 23:12:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F63A1F722; Tue, 23 Nov 2021 23:12: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 1ANNCi14037458; Tue, 23 Nov 2021 23:12:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCikt037457; Tue, 23 Nov 2021 23:12:44 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:44 GMT Message-Id: <202111232312.1ANNCikt037457@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5f6c2bd03bc3 - stable/13 - bhyve: Support setting the disk serial number for VirtIO block 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5f6c2bd03bc35d8ffae3bd7a0ffe38822441b0c8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sG+2cZI9pcpf3ThyW8zWD9CWXZsebkj6Yx8itNvVQMA=; b=b+mDrJPRrYaEeEipDJWkemeP0lbYBL44NC46PBFnQ19cvuZHtZbcFWaihXUyyKJlt8hO8U E+w+Opg9o2Blp6lU5/ysG4NsZcpwbzTfUXQb5fgvm6z6PIedfBF9eR0FsHSgQ/8iCX6Tv2 Tbgow/19q5ym420ZI5DbR8vBc1M3ZYJzsqc6cMghiI0aKQcj48Frh+Zy41+GZe7zggDmj/ XNQR7s5T0p/hOvsF2q98ZDcraaLtZBmuZB3FlLxfZIUBwSzuFinjvcwpCri1KCi1qgQVNZ tORj/3LHd6soaYneDoQtpMGMzzpxsWEecyWw1/gjwxi8gETtD65PqIKaYpnHdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709164; a=rsa-sha256; cv=none; b=a6geY7YnZWmRRCBTf4jv8ElVpf/MS1L0Sh0rvZEeNnMgeqwB3a0v6r8/CbDjpXXMNPGJB3 Nty/z3U6kF4LuSF9ehDutU3N86yp5Hvr1w+uVtWQ6Kq32/2ZYl/RN5MojxjkN2sLWhNKKv f7hkEGflqWV1BmCcdsrT6e+noPjOWx2YYRAXemy3XefiF+NohJEXSigRT0FIoCbvZTAHl7 3XMGE17bvFOYHmHezMyqh2EKZtme9ntPObKV3/ZyxG6L21sAFNItZl8dnt2kr12LpriT9x 9VSksOrwOBKqaaP8E7iHbx7CMtADidq4XUbrfB+JuOndmqSO6rxpoPI6ZY9hWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5f6c2bd03bc35d8ffae3bd7a0ffe38822441b0c8 commit 5f6c2bd03bc35d8ffae3bd7a0ffe38822441b0c8 Author: John Baldwin AuthorDate: 2021-09-17 16:55:06 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:43 +0000 bhyve: Support setting the disk serial number for VirtIO block devices. Reviewed by: allanjude Obtained from: illumos Differential Revision: https://reviews.freebsd.org/D31983 (cherry picked from commit c6efcb1281f3518a92fdc579d2c3c3c74eb6070c) --- usr.sbin/bhyve/bhyve_config.5 | 12 +++++++++++- usr.sbin/bhyve/pci_virtio_block.c | 27 +++++++++++++++++---------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5 index 1a77b1bbacb4..a9cea3849c01 100644 --- a/usr.sbin/bhyve/bhyve_config.5 +++ b/usr.sbin/bhyve/bhyve_config.5 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 20, 2021 +.Dd September 17, 2021 .Dt BHYVE_CONFIG 5 .Os .Sh NAME @@ -512,6 +512,16 @@ The path of a directory on the host to export to the guest. .It Va ro Ta bool Ta false Ta If true, the guest filesystem is read-only. .El +.Ss VirtIO Block Device Settings +In addition to the block device settings described above, each +VirtIO block device supports the following settings: +.Bl -column "model" "integer" "generated" +.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description +.It Va ser Ta string Ta generated Ta +Serial number of up to twenty characters. +A default serial number is generated using a hash of the backing +store's pathname. +.El .Ss VirtIO Console Device Settings Each VirtIO Console device contains one or more console ports. Each port stores its settings in a node named diff --git a/usr.sbin/bhyve/pci_virtio_block.c b/usr.sbin/bhyve/pci_virtio_block.c index 3718b2d7eff0..385b812be84c 100644 --- a/usr.sbin/bhyve/pci_virtio_block.c +++ b/usr.sbin/bhyve/pci_virtio_block.c @@ -453,7 +453,7 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) { char bident[sizeof("XX:X:X")]; struct blockif_ctxt *bctxt; - const char *path; + const char *path, *serial; MD5_CTX mdctx; u_char digest[16]; struct pci_vtblk_softc *sc; @@ -498,16 +498,23 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) /* sc->vbsc_vq.vq_notify = we have no per-queue notify */ /* - * Create an identifier for the backing file. Use parts of the - * md5 sum of the filename + * If an explicit identifier is not given, create an + * identifier using parts of the md5 sum of the filename. */ - path = get_config_value_node(nvl, "path"); - MD5Init(&mdctx); - MD5Update(&mdctx, path, strlen(path)); - MD5Final(digest, &mdctx); - snprintf(sc->vbsc_ident, VTBLK_BLK_ID_BYTES, - "BHYVE-%02X%02X-%02X%02X-%02X%02X", - digest[0], digest[1], digest[2], digest[3], digest[4], digest[5]); + bzero(sc->vbsc_ident, VTBLK_BLK_ID_BYTES); + if ((serial = get_config_value_node(nvl, "serial")) != NULL || + (serial = get_config_value_node(nvl, "ser")) != NULL) { + strlcpy(sc->vbsc_ident, serial, VTBLK_BLK_ID_BYTES); + } else { + path = get_config_value_node(nvl, "path"); + MD5Init(&mdctx); + MD5Update(&mdctx, path, strlen(path)); + MD5Final(digest, &mdctx); + snprintf(sc->vbsc_ident, VTBLK_BLK_ID_BYTES, + "BHYVE-%02X%02X-%02X%02X-%02X%02X", + digest[0], digest[1], digest[2], digest[3], digest[4], + digest[5]); + } /* setup virtio block config space */ sc->vbsc_cfg.vbc_capacity = size / VTBLK_BSIZE; /* 512-byte units */ From nobody Tue Nov 23 23:12:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B3F4318A1369; Tue, 23 Nov 2021 23:12: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 4HzKg20HVGz3vd8; Tue, 23 Nov 2021 23:12:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 598C11F59A; Tue, 23 Nov 2021 23:12: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 1ANNCjtX037489; Tue, 23 Nov 2021 23:12:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCj2l037488; Tue, 23 Nov 2021 23:12:45 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:45 GMT Message-Id: <202111232312.1ANNCj2l037488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ff590791ff6d - stable/13 - cxgbe: Only run ktls_tick when NIC TLS is 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ff590791ff6d69c65118cf396c431f2f07b50a75 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n0xfiBkRl5YkZAlyq+IR9in/xNdk1Pa0wG4/C/k7KD4=; b=e7a5P44PzIkCIMcn2Sa1M4NP6YON5cJFcXlFuqYbM17d4ycW1akyHluT3b8GPKdbkDXX12 lCsqIvgJm2t1P8FU7A7epuhKLI4TciRJRr8ifdeLBbWHddr+nfJ+4eXYpW0BQurUv0KX4L 4iArN/j8h3rz918wqN8FmLCS/JDOlS7zrF0r8HYZijN8QdzYCCfcIJ1Ma1R7xP2EOGeoM+ 2HWDGgVnUcfCWm6YfDdA1pE5OffjC/aXOkIIJhnRA8pyiyv2jdTrn1G0nTO7iGIVh08k6S KhC0hAtpV21hAvHa+93ydhwU2++kAE+mzO+KWVyEvhQMO4nFOwMMBTb2stmc6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709166; a=rsa-sha256; cv=none; b=J/AcR/WUvcUfOOdQygROVyJkleUn1GDx2NDdlvxp7/1Scrfzx1jCfUk5eU6lSFgC0cqe1M HtrH7UueUClOYl4xpIB7rtYFqBV3vocM1bFon/BgcxiKmFTIyIurxchjlxdxDgQPSxBIsd o46ZMYo6iYKgjzQSVRRWDmRerqxx5JemjpHkZGO239kkzBWkKzSEIbbKOAnaz2tTgYNHZW VNjaSos/Ro1y31Tk3UJ1qnaWMqz5/gox/eubx9V/O/mUg1csTwL8yaQGyBnfu4O+ahMx/d 5FBFxnBa05CJvsrTJI3bw+t3SQJ+zk+sLnZX2kj98iFViB53hEojKW1Q4ks6BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ff590791ff6d69c65118cf396c431f2f07b50a75 commit ff590791ff6d69c65118cf396c431f2f07b50a75 Author: John Baldwin AuthorDate: 2021-10-14 17:59:16 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:43 +0000 cxgbe: Only run ktls_tick when NIC TLS is enabled. Previously the body of ktls_tick was a nop when NIC TLS was disabled, but the callout was still scheduled consuming power on otherwise-idle systems with Chelsio T6 adapters. Now the callout only runs while NIC TLS is enabled on at least one interface of an adapter. Reported by: mav Reviewed by: np, mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D32491 (cherry picked from commit ef3f98ae4778a8d4463166c5ff3c7831099c6048) --- sys/dev/cxgbe/t4_main.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 71877a571982..1522b500c496 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -5452,11 +5452,9 @@ ktls_tick(void *arg) uint32_t tstamp; sc = arg; - if (sc->flags & KERN_TLS_ON) { - tstamp = tcp_ts_getticks(); - t4_write_reg(sc, A_TP_SYNC_TIME_HI, tstamp >> 1); - t4_write_reg(sc, A_TP_SYNC_TIME_LO, tstamp << 31); - } + tstamp = tcp_ts_getticks(); + t4_write_reg(sc, A_TP_SYNC_TIME_HI, tstamp >> 1); + t4_write_reg(sc, A_TP_SYNC_TIME_LO, tstamp << 31); callout_schedule_sbt(&sc->ktls_tick, SBT_1MS, 0, C_HARDCLOCK); } @@ -5476,10 +5474,14 @@ t4_config_kern_tls(struct adapter *sc, bool enable) return (rc); } - if (enable) + if (enable) { sc->flags |= KERN_TLS_ON; - else + callout_reset_sbt(&sc->ktls_tick, SBT_1MS, 0, ktls_tick, sc, + C_HARDCLOCK); + } else { sc->flags &= ~KERN_TLS_ON; + callout_stop(&sc->ktls_tick); + } return (rc); } @@ -6527,11 +6529,6 @@ adapter_full_init(struct adapter *sc) write_global_rss_key(sc); t4_intr_enable(sc); } -#ifdef KERN_TLS - if (is_ktls(sc)) - callout_reset_sbt(&sc->ktls_tick, SBT_1MS, 0, ktls_tick, sc, - C_HARDCLOCK); -#endif return (0); } From nobody Tue Nov 23 23:12:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E213318A1795; Tue, 23 Nov 2021 23:12: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 4HzKg51KrSz3vVt; Tue, 23 Nov 2021 23:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 915881F2B7; Tue, 23 Nov 2021 23:12: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 1ANNClYt037537; Tue, 23 Nov 2021 23:12:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNClBV037536; Tue, 23 Nov 2021 23:12:47 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:47 GMT Message-Id: <202111232312.1ANNClBV037536@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 98641c00a3ae - stable/13 - Add Chacha20-Poly1305 support in the OCF backend for KTLS. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 98641c00a3aef5d82da653b9a50c734fb4b08d87 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rjloV9SmKSdgGX41x/RrknxyqaXxEvrf4i/H/zm0b4Y=; b=ozwxRDgU0ITcknB8CsMQzCsD2w8hFhV0OTqAUeC2CHVsRYaQQCB7hU+Q/oKtHFL67wYqsi T9dJsUyEJJ8qYPjbtTJaHBdbYz0HQ6UerhKCFpMsteI1Jf/e1T89icCFxxDp2Z8UZLb3rs Lj0crt5/nrBhvR17jNPcCByMJpS0MoG7StpFXBQmUPv/VdA6+jQIQXfuXLTgHYwFYWpfVC 7pbAYrG1yZ9Qz8VqG4VEnLCJLrsMhCuhPB1hhvaHw+sN7k4TmqxlX+z8otyLH7gqUQetd1 VCqHLiM+OCO1LVN3vZS2JJ0HzYGDeVphlBF6uLM1k0UkvOmpXMKAOn72o1pA8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709170; a=rsa-sha256; cv=none; b=Ez2Fy5i3tzx/gdyGwkAhxhdDwAJD6Jvc9lTjPtRadKka9xpQ9kU2udolADZCTeQgQv+7mr 2f2j/BwSDevCQ2jb2+3s2qSTQIcj5mSx0IcmLrsFJF3X/+gKkgOlBWMV0CIhdzH/7RND9Z hXgMhkuUbCUt0Gj4EqZDS8QVYdxqJdAqP6fBTbNtym9TTFDyBN+0IiiVBOg2SgJjXVli3M +qTmMnS9d56MXp7rywtaa4oyE4hJ6L01U0ddTKB3bcVs/AeB7ytNHK5/I/Dl8RtEgL3O3L AGWTezIrIsroZPQhAqSNKxfnDs64TXFci1/gvgYEApbbjeuWkyA0rt+nL+DidA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=98641c00a3aef5d82da653b9a50c734fb4b08d87 commit 98641c00a3aef5d82da653b9a50c734fb4b08d87 Author: John Baldwin AuthorDate: 2021-02-18 17:24:26 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:44 +0000 Add Chacha20-Poly1305 support in the OCF backend for KTLS. This supports Chacha20-Poly1305 for both send and receive for TLS 1.2 and for send in TLS 1.3. Reviewed by: gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27841 (cherry picked from commit 4dd6800e22b08fa1f756115600e9436818abb168) --- sys/opencrypto/ktls_ocf.c | 116 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 95 insertions(+), 21 deletions(-) diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index 7f9ece99ccb1..1d5dce83b376 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -87,11 +87,21 @@ SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_gcm_crypts, CTLFLAG_RD, &ocf_tls12_gcm_crypts, "Total number of OCF TLS 1.2 GCM encryption operations"); +static COUNTER_U64_DEFINE_EARLY(ocf_tls12_chacha20_crypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_chacha20_crypts, + CTLFLAG_RD, &ocf_tls12_chacha20_crypts, + "Total number of OCF TLS 1.2 Chacha20-Poly1305 encryption operations"); + static COUNTER_U64_DEFINE_EARLY(ocf_tls13_gcm_crypts); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_gcm_crypts, CTLFLAG_RD, &ocf_tls13_gcm_crypts, "Total number of OCF TLS 1.3 GCM encryption operations"); +static COUNTER_U64_DEFINE_EARLY(ocf_tls13_chacha20_crypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_chacha20_crypts, + CTLFLAG_RD, &ocf_tls13_chacha20_crypts, + "Total number of OCF TLS 1.3 Chacha20-Poly1305 encryption operations"); + static COUNTER_U64_DEFINE_EARLY(ocf_inplace); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, inplace, CTLFLAG_RD, &ocf_inplace, @@ -315,7 +325,7 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, } static int -ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls, +ktls_ocf_tls12_aead_encrypt(struct ktls_session *tls, const struct tls_record_layer *hdr, uint8_t *trailer, struct iovec *iniov, struct iovec *outiov, int iovcnt, uint64_t seqno, uint8_t record_type __unused) @@ -346,12 +356,26 @@ ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls, crypto_initreq(&crp, os->sid); /* Setup the IV. */ - memcpy(crp.crp_iv, tls->params.iv, TLS_AEAD_GCM_LEN); - memcpy(crp.crp_iv + TLS_AEAD_GCM_LEN, hdr + 1, sizeof(uint64_t)); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) { + memcpy(crp.crp_iv, tls->params.iv, TLS_AEAD_GCM_LEN); + memcpy(crp.crp_iv + TLS_AEAD_GCM_LEN, hdr + 1, + sizeof(uint64_t)); + } else { + /* + * Chacha20-Poly1305 constructs the IV for TLS 1.2 + * identically to constructing the IV for AEAD in TLS + * 1.3. + */ + memcpy(crp.crp_iv, tls->params.iv, tls->params.iv_len); + *(uint64_t *)(crp.crp_iv + 4) ^= htobe64(seqno); + } /* Setup the AAD. */ - tls_comp_len = ntohs(hdr->tls_length) - - (AES_GMAC_HASH_LEN + sizeof(uint64_t)); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + tls_comp_len = ntohs(hdr->tls_length) - + (AES_GMAC_HASH_LEN + sizeof(uint64_t)); + else + tls_comp_len = ntohs(hdr->tls_length) - POLY1305_HASH_LEN; ad.seq = htobe64(seqno); ad.type = hdr->tls_type; ad.tls_vmajor = hdr->tls_vmajor; @@ -391,7 +415,10 @@ ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls, if (!inplace) crypto_use_output_uio(&crp, &out_uio); - counter_u64_add(ocf_tls12_gcm_crypts, 1); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + counter_u64_add(ocf_tls12_gcm_crypts, 1); + else + counter_u64_add(ocf_tls12_chacha20_crypts, 1); if (inplace) counter_u64_add(ocf_inplace, 1); else @@ -403,7 +430,7 @@ ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls, } static int -ktls_ocf_tls12_gcm_decrypt(struct ktls_session *tls, +ktls_ocf_tls12_aead_decrypt(struct ktls_session *tls, const struct tls_record_layer *hdr, struct mbuf *m, uint64_t seqno, int *trailer_len) { @@ -422,12 +449,26 @@ ktls_ocf_tls12_gcm_decrypt(struct ktls_session *tls, crypto_initreq(&crp, os->sid); /* Setup the IV. */ - memcpy(crp.crp_iv, tls->params.iv, TLS_AEAD_GCM_LEN); - memcpy(crp.crp_iv + TLS_AEAD_GCM_LEN, hdr + 1, sizeof(uint64_t)); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) { + memcpy(crp.crp_iv, tls->params.iv, TLS_AEAD_GCM_LEN); + memcpy(crp.crp_iv + TLS_AEAD_GCM_LEN, hdr + 1, + sizeof(uint64_t)); + } else { + /* + * Chacha20-Poly1305 constructs the IV for TLS 1.2 + * identically to constructing the IV for AEAD in TLS + * 1.3. + */ + memcpy(crp.crp_iv, tls->params.iv, tls->params.iv_len); + *(uint64_t *)(crp.crp_iv + 4) ^= htobe64(seqno); + } /* Setup the AAD. */ - tls_comp_len = ntohs(hdr->tls_length) - - (AES_GMAC_HASH_LEN + sizeof(uint64_t)); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + tls_comp_len = ntohs(hdr->tls_length) - + (AES_GMAC_HASH_LEN + sizeof(uint64_t)); + else + tls_comp_len = ntohs(hdr->tls_length) - POLY1305_HASH_LEN; ad.seq = htobe64(seqno); ad.type = hdr->tls_type; ad.tls_vmajor = hdr->tls_vmajor; @@ -444,7 +485,10 @@ ktls_ocf_tls12_gcm_decrypt(struct ktls_session *tls, crp.crp_flags = CRYPTO_F_CBIMM | CRYPTO_F_IV_SEPARATE; crypto_use_mbuf(&crp, m); - counter_u64_add(ocf_tls12_gcm_crypts, 1); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + counter_u64_add(ocf_tls12_gcm_crypts, 1); + else + counter_u64_add(ocf_tls12_chacha20_crypts, 1); error = ktls_ocf_dispatch(os, &crp); crypto_destroyreq(&crp); @@ -453,7 +497,7 @@ ktls_ocf_tls12_gcm_decrypt(struct ktls_session *tls, } static int -ktls_ocf_tls13_gcm_encrypt(struct ktls_session *tls, +ktls_ocf_tls13_aead_encrypt(struct ktls_session *tls, const struct tls_record_layer *hdr, uint8_t *trailer, struct iovec *iniov, struct iovec *outiov, int iovcnt, uint64_t seqno, uint8_t record_type) { @@ -503,11 +547,11 @@ ktls_ocf_tls13_gcm_encrypt(struct ktls_session *tls, */ memcpy(iov, iniov, iovcnt * sizeof(*iov)); iov[iovcnt].iov_base = trailer; - iov[iovcnt].iov_len = AES_GMAC_HASH_LEN + 1; + iov[iovcnt].iov_len = tls->params.tls_tlen; uio.uio_iov = iov; uio.uio_iovcnt = iovcnt + 1; uio.uio_offset = 0; - uio.uio_resid = crp.crp_payload_length + AES_GMAC_HASH_LEN; + uio.uio_resid = crp.crp_payload_length + tls->params.tls_tlen - 1; uio.uio_segflg = UIO_SYSSPACE; uio.uio_td = curthread; crypto_use_uio(&crp, &uio); @@ -521,7 +565,7 @@ ktls_ocf_tls13_gcm_encrypt(struct ktls_session *tls, out_uio.uio_iovcnt = iovcnt + 1; out_uio.uio_offset = 0; out_uio.uio_resid = crp.crp_payload_length + - AES_GMAC_HASH_LEN; + tls->params.tls_tlen - 1; out_uio.uio_segflg = UIO_SYSSPACE; out_uio.uio_td = curthread; crypto_use_output_uio(&crp, &out_uio); @@ -532,7 +576,10 @@ ktls_ocf_tls13_gcm_encrypt(struct ktls_session *tls, memcpy(crp.crp_iv, nonce, sizeof(nonce)); - counter_u64_add(ocf_tls13_gcm_crypts, 1); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + counter_u64_add(ocf_tls13_gcm_crypts, 1); + else + counter_u64_add(ocf_tls13_chacha20_crypts, 1); if (inplace) counter_u64_add(ocf_inplace, 1); else @@ -640,6 +687,32 @@ ktls_ocf_try(struct socket *so, struct ktls_session *tls, int direction) mac_csp.csp_auth_key = tls->params.auth_key; mac_csp.csp_auth_klen = tls->params.auth_key_len; break; + case CRYPTO_CHACHA20_POLY1305: + switch (tls->params.cipher_key_len) { + case 256 / 8: + break; + default: + return (EINVAL); + } + + /* Only TLS 1.2 and 1.3 are supported. */ + if (tls->params.tls_vmajor != TLS_MAJOR_VER_ONE || + tls->params.tls_vminor < TLS_MINOR_VER_TWO || + tls->params.tls_vminor > TLS_MINOR_VER_THREE) + return (EPROTONOSUPPORT); + + /* TLS 1.3 is not yet supported for receive. */ + if (direction == KTLS_RX && + tls->params.tls_vminor == TLS_MINOR_VER_THREE) + return (EPROTONOSUPPORT); + + csp.csp_flags |= CSP_F_SEPARATE_OUTPUT | CSP_F_SEPARATE_AAD; + csp.csp_mode = CSP_MODE_AEAD; + csp.csp_cipher_alg = CRYPTO_CHACHA20_POLY1305; + csp.csp_cipher_key = tls->params.cipher_key; + csp.csp_cipher_klen = tls->params.cipher_key_len; + csp.csp_ivlen = CHACHA20_POLY1305_IV_LEN; + break; default: return (EPROTONOSUPPORT); } @@ -668,14 +741,15 @@ ktls_ocf_try(struct socket *so, struct ktls_session *tls, int direction) mtx_init(&os->lock, "ktls_ocf", NULL, MTX_DEF); tls->cipher = os; - if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) { + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16 || + tls->params.cipher_algorithm == CRYPTO_CHACHA20_POLY1305) { if (direction == KTLS_TX) { if (tls->params.tls_vminor == TLS_MINOR_VER_THREE) - tls->sw_encrypt = ktls_ocf_tls13_gcm_encrypt; + tls->sw_encrypt = ktls_ocf_tls13_aead_encrypt; else - tls->sw_encrypt = ktls_ocf_tls12_gcm_encrypt; + tls->sw_encrypt = ktls_ocf_tls12_aead_encrypt; } else { - tls->sw_decrypt = ktls_ocf_tls12_gcm_decrypt; + tls->sw_decrypt = ktls_ocf_tls12_aead_decrypt; } } else { tls->sw_encrypt = ktls_ocf_tls_cbc_encrypt; From nobody Tue Nov 23 23:12:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EB63818A14DF; Tue, 23 Nov 2021 23:12: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 4HzKg420Yrz3vXm; Tue, 23 Nov 2021 23:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79C511F54D; Tue, 23 Nov 2021 23:12: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 1ANNCkm0037513; Tue, 23 Nov 2021 23:12:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCkLH037512; Tue, 23 Nov 2021 23:12:46 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:46 GMT Message-Id: <202111232312.1ANNCkLH037512@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b7f27a60ac72 - stable/13 - Add Chacha20-Poly1305 as a KTLS cipher suite. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: b7f27a60ac72c4d0f7740a6d48356c3fc68360d5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k8ojffiWCme8afONt7qfcIKg1qQaH13OjTqLgkm24ZA=; b=reEj94sAYT7jq8vU2+hGUySN1yGqL0ZDRggAHx/DwmEn7ldXPKOiCwwH99HKK0A06Vbi52 dOkAb8dGkxZp9kjSuWTkJRy9ADVP8JkWg6k1ZjAq2XdvXwbyS6nLw0IwEeSSwjg+0sFCyw IU/U+UWKWtwQA27xNpbAaElWLIb2Cxq9rCO92ateuKAdKsn7r7o41oDKKVM1AV357HEbYJ wuODUUj/eusy9O9OEvfaqKtH2N61MpgJ/p5Zg4gyZKtW4Aj+5InQ8UvIOUBswouU/m8Igz niEk+QVzKg/eKB1FEU84jqc7ybMFkYzWjriBmcBwCGCMqs+Ije+3Bw8b0e2erw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709168; a=rsa-sha256; cv=none; b=c03z5K9mcBwxNFnEr76+4xTeKujfUgHG6iIJJ3Guj0M6vPUXD0bUN2VdQnk1t8q6eQqoOl hmM9cIULZd85e0vmltnwfnGwP/dZhAWuQBozCQeVPG5B8JdkgL2cp3Z6tdfY91PRdLNfCD TsAeg2KFuuA7c9d7pkSENNmPpznl3EAMAsp6/Sa87+w33ZFrkiY6Oh9k3bk40lVc/HWc0E rYsWhj7AEIIhQ35EmpK/LX2yPUOk+1NCMa+hD0zh8+Xetz6HqtYifksXWjG9/QMun7IzGe puEuvD91xN4dzIdU2LrAr49Qh26k5UnS6FvYnmiC9lfdMdYCt19Wu5vQJ1K/CA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b7f27a60ac72c4d0f7740a6d48356c3fc68360d5 commit b7f27a60ac72c4d0f7740a6d48356c3fc68360d5 Author: John Baldwin AuthorDate: 2021-02-18 17:23:59 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:44 +0000 Add Chacha20-Poly1305 as a KTLS cipher suite. Chacha20-Poly1305 for TLS is an AEAD cipher suite for both TLS 1.2 and TLS 1.3 (RFCs 7905 and 8446). For both versions, Chacha20 uses the server and client IVs as implicit nonces xored with the record sequence number to generate the per-record nonce matching the construction used with AES-GCM for TLS 1.3. Reviewed by: gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27839 (cherry picked from commit 9c64fc40290e08f6dc6b75aa04084b04e48a61af) --- sys/kern/uipc_ktls.c | 76 ++++++++++++++++++++++++++++++++++++++++++---------- sys/sys/ktls.h | 1 + 2 files changed, 63 insertions(+), 14 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 17c199230d0a..567d3d04a6f0 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -199,6 +199,11 @@ static COUNTER_U64_DEFINE_EARLY(ktls_sw_gcm); SYSCTL_COUNTER_U64(_kern_ipc_tls_sw, OID_AUTO, gcm, CTLFLAG_RD, &ktls_sw_gcm, "Active number of software TLS sessions using AES-GCM"); +static COUNTER_U64_DEFINE_EARLY(ktls_sw_chacha20); +SYSCTL_COUNTER_U64(_kern_ipc_tls_sw, OID_AUTO, chacha20, CTLFLAG_RD, + &ktls_sw_chacha20, + "Active number of software TLS sessions using Chacha20-Poly1305"); + static COUNTER_U64_DEFINE_EARLY(ktls_ifnet_cbc); SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, cbc, CTLFLAG_RD, &ktls_ifnet_cbc, @@ -209,6 +214,11 @@ SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, gcm, CTLFLAG_RD, &ktls_ifnet_gcm, "Active number of ifnet TLS sessions using AES-GCM"); +static COUNTER_U64_DEFINE_EARLY(ktls_ifnet_chacha20); +SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, chacha20, CTLFLAG_RD, + &ktls_ifnet_chacha20, + "Active number of ifnet TLS sessions using Chacha20-Poly1305"); + static COUNTER_U64_DEFINE_EARLY(ktls_ifnet_reset); SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, reset, CTLFLAG_RD, &ktls_ifnet_reset, "TLS sessions updated to a new ifnet send tag"); @@ -238,6 +248,11 @@ static COUNTER_U64_DEFINE_EARLY(ktls_toe_gcm); SYSCTL_COUNTER_U64(_kern_ipc_tls_toe, OID_AUTO, gcm, CTLFLAG_RD, &ktls_toe_gcm, "Active number of TOE TLS sessions using AES-GCM"); + +static counter_u64_t ktls_toe_chacha20; +SYSCTL_COUNTER_U64(_kern_ipc_tls_toe, OID_AUTO, chacha20, CTLFLAG_RD, + &ktls_toe_chacha20, + "Active number of TOE TLS sessions using Chacha20-Poly1305"); #endif static MALLOC_DEFINE(M_KTLS, "ktls", "Kernel TLS"); @@ -508,6 +523,15 @@ ktls_create_session(struct socket *so, struct tls_enable *en, if (en->auth_key_len == 0) return (EINVAL); break; + case CRYPTO_CHACHA20_POLY1305: + if (en->auth_algorithm != 0 || en->auth_key_len != 0) + return (EINVAL); + if (en->tls_vminor != TLS_MINOR_VER_TWO && + en->tls_vminor != TLS_MINOR_VER_THREE) + return (EINVAL); + if (en->iv_len != TLS_CHACHA20_IV_LEN) + return (EINVAL); + break; default: return (EINVAL); } @@ -539,15 +563,6 @@ ktls_create_session(struct socket *so, struct tls_enable *en, if (en->tls_vminor < TLS_MINOR_VER_THREE) tls->params.tls_hlen += sizeof(uint64_t); tls->params.tls_tlen = AES_GMAC_HASH_LEN; - - /* - * TLS 1.3 includes optional padding which we - * do not support, and also puts the "real" record - * type at the end of the encrypted data. - */ - if (en->tls_vminor == TLS_MINOR_VER_THREE) - tls->params.tls_tlen += sizeof(uint8_t); - tls->params.tls_bs = 1; break; case CRYPTO_AES_CBC: @@ -576,10 +591,25 @@ ktls_create_session(struct socket *so, struct tls_enable *en, } tls->params.tls_bs = AES_BLOCK_LEN; break; + case CRYPTO_CHACHA20_POLY1305: + /* + * Chacha20 uses a 12 byte implicit IV. + */ + tls->params.tls_tlen = POLY1305_HASH_LEN; + tls->params.tls_bs = 1; + break; default: panic("invalid cipher"); } + /* + * TLS 1.3 includes optional padding which we do not support, + * and also puts the "real" record type at the end of the + * encrypted data. + */ + if (en->tls_vminor == TLS_MINOR_VER_THREE) + tls->params.tls_tlen += sizeof(uint8_t); + KASSERT(tls->params.tls_hlen <= MBUF_PEXT_HDR_LEN, ("TLS header length too long: %d", tls->params.tls_hlen)); KASSERT(tls->params.tls_tlen <= MBUF_PEXT_TRAIL_LEN, @@ -603,9 +633,9 @@ ktls_create_session(struct socket *so, struct tls_enable *en, goto out; /* - * This holds the implicit portion of the nonce for GCM and - * the initial implicit IV for TLS 1.0. The explicit portions - * of the IV are generated in ktls_frame(). + * This holds the implicit portion of the nonce for AEAD + * ciphers and the initial implicit IV for TLS 1.0. The + * explicit portions of the IV are generated in ktls_frame(). */ if (en->iv_len != 0) { tls->params.iv_len = en->iv_len; @@ -614,8 +644,8 @@ ktls_create_session(struct socket *so, struct tls_enable *en, goto out; /* - * For TLS 1.2, generate an 8-byte nonce as a counter - * to generate unique explicit IVs. + * For TLS 1.2 with GCM, generate an 8-byte nonce as a + * counter to generate unique explicit IVs. * * Store this counter in the last 8 bytes of the IV * array so that it is 8-byte aligned. @@ -681,6 +711,9 @@ ktls_cleanup(struct ktls_session *tls) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_sw_gcm, -1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_sw_chacha20, -1); + break; } tls->free(tls); break; @@ -692,6 +725,9 @@ ktls_cleanup(struct ktls_session *tls) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_ifnet_gcm, -1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_ifnet_chacha20, -1); + break; } if (tls->snd_tag != NULL) m_snd_tag_rele(tls->snd_tag); @@ -705,6 +741,9 @@ ktls_cleanup(struct ktls_session *tls) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_toe_gcm, -1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_toe_chacha20, -1); + break; } break; #endif @@ -763,6 +802,9 @@ ktls_try_toe(struct socket *so, struct ktls_session *tls, int direction) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_toe_gcm, 1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_toe_chacha20, 1); + break; } } return (error); @@ -885,6 +927,9 @@ ktls_try_ifnet(struct socket *so, struct ktls_session *tls, bool force) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_ifnet_gcm, 1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_ifnet_chacha20, 1); + break; } } return (error); @@ -928,6 +973,9 @@ ktls_try_sw(struct socket *so, struct ktls_session *tls, int direction) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_sw_gcm, 1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_sw_chacha20, 1); + break; } return (0); } diff --git a/sys/sys/ktls.h b/sys/sys/ktls.h index 2f15cce3fc55..3cde75f9edf6 100644 --- a/sys/sys/ktls.h +++ b/sys/sys/ktls.h @@ -46,6 +46,7 @@ struct tls_record_layer { #define TLS_MAX_PARAM_SIZE 1024 /* Max key/mac/iv in sockopt */ #define TLS_AEAD_GCM_LEN 4 #define TLS_1_3_GCM_IV_LEN 12 +#define TLS_CHACHA20_IV_LEN 12 #define TLS_CBC_IMPLICIT_IV_LEN 16 /* Type values for the record layer */ From nobody Tue Nov 23 23:12:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CA87318A165B; Tue, 23 Nov 2021 23:12: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 4HzKg61Yhpz3vVx; Tue, 23 Nov 2021 23:12:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C53521F59C; Tue, 23 Nov 2021 23:12: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 1ANNCnNO037585; Tue, 23 Nov 2021 23:12:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCn4B037584; Tue, 23 Nov 2021 23:12:49 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:49 GMT Message-Id: <202111232312.1ANNCn4B037584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5ce0850641a3 - stable/13 - ktls_ocf: Fix a few places to not hardcode the GMAC hash length. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 5ce0850641a3224e999c501030df08d8f1dd994d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sEgNu8rT9PuXXDZXykJQkU82XUTFPRvPVusC849BNnw=; b=ct0+VlnjUr5HgXbMuHCb094cx3OzDtS2Ml0GWKJIWza7AEDTKmzTwLjW027ZN1CORLFQJn Y3k2b01xkfLt7T4ZD4+NFzugrHYqnyVCNXNihIkskE+Y5oLvLTiJRVKSE1wdVszO1qgJfU 7nCA7d1HEb0WtKXA/W5NcngNeMKDNUFIhd9sx2IltTK7lunnwaBNr8wF089WZQD2JTdDiW uisGWd9n0a0/iRkjc47ByT/QPEhS5lAxVTLOq2T8rzQUdpbzioNfoIrP9xXj8TvO4PmdrU z4RNLJ2Gx1Jx6QmL4gYYSj8RzfWar7O7Q58JAVBrF1paGe83Wh4PLx14yzuFxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709171; a=rsa-sha256; cv=none; b=qLP3Fyfe/MRFS1dj5qWZnwtscKyyS2XfiGr937u/+Jin3ZMrM2rEDF0kpq9iIThCAn1ZXT OpQZZT1qbw0cFVRJzgMu8NUnQoSBV87PZBO7/IK94k3jMaGzmWOLWNxWa7KlGX09TFXIzE zjPoLcrvKVG02g6OfTgLtSqIz4qX9ligRW8Aegth1GVSVr5VWH2b1RowYDPoNHqPfZzpQj yZfgf1CEe4lraUs0KCdp/Z7q+JmeBwJHx1+PAjN+FOsuj/SRGMjTOz5SbPj2evvk0Hi6OU Fg58BLUqwtAknmVWlLGSMqOgYKknlbQqoJJFE+l3MaIElU2bCBTbmgHxYyQsHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5ce0850641a3224e999c501030df08d8f1dd994d commit 5ce0850641a3224e999c501030df08d8f1dd994d Author: John Baldwin AuthorDate: 2021-05-25 23:59:18 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:44 +0000 ktls_ocf: Fix a few places to not hardcode the GMAC hash length. This is not a functional change as the Poly1305 hash is the same length as the GMAC hash length. Reviewed by: gallatin, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30137 (cherry picked from commit 4a92afae7fcbb0a8453712dfec5de086aaf5cba4) --- sys/opencrypto/ktls_ocf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index 1d5dce83b376..78331b76abd7 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -403,11 +403,11 @@ ktls_ocf_tls12_aead_encrypt(struct ktls_session *tls, /* Duplicate iovec and append vector for tag. */ memcpy(iov, tag_uio->uio_iov, iovcnt * sizeof(struct iovec)); iov[iovcnt].iov_base = trailer; - iov[iovcnt].iov_len = AES_GMAC_HASH_LEN; + iov[iovcnt].iov_len = tls->params.tls_tlen; tag_uio->uio_iov = iov; tag_uio->uio_iovcnt++; crp.crp_digest_start = tag_uio->uio_resid; - tag_uio->uio_resid += AES_GMAC_HASH_LEN; + tag_uio->uio_resid += tls->params.tls_tlen; crp.crp_op = CRYPTO_OP_ENCRYPT | CRYPTO_OP_COMPUTE_DIGEST; crp.crp_flags = CRYPTO_F_CBIMM | CRYPTO_F_IV_SEPARATE; @@ -492,7 +492,7 @@ ktls_ocf_tls12_aead_decrypt(struct ktls_session *tls, error = ktls_ocf_dispatch(os, &crp); crypto_destroyreq(&crp); - *trailer_len = AES_GMAC_HASH_LEN; + *trailer_len = tls->params.tls_tlen; return (error); } From nobody Tue Nov 23 23:12:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BC8B318A13E1; Tue, 23 Nov 2021 23:12: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 4HzKg56nmkz3vgh; Tue, 23 Nov 2021 23:12:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F3041F59B; Tue, 23 Nov 2021 23:12: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 1ANNCmJc037561; Tue, 23 Nov 2021 23:12:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCmor037560; Tue, 23 Nov 2021 23:12:48 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:48 GMT Message-Id: <202111232312.1ANNCmor037560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6afc00ed139d - stable/13 - ktls: Use COUNTER_U64_DEFINE_EARLY for the ktls_toe_chacha20 counter. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 6afc00ed139d9cfa63d6f99a24d34622e1b6b792 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qxE5L7AUAQsvHc10wDQKULGFzec/1skZkal+93kAXJs=; b=NUw3cmcPs4ciuqjRi4N1mD4QimW/NQBciU9BGzvR6xUJ/y4bCNZpyg9gM5p7cdVL8Nz7Oz gpy6xklc8ULYlpZZywbd1JJRHiH5np8wEfL7ZFqz3GBuDrKpZI7/ArnColSdcqFy6IiuJ4 N/eBnfmuBN0T2wGt0/h1GQGb30DgSVJk03TQQvxC08fFFNR8dl+IL5BM4/ZzizpYKUGwWj 107NiMC8P/PENZqrhbruKhssz30lHEjeUgAaNdfAXpweekPnJu6+LoTIYoMcGkgd6BPM8Q UzRIsU5vFAnjfA1emff4lBG6+rt+9farBXeLu5ZQqSePIHmHXl3xJc3wEC1GzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709170; a=rsa-sha256; cv=none; b=UfhpXcuuY5D0pc0nIs0VxS9u6M0/0HozcCEg1EDDaVk3lJ9xZq4TeNnJSx13uT9uvJftQE sLw3L8o/z3IWH2m14Po3snmd+UIPicGvcZMONXs6qmFEiQzkjGEnOEfEm7/1ksxhHpES/6 gnQYrre/pvbVo7/UxxuyDJjWU2nbQIq/+Kuyvj4w9GhjSzN7EY/Nm9Y0hEchfwT04z002c iLBidgELWJdl0pwmHXSueI3WdgUNAXCIg8oCl/TOttsiikLMi12QWsTWw4XQVPBYdUzsgg Yox/nOSLK/iLZa7DMVA/AqlDC48BdQwHTM8SIWl9+4kZT9wgB7CFeNSUJzPerw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6afc00ed139d9cfa63d6f99a24d34622e1b6b792 commit 6afc00ed139d9cfa63d6f99a24d34622e1b6b792 Author: John Baldwin AuthorDate: 2021-02-20 00:33:46 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:44 +0000 ktls: Use COUNTER_U64_DEFINE_EARLY for the ktls_toe_chacha20 counter. I missed updating this counter when rebasing the changes in 9c64fc40290e08f6dc6b75aa04084b04e48a61af after the switch to COUNTER_U64_DEFINE_EARLY in 1755b2b9891bb1bfa7a58383ef5126821f7e46e3. Fixes: 9c64fc40290e Add Chacha20-Poly1305 as a KTLS cipher suite. Sponsored by: Netflix (cherry picked from commit 90972f04026a2248d616d7466053ff53cf8fdf9d) --- sys/kern/uipc_ktls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 567d3d04a6f0..0cb5343b6a2a 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -249,7 +249,7 @@ SYSCTL_COUNTER_U64(_kern_ipc_tls_toe, OID_AUTO, gcm, CTLFLAG_RD, &ktls_toe_gcm, "Active number of TOE TLS sessions using AES-GCM"); -static counter_u64_t ktls_toe_chacha20; +static COUNTER_U64_DEFINE_EARLY(ktls_toe_chacha20); SYSCTL_COUNTER_U64(_kern_ipc_tls_toe, OID_AUTO, chacha20, CTLFLAG_RD, &ktls_toe_chacha20, "Active number of TOE TLS sessions using Chacha20-Poly1305"); From nobody Tue Nov 23 23:12:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 224BB18A1C01; Tue, 23 Nov 2021 23:12: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 4HzKgC500Bz3vY9; Tue, 23 Nov 2021 23:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C62A1F148; Tue, 23 Nov 2021 23:12: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 1ANNCs1a037687; Tue, 23 Nov 2021 23:12:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCsVi037686; Tue, 23 Nov 2021 23:12:54 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:54 GMT Message-Id: <202111232312.1ANNCsVi037686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 0053fedc1b47 - stable/13 - ktls: Reject attempts to enable AES-CBC with TLS 1.3. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0053fedc1b4790f2e094c326adef95302c105f8b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aliLs6Qr9UhH9kKXABszquHcTcXicH00mrlmCDxREoQ=; b=Gq9nolw38xXcTmcy+Vfph+VRpJUbDKfvNAtteVxzf9UqH/72d2jpC0tFMnHRcqMMN1TwL2 Gx3ZzhcgVRYNvn0mqyECQTPND5gi/ik+E2x2pa7kDt/YhSAbGxN9I9+hsqeWibam60A8Sw qoFMEsJ+gqmRqz/CQdCdsUNwHdkI62IdDyDTwokzR+6fEktCi0IhpsOwWW19vkA+lyDpSN WzYDYUoag7reLZL+E6EwFRVIEpQ+eMHMaLXha98Ze5wh2FccDueKrSpj7C1oMZE5FDD5Ti 9C/vrK7rX1KlY16yEw6ycgOq5/iA7y4ktdWPzj9bQa8HU/6ENLUwcR3OxInN6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709176; a=rsa-sha256; cv=none; b=da2aAKbDZXtRVmwvkwCebP75dQ87tfQQIszs4sUFUAo6FeFXdfMhiJLC15Jw8DI4aQFw5V i7Dq4WKrL1dCQ6hKmweYVLRlDCFEvy4+6wBG6u2wQSNqW15vkj5iyzVh4F3KGcqNMgVJiA Wh8Dho2vVkLBzpsHMIu+L1aNYnQlqksMWaHw1WHVmzTiQhsAt0S0fxX0rhFw2BiSJEvQRr e9AR2s9AXuVn0pycIUzKd1XhoW2I0HO/ftqZZHi0RKF9xqHFHHZQx76ddVNhf/Y3jTXuoy SyXqd9R6OvV0vKWsCIiaTQAWtZn1Ap3B9dtYjEl32VisLEK3oyhuMxhoSn+mdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0053fedc1b4790f2e094c326adef95302c105f8b commit 0053fedc1b4790f2e094c326adef95302c105f8b Author: John Baldwin AuthorDate: 2021-10-13 19:12:58 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:44 +0000 ktls: Reject attempts to enable AES-CBC with TLS 1.3. AES-CBC cipher suites are not supported in TLS 1.3. Reported by: syzbot+ab501c50033ec01d53c6@syzkaller.appspotmail.com Reviewed by: tuexen, markj Differential Revision: https://reviews.freebsd.org/D32404 (cherry picked from commit a63752cce6462d08bbec08cad931d70dec2f5b4c) --- sys/kern/uipc_ktls.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 0cb5343b6a2a..73915600779c 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -522,6 +522,10 @@ ktls_create_session(struct socket *so, struct tls_enable *en, } if (en->auth_key_len == 0) return (EINVAL); + if (en->tls_vminor != TLS_MINOR_VER_ZERO && + en->tls_vminor != TLS_MINOR_VER_ONE && + en->tls_vminor != TLS_MINOR_VER_TWO) + return (EINVAL); break; case CRYPTO_CHACHA20_POLY1305: if (en->auth_algorithm != 0 || en->auth_key_len != 0) From nobody Tue Nov 23 23:12:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ADDB718A19D5; Tue, 23 Nov 2021 23:12: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 4HzKgG174qz3vYH; Tue, 23 Nov 2021 23:12:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A79D21F54F; Tue, 23 Nov 2021 23:12: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 1ANNCu9t037741; Tue, 23 Nov 2021 23:12:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCu3f037740; Tue, 23 Nov 2021 23:12:56 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:56 GMT Message-Id: <202111232312.1ANNCu3f037740@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 81b6dba1a08b - stable/13 - ktls: Fix assertion for TLS 1.0 CBC when using non-zero starting seqno. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 81b6dba1a08b031bdf7463c1704d27ae1e0daa0f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OSG11pQmayKoQ6xBWGvXxyFRZohzYzbDnu5Dwr3LZKg=; b=qXYDZqD7XpUa+agf1zYW67FUAU4V/FIh9n9tUMKMFcH/68dOKgg0Qjz10yA6rVH2dwmya6 sPV6kexHGre/154qL2wdyB3Y8VISS5dKAoWuCMGc5whg79xxy5iN118y2k3kGmxaQSkxx3 Zlew8F7uQFtO+70aa8lQ8YBSreApUO/QlGal7oBHBv/LnDOOBP2O2EsU7kNxi+T4Ni3K62 q6CWWWAdXK0iIqh18LJXEVWM9d2vhYB7iBfLuLSYBHgCZjH4EKBANn0Sb1Q9h0jDdzwH82 8HTYh93s8BzjAaTBu5GziNQiDfcpdM+IUMHYKRtI6arC43v0mn1naGuL3tv5aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709178; a=rsa-sha256; cv=none; b=ECv9ipk5N85ilMPwyY7bGZmWHtDHoY6USBYhfPnQ8UQ9UDf/HNHEXQXMqdc0rPgc8uQvOX WyiXAL1lSnmgRnzqi36/rkOt98tBI9Ie1r3tus+R85PagaKCKxm0hL6Je7FF+Cw2J33Agj 3E6Q1Erf9m4LGyeGuI00/A8gZnrk7WXwRXkqAtCyoNRoiOsD8am6Y3hotPfT/Bl8G8U7tw 4YlUPEb0U1EvK+ostZ8yUGaOqMnOR1BD4cgy2/j1aPoQW8+C+dPyofGFc16/igPSZY8Oiv FJAAXyKOy7XqQLDC2uuYjARZjvO/c6dhtfV8mRsxmVWG2NcstYxF4lBt0qdgtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=81b6dba1a08b031bdf7463c1704d27ae1e0daa0f commit 81b6dba1a08b031bdf7463c1704d27ae1e0daa0f Author: John Baldwin AuthorDate: 2021-10-27 23:35:56 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:45 +0000 ktls: Fix assertion for TLS 1.0 CBC when using non-zero starting seqno. The starting sequence number used to verify that TLS 1.0 CBC records are encrypted in-order in the OCF layer was always set to 0 and not to the initial sequence number from the struct tls_enable. In practice, OpenSSL always starts TLS transmit offload with a sequence number of zero, so this only matters for tests that use a random starting sequence number. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32676 (cherry picked from commit 4827bf76bce8814b9d9a0d883467a3d2366e59a2) --- sys/opencrypto/ktls_ocf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index 78331b76abd7..71f6339e02ad 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -756,6 +756,9 @@ ktls_ocf_try(struct socket *so, struct ktls_session *tls, int direction) if (tls->params.tls_vminor == TLS_MINOR_VER_ZERO) { os->implicit_iv = true; memcpy(os->iv, tls->params.iv, AES_BLOCK_LEN); +#ifdef INVARIANTS + os->next_seqno = tls->next_seqno; +#endif } } tls->free = ktls_ocf_free; From nobody Tue Nov 23 23:12:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8A50B18A16E4; Tue, 23 Nov 2021 23:12: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 4HzKg86FT4z3vbM; Tue, 23 Nov 2021 23:12:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16C831F0CB; Tue, 23 Nov 2021 23:12: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 1ANNCppd037639; Tue, 23 Nov 2021 23:12:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCpfp037638; Tue, 23 Nov 2021 23:12:51 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:51 GMT Message-Id: <202111232312.1ANNCpfp037638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9811763b417a - stable/13 - iscsi: Validate DataSN values in Data-In PDUs in the initiator. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 9811763b417a36ca66c8512bbe09fcaec4407514 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m6HK26YYXXsgcl/vwWb2O13Mz4FstyTTxvacUtQaHSg=; b=MFBYC3faeJC5uu7iD262qtVJFakeBhyn41A1XJc5hu3V9/a5mBrxVdCSJkomymwzjxcIYG 8l4WaphN7/5otIPW+xZV/E3bKq5nRI7bGRz6j7yo8LKcOIqY8g+2BZ4Lmqb2kuXnNbRkXZ hawkwAJAJVk1ex9YhkQdBOzromRNj/7/9vE6YakjcazmjdBG1sEa1Bz9KLAA30vp7S0K/j P3eFpUarcpNFnTqZxx0cls7X/O0ZzKp6lIPvwdvEnQY0q7vl5ef2mlcHfEXhG9r6lDMmRa BWou04rSZiopQxtFxDg8MxgF6X8HzQp/wqAq2UxeGuinuEcaIIYXHDpokR2PAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709173; a=rsa-sha256; cv=none; b=DlAcubFW8xt6+WiOinaB3f46tFnbyFVdsX/hwdnjzupTcxyRR6lxCZ0I0FV2kxmUpOQtbN KJ51Fq3lhz+aRZOIzM2R+ay+BJUkY2PVbIKwrtEUeS7KYwhuD8RVN6GfaMhSqqoiBeWlcS +Yxvx3Wf16+mhuA2g0R4xOZT34OI3nyzpZrpVaEZ9jivUSbUar+UmWFt+xfNlY7WVFf5Ns FzWuVLzQiNGspSUo3nJZ4OPQHFsJg3DOtIFpmEQGGUwxqnD2FqkMbFEz1xDwM+otdJ5X9L iSPz9Xu6dGIgu0D0NoNQX1lHOb4AvT2lCLwzipmN1/pOBHht0eKaBhR4LMm4Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9811763b417a36ca66c8512bbe09fcaec4407514 commit 9811763b417a36ca66c8512bbe09fcaec4407514 Author: John Baldwin AuthorDate: 2021-08-24 21:58:34 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:44 +0000 iscsi: Validate DataSN values in Data-In PDUs in the initiator. As is done in the target, require that DataSN values are consecutive and in-order. If an out of order Data-In PDU is received, force a session reconnect. In addition, when a SCSI Response PDU is received, verify that the ExpDataSN field matches the count of Data-In PDUs received for this command. If not, force a session reconnect. Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D31594 (cherry picked from commit 4f0f5bf99591ad9907822082270523ac919e3b8c) --- sys/dev/iscsi/iscsi.c | 21 ++++++++++++++++++++- sys/dev/iscsi/iscsi.h | 1 + 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index f60904bb3de0..093ba51d265e 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -892,6 +892,15 @@ iscsi_pdu_handle_scsi_response(struct icl_pdu *response) } ccb = io->io_ccb; + if (ntohl(bhssr->bhssr_expdatasn) != io->io_datasn) { + ISCSI_SESSION_WARN(is, + "ExpDataSN mismatch in SCSI Response (%u vs %u)", + ntohl(bhssr->bhssr_expdatasn), io->io_datasn); + icl_pdu_free(response); + iscsi_session_reconnect(is); + ISCSI_SESSION_UNLOCK(is); + return; + } /* * With iSER, after getting good response we can be sure @@ -1047,6 +1056,17 @@ iscsi_pdu_handle_data_in(struct icl_pdu *response) return; } + if (io->io_datasn != ntohl(bhsdi->bhsdi_datasn)) { + ISCSI_SESSION_WARN(is, "received Data-In PDU with " + "DataSN %u, while expected %u; dropping connection", + ntohl(bhsdi->bhsdi_datasn), io->io_datasn); + icl_pdu_free(response); + iscsi_session_reconnect(is); + ISCSI_SESSION_UNLOCK(is); + return; + } + io->io_datasn += response->ip_additional_pdus + 1; + data_segment_len = icl_pdu_data_segment_length(response); if (data_segment_len == 0) { /* @@ -1096,7 +1116,6 @@ iscsi_pdu_handle_data_in(struct icl_pdu *response) icl_pdu_get_data(response, 0, csio->data_ptr + oreceived, data_segment_len); /* - * XXX: Check DataSN. * XXX: Check F. */ if ((bhsdi->bhsdi_flags & BHSDI_FLAGS_S) == 0) { diff --git a/sys/dev/iscsi/iscsi.h b/sys/dev/iscsi/iscsi.h index fe1cc64f88db..871fc6fc90e9 100644 --- a/sys/dev/iscsi/iscsi.h +++ b/sys/dev/iscsi/iscsi.h @@ -44,6 +44,7 @@ struct iscsi_outstanding { TAILQ_ENTRY(iscsi_outstanding) io_next; union ccb *io_ccb; size_t io_received; + uint32_t io_datasn; uint32_t io_initiator_task_tag; uint32_t io_referenced_task_tag; void *io_icl_prv; From nobody Tue Nov 23 23:12:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C817D18A1C2A; Tue, 23 Nov 2021 23:13: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 4HzKgH0vHKz3vml; Tue, 23 Nov 2021 23:12:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4FBC1F0CC; Tue, 23 Nov 2021 23:12: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 1ANNCw5i037789; Tue, 23 Nov 2021 23:12:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCwrK037788; Tue, 23 Nov 2021 23:12:58 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:58 GMT Message-Id: <202111232312.1ANNCwrK037788@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 64ecbc0cd352 - stable/13 - tests: do not build ktls_test if WITHOUT_OPENSSL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 64ecbc0cd3524d1c5782910547253644be6ebbd7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0DvETttCMz4I16G7l2r3+atnGsUi0h8Ii8Zik/XX2qQ=; b=BHgFmAtuH4v1VSWyNxxIBqD8+6ahDMT08G2fikV2M+i+l21MPXGHod7VYUUM7SQ217OD3S cM69PAONaQzWI7fI5QTSpUa+VsMrLG/wsf0WjNvS5txD3CoTNzd3ZHW4GN5TgpOI5r7n3r iUVYxWxpn6BdX5xE7BGXn4+3QKYEa5C7cFbC8Qj6N2AJD/uFjN7lqPu+X42Cr0sSc402qI knUPVa3Fk8VU7hPKUEGhPUkKyg85NVVt6Nl1bqpJJeReTIVmiGQsThHeb6j6dUpOVgrT5k NZFem7sOYjIf1IkPZtpUHely2rHlvxF3B1gScoANQ2EtDbSyqyPkMgiR5U0vhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709180; a=rsa-sha256; cv=none; b=e6XiXZeUCIwD33QRxhPlHmDGOkOqBiYwpLxCqSdmLuGJeTOccMt6SxuoyoFIuVdE6wmrhJ N47DbzU13K+G9oQxC9x+31UXAI6ht/m3Y+yKxQPM5H7Em1srk0sxaszKeOV77clwpJB7Be eGLiyj8PlZKlf0uWMEkBrv/3S4v7eyK1906vQtXkOwIe1b1RtTSY10Ss2NrNAHo4Y2VjYy 7eCdz84OqwDSb9fe/ow2dUri7b2rA5lKDHuiHwZCP90P73FROV4R8FW+7za5NpU0QYKPQW lw/2lhx7fEqO/y/EqWM7E4UtQnlCkcPCjex9baGEnqPIq/TMohqyIYO+fkWRcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=64ecbc0cd3524d1c5782910547253644be6ebbd7 commit 64ecbc0cd3524d1c5782910547253644be6ebbd7 Author: Ed Maste AuthorDate: 2021-11-08 17:08:34 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:45 +0000 tests: do not build ktls_test if WITHOUT_OPENSSL ktls_test requires libcrypto to build, and fails if it is not available (which is the case when building WITHOUT_OPENSSL). Reported by: Michael Dexter, Build Option Survey Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32895 (cherry picked from commit e818178e3a597922ce77bee874e441a1b7df0099) --- tests/sys/kern/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index ee9decac518c..b0f83b97db41 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PACKAGE= tests TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel @@ -12,7 +14,9 @@ ATF_TESTS_C+= kern_copyin ATF_TESTS_C+= kern_descrip_test ATF_TESTS_C+= fdgrowtable_test ATF_TESTS_C+= kill_zombie +.if ${MK_OPENSSL} != "no" ATF_TESTS_C+= ktls_test +.endif ATF_TESTS_C+= ptrace_test TEST_METADATA.ptrace_test+= timeout="15" ATF_TESTS_C+= reaper From nobody Tue Nov 23 23:12:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 495A818A1B48; Tue, 23 Nov 2021 23:13: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 4HzKgD6sPNz3vmX; Tue, 23 Nov 2021 23:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 807A11F149; Tue, 23 Nov 2021 23:12: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 1ANNCtse037711; Tue, 23 Nov 2021 23:12:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCtpu037710; Tue, 23 Nov 2021 23:12:55 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:55 GMT Message-Id: <202111232312.1ANNCtpu037710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ba6b771d1732 - stable/13 - ktls: Ensure FIFO encryption order for TLS 1.0. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ba6b771d1732eda0546d187b1397b1bcded3208d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9ilAIy8JKe+rjTySFbBFfagIh2m2moi/eQerqLHp6w=; b=eAOpfi4rl3ibPXADhdadePnbjYgr8zGLhJkrYfoeYwD/N9prvbzZ0wbFmARoZJPPmK3i2C 2cspeI6oGirL5lS/c92gpCeCAbpBz9gg0NoVQBJZXiC/nTqJ0757ZvMEXHeCuD5olGsJw9 tiAVs05JOHhY/KGgx+tFja/4WJV1BAlWqh/QWQs7wxUMy15N82/153VE2ugKGGfxIazAIo ml6uz3xTBSeQx7XwD/qIENSuT2v7AapEHR1W4bR8tktw5uvGb7Z7c4CnBB+WnA6B5Vej67 RXRoI2HkVG0nwgKYpQsZ4AjXU0d4wSb/+y2WfeFHk1uLVn8gM3NQs0Qwb8QUrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709177; a=rsa-sha256; cv=none; b=mJHoLB4POJZvkHjc6JD4Oll/uTs/YbPtviMVl6gZLubY3xXs5+eWeEEUIAUBndzAsW0n01 V0b4NY823gpjFtfz1+S5Wtjhmhd7KaSHdy55rUQnog7GzVyzEkUSK1EmG6Xd6tqPtAsQLb nNkA9xEV18f93sk5uJRgI+kiYmHyA4piMmAkqlwCOXxDH6OfWr74uiVkWcr/RhfpaQJjwB LBKhyFvMAYdLq7sFDkJMT6Rh0cgvTJWaiWZkGEWCTApdFX2sDWYirMT6OkDWGBgfG8HLbi etMH4Y2o4IS8LPMvsFri65u1/BrNXrJrIlgwlGQc+R+lUDSgUsOYDHNqXaK4Dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ba6b771d1732eda0546d187b1397b1bcded3208d commit ba6b771d1732eda0546d187b1397b1bcded3208d Author: John Baldwin AuthorDate: 2021-10-13 19:30:15 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:44 +0000 ktls: Ensure FIFO encryption order for TLS 1.0. TLS 1.0 records are encrypted as one continuous CBC chain where the last block of the previous record is used as the IV for the next record. As a result, TLS 1.0 records cannot be encrypted out of order but must be encrypted as a FIFO. If the later pages of a sendfile(2) request complete before the first pages, then TLS records can be encrypted out of order. For TLS 1.1 and later this is fine, but this can break for TLS 1.0. To cope, add a queue in each TLS session to hold TLS records that contain valid unencrypted data but are waiting for an earlier TLS record to be encrypted first. - In ktls_enqueue(), check if a TLS record being queued is the next record expected for a TLS 1.0 session. If not, it is placed in sorted order in the pending_records queue in the TLS session. If it is the next expected record, queue it for SW encryption like normal. In addition, check if this new record (really a potential batch of records) was holding up any previously queued records in the pending_records queue. Any of those records that are now in order are also placed on the queue for SW encryption. - In ktls_destroy(), free any TLS records on the pending_records queue. These mbufs are marked M_NOTREADY so were not freed when the socket buffer was purged in sbdestroy(). Instead, they must be freed explicitly. Reviewed by: gallatin, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32381 (cherry picked from commit 9f03d2c00167c8047416e0048e3b7f89d73baf8e) --- sys/kern/uipc_ktls.c | 113 +++++++++++++++++++++++++++++++++++++++++++++++++-- sys/sys/ktls.h | 5 +++ 2 files changed, 115 insertions(+), 3 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 73915600779c..e9585d06841c 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -138,6 +138,11 @@ static COUNTER_U64_DEFINE_EARLY(ktls_tasks_active); SYSCTL_COUNTER_U64(_kern_ipc_tls, OID_AUTO, tasks_active, CTLFLAG_RD, &ktls_tasks_active, "Number of active tasks"); +static COUNTER_U64_DEFINE_EARLY(ktls_cnt_tx_pending); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, sw_tx_pending, CTLFLAG_RD, + &ktls_cnt_tx_pending, + "Number of TLS 1.0 records waiting for earlier TLS records"); + static COUNTER_U64_DEFINE_EARLY(ktls_cnt_tx_queued); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, sw_tx_inqueue, CTLFLAG_RD, &ktls_cnt_tx_queued, @@ -574,6 +579,9 @@ ktls_create_session(struct socket *so, struct tls_enable *en, case CRYPTO_SHA1_HMAC: if (en->tls_vminor == TLS_MINOR_VER_ZERO) { /* Implicit IV, no nonce. */ + tls->sequential_records = true; + tls->next_seqno = be64dec(en->rec_seq); + STAILQ_INIT(&tls->pending_records); } else { tls->params.tls_hlen += AES_BLOCK_LEN; } @@ -1481,6 +1489,20 @@ ktls_destroy(struct ktls_session *tls) { struct rm_priotracker prio; + if (tls->sequential_records) { + struct mbuf *m, *n; + int page_count; + + STAILQ_FOREACH_SAFE(m, &tls->pending_records, m_epg_stailq, n) { + page_count = m->m_epg_enc_cnt; + while (page_count > 0) { + KASSERT(page_count >= m->m_epg_nrdy, + ("%s: too few pages", __func__)); + page_count -= m->m_epg_nrdy; + m = m_free(m); + } + } + } ktls_cleanup(tls); if (tls->be != NULL && ktls_allow_unload) { rm_rlock(&ktls_backends_lock, &prio); @@ -1982,10 +2004,29 @@ ktls_enqueue_to_free(struct mbuf *m) wakeup(wq); } +/* Number of TLS records in a batch passed to ktls_enqueue(). */ +static u_int +ktls_batched_records(struct mbuf *m) +{ + int page_count, records; + + records = 0; + page_count = m->m_epg_enc_cnt; + while (page_count > 0) { + records++; + page_count -= m->m_epg_nrdy; + m = m->m_next; + } + KASSERT(page_count == 0, ("%s: mismatched page count", __func__)); + return (records); +} + void ktls_enqueue(struct mbuf *m, struct socket *so, int page_count) { + struct ktls_session *tls; struct ktls_wq *wq; + int queued; bool running; KASSERT(((m->m_flags & (M_EXTPG | M_NOTREADY)) == @@ -2003,14 +2044,80 @@ ktls_enqueue(struct mbuf *m, struct socket *so, int page_count) */ m->m_epg_so = so; - wq = &ktls_wq[m->m_epg_tls->wq_index]; + queued = 1; + tls = m->m_epg_tls; + wq = &ktls_wq[tls->wq_index]; mtx_lock(&wq->mtx); - STAILQ_INSERT_TAIL(&wq->m_head, m, m_epg_stailq); + if (__predict_false(tls->sequential_records)) { + /* + * For TLS 1.0, records must be encrypted + * sequentially. For a given connection, all records + * queued to the associated work queue are processed + * sequentially. However, sendfile(2) might complete + * I/O requests spanning multiple TLS records out of + * order. Here we ensure TLS records are enqueued to + * the work queue in FIFO order. + * + * tls->next_seqno holds the sequence number of the + * next TLS record that should be enqueued to the work + * queue. If this next record is not tls->next_seqno, + * it must be a future record, so insert it, sorted by + * TLS sequence number, into tls->pending_records and + * return. + * + * If this TLS record matches tls->next_seqno, place + * it in the work queue and then check + * tls->pending_records to see if any + * previously-queued records are now ready for + * encryption. + */ + if (m->m_epg_seqno != tls->next_seqno) { + struct mbuf *n, *p; + + p = NULL; + STAILQ_FOREACH(n, &tls->pending_records, m_epg_stailq) { + if (n->m_epg_seqno > m->m_epg_seqno) + break; + p = n; + } + if (n == NULL) + STAILQ_INSERT_TAIL(&tls->pending_records, m, + m_epg_stailq); + else if (p == NULL) + STAILQ_INSERT_HEAD(&tls->pending_records, m, + m_epg_stailq); + else + STAILQ_INSERT_AFTER(&tls->pending_records, p, m, + m_epg_stailq); + mtx_unlock(&wq->mtx); + counter_u64_add(ktls_cnt_tx_pending, 1); + return; + } + + tls->next_seqno += ktls_batched_records(m); + STAILQ_INSERT_TAIL(&wq->m_head, m, m_epg_stailq); + + while (!STAILQ_EMPTY(&tls->pending_records)) { + struct mbuf *n; + + n = STAILQ_FIRST(&tls->pending_records); + if (n->m_epg_seqno != tls->next_seqno) + break; + + queued++; + STAILQ_REMOVE_HEAD(&tls->pending_records, m_epg_stailq); + tls->next_seqno += ktls_batched_records(n); + STAILQ_INSERT_TAIL(&wq->m_head, n, m_epg_stailq); + } + counter_u64_add(ktls_cnt_tx_pending, -(queued - 1)); + } else + STAILQ_INSERT_TAIL(&wq->m_head, m, m_epg_stailq); + running = wq->running; mtx_unlock(&wq->mtx); if (!running) wakeup(wq); - counter_u64_add(ktls_cnt_tx_queued, 1); + counter_u64_add(ktls_cnt_tx_queued, queued); } static __noinline void diff --git a/sys/sys/ktls.h b/sys/sys/ktls.h index 3cde75f9edf6..e9cae34035c6 100644 --- a/sys/sys/ktls.h +++ b/sys/sys/ktls.h @@ -208,6 +208,11 @@ struct ktls_session { struct task reset_tag_task; struct inpcb *inp; bool reset_pending; + bool sequential_records; + + /* Only used for TLS 1.0. */ + uint64_t next_seqno; + STAILQ_HEAD(, mbuf) pending_records; } __aligned(CACHE_LINE_SIZE); void ktls_check_rx(struct sockbuf *sb); From nobody Tue Nov 23 23:12:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9083718A1676; Tue, 23 Nov 2021 23:12: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 4HzKg72d5wz3vW3; Tue, 23 Nov 2021 23:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F04D71F59D; Tue, 23 Nov 2021 23:12: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 1ANNCoON037615; Tue, 23 Nov 2021 23:12:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNColL037614; Tue, 23 Nov 2021 23:12:50 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:50 GMT Message-Id: <202111232312.1ANNColL037614@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b3d02f0be3ec - stable/13 - ctld: Always declare MaxRecvDataSegmentLength. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: b3d02f0be3ecd4a08fcd4b9ca366f9cf56418356 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TJAqs6mYDTsoTlJeB7cw3Pb8fl07l0/6ZWj30iyfGoE=; b=OaS9MeU48/xNJjtX/lxeAtT/abW2ZN+dibkHZVhOrg2GoYZZ9RFr2SmB+wM0i11yxbPY+/ NCtYJG1SuDdtXC4gicOI+FBLveXBcSE++i8GNBPp9UgWcDrln7d2npT1SBsUTsDH0xwsRo mF7a/wbBmQCcQkF8dd4EZZZ+KKylAphJMmMjwaCdojhq6ohN51Wo3cFSqPE8lZvcUnOhff w/EPQCwAiuHi7hEALC5LmAiM0m0oQbcXiB5TGMiyj+jncf2Adnj7kynSuYb7gmK632IMqs dy1aXgLvc/pMv5OJws7QuRL+/1WV4l9V4HNz9Q276m5PMbKKSjuqTnR63ZXSrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709171; a=rsa-sha256; cv=none; b=TT2b/nrHkRYGYtJRhgh25LQapiMbwoRG/2wI696a2DtI97kzSEKVc1gOd/rzhoh7bbrtl0 s/z+6Jla6lECj3IgXZkMWyv+zIB/J9yB/y/alq0CzUM2Pf7CG+OqjiAeKnxni3a7VL/dZC 8NwGxM+fPgsYLfI6doc86R4Ad2Qb8aJJKpGaHF45gOhBfHGC4n55KGAvJJciuAJGQGu+Kb SZg06SofX5/1th/6WUchYYHDd1YgF5gSO6vN8n7R5BakFc3Ib9vSHS3vZAsOyaQexyGG7t T5K8GQsCXus3UqWbsaYMs7wxWx0CsoF4nnCbUX0wzPx2PaqIeguLSYoNID8V1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b3d02f0be3ecd4a08fcd4b9ca366f9cf56418356 commit b3d02f0be3ecd4a08fcd4b9ca366f9cf56418356 Author: John Baldwin AuthorDate: 2021-10-26 21:52:40 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:44 +0000 ctld: Always declare MaxRecvDataSegmentLength. This key is Declarative and should always be sent even if the initiator did not send it's own limit. This is similar to the fix in fc79cf4fea72 but for the target side. However, unlike that fix, failure to send the key simply results in reduced performance. PR: 259439 Reviewed by: mav, emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D32651 (cherry picked from commit 7ef7b252adc0152e5f726d00640124c5de0909a9) --- usr.sbin/ctld/login.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.sbin/ctld/login.c b/usr.sbin/ctld/login.c index f219a3044586..63b2cfd51d92 100644 --- a/usr.sbin/ctld/login.c +++ b/usr.sbin/ctld/login.c @@ -565,10 +565,6 @@ login_negotiate_key(struct pdu *request, const char *name, tmp = conn->conn_max_send_data_segment_limit; } conn->conn_max_send_data_segment_length = tmp; - conn->conn_max_recv_data_segment_length = - conn->conn_max_recv_data_segment_limit; - keys_add_int(response_keys, name, - conn->conn_max_recv_data_segment_length); } else if (strcmp(name, "MaxBurstLength") == 0) { tmp = strtoul(value, NULL, 10); if (tmp <= 0) { @@ -796,6 +792,11 @@ login_negotiate(struct connection *conn, struct pdu *request) log_errx(1, "initiator sent FirstBurstLength > MaxBurstLength"); } + conn->conn_max_recv_data_segment_length = + conn->conn_max_recv_data_segment_limit; + keys_add_int(response_keys, "MaxRecvDataSegmentLength", + conn->conn_max_recv_data_segment_length); + log_debugx("operational parameter negotiation done; " "transitioning to Full Feature Phase"); From nobody Tue Nov 23 23:12:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 156E118A1994; Tue, 23 Nov 2021 23:12: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 4HzKgB4rSPz3vkH; Tue, 23 Nov 2021 23:12:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33F371F147; Tue, 23 Nov 2021 23:12: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 1ANNCr2B037663; Tue, 23 Nov 2021 23:12:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCr33037662; Tue, 23 Nov 2021 23:12:53 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:53 GMT Message-Id: <202111232312.1ANNCr33037662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 412a8b92d9c0 - stable/13 - Further refine the ExpDataSN checks for SCSI Response PDUs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 412a8b92d9c0490ba700f5ea4f676a16778643bd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sNIHUwHRrT1fdFwQvprt2xfzuVByq/1so2bThIIdH8Y=; b=iv+vGQhUrBNjqB6g0MXXmNil+Y77kpkxKdakksVk3CNLqj/B90BY3uP9zRVaivgwRgf6l+ x3dL3LH2XuaisH+86QoIw1dzkZ3ka69+knaVppgHMcckRVSejbx35bHuPi7J7XFtTe4YuS 6g3jLKueNUYsH03gB5dCOwCtn1ivdv8fHX+MDwbuWUyaWHEfkSv77fXQpeFDFKBk478OGj YUotyedm39yikSLJfce5RV9iWLn+d1HzKXcJ+voAu7MoSEFRS7HbtSl+vIvvoWOrwV9UfK ol8ZYAf/6Vb5K19FxNd/OsKZPwAxX0CLkTe0FgUBHWQYDJbyFgYoKgB2+0uFkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709176; a=rsa-sha256; cv=none; b=pvrcBXBox6Edj69TUGWKb/mdHRFDJXmw+umcTfW7qag1xD8NFXFZrRHgfQUCg31he5PFjp rZdkDGhInKMfwN7oukDooaCgtonKArMdJt4tcodf/XFmyOTklNhw0YBCRAs7iipHORjDyY D1Fvm+4IxjIjNPCRYdJ6cEW9LXptzApSB4OEsAYR8fs7vJxygbudbUshU1aNtlysGUB9a6 BEvcUMj0AoSb14gOjl6h4vy5j3Xp/kePYLxbJRmXj6GhuyTdHz17AbW0YMH2x0iOdS46o5 JFqxF3p1ndVlkHW7n0OAzNeUeQnX2sO1y2DIjCa96JxSb04em3fpII2s+DRgFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=412a8b92d9c0490ba700f5ea4f676a16778643bd commit 412a8b92d9c0490ba700f5ea4f676a16778643bd Author: John Baldwin AuthorDate: 2021-10-26 21:50:05 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:44 +0000 Further refine the ExpDataSN checks for SCSI Response PDUs. According to 11.4.8 in RFC 7143, ExpDataSN MUST be 0 if the response code is not Command Completed, but we were requiring it to always be the count of DataIn PDUs regardless of the response code. In addition, at least one target (OCI Oracle iSCSI block device) returns an ExpDataSN of 0 when returning a valid completion with an error status (Check Condition) in response to a SCSI Inquiry. As a workaround for this target, only warn without resetting the connection for a 0 ExpDataSN for responses with a non-zero error status. PR: 259152 Reported by: dch Reviewed by: dch, mav, emaste Fixes: 4f0f5bf99591 iscsi: Validate DataSN values in Data-In PDUs in the initiator. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D32650 (cherry picked from commit cdbc4a074bec094dc7f1dfde0773a9417d118ffa) --- sys/dev/iscsi/iscsi.c | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index 093ba51d265e..cc860e3f68a8 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -892,15 +892,39 @@ iscsi_pdu_handle_scsi_response(struct icl_pdu *response) } ccb = io->io_ccb; - if (ntohl(bhssr->bhssr_expdatasn) != io->io_datasn) { - ISCSI_SESSION_WARN(is, - "ExpDataSN mismatch in SCSI Response (%u vs %u)", - ntohl(bhssr->bhssr_expdatasn), io->io_datasn); - icl_pdu_free(response); - iscsi_session_reconnect(is); - ISCSI_SESSION_UNLOCK(is); - return; + if (bhssr->bhssr_response == BHSSR_RESPONSE_COMMAND_COMPLETED) { + if (ntohl(bhssr->bhssr_expdatasn) != io->io_datasn) { + ISCSI_SESSION_WARN(is, + "ExpDataSN mismatch in SCSI Response (%u vs %u)", + ntohl(bhssr->bhssr_expdatasn), io->io_datasn); + + /* + * XXX: Permit an ExpDataSN of zero for errors. + * + * This doesn't conform to RFC 7143, but some + * targets seem to do this. + */ + if (bhssr->bhssr_status != 0 && + bhssr->bhssr_expdatasn == htonl(0)) + goto skip_expdatasn; + + icl_pdu_free(response); + iscsi_session_reconnect(is); + ISCSI_SESSION_UNLOCK(is); + return; + } + } else { + if (bhssr->bhssr_expdatasn != htonl(0)) { + ISCSI_SESSION_WARN(is, + "ExpDataSN mismatch in SCSI Response (%u vs 0)", + ntohl(bhssr->bhssr_expdatasn)); + icl_pdu_free(response); + iscsi_session_reconnect(is); + ISCSI_SESSION_UNLOCK(is); + return; + } } +skip_expdatasn: /* * With iSER, after getting good response we can be sure From nobody Tue Nov 23 23:12:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C7DD418A1D04; Tue, 23 Nov 2021 23:13: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 4HzKgH0Pzvz3vbh; Tue, 23 Nov 2021 23:12:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C277B1F724; Tue, 23 Nov 2021 23:12: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 1ANNCvCB037765; Tue, 23 Nov 2021 23:12:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCv1F037764; Tue, 23 Nov 2021 23:12:57 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:57 GMT Message-Id: <202111232312.1ANNCv1F037764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 71e6792cbe81 - stable/13 - ktls: Add simple transmit tests of kernel TLS. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 71e6792cbe81f6fcbfdf545ea7c04b2ae3bfda50 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LpFkWL/vx0Judni8QkjQ86e9WSW/OI30WgC2On8Bctg=; b=Q1CliJJguGc7kTWnKn4/hOa3ocQOS1LuokJEA83vQdxxFkJrPUtkFRFoDtGeuykz05ngUV /ho9VVvj9iM4AquC/JSFIzZU6mI5eH6gQYfN/4DQilUQWaFxd/Hb1lP7NGVVFefuDMsGzL /1DMgt+7pox1NL4M78+n2Y6FPCrRqFaZrlaKTwBGD9/1XiBt3BE0Vqk0iCYroa3jmLdDrT Krap0dHU2d9bLtH26xw8zJRGpsAG0IS97WGOk5kVPQo9g6k5d4pCsAPSYHTfTHpdbkj7+t Gpi3Yw+29eAZmGQjscrdb17B0DR3w0zsZw9XZwGwpEonHmmsDLB+zIHQ7uqBzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709180; a=rsa-sha256; cv=none; b=oZJPMH5KbqSiF93cHtzOs3hgHLaqyB2YljhEa1rZBbLO2c3DdDr5ck6pLvn77ee5U+dxtc OCoKRiqrDYMyLSpim3shEuQzuGdNyTp39wmr3P2VXH32dmf/GDLseh85YJ8a5P/9nCY7Bq FQFRp8wYUnLzPEJQrYfcCkOXZUmFVgZYgcztIjtWuoMfW0RkxaBsW+JJe4vll2PcptgkqN 8/7KmQY/k4qnjeC+tApowFiZv6PRdeZhWraoMF948dSkdmbPVuDqO/CCD33afsKaWlkv4+ tcim1kWxspQYX+O77n2cBmk9cau70T35TmvhdbWm/JqLGjsHnk6W1Dl1NoYS9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=71e6792cbe81f6fcbfdf545ea7c04b2ae3bfda50 commit 71e6792cbe81f6fcbfdf545ea7c04b2ae3bfda50 Author: John Baldwin AuthorDate: 2021-11-01 18:28:10 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:45 +0000 ktls: Add simple transmit tests of kernel TLS. Note that these tests test the kernel TLS functionality directly. Rather than using OpenSSL to perform negotiation and generate keys, these tests generate random keys send data over a pair of TCP sockets manually decrypting the TLS records generated by the kernel. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32652 (cherry picked from commit a10482ea7476d68d1ab028145ae6d97cef747b49) --- tests/sys/kern/Makefile | 2 + tests/sys/kern/ktls_test.c | 1033 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1035 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 6746812d9b4a..ee9decac518c 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -12,6 +12,7 @@ ATF_TESTS_C+= kern_copyin ATF_TESTS_C+= kern_descrip_test ATF_TESTS_C+= fdgrowtable_test ATF_TESTS_C+= kill_zombie +ATF_TESTS_C+= ktls_test ATF_TESTS_C+= ptrace_test TEST_METADATA.ptrace_test+= timeout="15" ATF_TESTS_C+= reaper @@ -46,6 +47,7 @@ LIBADD.sys_getrandom+= pthread LIBADD.ptrace_test+= pthread LIBADD.unix_seqpacket_test+= pthread LIBADD.kcov+= pthread +LIBADD.ktls_test+= crypto LIBADD.sendfile_helper+= pthread LIBADD.fdgrowtable_test+= util pthread kvm procstat diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c new file mode 100644 index 000000000000..908f7f1818a2 --- /dev/null +++ b/tests/sys/kern/ktls_test.c @@ -0,0 +1,1033 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2021 Netflix Inc. + * Written by: John Baldwin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static void +require_ktls(void) +{ + size_t len; + bool enable; + + len = sizeof(enable); + if (sysctlbyname("kern.ipc.tls.enable", &enable, &len, NULL, 0) == -1) { + if (errno == ENOENT) + atf_tc_skip("kernel does not support TLS offload"); + atf_libc_error(errno, "Failed to read kern.ipc.tls.enable"); + } + + if (!enable) + atf_tc_skip("Kernel TLS is disabled"); +} + +#define ATF_REQUIRE_KTLS() require_ktls() + +static char +rdigit(void) +{ + /* ASCII printable values between 0x20 and 0x7e */ + return (0x20 + random() % (0x7f - 0x20)); +} + +static char * +alloc_buffer(size_t len) +{ + char *buf; + size_t i; + + if (len == 0) + return (NULL); + buf = malloc(len); + for (i = 0; i < len; i++) + buf[i] = rdigit(); + return (buf); +} + +static bool +socketpair_tcp(int *sv) +{ + struct pollfd pfd; + struct sockaddr_in sin; + socklen_t len; + int as, cs, ls; + + ls = socket(PF_INET, SOCK_STREAM, 0); + if (ls == -1) { + warn("socket() for listen"); + return (false); + } + + memset(&sin, 0, sizeof(sin)); + sin.sin_len = sizeof(sin); + sin.sin_family = AF_INET; + sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + if (bind(ls, (struct sockaddr *)&sin, sizeof(sin)) == -1) { + warn("bind"); + close(ls); + return (false); + } + + if (listen(ls, 1) == -1) { + warn("listen"); + close(ls); + return (false); + } + + len = sizeof(sin); + if (getsockname(ls, (struct sockaddr *)&sin, &len) == -1) { + warn("getsockname"); + close(ls); + return (false); + } + + cs = socket(PF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); + if (cs == -1) { + warn("socket() for connect"); + close(ls); + return (false); + } + + if (connect(cs, (struct sockaddr *)&sin, sizeof(sin)) == -1) { + if (errno != EINPROGRESS) { + warn("connect"); + close(ls); + close(cs); + return (false); + } + } + + as = accept4(ls, NULL, NULL, SOCK_NONBLOCK); + if (as == -1) { + warn("accept4"); + close(ls); + close(cs); + return (false); + } + + close(ls); + + pfd.fd = cs; + pfd.events = POLLOUT; + pfd.revents = 0; + ATF_REQUIRE(poll(&pfd, 1, INFTIM) == 1); + ATF_REQUIRE(pfd.revents == POLLOUT); + + sv[0] = cs; + sv[1] = as; + return (true); +} + +static void +fd_set_blocking(int fd) +{ + int flags; + + ATF_REQUIRE((flags = fcntl(fd, F_GETFL)) != -1); + flags &= ~O_NONBLOCK; + ATF_REQUIRE(fcntl(fd, F_SETFL, flags) != -1); +} + +static bool +cbc_decrypt(const EVP_CIPHER *cipher, const char *key, const char *iv, + const char *input, char *output, size_t size) +{ + EVP_CIPHER_CTX *ctx; + int outl, total; + + ctx = EVP_CIPHER_CTX_new(); + if (ctx == NULL) { + warnx("EVP_CIPHER_CTX_new failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + return (false); + } + if (EVP_CipherInit_ex(ctx, cipher, NULL, (const u_char *)key, + (const u_char *)iv, 0) != 1) { + warnx("EVP_CipherInit_ex failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + EVP_CIPHER_CTX_set_padding(ctx, 0); + if (EVP_CipherUpdate(ctx, (u_char *)output, &outl, + (const u_char *)input, size) != 1) { + warnx("EVP_CipherUpdate failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + total = outl; + if (EVP_CipherFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) { + warnx("EVP_CipherFinal_ex failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + total += outl; + if ((size_t)total != size) { + warnx("decrypt size mismatch: %zu vs %d", size, total); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + EVP_CIPHER_CTX_free(ctx); + return (true); +} + +static bool +verify_hash(const EVP_MD *md, const void *key, size_t key_len, const void *aad, + size_t aad_len, const void *buffer, size_t len, const void *digest) +{ + HMAC_CTX *ctx; + unsigned char digest2[EVP_MAX_MD_SIZE]; + u_int digest_len; + + ctx = HMAC_CTX_new(); + if (ctx == NULL) { + warnx("HMAC_CTX_new failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + return (false); + } + if (HMAC_Init_ex(ctx, key, key_len, md, NULL) != 1) { + warnx("HMAC_Init_ex failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + HMAC_CTX_free(ctx); + return (false); + } + if (HMAC_Update(ctx, aad, aad_len) != 1) { + warnx("HMAC_Update (aad) failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + HMAC_CTX_free(ctx); + return (false); + } + if (HMAC_Update(ctx, buffer, len) != 1) { + warnx("HMAC_Update (payload) failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + HMAC_CTX_free(ctx); + return (false); + } + if (HMAC_Final(ctx, digest2, &digest_len) != 1) { + warnx("HMAC_Final failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + HMAC_CTX_free(ctx); + return (false); + } + HMAC_CTX_free(ctx); + if (memcmp(digest, digest2, digest_len) != 0) { + warnx("HMAC mismatch"); + return (false); + } + return (true); +} + +static bool +aead_decrypt(const EVP_CIPHER *cipher, const char *key, const char *nonce, + const void *aad, size_t aad_len, const char *input, char *output, + size_t size, const char *tag, size_t tag_len) +{ + EVP_CIPHER_CTX *ctx; + int outl, total; + bool valid; + + ctx = EVP_CIPHER_CTX_new(); + if (ctx == NULL) { + warnx("EVP_CIPHER_CTX_new failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + return (false); + } + if (EVP_DecryptInit_ex(ctx, cipher, NULL, (const u_char *)key, + (const u_char *)nonce) != 1) { + warnx("EVP_DecryptInit_ex failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + EVP_CIPHER_CTX_set_padding(ctx, 0); + if (aad != NULL) { + if (EVP_DecryptUpdate(ctx, NULL, &outl, (const u_char *)aad, + aad_len) != 1) { + warnx("EVP_DecryptUpdate for AAD failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + } + if (EVP_DecryptUpdate(ctx, (u_char *)output, &outl, + (const u_char *)input, size) != 1) { + warnx("EVP_DecryptUpdate failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + total = outl; + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, tag_len, + __DECONST(char *, tag)) != 1) { + warnx("EVP_CIPHER_CTX_ctrl(EVP_CTRL_AEAD_SET_TAG) failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + valid = (EVP_DecryptFinal_ex(ctx, (u_char *)output + outl, &outl) == 1); + total += outl; + if ((size_t)total != size) { + warnx("decrypt size mismatch: %zu vs %d", size, total); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + if (!valid) + warnx("tag mismatch"); + EVP_CIPHER_CTX_free(ctx); + return (valid); +} + +static void +build_tls_enable(int cipher_alg, size_t cipher_key_len, int auth_alg, + int minor, uint64_t seqno, struct tls_enable *en) +{ + u_int auth_key_len, iv_len; + + memset(en, 0, sizeof(*en)); + + switch (cipher_alg) { + case CRYPTO_AES_CBC: + if (minor == TLS_MINOR_VER_ZERO) + iv_len = AES_BLOCK_LEN; + else + iv_len = 0; + break; + case CRYPTO_AES_NIST_GCM_16: + if (minor == TLS_MINOR_VER_TWO) + iv_len = TLS_AEAD_GCM_LEN; + else + iv_len = TLS_1_3_GCM_IV_LEN; + break; + case CRYPTO_CHACHA20_POLY1305: + iv_len = TLS_CHACHA20_IV_LEN; + break; + default: + iv_len = 0; + break; + } + switch (auth_alg) { + case CRYPTO_SHA1_HMAC: + auth_key_len = SHA1_HASH_LEN; + break; + case CRYPTO_SHA2_256_HMAC: + auth_key_len = SHA2_256_HASH_LEN; + break; + case CRYPTO_SHA2_384_HMAC: + auth_key_len = SHA2_384_HASH_LEN; + break; + default: + auth_key_len = 0; + break; + } + en->cipher_key = alloc_buffer(cipher_key_len); + en->iv = alloc_buffer(iv_len); + en->auth_key = alloc_buffer(auth_key_len); + en->cipher_algorithm = cipher_alg; + en->cipher_key_len = cipher_key_len; + en->iv_len = iv_len; + en->auth_algorithm = auth_alg; + en->auth_key_len = auth_key_len; + en->tls_vmajor = TLS_MAJOR_VER_ONE; + en->tls_vminor = minor; + be64enc(en->rec_seq, seqno); +} + +static void +free_tls_enable(struct tls_enable *en) +{ + free(__DECONST(void *, en->cipher_key)); + free(__DECONST(void *, en->iv)); + free(__DECONST(void *, en->auth_key)); +} + +static const EVP_CIPHER * +tls_EVP_CIPHER(const struct tls_enable *en) +{ + switch (en->cipher_algorithm) { + case CRYPTO_AES_CBC: + switch (en->cipher_key_len) { + case 128 / 8: + return (EVP_aes_128_cbc()); + case 256 / 8: + return (EVP_aes_256_cbc()); + default: + return (NULL); + } + break; + case CRYPTO_AES_NIST_GCM_16: + switch (en->cipher_key_len) { + case 128 / 8: + return (EVP_aes_128_gcm()); + case 256 / 8: + return (EVP_aes_256_gcm()); + default: + return (NULL); + } + break; + case CRYPTO_CHACHA20_POLY1305: + return (EVP_chacha20_poly1305()); + default: + return (NULL); + } +} + +static const EVP_MD * +tls_EVP_MD(const struct tls_enable *en) +{ + switch (en->auth_algorithm) { + case CRYPTO_SHA1_HMAC: + return (EVP_sha1()); + case CRYPTO_SHA2_256_HMAC: + return (EVP_sha256()); + case CRYPTO_SHA2_384_HMAC: + return (EVP_sha384()); + default: + return (NULL); + } +} + +static size_t +tls_header_len(struct tls_enable *en) +{ + size_t len; + + len = sizeof(struct tls_record_layer); + switch (en->cipher_algorithm) { + case CRYPTO_AES_CBC: + if (en->tls_vminor != TLS_MINOR_VER_ZERO) + len += AES_BLOCK_LEN; + return (len); + case CRYPTO_AES_NIST_GCM_16: + if (en->tls_vminor == TLS_MINOR_VER_TWO) + len += sizeof(uint64_t); + return (len); + case CRYPTO_CHACHA20_POLY1305: + return (len); + default: + return (0); + } +} + +static size_t +tls_mac_len(struct tls_enable *en) +{ + switch (en->cipher_algorithm) { + case CRYPTO_AES_CBC: + switch (en->auth_algorithm) { + case CRYPTO_SHA1_HMAC: + return (SHA1_HASH_LEN); + case CRYPTO_SHA2_256_HMAC: + return (SHA2_256_HASH_LEN); + case CRYPTO_SHA2_384_HMAC: + return (SHA2_384_HASH_LEN); + default: + return (0); + } + case CRYPTO_AES_NIST_GCM_16: + return (AES_GMAC_HASH_LEN); + case CRYPTO_CHACHA20_POLY1305: + return (POLY1305_HASH_LEN); + default: + return (0); + } +} + +/* Includes maximum padding for MTE. */ +static size_t +tls_trailer_len(struct tls_enable *en) +{ + size_t len; + + len = tls_mac_len(en); + if (en->cipher_algorithm == CRYPTO_AES_CBC) + len += AES_BLOCK_LEN; + if (en->tls_vminor == TLS_MINOR_VER_THREE) + len++; + return (len); +} + +/* 'len' is the length of the payload application data. */ +static void +tls_mte_aad(struct tls_enable *en, size_t len, + const struct tls_record_layer *hdr, uint64_t seqno, struct tls_mac_data *ad) +{ + ad->seq = htobe64(seqno); + ad->type = hdr->tls_type; + ad->tls_vmajor = hdr->tls_vmajor; + ad->tls_vminor = hdr->tls_vminor; + ad->tls_length = htons(len); +} + +static void +tls_12_aead_aad(struct tls_enable *en, size_t len, + const struct tls_record_layer *hdr, uint64_t seqno, + struct tls_aead_data *ad) +{ + ad->seq = htobe64(seqno); + ad->type = hdr->tls_type; + ad->tls_vmajor = hdr->tls_vmajor; + ad->tls_vminor = hdr->tls_vminor; + ad->tls_length = htons(len); +} + +static void +tls_13_aad(struct tls_enable *en, const struct tls_record_layer *hdr, + uint64_t seqno, struct tls_aead_data_13 *ad) +{ + ad->type = hdr->tls_type; + ad->tls_vmajor = hdr->tls_vmajor; + ad->tls_vminor = hdr->tls_vminor; + ad->tls_length = hdr->tls_length; +} + +static void +tls_12_gcm_nonce(struct tls_enable *en, const struct tls_record_layer *hdr, + char *nonce) +{ + memcpy(nonce, en->iv, TLS_AEAD_GCM_LEN); + memcpy(nonce + TLS_AEAD_GCM_LEN, hdr + 1, sizeof(uint64_t)); +} + +static void +tls_13_nonce(struct tls_enable *en, uint64_t seqno, char *nonce) +{ + static_assert(TLS_1_3_GCM_IV_LEN == TLS_CHACHA20_IV_LEN, + "TLS 1.3 nonce length mismatch"); + memcpy(nonce, en->iv, TLS_1_3_GCM_IV_LEN); + *(uint64_t *)(nonce + 4) ^= htobe64(seqno); +} + +/* + * Decrypt a TLS record 'len' bytes long at 'src' and store the result at + * 'dst'. If the TLS record header length doesn't match or 'dst' doesn't + * have sufficient room ('avail'), fail the test. + */ +static size_t +decrypt_tls_aes_cbc_mte(struct tls_enable *en, uint64_t seqno, const void *src, + size_t len, void *dst, size_t avail, uint8_t *record_type) +{ + const struct tls_record_layer *hdr; + struct tls_mac_data aad; + const char *iv; + char *buf; + size_t hdr_len, mac_len, payload_len; + int padding; + + hdr = src; + hdr_len = tls_header_len(en); + mac_len = tls_mac_len(en); + ATF_REQUIRE(hdr->tls_vmajor == TLS_MAJOR_VER_ONE); + ATF_REQUIRE(hdr->tls_vminor == en->tls_vminor); + + /* First, decrypt the outer payload into a temporary buffer. */ + payload_len = len - hdr_len; + buf = malloc(payload_len); + if (en->tls_vminor == TLS_MINOR_VER_ZERO) + iv = en->iv; + else + iv = (void *)(hdr + 1); + ATF_REQUIRE(cbc_decrypt(tls_EVP_CIPHER(en), en->cipher_key, iv, + (const u_char *)src + hdr_len, buf, payload_len)); + + /* + * Copy the last encrypted block to use as the IV for the next + * record for TLS 1.0. + */ + if (en->tls_vminor == TLS_MINOR_VER_ZERO) + memcpy(__DECONST(uint8_t *, en->iv), (const u_char *)src + + (len - AES_BLOCK_LEN), AES_BLOCK_LEN); + + /* + * Verify trailing padding and strip. + * + * The kernel always generates the smallest amount of padding. + */ + padding = buf[payload_len - 1] + 1; + ATF_REQUIRE(padding > 0 && padding <= AES_BLOCK_LEN); + ATF_REQUIRE(payload_len >= mac_len + padding); + payload_len -= padding; + + /* Verify HMAC. */ + payload_len -= mac_len; + tls_mte_aad(en, payload_len, hdr, seqno, &aad); + ATF_REQUIRE(verify_hash(tls_EVP_MD(en), en->auth_key, en->auth_key_len, + &aad, sizeof(aad), buf, payload_len, buf + payload_len)); + + ATF_REQUIRE(payload_len <= avail); + memcpy(dst, buf, payload_len); + *record_type = hdr->tls_type; + return (payload_len); +} + +static size_t +decrypt_tls_12_aead(struct tls_enable *en, uint64_t seqno, const void *src, + size_t len, void *dst, uint8_t *record_type) +{ + const struct tls_record_layer *hdr; + struct tls_aead_data aad; + char nonce[12]; + size_t hdr_len, mac_len, payload_len; + + hdr = src; + + hdr_len = tls_header_len(en); + mac_len = tls_mac_len(en); + payload_len = len - (hdr_len + mac_len); + ATF_REQUIRE(hdr->tls_vmajor == TLS_MAJOR_VER_ONE); + ATF_REQUIRE(hdr->tls_vminor == TLS_MINOR_VER_TWO); + + tls_12_aead_aad(en, payload_len, hdr, seqno, &aad); + if (en->cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + tls_12_gcm_nonce(en, hdr, nonce); + else + tls_13_nonce(en, seqno, nonce); + + ATF_REQUIRE(aead_decrypt(tls_EVP_CIPHER(en), en->cipher_key, nonce, + &aad, sizeof(aad), (const char *)src + hdr_len, dst, payload_len, + (const char *)src + hdr_len + payload_len, mac_len)); + + *record_type = hdr->tls_type; + return (payload_len); +} + +static size_t +decrypt_tls_13_aead(struct tls_enable *en, uint64_t seqno, const void *src, + size_t len, void *dst, uint8_t *record_type) +{ + const struct tls_record_layer *hdr; + struct tls_aead_data_13 aad; + char nonce[12]; + char *buf; + size_t hdr_len, mac_len, payload_len; + + hdr = src; + + hdr_len = tls_header_len(en); + mac_len = tls_mac_len(en); + payload_len = len - (hdr_len + mac_len); + ATF_REQUIRE(payload_len >= 1); + ATF_REQUIRE(hdr->tls_type == TLS_RLTYPE_APP); + ATF_REQUIRE(hdr->tls_vmajor == TLS_MAJOR_VER_ONE); + ATF_REQUIRE(hdr->tls_vminor == TLS_MINOR_VER_TWO); + + tls_13_aad(en, hdr, seqno, &aad); + tls_13_nonce(en, seqno, nonce); + + /* + * Have to use a temporary buffer for the output due to the + * record type as the last byte of the trailer. + */ + buf = malloc(payload_len); + + ATF_REQUIRE(aead_decrypt(tls_EVP_CIPHER(en), en->cipher_key, nonce, + &aad, sizeof(aad), (const char *)src + hdr_len, buf, payload_len, + (const char *)src + hdr_len + payload_len, mac_len)); + + /* Trim record type. */ + *record_type = buf[payload_len - 1]; + payload_len--; + + memcpy(dst, buf, payload_len); + free(buf); + + return (payload_len); +} + +static size_t +decrypt_tls_aead(struct tls_enable *en, uint64_t seqno, const void *src, + size_t len, void *dst, size_t avail, uint8_t *record_type) +{ + const struct tls_record_layer *hdr; + size_t payload_len; + + hdr = src; + ATF_REQUIRE(ntohs(hdr->tls_length) + sizeof(*hdr) == len); + + payload_len = len - (tls_header_len(en) + tls_trailer_len(en)); + ATF_REQUIRE(payload_len <= avail); + + if (en->tls_vminor == TLS_MINOR_VER_TWO) { + ATF_REQUIRE(decrypt_tls_12_aead(en, seqno, src, len, dst, + record_type) == payload_len); + } else { + ATF_REQUIRE(decrypt_tls_13_aead(en, seqno, src, len, dst, + record_type) == payload_len); + } + + return (payload_len); +} + +static size_t +decrypt_tls_record(struct tls_enable *en, uint64_t seqno, const void *src, + size_t len, void *dst, size_t avail, uint8_t *record_type) +{ + if (en->cipher_algorithm == CRYPTO_AES_CBC) + return (decrypt_tls_aes_cbc_mte(en, seqno, src, len, dst, avail, + record_type)); + else + return (decrypt_tls_aead(en, seqno, src, len, dst, avail, + record_type)); +} + +static void +test_ktls_transmit_app_data(struct tls_enable *en, uint64_t seqno, size_t len) +{ + struct kevent ev; + struct tls_record_layer *hdr; + char *plaintext, *decrypted, *outbuf; + size_t decrypted_len, outbuf_len, outbuf_cap, record_len, written; + ssize_t rv; + int kq, sockets[2]; + uint8_t record_type; + + plaintext = alloc_buffer(len); + decrypted = malloc(len); + outbuf_cap = tls_header_len(en) + TLS_MAX_MSG_SIZE_V10_2 + + tls_trailer_len(en); + outbuf = malloc(outbuf_cap); + hdr = (struct tls_record_layer *)outbuf; + + ATF_REQUIRE((kq = kqueue()) != -1); + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[1], IPPROTO_TCP, TCP_TXTLS_ENABLE, en, + sizeof(*en)) == 0); + + EV_SET(&ev, sockets[0], EVFILT_READ, EV_ADD, 0, 0, NULL); + ATF_REQUIRE(kevent(kq, &ev, 1, NULL, 0, NULL) == 0); + EV_SET(&ev, sockets[1], EVFILT_WRITE, EV_ADD, 0, 0, NULL); + ATF_REQUIRE(kevent(kq, &ev, 1, NULL, 0, NULL) == 0); + + decrypted_len = 0; + outbuf_len = 0; + written = 0; + + while (decrypted_len != len) { + ATF_REQUIRE(kevent(kq, NULL, 0, &ev, 1, NULL) == 1); + + switch (ev.filter) { + case EVFILT_WRITE: + /* Try to write any remaining data. */ + rv = write(ev.ident, plaintext + written, + len - written); + ATF_REQUIRE_MSG(rv > 0, + "failed to write to socket"); + written += rv; + if (written == len) { + ev.flags = EV_DISABLE; + ATF_REQUIRE(kevent(kq, &ev, 1, NULL, 0, + NULL) == 0); + } + break; + + case EVFILT_READ: + ATF_REQUIRE((ev.flags & EV_EOF) == 0); + + /* + * Try to read data for the next TLS record + * into outbuf. Start by reading the header + * to determine how much additional data to + * read. + */ + if (outbuf_len < sizeof(struct tls_record_layer)) { + rv = read(ev.ident, outbuf + outbuf_len, + sizeof(struct tls_record_layer) - + outbuf_len); + ATF_REQUIRE_MSG(rv > 0, + "failed to read from socket"); + outbuf_len += rv; + } + + if (outbuf_len < sizeof(struct tls_record_layer)) + break; + + record_len = sizeof(struct tls_record_layer) + + ntohs(hdr->tls_length); + assert(record_len <= outbuf_cap); + assert(record_len > outbuf_len); + rv = read(ev.ident, outbuf + outbuf_len, + record_len - outbuf_len); + if (rv == -1 && errno == EAGAIN) + break; + ATF_REQUIRE_MSG(rv > 0, "failed to read from socket"); + + outbuf_len += rv; + if (outbuf_len == record_len) { + decrypted_len += decrypt_tls_record(en, seqno, + outbuf, outbuf_len, + decrypted + decrypted_len, + len - decrypted_len, &record_type); + ATF_REQUIRE(record_type == TLS_RLTYPE_APP); + + seqno++; + outbuf_len = 0; + } + break; + } + } + + ATF_REQUIRE_MSG(written == decrypted_len, + "read %zu decrypted bytes, but wrote %zu", decrypted_len, written); + + ATF_REQUIRE(memcmp(plaintext, decrypted, len) == 0); + + free(outbuf); + free(decrypted); + free(plaintext); + + close(sockets[1]); + close(sockets[0]); + close(kq); +} + +static void +ktls_send_control_message(int fd, uint8_t type, void *data, size_t len) +{ + struct msghdr msg; + struct cmsghdr *cmsg; + char cbuf[CMSG_SPACE(sizeof(type))]; + struct iovec iov; + + memset(&msg, 0, sizeof(msg)); + + msg.msg_control = cbuf; + msg.msg_controllen = sizeof(cbuf); + cmsg = CMSG_FIRSTHDR(&msg); + cmsg->cmsg_level = IPPROTO_TCP; + cmsg->cmsg_type = TLS_SET_RECORD_TYPE; + cmsg->cmsg_len = CMSG_LEN(sizeof(type)); + *(uint8_t *)CMSG_DATA(cmsg) = type; + + iov.iov_base = data; + iov.iov_len = len; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + + ATF_REQUIRE(sendmsg(fd, &msg, 0) == (ssize_t)len); +} + +static void +test_ktls_transmit_control(struct tls_enable *en, uint64_t seqno, uint8_t type, + size_t len) +{ + struct tls_record_layer *hdr; + char *plaintext, *decrypted, *outbuf; + size_t outbuf_cap, payload_len, record_len; + ssize_t rv; + int sockets[2]; + uint8_t record_type; + + ATF_REQUIRE(len <= TLS_MAX_MSG_SIZE_V10_2); + + plaintext = alloc_buffer(len); + decrypted = malloc(len); + outbuf_cap = tls_header_len(en) + len + tls_trailer_len(en); + outbuf = malloc(outbuf_cap); + hdr = (struct tls_record_layer *)outbuf; + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[1], IPPROTO_TCP, TCP_TXTLS_ENABLE, en, + sizeof(*en)) == 0); + + fd_set_blocking(sockets[0]); + fd_set_blocking(sockets[1]); + + ktls_send_control_message(sockets[1], type, plaintext, len); + + /* + * First read the header to determine how much additional data + * to read. + */ + rv = read(sockets[0], outbuf, sizeof(struct tls_record_layer)); + ATF_REQUIRE(rv == sizeof(struct tls_record_layer)); + payload_len = ntohs(hdr->tls_length); + record_len = payload_len + sizeof(struct tls_record_layer); + assert(record_len <= outbuf_cap); + rv = read(sockets[0], outbuf + sizeof(struct tls_record_layer), + payload_len); + ATF_REQUIRE(rv == (ssize_t)payload_len); + + rv = decrypt_tls_record(en, seqno, outbuf, record_len, decrypted, len, + &record_type); + + ATF_REQUIRE_MSG((ssize_t)len == rv, + "read %zd decrypted bytes, but wrote %zu", rv, len); + ATF_REQUIRE(record_type == type); + + ATF_REQUIRE(memcmp(plaintext, decrypted, len) == 0); + + free(outbuf); + free(decrypted); + free(plaintext); + + close(sockets[1]); + close(sockets[0]); +} + +#define AES_CBC_TESTS(M) \ + M(aes128_cbc_1_0_sha1, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA1_HMAC, TLS_MINOR_VER_ZERO) \ + M(aes256_cbc_1_0_sha1, CRYPTO_AES_CBC, 256 / 8, \ + CRYPTO_SHA1_HMAC, TLS_MINOR_VER_ZERO) \ + M(aes128_cbc_1_1_sha1, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA1_HMAC, TLS_MINOR_VER_ONE) \ + M(aes256_cbc_1_1_sha1, CRYPTO_AES_CBC, 256 / 8, \ + CRYPTO_SHA1_HMAC, TLS_MINOR_VER_ONE) \ + M(aes128_cbc_1_2_sha1, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA1_HMAC, TLS_MINOR_VER_TWO) \ + M(aes256_cbc_1_2_sha1, CRYPTO_AES_CBC, 256 / 8, \ + CRYPTO_SHA1_HMAC, TLS_MINOR_VER_TWO) \ + M(aes128_cbc_1_2_sha256, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_256_HMAC, TLS_MINOR_VER_TWO) \ + M(aes256_cbc_1_2_sha256, CRYPTO_AES_CBC, 256 / 8, \ + CRYPTO_SHA2_256_HMAC, TLS_MINOR_VER_TWO) \ + M(aes128_cbc_1_2_sha384, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_384_HMAC, TLS_MINOR_VER_TWO) \ + M(aes256_cbc_1_2_sha384, CRYPTO_AES_CBC, 256 / 8, \ + CRYPTO_SHA2_384_HMAC, TLS_MINOR_VER_TWO) \ *** 99 LINES SKIPPED *** From nobody Tue Nov 23 23:13:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5D03918A2040; Tue, 23 Nov 2021 23:13: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 4HzKgM11v1z3vqH; Tue, 23 Nov 2021 23:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 350FF1F4F7; Tue, 23 Nov 2021 23:13: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 1ANND1Sj037837; Tue, 23 Nov 2021 23:13:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANND11M037836; Tue, 23 Nov 2021 23:13:01 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:01 GMT Message-Id: <202111232313.1ANND11M037836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: aa7aa23171c8 - stable/13 - crypto: Cleanup mtx_init() calls. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: aa7aa23171c86d0f05a90cef646ae6d1a3d1200e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fq+5/oqZGNw1CPHfK0Mmksyf0nkpuzNbdI8tPiFCT/8=; b=Ji7rTsv4D16S7PqYmcxPERwU+n8a5WYFUVd7cR8XCXTuBxX2Dh0UMk5yfSuiwgac/3kArU Ub1quiNuFYLjFFN0EtXxvbvXVwz73rg1PQW6b44KYpPajt/v1/L8GFlqUVmZY29RcNMD73 ft6W3gjUflaSSuR2vmdMTHY/cnWV+07J1IYSzn2Z52t0BGcuSJCoNp1Yipt4GRpIqJAO/8 UTj/0lMrTMhQ3jntrXXP38ROiKCeRg24NWWahfnDNsyMOZqQ4CHTR+RCvukmm1iw6kzwvy xAyiuKpPR16ioosaj6y4wjPNYZ2j+gKulhhVfnDfE2UxqsXPApkegqig+R9sBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709186; a=rsa-sha256; cv=none; b=lABt/mAdBDn8ZS3rVoyDh8NuJN4MF/jPOy5FG7yHZNTIWTQArkfjGsC3OavQo5OBP5FbJB joXYlJXg9wEtPRnshIi0bQKRWV3qEp39g3+VFOkvnftfQw7npH3rYYFN4LkEDzf2wdFjtE uqFocqBBGs0hM+ocCuwgMcmtMorBaTPsy4tsLLghBIWWbSfqdRlta/BO2TifNDNlu2j5N7 jUOAhPOKY2ABE+qQPYUJ8rtiabsseOx70jPh6wsjFbjdMusR2Z0LBZmD6mqFNGQkGkdfDa QUJnOhk5JtxxHA/gXIoTLn17wO+3t+GhL5VNvgJ6m3mj6dghtbilk8feWwnfsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=aa7aa23171c86d0f05a90cef646ae6d1a3d1200e commit aa7aa23171c86d0f05a90cef646ae6d1a3d1200e Author: John Baldwin AuthorDate: 2021-11-02 18:27:20 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:49 +0000 crypto: Cleanup mtx_init() calls. Don't pass the same name to multiple mutexes while using unique types for WITNESS. Just use the unique types as the mutex names. Reviewed by: markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D32740 (cherry picked from commit 4e057806cf56b238a0a3ef7af140f447d7b67ab5) --- sys/opencrypto/crypto.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c index a151ee21dce7..576382406d88 100644 --- a/sys/opencrypto/crypto.c +++ b/sys/opencrypto/crypto.c @@ -327,12 +327,11 @@ crypto_init(void) struct proc *p; int error; - mtx_init(&crypto_drivers_mtx, "crypto", "crypto driver table", - MTX_DEF|MTX_QUIET); + mtx_init(&crypto_drivers_mtx, "crypto driver table", NULL, MTX_DEF); TAILQ_INIT(&crp_q); TAILQ_INIT(&crp_kq); - mtx_init(&crypto_q_mtx, "crypto", "crypto op queues", MTX_DEF); + mtx_init(&crypto_q_mtx, "crypto op queues", NULL, MTX_DEF); cryptop_zone = uma_zcreate("cryptop", sizeof(struct cryptop), NULL, NULL, NULL, NULL, @@ -371,7 +370,8 @@ crypto_init(void) ret_worker->reorder_ops = 0; ret_worker->reorder_cur_seq = 0; - mtx_init(&ret_worker->crypto_ret_mtx, "crypto", "crypto return queues", MTX_DEF); + mtx_init(&ret_worker->crypto_ret_mtx, "crypto return queues", + NULL, MTX_DEF); error = kthread_add(crypto_ret_thread, ret_worker, p, &ret_worker->td, 0, 0, "crypto returns %td", From nobody Tue Nov 23 23:12:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8E46A18A1C7A; Tue, 23 Nov 2021 23:13: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 4HzKgK2cW3z3vq8; Tue, 23 Nov 2021 23:13:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 197D81F550; Tue, 23 Nov 2021 23:13: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 1ANNCxT0037813; Tue, 23 Nov 2021 23:12:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNCxIa037812; Tue, 23 Nov 2021 23:12:59 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:12:59 GMT Message-Id: <202111232312.1ANNCxIa037812@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 351541661ce0 - stable/13 - crypto: Use a single "crypto" kproc for all of the OCF kthreads. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 351541661ce00f78873e693331433f48c6161ee0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wK0LfxDH1b5sXcykR1EfznWtKNr+XmsbCXyjbEE7N48=; b=ybK29N0PX52j+bTU2enJbI+blpCjVtOZkzSnBG/j1WLxH3POVL6eb12goEDpwtSGRR5xnp 4/NlJBnjhhEnu/3iaMpk2f0iYpl4r+yvnYBf/GiDgPkx+bukwMeEFCRxYX75a+S0JOdk2j JnaIow7l+AyVZ/hj6IPUnJADp9FWx9R/5a2h2hBkFXHFPG3EZ/z8LJEsGFqWb8Oy4JoX9d XTSBUk02+oQqklxjKJVEbhy3T2h28VTYE8xJ6TdvPsgBhw33l+Io1lHQQmtHLVZoXCMJos gNUBjS2bZvP5f3QlVUIbFKd5WT0NDw5VLt04T/3p6TePIw2Wy0CILWvAFwRZJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709182; a=rsa-sha256; cv=none; b=WMI3PgrVbqRsrGWGmbT26ZJLQJUJThqe9jb4bhiFWSknST9/3LWlxuSJT+wNABpAWUda0D zzC4qesX7g3yLxI+0JntTPWqwy5psT2KVA5fDJKobh+n9vTOPsY6Xc6CuE3bM2k/nQDqM0 P1bNRkCiKu8oHupl0K/zhCgM7U1VhShI+pAEOO17x9PKMRlUEMQTXgb2rsIxjsKosofLbP Rg+AP9xEU22IaN8FOKwzKoG/8pRNzkEQdtSimUTrmKZrux/og1lJjP0GpKS1dvoSa1PD+l PtWyxKLX2T7007ccUj4379LcryxpkUynP3xsjpLgjuuihLVf+4dpvucDJfWy/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=351541661ce00f78873e693331433f48c6161ee0 commit 351541661ce00f78873e693331433f48c6161ee0 Author: John Baldwin AuthorDate: 2021-11-02 18:26:21 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:45 +0000 crypto: Use a single "crypto" kproc for all of the OCF kthreads. Reported by: julian Reviewed by: markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D32739 (cherry picked from commit 717857819223d9c0f81eb38abd0df200532e1cdc) --- sys/opencrypto/crypto.c | 50 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c index f0fd3fe662a9..a151ee21dce7 100644 --- a/sys/opencrypto/crypto.c +++ b/sys/opencrypto/crypto.c @@ -181,7 +181,7 @@ struct crypto_ret_worker { uint32_t reorder_ops; /* total ordered sym jobs received */ uint32_t reorder_cur_seq; /* current sym job dispatched */ - struct proc *cryptoretproc; + struct thread *td; }; static struct crypto_ret_worker *crypto_ret_workers = NULL; @@ -229,9 +229,9 @@ SYSCTL_INT(_kern, OID_AUTO, cryptodevallowsoft, CTLFLAG_RWTUN, MALLOC_DEFINE(M_CRYPTO_DATA, "crypto", "crypto session records"); -static void crypto_proc(void); -static struct proc *cryptoproc; -static void crypto_ret_proc(struct crypto_ret_worker *ret_worker); +static void crypto_dispatch_thread(void *arg); +static struct thread *cryptotd; +static void crypto_ret_thread(void *arg); static void crypto_destroy(void); static int crypto_invoke(struct cryptocap *cap, struct cryptop *crp, int hint); static int crypto_kinvoke(struct cryptkop *krp); @@ -324,6 +324,7 @@ static int crypto_init(void) { struct crypto_ret_worker *ret_worker; + struct proc *p; int error; mtx_init(&crypto_drivers_mtx, "crypto", "crypto driver table", @@ -350,8 +351,9 @@ crypto_init(void) taskqueue_start_threads(&crypto_tq, crypto_workers_num, PRI_MIN_KERN, "crypto"); - error = kproc_create((void (*)(void *)) crypto_proc, NULL, - &cryptoproc, 0, 0, "crypto"); + p = NULL; + error = kproc_kthread_add(crypto_dispatch_thread, NULL, &p, &cryptotd, + 0, 0, "crypto", "crypto"); if (error) { printf("crypto_init: cannot start crypto thread; error %d", error); @@ -371,8 +373,9 @@ crypto_init(void) mtx_init(&ret_worker->crypto_ret_mtx, "crypto", "crypto return queues", MTX_DEF); - error = kproc_create((void (*)(void *)) crypto_ret_proc, ret_worker, - &ret_worker->cryptoretproc, 0, 0, "crypto returns %td", CRYPTO_RETW_ID(ret_worker)); + error = kthread_add(crypto_ret_thread, ret_worker, p, + &ret_worker->td, 0, 0, "crypto returns %td", + CRYPTO_RETW_ID(ret_worker)); if (error) { printf("crypto_init: cannot start cryptoret thread; error %d", error); @@ -396,20 +399,16 @@ bad: * for the other half of this song-and-dance. */ static void -crypto_terminate(struct proc **pp, void *q) +crypto_terminate(struct thread **tdp, void *q) { - struct proc *p; + struct thread *td; mtx_assert(&crypto_drivers_mtx, MA_OWNED); - p = *pp; - *pp = NULL; - if (p) { + td = *tdp; + *tdp = NULL; + if (td != NULL) { wakeup_one(q); - PROC_LOCK(p); /* NB: insure we don't miss wakeup */ - CRYPTO_DRIVER_UNLOCK(); /* let crypto_finis progress */ - msleep(p, &p->p_mtx, PWAIT, "crypto_destroy", 0); - PROC_UNLOCK(p); - CRYPTO_DRIVER_LOCK(); + mtx_sleep(td, &crypto_drivers_mtx, PWAIT, "crypto_destroy", 0); } } @@ -472,9 +471,9 @@ crypto_destroy(void) if (crypto_tq != NULL) taskqueue_drain_all(crypto_tq); CRYPTO_DRIVER_LOCK(); - crypto_terminate(&cryptoproc, &crp_q); + crypto_terminate(&cryptotd, &crp_q); FOREACH_CRYPTO_RETW(ret_worker) - crypto_terminate(&ret_worker->cryptoretproc, &ret_worker->crp_ret_q); + crypto_terminate(&ret_worker->td, &ret_worker->crp_ret_q); CRYPTO_DRIVER_UNLOCK(); /* XXX flush queues??? */ @@ -1987,14 +1986,14 @@ crypto_finis(void *chan) CRYPTO_DRIVER_LOCK(); wakeup_one(chan); CRYPTO_DRIVER_UNLOCK(); - kproc_exit(0); + kthread_exit(); } /* * Crypto thread, dispatches crypto requests. */ static void -crypto_proc(void) +crypto_dispatch_thread(void *arg __unused) { struct cryptop *crp, *submit; struct cryptkop *krp; @@ -2126,7 +2125,7 @@ crypto_proc(void) crp_sleep = 1; msleep(&crp_q, &crypto_q_mtx, PWAIT, "crypto_wait", 0); crp_sleep = 0; - if (cryptoproc == NULL) + if (cryptotd == NULL) break; CRYPTOSTAT_INC(cs_intrs); } @@ -2142,8 +2141,9 @@ crypto_proc(void) * callbacks typically are expensive and would slow interrupt handling. */ static void -crypto_ret_proc(struct crypto_ret_worker *ret_worker) +crypto_ret_thread(void *arg) { + struct crypto_ret_worker *ret_worker = arg; struct cryptop *crpt; struct cryptkop *krpt; @@ -2187,7 +2187,7 @@ crypto_ret_proc(struct crypto_ret_worker *ret_worker) */ msleep(&ret_worker->crp_ret_q, &ret_worker->crypto_ret_mtx, PWAIT, "crypto_ret_wait", 0); - if (ret_worker->cryptoretproc == NULL) + if (ret_worker->td == NULL) break; CRYPTOSTAT_INC(cs_rets); } From nobody Tue Nov 23 23:13:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E9D8A18A1FA5; Tue, 23 Nov 2021 23:13: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 4HzKgN66vlz3vsR; Tue, 23 Nov 2021 23:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7CD451F2B8; Tue, 23 Nov 2021 23:13: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 1ANND3p1037891; Tue, 23 Nov 2021 23:13:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANND37n037890; Tue, 23 Nov 2021 23:13:03 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:03 GMT Message-Id: <202111232313.1ANND37n037890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 93074f595e7e - stable/13 - Drop "All rights reserved" from a Netflix copyright. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 93074f595e7e28e605eeed28e188707fe7619a9f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GPVlt6z8VBqGGnU/pCs3DGUQ6onTLumUuolDnA6/P5s=; b=uf8WSm4J/nmfzU2Y+LewcTtslaSo8lqNQclxV2EDCCcyCQv02ZJYJTH5IKSPxs567byAnB NqD4l+lA+2rCZbbH22vxp+fY8b86yeiwgAFc0hb7vGJXcaplIDH0iYXBjD+0V2zUC5Ympc zZIoJetIU/T3PK5/+YoGm7MscGZcSb671oFkWDO+qFPdCwdItacQdZKs9PiMy/mGut+TKr I1hs1lAArB/mOY6TULu+djKAK7ovBCfADHcNonsBYkSwtrkrJrpGkmhqDgxImdJJaFuUD5 8tMQD9N8oOPzc9aTEE6s/88wN0936O+J3AY+05EU8gvqmOFDUVTkVX5+SIKqOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709185; a=rsa-sha256; cv=none; b=LUm+rHEcjN+jvaeijM2LaYttTaaHhvOHz2sOfDfTcnfJeD+QeHvlOZuf6w0NV3cbNFVCaV hVQrC7r8y0gDJGjm+6Icad094MPaSx1t7yy/C2AdARYas0GB3tKbosS6ykJlVBBY+VKRax RpJZOWwbhdlwX6c6Y5i3NsEVMZLVexb0cm55BSRyLdpFHH/IOOcv6KK6VwTV2IyzTiPIdE SeZPkTb4OGuIoFt33uoAqDm8u+ogdZeb7RhOnlSXxGPhrz2Ra/1Ia5W0eUo+rCjtHjPLkD gHMVqWgx41sugbbTzmTQjPfdCAG0lLnFv6ttpl4ho6Jwoa6lsK8VHx3wHsxLWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=93074f595e7e28e605eeed28e188707fe7619a9f commit 93074f595e7e28e605eeed28e188707fe7619a9f Author: John Baldwin AuthorDate: 2021-11-11 22:41:16 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:53 +0000 Drop "All rights reserved" from a Netflix copyright. Reviewed by: imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32778 (cherry picked from commit 522a2aa7613aa43f4d3bb5bdd1d87f966304be34) --- sys/opencrypto/ktls_ocf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index 71f6339e02ad..f33af68dde8f 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2019 Netflix Inc. - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From nobody Tue Nov 23 23:13:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EC9E018A1E72; Tue, 23 Nov 2021 23:13: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 4HzKgN1GlYz3vYd; Tue, 23 Nov 2021 23:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5850C1F4F8; Tue, 23 Nov 2021 23: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 1ANND2lW037865; Tue, 23 Nov 2021 23: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 1ANND20v037864; Tue, 23 Nov 2021 23:13:02 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:02 GMT Message-Id: <202111232313.1ANND20v037864@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d8feb950a6c4 - stable/13 - Move the ICL_CONN_*LOCK* macros 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d8feb950a6c411b1d118b42e1dfb9072cd480585 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N4bgwRORPzelGqfN59ZLGbrRySfvgnEifs0dnSATHcQ=; b=yWlidgpP4fdpi5mtrXBrkdQWWWFvCjF4W6c+WaeJ4uYjM9vWGPlKlOIBEfeuo5gmliXWYf +P4P87RsQjvolZtfqlCNtFKzFMzotuH3dyT9+ylTnm2DQ8UEnqkYZYD9sP7XC2pO7IBEe8 uboe5uklElsdrwumRYStrHOe8Dq0yfWeV1fylw3xOHsSDfSr8/jsZsFQooyvG0hvZ527Dx 9CPc1ZdZ9ol6H29ItWu1/r09t3joNDsOFIseWyJKN8vZd703ucun2AF/4KLg4VHTQ7EsH6 pO28wdbP8GgV7zrMvT2vwAiY07ObwDlnDrRWB8yo/Fp9+2nXYfoijZMZ3ZX8yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709185; a=rsa-sha256; cv=none; b=OM4Y2K5lUcpaRRQ687Sp4x/1DIEkBnLuo6+Vbl4S3mAiMVJfCGoanpDSG2f3IsnMy+roEE MXGA9k3zks4myyhtmdI7CMZRsmcITRGamJx0Hu/IjioiPOEKStE9MD1TjHV+V1oEFSK+v9 rZ0mJmo93IZVhValTcYdDj47RZ4wIm132xcteHaFgg2Uk4AwOWQGY5wsAqJsa/ylLqmK1u noAQrGiyk7OM7pdYZNJlMCabjTbTJd56++zqcJV9F0RVWncBhlUeCE5Kwrx+2nto6GTpSD BUiFkyppayGu0fnUD4BmaaauT9AmCKIQ3qlpeTXNDj8rmqxPEVu2jkmvXEFLcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d8feb950a6c411b1d118b42e1dfb9072cd480585 commit d8feb950a6c411b1d118b42e1dfb9072cd480585 Author: John Baldwin AuthorDate: 2021-11-05 23:38:25 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:53 +0000 Move the ICL_CONN_*LOCK* macros to . These macros are not backend-specific but reference a backend-independent field in struct icl_conn. Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D32858 (cherry picked from commit e900338c0987603456df8d9a8aeec5c239106d0b) --- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 5 ----- sys/dev/iscsi/icl.h | 5 +++++ sys/dev/iscsi/icl_soft.c | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index cf1032f2a3a2..de8f2547f29a 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -129,11 +129,6 @@ SYSCTL_INT(_kern_icl_cxgbei, OID_AUTO, recvspace, CTLFLAG_RWTUN, static volatile u_int icl_cxgbei_ncons; -#define ICL_CONN_LOCK(X) mtx_lock(X->ic_lock) -#define ICL_CONN_UNLOCK(X) mtx_unlock(X->ic_lock) -#define ICL_CONN_LOCK_ASSERT(X) mtx_assert(X->ic_lock, MA_OWNED) -#define ICL_CONN_LOCK_ASSERT_NOT(X) mtx_assert(X->ic_lock, MA_NOTOWNED) - static icl_conn_new_pdu_t icl_cxgbei_conn_new_pdu; static icl_conn_pdu_data_segment_length_t icl_cxgbei_conn_pdu_data_segment_length; diff --git a/sys/dev/iscsi/icl.h b/sys/dev/iscsi/icl.h index 07dcbbf2a0b5..edd43a45ba2e 100644 --- a/sys/dev/iscsi/icl.h +++ b/sys/dev/iscsi/icl.h @@ -120,6 +120,11 @@ struct icl_conn { void *ic_prv0; }; +#define ICL_CONN_LOCK(X) mtx_lock(X->ic_lock) +#define ICL_CONN_UNLOCK(X) mtx_unlock(X->ic_lock) +#define ICL_CONN_LOCK_ASSERT(X) mtx_assert(X->ic_lock, MA_OWNED) +#define ICL_CONN_LOCK_ASSERT_NOT(X) mtx_assert(X->ic_lock, MA_NOTOWNED) + struct icl_drv_limits { int idl_max_recv_data_segment_length; int idl_max_send_data_segment_length; diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index 95c4c87dd6f3..37f3911204c4 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -123,11 +123,6 @@ static uma_zone_t icl_soft_pdu_zone; static volatile u_int icl_ncons; -#define ICL_CONN_LOCK(X) mtx_lock(X->ic_lock) -#define ICL_CONN_UNLOCK(X) mtx_unlock(X->ic_lock) -#define ICL_CONN_LOCK_ASSERT(X) mtx_assert(X->ic_lock, MA_OWNED) -#define ICL_CONN_LOCK_ASSERT_NOT(X) mtx_assert(X->ic_lock, MA_NOTOWNED) - STAILQ_HEAD(icl_pdu_stailq, icl_pdu); static icl_conn_new_pdu_t icl_soft_conn_new_pdu; From nobody Tue Nov 23 23:13:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A248318A2282; Tue, 23 Nov 2021 23:13: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 4HzKgR1hJPz3vn4; Tue, 23 Nov 2021 23:13:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E78431F725; Tue, 23 Nov 2021 23:13: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 1ANND6k1037963; Tue, 23 Nov 2021 23:13:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANND6cB037962; Tue, 23 Nov 2021 23:13:06 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:06 GMT Message-Id: <202111232313.1ANND6cB037962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 94280c58116f - stable/13 - ktls: Reject some invalid cipher suites. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 94280c58116f91f77436d8bb50f312492c1bb221 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCIUOyJ5Ro/0WYU6DwWMYjoV4zFlW4gr7CJVvsi5Gic=; b=SLBAl1PotofYLg1B4xGBlZqbjetI2luJ0x9zyvrpPcd6tmRoXxSKLg/l9TIqNtlPCLSDp5 7hDd8Dk2UeA+X2D2rOJlBdZMbQCJDGgY0Mk4/1xn0AzwpQOfMsx2McSj4+xzp0yWyS+CcW uiBsns0dzK0dIOUhKh0O/lSPSXrSIPfAnLbqFlzEIEJp/w+GrtzpWzoIROz01uS/nj+fEq YJpBH686OOgW6qgQIh0hYpi+BVYKjp/+ZZbMBPweBlcIZFj7UJBOfOtfaX5Q7bObcVLxrY 6JG9m1yaIYyoUras8zUkSDWKnDCT9iDhG8zH5hWcwaH29GUHjfR26lcVXAWgSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709188; a=rsa-sha256; cv=none; b=I93ue/ntl1m1NFK1DjGsW8ceGrrtBYfQjgS4h5M0y/9PbX1eVq6Lmw4k0EUWypJThmiEGB XN3lO1Z+zlbdJl40bxjDlcymbJHYIEgHaXTwCz3HLY/wuSZQmRNc9kLL+ZrGu64vyIxpyx 1s3eMHUMrmswNU0NGh05+J5P8ZxJsPzgdMT2A23mgWkB8v6UaHAUgfznprXfw974BkXNnD vB+2Zof5DoxcCGGC2wQWCP/378+cFTZAjbTxGztSEAwte20DK3gHmyfCgdBtin+gw/p/xn il0FcP1nzVldXNrsP/hcDZ6wfwZWzHI7Le0Jsa8WXsovsp+f+mqH8bg8ezMk+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=94280c58116f91f77436d8bb50f312492c1bb221 commit 94280c58116f91f77436d8bb50f312492c1bb221 Author: John Baldwin AuthorDate: 2021-11-15 19:28:56 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:53 +0000 ktls: Reject some invalid cipher suites. - Reject AES-CBC cipher suites for TLS 1.0 and TLS 1.1 using auth algorithms other than SHA1-HMAC. - Reject AES-GCM cipher suites for TLS versions older than 1.2. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32842 (cherry picked from commit 900a28fe33ef998aaee55cb243f4efa35471da07) --- sys/kern/uipc_ktls.c | 51 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index e9585d06841c..db4ab69e06cf 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -497,40 +497,51 @@ ktls_create_session(struct socket *so, struct tls_enable *en, } if (en->auth_key_len != 0) return (EINVAL); - if ((en->tls_vminor == TLS_MINOR_VER_TWO && - en->iv_len != TLS_AEAD_GCM_LEN) || - (en->tls_vminor == TLS_MINOR_VER_THREE && - en->iv_len != TLS_1_3_GCM_IV_LEN)) + switch (en->tls_vminor) { + case TLS_MINOR_VER_TWO: + if (en->iv_len != TLS_AEAD_GCM_LEN) + return (EINVAL); + break; + case TLS_MINOR_VER_THREE: + if (en->iv_len != TLS_1_3_GCM_IV_LEN) + return (EINVAL); + break; + default: return (EINVAL); + } break; case CRYPTO_AES_CBC: switch (en->auth_algorithm) { case CRYPTO_SHA1_HMAC: - /* - * TLS 1.0 requires an implicit IV. TLS 1.1+ - * all use explicit IVs. - */ - if (en->tls_vminor == TLS_MINOR_VER_ZERO) { - if (en->iv_len != TLS_CBC_IMPLICIT_IV_LEN) - return (EINVAL); - break; - } - - /* FALLTHROUGH */ + break; case CRYPTO_SHA2_256_HMAC: case CRYPTO_SHA2_384_HMAC: - /* Ignore any supplied IV. */ - en->iv_len = 0; + if (en->tls_vminor != TLS_MINOR_VER_TWO) + return (EINVAL); break; default: return (EINVAL); } if (en->auth_key_len == 0) return (EINVAL); - if (en->tls_vminor != TLS_MINOR_VER_ZERO && - en->tls_vminor != TLS_MINOR_VER_ONE && - en->tls_vminor != TLS_MINOR_VER_TWO) + + /* + * TLS 1.0 requires an implicit IV. TLS 1.1 and 1.2 + * use explicit IVs. + */ + switch (en->tls_vminor) { + case TLS_MINOR_VER_ZERO: + if (en->iv_len != TLS_CBC_IMPLICIT_IV_LEN) + return (EINVAL); + break; + case TLS_MINOR_VER_ONE: + case TLS_MINOR_VER_TWO: + /* Ignore any supplied IV. */ + en->iv_len = 0; + break; + default: return (EINVAL); + } break; case CRYPTO_CHACHA20_POLY1305: if (en->auth_algorithm != 0 || en->auth_key_len != 0) From nobody Tue Nov 23 23:13:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 87A9418A1F56; Tue, 23 Nov 2021 23:13: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 4HzKgP3vbrz3vkw; Tue, 23 Nov 2021 23:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9FC011F619; Tue, 23 Nov 2021 23:13: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 1ANND4Gk037915; Tue, 23 Nov 2021 23:13:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANND4f6037914; Tue, 23 Nov 2021 23:13:04 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:04 GMT Message-Id: <202111232313.1ANND4f6037914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9b6f4b35d2c2 - stable/13 - ktls: Add padding tests for AES-CBC MTE cipher suites. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 9b6f4b35d2c27e0bdb15d8c70426540d78e3f6c9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4g1BUPKEatQoxeUvwfQPdxvC9GVfWaRdY2Pk/pojrFQ=; b=lPkFgHNO9zLM1Ux1xknO+ukCSWmU9RImgv+0gL4lNT4gkfki26i7ApvN7xUXGNDhWZB/iy bbrd+seiNCHIQg4ysCXIVDZX9sSLqP1pDx48Nq71JuQI62CTajOZyUv4kJf+ZttrZslLZE NhwUvYcxVpfkadkwpxN7ErBzYZemVIT9TGIbKpeBDkvNagc3HCS0whLyY0neAP1khYjTpY iFbcB+VlB5Dd6Dftx0t1Fh+Lambjk1XUp3+eW1nQnYFt0Ta1lGnoUlKfKZbVbNDbjWO+WH Rall3cKTTF3Y3xQVH0uQnkSSXDQB4z3kyRSctmMHg39GEK17dZwe9THjAW2urw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709186; a=rsa-sha256; cv=none; b=ljTybHddi1JCMnTlENL3GMaRHc19CUQxVTAfasx+RwxykRmSqAUR0hHeq2P2S+EqQx0B3f u9CFYdS0Uqk6514QZkZAIxWhS1xMFDMx+zrA3A0+vk8glOKCdvaRvEISOR1W2F/NrtPCRQ VpqQYEG6E9Mj1XyReJTIvg5bQ4urRAjNbj83oqLXus/EC5N06dqJe1j8G9py5rCMyGFEXD cmu6shGfyVHt10Xvd8VDpXNkhYj9W2eR9ii4fntim0vHPF+H7NlHTGX2hyWTDxrEPJDoRz oXu26RTd1aKO/W1oBeGZIsuAsklWYl7R3p/XnsU6oH74zyN6aFirqDFfqpT9eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9b6f4b35d2c27e0bdb15d8c70426540d78e3f6c9 commit 9b6f4b35d2c27e0bdb15d8c70426540d78e3f6c9 Author: John Baldwin AuthorDate: 2021-11-15 19:26:45 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:53 +0000 ktls: Add padding tests for AES-CBC MTE cipher suites. For each AES-CBC MTE cipher suite, test sending records with 1 to 16 bytes of payload. This ensures that all of the potential padding values are covered. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32840 (cherry picked from commit 44265dc3dae1d373f33f474244b5c9811471080b) --- tests/sys/kern/ktls_test.c | 95 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 88 insertions(+), 7 deletions(-) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index 908f7f1818a2..bf2b81645d31 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -970,9 +970,9 @@ ATF_TC_BODY(ktls_transmit_##cipher_name##_##name, tc) \ ATF_TP_ADD_TC(tp, ktls_transmit_##cipher_name##_##name); #define GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ - auth_alg, minor, type, len) \ -ATF_TC_WITHOUT_HEAD(ktls_transmit_##cipher_name##_control); \ -ATF_TC_BODY(ktls_transmit_##cipher_name##_control, tc) \ + auth_alg, minor, name, type, len) \ +ATF_TC_WITHOUT_HEAD(ktls_transmit_##cipher_name##_##name); \ +ATF_TC_BODY(ktls_transmit_##cipher_name##_##name, tc) \ { \ struct tls_enable en; \ uint64_t seqno; \ @@ -986,8 +986,8 @@ ATF_TC_BODY(ktls_transmit_##cipher_name##_control, tc) \ } #define ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ - auth_alg, minor) \ - ATF_TP_ADD_TC(tp, ktls_transmit_##cipher_name##_control); + auth_alg, minor, name) \ + ATF_TP_ADD_TC(tp, ktls_transmit_##cipher_name##_##name); #define GEN_TRANSMIT_TESTS(cipher_name, cipher_alg, key_size, auth_alg, \ minor) \ @@ -996,7 +996,7 @@ ATF_TC_BODY(ktls_transmit_##cipher_name##_control, tc) \ GEN_TRANSMIT_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ auth_alg, minor, long, 64 * 1024) \ GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ - auth_alg, minor, 0x21 /* Alert */, 32) + auth_alg, minor, control, 0x21 /* Alert */, 32) #define ADD_TRANSMIT_TESTS(cipher_name, cipher_alg, key_size, auth_alg, \ minor) \ @@ -1005,7 +1005,7 @@ ATF_TC_BODY(ktls_transmit_##cipher_name##_control, tc) \ ADD_TRANSMIT_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ auth_alg, minor, long) \ ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ - auth_alg, minor) + auth_alg, minor, control) /* * For each supported cipher suite, run three transmit tests: @@ -1023,11 +1023,92 @@ AES_CBC_TESTS(GEN_TRANSMIT_TESTS); AES_GCM_TESTS(GEN_TRANSMIT_TESTS); CHACHA20_TESTS(GEN_TRANSMIT_TESTS); +#define GEN_TRANSMIT_PADDING_TESTS(cipher_name, cipher_alg, key_size, \ + auth_alg, minor) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_1, 0x21 /* Alert */, 1) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_2, 0x21 /* Alert */, 2) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_3, 0x21 /* Alert */, 3) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_4, 0x21 /* Alert */, 4) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_5, 0x21 /* Alert */, 5) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_6, 0x21 /* Alert */, 6) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_7, 0x21 /* Alert */, 7) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_8, 0x21 /* Alert */, 8) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_9, 0x21 /* Alert */, 9) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_10, 0x21 /* Alert */, 10) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_11, 0x21 /* Alert */, 11) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_12, 0x21 /* Alert */, 12) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_13, 0x21 /* Alert */, 13) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_14, 0x21 /* Alert */, 14) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_15, 0x21 /* Alert */, 15) \ + GEN_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_16, 0x21 /* Alert */, 16) + +#define ADD_TRANSMIT_PADDING_TESTS(cipher_name, cipher_alg, key_size, \ + auth_alg, minor) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_1) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_2) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_3) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_4) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_5) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_6) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_7) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_8) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_9) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_10) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_11) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_12) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_13) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_14) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_15) \ + ADD_TRANSMIT_CONTROL_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, padding_16) + +/* + * For AES-CBC MTE cipher suites using padding, add tests of messages + * with each possible padding size. Note that the padding_ tests + * do not necessarily test bytes of padding as the padding is a + * function of the cipher suite's MAC length. However, cycling + * through all of the payload sizes from 1 to 16 should exercise all + * of the possible padding lengths for each suite. + */ +AES_CBC_TESTS(GEN_TRANSMIT_PADDING_TESTS); + ATF_TP_ADD_TCS(tp) { AES_CBC_TESTS(ADD_TRANSMIT_TESTS); AES_GCM_TESTS(ADD_TRANSMIT_TESTS); CHACHA20_TESTS(ADD_TRANSMIT_TESTS); + AES_CBC_TESTS(ADD_TRANSMIT_PADDING_TESTS); return (atf_no_error()); } From nobody Tue Nov 23 23:13:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B367618A229B; Tue, 23 Nov 2021 23:13:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzKgS6gJnz3vsj; Tue, 23 Nov 2021 23:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 122981F726; Tue, 23 Nov 2021 23:13: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 1ANND72e037989; Tue, 23 Nov 2021 23:13:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANND7Mk037988; Tue, 23 Nov 2021 23:13:07 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:07 GMT Message-Id: <202111232313.1ANND7Mk037988@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 32993b8e581c - stable/13 - ktls: Add tests ensuring various invalid cipher suites are rejected. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 32993b8e581c9c92a9ff81fa7b5d5e3f2c1018f4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bBYyiktHqGc3OXtRH7qAY3bhYSO0cAXwbyJ0E0ToKLE=; b=SwAmMiSjTeQKTbX5Cr+TMUq2IM+w3hPrTNJXFF8J1K+FMNt2xalhUqEWU2rKVO19aoepld rezVMppL8UGDLBjGM+aFUSxVm+s4AAbL6VrZ9yV42gINiZm7F1msO7uvXTDIkHY3rAoIQ8 7HDgsGa7nFuBQ3LynV9ZGb5WVzMe6W4k2qXOc+jkNKSMKNdLGdWXAnJtmcIyKoOIRqfz4i 1AzgiOCsdTjIdWdbggFaF3xv1M+1k41Amfhfa4caKfCf2SnRDCPIKnk9ulBgVX1Kbp7OHm GeXmszC1XK+ew3S1vb4Lyoo2FNyu63jJIvdL1Lv+Yq6dl9EnQHW8ZtexR6eFbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709189; a=rsa-sha256; cv=none; b=SOLTAtdHJLoIhVDaiIt8vaeA7R7qi2WAzt+CpHKJ1UMLkeFjfsFcBTENusXSeCxzNIA93I b4q9uHAz96Ik324hdZxw2RVJP1BRWHzmKQ5IyeaZpKYxMrFoMTWBOdlXpS3NV4SKNS18cM /tR0eSIfCkhioImqiUmMS2K6Yln8/Lbs45gazUxRsuX8gsk7HSqtfN1B/1VxU0ok4esOP3 nFLz0wr0Icr2bsoohlp/vhgwNYTRDNP2J1tbav1qMI85sqUG+W+SXEuE5K4ZQp1KJp7Ijs zjdDhUvl77s2/WaF015jgQl+rlVvxFfdc4TQ/0jtHaF3PNOn0mtgpYb8OlZTZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=32993b8e581c9c92a9ff81fa7b5d5e3f2c1018f4 commit 32993b8e581c9c92a9ff81fa7b5d5e3f2c1018f4 Author: John Baldwin AuthorDate: 2021-11-15 19:30:48 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:53 +0000 ktls: Add tests ensuring various invalid cipher suites are rejected. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32843 (cherry picked from commit d1c369f926e7d04354d044cc13d8ecfb3e325636) --- tests/sys/kern/ktls_test.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index 423ccf65cb0c..ef0f7405b3fd 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -1187,6 +1187,70 @@ AES_CBC_TESTS(GEN_TRANSMIT_PADDING_TESTS); */ TLS_10_TESTS(GEN_TRANSMIT_EMPTY_FRAGMENT_TEST); +static void +test_ktls_invalid_transmit_cipher_suite(struct tls_enable *en) +{ + int sockets[2]; + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[1], IPPROTO_TCP, TCP_TXTLS_ENABLE, en, + sizeof(*en)) == -1); + ATF_REQUIRE(errno == EINVAL); + + close(sockets[1]); + close(sockets[0]); +} + +#define GEN_INVALID_TRANSMIT_TEST(name, cipher_alg, key_size, auth_alg, \ + minor) \ +ATF_TC_WITHOUT_HEAD(ktls_transmit_invalid_##name); \ +ATF_TC_BODY(ktls_transmit_invalid_##name, tc) \ +{ \ + struct tls_enable en; \ + uint64_t seqno; \ + \ + ATF_REQUIRE_KTLS(); \ + seqno = random(); \ + build_tls_enable(cipher_alg, key_size, auth_alg, minor, seqno, \ + &en); \ + test_ktls_invalid_transmit_cipher_suite(&en); \ + free_tls_enable(&en); \ +} + +#define ADD_INVALID_TRANSMIT_TEST(name, cipher_alg, key_size, auth_alg, \ + minor) \ + ATF_TP_ADD_TC(tp, ktls_transmit_invalid_##name); + +#define INVALID_CIPHER_SUITES(M) \ + M(aes128_cbc_1_0_sha256, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_256_HMAC, TLS_MINOR_VER_ZERO) \ + M(aes128_cbc_1_0_sha384, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_384_HMAC, TLS_MINOR_VER_ZERO) \ + M(aes128_gcm_1_0, CRYPTO_AES_NIST_GCM_16, 128 / 8, 0, \ + TLS_MINOR_VER_ZERO) \ + M(chacha20_poly1305_1_0, CRYPTO_CHACHA20_POLY1305, 256 / 8, 0, \ + TLS_MINOR_VER_ZERO) \ + M(aes128_cbc_1_1_sha256, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_256_HMAC, TLS_MINOR_VER_ONE) \ + M(aes128_cbc_1_1_sha384, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_384_HMAC, TLS_MINOR_VER_ONE) \ + M(aes128_gcm_1_1, CRYPTO_AES_NIST_GCM_16, 128 / 8, 0, \ + TLS_MINOR_VER_ONE) \ + M(chacha20_poly1305_1_1, CRYPTO_CHACHA20_POLY1305, 256 / 8, 0, \ + TLS_MINOR_VER_ONE) \ + M(aes128_cbc_1_3_sha1, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA1_HMAC, TLS_MINOR_VER_THREE) \ + M(aes128_cbc_1_3_sha256, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_256_HMAC, TLS_MINOR_VER_THREE) \ + M(aes128_cbc_1_3_sha384, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA2_384_HMAC, TLS_MINOR_VER_THREE) + +/* + * Ensure that invalid cipher suites are rejected for transmit. + */ +INVALID_CIPHER_SUITES(GEN_INVALID_TRANSMIT_TEST); + ATF_TP_ADD_TCS(tp) { AES_CBC_TESTS(ADD_TRANSMIT_TESTS); @@ -1194,6 +1258,7 @@ ATF_TP_ADD_TCS(tp) CHACHA20_TESTS(ADD_TRANSMIT_TESTS); AES_CBC_TESTS(ADD_TRANSMIT_PADDING_TESTS); TLS_10_TESTS(ADD_TRANSMIT_EMPTY_FRAGMENT_TEST); + INVALID_CIPHER_SUITES(ADD_INVALID_TRANSMIT_TEST); return (atf_no_error()); } From nobody Tue Nov 23 23:13:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9595A18A1FD2; Tue, 23 Nov 2021 23:13: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 4HzKgQ4mlDz3vky; Tue, 23 Nov 2021 23:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C23651F14A; Tue, 23 Nov 2021 23:13: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 1ANND52I037939; Tue, 23 Nov 2021 23:13:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANND5mM037938; Tue, 23 Nov 2021 23:13:05 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:05 GMT Message-Id: <202111232313.1ANND5mM037938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 27d29db0fa81 - stable/13 - ktls: Add tests for sending empty fragments for TLS 1.0 connections. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 27d29db0fa81c98f3263294986a83969eb2e1913 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lNJsKlZe+D/CY4x2ca89ZkoUUJAo90Je6WK9GD9tmDs=; b=avlYlqtx9rGAVuCsL8wGxQ1g6f+1u5Q77//JSAje4MKCJ1BG0KIMR507SOfI7zxHWCYkYP hfvLXxJGql+m+7QEW16Jh+jn5l+X7Rcb1MYuRNta18OGJHkfvam5MgVsdgOadQmwa9/fZc Pj/ayL6CNIzIHRgufZHjrnJFtXhgmS3bZl6c6AR0xKcT9JkgmnKD3I3QuANeW+Y22PhNEU lEPSe/FVBN7ewsZaWQnkmTILUVTHT64Oy3DKxF9sA412iwAZ07X/S0GvBDS49PNkgrgj+y DtqnHx+I0/FNFsqfumICrCF52AALEbM9jHpuV/8nPVgkC6OLh9I/ITiRxZKZ7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709187; a=rsa-sha256; cv=none; b=N3e6OqNZu07BuO+oWrh5KXzS9VDj6f5B96VkQ5timWmth3aKjQAEgaL7sLOENqvls3tT02 r22zLDUUC6gUamCf3DDFmy7ZveQxDg/3Fc8QZNU/JmX/sXa0mbcQD4wiRzTP9lnQet8Ieu tlFusAQ05PtsM9PHOw7Lvtgjzb039UX+kOsDqxCuA9z/8z/6FLHtEJSnhtQjJ0pqyY+O6l Iwak8Do3ZqeJtS7pDjcYDaiuMdY46tjcqJKQVVqIQXRQ9iF6PCMDulihaO7IWUCQgwbZRq LfzD/8hFeFHwVKiIxAWtIkXF+JFAcAHxt5g9n5PYSnxW7NCuZZWP6HT6KeTJkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=27d29db0fa81c98f3263294986a83969eb2e1913 commit 27d29db0fa81c98f3263294986a83969eb2e1913 Author: John Baldwin AuthorDate: 2021-11-15 19:27:15 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:53 +0000 ktls: Add tests for sending empty fragments for TLS 1.0 connections. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32841 (cherry picked from commit 0ff2a12ae32a3a88be63f4036599c1324ce04f78) --- tests/sys/kern/ktls_test.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index bf2b81645d31..423ccf65cb0c 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -911,6 +911,64 @@ test_ktls_transmit_control(struct tls_enable *en, uint64_t seqno, uint8_t type, close(sockets[0]); } +static void +test_ktls_transmit_empty_fragment(struct tls_enable *en, uint64_t seqno) +{ + struct tls_record_layer *hdr; + char *outbuf; + size_t outbuf_cap, payload_len, record_len; + ssize_t rv; + int sockets[2]; + uint8_t record_type; + + outbuf_cap = tls_header_len(en) + tls_trailer_len(en); + outbuf = malloc(outbuf_cap); + hdr = (struct tls_record_layer *)outbuf; + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[1], IPPROTO_TCP, TCP_TXTLS_ENABLE, en, + sizeof(*en)) == 0); + + fd_set_blocking(sockets[0]); + fd_set_blocking(sockets[1]); + + /* A write of zero bytes should send an empty fragment. */ + rv = write(sockets[1], NULL, 0); + ATF_REQUIRE(rv == 0); + + /* + * First read the header to determine how much additional data + * to read. + */ + rv = read(sockets[0], outbuf, sizeof(struct tls_record_layer)); + ATF_REQUIRE(rv == sizeof(struct tls_record_layer)); + payload_len = ntohs(hdr->tls_length); + record_len = payload_len + sizeof(struct tls_record_layer); + ATF_REQUIRE(record_len <= outbuf_cap); + rv = read(sockets[0], outbuf + sizeof(struct tls_record_layer), + payload_len); + ATF_REQUIRE(rv == (ssize_t)payload_len); + + rv = decrypt_tls_record(en, seqno, outbuf, record_len, NULL, 0, + &record_type); + + ATF_REQUIRE_MSG(rv == 0, + "read %zd decrypted bytes for an empty fragment", rv); + ATF_REQUIRE(record_type == TLS_RLTYPE_APP); + + free(outbuf); + + close(sockets[1]); + close(sockets[0]); +} + +#define TLS_10_TESTS(M) \ + M(aes128_cbc_1_0_sha1, CRYPTO_AES_CBC, 128 / 8, \ + CRYPTO_SHA1_HMAC) \ + M(aes256_cbc_1_0_sha1, CRYPTO_AES_CBC, 256 / 8, \ + CRYPTO_SHA1_HMAC) + #define AES_CBC_TESTS(M) \ M(aes128_cbc_1_0_sha1, CRYPTO_AES_CBC, 128 / 8, \ CRYPTO_SHA1_HMAC, TLS_MINOR_VER_ZERO) \ @@ -989,6 +1047,26 @@ ATF_TC_BODY(ktls_transmit_##cipher_name##_##name, tc) \ auth_alg, minor, name) \ ATF_TP_ADD_TC(tp, ktls_transmit_##cipher_name##_##name); +#define GEN_TRANSMIT_EMPTY_FRAGMENT_TEST(cipher_name, cipher_alg, \ + key_size, auth_alg) \ +ATF_TC_WITHOUT_HEAD(ktls_transmit_##cipher_name##_empty_fragment); \ +ATF_TC_BODY(ktls_transmit_##cipher_name##_empty_fragment, tc) \ +{ \ + struct tls_enable en; \ + uint64_t seqno; \ + \ + ATF_REQUIRE_KTLS(); \ + seqno = random(); \ + build_tls_enable(cipher_alg, key_size, auth_alg, \ + TLS_MINOR_VER_ZERO, seqno, &en); \ + test_ktls_transmit_empty_fragment(&en, seqno); \ + free_tls_enable(&en); \ +} + +#define ADD_TRANSMIT_EMPTY_FRAGMENT_TEST(cipher_name, cipher_alg, \ + key_size, auth_alg) \ + ATF_TP_ADD_TC(tp, ktls_transmit_##cipher_name##_empty_fragment); + #define GEN_TRANSMIT_TESTS(cipher_name, cipher_alg, key_size, auth_alg, \ minor) \ GEN_TRANSMIT_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ @@ -1103,12 +1181,19 @@ CHACHA20_TESTS(GEN_TRANSMIT_TESTS); */ AES_CBC_TESTS(GEN_TRANSMIT_PADDING_TESTS); +/* + * Test "empty fragments" which are TLS records with no payload that + * OpenSSL can send for TLS 1.0 connections. + */ +TLS_10_TESTS(GEN_TRANSMIT_EMPTY_FRAGMENT_TEST); + ATF_TP_ADD_TCS(tp) { AES_CBC_TESTS(ADD_TRANSMIT_TESTS); AES_GCM_TESTS(ADD_TRANSMIT_TESTS); CHACHA20_TESTS(ADD_TRANSMIT_TESTS); AES_CBC_TESTS(ADD_TRANSMIT_PADDING_TESTS); + TLS_10_TESTS(ADD_TRANSMIT_EMPTY_FRAGMENT_TEST); return (atf_no_error()); } From nobody Tue Nov 23 23:13:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BDCAC18A2279; Tue, 23 Nov 2021 23:13: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 4HzKgX5yHpz3vr2; Tue, 23 Nov 2021 23:13:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 467D71F2B9; Tue, 23 Nov 2021 23:13: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 1ANNDArV038041; Tue, 23 Nov 2021 23:13:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNDA3c038040; Tue, 23 Nov 2021 23:13:10 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:10 GMT Message-Id: <202111232313.1ANNDA3c038040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e91446cd84b3 - stable/13 - ktls: Add tests ensuring invalid receive cipher suites are rejected. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: e91446cd84b3d03eb14d5c6dbd585057d0977a53 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x88n0YIT5lUWrkENbQnrxgzIhquo2J5+tEccxs3hDHU=; b=myY3Sc95oK0EKIi14tq0P1UYwP2fEJ6LMhkX/Ye6WvMcZfkHsm+jngiYNr7dljLxek3omB KsGx8ZqY4SEoRpr7VpWW1cs2d72m0K+pBdB80OT3sPOczMMyxTo6o6u93LJW3Enf5mS+Mf SNQgGQRp0/k9Qte9OyJ8FBMs+oEtxDqPcn1G+EK8cgAfi+quourESqHWV6qgqShX0G8ebE Tw+yAJDzdDa1LuopwiHAeRcd3Xq1ozsaICFhpMnVbrIb3hj3tNkS5lLbyNGzGkNtV56bSr THCnSmWTf85Su31jV88RKzhaes2zYEIEChI4HA59uOnGupDcay8hZISLu7NPTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709193; a=rsa-sha256; cv=none; b=mtDKM6UvUWQxW68UQHwWLSsPnwFwgyJe4Rtn6Hcd1dtgTlypujeNYRkKSO/cF4MyJVvAvC zE8GUGGaBdP5xS2Fdvr/dR4+9+eA3Ax5X8eqs3BFfjL66BpOZTp9cLdM1Tyf4D2JH3qcsg RnNohVF57neD7QSA2e0c0KUVfasWJy0449GI4nlItVSq3C+41ZUgpaV4pWhOUGdeqGNm/1 M51+wIXuIrhftoDXiKYEpIGdNA8qIC/18evP+5ZwQlfZ6GmSw9z3ZuvFpncwjmJsaLXQlQ qIV5Kxk2WBsgkEaMfU5Ute6vbTje2iaVxDVX43iOtLlLPgv8JpOYZg40a2umOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e91446cd84b3d03eb14d5c6dbd585057d0977a53 commit e91446cd84b3d03eb14d5c6dbd585057d0977a53 Author: John Baldwin AuthorDate: 2021-11-15 19:32:15 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:54 +0000 ktls: Add tests ensuring invalid receive cipher suites are rejected. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32981 (cherry picked from commit 233ce578a424a7a3e5cf21ea6ba2b2036950d54f) --- tests/sys/kern/ktls_test.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index bdd2e62a546c..5aea56baa91f 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -1567,6 +1567,51 @@ ATF_TC_BODY(ktls_receive_##cipher_name##_##name, tc) \ */ TLS_12_TESTS(GEN_RECEIVE_TESTS); +static void +test_ktls_invalid_receive_cipher_suite(struct tls_enable *en) +{ + int sockets[2]; + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[1], IPPROTO_TCP, TCP_RXTLS_ENABLE, en, + sizeof(*en)) == -1); + + /* + * XXX: TLS 1.3 fails with ENOTSUP before checking for invalid + * ciphers. + */ + ATF_REQUIRE(errno == EINVAL || errno == ENOTSUP); + + close(sockets[1]); + close(sockets[0]); +} + +#define GEN_INVALID_RECEIVE_TEST(name, cipher_alg, key_size, auth_alg, \ + minor) \ +ATF_TC_WITHOUT_HEAD(ktls_receive_invalid_##name); \ +ATF_TC_BODY(ktls_receive_invalid_##name, tc) \ +{ \ + struct tls_enable en; \ + uint64_t seqno; \ + \ + ATF_REQUIRE_KTLS(); \ + seqno = random(); \ + build_tls_enable(cipher_alg, key_size, auth_alg, minor, seqno, \ + &en); \ + test_ktls_invalid_receive_cipher_suite(&en); \ + free_tls_enable(&en); \ +} + +#define ADD_INVALID_RECEIVE_TEST(name, cipher_alg, key_size, auth_alg, \ + minor) \ + ATF_TP_ADD_TC(tp, ktls_receive_invalid_##name); + +/* + * Ensure that invalid cipher suites are rejected for receive. + */ +INVALID_CIPHER_SUITES(GEN_INVALID_RECEIVE_TEST); + ATF_TP_ADD_TCS(tp) { /* Transmit tests */ @@ -1579,5 +1624,7 @@ ATF_TP_ADD_TCS(tp) /* Receive tests */ TLS_12_TESTS(ADD_RECEIVE_TESTS); + INVALID_CIPHER_SUITES(ADD_INVALID_RECEIVE_TEST); + return (atf_no_error()); } From nobody Tue Nov 23 23:13:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B6B1818A2326; Tue, 23 Nov 2021 23:13:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzKgV3D0gz3vqv; Tue, 23 Nov 2021 23:13:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34DA31F14B; Tue, 23 Nov 2021 23:13: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 1ANND9hS038017; Tue, 23 Nov 2021 23:13:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANND92I038016; Tue, 23 Nov 2021 23:13:09 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:09 GMT Message-Id: <202111232313.1ANND92I038016@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 38b44748ab2f - stable/13 - ktls: Add simple receive tests of kernel TLS. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 38b44748ab2f42c23d1e84cb5b82be322701cc29 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ELb+VDCcDKUE7GMKXqhCqR3i32tgeO+diYb++iEWvtQ=; b=ck/DyO1Rn+oQDti00RXiA81c4H/oTKfplySvqA3XZmKyWKxGX3vew/SUs7KRn1PWK2bPcY aohd5f+hiNRUyihgrr+cBgVKPFPlroF5i+NOVjX6tDNTLS/bTygxXNTeSTvtaSeJfgiaHM OI/VA6aX2NTL8UvfIkBR6YTeeTcZJEix6yZHwdsUtrkf9iIMeOZS2SmAc2tF7lgjYBPGhS e94D3cK6Md6/XLzRRrdURZqWLt0h2qsr1wwNZvkrCFwI0JnZnyxu0WmRuXKZAIC4cPxuyA RniFt8ppvZRzzfrsEIG4m52nn4QoZmbMhMeRg969bVxs6WCbtGvhWI41565W3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709190; a=rsa-sha256; cv=none; b=TiB1cjjyTuSZPBkc3QXbqHlJr6AZAvGM8pP+K4L2IObCPL44OJkVGWLMsaFTX8tLSXkpf7 Ss1ZG3cJXsMkOb1VWb+fqacZgSMKGb2vCyhZv733kimLG0ueryiKMa3ZB2twmhFGmOdMnX od/rEmUObE9P/vdb1/XMuqI6c3TOiIKjX/aMEgxn/x4llfO3zC9fzo3xXL5Fw75pVVWDk7 PKZZGvjP2XkYYQ/S6PbZMFvP8rsS/wTfgh3bjkhg7tw6mCEPdWISpV/MZclbo6JroBJhCS 5/JFifnTXicBQLufeVk5B5YYaRCIg7zEGQHKusW/SY3dqNSkfV9Y37r/QVzKJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=38b44748ab2f42c23d1e84cb5b82be322701cc29 commit 38b44748ab2f42c23d1e84cb5b82be322701cc29 Author: John Baldwin AuthorDate: 2021-11-15 19:31:16 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:53 +0000 ktls: Add simple receive tests of kernel TLS. Similar to the simple transmit tests added in a10482ea7476d68d1ab028145ae6d97cef747b49, these tests test the kernel TLS functionality directly by manually encrypting TLS records using randomly generated keys and writing them to a socket to be processed by the kernel. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32980 (cherry picked from commit 3e7f8a8da254cfa97af90c3aae1cb827da55fc9d) --- tests/sys/kern/ktls_test.c | 319 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 319 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index ef0f7405b3fd..bdd2e62a546c 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -262,6 +262,68 @@ verify_hash(const EVP_MD *md, const void *key, size_t key_len, const void *aad, return (true); } +static bool +aead_encrypt(const EVP_CIPHER *cipher, const char *key, const char *nonce, + const void *aad, size_t aad_len, const char *input, char *output, + size_t size, char *tag, size_t tag_len) +{ + EVP_CIPHER_CTX *ctx; + int outl, total; + + ctx = EVP_CIPHER_CTX_new(); + if (ctx == NULL) { + warnx("EVP_CIPHER_CTX_new failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + return (false); + } + if (EVP_EncryptInit_ex(ctx, cipher, NULL, (const u_char *)key, + (const u_char *)nonce) != 1) { + warnx("EVP_EncryptInit_ex failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + EVP_CIPHER_CTX_set_padding(ctx, 0); + if (aad != NULL) { + if (EVP_EncryptUpdate(ctx, NULL, &outl, (const u_char *)aad, + aad_len) != 1) { + warnx("EVP_EncryptUpdate for AAD failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + } + if (EVP_EncryptUpdate(ctx, (u_char *)output, &outl, + (const u_char *)input, size) != 1) { + warnx("EVP_EncryptUpdate failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + total = outl; + if (EVP_EncryptFinal_ex(ctx, (u_char *)output + outl, &outl) != 1) { + warnx("EVP_EncryptFinal_ex failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + total += outl; + if ((size_t)total != size) { + warnx("encrypt size mismatch: %zu vs %d", size, total); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, tag_len, tag) != + 1) { + warnx("EVP_CIPHER_CTX_ctrl(EVP_CTRL_AEAD_GET_TAG) failed: %s", + ERR_error_string(ERR_get_error(), NULL)); + EVP_CIPHER_CTX_free(ctx); + return (false); + } + EVP_CIPHER_CTX_free(ctx); + return (true); +} + static bool aead_decrypt(const EVP_CIPHER *cipher, const char *key, const char *nonce, const void *aad, size_t aad_len, const char *input, char *output, @@ -714,6 +776,68 @@ decrypt_tls_record(struct tls_enable *en, uint64_t seqno, const void *src, record_type)); } +/* + * Encrypt a TLS record of type 'record_type' with payload 'len' bytes + * long at 'src' and store the result at 'dst'. If 'dst' doesn't have + * sufficient room ('avail'), fail the test. + */ +static size_t +encrypt_tls_12_aead(struct tls_enable *en, uint8_t record_type, uint64_t seqno, + const void *src, size_t len, void *dst) +{ + struct tls_record_layer *hdr; + struct tls_aead_data aad; + char nonce[12]; + size_t hdr_len, mac_len, record_len; + + hdr = dst; + + hdr_len = tls_header_len(en); + mac_len = tls_mac_len(en); + record_len = hdr_len + len + mac_len; + + hdr->tls_type = record_type; + hdr->tls_vmajor = TLS_MAJOR_VER_ONE; + hdr->tls_vminor = TLS_MINOR_VER_TWO; + hdr->tls_length = htons(record_len - sizeof(*hdr)); + if (en->cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + memcpy(hdr + 1, &seqno, sizeof(seqno)); + + tls_12_aead_aad(en, len, hdr, seqno, &aad); + if (en->cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + tls_12_gcm_nonce(en, hdr, nonce); + else + tls_13_nonce(en, seqno, nonce); + + ATF_REQUIRE(aead_encrypt(tls_EVP_CIPHER(en), en->cipher_key, nonce, + &aad, sizeof(aad), src, (char *)dst + hdr_len, len, + (char *)dst + hdr_len + len, mac_len)); + + return (record_len); +} + +static size_t +encrypt_tls_aead(struct tls_enable *en, uint8_t record_type, uint64_t seqno, + const void *src, size_t len, void *dst, size_t avail) +{ + size_t record_len; + + record_len = tls_header_len(en) + len + tls_trailer_len(en); + ATF_REQUIRE(record_len <= avail); + + ATF_REQUIRE(encrypt_tls_12_aead(en, record_type, seqno, src, len, + dst) == record_len); + + return (record_len); +} + +static size_t +encrypt_tls_record(struct tls_enable *en, uint8_t record_type, uint64_t seqno, + const void *src, size_t len, void *dst, size_t avail) +{ + return (encrypt_tls_aead(en, record_type, seqno, src, len, dst, avail)); +} + static void test_ktls_transmit_app_data(struct tls_enable *en, uint64_t seqno, size_t len) { @@ -963,12 +1087,156 @@ test_ktls_transmit_empty_fragment(struct tls_enable *en, uint64_t seqno) close(sockets[0]); } +static size_t +ktls_receive_tls_record(struct tls_enable *en, int fd, uint8_t record_type, + void *data, size_t len) +{ + struct msghdr msg; + struct cmsghdr *cmsg; + struct tls_get_record *tgr; + char cbuf[CMSG_SPACE(sizeof(*tgr))]; + struct iovec iov; + ssize_t rv; + + memset(&msg, 0, sizeof(msg)); + + msg.msg_control = cbuf; + msg.msg_controllen = sizeof(cbuf); + + iov.iov_base = data; + iov.iov_len = len; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + + ATF_REQUIRE((rv = recvmsg(fd, &msg, 0)) > 0); + + ATF_REQUIRE((msg.msg_flags & (MSG_EOR | MSG_CTRUNC)) == MSG_EOR); + + cmsg = CMSG_FIRSTHDR(&msg); + ATF_REQUIRE(cmsg != NULL); + ATF_REQUIRE(cmsg->cmsg_level == IPPROTO_TCP); + ATF_REQUIRE(cmsg->cmsg_type == TLS_GET_RECORD); + ATF_REQUIRE(cmsg->cmsg_len == CMSG_LEN(sizeof(*tgr))); + + tgr = (struct tls_get_record *)CMSG_DATA(cmsg); + ATF_REQUIRE(tgr->tls_type == record_type); + ATF_REQUIRE(tgr->tls_vmajor == en->tls_vmajor); + ATF_REQUIRE(tgr->tls_vminor == en->tls_vminor); + ATF_REQUIRE(tgr->tls_length == htons(rv)); + + return (rv); +} + +static void +test_ktls_receive_app_data(struct tls_enable *en, uint64_t seqno, size_t len) +{ + struct kevent ev; + char *plaintext, *received, *outbuf; + size_t outbuf_cap, outbuf_len, outbuf_sent, received_len, todo, written; + ssize_t rv; + int kq, sockets[2]; + + plaintext = alloc_buffer(len); + received = malloc(len); + outbuf_cap = tls_header_len(en) + TLS_MAX_MSG_SIZE_V10_2 + + tls_trailer_len(en); + outbuf = malloc(outbuf_cap); + + ATF_REQUIRE((kq = kqueue()) != -1); + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[0], IPPROTO_TCP, TCP_RXTLS_ENABLE, en, + sizeof(*en)) == 0); + + EV_SET(&ev, sockets[0], EVFILT_READ, EV_ADD, 0, 0, NULL); + ATF_REQUIRE(kevent(kq, &ev, 1, NULL, 0, NULL) == 0); + EV_SET(&ev, sockets[1], EVFILT_WRITE, EV_ADD, 0, 0, NULL); + ATF_REQUIRE(kevent(kq, &ev, 1, NULL, 0, NULL) == 0); + + received_len = 0; + outbuf_len = 0; + written = 0; + + while (received_len != len) { + ATF_REQUIRE(kevent(kq, NULL, 0, &ev, 1, NULL) == 1); + + switch (ev.filter) { + case EVFILT_WRITE: + /* + * Compose the next TLS record to send. + */ + if (outbuf_len == 0) { + ATF_REQUIRE(written < len); + todo = len - written; + if (todo > TLS_MAX_MSG_SIZE_V10_2) + todo = TLS_MAX_MSG_SIZE_V10_2; + outbuf_len = encrypt_tls_record(en, + TLS_RLTYPE_APP, seqno, plaintext + written, + todo, outbuf, outbuf_cap); + outbuf_sent = 0; + written += todo; + seqno++; + } + + /* + * Try to write the remainder of the current + * TLS record. + */ + rv = write(ev.ident, outbuf + outbuf_sent, + outbuf_len - outbuf_sent); + ATF_REQUIRE_MSG(rv > 0, + "failed to write to socket"); + outbuf_sent += rv; + if (outbuf_sent == outbuf_len) { + outbuf_len = 0; + if (written == len) { + ev.flags = EV_DISABLE; + ATF_REQUIRE(kevent(kq, &ev, 1, NULL, 0, + NULL) == 0); + } + } + break; + + case EVFILT_READ: + ATF_REQUIRE((ev.flags & EV_EOF) == 0); + + rv = ktls_receive_tls_record(en, ev.ident, + TLS_RLTYPE_APP, received + received_len, + len - received_len); + received_len += rv; + break; + } + } + + ATF_REQUIRE_MSG(written == received_len, + "read %zu decrypted bytes, but wrote %zu", received_len, written); + + ATF_REQUIRE(memcmp(plaintext, received, len) == 0); + + free(outbuf); + free(received); + free(plaintext); + + close(sockets[1]); + close(sockets[0]); + close(kq); +} + #define TLS_10_TESTS(M) \ M(aes128_cbc_1_0_sha1, CRYPTO_AES_CBC, 128 / 8, \ CRYPTO_SHA1_HMAC) \ M(aes256_cbc_1_0_sha1, CRYPTO_AES_CBC, 256 / 8, \ CRYPTO_SHA1_HMAC) +#define TLS_12_TESTS(M) \ + M(aes128_gcm_1_2, CRYPTO_AES_NIST_GCM_16, 128 / 8, 0, \ + TLS_MINOR_VER_TWO) \ + M(aes256_gcm_1_2, CRYPTO_AES_NIST_GCM_16, 256 / 8, 0, \ + TLS_MINOR_VER_TWO) \ + M(chacha20_poly1305_1_2, CRYPTO_CHACHA20_POLY1305, 256 / 8, 0, \ + TLS_MINOR_VER_TWO) + #define AES_CBC_TESTS(M) \ M(aes128_cbc_1_0_sha1, CRYPTO_AES_CBC, 128 / 8, \ CRYPTO_SHA1_HMAC, TLS_MINOR_VER_ZERO) \ @@ -1251,8 +1519,57 @@ ATF_TC_BODY(ktls_transmit_invalid_##name, tc) \ */ INVALID_CIPHER_SUITES(GEN_INVALID_TRANSMIT_TEST); +#define GEN_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, name, len) \ +ATF_TC_WITHOUT_HEAD(ktls_receive_##cipher_name##_##name); \ +ATF_TC_BODY(ktls_receive_##cipher_name##_##name, tc) \ +{ \ + struct tls_enable en; \ + uint64_t seqno; \ + \ + ATF_REQUIRE_KTLS(); \ + seqno = random(); \ + build_tls_enable(cipher_alg, key_size, auth_alg, minor, seqno, \ + &en); \ + test_ktls_receive_app_data(&en, seqno, len); \ + free_tls_enable(&en); \ +} + +#define ADD_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, name) \ + ATF_TP_ADD_TC(tp, ktls_receive_##cipher_name##_##name); + +#define GEN_RECEIVE_TESTS(cipher_name, cipher_alg, key_size, auth_alg, \ + minor) \ + GEN_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, short, 64) \ + GEN_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, long, 64 * 1024) + +#define ADD_RECEIVE_TESTS(cipher_name, cipher_alg, key_size, auth_alg, \ + minor) \ + ADD_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, short) \ + ADD_RECEIVE_APP_DATA_TEST(cipher_name, cipher_alg, key_size, \ + auth_alg, minor, long) + +/* + * For each supported cipher suite, run two receive tests: + * + * - a short test which sends 64 bytes of application data (likely as + * a single TLS record) + * + * - a long test which sends 64KB of application data (split across + * multiple TLS records) + * + * Note that receive is currently only supported for TLS 1.2 AEAD + * cipher suites. + */ +TLS_12_TESTS(GEN_RECEIVE_TESTS); + ATF_TP_ADD_TCS(tp) { + /* Transmit tests */ AES_CBC_TESTS(ADD_TRANSMIT_TESTS); AES_GCM_TESTS(ADD_TRANSMIT_TESTS); CHACHA20_TESTS(ADD_TRANSMIT_TESTS); @@ -1260,5 +1577,7 @@ ATF_TP_ADD_TCS(tp) TLS_10_TESTS(ADD_TRANSMIT_EMPTY_FRAGMENT_TEST); INVALID_CIPHER_SUITES(ADD_INVALID_TRANSMIT_TEST); + /* Receive tests */ + TLS_12_TESTS(ADD_RECEIVE_TESTS); return (atf_no_error()); } From nobody Tue Nov 23 23:13:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 55C9418A24C0; Tue, 23 Nov 2021 23:13: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 4HzKgZ1Wywz3w1X; Tue, 23 Nov 2021 23:13:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7050F1F727; Tue, 23 Nov 2021 23:13: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 1ANNDBhf038065; Tue, 23 Nov 2021 23:13:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNDBXa038064; Tue, 23 Nov 2021 23:13:11 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:11 GMT Message-Id: <202111232313.1ANNDBXa038064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6987f78ea136 - stable/13 - ktls: Add tests ensuring unsupported receive cipher suites are rejected. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 6987f78ea136389bfc0c117273e75ee68ee445f0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cquyAvb+lRmAbSM8tQ3ep+Z+O76zMJeAENFsF6GEjlw=; b=uS0sSWVPDb9ugRtwqs5vvIym53oEVWfD5JCJ7xrP1U4CBsXOkG5lTLpKE3KJmZzzXAjUXz A4fi6uKX5iDjjaq/M3/qoiYdEY/97bGlShyu1Flf12P62C2MR8H3raVLA7xjZVx693OSVD 4u1B0HlYpHGZ17E9gP4gze4nfnIzJ99T8HdfHF0jWHPR7v5ZB+OJqqeAFVQdSjQVTCSuGy U9zg22CTqEfEdcHveKtapjF+OkRcF2sLTT8Dwq6lAvfxHWdvsRj0s+N6jQyjq083dryl7y 3/gBkNaX/3dtfmwqSAnn5gVc4zsNVzPEdmQ6dztyXUEvOldANK7xO5TQ4oSRrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709195; a=rsa-sha256; cv=none; b=s1jtlTLmQB3mrXGOjTYlYYtcGXJukh38YbbPW9CYC4dWxWDVVsF3pNskoQNWgQ9LafPSyp KJjUB4A1qiSM+DzDAFCsTSwuuPHqXrT22xB8pLks304R7nM0PsUSg9LhSthSzn+8ypHz+G gdIGzmB1zyV3WIpnbhbwV3huvqYGlDSSh29o/m8kZo1l1Tuj2xQVWG8Zsgs+ZPJy+Hnrzh xym9Gx+SQ0Ns2FXaBiEKQOrAnJTluhWs1lDgCUbLSyOfuAswZASRzyxPpfa6w4REuSm2LU Uh5aXeftAWdG/uMvCQLRgMWs40E9hQK8CtEcKsWgSWgxFc56FmCC23/YCKQ2fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6987f78ea136389bfc0c117273e75ee68ee445f0 commit 6987f78ea136389bfc0c117273e75ee68ee445f0 Author: John Baldwin AuthorDate: 2021-11-15 19:32:49 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:54 +0000 ktls: Add tests ensuring unsupported receive cipher suites are rejected. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D32982 (cherry picked from commit 83a54b582f89ff63f9076eb7d50b5cdbd009905f) --- tests/sys/kern/ktls_test.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index 5aea56baa91f..21e3213a8634 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -1237,6 +1237,14 @@ test_ktls_receive_app_data(struct tls_enable *en, uint64_t seqno, size_t len) M(chacha20_poly1305_1_2, CRYPTO_CHACHA20_POLY1305, 256 / 8, 0, \ TLS_MINOR_VER_TWO) +#define TLS_13_TESTS(M) \ + M(aes128_gcm_1_3, CRYPTO_AES_NIST_GCM_16, 128 / 8, 0, \ + TLS_MINOR_VER_THREE) \ + M(aes256_gcm_1_3, CRYPTO_AES_NIST_GCM_16, 256 / 8, 0, \ + TLS_MINOR_VER_THREE) \ + M(chacha20_poly1305_1_3, CRYPTO_CHACHA20_POLY1305, 256 / 8, 0, \ + TLS_MINOR_VER_THREE) + #define AES_CBC_TESTS(M) \ M(aes128_cbc_1_0_sha1, CRYPTO_AES_CBC, 128 / 8, \ CRYPTO_SHA1_HMAC, TLS_MINOR_VER_ZERO) \ @@ -1612,6 +1620,48 @@ ATF_TC_BODY(ktls_receive_invalid_##name, tc) \ */ INVALID_CIPHER_SUITES(GEN_INVALID_RECEIVE_TEST); +static void +test_ktls_unsupported_receive_cipher_suite(struct tls_enable *en) +{ + int sockets[2]; + + ATF_REQUIRE_MSG(socketpair_tcp(sockets), "failed to create sockets"); + + ATF_REQUIRE(setsockopt(sockets[1], IPPROTO_TCP, TCP_RXTLS_ENABLE, en, + sizeof(*en)) == -1); + ATF_REQUIRE(errno == EPROTONOSUPPORT || errno == ENOTSUP); + + close(sockets[1]); + close(sockets[0]); +} + +#define GEN_UNSUPPORTED_RECEIVE_TEST(name, cipher_alg, key_size, \ + auth_alg, minor) \ +ATF_TC_WITHOUT_HEAD(ktls_receive_unsupported_##name); \ +ATF_TC_BODY(ktls_receive_unsupported_##name, tc) \ +{ \ + struct tls_enable en; \ + uint64_t seqno; \ + \ + ATF_REQUIRE_KTLS(); \ + seqno = random(); \ + build_tls_enable(cipher_alg, key_size, auth_alg, minor, seqno, \ + &en); \ + test_ktls_unsupported_receive_cipher_suite(&en); \ + free_tls_enable(&en); \ +} + +#define ADD_UNSUPPORTED_RECEIVE_TEST(name, cipher_alg, key_size, \ + auth_alg, minor) \ + ATF_TP_ADD_TC(tp, ktls_receive_unsupported_##name); + +/* + * Ensure that valid cipher suites not supported for receive are + * rejected. + */ +AES_CBC_TESTS(GEN_UNSUPPORTED_RECEIVE_TEST); +TLS_13_TESTS(GEN_UNSUPPORTED_RECEIVE_TEST); + ATF_TP_ADD_TCS(tp) { /* Transmit tests */ @@ -1623,7 +1673,9 @@ ATF_TP_ADD_TCS(tp) INVALID_CIPHER_SUITES(ADD_INVALID_TRANSMIT_TEST); /* Receive tests */ + AES_CBC_TESTS(ADD_UNSUPPORTED_RECEIVE_TEST); TLS_12_TESTS(ADD_RECEIVE_TESTS); + TLS_13_TESTS(ADD_UNSUPPORTED_RECEIVE_TEST); INVALID_CIPHER_SUITES(ADD_INVALID_RECEIVE_TEST); return (atf_no_error()); From nobody Tue Nov 23 23:13:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 408E218A25C2; Tue, 23 Nov 2021 23:13: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 4HzKgc1C2qz3vjG; Tue, 23 Nov 2021 23:13:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B16831F0CD; Tue, 23 Nov 2021 23:13: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 1ANNDDJF038113; Tue, 23 Nov 2021 23:13:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNDDHk038112; Tue, 23 Nov 2021 23:13:13 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:13 GMT Message-Id: <202111232313.1ANNDDHk038112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: abb212fe13df - stable/13 - ktls tests: Check the return values of close(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: abb212fe13df3ed967e5aabc38c5e5f0fcf499a0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m9dI/T3sRzHw8gNOCTJctPyWaAeLnTzQE8/JMhbNT/c=; b=QrfAoq5PARNYfAJZLqCxRFI4r+YE9JeFb07YhJdv6z3PjGO4lJOn5O8goNNiECqf1FCzm+ 32vdR2qegW4C0XIcO23Yj2sNgO6aavVYW4Z3K/CLfOA7vq1axga3fe7laSDtil2SpU6Hj1 XEZKN34tA7ezyztmKaqmH+9xFSiYvwxP1wx+ybBXm42mXrhvfyKhiqjRquQ9Cnw3JR0K8r HARLPD1v6d8Ysrds/IkNYLdg3gaXtBemKRywSouWfhmGBke28VZcqSeJLyeOaqiFkTQ9uO 3ubrdaXDwNfcn+kqlCE03CJjgQ5SE8YQru9ruAZDLNLt8YZ4G1YkF87rBSPuxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709196; a=rsa-sha256; cv=none; b=fg6IRWyDKCWQDqL6KyiyjZ01J89Dv2bqZY24I0a9FtnYA/YXnb3NbJdTEKGg9Ne3j22rwK MhPd+e+S/dkgVDvEGir61p/sT2jiUwqP1JFk/yQ40qNmVvSWmTuAyTNCKmD99o/Hk1oPlU +7wyl2Wwk0KioimkUBAQ1JP+4HOX2f7xF2NncYIKO3HNwRXVIxPDDadDMaPYVcCoc5VLt6 zLWCAwEZp8tFj8I/ne4FplkNONNO81qnRYJOVzslg2o5eo+Hf1YN9MAo1Mi4d0Wu8Ll7CL rUBBJgu77EHKtxOivSxpqJj1z7OGHFIS7TvCU+5ZoMQQTsbYylwYyAvsZWiAvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=abb212fe13df3ed967e5aabc38c5e5f0fcf499a0 commit abb212fe13df3ed967e5aabc38c5e5f0fcf499a0 Author: John Baldwin AuthorDate: 2021-11-16 17:56:15 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:54 +0000 ktls tests: Check the return values of close(). Suggested by: markj Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D33004 (cherry picked from commit 694c708d6a0d00f84fa53357a1cc8a72272a26e3) --- tests/sys/kern/ktls_test.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index 64e26bb27f37..9942e78091b1 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -945,9 +945,9 @@ test_ktls_transmit_app_data(struct tls_enable *en, uint64_t seqno, size_t len) free(decrypted); free(plaintext); - close(sockets[1]); - close(sockets[0]); - close(kq); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); + ATF_REQUIRE(close(kq) == 0); } static void @@ -1031,8 +1031,8 @@ test_ktls_transmit_control(struct tls_enable *en, uint64_t seqno, uint8_t type, free(decrypted); free(plaintext); - close(sockets[1]); - close(sockets[0]); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); } static void @@ -1083,8 +1083,8 @@ test_ktls_transmit_empty_fragment(struct tls_enable *en, uint64_t seqno) free(outbuf); - close(sockets[1]); - close(sockets[0]); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); } static size_t @@ -1218,9 +1218,9 @@ test_ktls_receive_app_data(struct tls_enable *en, uint64_t seqno, size_t len) free(received); free(plaintext); - close(sockets[1]); - close(sockets[0]); - close(kq); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); + ATF_REQUIRE(close(kq) == 0); } #define TLS_10_TESTS(M) \ @@ -1474,8 +1474,8 @@ test_ktls_invalid_transmit_cipher_suite(struct tls_enable *en) sizeof(*en)) == -1); ATF_REQUIRE(errno == EINVAL); - close(sockets[1]); - close(sockets[0]); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); } #define GEN_INVALID_TRANSMIT_TEST(name, cipher_alg, key_size, auth_alg, \ @@ -1591,8 +1591,8 @@ test_ktls_invalid_receive_cipher_suite(struct tls_enable *en) */ ATF_REQUIRE(errno == EINVAL || errno == ENOTSUP); - close(sockets[1]); - close(sockets[0]); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); } #define GEN_INVALID_RECEIVE_TEST(name, cipher_alg, key_size, auth_alg, \ @@ -1631,8 +1631,8 @@ test_ktls_unsupported_receive_cipher_suite(struct tls_enable *en) sizeof(*en)) == -1); ATF_REQUIRE(errno == EPROTONOSUPPORT || errno == ENOTSUP); - close(sockets[1]); - close(sockets[0]); + ATF_REQUIRE(close(sockets[1]) == 0); + ATF_REQUIRE(close(sockets[0]) == 0); } #define GEN_UNSUPPORTED_RECEIVE_TEST(name, cipher_alg, key_size, \ From nobody Tue Nov 23 23:13:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BA74318A2529; Tue, 23 Nov 2021 23:13: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 4HzKgZ1Xx7z3vtC; Tue, 23 Nov 2021 23:13:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 937D01F728; Tue, 23 Nov 2021 23:13: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 1ANNDC81038089; Tue, 23 Nov 2021 23:13:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNDCDV038088; Tue, 23 Nov 2021 23:13:12 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:12 GMT Message-Id: <202111232313.1ANNDCDV038088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b2d704ea8820 - stable/13 - ktls: Use ATF_REQUIRE instead of assert() for validating TLS header lengths. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: b2d704ea882031204c41ecf472200e9bf5c629eb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VibIGNa9gxF/LZelh6rOgRKpSN5edx0BWPSCzhP5OUQ=; b=yKQEF1xo7Ez8zZjxVrc2Dc0ZnIaeoSFdoXCLRnnnX9yONB+LFJV1zds01m2pBux3MrDF9K 8X1/t1A/VmWzQZW+DzK6yAUdWeDpq2g91Pi+bJ538c6QtUJHQb7Oempaz0jalpTkCNeuju O4ubWFO5/NdIQ9I+ViUAurvZ5SBlMZjitcsRVX+1c0IUTXVz/E+2MMthOkobZKB5lwSMBH LpTXtFJHMn8wnyCpgcG86QpC1UnI/S4iSkfZej/zzyZq0n6lYqvfXsPVOLNGpWF33I9Jjb ZTWjSjA6bev3jgtGkNQNOv/o2lXVsuqF2vMJj+B4zT9L1nedikOJ0582xpsW/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709195; a=rsa-sha256; cv=none; b=FMSNV3DEqg1ptcKKLNHA39Hv9MbuqlrGGHktP8I9cJ/ndotT8bnN0/78scBAmIbTVeRjD0 vDyz5EITIbkU3GD9wxlUguAxZIDOY8mTurnrexpgm04AP9AZt+xVVOWGE6ZkRwUwaBlvT7 fz2PfKWpfHdQky/hMYem4X6kulODWd6eSacLkc3/GYEx+pD3xUEMS5QdQGVuIc3EbbmkX2 p30WI+IMitCm2xT5Hbvzsh5+rG7B2g3RgUjNX2iYZ2R+nNLND4UD+R2MmSYjJ9k0S4FxA9 4cugJrVhBD4exhe2nsETI/8y0Rzg98zN1JEFOVJwSfl4FuQ4m+lmHC0DSUt4Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b2d704ea882031204c41ecf472200e9bf5c629eb commit b2d704ea882031204c41ecf472200e9bf5c629eb Author: John Baldwin AuthorDate: 2021-11-16 17:56:15 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:54 +0000 ktls: Use ATF_REQUIRE instead of assert() for validating TLS header lengths. The TLS header length field is set by the kernel, so if it is incorrect that is an indication of a kernel bug, not an internal error in the tests. Prompted by: markj (comment in an earlier review) Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D33003 (cherry picked from commit d71830cdf0df6dbc4bd3332daa95d9ecd7d64060) --- tests/sys/kern/ktls_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index 21e3213a8634..64e26bb27f37 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -913,8 +913,8 @@ test_ktls_transmit_app_data(struct tls_enable *en, uint64_t seqno, size_t len) record_len = sizeof(struct tls_record_layer) + ntohs(hdr->tls_length); - assert(record_len <= outbuf_cap); - assert(record_len > outbuf_len); + ATF_REQUIRE(record_len <= outbuf_cap); + ATF_REQUIRE(record_len > outbuf_len); rv = read(ev.ident, outbuf + outbuf_len, record_len - outbuf_len); if (rv == -1 && errno == EAGAIN) @@ -1013,7 +1013,7 @@ test_ktls_transmit_control(struct tls_enable *en, uint64_t seqno, uint8_t type, ATF_REQUIRE(rv == sizeof(struct tls_record_layer)); payload_len = ntohs(hdr->tls_length); record_len = payload_len + sizeof(struct tls_record_layer); - assert(record_len <= outbuf_cap); + ATF_REQUIRE(record_len <= outbuf_cap); rv = read(sockets[0], outbuf + sizeof(struct tls_record_layer), payload_len); ATF_REQUIRE(rv == (ssize_t)payload_len); From nobody Tue Nov 23 23:13:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 69E3518A2641; Tue, 23 Nov 2021 23:13: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 4HzKgd4fqCz3vvt; Tue, 23 Nov 2021 23:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D19E41F4F9; Tue, 23 Nov 2021 23:13: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 1ANNDEvm038143; Tue, 23 Nov 2021 23:13:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNDE4d038142; Tue, 23 Nov 2021 23:13:14 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:13:14 GMT Message-Id: <202111232313.1ANNDE4d038142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d7b47e163dc7 - stable/13 - ktls: Split encrypt vs decrypt OCF counters. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d7b47e163dc7bed63e10e231e0c38451f8787d1b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637709198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FU13Jdg/WhQNPM7hhVpg/OgWu3Ts23gKd2WB8tXdyp4=; b=icyK+Z5Be5hte/7mx4DIFS4Rpaf5XDaL/s6BcMknIXLWV0TTkfa5Ek+xAm+28p+d2HD/ar HCaSxcEJbp/KNeqht+O5i7MDeZEpa7XXJpW9odNNTY4XMh/0iFGxW7si/0w0HITVUj0xz/ sc/PAEkqLCJSfMxC0Ii2Yg5a2AO6RAazMdnh7t05k2//SuwkGCY0ZszEKyDbzeP+o6So/z DQiN1+F4rnK9JzHrmgB00Rl49+7/ARjMJ+bzBWgsbrG9hSH1vemEiSBFIx9XG9jxOQFEjq GD86c6jL9YCutHoQYmb3x4ht0cOiWZd1wM6O4bpMgAOsgZnjmQLdPp2bi58vqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637709198; a=rsa-sha256; cv=none; b=TITJ2OOnNpDEb2tGEJ6uJzIY67tNmoAvXjRXa3oZxEQ/jzZWUeWT8vtw51/bPMokmRxWQT BJ+ekUsrO/RFBfErwHtgZfVyBjNrE3OeKzYqRZC0y0N2W6Oo3Dxcu/AXnFb/hENSUvGUEq RFyqvRGcQnctNP0dxc++CbcNfm3X+F3DkHuU1UGcMIb4yQiadYrQNq4Zo/qJiapIu70ywE WUvlqGcfRxdb7ZVjeChyHcbXs+V0z2HuwJbUpWbEHDo4ri87VlQroSqT8jLFZwlmht+rT3 0x8C0kOMZ8reJzStDi2aUWcJ//IcnCfe/CAWX5Z7RQZo60UOeti+BNi/ZaebaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d7b47e163dc7bed63e10e231e0c38451f8787d1b commit d7b47e163dc7bed63e10e231e0c38451f8787d1b Author: John Baldwin AuthorDate: 2021-11-16 17:58:52 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:11:54 +0000 ktls: Split encrypt vs decrypt OCF counters. Reviewed by: gallatin, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D33006 (cherry picked from commit 16bea05ac3275d41663939da0d5c26d89f15cd53) --- sys/opencrypto/ktls_ocf.c | 62 +++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index f33af68dde8f..cbd1af6c6341 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -71,34 +71,44 @@ static SYSCTL_NODE(_kern_ipc_tls_stats, OID_AUTO, ocf, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Kernel TLS offload via OCF stats"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls10_cbc_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls10_cbc_crypts, - CTLFLAG_RD, &ocf_tls10_cbc_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls10_cbc_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls10_cbc_encrypts, + CTLFLAG_RD, &ocf_tls10_cbc_encrypts, "Total number of OCF TLS 1.0 CBC encryption operations"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls11_cbc_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls11_cbc_crypts, - CTLFLAG_RD, &ocf_tls11_cbc_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls11_cbc_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls11_cbc_encrypts, + CTLFLAG_RD, &ocf_tls11_cbc_encrypts, "Total number of OCF TLS 1.1/1.2 CBC encryption operations"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls12_gcm_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_gcm_crypts, - CTLFLAG_RD, &ocf_tls12_gcm_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls12_gcm_decrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_gcm_decrypts, + CTLFLAG_RD, &ocf_tls12_gcm_decrypts, + "Total number of OCF TLS 1.2 GCM decryption operations"); + +static COUNTER_U64_DEFINE_EARLY(ocf_tls12_gcm_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_gcm_encrypts, + CTLFLAG_RD, &ocf_tls12_gcm_encrypts, "Total number of OCF TLS 1.2 GCM encryption operations"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls12_chacha20_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_chacha20_crypts, - CTLFLAG_RD, &ocf_tls12_chacha20_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls12_chacha20_decrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_chacha20_decrypts, + CTLFLAG_RD, &ocf_tls12_chacha20_decrypts, + "Total number of OCF TLS 1.2 Chacha20-Poly1305 decryption operations"); + +static COUNTER_U64_DEFINE_EARLY(ocf_tls12_chacha20_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_chacha20_encrypts, + CTLFLAG_RD, &ocf_tls12_chacha20_encrypts, "Total number of OCF TLS 1.2 Chacha20-Poly1305 encryption operations"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls13_gcm_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_gcm_crypts, - CTLFLAG_RD, &ocf_tls13_gcm_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls13_gcm_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_gcm_encrypts, + CTLFLAG_RD, &ocf_tls13_gcm_encrypts, "Total number of OCF TLS 1.3 GCM encryption operations"); -static COUNTER_U64_DEFINE_EARLY(ocf_tls13_chacha20_crypts); -SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_chacha20_crypts, - CTLFLAG_RD, &ocf_tls13_chacha20_crypts, +static COUNTER_U64_DEFINE_EARLY(ocf_tls13_chacha20_encrypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_chacha20_encrypts, + CTLFLAG_RD, &ocf_tls13_chacha20_encrypts, "Total number of OCF TLS 1.3 Chacha20-Poly1305 encryption operations"); static COUNTER_U64_DEFINE_EARLY(ocf_inplace); @@ -297,9 +307,9 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, } if (os->implicit_iv) - counter_u64_add(ocf_tls10_cbc_crypts, 1); + counter_u64_add(ocf_tls10_cbc_encrypts, 1); else - counter_u64_add(ocf_tls11_cbc_crypts, 1); + counter_u64_add(ocf_tls11_cbc_encrypts, 1); if (inplace) counter_u64_add(ocf_inplace, 1); else @@ -415,9 +425,9 @@ ktls_ocf_tls12_aead_encrypt(struct ktls_session *tls, crypto_use_output_uio(&crp, &out_uio); if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) - counter_u64_add(ocf_tls12_gcm_crypts, 1); + counter_u64_add(ocf_tls12_gcm_encrypts, 1); else - counter_u64_add(ocf_tls12_chacha20_crypts, 1); + counter_u64_add(ocf_tls12_chacha20_encrypts, 1); if (inplace) counter_u64_add(ocf_inplace, 1); else @@ -485,9 +495,9 @@ ktls_ocf_tls12_aead_decrypt(struct ktls_session *tls, crypto_use_mbuf(&crp, m); if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) - counter_u64_add(ocf_tls12_gcm_crypts, 1); + counter_u64_add(ocf_tls12_gcm_decrypts, 1); else - counter_u64_add(ocf_tls12_chacha20_crypts, 1); + counter_u64_add(ocf_tls12_chacha20_decrypts, 1); error = ktls_ocf_dispatch(os, &crp); crypto_destroyreq(&crp); @@ -576,9 +586,9 @@ ktls_ocf_tls13_aead_encrypt(struct ktls_session *tls, memcpy(crp.crp_iv, nonce, sizeof(nonce)); if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) - counter_u64_add(ocf_tls13_gcm_crypts, 1); + counter_u64_add(ocf_tls13_gcm_encrypts, 1); else - counter_u64_add(ocf_tls13_chacha20_crypts, 1); + counter_u64_add(ocf_tls13_chacha20_encrypts, 1); if (inplace) counter_u64_add(ocf_inplace, 1); else From nobody Tue Nov 23 23:48:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 38F9D189136F; Tue, 23 Nov 2021 23:48: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 4HzLSk6QJRz4mxC; Tue, 23 Nov 2021 23:48:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC8491FC13; Tue, 23 Nov 2021 23:48: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 1ANNmsk3077849; Tue, 23 Nov 2021 23:48:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNmsxr077848; Tue, 23 Nov 2021 23:48:54 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:48:54 GMT Message-Id: <202111232348.1ANNmsxr077848@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e1d8f7fc1d94 - stable/13 - riscv: Clear SUM in SSTATUS for supervisor mode exceptions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: e1d8f7fc1d9457c5db18d1639f1fdfb244476106 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637711334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tyrtDF/UAqvytzOj/qf7s7arHb62GHzE/wJEWhqtC4Y=; b=WCC7EyC17ZRZcokkdB709FERKRO30QvhorFOOcjbZ+sJE/KfQuIkR5wkJLzuGeMxXz1VHe ucDB3mQ00/Zrs7e1tUS0yvZLf/r7NLH0zyJ1tzXNgyMKL0/ybxP4zsI/NnL707X5na06dG c+lj2sJOrGBIALZfIPvcKYCiRRMGeBrZf8kDZxcrCaYV/PSaOIYtPRqG+hbHNeDlYINztg cCQNX6uox3MK5K8Hl6VTr0fymsZJL4M3IPEeTmgYFUFBRzQBetS/Lt5MAi2J6Rg2yf+SyP dLPj20c6A4Kd0qbwwingW7qb6RY0ZmSGidDmikdDpu0KAgEuI3fRDsTZ9ay5GA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637711334; a=rsa-sha256; cv=none; b=Qxvblscnp256n1OzaWVrkR8nyccUxLTWKYQi8U0CKzZU9To+Nm2VcaObljxmCblTa4r8W/ JvQ3CNsRHjN/2DhfJJ6G3Hsk05x9W9Y0OfUEgoud7a5IXJZOWdwqzCZ5ykWqYGpwSE1Vkm NuTspGDIccM+BWgbPyP1KrVIQVyB8o+AQEE2WX1aV+++Zlr0os4tEdDR7riGySw3VwY2wX JJNnyg+C9mIa2OuILPlArEisil8+BLMv6Ufh5b4bYEEbg1QY5SAvUOzRgATo0HdE9Wr3ev jhHieuMjswHjsWBT3d9Xv8f76um6aiSw0XM1HGZAqKZkt9mhpjXI+rLkmNUG3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e1d8f7fc1d9457c5db18d1639f1fdfb244476106 commit e1d8f7fc1d9457c5db18d1639f1fdfb244476106 Author: John Baldwin AuthorDate: 2021-04-21 20:57:04 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:47:52 +0000 riscv: Clear SUM in SSTATUS for supervisor mode exceptions. Previously, a page fault taken during copyin/out and related functions would run the entire fault handler while permitting direct access to user addresses. This could also leak across context switches (e.g. if the page fault handler was preempted by an interrupt or slept for disk I/O). To fix, clear SUM in assembly after saving the original version of SSTATUS in the supervisor mode trapframe. Reviewed by: mhorne, jrtc27 Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D29763 (cherry picked from commit 753bcca440a4d2c95f48536b586131b84c0bb87e) --- sys/riscv/riscv/exception.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/riscv/riscv/exception.S b/sys/riscv/riscv/exception.S index 50134980c7af..abd1307174f1 100644 --- a/sys/riscv/riscv/exception.S +++ b/sys/riscv/riscv/exception.S @@ -104,6 +104,11 @@ __FBSDID("$FreeBSD$"); sd t0, (TF_SEPC)(sp) csrr t0, sstatus sd t0, (TF_SSTATUS)(sp) +.if \mode == 1 + /* Disable user address access for supervisor mode exceptions. */ + li t0, SSTATUS_SUM + csrc sstatus, t0 +.endif csrr t0, stval sd t0, (TF_STVAL)(sp) csrr t0, scause From nobody Tue Nov 23 23:48:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D8B66189168C; Tue, 23 Nov 2021 23:48:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzLSm0CS5z4n59; Tue, 23 Nov 2021 23:48:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB8EF1F9F6; Tue, 23 Nov 2021 23:48: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 1ANNmt2S077873; Tue, 23 Nov 2021 23:48:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNmtqj077872; Tue, 23 Nov 2021 23:48:55 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:48:55 GMT Message-Id: <202111232348.1ANNmtqj077872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 05504819e39d - stable/13 - riscv: Assert that SUM is not set in SSTATUS for exceptions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 05504819e39d12cbb0772f69e06ceb49a10fd580 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637711336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v96ome54zzjwZeADWBK8WiMDju4EpyUDvKvFC3O0WEM=; b=uy4R0ennhdmEjWsnN0K7AIu/cjsXfrFxb5HelxANZTTeCN5Cdc0hYULu0FNGijwRP0vhwe PK/gfmptD58oXkKwoMZQDUDWjGfgicUgaDuEOGO4A1KFypyy2bHtKPUhczjoC0/sgTk/ix Eme+alpwcS3kMwZxxzehWezh6l2Nro1F+DDUhbAQg0YiATZGtVgtdLlNtTgGDeeE2UlBde RhP8bGj4iCdgdHeV6ySE7pMXIOhLvVa1SjWGYTP5xdRFmZoWxixBKYA5WTHgr3dl9WwrP0 g6jNbZyZWeWeJ7PJeoO1wG+fRQdZNnCcC0kCOqFFUS0Z/+RPmjNfM4P/WEJrXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637711336; a=rsa-sha256; cv=none; b=SePCsFBMJGr7d7Qiy2yFtl6wim1JBiUBmG0uhvWbOs2BXyGpiRO5LZR67EJKRB500ZT//y JfTKMBGT28Zdo94q6AoJ/HSSPKH94GySxBMJXBIOQGDVu8Tz/CsP1/wW2z6O4buriZ4eLb RW3i7OKZvLOdPqUIXj8HClbEm4wXdvC6pfgflFROyYO/s6XwL/jUaiDV/MSEaK9u0ItKwl 26jZqwGKMS7Rcj9Unhh6ZvV1auMqH11wEyTb2Jge0QeiWm0iJyO+jii50z0WCunZnDJN6I IAgUNgm0AuKWcTU84TwR2Hj9iE4nqKdblEczal9Wj44wUX6/WDuoD4RHYTyqzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=05504819e39d12cbb0772f69e06ceb49a10fd580 commit 05504819e39d12cbb0772f69e06ceb49a10fd580 Author: John Baldwin AuthorDate: 2021-04-21 20:57:20 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:47:57 +0000 riscv: Assert that SUM is not set in SSTATUS for exceptions. Reviewed by: mhorne Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D29764 (cherry picked from commit 6a3a6fe34bf36b6e745b3e9ad1a991de057729c7) --- sys/riscv/riscv/trap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c index abf527b2ef13..d378bfe1383d 100644 --- a/sys/riscv/riscv/trap.c +++ b/sys/riscv/riscv/trap.c @@ -280,6 +280,9 @@ do_trap_supervisor(struct trapframe *frame) KASSERT((csr_read(sstatus) & (SSTATUS_SPP | SSTATUS_SIE)) == SSTATUS_SPP, ("Came from S mode with interrupts enabled")); + KASSERT((csr_read(sstatus) & (SSTATUS_SUM)) == 0, + ("Came from S mode with SUM enabled")); + exception = frame->tf_scause & SCAUSE_CODE; if ((frame->tf_scause & SCAUSE_INTR) != 0) { /* Interrupt */ @@ -348,6 +351,9 @@ do_trap_user(struct trapframe *frame) KASSERT((csr_read(sstatus) & (SSTATUS_SPP | SSTATUS_SIE)) == 0, ("Came from U mode with interrupts enabled")); + KASSERT((csr_read(sstatus) & (SSTATUS_SUM)) == 0, + ("Came from U mode with SUM enabled")); + exception = frame->tf_scause & SCAUSE_CODE; if ((frame->tf_scause & SCAUSE_INTR) != 0) { /* Interrupt */ From nobody Tue Nov 23 23:48:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CE73E189147C; Tue, 23 Nov 2021 23:48: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 4HzLSn31p3z4mrb; Tue, 23 Nov 2021 23:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D76A1F9F7; Tue, 23 Nov 2021 23:48: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 1ANNmufu077897; Tue, 23 Nov 2021 23:48:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANNmup0077896; Tue, 23 Nov 2021 23:48:56 GMT (envelope-from git) Date: Tue, 23 Nov 2021 23:48:56 GMT Message-Id: <202111232348.1ANNmup0077896@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c8c2d908dd47 - stable/13 - arm64, riscv: Fix TRAF_PC() to return the PC, not the return address. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c8c2d908dd477d6413eaf1f788df88c73ae73c5b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637711337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4OompjYSN/2KqJHVos5IougF2nl2bpSs+GF9SdqwGzU=; b=jUE1KX7ErI/MDSB4AdHBiIYn8JoVcoy2XR7Fn2JYjcc2o0wWcUt2iaKCvs+MFkfI3VTnPy I5VgVZ1UUQNUDcibGRgENCxxxGszHCc4Q9paoMo25eFun5zmjd8lg5v4H1At9x7BjCKxv1 DfLXCVlcJNIvuRPmrqxDpGc0PKKSZKb2LQIvaKDdE/Dlg5h1hY6vq29SVBKde3iT9AOajl MJBNPV1sg98sDPr9VeHT4hQscfCUQWDxQPzq+vgL+jR3ZRRHWUOelxsS4XqJuMsgKXoVMy 80UO0mLHjdQnmDs+JpB7BKu2B/udW0yA+LH3mQd/CXgIpAupTLngar5BOcobUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637711337; a=rsa-sha256; cv=none; b=w5Nszqt6//f4lzM0HyCxQzaRwPASDUy/GnYFdWbygXK8gLcrQW2kU5pEWxL6FUTN2PfY+W 6OXuyewDw5i1/wm85tmYTaLxxz7dmTAa6ZKhu8n4CQhc7MpAo5f0cWp/SOHhJnv2lW4sM1 2TJt3+SbDno16hrPqDkd4yeLdS1kZlDOVwelykTvQmofr426699X1CaP9PvMk8so8338LZ bv77hzWb60A/8OzhLUuS5PwWZrET5apXVYKUKPMD8NlHh8B3KUzWHZOiG1dmVCFwCdCtpO G2IS/QEiIhwnzuHF6SwAiOe9m5YlQhkpcvB+AqFf2TvvZvHENchCTIuTcvRbpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c8c2d908dd477d6413eaf1f788df88c73ae73c5b commit c8c2d908dd477d6413eaf1f788df88c73ae73c5b Author: John Baldwin AuthorDate: 2021-10-01 18:53:12 +0000 Commit: John Baldwin CommitDate: 2021-11-23 23:48:07 +0000 arm64, riscv: Fix TRAF_PC() to return the PC, not the return address. Reviewed by: mhorne Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D31969 (cherry picked from commit 0177102173f39e17366a32eb22653aeb5248c355) --- sys/arm64/include/cpu.h | 2 +- sys/riscv/include/cpu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h index 0b1aa2d93b03..c926372a0ec6 100644 --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -45,7 +45,7 @@ #include #include -#define TRAPF_PC(tfp) ((tfp)->tf_lr) +#define TRAPF_PC(tfp) ((tfp)->tf_elr) #define TRAPF_USERMODE(tfp) (((tfp)->tf_spsr & PSR_M_MASK) == PSR_M_EL0t) #define cpu_getstack(td) ((td)->td_frame->tf_sp) diff --git a/sys/riscv/include/cpu.h b/sys/riscv/include/cpu.h index 79c6f730f2a6..453a6af1a0f8 100644 --- a/sys/riscv/include/cpu.h +++ b/sys/riscv/include/cpu.h @@ -41,7 +41,7 @@ #include #include -#define TRAPF_PC(tfp) ((tfp)->tf_ra) +#define TRAPF_PC(tfp) ((tfp)->tf_sepc) #define TRAPF_USERMODE(tfp) (((tfp)->tf_sstatus & SSTATUS_SPP) == 0) #define cpu_getstack(td) ((td)->td_frame->tf_sp) From nobody Wed Nov 24 01:57:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CACA7188F5C2; Wed, 24 Nov 2021 01:57:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzPK33F3Jz4Wmb; Wed, 24 Nov 2021 01:57:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 47B542163D; Wed, 24 Nov 2021 01:57: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 1AO1vRVj050037; Wed, 24 Nov 2021 01:57:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO1vRHM050036; Wed, 24 Nov 2021 01:57:27 GMT (envelope-from git) Date: Wed, 24 Nov 2021 01:57:27 GMT Message-Id: <202111240157.1AO1vRHM050036@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: c0aa5f6a321b - main - mgb: remove set but not used variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0aa5f6a321b8e7a921eda69ec0ab7373890c155 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637719047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zLZvVdTjM8UI3kHlarr1EiTF6ojk0hLJL38e4yM9Oto=; b=IAbD3+9O/f9sTUFLJ5/n4a0CUQQz43NpJ/Kb3SYO1Au2c+TFTec0wYwIhs8zI8ECkCkrQP kSwDBfcMCbkFj8u4yvRA1l4CsRn6TVPwwg5D++TJJL5jvQQmypqdEBSg+cIKitpA5HnYvZ Isg/UAcTOfUHjSjXl79f+PTdJfM1LoVCxl97G7B88i3Mxr3tihN5qERI8EhtAioFwXWLn1 bGTJ4NadCp0Rynq7sUbWRJGFlNNwXjFANQbFwDR6LYr4ZuFfebdUF4RihvrdrqslSYQHw+ SyaesxLkfB3arm8kSOJAlvlNG/I3vYciFa+QfWhj0cqkcdd81j/+cX7A9DDImg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637719047; a=rsa-sha256; cv=none; b=L4qaLAEG8jIaQCJu/LTm3aG+F42R9z5MuiW9F02fZ3PpHPN7JvO2swvlOcLMGIRN4N4kbu Ss99ujN+S02NRqeLwGEilccAREA+uv3jLbRs260y3ntRuv3BLaRkV8njsRUArA8jVppUvu QkODCuLEf+HkyK4IiHBvVO/xbwfL/WC7RDxhsdi3yr45ZQqDDc+AWC1wvDwsIJ1GRSy+Rt rpkU5IykWjrz9sjHkZj0n8nt0fGec79uZb9XvpixGLjEaem8amd00cIdvf2b3WjbVl7CQI XSESHxE5HcmASnQzCml0vXWQ+2nZhYsoUcwZVANCyuqhpsJo0xSlHdLWN03r/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c0aa5f6a321b8e7a921eda69ec0ab7373890c155 commit c0aa5f6a321b8e7a921eda69ec0ab7373890c155 Author: Ed Maste AuthorDate: 2021-11-23 01:32:29 +0000 Commit: Ed Maste CommitDate: 2021-11-24 01:56:53 +0000 mgb: remove set but not used variables Sponsored by: The FreeBSD Foundation --- sys/dev/mgb/if_mgb.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/dev/mgb/if_mgb.c b/sys/dev/mgb/if_mgb.c index 6d94f96c09db..cde7d60927bb 100644 --- a/sys/dev/mgb/if_mgb.c +++ b/sys/dev/mgb/if_mgb.c @@ -962,7 +962,6 @@ static int mgb_isc_txd_encap(void *xsc , if_pkt_info_t ipi) { struct mgb_softc *sc; - if_softc_ctx_t scctx; struct mgb_ring_data *rdata; struct mgb_ring_desc *txd; bus_dma_segment_t *segs; @@ -972,7 +971,6 @@ mgb_isc_txd_encap(void *xsc , if_pkt_info_t ipi) KASSERT(ipi->ipi_qsidx == 0, ("tried to refill TX Channel %d.\n", ipi->ipi_qsidx)); sc = xsc; - scctx = iflib_get_softc_ctx(sc->ctx); rdata = &sc->tx_ring_data; pidx = ipi->ipi_pidx; @@ -1057,7 +1055,6 @@ static int mgb_isc_rxd_available(void *xsc, uint16_t rxqid, qidx_t idx, qidx_t budget) { struct mgb_softc *sc; - if_softc_ctx_t scctx; struct mgb_ring_data *rdata; int avail = 0; @@ -1066,7 +1063,6 @@ mgb_isc_rxd_available(void *xsc, uint16_t rxqid, qidx_t idx, qidx_t budget) rxqid)); rdata = &sc->rx_ring_data; - scctx = iflib_get_softc_ctx(sc->ctx); for (; idx != *(rdata->head_wb); idx = MGB_NEXT_RING_IDX(idx)) { avail++; /* XXX: Could verify desc is device owned here */ @@ -1135,7 +1131,6 @@ mgb_isc_rxd_pkt_get(void *xsc, if_rxd_info_t ri) static void mgb_isc_rxd_refill(void *xsc, if_rxd_update_t iru) { - if_softc_ctx_t scctx; struct mgb_softc *sc; struct mgb_ring_data *rdata; struct mgb_ring_desc *rxd; @@ -1152,7 +1147,6 @@ mgb_isc_rxd_refill(void *xsc, if_rxd_update_t iru) ("tried to refill RX Channel %d.\n", iru->iru_qsidx)); sc = xsc; - scctx = iflib_get_softc_ctx(sc->ctx); rdata = &sc->rx_ring_data; while (count > 0) { @@ -1191,11 +1185,10 @@ mgb_isc_rxd_flush(void *xsc, uint16_t rxqid, uint8_t flid, qidx_t pidx) static int mgb_test_bar(struct mgb_softc *sc) { - uint32_t id_rev, dev_id, rev; + uint32_t id_rev, dev_id; id_rev = CSR_READ_REG(sc, 0); dev_id = id_rev >> 16; - rev = id_rev & 0xFFFF; if (dev_id == MGB_LAN7430_DEVICE_ID || dev_id == MGB_LAN7431_DEVICE_ID) { return (0); From nobody Wed Nov 24 02:19:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9DDB2189B38A; Wed, 24 Nov 2021 02:19:34 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "vtr.rulingia.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzPpZ1Kcgz4f6J; Wed, 24 Nov 2021 02:19:33 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (2001-44b8-31fc-0d00-c8ab-09b5-49e2-9ade.static.ipv6.internode.on.net [IPv6:2001:44b8:31fc:d00:c8ab:9b5:49e2:9ade]) by vtr.rulingia.com (8.16.1/8.16.1) with ESMTPS id 1AO2JNp0025827 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Nov 2021 13:19:29 +1100 (AEDT) (envelope-from peter@rulingia.com) DKIM-Filter: OpenDKIM Filter v2.10.3 vtr.rulingia.com 1AO2JNp0025827 X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.16.1/8.16.1) with ESMTPS id 1AO2JIlV026739 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 24 Nov 2021 13:19:18 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.16.1/8.16.1/Submit) id 1AO2JIYi026738; Wed, 24 Nov 2021 13:19:18 +1100 (AEDT) (envelope-from peter) Date: Wed, 24 Nov 2021 13:19:18 +1100 From: Peter Jeremy To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8ef0c11e7ce7 - main - nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers Message-ID: References: <202111161714.1AGHEtBA084291@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lpqbkyaBU6BTja4R" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-Rspamd-Queue-Id: 4HzPpZ1Kcgz4f6J X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --lpqbkyaBU6BTja4R Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-Nov-23 11:19:21 +0200, Konstantin Belousov wr= ote: >On Tue, Nov 23, 2021 at 07:09:08PM +1100, Peter Jeremy wrote: >> On 2021-Nov-16 17:14:55 +0000, Konstantin Belousov wro= te: >> > nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need = to flush buffers >> > =20 >> > VOP_FSYNC() asserts that the vnode is exclusively locked for NFS. >> > If we try to execute file with recently modified content, the asser= t is >> > triggered. >>=20 >> I have a diskless arm64 system configured with swap over NFS and I'm >> now consistently getting a panic during shutdown. I haven't >> specificially confirmed that it's this commit but the content is >> suggestive. >>=20 >> panic: upgrade of unlocked lock (lockmgr) nfs @ /usr/src/sys/fs/nfsclien= t/nfs_clvnops.c:855 >> cpuid =3D 3 >> time =3D 1637166551 >> KDB: stack backtrace: >> db_trace_self() at db_trace_self >> db_trace_self_wrapper() at db_trace_self_wrapper+0x30 >> vpanic() at vpanic+0x178 >> panic() at panic+0x44 >> witness_upgrade() at witness_upgrade+0x104 >> lockmgr_upgrade() at lockmgr_upgrade+0x164 >> nfs_lock() at nfs_lock+0x2c >> vop_sigdefer() at vop_sigdefer+0x30 >> _vn_lock() at _vn_lock+0x54 >> nfs_close() at nfs_close+0xc8 >> vop_sigdefer() at vop_sigdefer+0x30 >> VOP_CLOSE_APV() at VOP_CLOSE_APV+0x2c >> swapdev_close() at swapdev_close+0x3c >> swapoff_one() at swapoff_one+0x598 >> sys_swapoff() at sys_swapoff+0x12c >> do_el0_sync() at do_el0_sync+0x498 >> handle_el0_sync() at handle_el0_sync+0x90 >> --- exception, esr 0x56000000 >>=20 >> I presume this isn't intended. Can you suggest where I should start >> looking for the problem? > >Try this please. It might be also useful to enable DEBUG_VFS_LOCKS in your >kernel config, to catch all related issues once. Thanks for the rapid response. I've found that DEBUG_VFS_LOCKS also requires INVARIANTS. That now catches swapon as well: KDB: stack backtrace: db_trace_self() at db_trace_self db_trace_self_wrapper() at db_trace_self_wrapper+0x30 assert_vop_locked() at assert_vop_locked+0x58 VOP_GETATTR_APV() at VOP_GETATTR_APV+0x4c sys_swapon() at sys_swapon+0x2c0 do_el0_sync() at do_el0_sync+0x4a4 handle_el0_sync() at handle_el0_sync+0x90 --- exception, esr 0x56000000 vnode 0xffffa000065511c0: type VREG usecount 1, writecount 0, refcount 1 seqc users 0 hold count flags () flags (VV_VMSIZEVNLOCK) lock type nfs: UNLOCKED fileid 30984 fsid 0x3a3a00ff01 VOP_GETATTR: 0xffffa000065511c0 is not locked but should be KDB: enter: lock violation [ thread pid 1027 tid 100159 ] Stopped at kdb_enter+0x48: undefined f900c11f I will dig into that further this evening. --=20 Peter Jeremy --lpqbkyaBU6BTja4R Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmGdoSBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzRXyg//YhsbNWvS+kiv4L4qtesNi2ZBzqUEx2Hykq9Ww8U3zgauF7rkCurE5WXO 68k8ALwOyDkGPo8oev867rayvHouY6bvErJotlWLdlxHa/aUAHjEBB9ulZ8CBT9C BMZ2TrzKSby5lCmcXpVsGd6diXYjwvkJAXvN/EV8wm9TuRlllWpi5FAzckn+UXzw 5oFktWKPDKB4lMrwZMpTwSU+Cj8/GTSioRmqsnqa7zkT1FjwaNyJ8qJKBBlIpkhK dOe5sjXLRKJaynJqfy12qQPsjeauPPIzFdri7nkH+jINi5e+bBbfhD1UFaBgmlM7 cp9O24nQLi4Sdo0WHfMXyztDiO9+1R3De/Ys3w9whZDySrbqwwIrtzWOdHu0PnpC k8PhHsgPZE0WNqtkUa6BlhjJ9FicfujxztdzywuP+vx2tBFgyIGKQC7uWgoVZ1qR LL5sNOEfEu2XPYeGKBjjaEiJXrgNTCc3KGOjyXfTZEaFgO+llTo865q/30oayhsK IMZRE+A4zyXcw0c/TshxVGYikwWS4CgW7BIrMNwfxLOPasFD0HRaD+taR+Fj1KyA Bn7pvaPAWcUFgoEH2aOGG59j2islQSgYTHa6StxZBBcLPFQNfVEd9+oTLi0yTYV9 sjwuJvfBfjH/TtJ2Z2v46xNHKlDEY+KJrlg+fwK299SZkXS1plI= =Kf6x -----END PGP SIGNATURE----- --lpqbkyaBU6BTja4R-- From nobody Wed Nov 24 03:12:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A0116188E5C6; Wed, 24 Nov 2021 03:12:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzQzc2RMlz4wHs; Wed, 24 Nov 2021 03:12:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1AO3CJrp062165 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 24 Nov 2021 05:12:22 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1AO3CJrp062165 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1AO3CJ1n062164; Wed, 24 Nov 2021 05:12:19 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 24 Nov 2021 05:12:19 +0200 From: Konstantin Belousov To: Peter Jeremy Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8ef0c11e7ce7 - main - nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers Message-ID: References: <202111161714.1AGHEtBA084291@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4HzQzc2RMlz4wHs X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 24, 2021 at 01:19:18PM +1100, Peter Jeremy wrote: > On 2021-Nov-23 11:19:21 +0200, Konstantin Belousov wrote: > >On Tue, Nov 23, 2021 at 07:09:08PM +1100, Peter Jeremy wrote: > >> On 2021-Nov-16 17:14:55 +0000, Konstantin Belousov wrote: > >> > nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers > >> > > >> > VOP_FSYNC() asserts that the vnode is exclusively locked for NFS. > >> > If we try to execute file with recently modified content, the assert is > >> > triggered. > >> > >> I have a diskless arm64 system configured with swap over NFS and I'm > >> now consistently getting a panic during shutdown. I haven't > >> specificially confirmed that it's this commit but the content is > >> suggestive. > >> > >> panic: upgrade of unlocked lock (lockmgr) nfs @ /usr/src/sys/fs/nfsclient/nfs_clvnops.c:855 > >> cpuid = 3 > >> time = 1637166551 > >> KDB: stack backtrace: > >> db_trace_self() at db_trace_self > >> db_trace_self_wrapper() at db_trace_self_wrapper+0x30 > >> vpanic() at vpanic+0x178 > >> panic() at panic+0x44 > >> witness_upgrade() at witness_upgrade+0x104 > >> lockmgr_upgrade() at lockmgr_upgrade+0x164 > >> nfs_lock() at nfs_lock+0x2c > >> vop_sigdefer() at vop_sigdefer+0x30 > >> _vn_lock() at _vn_lock+0x54 > >> nfs_close() at nfs_close+0xc8 > >> vop_sigdefer() at vop_sigdefer+0x30 > >> VOP_CLOSE_APV() at VOP_CLOSE_APV+0x2c > >> swapdev_close() at swapdev_close+0x3c > >> swapoff_one() at swapoff_one+0x598 > >> sys_swapoff() at sys_swapoff+0x12c > >> do_el0_sync() at do_el0_sync+0x498 > >> handle_el0_sync() at handle_el0_sync+0x90 > >> --- exception, esr 0x56000000 > >> > >> I presume this isn't intended. Can you suggest where I should start > >> looking for the problem? > > > >Try this please. It might be also useful to enable DEBUG_VFS_LOCKS in your > >kernel config, to catch all related issues once. > > Thanks for the rapid response. I've found that DEBUG_VFS_LOCKS also > requires INVARIANTS. That now catches swapon as well: > KDB: stack backtrace: > db_trace_self() at db_trace_self > db_trace_self_wrapper() at db_trace_self_wrapper+0x30 > assert_vop_locked() at assert_vop_locked+0x58 > VOP_GETATTR_APV() at VOP_GETATTR_APV+0x4c > sys_swapon() at sys_swapon+0x2c0 > do_el0_sync() at do_el0_sync+0x4a4 > handle_el0_sync() at handle_el0_sync+0x90 > --- exception, esr 0x56000000 > vnode 0xffffa000065511c0: type VREG > usecount 1, writecount 0, refcount 1 seqc users 0 > hold count flags () > flags (VV_VMSIZEVNLOCK) > lock type nfs: UNLOCKED > fileid 30984 fsid 0x3a3a00ff01 > VOP_GETATTR: 0xffffa000065511c0 is not locked but should be > KDB: enter: lock violation > [ thread pid 1027 tid 100159 ] > Stopped at kdb_enter+0x48: undefined f900c11f > > I will dig into that further this evening. Try this (combined two patches). diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 9bc506c9b6b8..cecf5d94ee1f 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2366,8 +2366,8 @@ sys_swapon(struct thread *td, struct swapon_args *uap) goto done; } - NDINIT(&nd, LOOKUP, ISOPEN | FOLLOW | AUDITVNODE1, UIO_USERSPACE, - uap->name, td); + NDINIT(&nd, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, + UIO_USERSPACE, uap->name, td); error = namei(&nd); if (error) goto done; @@ -2387,8 +2387,10 @@ sys_swapon(struct thread *td, struct swapon_args *uap) error = swaponvp(td, vp, attr.va_size / DEV_BSIZE); } - if (error) - vrele(vp); + if (error != 0) + vput(vp); + else + VOP_UNLOCK(vp); done: sx_xunlock(&swdev_syscall_lock); return (error); @@ -3012,7 +3014,7 @@ swapongeom(struct vnode *vp) { int error; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + ASSERT_VOP_ELOCKED(vp, "swapongeom"); if (vp->v_type != VCHR || VN_IS_DOOMED(vp)) { error = ENOENT; } else { @@ -3020,7 +3022,6 @@ swapongeom(struct vnode *vp) error = swapongeom_locked(vp->v_rdev, vp); g_topology_unlock(); } - VOP_UNLOCK(vp); return (error); } @@ -3057,9 +3058,9 @@ swapdev_strategy(struct buf *bp, struct swdevt *sp) static void swapdev_close(struct thread *td, struct swdevt *sp) { - + vn_lock(sp->sw_vp, LK_EXCLUSIVE | LK_RETRY); VOP_CLOSE(sp->sw_vp, FREAD | FWRITE, td->td_ucred, td); - vrele(sp->sw_vp); + vput(sp->sw_vp); } static int @@ -3068,6 +3069,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) struct swdevt *sp; int error; + ASSERT_VOP_ELOCKED(vp, "swaponvp"); if (nblks == 0) return (ENXIO); mtx_lock(&sw_dev_mtx); @@ -3079,14 +3081,12 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) } mtx_unlock(&sw_dev_mtx); - (void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC error = mac_system_check_swapon(td->td_ucred, vp); if (error == 0) #endif error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td, NULL); - (void) VOP_UNLOCK(vp); - if (error) + if (error != 0) return (error); swaponsomething(vp, vp, nblks, swapdev_strategy, swapdev_close, From nobody Wed Nov 24 04:22:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6BAEB188987B; Wed, 24 Nov 2021 04:22: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 4HzSX60xCwz3Hdt; Wed, 24 Nov 2021 04:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00C222343C; Wed, 24 Nov 2021 04:22: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 1AO4MDG9049591; Wed, 24 Nov 2021 04:22:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO4MDlc049590; Wed, 24 Nov 2021 04:22:13 GMT (envelope-from git) Date: Wed, 24 Nov 2021 04:22:13 GMT Message-Id: <202111240422.1AO4MDlc049590@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: b57e0aa4ef43 - main - arm: Make machine/reg.h self-contained List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b57e0aa4ef4319334df8018bc60fd28a84b074cc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637727734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+qFJ4DZwe39L5k8jMWouzhqk028ChU+A0knID8jkcjs=; b=b4vVAKJqIN8rOBNm5aQO5LEEzmuuh0vIoqhb5raIEDxjEkUxe5SmJJR0szZEcAN2KPCYUM OREBjlNbD78Of8lTLE0lX0mpN4J1c/Ve+Hpy9Ai+jotpBGtYGWHysnzok7Hp/XwrEFnJhS MLoPcufvcVZf37OwxVFJv2LWPamzav4rtksQB/r+ImY43zcdWDn6DIv0oaandQae1tDUbZ it8rdagOhI8bY8dDUAEcdxJWZSRTP93GnvsSuhvrCa612bo5vX93wPmScUIFL7sNvASycs apoYhPCDCqe0EvFTlPMOV1VPM78Tb8yoLa6xwzbLJeC1gTa6GC2TidAso347PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637727734; a=rsa-sha256; cv=none; b=jbA80D350XSMK3wceFTBWVoHtnsRRsO4YXAPlyLt84Fk6Quzhf+nyPuZ04ZyRhtzHub79L T2Ki/rZbSbz35SbL9MX0PE7bQzMSSRyxys50UM5OTTeY0Ela/+8QWuJFKgEGY/k0YOXKE4 JprZ34LCfUpnwbiShYS/wUFwN9lzdt+J/C5VXzu117uZIayRH8qWMbrgtNmuQZGU7V9ePd ubWBBhdI6mhPT8WVV7BfJHsI/Nab33on7BgKYvmQCb8OWtoomEnMAWnC4LBRSVkCldAYQs frBOa4/6NpGAhe4akhj8gZPevGQrGG09t5tWTkOXLPy5AWpfjrOWGDxzeP6zdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b57e0aa4ef4319334df8018bc60fd28a84b074cc commit b57e0aa4ef4319334df8018bc60fd28a84b074cc Author: Warner Losh AuthorDate: 2021-11-24 00:49:56 +0000 Commit: Warner Losh CommitDate: 2021-11-24 04:21:17 +0000 arm: Make machine/reg.h self-contained Allow inclusion of sys/reg.h w/o pre-requisites by making arm's machine/reg.h self-contained. Sponsored by: Netflix --- sys/arm/include/reg.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/arm/include/reg.h b/sys/arm/include/reg.h index 8aee07c9b480..4dc954816881 100644 --- a/sys/arm/include/reg.h +++ b/sys/arm/include/reg.h @@ -3,6 +3,8 @@ #ifndef MACHINE_REG_H #define MACHINE_REG_H +#include + struct reg { unsigned int r[13]; unsigned int r_sp; @@ -12,9 +14,9 @@ struct reg { }; struct fp_extended_precision { - u_int32_t fp_exponent; - u_int32_t fp_mantissa_hi; - u_int32_t fp_mantissa_lo; + __uint32_t fp_exponent; + __uint32_t fp_mantissa_hi; + __uint32_t fp_mantissa_lo; }; typedef struct fp_extended_precision fp_reg_t; From nobody Wed Nov 24 04:22:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AE1D11889B1A; Wed, 24 Nov 2021 04:22: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 4HzSX72MCjz3Hc1; Wed, 24 Nov 2021 04:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2ED07237A4; Wed, 24 Nov 2021 04:22: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 1AO4MF6b049615; Wed, 24 Nov 2021 04:22:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO4MFDB049614; Wed, 24 Nov 2021 04:22:15 GMT (envelope-from git) Date: Wed, 24 Nov 2021 04:22:15 GMT Message-Id: <202111240422.1AO4MFDB049614@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: 8ee8271e2297 - main - arm64: Make machine/reg.h self contained List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8ee8271e22975f77f8c147c81470b8eaee3bbab9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637727735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GwrsiS53WtRL/QeZlhwLlpqGrDKnQvM/K78wwPQgUyM=; b=hp0ZiSmsCQCJoZHgBu71fyfxne5DlQelc/1PXyv2oeooghvwp1H6zHWQhpM93rbKt8zTR5 IjlFJEF7p+ohO6QV9zQ/B3gBVB+fyZBavpCSE4f1dUJ8uXgPFJGfJLigY7Z6ueu9F5ZVQA XFTaOW9ieGvpTYQvoP30AobMha4OurtRSimFx46SYyJDiHFazL12YZgYNzIdVqhY7vsPpn wrlDxe1K6ufeYB4BvAT86KrT8yZY34AbygLBFwTbUuVk1MIpMGWxG16GNMwl8YknKGlBoR P73EyXjMwlgwMO/RdmA/ewTNBpP2HYXtROwyxH1MnbKZ4lgdvoyKkeI8fU5Fuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637727735; a=rsa-sha256; cv=none; b=itbZVZ6rK7GcVcPI3aam/crBIhnc2e4kw8DWtUez/KefKOGRObx0TxEcK6e6v/oWJiC3An l2UJGOuTrT26qThFXaY80jukOhEIne+w7P1T0P3GDov8nyn2X8nIGRI78xqinq6dd3VeLs KUVVW8qGN7c21T+5hYO0k2s3Opm+y8Iwpeb4eOUle+mOiVGCBoeSxOFMQFRewEk7dfu2R3 U6/ZUAoqftc0NdF6FD+F7IHBcSer8QcCHCpPg2aXuuu76DJlaZ56qhYOk020wzDsTCFzzm C3fj+8NibUtP5obt2mwJ5WeMnCspQioja8F/OBzcWt5B4j0CgS1S2c893Zxacg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8ee8271e22975f77f8c147c81470b8eaee3bbab9 commit 8ee8271e22975f77f8c147c81470b8eaee3bbab9 Author: Warner Losh AuthorDate: 2021-11-24 01:01:01 +0000 Commit: Warner Losh CommitDate: 2021-11-24 04:21:17 +0000 arm64: Make machine/reg.h self contained Make sys/reg.h includable on aarch64 by making machine/reg.h self-contained: Include sys/_types.h and use __uint* instead of uint*. Sponsored by: Netflix --- sys/arm64/include/reg.h | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/sys/arm64/include/reg.h b/sys/arm64/include/reg.h index d7c3354bfd2f..bb151af55ba6 100644 --- a/sys/arm64/include/reg.h +++ b/sys/arm64/include/reg.h @@ -33,12 +33,14 @@ #ifndef _MACHINE_REG_H_ #define _MACHINE_REG_H_ +#include + struct reg { - uint64_t x[30]; - uint64_t lr; - uint64_t sp; - uint64_t elr; - uint32_t spsr; + __uint64_t x[30]; + __uint64_t lr; + __uint64_t sp; + __uint64_t elr; + __uint32_t spsr; }; struct reg32 { @@ -51,8 +53,8 @@ struct reg32 { struct fpreg { __uint128_t fp_q[32]; - uint32_t fp_sr; - uint32_t fp_cr; + __uint32_t fp_sr; + __uint32_t fp_cr; }; struct fpreg32 { @@ -60,20 +62,20 @@ struct fpreg32 { }; struct dbreg { - uint8_t db_debug_ver; - uint8_t db_nbkpts; - uint8_t db_nwtpts; - uint8_t db_pad[5]; + __uint8_t db_debug_ver; + __uint8_t db_nbkpts; + __uint8_t db_nwtpts; + __uint8_t db_pad[5]; struct { - uint64_t dbr_addr; - uint32_t dbr_ctrl; - uint32_t dbr_pad; + __uint64_t dbr_addr; + __uint32_t dbr_ctrl; + __uint32_t dbr_pad; } db_breakregs[16]; struct { - uint64_t dbw_addr; - uint32_t dbw_ctrl; - uint32_t dbw_pad; + __uint64_t dbw_addr; + __uint32_t dbw_ctrl; + __uint32_t dbw_pad; } db_watchregs[16]; }; From nobody Wed Nov 24 04:22:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0C3681889B1F; Wed, 24 Nov 2021 04:22: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 4HzSX83vSVz3Hhh; Wed, 24 Nov 2021 04:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 585DE239A6; Wed, 24 Nov 2021 04:22: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 1AO4MGe2049641; Wed, 24 Nov 2021 04:22:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO4MG7x049640; Wed, 24 Nov 2021 04:22:16 GMT (envelope-from git) Date: Wed, 24 Nov 2021 04:22:16 GMT Message-Id: <202111240422.1AO4MG7x049640@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: d2bf8c544adc - main - riscv: Make machine/regs.h self-contained List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d2bf8c544adc4b080d3ab15d4f08f501b689d964 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637727736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DXyya0dUMhuX6TIEVYHJqjl6VSKU0V40xPfl6Kg0ZX4=; b=CglxuqXZJEH59NaL+WVGRUad/a5x/o2VXlj+Plxg9XAGRm9QaeoptoGjdRVfooWdPfEYPX WovaBExPSCJ3bk4FuPjar7p29Aq8NY7WeD8ie8kVo0qgT3wAhdHhmaeID/3FPXbw8YJiFJ alnwXn1HZfXsOqxJjzF6z6u1pi4NkRP96MFRLN0zq29J0tGgG07UCLXrv+AB4aeDcn5p1D csqzV/85aeEY7+E9Am+BDO8SFQ1xu2H8hECkq8SZrfH3mPmItoaen49M5iddeUJytG0ZIQ /ej3J84UL2uRboPBfxzsRfNDuQ02clns4iLqLYS2HGVyD36Up5/gydmf/jFznQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637727736; a=rsa-sha256; cv=none; b=XTyS/Et2c+OC4pf71GjEuWKF2leyObWk5EsVM2LPyXRDa05N2kFquIazAoLWlzt+REy5Jt VDCwwppYEXZvp2VFKGm6+5BP5opnw02kpdm7CBHqcD0PrWLLYPnXwx1VzAgzlVKqGDHFi9 u0Qfor8GRL9nxuO6dJTxWdgqgRv4u+MtGrjNU6fDSrMdp/IHEhVcN7WtxwNMA6OiE+d6e8 oWFlmo/FBWGvePgY4EipEtKniJ1xfv10BvhYAKOAcK3mcKwfF3mZjx9w7xdxa0y9/yt7/t hfKjZjM3FerykbaSg5kTxYNWjWSYYACo4nQLi06ir0U2tIOOTekx+kGBU2kEPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d2bf8c544adc4b080d3ab15d4f08f501b689d964 commit d2bf8c544adc4b080d3ab15d4f08f501b689d964 Author: Warner Losh AuthorDate: 2021-11-24 01:47:26 +0000 Commit: Warner Losh CommitDate: 2021-11-24 04:21:17 +0000 riscv: Make machine/regs.h self-contained Make sys/reg.h self-contained by making riscv's machine/reg.h self-contained. Sponsored by: Netflix --- sys/riscv/include/reg.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/sys/riscv/include/reg.h b/sys/riscv/include/reg.h index 003e696e30e3..d76b500bce1b 100644 --- a/sys/riscv/include/reg.h +++ b/sys/riscv/include/reg.h @@ -37,21 +37,23 @@ #ifndef _MACHINE_REG_H_ #define _MACHINE_REG_H_ +#include + struct reg { - uint64_t ra; /* return address */ - uint64_t sp; /* stack pointer */ - uint64_t gp; /* global pointer */ - uint64_t tp; /* thread pointer */ - uint64_t t[7]; /* temporaries */ - uint64_t s[12]; /* saved registers */ - uint64_t a[8]; /* function arguments */ - uint64_t sepc; /* exception program counter */ - uint64_t sstatus; /* status register */ + __uint64_t ra; /* return address */ + __uint64_t sp; /* stack pointer */ + __uint64_t gp; /* global pointer */ + __uint64_t tp; /* thread pointer */ + __uint64_t t[7]; /* temporaries */ + __uint64_t s[12]; /* saved registers */ + __uint64_t a[8]; /* function arguments */ + __uint64_t sepc; /* exception program counter */ + __uint64_t sstatus; /* status register */ }; struct fpreg { - uint64_t fp_x[32][2]; /* Floating point registers */ - uint64_t fp_fcsr; /* Floating point control reg */ + __uint64_t fp_x[32][2]; /* Floating point registers */ + __uint64_t fp_fcsr; /* Floating point control reg */ }; struct dbreg { From nobody Wed Nov 24 04:22:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B72551889B34; Wed, 24 Nov 2021 04:22: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 4HzSXB0kZjz3Ht4; Wed, 24 Nov 2021 04:22:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74D28239A7; Wed, 24 Nov 2021 04:22: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 1AO4MHe8049670; Wed, 24 Nov 2021 04:22:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO4MHZL049669; Wed, 24 Nov 2021 04:22:17 GMT (envelope-from git) Date: Wed, 24 Nov 2021 04:22:17 GMT Message-Id: <202111240422.1AO4MHZL049669@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: 76d6bb6a6e8f - main - powerpc: Make machine/reg.h self-contained List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 76d6bb6a6e8f61ed267ac245cdf2d293deade8d7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637727738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G9/MfpNvff+JGjcj2khKMB9wdKWzXY3I3xV7aqq9pmA=; b=lYJ2pgC0iz3CdZlcS+8by/0inNIzh3qiSNquIGCzHrxnTrULl79a4dX00iQpKzJwRHhKvG K4KASD6KkdiBkWXb6yu+2Kfe/EtplSKWBq6VptAy11Gkp5x1zWgzpB7VGD3YS8rkkavJNq VGw4gHvvVOxNvcNNetFeEqAzNr4IBIGn1WsJgJUpRVrMVkpwtvgvR84KzF2fTosboXnJ49 Pbw9gslCGu8Z/DpnMKmgOpW5MGa8AjOq2DozA2x02qBkyYBNbdjQc6BhlfCfi48CMVQ70u cSocufg8ey21mxCNyWsThIxKkcsLQJY5YG6C30Nl167VdbvLT3ceajDLkFaiGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637727738; a=rsa-sha256; cv=none; b=CThG9apBx+icICmZbwhDU371BwwUBwZ3jURVlfS+q2qpVo1PfXKFB/iF2t1VKC1POZMNHk YgejyFOogK0wda+UVcJPh5O75Sh/lUg7hPDQQTWfhbxmH+pZj0ITp6+3Bv2sFUdmADu8PN 1mMo6Piwbsg4aKFzw59IsqikMmyNqVZ0bJ5xuVbA33veKgEOI/VhjQlOYvdgVe4Dn1cgXl hQFWkcHoCMIHIXmNQzS3Bcw73/uG1CmpaF7xNN7VeHp45wFv3VQ4WkRa4AdQnnpWLXA/vk sXtnMqd4zu4mzAZu0MfG6h/n9y/2HaGvvGQeM108eB6gbVrH1OTbq31Z2iDQaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=76d6bb6a6e8f61ed267ac245cdf2d293deade8d7 commit 76d6bb6a6e8f61ed267ac245cdf2d293deade8d7 Author: Warner Losh AuthorDate: 2021-11-24 01:50:20 +0000 Commit: Warner Losh CommitDate: 2021-11-24 04:21:18 +0000 powerpc: Make machine/reg.h self-contained Make powerpc*'s machine/reg.h self-contained so that sys/reg.h can be self-contained. Sponsored by: Netflix --- sys/powerpc/include/reg.h | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/sys/powerpc/include/reg.h b/sys/powerpc/include/reg.h index c0bf807ac75e..a5e2f601eaca 100644 --- a/sys/powerpc/include/reg.h +++ b/sys/powerpc/include/reg.h @@ -4,14 +4,16 @@ #ifndef _POWERPC_REG_H_ #define _POWERPC_REG_H_ +#include + /* Must match struct trapframe */ struct reg { - register_t fixreg[32]; - register_t lr; - register_t cr; - register_t xer; - register_t ctr; - register_t pc; + __register_t fixreg[32]; + __register_t lr; + __register_t cr; + __register_t xer; + __register_t ctr; + __register_t pc; }; struct fpreg { @@ -21,10 +23,10 @@ struct fpreg { /* Must match pcb.pcb_vec */ struct vmxreg { - uint32_t vr[32][4]; - uint32_t pad[2]; - uint32_t vrsave; - uint32_t vscr; + __uint32_t vr[32][4]; + __uint32_t pad[2]; + __uint32_t vrsave; + __uint32_t vscr; }; struct dbreg { @@ -34,12 +36,12 @@ struct dbreg { #ifdef __LP64__ /* Must match struct trapframe */ struct reg32 { - int32_t fixreg[32]; - int32_t lr; - int32_t cr; - int32_t xer; - int32_t ctr; - int32_t pc; + __int32_t fixreg[32]; + __int32_t lr; + __int32_t cr; + __int32_t xer; + __int32_t ctr; + __int32_t pc; }; struct fpreg32 { From nobody Wed Nov 24 04:22:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 84A201889BC2; Wed, 24 Nov 2021 04:22: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 4HzSXB5mGKz3HZ7; Wed, 24 Nov 2021 04:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 941C6237A6; Wed, 24 Nov 2021 04:22: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 1AO4MILv049694; Wed, 24 Nov 2021 04:22:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO4MIXh049693; Wed, 24 Nov 2021 04:22:18 GMT (envelope-from git) Date: Wed, 24 Nov 2021 04:22:18 GMT Message-Id: <202111240422.1AO4MIXh049693@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: ee2c52fd3fd9 - main - sys/devctl.h: Only declare kernel functions in kernel. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ee2c52fd3fd9dd19c1f7117cdda968ec4e08c898 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637727739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7o6x7ZYnI0+ChWOmFSnSzpsmGOGaJSDzZdfpIYXi0Aw=; b=C+n2HqmJp2ff/WoHO6WXcfcLFvA3wfxc8nZE0HJ8rBHDbUI9e4ZogW1gQRIWvUZwK/zRCl H6JdilGLJzAtgtlaRh5T1sZj9jZdoAWAnqxHvIdpXlNFZxe/kzMHduEbsKX+BwKargS1xQ ah23w3phePNFljos2+zWmH7QfryP3PSLHERZ0h0Y7EMUo3obgU1OibP/fz71hv1B8Lpgsq F18IMytqiZ6ydXXgOVuIprnBfQnmBXlBqUe2bL/D4HgR2jCAmd45DMGdKi9Ye7zd3/Iu3X oeGT4gARk4LMSNFIR49BjlX3D08Lp4/kZZi6mXlXMTd6xutaGQ1/IZIjXyrTAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637727739; a=rsa-sha256; cv=none; b=cbh6m9GvajQboDGJ43r6GtjaFShpYJdswj6xM0qOMPBgzxTwLUc/fsJtLxpk7JYLp0fqnb /FGxmVL/k+AQhNQanJoT6nmY9wpxzSVQVFNf94r9X0JM+SBjr2LVuGJDck+tFj8JA4yPau L6NvqAk7hiG0goKNQJS48hK28Az9nTzGaajqc4iIalH+Ky6Wp1dE9Ul9waO86w2nbriJe3 VnBg+W/u4L8BtIZHwk5r9vzgGYqB822clRAMaLm5nBlyFmZVOwZr8s+RjxeEBGeIk/wKw8 UUBs93GpnoKCQAkFg1m3uqu9X9iG/wKY8R8jzrA0AlrkrNlScx9cQI9xXZf6KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ee2c52fd3fd9dd19c1f7117cdda968ec4e08c898 commit ee2c52fd3fd9dd19c1f7117cdda968ec4e08c898 Author: Warner Losh AuthorDate: 2021-11-24 03:28:45 +0000 Commit: Warner Losh CommitDate: 2021-11-24 04:21:18 +0000 sys/devctl.h: Only declare kernel functions in kernel. Also, while I'm here, switch to newer, shorter format and fix my copyright to match the others in the tree. Sponsored by: Netflix --- sys/sys/devctl.h | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/sys/sys/devctl.h b/sys/sys/devctl.h index 144a091a3a81..2cf84e420874 100644 --- a/sys/sys/devctl.h +++ b/sys/sys/devctl.h @@ -1,28 +1,7 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * Copyright 2020 M. Warner Losh * - * Copyright 2020 M. Warner Losh. - * - * 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. + * SPDX-License-Idnetifier: BSD-2-Clause * * $FreeBSD$ * @@ -31,6 +10,7 @@ #ifndef _SYS_DEVCTL_H_ #define _SYS_DEVCTL_H_ +#ifdef _KERNEL /** * devctl hooks. Typically one should use the devctl_notify * hook to send the message. @@ -40,5 +20,6 @@ void devctl_notify(const char *__system, const char *__subsystem, const char *__type, const char *__data); struct sbuf; void devctl_safe_quote_sb(struct sbuf *__sb, const char *__src); +#endif #endif /* _SYS_DEVCTL_H_ */ From nobody Wed Nov 24 04:22:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AAFBC1889B5F; Wed, 24 Nov 2021 04:22: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 4HzSXD21P8z3Hhs; Wed, 24 Nov 2021 04:22:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5257237A8; Wed, 24 Nov 2021 04:22: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 1AO4MJoN049718; Wed, 24 Nov 2021 04:22:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO4MJBm049717; Wed, 24 Nov 2021 04:22:19 GMT (envelope-from git) Date: Wed, 24 Nov 2021 04:22:19 GMT Message-Id: <202111240422.1AO4MJBm049717@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: 09f1ead23021 - main - Fix copyright to be like all my others in the tree List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09f1ead2302109abff50277533cc16ebfc406eb0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637727740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RfprL1LrzorsTfBMmxtyij4gskZlYOyBdWRFcwPfr04=; b=Su1w56KdDaBR9gEQ77guz3f4XWiTY6qRBTyL/yHuFgTFuH4fIyOC6o7DEbDjTbrNrBYiWB lcZFsBp8VaEHPnaCFosS6CjpIMx+3JoOqkbhP7IlnWC4FIyb+g4cBa9bhnr6qNx8nUgSOB ZgO4v4Jtr2wck2vSw7p/e9jfG3jt8eliXwprR6i1Cav4RBh3jSwqb3WQ20CiaIwohd5arX YxoCkUy7kK45o7WFeVH1qXUeFUzzgLd9N/O7ZGQ5F6ny2jfKmNL29wNfvkLH13TXTePAv+ CuJdUNZ/8azlxgSNfrvUHMB+LiBy/0lwy2VZ/GReQkK2L4vsbpEEJ5ELJCqp6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637727740; a=rsa-sha256; cv=none; b=VReBpomwYXj8TTSn6imULYM9ao4Y4bm4cNhr6TROu9Lwp43Eu6kKaNDbzBCj0SEwpXkrGD QSzhPHO3FtpbBB+OmNmiQzTfWPilJyG7E2Pp3h730EEdJF6TXpt8t0ed3SJoMXuwg/zknO OskykmvOL+D1fBCf+diOYLsmZokELbVWi+fUq8UkN27AKR4nKqzeyGRaN880WOTYWBTN9j G439tjyKnvYCYwcQVzIux8bO0/mKLxqyeAJGMzn938R4a+Y0DySN/mPOh8j5I9GFHkY4up SLFwXJKGgcQx387a7x01ZPJlgQozTL0HzoRMqBvIru9m1iNLvRlbZtjSdJSRRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=09f1ead2302109abff50277533cc16ebfc406eb0 commit 09f1ead2302109abff50277533cc16ebfc406eb0 Author: Warner Losh AuthorDate: 2021-11-24 03:52:59 +0000 Commit: Warner Losh CommitDate: 2021-11-24 04:21:18 +0000 Fix copyright to be like all my others in the tree --- tests/sys/kern/basic_signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/kern/basic_signal.c b/tests/sys/kern/basic_signal.c index 0b3200e2b8ab..b94ebeb1ba23 100644 --- a/tests/sys/kern/basic_signal.c +++ b/tests/sys/kern/basic_signal.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2021 Warner Losh + * Copyright (c) 2021 M. Warner Losh * * SPDX-License-Identifier: BSD-2-Clause */ From nobody Wed Nov 24 04:22:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 27D421889E2A; Wed, 24 Nov 2021 04:22:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzSXF6K8qz3HtL; Wed, 24 Nov 2021 04:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7183239A8; Wed, 24 Nov 2021 04:22: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 1AO4MKNM049742; Wed, 24 Nov 2021 04:22:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO4MKm5049741; Wed, 24 Nov 2021 04:22:20 GMT (envelope-from git) Date: Wed, 24 Nov 2021 04:22:20 GMT Message-Id: <202111240422.1AO4MKm5049741@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: 6637b7460066 - main - cam: Remove all the write-only variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6637b7460066314f9b3ce0073ec6563e15ece608 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637727742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vjpYBPnQatmO1Rx76L67H/ubu/6OhAIugZX2FteY2y0=; b=iDruF6GCzgsYlEV27CAHJ0jbhtDkNtVoYLZwK5/jdW40u3A/T6HzZTFCZWoIdp1t/koVVw C0Zcy0sJlPaQNtgEAOwYspf5BsUyGCkBywxll6urF07Gq9zOJPvhan8dnn81CkBEqpX2tW cASaEEaVIo9IVlsZvf7t5LIeDsnejGIxANZOLOL3JGQZs8G9/+WxOzokjcD8+MlHlDWCxq IgAKiP1JFGATROcyzEHyLb5iQsXCcSJICbbo7wWyuN2vFj81cQwdPqJ6D0OKoEov2EvlLD mlbw7NZzGdpm4poFXBx9qIFgjIvZerZtNsaGOTDDvP7DM+5AFVN9Ay8rFeVBag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637727742; a=rsa-sha256; cv=none; b=ZuWtup2VL5O7ydWAWn+VvujcBHSkNrA02yyOQl8O3HZac3wlbK8gaWTGiY/n3S+yCWBXKv Md9DavXKnPwK8j48NOTxlrtubZ2J//Mff9s0Mvh8Y/PD60QNqNpPCtf5QiUUeWBJ6UjGX3 bvqCv7pi4UX5ffaNbiJ2UWkghx5CV6JJULml/PIlkgpt/uqFtQZoozKHBeYRag/RB+jrdy Y8rClXdlqNjm/5fnBcS7nya4kZRTpWC9nKrtQm8Si+dT5bJ57smf92p9z37qnIes4G+VMO H0jdU4RuL4cXXeQBcBEzwGgZgBVaIrGaOLjiZAVd0+dHU5h2FWtn7/khD/66fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6637b7460066314f9b3ce0073ec6563e15ece608 commit 6637b7460066314f9b3ce0073ec6563e15ece608 Author: Warner Losh AuthorDate: 2021-11-24 04:14:05 +0000 Commit: Warner Losh CommitDate: 2021-11-24 04:21:18 +0000 cam: Remove all the write-only variables Delete all the write only variables in CAM. At worst, the only behavior change would be to prevent core dumps from chasing NULL pointers (though I think in all these cases the pointers can't be NULL). Sponsored by: Netflix --- sys/cam/nvme/nvme_da.c | 7 ------- sys/cam/nvme/nvme_xpt.c | 4 ---- sys/cam/scsi/scsi_cd.c | 2 -- sys/cam/scsi/scsi_ch.c | 5 ----- sys/cam/scsi/scsi_da.c | 6 ------ sys/cam/scsi/scsi_enc.c | 5 ----- sys/cam/scsi/scsi_enc_ses.c | 4 ---- sys/cam/scsi/scsi_pass.c | 10 +--------- 8 files changed, 1 insertion(+), 42 deletions(-) diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index baeaad182f3a..f1c9a9ec9fea 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -375,10 +375,8 @@ ndaioctl(struct disk *dp, u_long cmd, void *data, int fflag, struct thread *td) { struct cam_periph *periph; - struct nda_softc *softc; periph = (struct cam_periph *)dp->d_drv1; - softc = (struct nda_softc *)periph->softc; switch (cmd) { case NVME_IO_TEST: @@ -1269,11 +1267,6 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb) static int ndaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { - struct nda_softc *softc; - struct cam_periph *periph; - - periph = xpt_path_periph(ccb->ccb_h.path); - softc = (struct nda_softc *)periph->softc; switch (ccb->ccb_h.status & CAM_STATUS_MASK) { case CAM_CMD_TIMEOUT: diff --git a/sys/cam/nvme/nvme_xpt.c b/sys/cam/nvme/nvme_xpt.c index 22d984d02038..4e68330e63e7 100644 --- a/sys/cam/nvme/nvme_xpt.c +++ b/sys/cam/nvme/nvme_xpt.c @@ -258,13 +258,11 @@ nvme_probe_start(struct cam_periph *periph, union ccb *start_ccb) { struct ccb_nvmeio *nvmeio; nvme_probe_softc *softc; - struct cam_path *path; lun_id_t lun; CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("nvme_probe_start\n")); softc = (nvme_probe_softc *)periph->softc; - path = start_ccb->ccb_h.path; nvmeio = &start_ccb->nvmeio; lun = xpt_path_lun_id(periph->path); @@ -312,7 +310,6 @@ nvme_probe_done(struct cam_periph *periph, union ccb *done_ccb) struct cam_path *path; struct scsi_vpd_device_id *did; struct scsi_vpd_id_descriptor *idd; - cam_status status; u_int32_t priority; int found = 1, e, g, len; @@ -335,7 +332,6 @@ out: /* Don't wedge the queue */ xpt_release_devq(path, /*count*/1, /*run_queue*/TRUE); } - status = done_ccb->ccb_h.status & CAM_STATUS_MASK; /* * If we get to this point, we got an error status back diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 3cca4bbf243b..3f5cadb44fdc 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -3146,12 +3146,10 @@ static int cdreadtoc(struct cam_periph *periph, u_int32_t mode, u_int32_t start, u_int8_t *data, u_int32_t len, u_int32_t sense_flags) { - u_int32_t ntoc; struct ccb_scsiio *csio; union ccb *ccb; int error; - ntoc = len; error = 0; ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c index d440526a7913..bccca0e87726 100644 --- a/sys/cam/scsi/scsi_ch.c +++ b/sys/cam/scsi/scsi_ch.c @@ -734,11 +734,6 @@ chdone(struct cam_periph *periph, union ccb *done_ccb) static int cherror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { - struct ch_softc *softc; - struct cam_periph *periph; - - periph = xpt_path_periph(ccb->ccb_h.path); - softc = (struct ch_softc *)periph->softc; return (cam_periph_error(ccb, cam_flags, sense_flags)); } diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 31aeb59d9438..83e14eca35ab 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -4533,13 +4533,11 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) struct bio *bp, *bp1; struct da_softc *softc; struct ccb_scsiio *csio; - u_int32_t priority; da_ccb_state state; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("dadone\n")); softc = (struct da_softc *)periph->softc; - priority = done_ccb->ccb_h.pinfo.priority; csio = &done_ccb->csio; #if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING) @@ -5304,7 +5302,6 @@ dadone_probeata(struct cam_periph *periph, union ccb *done_ccb) u_int32_t priority; int continue_probe; int error; - int16_t *ptr; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("dadone_probeata\n")); @@ -5312,7 +5309,6 @@ dadone_probeata(struct cam_periph *periph, union ccb *done_ccb) priority = done_ccb->ccb_h.pinfo.priority; csio = &done_ccb->csio; ata_params = (struct ata_params *)csio->data_ptr; - ptr = (uint16_t *)ata_params; continue_probe = 0; error = 0; @@ -5897,12 +5893,10 @@ static void dadone_tur(struct cam_periph *periph, union ccb *done_ccb) { struct da_softc *softc; - struct ccb_scsiio *csio; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("dadone_tur\n")); softc = (struct da_softc *)periph->softc; - csio = &done_ccb->csio; cam_periph_assert(periph, MA_OWNED); diff --git a/sys/cam/scsi/scsi_enc.c b/sys/cam/scsi/scsi_enc.c index 30cbf108fd44..ad6c09c99f58 100644 --- a/sys/cam/scsi/scsi_enc.c +++ b/sys/cam/scsi/scsi_enc.c @@ -345,11 +345,6 @@ enc_close(struct cdev *dev, int flag, int fmt, struct thread *td) int enc_error(union ccb *ccb, uint32_t cflags, uint32_t sflags) { - struct enc_softc *softc; - struct cam_periph *periph; - - periph = xpt_path_periph(ccb->ccb_h.path); - softc = (struct enc_softc *)periph->softc; return (cam_periph_error(ccb, cflags, sflags)); } diff --git a/sys/cam/scsi/scsi_enc_ses.c b/sys/cam/scsi/scsi_enc_ses.c index 39d99fd23eb9..803630f31f54 100644 --- a/sys/cam/scsi/scsi_enc_ses.c +++ b/sys/cam/scsi/scsi_enc_ses.c @@ -1339,7 +1339,6 @@ ses_process_config(enc_softc_t *enc, struct enc_fsm_state *state, union ccb *ccb, uint8_t **bufp, int error, int xfer_len) { struct ses_iterator iter; - ses_softc_t *ses; enc_cache_t *enc_cache; ses_cache_t *ses_cache; uint8_t *buf; @@ -1362,7 +1361,6 @@ ses_process_config(enc_softc_t *enc, struct enc_fsm_state *state, CAM_DEBUG(enc->periph->path, CAM_DEBUG_SUBTRACE, ("entering %s(%p, %d)\n", __func__, bufp, xfer_len)); - ses = enc->enc_private; enc_cache = &enc->enc_daemon_cache; ses_cache = enc_cache->private; buf = *bufp; @@ -2870,7 +2868,6 @@ ses_get_elm_devnames(enc_softc_t *enc, encioc_elm_devnames_t *elmdn) static int ses_handle_string(enc_softc_t *enc, encioc_string_t *sstr, int ioc) { - ses_softc_t *ses; enc_cache_t *enc_cache; ses_cache_t *ses_cache; const struct ses_enc_desc *enc_desc; @@ -2883,7 +2880,6 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *sstr, int ioc) uint8_t *buf; size_t size, rsize; - ses = enc->enc_private; enc_cache = &enc->enc_daemon_cache; ses_cache = enc_cache->private; diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c index e7d9d755c8cc..5d6febe74539 100644 --- a/sys/cam/scsi/scsi_pass.c +++ b/sys/cam/scsi/scsi_pass.c @@ -1202,7 +1202,7 @@ static int passcopysglist(struct cam_periph *periph, struct pass_io_req *io_req, ccb_flags direction) { - bus_size_t kern_watermark, user_watermark, len_copied, len_to_copy; + bus_size_t kern_watermark, user_watermark, len_to_copy; bus_dma_segment_t *user_sglist, *kern_sglist; int i, j, error; @@ -1210,7 +1210,6 @@ passcopysglist(struct cam_periph *periph, struct pass_io_req *io_req, kern_watermark = 0; user_watermark = 0; len_to_copy = 0; - len_copied = 0; user_sglist = io_req->user_segptr; kern_sglist = io_req->kern_segptr; @@ -1249,8 +1248,6 @@ passcopysglist(struct cam_periph *periph, struct pass_io_req *io_req, } } - len_copied += len_to_copy; - if (user_sglist[i].ds_len == user_watermark) { i++; user_watermark = 0; @@ -2239,11 +2236,6 @@ passsendccb(struct cam_periph *periph, union ccb *ccb, union ccb *inccb) static int passerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { - struct cam_periph *periph; - struct pass_softc *softc; - - periph = xpt_path_periph(ccb->ccb_h.path); - softc = (struct pass_softc *)periph->softc; return(cam_periph_error(ccb, cam_flags, sense_flags)); } From nobody Wed Nov 24 06:41:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DE28218AB5F1; Wed, 24 Nov 2021 06:41: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 4HzWd84XxBz4kdD; Wed, 24 Nov 2021 06:41:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C6D725586; Wed, 24 Nov 2021 06:41: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 1AO6fmFB036999; Wed, 24 Nov 2021 06:41:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO6fmuH036998; Wed, 24 Nov 2021 06:41:48 GMT (envelope-from git) Date: Wed, 24 Nov 2021 06:41:48 GMT Message-Id: <202111240641.1AO6fmuH036998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: b38de28a77f4 - main - mii_physubr: Add support for limiting PHY max speed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b38de28a77f4d368e0a477e55cb44272359ae9c9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637736108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6NZh0IFry+zQ04/ai+pc3F5N0qPjg7jJEwD4DDRfEQ=; b=pegoT7efognxPag6ZE36jS5Oax+rHFbMmZ3DBO7br2H8aClGU3TjHlGfpk7XBvXrf77R9H 0dMRNFKP5/pcPH8nhAwTn/lZN+lHTXCVVar1BOZZuTno8mE+bMu4xUumYHYSVLw/kS5HE9 HL7/dhtqCjZQY9qvJGbAWtaNS8HH77Krweihbkh4nAfujm8jzxdEC/fC0SFsdR+XyWSQVn PLIEEWtAdsWXgBibcTQNfFxw144eePC03PXnkaiVizq8r3lrQAEB7Ir7IzZv7QFso67p5f 40pK8ZV42DoPM1PRiIZ9XJBkunbpBwSkStZxeYeAs4f65P+I+GMvkB8PNclnEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637736108; a=rsa-sha256; cv=none; b=TAOVQMYm7O+XnE93OQNMEn5lg4ilCJN7oLQZeKasLgOn/rs9X4w5ey2dlIQSpZHtoyE9mV K+ZFxOGqmqbxQfx9VvOiy/gfYYyc+KqYO99AOmT5uDjFgixCa7rsBERTAlPZojPFXaQCAi c/Dk8jMD8R2UmjdO1neVUO4dmsNOoRR/c5sFm+XomDDTYh6qePhAFqKGG8wN1EdBZbf2lU eUPalRvz6Si46TpgVLWlsR0Ccg1c+GAL8HaRcU9I3vmeyQS7Kez7ajuC9FIEa331cZJR0L haM2pAgKrxIh+M1QU14yVHcG2WdQy12GOMlenhxDut0Sblg4TBRU97Lxor5RAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=b38de28a77f4d368e0a477e55cb44272359ae9c9 commit b38de28a77f4d368e0a477e55cb44272359ae9c9 Author: Kornel Duleba AuthorDate: 2021-11-15 08:49:27 +0000 Commit: Wojciech Macek CommitDate: 2021-11-24 06:40:35 +0000 mii_physubr: Add support for limiting PHY max speed In some cases we might want to limit the max speed advertised below of what the PHY is capable of. This is usually the case when we connect 1G capable PHY to 100M MAC, or when some exotic physical connection is used. Add a new mii_maxspeed field to mii_softc and parse it in mii_phy_dev_attach. Speed limit is normally located in DT. The property is already parsed in mii_fdt.c, but its value still has to be passed by the PHY driver. Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D32727 --- sys/dev/mii/mii_physubr.c | 36 ++++++++++++++++++++++++++++++++++++ sys/dev/mii/miivar.h | 1 + 2 files changed, 37 insertions(+) diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c index f56676d4e091..4ddb7d621652 100644 --- a/sys/dev/mii/mii_physubr.c +++ b/sys/dev/mii/mii_physubr.c @@ -618,11 +618,47 @@ mii_phy_dev_attach(device_t dev, u_int flags, const struct mii_phy_funcs *mpf, sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & sc->mii_capmask; if (sc->mii_capabilities & BMSR_EXTSTAT) sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR); + + switch (sc->mii_maxspeed) { + case 100: + /* + * This is a bit tricky. + * If we have a 1G capable PHY, but we don't want to advertise + * 1G capabilities we need to clear the GTCR register before + * doing autonegotiation. + * Clearing the register here is not enough since its value + * can be restored after PHY_RESET is called. + */ + if ((sc->mii_extcapabilities & + (EXTSR_1000THDX | EXTSR_1000TFDX)) != 0) + sc->mii_flags |= MIIF_HAVE_GTCR; + + sc->mii_extcapabilities = 0; + break; + default: + device_printf(dev, + "Ignoring unsupported max speed value of %d\n", + sc->mii_maxspeed); + case 0: + case 1000: + break; + } device_printf(dev, " "); mii_phy_add_media(sc); printf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); + + /* + * If maxspeed was specified we have to restart autonegotiation. + * PHY might have attempted it and failed due to having mistakenly + * advertising modes that we do not in fact support. + */ + if (sc->mii_maxspeed != 0) { + sc->mii_flags |= MIIF_FORCEANEG; + mii_phy_setmedia(sc); + sc->mii_flags &= ~MIIF_FORCEANEG; + } } /* diff --git a/sys/dev/mii/miivar.h b/sys/dev/mii/miivar.h index 4658394797e9..cf8032f1eb53 100644 --- a/sys/dev/mii/miivar.h +++ b/sys/dev/mii/miivar.h @@ -117,6 +117,7 @@ struct mii_softc { u_int mii_anegticks; /* ticks before retrying aneg */ u_int mii_media_active; /* last active media */ u_int mii_media_status; /* last active status */ + u_int mii_maxspeed; /* Max speed supported by this PHY */ }; typedef struct mii_softc mii_softc_t; From nobody Wed Nov 24 06:41:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 215E018ABA22; Wed, 24 Nov 2021 06:41: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 4HzWd95jhxz4kdM; Wed, 24 Nov 2021 06:41:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A31062507A; Wed, 24 Nov 2021 06:41: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 1AO6fnOd037027; Wed, 24 Nov 2021 06:41:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO6fnM4037026; Wed, 24 Nov 2021 06:41:49 GMT (envelope-from git) Date: Wed, 24 Nov 2021 06:41:49 GMT Message-Id: <202111240641.1AO6fnM4037026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 89fb4802f9a6 - main - vscphy: Fill in new mii_maxspeed 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: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89fb4802f9a64a1eba6475c3e467e614b69052a4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637736109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I5mmTgGwcnWAYCifJ4wOrjjlQJQJeb/obyAEAIII/Kg=; b=CZs0DNN/cjpIPF5FwazZSoJTA4APGV+RtPa54DL8weSEso1VN2DOAqEUuMOZU/lwH7xm6t moegZe6aqUUbARMlOl48YQ3do16YnA+ue5rLUbrnip3Gfmhdi/1JdOu+IOJ0k8EcxRtY3r 9GcOKN4wzQoOqNQlxxq6qnW7FtM+6+b2sU02GVLngfJPQvm3C2o9BNafApx1WPyF5NCMdK OZTCkz1HCIDzp/WaNyntSgN2Z5hypvOfm2EOEsnYckdmN/2aCuLOFhs3nAngEfuA3E58Iw xLYIPe+of8jZa2XZ/GZ1uqZssrYqFUK/JKLaTGbeWL4SMb4HG3NvDZO4QcmjSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637736109; a=rsa-sha256; cv=none; b=Y/5sRB2beoDaQ70ztLWsJVKymsawTVc/jYgFObRYB7YRhpYkgspBn1octJrfWI3Ph8Oje7 0f/bFFTaKGUzL+BXblhGp38Vh1+99AdHgdvOE7g8g0VQfR3+Lj9Tx1M7/zV8LGPOY+M5m7 DXnyf6PuYz3KGeUZI3PJZuhPunO4g3ukYmaIjbiRLj0vWDZ8o02ONUSSYj+qpJ9jDP88FA N2rGvUrAO99Cf0OpHJ1a5oVmO0vLoedDGKxTVeOsW37A4WIyHXMU3yXBPPoW0aGicz3YXN wpB/uXGLcfJJdnRBILXhe8qVHdtyWzmHroKG1DRzL9E6IYdIcscZJkggkKP9HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=89fb4802f9a64a1eba6475c3e467e614b69052a4 commit 89fb4802f9a64a1eba6475c3e467e614b69052a4 Author: Kornel Duleba AuthorDate: 2021-11-15 08:53:39 +0000 Commit: Wojciech Macek CommitDate: 2021-11-24 06:40:35 +0000 vscphy: Fill in new mii_maxspeed field It is used to limit the max advertised speed. The value is read from DT by mii_fdt code. Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D32816 --- sys/dev/mii/vscphy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/mii/vscphy.c b/sys/dev/mii/vscphy.c index 2566f7f73c16..be90145e6299 100644 --- a/sys/dev/mii/vscphy.c +++ b/sys/dev/mii/vscphy.c @@ -114,6 +114,7 @@ vscphy_fdt_get_config(struct vscphy_softc *vsc) vsc->rxdelay = val; if (OF_getencprop(cfg->phynode, "tx-delay", &val, sizeof(val)) > 0) vsc->txdelay = val; + vsc->mii_sc.mii_maxspeed = cfg->max_speed; mii_fdt_free_config(cfg); } #endif From nobody Wed Nov 24 06:41:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 44CA218ABA30; Wed, 24 Nov 2021 06:41: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 4HzWdC1f9Sz4ktj; Wed, 24 Nov 2021 06:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCB2A2552F; Wed, 24 Nov 2021 06:41: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 1AO6foE9037054; Wed, 24 Nov 2021 06:41:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO6fo3t037053; Wed, 24 Nov 2021 06:41:50 GMT (envelope-from git) Date: Wed, 24 Nov 2021 06:41:50 GMT Message-Id: <202111240641.1AO6fo3t037053@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 9174eab4142c - main - miibus: Add support for mapping OFW nodes to PHY 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: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9174eab4142c5ed199b1599c1a3eefd5f0573ab7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637736111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ThCXGixqvxgXP2jdoWDVspRldSaBjLheW0YATnq2fm0=; b=Sz/+YZbKY3Hhuh+TE+Y6JitJzBCvvRqmWeoxjpDTAQSNN56OfT+ohJ3lbsx/77sBjB2cLa 8+LEj7vj4d1+R07xkzvZVPghuNcBus+iFBB3kLa9djq+mLzu97nbD1Ow086rP8XZHxHo6f UK15tAXmLy1N/jjsQchgdMpn8MNo53iXGIMqgMcP+uJLVrRWhkBfWQzFYqtbEKMeFlhacE +qWi1IKpKha09Lbt881GXb8EUrqJ05B2deAloDx1U2XNXnRuMW1Z9nVi3tyipa9DSWS0bo N0dS7LnpV+r0gw/trsc4F2OTvH2Zk6E6WILYK9bWl8SLnGLpa04nS+sJZNDwbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637736111; a=rsa-sha256; cv=none; b=UIfwhPaW/96NTBF+xAjxK+DTOhrIrggpuJAzAjj/7G3OVJq44Gq6kv9y7bPSS++VZdjNeC 2bDA4ta9xFiGWbNCseeMzFRvGp4Ji4PJg7TpGa3j5OYcPnFyRaP044By7qk+GAqL5Msf+q hk+57aqlK12llsoHcpQLmkNulcaoYQeHWzQfIFsenAiY3/2C4BU9rlnVB1HzJbiLCc3NJH 8SVfNRTthkW75Q/WTUzsCxG4oRWQ2MTKZh2+E2q02v8VhKpj6rhvOEWjJHfb5RRSBisTsR 7YAvF6gG2yVPU0iVC7jwdd+SXoL28sEukaUexrH6zhlmWIqjxSwCQcXosJavXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=9174eab4142c5ed199b1599c1a3eefd5f0573ab7 commit 9174eab4142c5ed199b1599c1a3eefd5f0573ab7 Author: Kornel Duleba AuthorDate: 2021-11-15 08:55:33 +0000 Commit: Wojciech Macek CommitDate: 2021-11-24 06:40:36 +0000 miibus: Add support for mapping OFW nodes to PHY devices Create a new miibus OFW specific layer leveraging miibus_fdt.c code. PHY drivers can than read the properties using device_get_property(9) API. Resource(interrupt) allocation is also supported. In order to enable this each NIC/switch driver will have to be modified, because of how miibus is attached to the parent driver. Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D32812 --- sys/dev/mii/mii.c | 10 +--- sys/dev/mii/mii_fdt.c | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/mii/miivar.h | 23 ++++++++- 3 files changed, 155 insertions(+), 9 deletions(-) diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index 5163a7456ed0..f5f791171a53 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -60,7 +60,6 @@ MODULE_VERSION(miibus, 1); #include "miibus_if.h" -static device_attach_t miibus_attach; static bus_child_detached_t miibus_child_detached; static bus_child_location_t miibus_child_location; static bus_child_pnpinfo_t miibus_child_pnpinfo; @@ -103,12 +102,7 @@ static device_method_t miibus_methods[] = { }; devclass_t miibus_devclass; - -driver_t miibus_driver = { - "miibus", - miibus_methods, - sizeof(struct mii_data) -}; +DEFINE_CLASS_0(miibus, miibus_driver, miibus_methods, sizeof(struct mii_data)); struct miibus_ivars { if_t ifp; @@ -127,7 +121,7 @@ miibus_probe(device_t dev) return (BUS_PROBE_SPECIFIC); } -static int +int miibus_attach(device_t dev) { struct miibus_ivars *ivars; diff --git a/sys/dev/mii/mii_fdt.c b/sys/dev/mii/mii_fdt.c index 18ed9c8e749c..387b02f69504 100644 --- a/sys/dev/mii/mii_fdt.c +++ b/sys/dev/mii/mii_fdt.c @@ -239,3 +239,134 @@ mii_fdt_get_config(device_t phydev) return (cfg); } + +static int +miibus_fdt_probe(device_t dev) +{ + device_t parent; + + parent = device_get_parent(dev); + if (ofw_bus_get_node(parent) == -1) + return (ENXIO); + + device_set_desc(dev, "OFW MII bus"); + return (BUS_PROBE_DEFAULT); +} + +static int +miibus_fdt_attach(device_t dev) +{ + struct mii_attach_args *ma; + struct mii_data *sc; + int i, error, nchildren; + device_t parent, *children; + phandle_t phy_node; + + parent = device_get_parent(dev); + sc = device_get_softc(dev); + + error = device_get_children(dev, &children, &nchildren); + if (error != 0 || nchildren == 0) + return (ENXIO); + + for (i = 0; i < nchildren; i++) { + ma = device_get_ivars(children[i]); + bzero(&ma->obd, sizeof(ma->obd)); + phy_node = mii_fdt_lookup_phy(ofw_bus_get_node(parent), + ma->mii_phyno); + if (phy_node == -1) { + device_printf(dev, + "Warning: failed to find OFW node for PHY%d\n", + ma->mii_phyno); + continue; + } + error = ofw_bus_gen_setup_devinfo(&ma->obd, phy_node); + if (error != 0) { + device_printf(dev, + "Warning: failed to setup OFW devinfo for PHY%d\n", + ma->mii_phyno); + continue; + } + /* + * Setup interrupt resources. + * Only a handful of PHYs support those, + * so it's fine if we fail here. + */ + resource_list_init(&ma->rl); + (void)ofw_bus_intr_to_rl(children[i], phy_node, &ma->rl, NULL); + } + + free(children, M_TEMP); + return (miibus_attach(dev)); +} + +static struct resource_list * +miibus_fdt_get_resource_list(device_t bus, device_t child) +{ + struct mii_attach_args *ma; + + ma = device_get_ivars(child); + + if (ma->obd.obd_node == 0) + return (NULL); + + return (&ma->rl); +} + +static const struct ofw_bus_devinfo* +miibus_fdt_get_devinfo(device_t bus, device_t child) +{ + struct mii_attach_args *ma; + + ma = device_get_ivars(child); + + if (ma->obd.obd_node == 0) + return (NULL); + + return (&ma->obd); +} + +static ssize_t +miibus_fdt_get_property(device_t bus, device_t child, const char *propname, + void *buf, size_t size) +{ + struct mii_attach_args *ma; + + ma = device_get_ivars(child); + + if (ma->obd.obd_node == 0) + return (-1); + + return (OF_getencprop(ma->obd.obd_node, propname, buf, size)); +} + +static device_method_t miibus_fdt_methods[] = { + DEVMETHOD(device_probe, miibus_fdt_probe), + DEVMETHOD(device_attach, miibus_fdt_attach), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_devinfo, miibus_fdt_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), + DEVMETHOD(bus_get_resource_list, miibus_fdt_get_resource_list), + DEVMETHOD(bus_get_property, miibus_fdt_get_property), + + DEVMETHOD_END +}; + +devclass_t miibus_fdt_devclass; +DEFINE_CLASS_1(miibus, miibus_fdt_driver, miibus_fdt_methods, + sizeof(struct mii_data), miibus_driver); diff --git a/sys/dev/mii/miivar.h b/sys/dev/mii/miivar.h index cf8032f1eb53..95cfb866b5f7 100644 --- a/sys/dev/mii/miivar.h +++ b/sys/dev/mii/miivar.h @@ -40,6 +40,14 @@ #include #include /* XXX driver API temporary */ +#include "opt_platform.h" + +#ifdef FDT +#include +#include +#include +#endif + /* * Media Independent Interface data structure defintions */ @@ -206,6 +214,11 @@ struct mii_attach_args { uint32_t mii_id1; /* PHY ID register 1 */ uint32_t mii_id2; /* PHY ID register 2 */ u_int mii_capmask; /* capability mask for BMSR */ +#ifdef FDT + struct ofw_bus_devinfo obd; + struct resource_list rl; +#endif + }; typedef struct mii_attach_args mii_attach_args_t; @@ -251,7 +264,13 @@ enum miibus_device_ivars { MIIBUS_ACCESSOR(flags, FLAGS, u_int) extern devclass_t miibus_devclass; -extern driver_t miibus_driver; +DECLARE_CLASS(miibus_driver); + +#ifdef FDT +extern devclass_t miibus_fdt_devclass; +DECLARE_CLASS(miibus_fdt_driver); +#endif + int mii_attach(device_t, device_t *, if_t, ifm_change_cb_t, ifm_stat_cb_t, int, int, int, int); @@ -280,6 +299,8 @@ int mii_phy_dev_probe(device_t dev, const struct mii_phydesc *mpd, int mrv); void mii_phy_dev_attach(device_t dev, u_int flags, const struct mii_phy_funcs *mpf, int add_media); +device_attach_t miibus_attach; + void ukphy_status(struct mii_softc *); u_int mii_oui(u_int, u_int); From nobody Wed Nov 24 06:41:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D67B618AB6E9; Wed, 24 Nov 2021 06:41: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 4HzWdD0qz4z4kdW; Wed, 24 Nov 2021 06:41:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DBA8925279; Wed, 24 Nov 2021 06:41: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 1AO6fpVK037078; Wed, 24 Nov 2021 06:41:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO6fpNV037077; Wed, 24 Nov 2021 06:41:51 GMT (envelope-from git) Date: Wed, 24 Nov 2021 06:41:51 GMT Message-Id: <202111240641.1AO6fpNV037077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: e85c94b8d6ca - main - Introduce DP83867 PHY 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: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e85c94b8d6ca6b9112738fe7534032c10b57a10d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637736112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yNW2mXmeMmdpXpWK4b5Ni3VGpyKRRTx1Qe8SBDTcklc=; b=rNXevDJfEsbQvmyimL+OZFJzbCaS6NAMBZMXXghoD61ND2KMlgAXeEoAzyoDLUBqSqunon yggKYCxRfybmADL4nYV4U8W/A9IYnPa3RvweoWTqi027G1Pc2oi8ZOdBdw5QhvH9keE7VD a8QMaWZmJlSDZvrg1qrabNJdN3CyYjFD6SOIrGJ9csGTNFrFasJL2OehhCAu3ivTAxiReQ JkqinIFSUdtXz+ilcl4VVkFLAntDuBCCPsPlXqq8FdX39jcHEQ229cxBh08KdRWzD5TyBt s1sVxmg2eUtHiBiiqGkI+OWkP7/cmjRZom+XScukGDs5NfMYN4QhYLxAxrP1Sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637736112; a=rsa-sha256; cv=none; b=ebm38dpgHdH7rxXcpm9xM8TL1Cbnu+FinWmBwqU1mwLgIwyecJblOAUW4iM2/CbmIzTySv ALGjxOXpCs8cx/j6kfqXguDvIBdsYDpAg6pu5BgTqQYj6YCdxO68UeKiy4767tfqDfoIx3 dR8ilqIAb63D/sEgE9VSdFDuA5CaPLFOoFojKDJQgHyRl4+VqJvVdcp1/fGvWC2KTy8Isj 9xd9VanNLZUP9l7a6lWArwXzWIJ2YE0FfImGW6Fd9O2vNqIbcNiPsmpinDj4vTgP9gCRB2 wrGrZuDYKxFHdE/GiRg4JuaDwIdEi8JZbNlvAimnE7Xa/99SzLTMmgWdRGAhRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=e85c94b8d6ca6b9112738fe7534032c10b57a10d commit e85c94b8d6ca6b9112738fe7534032c10b57a10d Author: Kornel Duleba AuthorDate: 2021-11-15 08:57:45 +0000 Commit: Wojciech Macek CommitDate: 2021-11-24 06:40:36 +0000 Introduce DP83867 PHY driver DP83867 is a 10/100/1000 Texas Instruments PHY. Only SGMII mode is supported. Link status changes can be checked through an interrupt generated by the PHY, if available Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D32813 --- sys/conf/files | 1 + sys/dev/mii/dp83867phy.c | 294 +++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/mii/miidevs | 2 + 3 files changed, 297 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index fdf133068ad3..33a5bf2e264b 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2417,6 +2417,7 @@ dev/mii/axphy.c optional miibus | axphy dev/mii/bmtphy.c optional miibus | bmtphy dev/mii/brgphy.c optional miibus | brgphy dev/mii/ciphy.c optional miibus | ciphy +dev/mii/dp83867phy.c optional miibus | dp83867phy dev/mii/e1000phy.c optional miibus | e1000phy dev/mii/gentbi.c optional miibus | gentbi dev/mii/icsphy.c optional miibus | icsphy diff --git a/sys/dev/mii/dp83867phy.c b/sys/dev/mii/dp83867phy.c new file mode 100644 index 000000000000..1a34554036e1 --- /dev/null +++ b/sys/dev/mii/dp83867phy.c @@ -0,0 +1,294 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Alstom Group. + * Copyright (c) 2021 Semihalf. + * + * 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. + */ + +/* + * Driver for TI DP83867 Ethernet PHY + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include + +#include "miidevs.h" +#include "miibus_if.h" + +#define BIT(x) (1 << (x)) + +#define DP83867_PHYCR 0x10 +#define DP83867_PHYSTS 0x11 +#define DP83867_MICR 0x12 +#define DP83867_ISR 0x13 +#define DP83867_CFG3 0x1E +#define DP83867_CTRL 0x1F +#define DP83867_CFG4 0x31 +#define DP83867_RGMIICTL 0x32 +#define DP83867_STRP_STS1 0x6E +#define DP83867_STRP_STS2 0x6F + +#define DP83867_PHYSTS_LINK_UP BIT(10) +#define DP83867_PHYSTS_ANEG_PENDING BIT(11) +#define DP83867_PHYSTS_FD BIT(13) +#define DP83867_PHYSTS_SPEED_MASK (BIT(15) | BIT(14)) +#define DP83867_PHYSTS_SPEED_1000 BIT(15) +#define DP83867_PHYSTS_SPEED_100 BIT(14) +#define DP83867_PHYSTS_SPEED_10 0 + +#define DP83867_MICR_AN_ERR BIT(15) +#define DP83867_MICR_SPEED_CHG BIT(14) +#define DP83867_MICR_DP_MODE_CHG BIT(13) +#define DP83867_MICR_AN_CMPL BIT(11) +#define DP83867_MICR_LINK_CHG BIT(10) + +#define DP83867_CFG3_INT_OE BIT(7) + +#define DP83867_CFG4_TST_MODE1 BIT(7) +#define DP83867_CFG4_ANEG_MASK (BIT(5) | BIT(6)) +#define DP83867_CFG4_ANEG_16MS (0 << 5) + +#define BMSR_100_MASK (BMSR_100T4 | BMSR_100TXFDX | BMSR_100TXHDX | \ + BMSR_100T2FDX | BMSR_100T2HDX) + +static int dp_probe(device_t); +static int dp_attach(device_t); + +static int dp_service(struct mii_softc*, struct mii_data*, int); +static void dp_status(struct mii_softc*); + +struct dp83867_softc { + struct mii_softc mii_sc; + struct resource *irq_res; + void *irq_cookie; +}; + +static const struct mii_phydesc dpphys[] = { + MII_PHY_DESC(xxTI, DP83867) +}; + +static const struct mii_phy_funcs dpphy_funcs = { + dp_service, + dp_status, + mii_phy_reset +}; + +static void +dp_intr(void *arg) +{ + struct mii_softc *sc = (struct mii_softc *)arg; + uint32_t status; + + status = PHY_READ(sc, DP83867_ISR); + status &= PHY_READ(sc, DP83867_MICR); + if (!status) + return; + + PHY_STATUS(sc); + mii_phy_update(sc, MII_MEDIACHG); +} + +static int +dp_probe(device_t dev) +{ + + return (mii_phy_dev_probe(dev, dpphys, BUS_PROBE_DEFAULT)); +} + +static int +dp_attach(device_t dev) +{ + struct dp83867_softc *sc; + struct mii_softc *mii_sc; + uint32_t value, maxspeed; + ssize_t size; + int rid, error; + + sc = device_get_softc(dev); + mii_sc = &sc->mii_sc; + + size = device_get_property(dev, "max-speed", &maxspeed, sizeof(maxspeed)); + if (size <= 0) + maxspeed = 0; + + mii_sc->mii_maxspeed = maxspeed; + mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &dpphy_funcs, 1); + + rid = 0; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); + if (sc->irq_res == NULL) + goto no_irq; + + error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE, + NULL, dp_intr, sc, &sc->irq_cookie); + if (error != 0) { + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); + sc->irq_res = NULL; + goto no_irq; + } + + /* Ack and unmask all relevant interrupts. */ + (void)PHY_READ(mii_sc, DP83867_ISR); + value = DP83867_MICR_AN_ERR | + DP83867_MICR_SPEED_CHG | + DP83867_MICR_DP_MODE_CHG | + DP83867_MICR_AN_CMPL | + DP83867_MICR_LINK_CHG; + PHY_WRITE(mii_sc, DP83867_MICR, value); + + value = PHY_READ(mii_sc, DP83867_CFG3); + value |= DP83867_CFG3_INT_OE; + PHY_WRITE(mii_sc, DP83867_CFG3, value); + +no_irq: + /* Set autonegotation timeout to max possible value. */ + value = PHY_READ(mii_sc, DP83867_CFG4); + value &= ~DP83867_CFG4_ANEG_MASK; + value &= ~DP83867_CFG4_TST_MODE1; + value |= DP83867_CFG4_ANEG_16MS; + PHY_WRITE(mii_sc, DP83867_CFG4, value); + + return (0); +} + +static int +dp_detach(device_t dev) +{ + struct dp83867_softc *sc; + + sc = device_get_softc(dev); + + bus_teardown_intr(dev, sc->irq_res, sc->irq_cookie); + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); + + return (mii_phy_detach(dev)); +} + +static int +dp_service(struct mii_softc *sc, struct mii_data *mii, int cmd) +{ + + switch (cmd) { + case MII_POLLSTAT: + break; + case MII_MEDIACHG: + mii_phy_setmedia(sc); + break; + case MII_TICK: + if (mii_phy_tick(sc) == EJUSTRETURN) + return (0); + + break; + } + + PHY_STATUS(sc); + mii_phy_update(sc, cmd); + return (0); +} + +static void +dp_status(struct mii_softc *sc) +{ + struct mii_data *mii; + int bmsr, bmcr, physts; + + mii = sc->mii_pdata; + mii->mii_media_status = IFM_AVALID; + mii->mii_media_active = IFM_ETHER; + + bmsr = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); + physts = PHY_READ(sc, DP83867_PHYSTS); + + if ((bmsr & BMSR_LINK) && (physts & DP83867_PHYSTS_LINK_UP)) + mii->mii_media_status |= IFM_ACTIVE; + + bmcr = PHY_READ(sc, MII_BMCR); + if (bmcr & BMCR_ISO) { + mii->mii_media_active |= IFM_NONE; + mii->mii_media_status = 0; + return; + } + + if (bmcr & BMCR_LOOP) + mii->mii_media_active |= IFM_LOOP; + + /* Autoneg in progress. */ + if (!(physts & DP83867_PHYSTS_ANEG_PENDING)) { + mii->mii_media_active |= IFM_NONE; + return; + } + + switch (physts & DP83867_PHYSTS_SPEED_MASK) { + case DP83867_PHYSTS_SPEED_1000: + mii->mii_media_active |= IFM_1000_T; + break; + case DP83867_PHYSTS_SPEED_100: + mii->mii_media_active |= IFM_100_TX; + break; + case DP83867_PHYSTS_SPEED_10: + mii->mii_media_active |= IFM_10_T; + break; + default: + mii->mii_media_active |= IFM_NONE; + break; + } + if (physts & DP83867_PHYSTS_FD) + mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; + +} + +static device_method_t dp_methods[] = { + DEVMETHOD(device_probe, dp_probe), + DEVMETHOD(device_attach, dp_attach), + DEVMETHOD(device_detach, dp_detach), + DEVMETHOD_END +}; + +static devclass_t dp_devclass; + +static driver_t dp_driver = { + "dp83867phy", + dp_methods, + sizeof(struct dp83867_softc) +}; + +DRIVER_MODULE(dp83867phy, miibus, dp_driver, dp_devclass, 0, 0); diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs index 259718303ee5..446b0827997c 100644 --- a/sys/dev/mii/miidevs +++ b/sys/dev/mii/miidevs @@ -110,6 +110,7 @@ oui xxPMCSIERRA 0x0009c0 PMC-Sierra oui xxPMCSIERRA2 0x009057 PMC-Sierra oui xxREALTEK 0x000732 RealTek Semicondctor oui yyREALTEK 0x000004 RealTek Semicondctor +oui xxTI 0x100014 Texas Instruments /* * List of known models. Grouped by oui. @@ -335,6 +336,7 @@ model SIS 900 0x0000 SiS 900 10/100 media interface model TI TLAN10T 0x0001 ThunderLAN 10BASE-T media interface model TI 100VGPMI 0x0002 ThunderLAN 100VG-AnyLan media interface model TI TNETE2101 0x0003 TNETE2101 media interface +model xxTI DP83867 0x0023 High Immunity 10/100/1000 PHY /* TDK Semiconductor PHYs */ model xxTSC 78Q2120 0x0014 78Q2120 10/100 media interface From nobody Wed Nov 24 06:41:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1356218ABA50; Wed, 24 Nov 2021 06: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 4HzWdF236Mz4kpV; Wed, 24 Nov 2021 06:41:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 10DDB2527B; Wed, 24 Nov 2021 06:41: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 1AO6fqH8037102; Wed, 24 Nov 2021 06:41:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO6fqqN037101; Wed, 24 Nov 2021 06:41:52 GMT (envelope-from git) Date: Wed, 24 Nov 2021 06:41:52 GMT Message-Id: <202111240641.1AO6fqqN037101@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 0c9156faeccb - main - Introduce DP83822 PHY 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: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c9156faeccba0b8cbedfe976a1274b56caa1dbc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637736113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vfKGLRw2q2pxMapTdsXpd1hy4+ejVXPw8doMkOe88ik=; b=MBA1sudDLwSMcWeGLEzA4EC245nI3voh+y61IOHAzuiXP970CejmanritoeFJVuwJOMQPM Qw1J55YgWJos+Wc7VF6mkmCy0pP7oS+/DOcJm5U5QqhqgK9yFP2obufq2BdUwde1D1ESIn 6iaCs2o9RG6+9CYrUNPO7QKYffDG43FnYSoHxFyiXg/ihx4RFw2KU5ma71gbIv560n0oZf m95WxlB0DeFO3981VJphB/bf4Bmm6FjkipOM+qHpL67pYjspy3Rkc1QWK31l6AxefSC8Fw vclk8JGxahdfLcIfiYCANdfTztlkg6t3DkjBlpjNGDON5sz8+h7dUsMMzhgLuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637736113; a=rsa-sha256; cv=none; b=hhQfPOxVYEoqDhJg1MGmbv8oA5wSgUDl2qdJPnVNJ95GK3ydsUZtmg/eJDaliFFV6nrlGw 7qa0xmVREZMfP6tWHkmYlVEiqVO7eBh6Ex97yBofeu8YVTP+VWLm5dpAKP5IH6uN7aDhfl 15Ks6Nl0QK6XC7kbb2zrw7XA0FTVbRWB/KbcuKicodyBUpZu1OI1KGOoY370ChdtDtsaRk KzFCuigy49oosaDcUxnS2zhKo+Pt7IM8Fd7cLUWaT5gQWHZGhUEXvy87YT8prhzOPYCpdy 0KX39qCb8avx9tTeGnGskK9zemf80fwoIr7qI4Cw3gCzoO6f4RUTph5GE2oC9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=0c9156faeccba0b8cbedfe976a1274b56caa1dbc commit 0c9156faeccba0b8cbedfe976a1274b56caa1dbc Author: Kornel Duleba AuthorDate: 2021-11-15 08:58:59 +0000 Commit: Wojciech Macek CommitDate: 2021-11-24 06:40:36 +0000 Introduce DP83822 PHY driver DP83822 is a 10/100 Texas Instruments PHY. Link status change interrupts are supported by the driver, however not all boards have the PHY interrupt wired. Because of that if failure to allocate an IRQ is not treated as an error. Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D32815 --- sys/conf/files | 1 + sys/dev/mii/dp83822phy.c | 220 +++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/mii/miidevs | 1 + 3 files changed, 222 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index 33a5bf2e264b..6f0e321efe79 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2417,6 +2417,7 @@ dev/mii/axphy.c optional miibus | axphy dev/mii/bmtphy.c optional miibus | bmtphy dev/mii/brgphy.c optional miibus | brgphy dev/mii/ciphy.c optional miibus | ciphy +dev/mii/dp83822phy.c optional miibus | dp83822phy dev/mii/dp83867phy.c optional miibus | dp83867phy dev/mii/e1000phy.c optional miibus | e1000phy dev/mii/gentbi.c optional miibus | gentbi diff --git a/sys/dev/mii/dp83822phy.c b/sys/dev/mii/dp83822phy.c new file mode 100644 index 000000000000..181fc610be76 --- /dev/null +++ b/sys/dev/mii/dp83822phy.c @@ -0,0 +1,220 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Alstom Group. + * Copyright (c) 2021 Semihalf. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Driver for TI DP83822 Ethernet PHY + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include + +#include "miidevs.h" +#include "miibus_if.h" + +#define BIT(x) (1 << (x)) + +#define DP83822_PHYSTS 0x10 +#define DP83822_PHYSTS_LINK_UP BIT(0) +#define DP83822_PHYSTS_SPEED_100 BIT(1) +#define DP83822_PHYSTS_FD BIT(2) + +#define DP83822_PHYSCR 0x11 +#define DP83822_PHYSCR_INT_OE BIT(0) /* Behaviour of INT pin. */ +#define DP83822_PHYSCR_INT_EN BIT(1) + +#define DP83822_MISR1 0x12 +#define DP83822_MISR1_AN_CMPL_EN BIT(2) +#define DP83822_MISR1_DP_CHG_EN BIT(3) +#define DP83822_MISR1_SPD_CHG_EN BIT(4) +#define DP83822_MISR1_LINK_CHG_EN BIT(5) +#define DP83822_MISR1_INT_MASK 0xFF +#define DP83822_MISR1_INT_STS_SHIFT 8 + +#define DP83822_MISR2 0x13 +#define DP83822_MISR2_AN_ERR_EN BIT(6) +#define DP83822_MISR2_INT_MASK 0xFF +#define DP83822_MISR2_INT_STS_SHIFT 8 + +static int dp_service(struct mii_softc*, struct mii_data*, int); +static void dp_status(struct mii_softc*); + +struct dp83822_softc { + struct mii_softc mii_sc; + struct resource *irq_res; + void *irq_cookie; +}; + +static const struct mii_phydesc dpphys[] = { + MII_PHY_DESC(xxTI, DP83822) +}; + +static const struct mii_phy_funcs dpphy_funcs = { + dp_service, + ukphy_status, + mii_phy_reset +}; + +static void +dp_intr(void *arg) +{ + struct mii_softc *sc = (struct mii_softc *)arg; + uint32_t status; + + status = PHY_READ(sc, DP83822_MISR1); + + if (!((status >> DP83822_MISR1_INT_STS_SHIFT) & + (status & DP83822_MISR1_INT_MASK))) + return; + + PHY_STATUS(sc); + mii_phy_update(sc, MII_MEDIACHG); +} + +static int +dp_probe(device_t dev) +{ + + return (mii_phy_dev_probe(dev, dpphys, BUS_PROBE_DEFAULT)); +} + +static int +dp_attach(device_t dev) +{ + struct dp83822_softc *sc; + struct mii_softc *mii_sc; + uint32_t value; + int error, rid; + + sc = device_get_softc(dev); + mii_sc = &sc->mii_sc; + mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &dpphy_funcs, 1); + + PHY_RESET(mii_sc); + + rid = 0; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); + if (sc->irq_res == NULL) + goto no_irq; + + error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE, + NULL, dp_intr, sc, &sc->irq_cookie); + if (error != 0) { + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); + sc->irq_res = NULL; + goto no_irq; + } + + /* + * ACK and unmask all relevant interrupts. + * We have a single register that serves the purpose + * of both interrupt status and mask. + * Interrupts are cleared on read. + */ + (void)PHY_READ(mii_sc, DP83822_MISR1); + value = DP83822_MISR1_AN_CMPL_EN | + DP83822_MISR1_DP_CHG_EN | + DP83822_MISR1_SPD_CHG_EN | + DP83822_MISR1_LINK_CHG_EN; + PHY_WRITE(mii_sc, DP83822_MISR1, value); + value = PHY_READ(mii_sc, DP83822_PHYSCR); + value |= DP83822_PHYSCR_INT_OE | + DP83822_PHYSCR_INT_EN; + PHY_WRITE(mii_sc, DP83822_PHYSCR, value); + +no_irq: + return (0); +} + +static int +dp_detach(device_t dev) +{ + struct dp83822_softc *sc; + + sc = device_get_softc(dev); + + bus_teardown_intr(dev, sc->irq_res, sc->irq_cookie); + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); + + return (mii_phy_detach(dev)); +} + +static int +dp_service(struct mii_softc *sc, struct mii_data *mii, int cmd) +{ + + switch (cmd) { + case MII_POLLSTAT: + break; + case MII_MEDIACHG: + mii_phy_setmedia(sc); + break; + case MII_TICK: + if (mii_phy_tick(sc) == EJUSTRETURN) + return (0); + + break; + } + + PHY_STATUS(sc); + mii_phy_update(sc, cmd); + return (0); +} + +static device_method_t dp_methods[] = { + DEVMETHOD(device_probe, dp_probe), + DEVMETHOD(device_attach, dp_attach), + DEVMETHOD(device_detach, dp_detach), + DEVMETHOD_END +}; + +static devclass_t dp_devclass; + +static driver_t dp_driver = { + "dp83822phy", + dp_methods, + sizeof(struct dp83822_softc) +}; + +DRIVER_MODULE(dp83822phy, miibus, dp_driver, dp_devclass, 0, 0); diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs index 446b0827997c..b2b446637b2e 100644 --- a/sys/dev/mii/miidevs +++ b/sys/dev/mii/miidevs @@ -337,6 +337,7 @@ model TI TLAN10T 0x0001 ThunderLAN 10BASE-T media interface model TI 100VGPMI 0x0002 ThunderLAN 100VG-AnyLan media interface model TI TNETE2101 0x0003 TNETE2101 media interface model xxTI DP83867 0x0023 High Immunity 10/100/1000 PHY +model xxTI DP83822 0x0024 High Immunity 10/100 PHY /* TDK Semiconductor PHYs */ model xxTSC 78Q2120 0x0014 78Q2120 10/100 media interface From nobody Wed Nov 24 06:41:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8946E18ABB34; Wed, 24 Nov 2021 06:41: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 4HzWdJ25Snz4kpl; Wed, 24 Nov 2021 06:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E58824D6D; Wed, 24 Nov 2021 06:41: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 1AO6fssB037126; Wed, 24 Nov 2021 06:41:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO6fsNW037125; Wed, 24 Nov 2021 06:41:54 GMT (envelope-from git) Date: Wed, 24 Nov 2021 06:41:54 GMT Message-Id: <202111240641.1AO6fsNW037125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 89595c17915a - main - vscphy: Add support for PHY interrupts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89595c17915a11779de050b05ee7a5da09fc7f97 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637736116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e3paHnI6F+mof6HiQu9nzk19L+YDaUkspNMC02ZlPSI=; b=JwhmnxxfrxUFhMju75fjBIm9A+Ocl80vqZl6WA3T9sl9qWGge79Yz9id+LdsxM87QdSYza kJFFKG9pS//IokDkQ1oqiE2ARycQTi7iZfOATgVBb6COUFHgiRtq6fcaJUt2Yj4BkHbsOU kON9n/H7SW8GcfVU+4pN61LTZqCeOEIu1uqCgvlkEYBbotz2pjPK96q0C9htcKWKHPjvla IFbErh1/8rqGkjTYPiFr8d2G1i/bVHBuhs0Nn3lX4JfRiaobCcE9JF2MV3tmElLpxxUkaf TQgzm7bB2mpLO+g6MANJdvWBX/agNHwQx21Ffx9nG66QzVg3mtrPsDwnLgSaQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637736116; a=rsa-sha256; cv=none; b=eEmO2QiD+Cql/8HPKqOddR6mcF2dRdFq+pkD8OAKhVbtmbVHrHYJ0In1OiGBHOXF/fFpxn af2Tiynbs9W8DO0B2tguoxVBXpT+GVlTJG0CCHpJHWaY/nR9cbS/SHlv67ZaXGIHNlNXeZ fgjEuM0A66XZdsAyPU+TCeX67uJ/6D3AjDl1EpYFuqlpIzpc1d1y+ksMbazUxcfw8OOBdF 8v0LD5KAUkTG6SDjs0yW4X6v9WEbi6WRtbxlc1CE3LxyRreOnnPcpU1wfTXvjMWJ62N/Aq OEPTrmzobGzuj7tmCIXay9dgvbXzi0YzQDUyi+iLPL1MXb6aFVWqQGXA9c42TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=89595c17915a11779de050b05ee7a5da09fc7f97 commit 89595c17915a11779de050b05ee7a5da09fc7f97 Author: Kornel Duleba AuthorDate: 2021-11-15 09:00:07 +0000 Commit: Wojciech Macek CommitDate: 2021-11-24 06:40:37 +0000 vscphy: Add support for PHY interrupts They're allocated using standard newbus API, which means that we rely on miibus to handle the allocation. Add VSC8504 to the list of supported PHYs, as it is similar enough to the VSC8501 that is already supported by this driver. Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D32816 --- sys/dev/mii/miidevs | 1 + sys/dev/mii/vscphy.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs index b2b446637b2e..0b818c2e6e2b 100644 --- a/sys/dev/mii/miidevs +++ b/sys/dev/mii/miidevs @@ -345,6 +345,7 @@ model xxTSC 78Q2121 0x0015 78Q2121 100BASE-TX media interface /* Vitesse Semiconductor (now Microsemi) */ model xxVITESSE VSC8501 0x0013 Vitesse VSC8501 10/100/1000TX PHY +model xxVITESSE VSC8504 0x000c Vitesse VSC8504 10/100/1000TX PHY model xxVITESSE VSC8641 0x0003 Vitesse VSC8641 10/100/1000TX PHY /* XaQti Corp. PHYs */ diff --git a/sys/dev/mii/vscphy.c b/sys/dev/mii/vscphy.c index be90145e6299..b91cb408dae7 100644 --- a/sys/dev/mii/vscphy.c +++ b/sys/dev/mii/vscphy.c @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -59,12 +61,23 @@ __FBSDID("$FreeBSD$"); #include #endif +#define BIT(x) (1 << (x)) + /* Vitesse VSC8501 */ #define VSC8501_EXTPAGE_REG 0x001f #define VSC8501_EXTCTL1_REG 0x0017 #define VSC8501_EXTCTL1_RGMII_MODE (1u << 12) +#define VSC8501_INT_MASK 0x19 +#define VSC8501_INT_MDINT BIT(15) +#define VSC8501_INT_SPD_CHG BIT(14) +#define VSC8501_INT_LINK_CHG BIT(13) +#define VSC8501_INT_FD_CHG BIT(12) +#define VSC8501_INT_AN_CMPL BIT(10) + +#define VSC8501_INT_STS 0x1a + #define VSC8501_RGMII_CTRL_PAGE 0x02 #define VSC8501_RGMII_CTRL_REG 0x14 #define VSC8501_RGMII_DELAY_MASK 0x07 @@ -83,6 +96,8 @@ struct vscphy_softc { int rxdelay; int txdelay; bool laneswap; + struct resource *irq_res; + void *irq_cookie; }; static void vscphy_reset(struct mii_softc *); @@ -90,6 +105,7 @@ static int vscphy_service(struct mii_softc *, struct mii_data *, int); static const struct mii_phydesc vscphys[] = { MII_PHY_DESC(xxVITESSE, VSC8501), + MII_PHY_DESC(xxVITESSE, VSC8504), MII_PHY_END }; @@ -235,10 +251,30 @@ vscphy_probe(device_t dev) return (mii_phy_dev_probe(dev, vscphys, BUS_PROBE_DEFAULT)); } +static void +vscphy_intr(void *arg) +{ + struct vscphy_softc *vsc; + uint32_t status; + + vsc = (struct vscphy_softc *)arg; + + status = vscphy_read(vsc, VSC8501_INT_STS); + status &= vscphy_read(vsc, VSC8501_INT_MASK); + + if (!status) + return; + + PHY_STATUS(&vsc->mii_sc); + mii_phy_update(&vsc->mii_sc, MII_MEDIACHG); +} + static int vscphy_attach(device_t dev) { struct vscphy_softc *vsc; + uint32_t value; + int rid, error; vsc = device_get_softc(dev); vsc->dev = dev; @@ -250,14 +286,51 @@ vscphy_attach(device_t dev) mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &vscphy_funcs, 1); mii_phy_setmedia(&vsc->mii_sc); + rid = 0; + vsc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE | RF_SHAREABLE); + if (vsc->irq_res == NULL) + goto no_irq; + + error = bus_setup_intr(dev, vsc->irq_res, INTR_TYPE_NET | INTR_MPSAFE, + NULL, vscphy_intr, vsc, &vsc->irq_cookie); + if (error != 0) { + bus_release_resource(dev, SYS_RES_IRQ, 0, vsc->irq_res); + vsc->irq_res = NULL; + goto no_irq; + } + + /* Ack and unmask all relevant interrupts. */ + (void)vscphy_read(vsc, VSC8501_INT_STS); + value = VSC8501_INT_MDINT | + VSC8501_INT_SPD_CHG | + VSC8501_INT_LINK_CHG | + VSC8501_INT_FD_CHG | + VSC8501_INT_AN_CMPL; + vscphy_write(vsc, VSC8501_INT_MASK, value); + +no_irq: return (0); } +static int +vscphy_detach(device_t dev) +{ + struct vscphy_softc *vsc; + + vsc = device_get_softc(dev); + + bus_teardown_intr(dev, vsc->irq_res, vsc->irq_cookie); + bus_release_resource(dev, SYS_RES_IRQ, 0, vsc->irq_res); + + return (mii_phy_detach(dev)); +} + static device_method_t vscphy_methods[] = { /* device interface */ DEVMETHOD(device_probe, vscphy_probe), DEVMETHOD(device_attach, vscphy_attach), - DEVMETHOD(device_detach, mii_phy_detach), + DEVMETHOD(device_detach, vscphy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD_END }; From nobody Wed Nov 24 06:41:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B591E18ABA73; Wed, 24 Nov 2021 06:41: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 4HzWdJ3hhvz4kxC; Wed, 24 Nov 2021 06:41:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DF5D2527D; Wed, 24 Nov 2021 06: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 1AO6ftvK037150; Wed, 24 Nov 2021 06: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 1AO6ft9G037149; Wed, 24 Nov 2021 06:41:55 GMT (envelope-from git) Date: Wed, 24 Nov 2021 06:41:55 GMT Message-Id: <202111240641.1AO6ft9G037149@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 6802a86cb02d - main - enetc: Add support for PHY interrupts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6802a86cb02d32b364f9e0b0e6f7e8b047b1f2c3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637736116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDWtxRMz4KKbLnHY0jOhUbaW9m8wLw1qStoOPHwFlI8=; b=TQaQXIZiJb3PMiBG1Xz7/xOO75PcMlN6ioSrbyuOdNAlllnGYMo5zK2RqDzB+G9VRgoDqg sq4gXDJLD1RGhuKJ9AkGQTmsm0an0Mf7nVKhhbJucfOHkw5XjRom5KIl2MRdCkNC98csv7 ttxZHu5QMiT7mBWYpTxEgcT2/gehd4tVCzFL3QQlbeIikNZLBe6JJCji4OEZ7RAEDLpl7u DCD36OUfBp2HKceMSRYBGfOBrhRIJPmBYDX+3JO0pzZ5KnULveW13vwxkBaSzlUVA2UT+2 5FikObbpvJ05Gj4a4G6QgiOTjzs+ku/EVbTrjYnasz6EPX1cOxBH67dcDZQU1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637736116; a=rsa-sha256; cv=none; b=S7+R2R28tHnto91QqBQsgJpTHqQ/HdR5GtsUf0i/rHwmdDEePz1Y2puTS7Vrgzbt1OtvNR KLiL8UwGfh5qS2ZVmnmX+HW6ioTH4Cyy/TBU9Eb5TsJjYF1bZAY3wTYay+rPbhHUnhgHza x9RWW253Na0Eg3H+/YysAegz/9F1ktJ4XLPVkFoOBwsoCIst8eJQJ78J9CdFf8kQlTQg+U GPq1BQq1IUo1ahL6wO/7+LkgKlghmJnuOEWVnKucmF5o2JQ8hQ9cYf3Xn3tw/KjcOZmWxT s2xdy2aIHHn1XQeuf5ckvbfJgPPUgQ98BfHpJAXX0HT/6zINNnn7InuN0jDnJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=6802a86cb02d32b364f9e0b0e6f7e8b047b1f2c3 commit 6802a86cb02d32b364f9e0b0e6f7e8b047b1f2c3 Author: Kornel Duleba AuthorDate: 2021-10-13 09:35:12 +0000 Commit: Wojciech Macek CommitDate: 2021-11-24 06:40:37 +0000 enetc: Add support for PHY interrupts - Replace miibus with newly created miibus_fdt. - Use generic passthrough resource allocation devmethods. Obtained from: Semihalf Sponsored by: Alstom Group --- sys/dev/enetc/if_enetc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/dev/enetc/if_enetc.c b/sys/dev/enetc/if_enetc.c index 2a72f807acd7..abdb527760f6 100644 --- a/sys/dev/enetc/if_enetc.c +++ b/sys/dev/enetc/if_enetc.c @@ -150,6 +150,14 @@ static device_method_t enetc_methods[] = { DEVMETHOD(miibus_linkchg, enetc_miibus_linkchg), DEVMETHOD(miibus_statchg, enetc_miibus_statchg), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD_END }; @@ -158,7 +166,7 @@ static driver_t enetc_driver = { }; static devclass_t enetc_devclass; -DRIVER_MODULE(miibus, enetc, miibus_driver, miibus_devclass, NULL, NULL); +DRIVER_MODULE(miibus, enetc, miibus_fdt_driver, miibus_fdt_devclass, NULL, NULL); /* Make sure miibus gets procesed first. */ DRIVER_MODULE_ORDERED(enetc, pci, enetc_driver, enetc_devclass, NULL, NULL, SI_ORDER_ANY); From nobody Wed Nov 24 06:41:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DFBA918ABBD4; Wed, 24 Nov 2021 06: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 4HzWdK0PW3z4kkD; Wed, 24 Nov 2021 06:41:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 694202527E; Wed, 24 Nov 2021 06:41: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 1AO6fud5037180; Wed, 24 Nov 2021 06:41:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO6fuuU037179; Wed, 24 Nov 2021 06:41:56 GMT (envelope-from git) Date: Wed, 24 Nov 2021 06:41:56 GMT Message-Id: <202111240641.1AO6fuuU037179@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 0f84feb9fb46 - main - felix: Add support for PHY interrupts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f84feb9fb4678c1ed2c5b12125d60b13977dac5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637736117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RTJDIaZaSJhYi0/j0zzWTV0gjP9ZcsPBO1jBzRxhnSs=; b=RkyVg3upEqkuWuouSIhnTbiWJu3h4G5nLKiCVUIOPJUb3HWhyDbywYElAf+wOs9+NRbxqs 2EnB4bKgIM2tEW/b7KykOudnr1b1oJeryTJy86xLDJKUzkK5NjBVxiuKE9wzt4D9oS5UMl 2uu+/H9g3TEMb7xhGaSNgnFeTa0hWNWBCa0lhIMT0r43CA3IZZg9HTEPxtw7z4wb8n4cH9 eyg89K/StILua6+WZEGRC/EWviWqCks8EivN12AGn8gK0Dlz0Bwve3qfPBlKCo5z2KiDCp Jn5OlyAPVgSUgqdvYd9l5l0cnJqGiX4liegKgDYQvjzTX/6ff9Ftjz9fjwd7Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637736117; a=rsa-sha256; cv=none; b=LYfIRczN6PZWbK3qulIn6JXdhc5GNaqgdRNr3hgM31KUbm8H3zlXX28Uga3UOvVQFKNrVk 7xZRcfC8BI0xDZHAmNdz2/IGCIUkRANw1teIaGCxngn333KBmC77B7aXoh6jg7Qnf2DzmC wcT1sCci2rpVMhOhe0jTund3BKtPboOk8qkH9XirkVoWjulcMnKtWJfN/4XItQklzLR681 pGrf4/MFa4r5jEtlejIRkC5hEE3EfFs7ZFzr3+Eyz+HB6YEqtzxSp7jN84r2hwVfJVp35V Ln2/AOo1SliAAO25sBRZ77q/ZLm4cvtT/+9y0cuC4B3l9kEx5XYJsODLBaqYjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=0f84feb9fb4678c1ed2c5b12125d60b13977dac5 commit 0f84feb9fb4678c1ed2c5b12125d60b13977dac5 Author: Kornel Duleba AuthorDate: 2021-10-26 14:28:19 +0000 Commit: Wojciech Macek CommitDate: 2021-11-24 06:40:37 +0000 felix: Add support for PHY interrupts - Replace miibus with newly created miibus_fdt. - Use generic passthrough resource allocation devmethods. Obtained from: Semihalf Sponsored by: Alstom Group --- sys/dev/etherswitch/felix/felix.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/dev/etherswitch/felix/felix.c b/sys/dev/etherswitch/felix/felix.c index 3ccc4b766877..88a490fc3dab 100644 --- a/sys/dev/etherswitch/felix/felix.c +++ b/sys/dev/etherswitch/felix/felix.c @@ -110,6 +110,13 @@ static device_method_t felix_methods[] = { /* bus interface */ DEVMETHOD(bus_add_child, device_add_child_ordered), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), /* etherswitch interface */ DEVMETHOD(etherswitch_getinfo, felix_getinfo), @@ -139,7 +146,7 @@ DEFINE_CLASS_0(felix, felix_driver, felix_methods, DRIVER_MODULE_ORDERED(felix, pci, felix_driver, felix_devclass, NULL, NULL, SI_ORDER_ANY); -DRIVER_MODULE(miibus, felix, miibus_driver, miibus_devclass, +DRIVER_MODULE(miibus, felix, miibus_fdt_driver, miibus_fdt_devclass, NULL, NULL); DRIVER_MODULE(etherswitch, felix, etherswitch_driver, etherswitch_devclass, NULL, NULL); From nobody Wed Nov 24 06:41:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B5E5A18ABD8C; Wed, 24 Nov 2021 06:41: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 4HzWdL3RpHz4knH; Wed, 24 Nov 2021 06:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B431250DC; Wed, 24 Nov 2021 06:41: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 1AO6fvUR037204; Wed, 24 Nov 2021 06: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 1AO6fvdA037203; Wed, 24 Nov 2021 06:41:57 GMT (envelope-from git) Date: Wed, 24 Nov 2021 06:41:57 GMT Message-Id: <202111240641.1AO6fvdA037203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: cb35af13f9f9 - main - TCA6408: Add driver for tca6408 gpio expander List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb35af13f9f998946adcb08f53ac869864c4d11c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637736119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SnKcd8izOON/+NQUrL81nxgsaXF+1cBrwD65AnDVywE=; b=MqxG4N2TnJrdWdazItodkvNSxoZwrtdmo7EnY4YtAIVeH+aKPkIJjjn4Ts0JevKBCEx8sJ Ho0NLqXLfpaSzkT0S6URCcVbTpsAGq2MRE6YFdTaPbVt3ay5nsHnXKpEgHjDa0RkWG0s1p hVb0Y/fhy+sZEVlGmhs8zT5rL1ZsHpTNXwnKuA6HnbvDFv1onHYrE4Z9+eWMoEM/uTHN7U LnSr5T2XO1EWnHO6ce9dBAQfT6c89XY8fvqB2XnlNpXz9/u8EzzhqvY1W650IfbBpPR0tZ JfUWKktyRd0/mXyjk+Rt2tiRYE57V35zAyns623INYjb2W+kb9eWE5mP3S77Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637736119; a=rsa-sha256; cv=none; b=IGfA0gKkG78E6WNoxk3PM3vM9cFj0Ivc2wclhGodPfIaFvLdZIvm2pfKeYL/Uxbp1IkP4N S3SnQAm9mrh1AnMkqf/BZJiQbt4fmyIK4UcR9QnBMjHP5iwWd9vGtC1N8QxfUJh0LbVPbu BGttm05kDFKg1O0gzDHttoa0VakJhry2j78QI7ach2xPnIEhBOCL/mn8uHRUFYNRzsV6yF GvNPl2B+OzXgOV2AMz7fRHCx9ZMtUZCYGW7Mk1ssL/CDNs7LLAXe2EyiV8Gy+e98ootfen e8d9A49Tb/tyUAotCunO4Yt1fwa1pvVfvCRvdusn9WdPU4/fHijuyz85uJ9hlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=cb35af13f9f998946adcb08f53ac869864c4d11c commit cb35af13f9f998946adcb08f53ac869864c4d11c Author: Hubert Mazur AuthorDate: 2021-10-22 11:51:45 +0000 Commit: Wojciech Macek CommitDate: 2021-11-24 06:40:38 +0000 TCA6408: Add driver for tca6408 gpio expander Driver for tca6408 gpio expander over i2c bus. Expose API for manipulating pin's direction, state and polarity inversion. Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D32819 --- sys/arm64/conf/std.nxp | 1 + sys/conf/files | 1 + sys/dev/iicbus/gpio/tca6408.c | 380 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 382 insertions(+) diff --git a/sys/arm64/conf/std.nxp b/sys/arm64/conf/std.nxp index 05e74fca5170..75e57a6b2386 100644 --- a/sys/arm64/conf/std.nxp +++ b/sys/arm64/conf/std.nxp @@ -8,6 +8,7 @@ options SOC_NXP_LS # I2C device pca9547 # NPX I2C bus multiplexer device pcf8563 # NXP Real-time clock/calendar +device tca6408 # NXP I2C gpio expander # Serial (COM) ports device uart_ns8250 # ns8250-type UART driver diff --git a/sys/conf/files b/sys/conf/files index 6f0e321efe79..56ac8d60db31 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1870,6 +1870,7 @@ dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt dev/iicbus/s35390a.c optional s35390a dev/iicbus/sy8106a.c optional sy8106a ext_resources fdt dev/iicbus/syr827.c optional syr827 ext_resources fdt +dev/iicbus/gpio/tca6408.c optional tca6408 fdt gpio dev/iicbus/gpio/tca6416.c optional tca6416 fdt dev/iicbus/pmic/fan53555.c optional fan53555 ext_resources fdt dev/iir/iir.c optional iir diff --git a/sys/dev/iicbus/gpio/tca6408.c b/sys/dev/iicbus/gpio/tca6408.c new file mode 100644 index 000000000000..d63fa8b64d56 --- /dev/null +++ b/sys/dev/iicbus/gpio/tca6408.c @@ -0,0 +1,380 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Alstom Group. + * Copyright (c) 2021 Semihalf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include + +#define BIT(x) (1UL << (x)) + +#define TCA6408_READ_REG 0x0 +#define TCA6408_WRITE_REG 0x1 +#define TCA6408_POLARITY_REG 0x2 +#define TCA6408_CONFIG_REG 0x3 + +#define PINS_NUM 8 + +#define PIN_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT \ + | GPIO_PIN_INVIN) + +struct tca6408_softc { + device_t dev; + device_t bus_dev; + struct mtx mtx; +}; + +static int tca6408_read1(device_t dev, uint8_t offset, uint8_t *data); +static int tca6408_write1(device_t dev, uint8_t offset, uint8_t data); +static int tca6408_probe(device_t dev); +static int tca6408_attach(device_t dev); +static int tca6408_detach(device_t dev); +static device_t tca6408_get_bus(device_t dev); +static int tca6408_pin_max(device_t dev, int *pin); +static int tca6408_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags); +static int tca6408_pin_setflags(device_t dev, uint32_t pin, uint32_t flags); +static int tca6408_pin_getname(device_t dev, uint32_t pin, char *name); +static int tca6408_pin_get(device_t dev, uint32_t pin, unsigned int *val); +static int tca6408_pin_set(device_t dev, uint32_t pin, unsigned int val); +static int tca6408_pin_toggle(device_t dev, uint32_t pin); +static int tca6408_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps); + +static device_method_t tca6408_methods[] = { + DEVMETHOD(device_probe, tca6408_probe), + DEVMETHOD(device_attach, tca6408_attach), + DEVMETHOD(device_detach, tca6408_detach), + + DEVMETHOD(gpio_get_bus, tca6408_get_bus), + DEVMETHOD(gpio_pin_max, tca6408_pin_max), + DEVMETHOD(gpio_pin_getflags, tca6408_pin_getflags), + DEVMETHOD(gpio_pin_setflags, tca6408_pin_setflags), + DEVMETHOD(gpio_pin_getname, tca6408_pin_getname), + DEVMETHOD(gpio_pin_get, tca6408_pin_get), + DEVMETHOD(gpio_pin_set, tca6408_pin_set), + DEVMETHOD(gpio_pin_toggle, tca6408_pin_toggle), + DEVMETHOD(gpio_pin_getcaps, tca6408_pin_getcaps), + + DEVMETHOD_END +}; + +static driver_t tca6408_driver = { + "gpio", + tca6408_methods, + sizeof(struct tca6408_softc) +}; + +static struct ofw_compat_data tca6408_compat_data[] = { + { "ti,tca6408", 1 }, + { NULL, 0} +}; + +devclass_t tca6408_devclass; + +DRIVER_MODULE(tca6408, iicbus, tca6408_driver, tca6408_devclass, 0, 0); +IICBUS_FDT_PNP_INFO(tca6408_compat_data); + +static int +tca6408_read1(device_t dev, uint8_t offset, uint8_t *data) +{ + int error; + + error = iicdev_readfrom(dev, offset, (void *) data, 1, IIC_WAIT); + if (error != 0) + device_printf(dev, "Failed to read from device\n"); + + return (error); +} + +static int +tca6408_write1(device_t dev, uint8_t offset, uint8_t data) +{ + int error; + + error = iicdev_writeto(dev, offset, (void *) &data, 1, IIC_WAIT); + if (error != 0) + device_printf(dev, "Failed to write to device\n"); + + return (error); +} + +static int +tca6408_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, tca6408_compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "TCA6408 GPIO expander"); + + return (BUS_PROBE_DEFAULT); +} + +static int +tca6408_attach(device_t dev) +{ + struct tca6408_softc *sc; + + sc = device_get_softc(dev); + sc->dev = dev; + + mtx_init(&sc->mtx, "tca6408 gpio", "gpio", MTX_DEF); + + sc->bus_dev = gpiobus_attach_bus(dev); + if (sc->bus_dev == NULL) { + device_printf(dev, "Could not create busdev child\n"); + return (ENXIO); + } + + OF_device_register_xref(OF_xref_from_node(ofw_bus_get_node(dev)), dev); + + return (0); +} + +static int +tca6408_detach(device_t dev) +{ + struct tca6408_softc *sc; + + sc = device_get_softc(dev); + + if (sc->bus_dev != NULL) + gpiobus_detach_bus(sc->bus_dev); + + mtx_destroy(&sc->mtx); + + return (0); +} + +static device_t +tca6408_get_bus(device_t dev) +{ + struct tca6408_softc *sc; + + sc = device_get_softc(dev); + + return (sc->bus_dev); +} + +static int +tca6408_pin_max(device_t dev, int *pin) +{ + + if (pin == NULL) + return (EINVAL); + + *pin = PINS_NUM - 1; + + return (0); +} + +static int +tca6408_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) +{ + struct tca6408_softc *sc; + uint8_t buffer; + int error; + + if (pin >= PINS_NUM || flags == NULL) + return (EINVAL); + + sc = device_get_softc(dev); + + error = tca6408_read1(dev, TCA6408_CONFIG_REG, &buffer); + if (error != 0) + return (error); + + *flags = (buffer & BIT(pin)) ? GPIO_PIN_INPUT : GPIO_PIN_OUTPUT; + + error = tca6408_read1(dev, TCA6408_POLARITY_REG, &buffer); + if (error != 0) + return (error); + + if (buffer & BIT(pin)) + *flags |= ((*flags & GPIO_PIN_INPUT) + ? GPIO_PIN_INVIN : GPIO_PIN_INVOUT); + + return (0); +} + +static int +tca6408_pin_setflags(device_t dev, uint32_t pin, unsigned int flags) +{ + uint8_t config_buf, inv_buf; + struct tca6408_softc *sc; + int error; + + if (pin >= PINS_NUM) + return (EINVAL); + + sc = device_get_softc(dev); + mtx_lock(&sc->mtx); + + error = tca6408_read1(dev, TCA6408_CONFIG_REG, &config_buf); + if (error != 0) + goto fail; + + error = tca6408_read1(dev, TCA6408_POLARITY_REG, &inv_buf); + if (error != 0) + goto fail; + + if (flags & GPIO_PIN_INPUT) + config_buf |= BIT(pin); + else if (flags & GPIO_PIN_OUTPUT) + config_buf &= ~BIT(pin); + + if (flags & GPIO_PIN_INVIN) + inv_buf |= BIT(pin); + else if (flags & GPIO_PIN_INVOUT) + inv_buf &= ~BIT(pin); + + error = tca6408_write1(dev, TCA6408_CONFIG_REG, config_buf); + if (error != 0) + goto fail; + + error = tca6408_write1(dev, TCA6408_POLARITY_REG, inv_buf); + +fail: + mtx_unlock(&sc->mtx); + + return (error); +} + +static int +tca6408_pin_getname(device_t dev, uint32_t pin, char *name) +{ + + if (pin >= PINS_NUM) + return (EINVAL); + + snprintf(name, GPIOMAXNAME, "tca6408_gpio_pin%d\n", pin); + + return (0); +} + +static int +tca6408_pin_get(device_t dev, uint32_t pin, unsigned int *val) +{ + uint8_t buffer; + int error; + + if (pin >= PINS_NUM || val == NULL) + return (EINVAL); + + error = tca6408_read1(dev, TCA6408_READ_REG, &buffer); + if (error != 0) + return (error); + + *val = buffer & BIT(pin); + + return (0); +} + +static int +tca6408_pin_set(device_t dev, uint32_t pin, uint32_t val) +{ + struct tca6408_softc *sc; + uint8_t buffer; + int error; + + if (pin >= PINS_NUM) + return (EINVAL); + + sc = device_get_softc(dev); + mtx_lock(&sc->mtx); + + error = tca6408_read1(dev, TCA6408_WRITE_REG, &buffer); + if (error != 0) + goto fail; + + if (val != 0) + buffer |= BIT(pin); + else + buffer &= ~BIT(pin); + + error = tca6408_write1(dev, TCA6408_WRITE_REG, buffer); + +fail: + mtx_unlock(&sc->mtx); + + return (error); +} + +static int +tca6408_pin_toggle(device_t dev, uint32_t pin) +{ + struct tca6408_softc *sc; + uint8_t buffer; + int error; + + if (pin >= PINS_NUM) + return (EINVAL); + + sc = device_get_softc(dev); + mtx_lock(&sc->mtx); + + error = tca6408_read1(dev, TCA6408_WRITE_REG, &buffer); + if (error) + goto fail; + + buffer ^= BIT(pin); + error = tca6408_write1(dev, TCA6408_WRITE_REG, buffer); + +fail: + mtx_unlock(&sc->mtx); + + return (error); +} + +static int +tca6408_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) +{ + + if (pin >= PINS_NUM) + return (EINVAL); + + *caps = PIN_CAPS; + + return (0); +} + From nobody Wed Nov 24 06:41:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D8A6B18ABE97; Wed, 24 Nov 2021 06:42: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 4HzWdM0J9rz4kpw; Wed, 24 Nov 2021 06:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC1982558A; Wed, 24 Nov 2021 06: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 1AO6fwKh037228; Wed, 24 Nov 2021 06:41:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO6fwHc037227; Wed, 24 Nov 2021 06:41:58 GMT (envelope-from git) Date: Wed, 24 Nov 2021 06:41:58 GMT Message-Id: <202111240641.1AO6fwHc037227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 26d65475676f - main - Pcf85063: Add RTC 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: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26d65475676f5743eee9929f6b1c3da424450c4c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637736119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N0RxKVSMrCPkh5B6mbk2J9pz1I6w8BDYzvUzIhuWz1s=; b=BnE8xuT9lxWBnBOTHS9Ox05OKZyBGuMtlsxTdF8Fro5TlpVO82VNxpU18mzqFpBa0g0CDC FcRmidD6Lv+dgdQqwZ+3dkAdwBLaQLN6XVoKEUVGsSZjeuVLNnYZvWf+r3+cKDutFWrv2j w7nvQR/9Hx1kO9uydEtfnkD/YO7j7V7WFQ+4NJy+lis4JK5ScyaSmMTyapULBuuaoXdew0 vM3SL3A6C8A0HGS5uXHyYJxt6C2aofunIDOXIk9egrZ9OUW65Gc+BZXFmYGjNjhVdpns8Z GK89jWCQlo1m5j/U/mQqMTLGo4gw2ujebdYLVr1Pf+23TlmpJfwZpoOStU7t0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637736119; a=rsa-sha256; cv=none; b=ao1JzJxeaH9VQW4dkWodH8ugQt2mCRPYrO1Jw/BdR1qJ6kVIjFSdf9tH8wWG/sOYYf0NDE UIaJUPjLmDiMgaXBB/HsJa7bKgq8auBs+/dewGODhLY8FEOWNbzHnoT42LuzUTwxGSr3RX HPTx6PIK+af19TH30fPBIiq4UIm5ABDs34J00+Ircm5rgRsTZ3sWUbl135QvO0fRCCeHY/ 1xQB/h0fbj0iq7a4zraWgamXQym/EkpajV0dimUE0NHvV7NCWYHRlIr+zegOprOGE2m8vt KicHJITnBEEJkeyeEjteNllK4Odu4NkN+fLehU3yzUZPxYa/G2WEH11XLXR7hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=26d65475676f5743eee9929f6b1c3da424450c4c commit 26d65475676f5743eee9929f6b1c3da424450c4c Author: Hubert Mazur AuthorDate: 2021-10-08 08:42:30 +0000 Commit: Wojciech Macek CommitDate: 2021-11-24 06:40:38 +0000 Pcf85063: Add RTC driver Add driver for pcf85063 real time clock. Register set and get time methods. Parse data obtained from bus according to specification and fill kernel structures. Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D32817 --- sys/arm64/conf/std.nxp | 1 + sys/conf/files | 1 + sys/dev/iicbus/rtc/pcf85063.c | 268 ++++++++++++++++++++++++++++++++++++++++++ sys/modules/i2c/Makefile | 4 +- 4 files changed, 272 insertions(+), 2 deletions(-) diff --git a/sys/arm64/conf/std.nxp b/sys/arm64/conf/std.nxp index 75e57a6b2386..ded5611c3da0 100644 --- a/sys/arm64/conf/std.nxp +++ b/sys/arm64/conf/std.nxp @@ -9,6 +9,7 @@ options SOC_NXP_LS device pca9547 # NPX I2C bus multiplexer device pcf8563 # NXP Real-time clock/calendar device tca6408 # NXP I2C gpio expander +device pcf85063 # NXP Real-time clock # Serial (COM) ports device uart_ns8250 # ns8250-type UART driver diff --git a/sys/conf/files b/sys/conf/files index 56ac8d60db31..f25508f1fded 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1866,6 +1866,7 @@ dev/iicbus/ofw_iicbus.c optional fdt iicbus dev/iicbus/pcf8574.c optional pcf8574 dev/iicbus/pcf8591.c optional pcf8591 dev/iicbus/rtc8583.c optional rtc8583 +dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt dev/iicbus/rtc/rx8803.c optional rx8803 iicbus fdt dev/iicbus/s35390a.c optional s35390a dev/iicbus/sy8106a.c optional sy8106a ext_resources fdt diff --git a/sys/dev/iicbus/rtc/pcf85063.c b/sys/dev/iicbus/rtc/pcf85063.c new file mode 100644 index 000000000000..f3038ac32340 --- /dev/null +++ b/sys/dev/iicbus/rtc/pcf85063.c @@ -0,0 +1,268 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Alstom Group. + * Copyright (c) 2021 Semihalf. + * + * 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 ``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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "clock_if.h" +#include "iicbus_if.h" + +#define BIT(x) (1 << (x)) + +#define PCF85063_CTRL1_REG 0x0 +#define PCF85063_TIME_REG 0x4 + +#define PCF85063_CTRL1_TIME_FORMAT BIT(1) +#define PCF85063_CTRL1_RTC_CLK_STOP BIT(5) +#define PCF85063_TIME_REG_OSC_STOP BIT(7) + +#define PCF85063_HALF_OF_SEC_NS 500000000 + +struct pcf85063_time { + uint8_t sec; + uint8_t min; + uint8_t hour; + uint8_t day; + uint8_t dow; + uint8_t mon; + uint8_t year; +}; + +static int pcf85063_attach(device_t dev); +static int pcf85063_detach(device_t dev); +static int pcf85063_probe(device_t dev); + +static int pcf85063_get_time(device_t dev, struct timespec *ts); +static int pcf85063_set_time(device_t dev, struct timespec *ts); + +static int pcf85063_check_status(device_t dev); + +static struct ofw_compat_data pcf85063_compat_data[] = { + { "nxp,pcf85063", 1}, + { NULL, 0} +}; + +static int +pcf85063_check_status(device_t dev) +{ + uint8_t flags; + int error; + + error = iicdev_readfrom(dev, PCF85063_TIME_REG, &flags, 1, IIC_WAIT); + if (error != 0) + return (error); + + if (flags & PCF85063_TIME_REG_OSC_STOP) { + device_printf(dev, + "Low voltage flag set, date is incorrect.\n"); + return (ENXIO); + } + + return (0); +} + +static int +pcf85063_attach(device_t dev) +{ + + clock_register_flags(dev, 1000000, 0); + clock_schedule(dev, 1); + + return (0); +} + +static int +pcf85063_detach(device_t dev) +{ + + clock_unregister(dev); + + return (0); +} + +static int +pcf85063_get_time(device_t dev, struct timespec *ts) +{ + struct pcf85063_time data; + struct bcd_clocktime bcd; + uint8_t control_reg; + int error; + + error = pcf85063_check_status(dev); + if (error != 0) + return (error); + + /* read hour format (12/24 hour mode) */ + error = iicdev_readfrom(dev, PCF85063_CTRL1_REG, &control_reg, + sizeof(uint8_t), IIC_WAIT); + if (error != 0) + return (error); + + /* read current date and time */ + error = iicdev_readfrom(dev, PCF85063_TIME_REG, &data, + sizeof(struct pcf85063_time), IIC_WAIT); + if (error != 0) + return (error); + + bcd.nsec = 0; + bcd.sec = data.sec & 0x7F; + bcd.min = data.min & 0x7F; + bcd.ispm = data.hour & 0x20; + + if (control_reg & PCF85063_CTRL1_TIME_FORMAT) + /* 12 hour mode */ + bcd.hour = data.hour & 0x1F; + else + /* 24 hour mode */ + bcd.hour = data.hour & 0x3F; + + bcd.dow = (data.dow & 0x7) + 1; + bcd.day = data.day & 0x3F; + bcd.mon = data.mon & 0x1F; + bcd.year = data.year; + + clock_dbgprint_bcd(dev, CLOCK_DBG_READ, &bcd); + error = clock_bcd_to_ts(&bcd, ts, true); + + return (error); +} + +static int +pcf85063_set_time(device_t dev, struct timespec *ts) +{ + uint8_t time_reg, ctrl_reg; + struct pcf85063_time data; + struct bcd_clocktime bcd; + int error; + + ts->tv_sec -= utc_offset(); + clock_ts_to_bcd(ts, &bcd, true); + clock_dbgprint_bcd(dev, CLOCK_DBG_WRITE, &bcd); + + data.sec = bcd.sec; + data.min = bcd.min; + data.hour = bcd.hour; + data.dow = bcd.dow - 1; + data.day = bcd.day; + data.mon = bcd.mon; + data.year = bcd.year; + + if (ts->tv_nsec > PCF85063_HALF_OF_SEC_NS) + data.sec++; + + /* disable clock */ + error = iicdev_readfrom(dev, PCF85063_CTRL1_REG, &ctrl_reg, + sizeof(uint8_t), IIC_WAIT); + if (error != 0) + return (error); + + ctrl_reg |= PCF85063_CTRL1_RTC_CLK_STOP; + + error = iicdev_writeto(dev, PCF85063_CTRL1_REG, &ctrl_reg, + sizeof(uint8_t), IIC_WAIT); + if (error != 0) + return (error); + + /* clock is disabled now, write time and date */ + error = iicdev_writeto(dev, PCF85063_TIME_REG, &data, + sizeof(struct pcf85063_time), IIC_WAIT); + if (error != 0) + return (error); + + /* restart clock */ + ctrl_reg &= ~PCF85063_CTRL1_RTC_CLK_STOP; + error = iicdev_writeto(dev, PCF85063_CTRL1_REG, &ctrl_reg, + sizeof(uint8_t), IIC_WAIT); + if (error != 0) + return (error); + + /* reset low voltage flag */ + error = iicdev_readfrom(dev, PCF85063_TIME_REG, &time_reg, + sizeof(uint8_t), IIC_WAIT); + if (error != 0) + return (error); + + time_reg &= ~PCF85063_TIME_REG_OSC_STOP; + + error = iicdev_writeto(dev, PCF85063_TIME_REG, &time_reg, + sizeof(uint8_t), IIC_WAIT); + + return (error); +} + +static int +pcf85063_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, pcf85063_compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "NXP pcf85063 Real Time Clock"); + + return (BUS_PROBE_GENERIC); +} + +static device_method_t pcf85063_methods [] = { + DEVMETHOD(device_attach, pcf85063_attach), + DEVMETHOD(device_detach, pcf85063_detach), + DEVMETHOD(device_probe, pcf85063_probe), + + DEVMETHOD(clock_gettime, pcf85063_get_time), + DEVMETHOD(clock_settime, pcf85063_set_time), + + DEVMETHOD_END +}; + +static driver_t pcf85063_driver = { + "pcf85063", + pcf85063_methods, + 0 +}; + +static devclass_t pcf85063_devclass; + +DRIVER_MODULE(pcf85063, iicbus, pcf85063_driver, pcf85063_devclass, NULL, NULL); +IICBUS_FDT_PNP_INFO(pcf85063_compat_data); diff --git a/sys/modules/i2c/Makefile b/sys/modules/i2c/Makefile index 9fea714975f7..31c348a63dbc 100644 --- a/sys/modules/i2c/Makefile +++ b/sys/modules/i2c/Makefile @@ -29,8 +29,8 @@ SUBDIR = \ smbus \ .if !empty(OPT_FDT) -SUBDIR += tca6416 \ - rx8803 +SUBDIR += rx8803 \ + tca6416 .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ From nobody Wed Nov 24 08:01:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C40F21888A90; Wed, 24 Nov 2021 08:02:11 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "vtr.rulingia.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzYPv2B7nz3pYP; Wed, 24 Nov 2021 08:02:10 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (2001-44b8-31fc-0d00-c8ab-09b5-49e2-9ade.static.ipv6.internode.on.net [IPv6:2001:44b8:31fc:d00:c8ab:9b5:49e2:9ade]) by vtr.rulingia.com (8.16.1/8.16.1) with ESMTPS id 1AO821r2064630 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Nov 2021 19:02:07 +1100 (AEDT) (envelope-from peter@rulingia.com) DKIM-Filter: OpenDKIM Filter v2.10.3 vtr.rulingia.com 1AO821r2064630 X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.16.1/8.16.1) with ESMTPS id 1AO81uQ9057409 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 24 Nov 2021 19:01:56 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.16.1/8.16.1/Submit) id 1AO81upY057406; Wed, 24 Nov 2021 19:01:56 +1100 (AEDT) (envelope-from peter) Date: Wed, 24 Nov 2021 19:01:56 +1100 From: Peter Jeremy To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8ef0c11e7ce7 - main - nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers Message-ID: References: <202111161714.1AGHEtBA084291@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="D+Ny//2FsuqrXAB8" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-Rspamd-Queue-Id: 4HzYPv2B7nz3pYP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --D+Ny//2FsuqrXAB8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-Nov-24 05:12:19 +0200, Konstantin Belousov wr= ote: >Try this (combined two patches). That's helped. I can now swapon and swapoff but not actually use swap: KDB: stack backtrace: db_trace_self() at db_trace_self db_trace_self_wrapper() at db_trace_self_wrapper+0x30 assert_vop_locked() at assert_vop_locked+0x58 VOP_STRATEGY_APV() at VOP_STRATEGY_APV+0x54 bufstrategy() at bufstrategy+0x4c swap_pager_putpages() at swap_pager_putpages+0x108 vm_pageout_flush() at vm_pageout_flush+0x108 vm_pageout_cluster() at vm_pageout_cluster+0x464 vm_pageout_laundry_worker() at vm_pageout_laundry_worker+0x910 fork_exit() at fork_exit+0x74 fork_trampoline() at fork_trampoline+0x14 vnode 0xffffa00008840700: type VREG usecount 1, writecount 0, refcount 2 seqc users 0 hold count flags () flags (VV_VMSIZEVNLOCK) v_object 0xffffa00008df3738 ref 0 pages 0 cleanbuf 0 dirtybuf 0 lock type nfs: UNLOCKED fileid 30984 fsid 0x3a3a00ff01 VOP_STRATEGY: 0xffffa00008840700 is not locked but should be KDB: enter: lock violation --=20 Peter Jeremy --D+Ny//2FsuqrXAB8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmGd8W9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzQaJBAAktZdZn9l7mfB0UVmAkO3nHbhqa5ArGFfCSnnEZelk0I+U/lge7YPRJ3l 9e51QBIjW7ZXul7kYROWLtCcBvD5t7D1FxOuW3ht5soXYAK4MT0ekzipoYRh8oPl 4O9jijENC4KOvwrpB8OQtAH3D5gC/NRDUxqaEV1fjWvw1ZrLrUbSGMkEWCYwNehd oR0bJm5Hk2QxmgJiOHbVuXeOFqiPDydAGHaxRu9c6upUdVnyMq4KMKG688qWu5To 1EltUayybOuwjoVqx0H6QuePCNlt/Uq/yxrE2Zfof2SF3Q3Gb+2JSt1JjQ4iumfg 7mIVlocJoXGW4bx97jSbq0W0412XbLBhnaQ+2+/sGfJEiKYoz/fvGsa/xFX8I307 gIAzNs/wN5JE1OlckCUe1w2tjNzKtEfsezox1Egt4e861+p3Pt352LO/nwNjzZa2 VUHnYYinMlQRVNNzuwSExIA+Z3LJqv8SUpGE28mjuX189dJ7gbEL4+I36mav6h2O +LrA/PXSkZ0CQkBZCwg3Mh8tNUVTFTcd17cttj1BmQTAPw8/GH3wyvaKMyP6Cyh+ mGSTuDej9gWCAjzoVlOHizYTK30e4L61COAZqqy2CgzWIRhbJ1ikLYGUpeC0TKi3 OA/7hqIe7WnfTLndPUk/a859ojUhq690sbicY7yGVpBlvHLJscs= =xrob -----END PGP SIGNATURE----- --D+Ny//2FsuqrXAB8-- From nobody Wed Nov 24 08:30:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 91B4A1896F1C; Wed, 24 Nov 2021 08:30:25 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mail.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 4HzZ2T0S6nz4RkN; Wed, 24 Nov 2021 08:30:24 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1637742617; 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=tYiEr10/6+7jno9c8vHWRPpN5+CSDeuoI/200KavUV0=; b=MOur7XlbaYcI9uiPa9YFpdX1XthTOxfKMz42FICeh6BOHKlDJJ/APE7D1hiK/nMgGSLeOG KpWoj5OKkjtM/+7fg9VJzm775SY3EFTDBlEJESo6/krPu5PJzzVeYUEdkcEXqzwhsPuzQz 76qiFgzXRp3+JCkZANX7Q8vbOE4Yc/8= Received: from skull.home.blih.net (lfbn-idf2-1-1163-183.w90-92.abo.wanadoo.fr [90.92.222.183]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 3ca87efe (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 24 Nov 2021 08:30:17 +0000 (UTC) Date: Wed, 24 Nov 2021 09:30:16 +0100 From: Emmanuel Vadot To: freebsd@oldach.net (Helge Oldach) Cc: allanjude@freebsd.org (Allan Jude), src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features Message-Id: <20211124093016.e031bc2e2e935d1c67dbc0ae@bidouilliste.com> In-Reply-To: <202111231936.1ANJaeDT011754@nuc.oldach.net> References: <202111231936.1ANJaeDT011754@nuc.oldach.net> 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-Rspamd-Queue-Id: 4HzZ2T0S6nz4RkN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Tue, 23 Nov 2021 20:36:40 +0100 (CET) freebsd@oldach.net (Helge Oldach) wrote: > Allan Jude wrote on Tue, 23 Nov 2021 20:14:53 +0100 (CET): > > On 11/23/2021 5:00 AM, Helge Oldach wrote: > > > Allan Jude wrote on Mon, 22 Nov 2021 19:14:13 +0100 (CET): > > > Hmmm. On a RPi4/8G: > > > > > > Before (FreeBSD 13.0-STABLE (GENERIC) #366 stable/13-n248173-d16fbc488e6): > > > | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > > > | aes-256-gcm 35791.98k 38533.57k 39986.77k 41397.59k 39840.43k 39638.36k > > > > > > After (FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621) > > > > > > | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > > > | aes-256-gcm 21277.62k 23226.64k 23613.90k 23687.51k 23892.93k 23947.95k > > > > > > It seems that AES throughput is actually cut by almost half? > > > > Do you know which of the CPU optimizations your RPi4 supports? > > Is this what you need? > > Instruction Set Attributes 0 = So there is no AES+PMULL instruction set on RPI4, I guess that openssl uses them for aes-gcm. I wonder what it uses before that make it have this boost. On my rockpro64 I do see the improvement btw : root@generic:~ # cpuset -l 4,5 openssl speed -evp aes-256-gcm ... aes-256-gcm 122861.59k 337938.39k 565408.44k 661223.09k 709175.19k 712327.25k root@generic:~ # cpuset -l 4,5 env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm ... aes-256-gcm 34068.11k 38068.62k 39435.24k 39818.75k 39905.34k 39922.35k Running on the big cores at max freq. > Instruction Set Attributes 1 = <> > Processor Features 0 = > Processor Features 1 = <> > Memory Model Features 0 = > Memory Model Features 1 = <8bit VMID> > Memory Model Features 2 = <32bit CCIDX,48bit VA> > Debug Features 0 = > Debug Features 1 = <> > Auxiliary Features 0 = <> > Auxiliary Features 1 = <> > AArch32 Instruction Set Attributes 5 = > AArch32 Media and VFP Features 0 = > AArch32 Media and VFP Features 1 = > > > You can set the environment variable OPENSSL_armcap to override > > OpenSSL's detection. > > > > Try: env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm > > On FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621 again (i.e. after this commit): > > hmo@p48 ~ $ env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm > Doing aes-256-gcm for 3s on 16 size blocks: 6445704 aes-256-gcm's in 3.08s > Doing aes-256-gcm for 3s on 64 size blocks: 1861149 aes-256-gcm's in 3.00s > Doing aes-256-gcm for 3s on 256 size blocks: 479664 aes-256-gcm's in 3.01s > Doing aes-256-gcm for 3s on 1024 size blocks: 122853 aes-256-gcm's in 3.04s > Doing aes-256-gcm for 3s on 8192 size blocks: 15181 aes-256-gcm's in 3.00s > Doing aes-256-gcm for 3s on 16384 size blocks: 7796 aes-256-gcm's in 3.07s > OpenSSL 1.1.1l-freebsd 24 Aug 2021 > built on: reproducible build, date unspecified > options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) > compiler: clang > The 'numbers' are in 1000s of bytes per second processed. > type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > aes-256-gcm 33504.57k 39704.51k 40825.01k 41394.83k 41454.25k 41601.52k > hmo@p48 ~ $ openssl speed -evp aes-256-gcm > Doing aes-256-gcm for 3s on 16 size blocks: 4066201 aes-256-gcm's in 3.00s > Doing aes-256-gcm for 3s on 64 size blocks: 1087387 aes-256-gcm's in 3.00s > Doing aes-256-gcm for 3s on 256 size blocks: 280110 aes-256-gcm's in 3.03s > Doing aes-256-gcm for 3s on 1024 size blocks: 70412 aes-256-gcm's in 3.04s > Doing aes-256-gcm for 3s on 8192 size blocks: 8762 aes-256-gcm's in 3.00s > Doing aes-256-gcm for 3s on 16384 size blocks: 4402 aes-256-gcm's in 3.02s > OpenSSL 1.1.1l-freebsd 24 Aug 2021 > built on: reproducible build, date unspecified > options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) > compiler: clang > The 'numbers' are in 1000s of bytes per second processed. > type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > aes-256-gcm 21686.41k 23197.59k 23656.30k 23725.04k 23926.10k 23916.23k > hmo@p48 ~ $ > > Kind regards, > Helge -- Emmanuel Vadot From nobody Wed Nov 24 08:30:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 571D51897081; Wed, 24 Nov 2021 08:30:31 +0000 (UTC) (envelope-from rm@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 4HzZ2b1qZPz4RdG; Wed, 24 Nov 2021 08:30:31 +0000 (UTC) (envelope-from rm@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637742631; h=from:from:reply-to:subject: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=NsUmT2AoLowh1U4wb2lZsSwFUA2z+FlqiY5uLkVaa1Q=; b=PQGJfNsmLPkqPW/orHNKGlKbv+H6LV4Ht81XMafIC6ynpQ1tn6X4L/HVxKVC5djQxSJaT+ Wk2ISL8xSCXeJNXB/cJ+hyOfttU5f3J0TJcsH77/Ed/eibPNJoHwaJhcHiZaZk50gSZrYF yq26JzxzczhMXPsLLe2h43s7ANIe7x4aiXi7cuV5LcnqRpDWsDTQ4HbNgNoN6eQMyEKFzq KwAzID4OWvmoy9n6GFoLSoFzHoAHgf8yiBQ92/cl/L9yFSkvHUurlLI6VqCPf5YcS+fsXR 96qQIWOr2RcmB4AEUK37EFS3BMVSFqJWQMAUcpujus/cKwbQO/+QB/U93ak6TQ== Received: from [127.0.0.1] (unknown [127.0.1.132]) by freefall.freebsd.org (Postfix) with ESMTP id 7DFED6AE2; Wed, 24 Nov 2021 08:30:30 +0000 (UTC) (envelope-from rm@FreeBSD.org) Message-ID: <3a5ba8ef-008d-1c1b-e19e-143bf2c0639e@FreeBSD.org> Date: Wed, 24 Nov 2021 11:30:29 +0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: git: ee2c52fd3fd9 - main - sys/devctl.h: Only declare kernel functions in kernel. Content-Language: en-US To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202111240422.1AO4MIXh049693@gitrepo.freebsd.org> From: Ruslan Makhmatkhanov In-Reply-To: <202111240422.1AO4MIXh049693@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637742631; h=from:from:reply-to:subject: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=NsUmT2AoLowh1U4wb2lZsSwFUA2z+FlqiY5uLkVaa1Q=; b=HMcXLHdRSH8++QY07bvSiTbRtQQuIEhMTMvL93Ne+G1FXxvq2WgrFehuLMzBM5N1+TaArN ROMoegMvSQwAtWADC77XooRjpmXWZcpUoAC5j5dVNlKPc0HbQvfdZHawlll7KRVBtLQ4Pf mQULzokMuPPgEc6u1k1gQwAO/qDdCstH0VldLn2Qh9ByN1OVGJry7+ih8MBQ7PA/pcz3d+ 94UMswLqJRrKmr5blZPlORH+AXADGQskhSJpgeoC2TDeyuKqO4wJmhiJhkAQV6iCeuR2Bk IynJGooVgz52gsraXZW4UHBCLFa6Pps8YXTnM0YE43BLdXat4wGJV3i4lb/eXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637742631; a=rsa-sha256; cv=none; b=A0PPjX0nMjSc8qA0NZ7JCEj2OyhSTZHXxiOO9cG21J5WlWLsEGAMw6pTuYmouPsqdiaqmk FWfIoSIEqoulVZzg0sMzCqkfOnH8Ru7+Eko2TLAdJ18Uoi8ikJBLMw16CiJKw/CaFMJGBO HRTo/azturBbHFcHxzRBwm6MLPwKUOa7pcQPa83oXLFeNG0eC1FooWSzmFNzRmKHfgv6Yk zygSw3thmoJBBUqGZspAvyvx1NehPziZNrWN9e2vh9Ud+O3BLzEM6ZrKUZaxAsj7e0ETUF Tgb3N7A+9aL6Ew1wqk4t7GwNC1bWpPxRtJlbhz0sbqYH7alirmtiaDBGywT01Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N Warner Losh wrote on 11/24/21 07:22: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ee2c52fd3fd9dd19c1f7117cdda968ec4e08c898 > > commit ee2c52fd3fd9dd19c1f7117cdda968ec4e08c898 > Author: Warner Losh > AuthorDate: 2021-11-24 03:28:45 +0000 > Commit: Warner Losh > CommitDate: 2021-11-24 04:21:18 +0000 > > sys/devctl.h: Only declare kernel functions in kernel. > > Also, while I'm here, switch to newer, shorter format and fix my > copyright to match the others in the tree. > > Sponsored by: Netflix > --- > sys/sys/devctl.h | 27 ++++----------------------- > 1 file changed, 4 insertions(+), 23 deletions(-) [...] > + * SPDX-License-Idnetifier: BSD-2-Clause ^^^^ typo =) [...] -- Regards, Ruslan T.O.S. Of Reality From nobody Wed Nov 24 08:47:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C0C1118A25ED for ; Wed, 24 Nov 2021 08:47: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 4HzZQl3PL2z4Ywg; Wed, 24 Nov 2021 08:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5613A26A6A; Wed, 24 Nov 2021 08:47: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 1AO8lxUM000502; Wed, 24 Nov 2021 08:47:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO8lxHI000501; Wed, 24 Nov 2021 08:47:59 GMT (envelope-from git) Date: Wed, 24 Nov 2021 08:47:59 GMT Message-Id: <202111240847.1AO8lxHI000501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Baptiste Daroussin Subject: git: 4143293277c3 - Create tag vendor/bsddialog/2021-11-24 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/tags/vendor/bsddialog/2021-11-24 X-Git-Reftype: annotated tag X-Git-Commit: 4143293277c3cc160f218896d64f07cf67bb4046 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637743679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mSP+gfs23Cg3KB6y3jxdngQNtLCpO/yWA78ZxAE2dRw=; b=kmVRZYxaD+MvyKulr15P8cTIWuFyvR1SXmB5gQJxEIr1mLp4oGrVym7EzP2TUHpGscDh9z 5MEetO2+ewTp1XovT2rxmjw5FG9SbY3fRK065FXb0UU/b6UKCeQ8VrJwBf5bX3P822UcNL /A21c0ICH0Jvu6g+ukufT0V1FP/oRIO1k+Le6UAPV/yUhLeE4NPGUoPOUg/bEESRBLg2bc ElwrD2R/v4OxnirHbw6/jeEAnKkYxP+a7p3AG904Zt24MmnSRVCRWE38SUG3mBBxffre4f UTZt61ATppLfp2J32DJv8je77LykECFl+FcBgnpecvLaZuU/55GXJoNkrvvuWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637743679; a=rsa-sha256; cv=none; b=K1DZqdRxyiGPSXrrCRhXY+ox6FKgOs5ZXi51ZDRfe1cZbCqxGzrTUGvEsiUtqD7oy7gOh9 tbQi/eWC//3bxpsOkBf8R8aqRWS27aY0wzmi8f4sfUZKS334r03RL4ii9ZI0VkVwQgCU+m 96UzZYCwHpeuy+S5+r63yFQ1s07h+pv1DqDuDQ4I/QNP/nBP5VITmf7vFLezwCxy/4c6yS KgAuH1fwZJagHewF5My8M5VRwJbtZQis429eK0+Tr08f+jGUy968Vxt5vQ4CX/geGAzUXR 8B84csW3lLHy0gOjIcbVxzhFIPVPL6xuoOWaDWayaacsNr5rjDDlnHI6yG2+wQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/bsddialog/2021-11-24 has been created by bapt: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/bsddialog/2021-11-24 tag vendor/bsddialog/2021-11-24 Tagger: Baptiste Daroussin TaggerDate: 2021-11-24 08:47:07 +0000 tag import of bsddialog 2021-11-24 commit 857c66bb5f3c5651b012beb1b5ea6ba39354ea94 Author: Baptiste Daroussin AuthorDate: 2021-11-24 08:42:13 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 08:46:56 +0000 bsddialog: import snapshot as of 2021-11-24 From nobody Wed Nov 24 08:47:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B802518A27CD for ; Wed, 24 Nov 2021 08:47: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 4HzZQl33G4z4Yj9; Wed, 24 Nov 2021 08:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 401D226DE8; Wed, 24 Nov 2021 08:47: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 1AO8lxkp000478; Wed, 24 Nov 2021 08:47:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO8lxsM000477; Wed, 24 Nov 2021 08:47:59 GMT (envelope-from git) Date: Wed, 24 Nov 2021 08:47:59 GMT Message-Id: <202111240847.1AO8lxsM000477@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Baptiste Daroussin Subject: git: 857c66bb5f3c - vendor/bsddialog - vendor branch created List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/vendor/bsddialog X-Git-Reftype: branch X-Git-Commit: 857c66bb5f3c5651b012beb1b5ea6ba39354ea94 X-Git-Oldrev: 0000000000000000000000000000000000000000 X-Git-Newrev: 857c66bb5f3c5651b012beb1b5ea6ba39354ea94 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637743679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JPTMrhHreYuaqnzaLS4BO0BxbRhPhztXFLFpJVAuOJY=; b=xz2AJ5EqNbxbTlaqMa8QdJbeXTRgDtkaU+vcWPuO1cihh7l0MtSNVvstIDt2klW/u3Kg4O FyA2cDlwXSDmHDiGd9sVTEQ/gB/QIORGYHy0AfJ17gw2ewaGZtAx9XaTpNDYy4D6MoFYGX zh05Tz3pTpwXLXFRoBVFJqROHTTOENj/kIk8PaWDTav4aRuKyFLJzQxuGo7Zugf4dgOOTr F1rRIBuDWkS5pnPPq9Qc93I5B0kbROTTgUFD+Xe6DdqPz15/4rSnBk5RXmXCQoSfarszJz 71r93hzAFWcRLMZ0XEJEu+h3w+6HGA1q9DwUj/a4WZetb6IdPyBHT2adH8jbDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637743679; a=rsa-sha256; cv=none; b=MR58LDf++jpYDj4TynbjDhbKRTAWGIQ90mbPPnK1JSg8YerXfX+EDuPUjVJO4ygB7siFi5 LuC4loG3dKrFvH56hWL6MaRFLraABpOWmz95hlN0Gucayg5u+7c8+o+aVCU6/D6wYae7UY KnYS0nfVDy8xm36S7RkW8874xc+ktaJBlsCoMGX6Gy8+TtprCZA++iH/+UvIZvAlQ06yYw Tv7iQSEwSYVukZKe+7V5ZUdXO6Ixla/XIzhO6F3qNOt/vMjs2XXtE+VZOh564Jfc4ewAQ9 ryE06GLB7WvhO3q4o1IukluqnOW63hMrH2oSF1p+VoRuIuyBVJUYiDBP3BN5Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch vendor/bsddialog has been created by bapt: URL: https://cgit.FreeBSD.org/src/log/?id=857c66bb5f3c 857c66bb5f3c bsddialog: import snapshot as of 2021-11-24 From nobody Wed Nov 24 09:39:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CE05C189B9ED; Wed, 24 Nov 2021 09:39: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 4HzbZ13zb8z4njx; Wed, 24 Nov 2021 09:39:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6960127A83; Wed, 24 Nov 2021 09:39: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 1AO9dLws068545; Wed, 24 Nov 2021 09:39:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO9dLMs068544; Wed, 24 Nov 2021 09:39:21 GMT (envelope-from git) Date: Wed, 24 Nov 2021 09:39:21 GMT Message-Id: <202111240939.1AO9dLMs068544@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: 1bc9ca3b35d2 - main - cam: Unbreak CAM_IO_STATS build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bc9ca3b35d280cdb0dbefa69bebf687970d1ef6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637746761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8agzWhKsGvppXawFXLkwew+NLdAMJ0kLOeROyNsHhuw=; b=V3It5iGhhg4saIK71UByui7zWnV1dZBjG6piyIaYsvOPUtoSsSI8ZIRUAmzPCxDyujXboN QhaFEYWhBSxozWHhi7eqdYXKyv1qZ6LvaSp73Gp5pZnqqS2kgStCxH8cepFtLYiQFU/j1A 0s1o0ucDGwpiFVt3tV4KWTh3PgABWqKuhtPiEtibPnmqTkNR02LaVlX28B4ZCEZnLKXUAm dJnUml/3WqiA2RL1svNTF7VBP944MtRqvzuUxM82NdG4+9EfoNCxEW/GpBEoCH862SAR6v 4lvtDOQHk8fhNCb7mw981gm7ccpxnTbxWwA2WIAPg5Gx63WQCgjn8HUOpUjomw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637746761; a=rsa-sha256; cv=none; b=onU0exM+NrjUN3uk7CnT0+C1G0QMe5c55byU47TU0cncCaqWzrvkMCIU0swfXezyGiZR2M VfTbrYXUMQOtK5KRHkO+R4psA415gP3cEI4+Z3AkETRJ0xCbVHexNODJHWWUfLoUnrbsdc ZH2zxdlgRewf9mo5YkDt1sHJufFu29yzC+Gwkumqcx23ZNCPcF7WY+PSuOpwjsuhhD/xu9 NaPIhEJ57pRZOpn8A19vQkEbQl7b1Eo2FDoB8K7Sx8ICSNM4JQxWiXOSkhex9R5/KMy2Xx qysmHRPxyW5vlQTXUNDLKl1n7RZZZbhnoZrXoCct9UIFXwu8KBjtiD0Elpp5Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1bc9ca3b35d280cdb0dbefa69bebf687970d1ef6 commit 1bc9ca3b35d280cdb0dbefa69bebf687970d1ef6 Author: Warner Losh AuthorDate: 2021-11-24 09:10:53 +0000 Commit: Warner Losh CommitDate: 2021-11-24 09:36:48 +0000 cam: Unbreak CAM_IO_STATS build Fixes: 6637b7460066 Sponsored by: Netflix --- sys/cam/nvme/nvme_da.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index f1c9a9ec9fea..7a489afdb993 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -1267,6 +1267,13 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb) static int ndaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { +#ifdef CAM_IO_STATS + struct nda_softc *softc; + struct cam_periph *periph; + + periph = xpt_path_periph(ccb->ccb_h.path); + softc = (struct nda_softc *)periph->softc; +#endif switch (ccb->ccb_h.status & CAM_STATUS_MASK) { case CAM_CMD_TIMEOUT: From nobody Wed Nov 24 09:39:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 062A7189B8E6; Wed, 24 Nov 2021 09:39:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzbZ24zVVz4nsK; Wed, 24 Nov 2021 09:39:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AD6E27A1F; Wed, 24 Nov 2021 09:39: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 1AO9dMRe068569; Wed, 24 Nov 2021 09:39:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO9dM3T068568; Wed, 24 Nov 2021 09:39:22 GMT (envelope-from git) Date: Wed, 24 Nov 2021 09:39:22 GMT Message-Id: <202111240939.1AO9dM3T068568@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: b3fab418301e - main - devctl.h: Spelling typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3fab418301eaadb3b9ac24f9ff295a84521dc54 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637746762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H8tx3Kx7aj1t/JQEqGWsAmjvf+MtxKdxiuzKtAMmRsg=; b=nP13lPUjxkUPF4Fhezk4NwDve4hIJF7pg4GC0F86Sah1fZUsa24Y4Hi42IQRS104hkyKmA ktcoJ7VDYasc86yFRmE4+QSaxXF0MN7x/SiP2M68CuYkyHuiw4frlbmXumRQnmocGSssWD TIodjk+Z8REF30uEwzWvfrXvMl4AyWIhQ7QHFzFBjB797AT9+GoVvOQZ6631LHYhbCLVx8 LuM4uN6yEDszi0orqIiNiWuXdSMvtotUPrpCudiq4ergUhpbfJvDyZa/AdpcdkJU5Aazjf ExXwiYTG1EACa9SizScAp9ttJZse/4L9TnY65I1x9rEA/pIp6IeXhkmn/g70jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637746762; a=rsa-sha256; cv=none; b=Ut6Za2dh8iWRd2rc1VFbMAeU+uqN99aZmwCZW4hvXe1veHzufenIwcmllsWCog0Z9gbzon b4evC3QuScuQ9O6tv8AuBYsk729m9lVS2V9e8WEC3028ChDJp0/8NBZHBvYLetCMAXCpCL /qoBSQKWuDFJMRgqeEPgajCAvc/MpCm0v5waJlTKmwghuS4UFbs8I9nzROoSFfIVD6OCvB DFNgFXCCXgHOZ8nnkgvvrmlACZYGWitDZFv1pNAAd1hXnSVaOoPuzq48yzKSQvJIPpJwnW o8U7C/TEMB/mVcKxrGAle90bs+YNZsA5Dq7rL5Tt1LinWxOORST2lZsXfm4n0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b3fab418301eaadb3b9ac24f9ff295a84521dc54 commit b3fab418301eaadb3b9ac24f9ff295a84521dc54 Author: Warner Losh AuthorDate: 2021-11-24 09:12:35 +0000 Commit: Warner Losh CommitDate: 2021-11-24 09:37:51 +0000 devctl.h: Spelling typo Spell identifier correctly. While I'm here, further simplify. Fixes: ee2c52fd3fd9 Sponsored by: Netflix --- sys/sys/devctl.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/sys/devctl.h b/sys/sys/devctl.h index 2cf84e420874..b72cd28dfce8 100644 --- a/sys/sys/devctl.h +++ b/sys/sys/devctl.h @@ -1,10 +1,7 @@ /*- * Copyright 2020 M. Warner Losh * - * SPDX-License-Idnetifier: BSD-2-Clause - * - * $FreeBSD$ - * + * SPDX-License-Identifier: BSD-2-Clause */ #ifndef _SYS_DEVCTL_H_ From nobody Wed Nov 24 09:39:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E9676189B8EB; Wed, 24 Nov 2021 09:39: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 4HzbZ36txCz4ny4; Wed, 24 Nov 2021 09:39:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B436B27A84; Wed, 24 Nov 2021 09:39: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 1AO9dNQV068593; Wed, 24 Nov 2021 09:39:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AO9dNQq068592; Wed, 24 Nov 2021 09:39:23 GMT (envelope-from git) Date: Wed, 24 Nov 2021 09:39:23 GMT Message-Id: <202111240939.1AO9dNQq068592@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: a2b53e53a3f3 - main - sys/file.h: Allow inclusion when compiling for a strict namespace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a2b53e53a3f38dd89b64500a2d2a1727baffe4f9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637746764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/AKVeGIAro/+YU/OHcgOPsWPhSHLbEdVvBnIS0fMk3s=; b=Jfym3PMD+E14szmdXuwDE9vZwF+gyyCx8MryTa1Fb6bWA0bFTGRwJPRHx+/Fgz4ZYgrRx1 xvkS77Fc4k+j75d+zg2TGM9fepGImMskGntLmQTIZejEgUzJ6nk1SfIwz2ugdNYss+NQSp v5bKvwAs0jP6Gvi5Y8tw06SHpV8WFC+E9ZAjO89tIFwxFozU/sv71T4t90Sa1Pov8SMJxW vTMLKzYifEgiH8NtcF3ibaLLp9vTUnyxTn99bvWMNNKI5NTO51ceFzCkUI/P7n/Mqd4iWC X+jhSiWOld0Jq3NAcaiJuOz1Gh1DYgg16ISGvYHNp82AbVl3OZGIzDRTph+3Bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637746764; a=rsa-sha256; cv=none; b=LX+sh0MQV3xp7bV/ZB6LntLdNpl2rWo+5BBiUQVMorKYhELCBFOupKD0ZZ+zzvHyUCxY3G 74gvpxKsaA5CtoahHDfueIZ+4a0Y+3nFxDlTOZaLuQsW9rwXmuug9u8QA3LzKUvqY07byd X9LfEYySK0/F6ACeX+gdkhKAfCPEg46effQ6vcmgKikN5deam7NhOrWr/5J+beGv4chvLx Nk/86NacPdMAOG57cAKg6ki01JXT90RJVOyw6Shd4KgDLYVYhMZk+ndPXiV5mLFB8x0CF5 FWaJmIMb1F3pmeoc1jT63jacFb6zkEVVqr4qbPmS2f2wu4k1UV/ID8Tavk6v1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a2b53e53a3f38dd89b64500a2d2a1727baffe4f9 commit a2b53e53a3f38dd89b64500a2d2a1727baffe4f9 Author: Warner Losh AuthorDate: 2021-11-24 09:25:47 +0000 Commit: Warner Losh CommitDate: 2021-11-24 09:38:09 +0000 sys/file.h: Allow inclusion when compiling for a strict namespace Although not part of the standard, this file is sometimes included with -D_POSIX_C_SOURCE= or -D_XOPEN_SOURCE=. Limit those sturctures that use types hidden by __BSD_VISIBLE to when they are visible. PR: 259975, 234205 Sponsored by: Netflix --- sys/sys/file.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/sys/file.h b/sys/sys/file.h index 5a6f0b1d2071..8c4a2394770d 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -174,6 +174,7 @@ struct fileops { * none not locked */ +#if __BSD_VISIBLE struct fadvise_info { int fa_advice; /* (f) FADV_* type. */ off_t fa_start; /* (f) Region start. */ @@ -213,12 +214,14 @@ struct file { #define FOFFSET_LOCKED 0x1 #define FOFFSET_LOCK_WAITING 0x2 +#endif /* __BSD_VISIBLE */ #endif /* _KERNEL || _WANT_FILE */ /* * Userland version of struct file, for sysctl */ +#if __BSD_VISIBLE struct xfile { ksize_t xf_size; /* size of struct xfile */ pid_t xf_pid; /* owning process */ @@ -238,6 +241,7 @@ struct xfile { int _xf_int_pad3; int64_t _xf_int64_pad[6]; }; +#endif /* __BSD_VISIBLE */ #ifdef _KERNEL From nobody Wed Nov 24 10:03:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 89BCC18AB202; Wed, 24 Nov 2021 10:03: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 4Hzc6G1MBFz3Fvc; Wed, 24 Nov 2021 10:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E5F127EBD; Wed, 24 Nov 2021 10:03: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 1AOA3nFh008882; Wed, 24 Nov 2021 10:03:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOA3nu8008881; Wed, 24 Nov 2021 10:03:49 GMT (envelope-from git) Date: Wed, 24 Nov 2021 10:03:49 GMT Message-Id: <202111241003.1AOA3nu8008881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: fde3fc69cda8 - main - ncurses: to not create a libncursesw.a in the OBJDIR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fde3fc69cda865dc65b547411157b3ca7674c5dd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637748230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MS5aw96liihsf4KYLibCceB1KOs//ndfdIUjxfmsjvc=; b=nhYsNrtrkUF2rkBtNzSawgKfK0nchcFMjW28myokZa+0VMImJHkfUH2g62CQsB/J91gtwt QgPT98w6dQ1WBnzPGzPxpRTgpAwiujN4KLb9ff8t/mAQVxrz7GOpfP47SHE0B7cySBYbNc z5toLLc49WSIRitMCF6Y8L98WWtEU+tkh8QvzKcCoD1B3pcFYaOJvExFaFgNQGBHpf7F7k YjXsf9p/QuRXSS6cslFOD4BjxP/ZXOX+bypWbwjOZw5VSS86CSt6b7UItSg57NnbLTqGpy VIt7iv0a8B2VnF0OiBTDxGkxflLZZ2P4CIYJIXPa4hrUb0saYzaiZZhY2Ijc5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637748230; a=rsa-sha256; cv=none; b=LUFnaPtvIXmr3Udcik5iTszHNKz6unlLkVq+VX5SGak+dIdBoQXyYI2if/HX5lA2creDnR wRmm9xurco77hxg6RVO5EIPei82l1JIAH3lUcRfYcbKzPxWByx3UaMZiXZ9WtucsNoUoNO +pJC5uWFkFvUWOwkBX0MqdD0QC5qEFKgV9TPJYGuCueR5kKcYBgOPhysJb1MAKNc4GMwzf e5fdwpcFmH0ZE7SEaZ07gBCHOnl/3gx7CpxJ20SQy680crEDxaJ51b0S7L12hlj8HDOOXw h6yNwECYZ17EleyhlbapebcIezSnuadu5BVPUke7QdLmCFbhvuqBF2yh0EQYzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=fde3fc69cda865dc65b547411157b3ca7674c5dd commit fde3fc69cda865dc65b547411157b3ca7674c5dd Author: Baptiste Daroussin AuthorDate: 2021-11-24 09:10:26 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 10:02:22 +0000 ncurses: to not create a libncursesw.a in the OBJDIR It breaks intree partial builds for every library depending on ncurses because ncursesw.a (built without PIC) will be the first the library path for the linker to resolve -lncursesw --- lib/ncurses/ncurses/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index af733d3ac613..45c8fcd11301 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -170,9 +170,11 @@ SYMLINKS+= libncursesw_p.a ${LIBDIR}/libcurses_p.a LIBADD+= tinfow SHLIB_LDSCRIPT= libncursesw.ldscript STATIC_LDSCRIPT= libncursesw.aldscript +CLEANFILES+= libncursesw.ald +# Keep this for a while to ensure the file is removed during make clean CLEANFILES+= libncursesw.a -libncursesw.a: ${.CURDIR}/${STATIC_LDSCRIPT} +libncursesw.ald: ${.CURDIR}/${STATIC_LDSCRIPT} sed -e 's,@@LIB@@,${LIB},g' \ -e 's,@@STATICLIB_SUFFIX@@,${_STATICLIB_SUFFIX},g' \ ${.ALLSRC} > ${.TARGET} @@ -184,11 +186,11 @@ lib_gen.c: MKlib_gen.sh ${.OBJDIR:H}/tinfo/curses.h ncurses_dll.h expanded.c: MKexpanded.sh sh ${NCURSES_DIR}/ncurses/tty/MKexpanded.sh "${CC:N${CCACHE_BIN}} -E" ${CFLAGS} >expanded.c -all: ${STATIC_LDSCRIPT} libncursesw.a +all: ${STATIC_LDSCRIPT} libncursesw.ald -install-libncursesw.a: libncursesw.a +install-libncursesw.a: libncursesw.ald ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${_INSTALLFLAGS} libncursesw.a ${DESTDIR}${_LIBDIR}/lib${LIB}.a + ${_INSTALLFLAGS} libncursesw.ald ${DESTDIR}${_LIBDIR}/lib${LIB}.a realinstall: install-libncursesw.a From nobody Wed Nov 24 10:03:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E014018AB204; Wed, 24 Nov 2021 10:03: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 4Hzc6H3KJzz3Fkv; Wed, 24 Nov 2021 10:03:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36C0788; Wed, 24 Nov 2021 10:03: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 1AOA3pHS008906; Wed, 24 Nov 2021 10:03:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOA3pxZ008905; Wed, 24 Nov 2021 10:03:51 GMT (envelope-from git) Date: Wed, 24 Nov 2021 10:03:51 GMT Message-Id: <202111241003.1AOA3pxZ008905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: a46722b58056 - main - ncurses: register formw as usable lib for LIBADD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a46722b580567799b484b5a81728eaf380777e04 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637748231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8LJEJ7uJM7bQoRx3Jv8sozGVQa0iXlW02oo32yKUTi8=; b=qvYRQbkUi2lGAjiZ4EEMnjti5FVNNjomgcxNhVY6dNGzErgHmCZ1yPLxuB1OPTQVKXyQ3S BkTr3GnTazwAKS6XeOYZbMcIwhCBBOo/SVUCmmcMwpr4nFdiwwQmEkdhkH/qUyVi8cvPDq iAujvlP2pE6ato+9QCoqc6s63LtmfxqmKB9jq1yDzKMa0jCfBfqKTVnVrmjouyqt6m+Vsv lpzXcgAGuGQ78A3EUFYNogY7BOqdijRKYQsrxJJIcAvdurruJNPebBe6dnJ6/WyQRn2IOj 2L6n7ZnVObbAcX3udwrkojI7TzXGpJc4B0COnYlGcgnhD+8ORe+H8xAtAzeF/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637748231; a=rsa-sha256; cv=none; b=xLj85t7VLoEDzMqOhqyNnkK/OBgGFDu3ao2PA8ijRLKm+R6cIRrR+aLymRqcPOHQeuwYBp H8IQ0cpoDTSP0kb3J0j/KwAjAtdr6WWDtUiCOYTdnmaQI22PdGF5f6AhUmhFCbtvDk+Vjz PSwjAavgg2IF3qVz5xBqjEC0YpSQVuyVM3Zeo5s4iafuOSUGIkyH/PZCoGULqCa9Ch79Xb d32ufKSLUh09uaN7HlLysL/n77DcRVRas6miSbOsDimBqgDtrNEmhC+x0Ib7XApyI78Vmo TupIYiZf/2Qspb+CQXkpcRulDt6PI3DgiDV5HcNk1syMZpyxwceZXHJqNmmfGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=a46722b580567799b484b5a81728eaf380777e04 commit a46722b580567799b484b5a81728eaf380777e04 Author: Baptiste Daroussin AuthorDate: 2021-11-24 09:20:10 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 10:02:22 +0000 ncurses: register formw as usable lib for LIBADD --- share/mk/src.libnames.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 7873d05d18da..6fee77357480 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -129,6 +129,7 @@ _LIBRARIES= \ execinfo \ fetch \ figpar \ + formw \ geom \ gpio \ gssapi \ @@ -381,6 +382,7 @@ _DP_stats= sbuf pthread _DP_stdthreads= pthread _DP_tacplus= md _DP_ncursesw= tinfow +_DP_formw= ncursesw _DP_nvpair= spl _DP_panelw= ncursesw _DP_rpcsec_gss= gssapi From nobody Wed Nov 24 10:03:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A62DE18AB037; Wed, 24 Nov 2021 10:03: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 4Hzc6K01b7z3FqF; Wed, 24 Nov 2021 10:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F93E27DE6; Wed, 24 Nov 2021 10:03: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 1AOA3qR9008930; Wed, 24 Nov 2021 10:03:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOA3qAA008929; Wed, 24 Nov 2021 10:03:52 GMT (envelope-from git) Date: Wed, 24 Nov 2021 10:03:52 GMT Message-Id: <202111241003.1AOA3qAA008929@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: c76f07938c44 - main - Add 'contrib/bsddialog/' from commit '857c66bb5f3c5651b012beb1b5ea6ba39354ea94' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c76f07938c44264c7ebd400c23f218e561960d23 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637748233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tyObdUn6FYOd/AtGKy3xIRi9QtTM0NiCq78vjR55/SY=; b=rBOGn65ECGKRaqttqKlW6pup0kWqUdFJ7tSFiMXuIH3ms5JRHefgEWvllykry4vdLdHJMM KFLRyzIDLhkJoUsLyCGWNvJtH7fyL0v8idwg04cU5Pu1pl0OAPtj1EJ/FZJsohZ3OGlP+6 /HCUAQAWLKRsIXEBbNJBnS1dkS7StSeBbo+f90fctlpeNqiEMBQzQ0CTYjmQOVlQqlKbeF yhq4dUs7MmGbQDpUWR94Vff8rzOZxAI04XMvGS3MJe9IFaGSWLSEiOWZWT2In1/jaXuGad xQ1rWDyOhGpJIlFMzxlr5mMzLIZgBW8JRWCp003rqrC+HOvoyCDp0d4AIr7wqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637748233; a=rsa-sha256; cv=none; b=ew0efZwUAuSVcmv5Fhc9x6FqVOPddUWd3DuKcBQnmG4s1mMu65CgbjzvWHU8F6YSY1Fadw ZCTfiqd0Zi1ej+mkbK57x3sU0W6FpvKKFUzVGgsKmUBPtcARGG72wmcd7zi4gp5qqzjw1b lET7KzzFWSbq1o54K7csvPWaj3DKg4/V8KdhY/cWhgiwt6r3IKwNq8AC+Mt7emekPYtEN7 ykBKU4l41QJIbUMHHo4vOmyx9XkHLAS5U0HjI9QU4ICJ/ovD/1RLzOQz2YFHPalVKld/Wz 2Xk4RyiS9U6h9RNJyMY10DLvDtJNGIk1IExZbigKpMuo89r0jZQEO44VZ8ElCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=c76f07938c44264c7ebd400c23f218e561960d23 commit c76f07938c44264c7ebd400c23f218e561960d23 Merge: a46722b58056 857c66bb5f3c Author: Baptiste Daroussin AuthorDate: 2021-11-24 10:03:17 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 10:03:17 +0000 Add 'contrib/bsddialog/' from commit '857c66bb5f3c5651b012beb1b5ea6ba39354ea94' git-subtree-dir: contrib/bsddialog git-subtree-mainline: a46722b580567799b484b5a81728eaf380777e04 git-subtree-split: 857c66bb5f3c5651b012beb1b5ea6ba39354ea94 contrib/bsddialog/GNUMakefile | 28 + contrib/bsddialog/LICENSE | 24 + contrib/bsddialog/Makefile | 49 + contrib/bsddialog/README.md | 160 +++ contrib/bsddialog/bsddialog.c | 1263 ++++++++++++++++++++ contrib/bsddialog/lib/GNUMakefile | 31 + contrib/bsddialog/lib/Makefile | 73 ++ contrib/bsddialog/lib/barbox.c | 369 ++++++ contrib/bsddialog/lib/bsddialog.h | 257 ++++ contrib/bsddialog/lib/bsddialog_theme.h | 96 ++ contrib/bsddialog/lib/commandbox.c | 211 ++++ contrib/bsddialog/lib/editorbox.c | 45 + contrib/bsddialog/lib/filebox.c | 52 + contrib/bsddialog/lib/formbox.c | 396 ++++++ contrib/bsddialog/lib/infobox.c | 114 ++ contrib/bsddialog/lib/lib_util.c | 996 +++++++++++++++ contrib/bsddialog/lib/lib_util.h | 146 +++ contrib/bsddialog/lib/libbsddialog.c | 142 +++ contrib/bsddialog/lib/menubox.c | 1015 ++++++++++++++++ contrib/bsddialog/lib/messagebox.c | 278 +++++ contrib/bsddialog/lib/textbox.c | 280 +++++ contrib/bsddialog/lib/theme.c | 286 +++++ contrib/bsddialog/lib/timebox.c | 241 ++++ contrib/bsddialog/library_examples/buildlist.c | 44 + contrib/bsddialog/library_examples/checklist.c | 44 + contrib/bsddialog/library_examples/compile | 10 + contrib/bsddialog/library_examples/infobox.c | 32 + contrib/bsddialog/library_examples/menu.c | 44 + contrib/bsddialog/library_examples/mixedlist.c | 71 ++ contrib/bsddialog/library_examples/msgbox.c | 42 + contrib/bsddialog/library_examples/ports.c | 97 ++ contrib/bsddialog/library_examples/radiolist.c | 44 + contrib/bsddialog/library_examples/theme.c | 67 ++ contrib/bsddialog/library_examples/treeview.c | 44 + contrib/bsddialog/library_examples/yesno.c | 32 + contrib/bsddialog/screenshot.png | Bin 0 -> 11050 bytes .../bsddialog/utility_examples/gauge_example.sh | 20 + contrib/bsddialog/utility_examples/info_example.sh | 3 + contrib/bsddialog/utility_examples/menu_example.sh | 41 + .../bsddialog/utility_examples/message_example.sh | 5 + .../utility_examples/mixedform_example.sh | 25 + .../utility_examples/mixedgauge_example.sh | 24 + 42 files changed, 7241 insertions(+) diff --cc contrib/bsddialog/GNUMakefile index 000000000000,7480ae33ec21..7480ae33ec21 mode 000000,100644..100644 --- a/contrib/bsddialog/GNUMakefile +++ b/contrib/bsddialog/GNUMakefile diff --cc contrib/bsddialog/LICENSE index 000000000000,434f1782e537..434f1782e537 mode 000000,100644..100644 --- a/contrib/bsddialog/LICENSE +++ b/contrib/bsddialog/LICENSE diff --cc contrib/bsddialog/Makefile index 000000000000,000000000000..295aa927e4c5 new file mode 100644 --- /dev/null +++ b/contrib/bsddialog/Makefile @@@ -1,0 -1,0 +1,49 @@@ ++# Any copyright is dedicated to the Public Domain, see: ++# ++# ++# Written by Alfonso Sabato Siciliano ++ ++OUTPUT= bsddialog ++SOURCES= bsddialog.c ++OBJECTS= ${SOURCES:.c=.o} ++LIBPATH= ${.CURDIR}/lib ++LIBBSDDIALOG= ${LIBPATH}/libbsddialog.so ++ ++CFLAGS= -Wall -I${LIBPATH} ++LDFLAGS= -Wl,-rpath=${LIBPATH} -L${LIBPATH} -lbsddialog ++ ++BINDIR= /usr/local/bin ++MAN= ${OUTPUT}.1 ++GZIP= gzip -cn ++MANDIR= /usr/local/share/man/man1 ++ ++INSTALL= install ++RM= rm -f ++ ++all : ${OUTPUT} ++ ++${OUTPUT}: ${LIBBSDDIALOG} ${OBJECTS} ++ ${CC} ${LDFLAGS} ${OBJECTS} -o ${.PREFIX} ++ ++${LIBBSDDIALOG}: ++.if defined(PORTNCURSES) ++ make -C ${LIBPATH} -DPORTNCURSES ++.else ++ make -C ${LIBPATH} ++.endif ++ ++.c.o: ++ ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} ++ ++install: ++ ${INSTALL} -s -m 555 ${OUTPUT} ${BINDIR} ++ ${GZIP} ${MAN} > ${MAN}.gz ++ ${INSTALL} -m 444 ${MAN}.gz ${MANDIR} ++ ++unistall: ++ ${RM} ${BINDIR}/${OUTPUT} ++ ${RM} ${MANDIR}/${MAN}.gz ++ ++clean: ++ make -C ${LIBPATH} clean ++ ${RM} ${OUTPUT} *.o *~ *.core ${MAN}.gz diff --cc contrib/bsddialog/README.md index 000000000000,000000000000..1d34f3b51099 new file mode 100644 --- /dev/null +++ b/contrib/bsddialog/README.md @@@ -1,0 -1,0 +1,160 @@@ ++# BSDDialog ++ ++**Work In Progress!** ++ ++This project provides **bsddialog** and **libbsddialog**, an utility and a ++library to build scripts and tools with *TUI Widgets*. ++ ++Description: ++ ++ ++ ++## Getting Started ++ ++FreeBSD: ++ ++``` ++% git clone https://gitlab.com/alfix/bsddialog.git ++% cd bsddialog ++% make ++% ./bsddialog --msgbox "Hello World!" 8 20 ++``` ++ ++If you are using XFCE install ++[devel/ncurses](https://www.freshports.org/devel/ncurses/) ++ ++``` ++% sudo pkg install ncurses ++% git clone https://gitlab.com/alfix/bsddialog.git ++% cd bsddialog ++% make -DPORTNCURSES ++% ./bsddialog --msgbox "Hello World!" 8 20 ++``` ++ ++Linux: ++ ++``` ++% git clone https://gitlab.com/alfix/bsddialog.git ++% cd bsddialog ++% make -GNUMakefile ++% ./bsddialog --msgbox "Hello World!" 8 20 ++``` ++ ++Output: ++ ++![screenshot](screenshot.png) ++ ++ ++Examples utility: ++``` ++% ./bsddialog --title msgbox --msgbox "Hello World!" 5 30 ++% ./bsddialog --theme default --title msgbox --msgbox "Hello World!" 5 30 ++% ./bsddialog --begin-y 2 --title yesno --yesno "Hello World!" 5 30 ++% ./bsddialog --ascii-lines --pause "Hello World!" 8 50 5 ++% ./bsddialog --checklist "Space to select" 0 0 0 Name1 Desc1 off Name2 Desc2 on Name3 Desc3 off ++% ./bsddialog --backtitle "TITLE" --title yesno --hline "bsddialog" --yesno "Hello World!" 5 25 ++% ./bsddialog --extra-button --help-button --defaultno --yesno "Hello World!" 0 0 ++``` ++ ++Examples library: ++``` ++% cd library_examples ++% sh compile ++% ./buildlist ++% ./infobox ++% ./menu ++% ./mixedlist ++% ./msgbox ++% ./ports ++% ./radiolist ++% ./theme ++% ./treeview ++% ./yesno ++``` ++ ++Use Cases: ++ ++ - [portconfig](https://gitlab.com/alfix/portconfig) ++ ++ ++## Features ++ ++**Common Options:** ++ ++--ascii-lines, --aspect *ratio* (for infobox, msgbox and yesno), ++--backtitle *backtitle*, --begin-x *x* (--begin *y y*), ++(--begin *y x*), --cancel-label *string*, -clear (test with multiple widgets), ++--colors, --date-format *format*, --default-button *string*, --defaultno, ++--default-item *string*, ++--exit-label *string*, --extra-button, --extra-label *string*, ++--hfile *filename* (for completed widgets), n--help-button, ++--help-label *string*, --help-status, --help-tags, --hline *string*, --ignore, ++--item-help, --no-cancel, --nocancel, --no-label *string*, --no-items, ++--no-lines, --no-ok, ++--nook, --no-shadow, --no-tags, --ok-label *string*, --output-fd *fd*, ++--output-separator *string*, --print-version, ++--print-size (todo move lib -> utility), --quoted (quotes all != dialog), ++--print-maxsize, --shadow, --single-quoted (add --quote-with *ch*?), ++--separator *string* (alias --output-separator *string*), ++--separate-output (rename --separate-output-withnl?), --sleep *secs*, --stderr, ++--stdout, --theme *string* ("bsddialog", "dialog", "blackwhite" and "magenta"), ++--time-format *format*, --title *title*, --version, --yes-label *string*. ++ ++**Widgets:** ++ ++ infobox (do not clear the screen), msgbox, ++ yesno (dialog renames "yes/no" -> "ok/cancel" with --extra-button --help-button). ++ checklist, radiolist, menu, mixedlist, treeview and textbox. ++ ++## TODO ++ ++**Common Options:** ++ ++| Option | Status | Note | ++| ---------------------------- | ----------- | ------------------------------- | ++| --cr-wrap | Coding | | ++| --help | In progress | | ++| --input-fd *fd* | | | ++| --insecure | | | ++| --keep-tite | | | ++| --keep-window | | | ++| --last-key | | | ++| --max-input *size* | | | ++| --no-collapse | Coding | | ++| --no-kill | | | ++| --no-nl-expand | Coding | | ++| --tab-correct | | | ++| --tab-len *n* | | | ++| --trim | Coding | | ++ ++ ++To evaluate / Not planned in the short term: --column-separator *string*, ++--create-rc *file*, --iso-week, --no-mouse, --print-text-only *str h w*, ++--print-text-size *str h w*, --reorder, -scrollbar, --separate-widget *string*, ++--size-err, --timeout *secs*,--trace *filename*, --visit-items, ++--week-start *day*. ++ ++ ++**Widgets:** ++ ++| Widget | Status | Note | ++|--------------- | ----------- | ----------------------------------------------| ++| --buildlist | In progress | todo autosize, resize, F1 | ++| --calendar | In progress | todo autosize, resize, F1, leap year, year <=0, month days | ++| --editbox | | | ++| --form | In progress | implemented via --mixedform | ++| --gauge | In progress | | ++| --inputbox | In progress | implemented via --mixedform, todo \ | ++| --mixedform | In progress | todo autosize, resize, F1 | ++| --mixedgauge | In progress | todo autosize, resize, F1 | ++| --passwordbox | In progress | implemented via --mixedform, todo \ | ++| --passwordform | In progress | implemented via --mixedform | ++| --pause | In progress | todo autosize, resize, F1 | ++| --prgbox | In progress | add command opts | ++| --programbox | Coding | | ++| --progressbox | | | ++| --rangebox | In progress | todo autosize, resize, F1, PAGE-UP/PAGE-DOWN/HOME/END keys | ++| --timebox | In progress | todo autosize, resize, F1 | ++ ++To evaluate / Not planned in the short term: tailbox (textbox/fseek), tailboxbg, ++dselect, fselect, inputmenu. diff --cc contrib/bsddialog/bsddialog.c index 000000000000,249f1d3c4f3a..249f1d3c4f3a mode 000000,100644..100644 --- a/contrib/bsddialog/bsddialog.c +++ b/contrib/bsddialog/bsddialog.c diff --cc contrib/bsddialog/lib/GNUMakefile index 000000000000,26dbdce9d4a0..26dbdce9d4a0 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/GNUMakefile +++ b/contrib/bsddialog/lib/GNUMakefile diff --cc contrib/bsddialog/lib/Makefile index 000000000000,000000000000..74b6bc174a38 new file mode 100644 --- /dev/null +++ b/contrib/bsddialog/lib/Makefile @@@ -1,0 -1,0 +1,73 @@@ ++# Any copyright is dedicated to the Public Domain, see: ++# ++# ++# Written by Alfonso Sabato Siciliano ++ ++VERSION = 0.1 ++LIBRARY = bsddialog ++LIBRARY_SO = lib${LIBRARY:=.so} ++HEADERS = bsddialog.h bsddialog_theme.h ++SOURCES = barbox.c editorbox.c formbox.c lib_util.c menubox.c textbox.c \ ++ timebox.c commandbox.c filebox.c infobox.c libbsddialog.c messagebox.c \ ++ theme.c ++OBJECTS= ${SOURCES:.c=.o} ++FBSDFLAGS= -O2 -pipe -std=gnu99 -Wno-format-zero-length \ ++ -fstack-protector-strong -Qunused-arguments ++CFLAGS = -I/usr/local/include -fPIC -Wall -Wextra ${FBSDFLAGS} ++LDFLAGS = -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-warnings \ ++ -Wl,--warn-shared-textrel -Wl,-soname,${LIBRARY_SO}.${VERSION} ++ ++INSTALL_PREFIX=/usr/local ++LN = ln -s -f ++RM = rm -f ++CP = cp ++GZIP = gzip -cn ++LDCONFIG = /sbin/ldconfig -m ++ ++.if defined(PORTNCURSES) ++# PORT ncurses `make -DPORTNCURSES` or `make -D PORTNCURSES` ++CFLAGS += -DPORTNCURSES -I/usr/local/include ++LDFLAGS += -L/usr/local/lib -lform -lncurses -ltinfo ++.else ++# BASE ncurses ++LDFLAGS += -L/usr/lib -lform -lncurses -ltinfo ++.endif ++ ++MAN= ${OUTPUT}.3 ++GZIP= gzip -cn ++MANDIR= /usr/local/share/man/man3 ++ ++INSTALL= install ++RM= rm -f ++ ++#all : man ${LIBRARY} ++all : ${LIBRARY} ++ ++${LIBRARY}: ${OBJECTS} ++ ${CC} ${LDFLAGS} ${.ALLSRC} -o ${LIBRARY_SO}.${VERSION} ++ # LN for devel ++ ${LN} ${LIBRARY_SO}.${VERSION} ${LIBRARY_SO} ++ ++.c.o: ++ ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} ++ ++man: ++ ${GZIP} ${LIBRARY}.3 > ${LIBRARY}.3.gz ++ ++clean: ++ ${RM} ${LIBRARY_SO}* *.o *~ *.gz ++ ++ ++install: ++ ${CP} ${LIBRARY}.h ${INSTALL_PREFIX}/include ++ ${CP} ${LIBRARY_SO}.${VERSION} ${INSTALL_PREFIX}/lib/ ++ ${LN} ${INSTALL_PREFIX}/lib/${LIBRARY_SO}.${VERSION} ${INSTALL_PREFIX}/lib/${LIBRARY_SO} ++ ${LDCONFIG} ${INSTALL_PREFIX}/lib ++ ${CP} ${LIBRARY}.3.gz ${INSTALL_PREFIX}/man/man3/ ++ ++unistall: ++ ${RM} ${INSTALL_PREFIX}/include/${LIBRARY}.h ++ ${RM} ${INSTALL_PREFIX}/lib/${LIBRARY_SO} ++ ${RM} ${INSTALL_PREFIX}/lib/${LIBRARY_SO}.${VERSION} ++ ${LDCONFIG} ${INSTALL_PREFIX}/lib ++ ${RM} ${INSTALL_PREFIX}/man/man3/${LIBRARY}.3.gz diff --cc contrib/bsddialog/lib/barbox.c index 000000000000,bb341605d6f5..bb341605d6f5 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/barbox.c +++ b/contrib/bsddialog/lib/barbox.c diff --cc contrib/bsddialog/lib/bsddialog.h index 000000000000,e6c2cc67f581..e6c2cc67f581 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/bsddialog.h +++ b/contrib/bsddialog/lib/bsddialog.h diff --cc contrib/bsddialog/lib/bsddialog_theme.h index 000000000000,b39b8840bce8..b39b8840bce8 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/bsddialog_theme.h +++ b/contrib/bsddialog/lib/bsddialog_theme.h diff --cc contrib/bsddialog/lib/commandbox.c index 000000000000,e5d65166e230..e5d65166e230 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/commandbox.c +++ b/contrib/bsddialog/lib/commandbox.c diff --cc contrib/bsddialog/lib/editorbox.c index 000000000000,b0f57908aa0e..b0f57908aa0e mode 000000,100644..100644 --- a/contrib/bsddialog/lib/editorbox.c +++ b/contrib/bsddialog/lib/editorbox.c diff --cc contrib/bsddialog/lib/filebox.c index 000000000000,b951f4e0d0f0..b951f4e0d0f0 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/filebox.c +++ b/contrib/bsddialog/lib/filebox.c diff --cc contrib/bsddialog/lib/formbox.c index 000000000000,f636db7990dd..f636db7990dd mode 000000,100644..100644 --- a/contrib/bsddialog/lib/formbox.c +++ b/contrib/bsddialog/lib/formbox.c diff --cc contrib/bsddialog/lib/infobox.c index 000000000000,0d3eca86a258..0d3eca86a258 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/infobox.c +++ b/contrib/bsddialog/lib/infobox.c diff --cc contrib/bsddialog/lib/lib_util.c index 000000000000,a1cdac1169c4..a1cdac1169c4 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/lib_util.c +++ b/contrib/bsddialog/lib/lib_util.c diff --cc contrib/bsddialog/lib/lib_util.h index 000000000000,b6fe1dd86b59..b6fe1dd86b59 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/lib_util.h +++ b/contrib/bsddialog/lib/lib_util.h diff --cc contrib/bsddialog/lib/libbsddialog.c index 000000000000,a5866f39bea9..a5866f39bea9 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/libbsddialog.c +++ b/contrib/bsddialog/lib/libbsddialog.c diff --cc contrib/bsddialog/lib/menubox.c index 000000000000,523e41fdeb1b..523e41fdeb1b mode 000000,100644..100644 --- a/contrib/bsddialog/lib/menubox.c +++ b/contrib/bsddialog/lib/menubox.c diff --cc contrib/bsddialog/lib/messagebox.c index 000000000000,2920986b48a8..2920986b48a8 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/messagebox.c +++ b/contrib/bsddialog/lib/messagebox.c diff --cc contrib/bsddialog/lib/textbox.c index 000000000000,2874aa5832b9..2874aa5832b9 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/textbox.c +++ b/contrib/bsddialog/lib/textbox.c diff --cc contrib/bsddialog/lib/theme.c index 000000000000,7c27a85af74f..7c27a85af74f mode 000000,100644..100644 --- a/contrib/bsddialog/lib/theme.c +++ b/contrib/bsddialog/lib/theme.c diff --cc contrib/bsddialog/lib/timebox.c index 000000000000,f7abfd8c0f31..f7abfd8c0f31 mode 000000,100644..100644 --- a/contrib/bsddialog/lib/timebox.c +++ b/contrib/bsddialog/lib/timebox.c diff --cc contrib/bsddialog/library_examples/buildlist.c index 000000000000,f5d991bcb2e6..f5d991bcb2e6 mode 000000,100644..100644 --- a/contrib/bsddialog/library_examples/buildlist.c +++ b/contrib/bsddialog/library_examples/buildlist.c diff --cc contrib/bsddialog/library_examples/checklist.c index 000000000000,104c2285a6e1..104c2285a6e1 mode 000000,100644..100644 --- a/contrib/bsddialog/library_examples/checklist.c +++ b/contrib/bsddialog/library_examples/checklist.c diff --cc contrib/bsddialog/library_examples/compile index 000000000000,3215dceb72b6..3215dceb72b6 mode 000000,100755..100755 --- a/contrib/bsddialog/library_examples/compile +++ b/contrib/bsddialog/library_examples/compile diff --cc contrib/bsddialog/library_examples/infobox.c index 000000000000,8def8a482920..8def8a482920 mode 000000,100644..100644 --- a/contrib/bsddialog/library_examples/infobox.c +++ b/contrib/bsddialog/library_examples/infobox.c diff --cc contrib/bsddialog/library_examples/menu.c index 000000000000,04306e8317f4..04306e8317f4 mode 000000,100644..100644 --- a/contrib/bsddialog/library_examples/menu.c +++ b/contrib/bsddialog/library_examples/menu.c diff --cc contrib/bsddialog/library_examples/mixedlist.c index 000000000000,8b918b707869..8b918b707869 mode 000000,100644..100644 --- a/contrib/bsddialog/library_examples/mixedlist.c +++ b/contrib/bsddialog/library_examples/mixedlist.c diff --cc contrib/bsddialog/library_examples/msgbox.c index 000000000000,93ac5201425e..93ac5201425e mode 000000,100644..100644 --- a/contrib/bsddialog/library_examples/msgbox.c +++ b/contrib/bsddialog/library_examples/msgbox.c diff --cc contrib/bsddialog/library_examples/ports.c index 000000000000,1a5c514490e7..1a5c514490e7 mode 000000,100644..100644 --- a/contrib/bsddialog/library_examples/ports.c +++ b/contrib/bsddialog/library_examples/ports.c diff --cc contrib/bsddialog/library_examples/radiolist.c index 000000000000,39570d4b6602..39570d4b6602 mode 000000,100644..100644 --- a/contrib/bsddialog/library_examples/radiolist.c +++ b/contrib/bsddialog/library_examples/radiolist.c diff --cc contrib/bsddialog/library_examples/theme.c index 000000000000,56ed4459cacb..56ed4459cacb mode 000000,100644..100644 --- a/contrib/bsddialog/library_examples/theme.c +++ b/contrib/bsddialog/library_examples/theme.c diff --cc contrib/bsddialog/library_examples/treeview.c index 000000000000,d4c7afb4a1d0..d4c7afb4a1d0 mode 000000,100644..100644 --- a/contrib/bsddialog/library_examples/treeview.c +++ b/contrib/bsddialog/library_examples/treeview.c diff --cc contrib/bsddialog/library_examples/yesno.c index 000000000000,035b65c69a12..035b65c69a12 mode 000000,100644..100644 --- a/contrib/bsddialog/library_examples/yesno.c +++ b/contrib/bsddialog/library_examples/yesno.c diff --cc contrib/bsddialog/screenshot.png index 000000000000,940a56c722e7..940a56c722e7 mode 000000,100644..100644 Binary files differ diff --cc contrib/bsddialog/utility_examples/gauge_example.sh index 000000000000,b17f20274c79..b17f20274c79 mode 000000,100755..100755 --- a/contrib/bsddialog/utility_examples/gauge_example.sh +++ b/contrib/bsddialog/utility_examples/gauge_example.sh diff --cc contrib/bsddialog/utility_examples/info_example.sh index 000000000000,a57afa5fad88..a57afa5fad88 mode 000000,100755..100755 --- a/contrib/bsddialog/utility_examples/info_example.sh +++ b/contrib/bsddialog/utility_examples/info_example.sh diff --cc contrib/bsddialog/utility_examples/menu_example.sh index 000000000000,dc41279a6b71..dc41279a6b71 mode 000000,100755..100755 --- a/contrib/bsddialog/utility_examples/menu_example.sh +++ b/contrib/bsddialog/utility_examples/menu_example.sh diff --cc contrib/bsddialog/utility_examples/message_example.sh index 000000000000,ac9dcc6e48b6..ac9dcc6e48b6 mode 000000,100755..100755 --- a/contrib/bsddialog/utility_examples/message_example.sh +++ b/contrib/bsddialog/utility_examples/message_example.sh diff --cc contrib/bsddialog/utility_examples/mixedform_example.sh index 000000000000,079805996dad..079805996dad mode 000000,100755..100755 --- a/contrib/bsddialog/utility_examples/mixedform_example.sh +++ b/contrib/bsddialog/utility_examples/mixedform_example.sh diff --cc contrib/bsddialog/utility_examples/mixedgauge_example.sh index 000000000000,900639f9ee84..900639f9ee84 mode 000000,100755..100755 --- a/contrib/bsddialog/utility_examples/mixedgauge_example.sh +++ b/contrib/bsddialog/utility_examples/mixedgauge_example.sh From nobody Wed Nov 24 10:03:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 767EE18AB116; Wed, 24 Nov 2021 10:03: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 4Hzc6K6hffz3Fl3; Wed, 24 Nov 2021 10:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B85C327FEB; Wed, 24 Nov 2021 10:03: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 1AOA3rvS008961; Wed, 24 Nov 2021 10:03:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOA3rnX008960; Wed, 24 Nov 2021 10:03:53 GMT (envelope-from git) Date: Wed, 24 Nov 2021 10:03:53 GMT Message-Id: <202111241003.1AOA3rnX008960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 37d0601f4273 - main - bsddialog: import new TUI widget and utility List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37d0601f4273810f69440469e6b5625130bbc899 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637748234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XZRHEI+OQ9DSwYck/QoGF+ID/ZPWzoGmu8bWC1wU34U=; b=BwJm7EVdC+Fd7Bub8X55MZf+dTAepIkcWY3GyJOHFRqZHmmZCVqtoOb61ulWc5wZTbBYx3 H1NKaAQMj3bvjeIdD72tS8hl29NS2yZDUVLr4ke5N8qJCTXESxmVaOGx5jeeEwCTxvEcXg KqfrUMfUiiT2XY3CLEIsy6uk27eJL7i0cq2XWsBy1oQ1InaFmd7bPCsb69Q0PnvsuWHwUs gbEv+fKSJdySrbAMezz2x6/31xa8vTSbuI3xtmQQgqkFV/MOWOR+KJRB5lFeGSTW0VhSXE saeVgPswAhIW5KSLmzugi3XjaDHLkW+ueSRiOXFLBPmO6TGPWmsAR7KOqd0ZCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637748234; a=rsa-sha256; cv=none; b=HhcSdVCAXoCZNowxmEdBIhgdtg5MEQuItVT+NRB9oSCHgd4b7D2TFT1LObtnCtpzpQSmfk 7c7eiD/o1/Q0OVVYSRVfVRvtvNuU/xW+sEyzgg17saaHduGYjwYHUhPtwe4LIF41Aye2rN H74IjhJ+Q3mzPsormue0yjuP+vcvwmlUWXEMf9Aga+Fb4T2t7Hz1XjlheuR/UIgbWJH66M 8YdipRI2HTS5xeqtTPWc8/HKeVYrRw9ed3cAlTkhGw0g6JjrUsQs3+yAAt/aasoIm2l/IV TlyPZTPkWI+DfSSsuwrufYl3pVA5xa6S2FzdoxsE/Ftxp17Z2HG+dYcgsCm2Xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=37d0601f4273810f69440469e6b5625130bbc899 commit 37d0601f4273810f69440469e6b5625130bbc899 Author: Baptiste Daroussin AuthorDate: 2021-11-24 09:26:46 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 10:03:31 +0000 bsddialog: import new TUI widget and utility bsddialog is an attempt to write in permissive license a replacement for libdialog. While it is still in early stage it is good enough to already be used in many areas, it is imported as private lib until it matures enough to be considered as having a stable ABI --- etc/mtree/BSD.usr.dist | 2 ++ lib/Makefile | 1 + share/mk/src.libnames.mk | 2 ++ 3 files changed, 5 insertions(+) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 5eaaed4e1265..891372c8148f 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -9,6 +9,8 @@ .. include private + bsddialog + .. bsdstat .. event1 diff --git a/lib/Makefile b/lib/Makefile index 93761cc06b21..3af6b938ee74 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -36,6 +36,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libauditd \ libbegemot \ libblocksruntime \ + libbsddialog \ libbsdstat \ libbsm \ libbz2 \ diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 6fee77357480..bc3ad9c4bf40 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -16,6 +16,7 @@ _PRIVATELIBS= \ atf_c \ atf_cxx \ auditd \ + bsddialog \ bsdstat \ cbor \ devdctl \ @@ -262,6 +263,7 @@ _DP_80211= sbuf bsdxml _DP_9p= sbuf _DP_archive= z bz2 lzma bsdxml zstd _DP_avl= spl +_DP_bsddialog= formw ncursesw tinfow _DP_zstd= pthread .if ${MK_BLACKLIST} != "no" _DP_blacklist+= pthread From nobody Wed Nov 24 10:03:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B48BE18AB294; Wed, 24 Nov 2021 10:03: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 4Hzc6M2CRcz3Fvx; Wed, 24 Nov 2021 10:03:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6CFA35; Wed, 24 Nov 2021 10:03: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 1AOA3sS7008985; Wed, 24 Nov 2021 10:03:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOA3ssV008984; Wed, 24 Nov 2021 10:03:54 GMT (envelope-from git) Date: Wed, 24 Nov 2021 10:03:54 GMT Message-Id: <202111241003.1AOA3ssV008984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: f872dde34c6a - main - tzsetup: replace libdialog with libbsddialog List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f872dde34c6af8c27e16905ebfdb62cddb4c35ba Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637748235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lCeyB5DwgrXEjoFGd21mtRzryXPb9cUigSmuhBlnp0k=; b=WISVGccgjqPYoGwkd2HPGCS6rZB/6ZXCbHuxMIln/j6kiPSn9VMuD3LoymMhsOqiiujcoX 7TO9yPw1U61Zj1ljtzIYue4cSmCag0fniW0B84RLk0g5fB7/L4kqB0J294DQosp8dAANpC +drF7GblE8WsBx/4/3ucNKHXq9QX23U0Eyf4q6BUiAhhbir8T269qgFc4wnxelwIV9ofFV QA61zk38Bfl6aO6JRAkhP9iCkxBf7vE+kWBC8CcJlXc9YE+Ryz758RyWm5TH2LhofYt8Xs n81MAt6xGhHOpfr9AK09QavFNTKPZK23xFTH5PwPHsKAES2kxFl8rUo6R0LgvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637748235; a=rsa-sha256; cv=none; b=qoOZ4AtFJH0z0OpbSperlfdqk+/2KjPXAtrXJE40AeKaqh/eATGuihlnaHO+vS3O0sCKq+ cI57kpCPO9Td8QGEHc6O53hDpi/w1vMRCX0pRSTDnx8ZPFKUTAd2JK2cqXVRNWX40knU+E BMg7BVXlT2MUIpfmGc4DRZHIWp+3McVVFfMnOgElUEcK8qYnSRnwa13ygyOvBjnoqNz6L4 XdupwUqMu1a670NJN3gXoomDfUEDwxF/Ab96Q+nm1mS8e+K0QPf9frssj5kqIkNUOb5QfV eDDAtD3bMMPlcNcvmkW7q0K3dG1vi9/Zj5P0JuclDWqnuAjqEZRxLWQxK5JHpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=f872dde34c6af8c27e16905ebfdb62cddb4c35ba commit f872dde34c6af8c27e16905ebfdb62cddb4c35ba Author: Baptiste Daroussin AuthorDate: 2021-11-15 15:38:34 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 10:03:33 +0000 tzsetup: replace libdialog with libbsddialog Reviewed by: alfix86_gmail.com (bsddialog author) Differential Revision: https://reviews.freebsd.org/D33077 --- usr.sbin/tzsetup/Makefile | 6 +- usr.sbin/tzsetup/tzsetup.c | 189 +++++++++++++++++++++++---------------------- 2 files changed, 99 insertions(+), 96 deletions(-) diff --git a/usr.sbin/tzsetup/Makefile b/usr.sbin/tzsetup/Makefile index 7274b7680ca9..adef619b6596 100644 --- a/usr.sbin/tzsetup/Makefile +++ b/usr.sbin/tzsetup/Makefile @@ -7,10 +7,10 @@ MAN= tzsetup.8 CFLAGS+= -I. -.if ${MK_DIALOG} != no && !defined(BOOTSTRAPPING) +.if !defined(BOOTSTRAPPING) WARNS?= 3 -CFLAGS+= -I${SRCTOP}/contrib/dialog -DHAVE_DIALOG -LIBADD= dialog tinfow +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -DHAVE_BSDDIALOG +LIBADD= bsddialog .endif .include diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 6446800ce519..93871e27fb7b 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -49,8 +49,8 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef HAVE_DIALOG -#include +#ifdef HAVE_BSDDIALOG +#include #endif #define _PATH_ZONETAB "/usr/share/zoneinfo/zone1970.tab" @@ -86,7 +86,9 @@ static void usage(void); static int install_zoneinfo(const char *zoneinfo); static int install_zoneinfo_file(const char *zoneinfo_file); -#ifdef HAVE_DIALOG +#ifdef HAVE_BSDDIALOG +static struct bsddialog_conf conf; + /* for use in describing more exotic behaviors */ typedef struct dialogMenuItem { char *prompt; @@ -128,28 +130,30 @@ xdialog_count_columns(const char *p) } static int -xdialog_menu(const char *title, const char *cprompt, int height, int width, +xdialog_menu(char *title, char *cprompt, int height, int width, int menu_height, int item_no, dialogMenuItem *ditems) { int i, result, choice = 0; - DIALOG_LISTITEM *listitems; - DIALOG_VARS save_vars; - - dlg_save_vars(&save_vars); + struct bsddialog_menuitem *listitems; /* initialize list items */ - listitems = dlg_calloc(DIALOG_LISTITEM, item_no + 1); - assert_ptr(listitems, "xdialog_menu"); + listitems = calloc(item_no + 1, sizeof(struct bsddialog_menuitem)); + if (listitems == NULL) + errx(1, "Failed to allocate memory in xdialog_menu"); for (i = 0; i < item_no; i++) { + listitems[i].prefix = ""; + listitems[i].depth = 0; + listitems[i].bottomdesc = ""; + listitems[i].on = false; listitems[i].name = ditems[i].prompt; - listitems[i].text = ditems[i].title; + listitems[i].desc = ditems[i].title; } /* calculate height */ if (height < 0) height = xdialog_count_rows(cprompt) + menu_height + 4 + 2; - if (height > LINES) - height = LINES; + if (height > bsddialog_terminalheight()) + height = bsddialog_terminalheight() - 2; /* calculate width */ if (width < 0) { @@ -160,7 +164,7 @@ xdialog_menu(const char *title, const char *cprompt, int height, int width, l = strlen(listitems[i].name); for (j = 0; j < item_no; j++) { - int k = strlen(listitems[j].text); + int k = strlen(listitems[j].desc); tag_x = MAX(tag_x, l + k + 2); } } @@ -169,37 +173,39 @@ xdialog_menu(const char *title, const char *cprompt, int height, int width, width = MAX(width, tag_x + 4) + 4; } width = MAX(width, 24); - if (width > COLS) - width = COLS; + if (width > bsddialog_terminalwidth()) + width = bsddialog_terminalwidth() - 3; again: - dialog_vars.default_item = listitems[choice].name; - result = dlg_menu(title, cprompt, height, width, - menu_height, item_no, listitems, &choice, NULL); + conf.menu.default_item = listitems[choice].name; + conf.title = title; + result = bsddialog_menu(conf, cprompt, height, width, + menu_height, item_no, listitems, NULL); + for (int i = 0; i < item_no; i++) + if (listitems[i].on) + choice = i; switch (result) { - case DLG_EXIT_ESC: + case BSDDIALOG_ESC: result = -1; break; - case DLG_EXIT_OK: + case BSDDIALOG_YESOK: if (ditems[choice].fire != NULL) { int status; status = ditems[choice].fire(ditems + choice); if (status & DITEM_RECREATE) { - dlg_clear(); goto again; } } result = 0; break; - case DLG_EXIT_CANCEL: + case BSDDIALOG_NOCANCEL: default: result = 1; break; } free(listitems); - dlg_restore_vars(&save_vars); return (result); } @@ -657,7 +663,7 @@ set_zone_utc(void) static int confirm_zone(const char *filename) { - char title[64], prompt[64]; + char prompt[64]; time_t t = time(0); struct tm *tm; int rv; @@ -666,10 +672,10 @@ confirm_zone(const char *filename) tzset(); tm = localtime(&t); - snprintf(title, sizeof(title), "Confirmation"); snprintf(prompt, sizeof(prompt), "Does the abbreviation `%s' look reasonable?", tm->tm_zone); - rv = !dialog_yesno(title, prompt, 5, 72); + conf.title = "Confirmation"; + rv = !bsddialog_yesno(conf, prompt, 5, 72); return (rv); } @@ -705,7 +711,7 @@ static int install_zoneinfo_file(const char *zoneinfo_file) { char buf[1024]; - char title[64], prompt[SILLY_BUFFER_SIZE]; + char prompt[SILLY_BUFFER_SIZE]; struct stat sb; ssize_t len; int fd1, fd2, copymode; @@ -719,7 +725,6 @@ install_zoneinfo_file(const char *zoneinfo_file) copymode = 1; #ifdef VERBOSE - snprintf(title, sizeof(title), "Info"); if (copymode) snprintf(prompt, sizeof(prompt), "Copying %s to %s", zoneinfo_file, path_localtime); @@ -727,9 +732,10 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Creating symbolic link %s to %s", path_localtime, zoneinfo_file); -#ifdef HAVE_DIALOG +#ifdef HAVE_BSDDIALOG if (usedialog) - dialog_msgbox(title, prompt, 8, 72, 1); + conf.title = "Info"; + bsddialog_msgbox(conf, prompt, 8, 72); else #endif fprintf(stderr, "%s\n", prompt); @@ -739,14 +745,14 @@ install_zoneinfo_file(const char *zoneinfo_file) if (copymode) { fd1 = open(zoneinfo_file, O_RDONLY, 0); if (fd1 < 0) { - snprintf(title, sizeof(title), "Error"); snprintf(prompt, sizeof(prompt), "Could not open %s: %s", zoneinfo_file, strerror(errno)); -#ifdef HAVE_DIALOG - if (usedialog) - dialog_msgbox(title, prompt, 8, 72, 1); - else +#ifdef HAVE_BSDDIALOG + if (usedialog) { + conf.title = "Error"; + bsddialog_msgbox(conf, prompt, 8, 72); + } else #endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); @@ -756,10 +762,10 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Could not delete %s: %s", path_localtime, strerror(errno)); -#ifdef HAVE_DIALOG +#ifdef HAVE_BSDDIALOG if (usedialog) { - snprintf(title, sizeof(title), "Error"); - dialog_msgbox(title, prompt, 8, 72, 1); + conf.title = "error"; + bsddialog_msgbox(conf, prompt, 8, 72); } else #endif fprintf(stderr, "%s\n", prompt); @@ -769,14 +775,14 @@ install_zoneinfo_file(const char *zoneinfo_file) fd2 = open(path_localtime, O_CREAT | O_EXCL | O_WRONLY, S_IRUSR | S_IRGRP | S_IROTH); if (fd2 < 0) { - snprintf(title, sizeof(title), "Error"); snprintf(prompt, sizeof(prompt), "Could not open %s: %s", path_localtime, strerror(errno)); -#ifdef HAVE_DIALOG - if (usedialog) - dialog_msgbox(title, prompt, 8, 72, 1); - else +#ifdef HAVE_BSDDIALOG + if (usedialog) { + conf.title = "Error"; + bsddialog_msgbox(conf, prompt, 8, 72); + } else #endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); @@ -787,14 +793,14 @@ install_zoneinfo_file(const char *zoneinfo_file) break; if (len == -1) { - snprintf(title, sizeof(title), "Error"); snprintf(prompt, sizeof(prompt), "Error copying %s to %s %s", zoneinfo_file, path_localtime, strerror(errno)); -#ifdef HAVE_DIALOG - if (usedialog) - dialog_msgbox(title, prompt, 8, 72, 1); - else +#ifdef HAVE_BSDDIALOG + if (usedialog) { + conf.title = "Error"; + bsddialog_msgbox(conf, prompt, 8, 72); + } else #endif fprintf(stderr, "%s\n", prompt); /* Better to leave none than a corrupt one. */ @@ -805,14 +811,14 @@ install_zoneinfo_file(const char *zoneinfo_file) close(fd2); } else { if (access(zoneinfo_file, R_OK) != 0) { - snprintf(title, sizeof(title), "Error"); snprintf(prompt, sizeof(prompt), "Cannot access %s: %s", zoneinfo_file, strerror(errno)); -#ifdef HAVE_DIALOG - if (usedialog) - dialog_msgbox(title, prompt, 8, 72, 1); - else +#ifdef HAVE_BSDDIALOG + if (usedialog) { + conf.title = "Error"; + bsddialog_msgbox(conf, prompt, 8, 72); + } else #endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); @@ -821,25 +827,25 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Could not delete %s: %s", path_localtime, strerror(errno)); -#ifdef HAVE_DIALOG +#ifdef HAVE_BSDDIALOG if (usedialog) { - snprintf(title, sizeof(title), "Error"); - dialog_msgbox(title, prompt, 8, 72, 1); + conf.title = "Error"; + bsddialog_msgbox(conf, prompt, 8, 72); } else #endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); } if (symlink(zoneinfo_file, path_localtime) < 0) { - snprintf(title, sizeof(title), "Error"); snprintf(prompt, sizeof(prompt), "Cannot create symbolic link %s to %s: %s", path_localtime, zoneinfo_file, strerror(errno)); -#ifdef HAVE_DIALOG - if (usedialog) - dialog_msgbox(title, prompt, 8, 72, 1); - else +#ifdef HAVE_BSDDIALOG + if (usedialog) { + conf.title = "Error"; + bsddialog_msgbox(conf, prompt, 8, 72); + } else #endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); @@ -847,7 +853,6 @@ install_zoneinfo_file(const char *zoneinfo_file) } #ifdef VERBOSE - snprintf(title, sizeof(title), "Done"); if (copymode) snprintf(prompt, sizeof(prompt), "Copied timezone file from %s to %s", @@ -856,10 +861,11 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Created symbolic link from %s to %s", zoneinfo_file, path_localtime); -#ifdef HAVE_DIALOG - if (usedialog) - dialog_msgbox(title, prompt, 8, 72, 1); - else +#ifdef HAVE_BSDDIALOG + if (usedialog) { + conf.title = "Done"; + bsddialog_msgbox(conf, prompt, 8, 72); + } else #endif fprintf(stderr, "%s\n", prompt); #endif @@ -903,8 +909,8 @@ usage(void) int main(int argc, char **argv) { -#ifdef HAVE_DIALOG - char title[64], prompt[128]; +#ifdef HAVE_BSDDIALOG + char prompt[128]; int fd; #endif int c, rv, skiputc; @@ -928,7 +934,7 @@ main(int argc, char **argv) break; case 'r': reinstall = 1; -#ifdef HAVE_DIALOG +#ifdef HAVE_BSDDIALOG usedialog = 0; #endif break; @@ -993,7 +999,7 @@ main(int argc, char **argv) struct stat sb; if (stat(argv[optind], &sb) != 0) { -#ifdef HAVE_DIALOG +#ifdef HAVE_BSDDIALOG usedialog = 0; #endif rv = install_zoneinfo(argv[optind]); @@ -1001,28 +1007,31 @@ main(int argc, char **argv) } /* FALLTHROUGH */ } -#ifdef HAVE_DIALOG +#ifdef HAVE_BSDDIALOG read_iso3166_table(); read_zones(); sort_countries(); make_menus(); - init_dialog(stdin, stdout); + bsddialog_initconf(&conf); + conf.clear = true; + + if (bsddialog_init() < 0) + return (1); + if (skiputc == 0) { - DIALOG_VARS save_vars; int yesno; - snprintf(title, sizeof(title), - "Select local or UTC (Greenwich Mean Time) clock"); snprintf(prompt, sizeof(prompt), "Is this machine's CMOS clock set to UTC? " "If it is set to local time,\n" "or you don't know, please choose NO here!"); - dlg_save_vars(&save_vars); - dialog_vars.defaultno = TRUE; - yesno = dialog_yesno(title, prompt, 7, 73); - dlg_restore_vars(&save_vars); + + conf.button.defaultno = true; + conf.title = "Select local or UTC (Greenwich Mean Time) clock"; + yesno = bsddialog_yesno(conf, prompt, 7, 73); + conf.button.defaultno = false; if (!yesno) { if (reallydoit) unlink(path_wall_cmos_clock); @@ -1032,34 +1041,28 @@ main(int argc, char **argv) O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IRGRP | S_IROTH); if (fd < 0) { - end_dialog(); + bsddialog_end(); err(1, "create %s", path_wall_cmos_clock); } close(fd); } } - dlg_clear(); } if (optind == argc - 1) { - snprintf(title, sizeof(title), "Default timezone provided"); snprintf(prompt, sizeof(prompt), "\nUse the default `%s' zone?", argv[optind]); - if (!dialog_yesno(title, prompt, 7, 72)) { + conf.title = "Default timezone provided"; + if (!bsddialog_yesno(conf, prompt, 7, 72)) { rv = install_zoneinfo_file(argv[optind]); - dlg_clear(); - end_dialog(); + bsddialog_end(); exit(rv & ~DITEM_LEAVE_MENU); } - dlg_clear(); } - snprintf(title, sizeof(title), "Time Zone Selector"); - snprintf(prompt, sizeof(prompt), "Select a region"); - xdialog_menu(title, prompt, -1, -1, NCONTINENTS, NCONTINENTS, - continents); + xdialog_menu("Time Zone Selector", "Select a region", -1, -1, + NCONTINENTS, NCONTINENTS, continents); - dlg_clear(); - end_dialog(); + bsddialog_end(); #else usage(); #endif From nobody Wed Nov 24 10:12:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A0A3218AFCEE; Wed, 24 Nov 2021 10:12: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 4HzcJN2mWJz3Lph; Wed, 24 Nov 2021 10:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F369C7; Wed, 24 Nov 2021 10:12: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 1AOACatV022110; Wed, 24 Nov 2021 10:12:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOACaeg022109; Wed, 24 Nov 2021 10:12:36 GMT (envelope-from git) Date: Wed, 24 Nov 2021 10:12:36 GMT Message-Id: <202111241012.1AOACaeg022109@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 6ea39dd6c73b - main - tzsetup: remove dedundant declaration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ea39dd6c73b9667bfa7540d3b26295213105871 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637748756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4VgEFNfw94t19q6ppmq6sgflzOpyQ41j7F8ABNkNSD8=; b=o9j8d2pFA6NRB3p+Uq7CIdPaIkfVcUquKINN0iSrUyefknHEvOhWIVa3hfL0XmYG7883/8 /jafwhFgMkytdeVBlmqYs4OeKkgXbEqevdoUEWwm5QQVWI+HHSzFzzsLw+vQIYr7vpixOl 0vWhVY++yTsKtqZl+MoGiaAaOTmwa7ExnminzevGJZaBttK+Q/2HDXPzdA1Qsb7EgTba+Z qUNPdhBxz56xGiadyBWV2g2w5xDk8Bg+/3BQKSqu7VVsQzZO7+Xe3K4TzdOQmyquZ1KEU7 bmNjwm2FeiDWkhVw0WzGB1cJr5EsZLWZfI4NCLrZ2O9llbeJmCgJL6MpHmlX1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637748756; a=rsa-sha256; cv=none; b=VIFlKvcI1HJmU+HECOvV8QUh6l0VKWvgpkhhYx1vnGpF0Om+wceX7B24sUK9VHFswcZZKJ 6gqy0UNn0zmumuQEQrIP8n1pBZnYXUk0mWIXBe4N2aPv5sqcLQLbXLnzgKKQdiqGeu9s+R HgQ+nytAUADBHk5h/5KLxaShZzOpqIMptajJo1ISEFwMbwMlhtcCWYwCpaxMuAeFsoPiaA wQqMkns+RZH2kDGlaP1CZeGT8loubUBAcjsCEJm50O8R5shiFd6jjOHTaobWn1CIeMYZJB Dna5oFyqZc2fSUS87n/3gJqsxjrTQ7GWKDOWlPJikRKzjUWfN7E6DXTMMpWsow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=6ea39dd6c73b9667bfa7540d3b26295213105871 commit 6ea39dd6c73b9667bfa7540d3b26295213105871 Author: Baptiste Daroussin AuthorDate: 2021-11-24 10:12:05 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 10:12:05 +0000 tzsetup: remove dedundant declaration --- usr.sbin/tzsetup/tzsetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 93871e27fb7b..4fc0fa88d438 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -181,7 +181,7 @@ again: conf.title = title; result = bsddialog_menu(conf, cprompt, height, width, menu_height, item_no, listitems, NULL); - for (int i = 0; i < item_no; i++) + for (i = 0; i < item_no; i++) if (listitems[i].on) choice = i; switch (result) { From nobody Wed Nov 24 10:56:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5260E189FA81; Wed, 24 Nov 2021 10: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 4HzdH50Gvsz3pd9; Wed, 24 Nov 2021 10:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DBA23851; Wed, 24 Nov 2021 10: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 1AOAuW1v075239; Wed, 24 Nov 2021 10: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 1AOAuWvw075238; Wed, 24 Nov 2021 10:56:32 GMT (envelope-from git) Date: Wed, 24 Nov 2021 10:56:32 GMT Message-Id: <202111241056.1AOAuWvw075238@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 24b05d7a6190 - main - kbdmap: use libbsddialog instead of calling dialog(1) via system(3) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24b05d7a6190292f62488aa4d7de86246a09467c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637751393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jtm57x6UCYPjoYVwFPA6MyR4tLNMa9/b6LvMnIT7euE=; b=AucyJd8bVA+ZpHcYCSThritUnrutzYP0/UZuTjKe3fFskDrZCgFmcTYWLMbxnlK4BCNPIc BfuvCsVf8/fBnqEuHCHRDxgqZrko17GUcebOKe2ENgW8FkLacUrBeF/fNhfXWswOnBaeID xLgytl4hQ/9ccBH0bZJSwDbP8IYPHLdgMkTzhwsJmX5NK/YdBdsU3md/cwXUOLYz9dy6xy iaIYZeZueja03OEvWE6mdcgJPSRGExTpigtnG7zqvSeb+KgjZCQX2flRLdEATqvebA0Byn EuKkxe18gS3K/+1Ulof+dCwndpJKAj1jcESkgyKL5/9vB9xkqyHVZm1k1iXF7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637751393; a=rsa-sha256; cv=none; b=tBPn4yjNwR44gVjavc4A7y8d0NrvTzgjOm6FHpkxGiEpiydphDytupEK6BvzguEv8ea9J0 IIzBrfhU/dh1ngV0ViM7lLXF1aVUFDwWLu2sr/WHufPpjqjWmCA6VQK0Hi/JSIlm2kpxLw 5WYsOYFHNYoQZ88bJlhY9cmPrc2dBEgXysPKJFwjnCpMZWyqp4S7Ec8A1esZE24Zr5dfMF f5PzOMZPCnMEbAkOi7A/3sMxsVZLDUpg9MF/1vGuEnPF6TVpAiIg7IFPICGDtli1GXWFUF GHSuP3sNVbcXs15AO61dAeD/aQxr70w60xMbIwoWGeIwsCsQO/OWbGHta1CEew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=24b05d7a6190292f62488aa4d7de86246a09467c commit 24b05d7a6190292f62488aa4d7de86246a09467c Author: Baptiste Daroussin AuthorDate: 2021-11-24 10:55:26 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 10:55:26 +0000 kbdmap: use libbsddialog instead of calling dialog(1) via system(3) --- usr.sbin/kbdmap/Makefile | 2 + usr.sbin/kbdmap/kbdmap.c | 108 +++++++++++++++++++---------------------------- 2 files changed, 46 insertions(+), 64 deletions(-) diff --git a/usr.sbin/kbdmap/Makefile b/usr.sbin/kbdmap/Makefile index ec493416a573..22747e70720c 100644 --- a/usr.sbin/kbdmap/Makefile +++ b/usr.sbin/kbdmap/Makefile @@ -1,6 +1,8 @@ # $FreeBSD$ PROG= kbdmap +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib +LIBADD= bsddialog LINKS= ${BINDIR}/kbdmap ${BINDIR}/vidfont MLINKS= kbdmap.1 vidfont.1 diff --git a/usr.sbin/kbdmap/kbdmap.c b/usr.sbin/kbdmap/kbdmap.c index 4f99ba03c2c8..2783d2368e0e 100644 --- a/usr.sbin/kbdmap/kbdmap.c +++ b/usr.sbin/kbdmap/kbdmap.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -350,19 +351,23 @@ do_vidfont(struct keymap *km) static void show_dialog(struct keymap **km_sorted, int num_keymaps) { - FILE *fp; - char *cmd, *dialog; - char tmp_name[] = "/tmp/_kbd_lang.XXXX"; - int fd, i, size; - - fd = mkstemp(tmp_name); - if (fd == -1) { - fprintf(stderr, "Could not open temporary file \"%s\"\n", - tmp_name); + struct bsddialog_conf conf; + struct bsddialog_menuitem *listitems; + int i, result; + + bsddialog_initconf(&conf); + conf.clear = true; + if (bsddialog_init() < 0) { + fprintf(stderr, "Failed to initialize bsddialog"); + exit(1); + } + conf.title = __DECONST(char *, title); + + listitems = calloc(num_keymaps + 1, sizeof(struct bsddialog_menuitem)); + if (listitems == NULL) { + fprintf(stderr, "Failed to allocate memory in show_dialog"); exit(1); } - asprintf(&dialog, "/usr/bin/dialog --clear --title \"%s\" " - "--menu \"%s\" 0 0 0", title, menu); /* start right font, assume that current font is equal * to default font in /etc/rc.conf @@ -374,63 +379,38 @@ show_dialog(struct keymap **km_sorted, int num_keymaps) if (font && strcmp(font, font_current)) vidcontrol(font); - /* Build up the command */ - size = 0; - for (i=0; idesc) + 6; - } - - /* Allow the space for '2> tmpfilename' redirection */ - size += strlen(tmp_name) + 3; - - cmd = (char *) malloc(strlen(dialog) + size + 1); - strcpy(cmd, dialog); - + /* Build up the menu */ for (i=0; idesc); - strcat(cmd, "\""); - strcat(cmd, " \"\""); + listitems[i].prefix = __DECONST(char *, ""); + listitems[i].depth = 0; + listitems[i].bottomdesc = __DECONST(char *, ""); + listitems[i].on = false; + listitems[i].name = km_sorted[i]->desc; + listitems[i].desc = __DECONST(char *, ""); } - - strcat(cmd, " 2>"); - strcat(cmd, tmp_name); - - /* Show the dialog.. */ - system(cmd); - - fp = fopen(tmp_name, "r"); - if (fp) { - char choice[64]; - if (fgets(choice, sizeof(choice), fp) != NULL) { - /* Find key for desc */ - for (i=0; idesc)) { - if (!strcmp(program, "kbdmap")) - do_kbdcontrol(km_sorted[i]); - else - do_vidfont(km_sorted[i]); - break; - } + result = bsddialog_menu(conf, __DECONST(char *, menu), 0, 0, 0, + num_keymaps, listitems, NULL); + bsddialog_end(); + switch (result) { + case BSDDIALOG_YESOK: + for (i = 0; i < num_keymaps; i++) { + if (listitems[i].on) { + printf("ici\n"); + if (!strcmp(program, "kdbmap")) + do_kbdcontrol(km_sorted[i]); + else + do_vidfont(km_sorted[i]); + break; } - } else { - if (font != NULL && strcmp(font, font_current)) - /* Cancelled, restore old font */ - vidcontrol(font_current); } - fclose(fp); - } else - fprintf(stderr, "Failed to open temporary file"); - - /* Tidy up */ - remove(tmp_name); - free(cmd); - free(dialog); - close(fd); + break; + default: + printf("la\n"); + if (font != NULL && strcmp(font, font_current)) + /* Cancelled, restore old font */ + vidcontrol(font_current); + break; + } } /* From nobody Wed Nov 24 11:08:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E742118A4655; Wed, 24 Nov 2021 11:08: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 4HzdXP4dC2z3sGm; Wed, 24 Nov 2021 11:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B4637CC; Wed, 24 Nov 2021 11:08: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 1AOB85Qb089362; Wed, 24 Nov 2021 11:08:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOB851n089361; Wed, 24 Nov 2021 11:08:05 GMT (envelope-from git) Date: Wed, 24 Nov 2021 11:08:05 GMT Message-Id: <202111241108.1AOB851n089361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 7d51283f700c - main - partedit: cleanup headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d51283f700cb6f43f3293c40a8fcab3854c5fc1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637752085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=itnc6nubfz9swyHXh1raQG5J/2EutapaLNeDwGSY8r8=; b=gNxbtSZ1lKvcjGWVa7S2E63L5xCetWZIgEq88WuwooN5n6smJrzH6FCHtIb5TphL32MkS/ 0N5VwhvIDP02NB7X4EQ3cG/TI1jbPZVXaU+lzp7GwkcbYn2aEjApA1e4/XICvajs6wsLp3 gVtSY0sugljfJO0gG3lIo3oOp1r1CaIV92XPzjJrl1nuI93GoDrKQfVIy4TDrTPc9wWf5+ F8O2i9F7Jn3m++GIPOZkUkw6cPQSe0f0DNdGcjsuAoQJH7Yb9Wuh4CsfuSwiL+rYwRZ5sk Y1jSnRd53EAvzP4J/XTFEGj5QREQb9bb+QzpDX3VrEtckNwDlmY+mvae/l+0gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637752085; a=rsa-sha256; cv=none; b=VhADY4b+6MDlNv57nxQPUlXvHvobWBYWWDgz6h0F4I2m3xcCsK0h+7k1VL8qfjjusxJWER 5lYsW14u0/AGfLwu4kqv9TA9sGyS7w9rLp7QtMRp32Ik27IaOcgkjR/8/+koyhM6EBBD5p CBUejnpdPJWKN+9Jw/Z9ENpNNmb+2G1/TkxNNjshAR+VvETLHlrUCBHwK+TIIOn9etUOB4 /MA1lJ6F3i77JsPvmpSEcXDNiNp6w08t/RzjIvt2c/xhbrbAMyQROFvkADL2GKQ1scEk/I qiHp+SbZA+SRMxYE1RGRN0WJJszhb3LjlbePFVBBUtRJPMrSVLFo5WUC3SFmcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=7d51283f700cb6f43f3293c40a8fcab3854c5fc1 commit 7d51283f700cb6f43f3293c40a8fcab3854c5fc1 Author: Baptiste Daroussin AuthorDate: 2021-11-24 11:06:34 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 11:06:34 +0000 partedit: cleanup headers Removed dialog.h where not needed and include headers actually used --- usr.sbin/bsdinstall/partedit/scripted.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/scripted.c b/usr.sbin/bsdinstall/partedit/scripted.c index 37ac6de131b5..956855eb6e54 100644 --- a/usr.sbin/bsdinstall/partedit/scripted.c +++ b/usr.sbin/bsdinstall/partedit/scripted.c @@ -29,13 +29,12 @@ */ #include -#include -#include -#include +#include #include -#include -#include +#include +#include +#include #include "partedit.h" From nobody Wed Nov 24 11:14:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AD40418A8873; Wed, 24 Nov 2021 11:14: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 4HzdgM2700z3wBH; Wed, 24 Nov 2021 11:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2892CE23; Wed, 24 Nov 2021 11:14: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 1AOBE7cb002874; Wed, 24 Nov 2021 11:14:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOBE7Rn002873; Wed, 24 Nov 2021 11:14:07 GMT (envelope-from git) Date: Wed, 24 Nov 2021 11:14:07 GMT Message-Id: <202111241114.1AOBE7Rn002873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 848ee2a3a8b4 - main - bsddialog: actually add 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 848ee2a3a8b47c9905fc51fefcf60eb371edbb98 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637752447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F/qjPCudJ+rO4A8BGwgbPu7Y9Q49CMxXRTlUjXUWzZY=; b=uNVC729zG3idoWC8+VA9j6IgPKkK791wSylpy/cLp0w6dWFjEy+c0jjeS9Rq8sTYpEl9Ym WJCek1gSQKuT7BuuqRVvSuAhtNGWMGb36+EkE0mkwbZJHVYt/y/nwytVn2ARcxpsNpgIUj JDchXXALp4qvfxr60qO4V275FhTyuyJhocHzbD+m4VbCjp8oRmkDOiOR8uCHjj0dwJfwai z6pI5EZ7BNWOs2Kq/zK+NtJfXA4z7B+fAu6mPMLOipyawPRTan4a5/c0OiNMiA12ojswCy M72xzZ02x3UFVqXN1reqxsGL7y1xwNZTqdGNN4mgVYOQvHTZ3dTJvO1xJdcfCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637752447; a=rsa-sha256; cv=none; b=lGQtkWBXeSgC3zD50cpzvJLSLg0qnye7FiI0yFJP7yMr77qjGTQVAynquIbZN/exJp/Wdx cQdwfU3ZDz3xDYz8LcTry8gzA1WP4/Ypu06G6kXVP/oSCzebSQc5sQhYgke1wZHxVGRlHs Jl1J1Vhf9WnDMF/Tc7ZIgPT9/alFiYBZ2ghdl+w3sZNFwW2SpuDzCW82FT1+wbdU9zX1ZT yIf05t2RlVIpG3VIb+KgYjApLGpVLUfHXFcb27njxhDOTGplB+Q5K4DAivsY30NG3jL1ul XrisY9uzFav6+Z4BunuzcCZl/ZXugNI7g9uCQeHPgqnHQ/Q7AXCIr5uhzIUskg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=848ee2a3a8b47c9905fc51fefcf60eb371edbb98 commit 848ee2a3a8b47c9905fc51fefcf60eb371edbb98 Author: Baptiste Daroussin AuthorDate: 2021-11-24 11:13:45 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 11:13:45 +0000 bsddialog: actually add directories --- lib/libbsddialog/Makefile | 30 ++++++++++++++++++++++++++++++ usr.bin/bsddialog/Makefile | 12 ++++++++++++ 2 files changed, 42 insertions(+) diff --git a/lib/libbsddialog/Makefile b/lib/libbsddialog/Makefile new file mode 100644 index 000000000000..14e06fde0c7e --- /dev/null +++ b/lib/libbsddialog/Makefile @@ -0,0 +1,30 @@ +BSDDIALOG= ${SRCTOP}/contrib/bsddialog + +.PATH: ${BSDDIALOG}/lib + +LIB= bsddialog +PRIVATELIB= yes +SHLIB_MAJOR= 0 +SRCS= barbox.c \ + commandbox.c \ + editorbox.c \ + filebox.c \ + formbox.c \ + infobox.c \ + lib_util.c \ + lib_util.h \ + libbsddialog.c \ + menubox.c \ + messagebox.c \ + textbox.c \ + theme.c \ + timebox.c +INCS= bsddialog.h \ + bsddialog_theme.h +MAN= + +LIBADD= ncursesw tinfow formw + +WARNS= 2 + +.include diff --git a/usr.bin/bsddialog/Makefile b/usr.bin/bsddialog/Makefile new file mode 100644 index 000000000000..3ff5c378418e --- /dev/null +++ b/usr.bin/bsddialog/Makefile @@ -0,0 +1,12 @@ +BSDDIALOG= ${SRCTOP}/contrib/bsddialog +.PATH: ${BSDDIALOG} + +PROG= bsddialog +SRCS= bsddialog.c +MAN= +CFLAGS+= -I${BSDDIALOG}/lib +LIBADD= bsddialog + +WARNS= 2 + +.include From nobody Wed Nov 24 11:30:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 566B51889008; Wed, 24 Nov 2021 11:30:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hzf2R2L59z4W2k; Wed, 24 Nov 2021 11:30:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1AOBUPUa084962 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 24 Nov 2021 13:30:28 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1AOBUPUa084962 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1AOBUPSK084956; Wed, 24 Nov 2021 13:30:25 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 24 Nov 2021 13:30:25 +0200 From: Konstantin Belousov To: Peter Jeremy Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8ef0c11e7ce7 - main - nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers Message-ID: References: <202111161714.1AGHEtBA084291@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4Hzf2R2L59z4W2k X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 24, 2021 at 07:01:56PM +1100, Peter Jeremy wrote: > On 2021-Nov-24 05:12:19 +0200, Konstantin Belousov wrote: > >Try this (combined two patches). > > That's helped. I can now swapon and swapoff but not actually use swap: > KDB: stack backtrace: > db_trace_self() at db_trace_self > db_trace_self_wrapper() at db_trace_self_wrapper+0x30 > assert_vop_locked() at assert_vop_locked+0x58 > VOP_STRATEGY_APV() at VOP_STRATEGY_APV+0x54 > bufstrategy() at bufstrategy+0x4c > swap_pager_putpages() at swap_pager_putpages+0x108 > vm_pageout_flush() at vm_pageout_flush+0x108 > vm_pageout_cluster() at vm_pageout_cluster+0x464 > vm_pageout_laundry_worker() at vm_pageout_laundry_worker+0x910 > fork_exit() at fork_exit+0x74 > fork_trampoline() at fork_trampoline+0x14 > vnode 0xffffa00008840700: type VREG > usecount 1, writecount 0, refcount 2 seqc users 0 > hold count flags () > flags (VV_VMSIZEVNLOCK) > v_object 0xffffa00008df3738 ref 0 pages 0 cleanbuf 0 dirtybuf 0 > lock type nfs: UNLOCKED > fileid 30984 fsid 0x3a3a00ff01 > VOP_STRATEGY: 0xffffa00008840700 is not locked but should be > KDB: enter: lock violation Please try this, but it may require more work. In particular, watch out for deadlock: the swapped out pages are busied before swap vnode is locked. By itself it is fine, but if some other io happens to the swap vnode, it might become problematic. diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 9bc506c9b6b8..6daedd02649d 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2366,8 +2366,8 @@ sys_swapon(struct thread *td, struct swapon_args *uap) goto done; } - NDINIT(&nd, LOOKUP, ISOPEN | FOLLOW | AUDITVNODE1, UIO_USERSPACE, - uap->name, td); + NDINIT(&nd, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, + UIO_USERSPACE, uap->name, td); error = namei(&nd); if (error) goto done; @@ -2387,8 +2387,10 @@ sys_swapon(struct thread *td, struct swapon_args *uap) error = swaponvp(td, vp, attr.va_size / DEV_BSIZE); } - if (error) - vrele(vp); + if (error != 0) + vput(vp); + else + VOP_UNLOCK(vp); done: sx_xunlock(&swdev_syscall_lock); return (error); @@ -3012,7 +3014,7 @@ swapongeom(struct vnode *vp) { int error; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + ASSERT_VOP_ELOCKED(vp, "swapongeom"); if (vp->v_type != VCHR || VN_IS_DOOMED(vp)) { error = ENOENT; } else { @@ -3020,7 +3022,6 @@ swapongeom(struct vnode *vp) error = swapongeom_locked(vp->v_rdev, vp); g_topology_unlock(); } - VOP_UNLOCK(vp); return (error); } @@ -3042,24 +3043,30 @@ swapdev_strategy(struct buf *bp, struct swdevt *sp) vp2 = sp->sw_id; vhold(vp2); if (bp->b_iocmd == BIO_WRITE) { + vn_lock(vp2, LK_EXCLUSIVE | LK_RETRY); if (bp->b_bufobj) bufobj_wdrop(bp->b_bufobj); bufobj_wref(&vp2->v_bufobj); + } else { + vn_lock(vp2, LK_SHARED | LK_RETRY); } if (bp->b_bufobj != &vp2->v_bufobj) bp->b_bufobj = &vp2->v_bufobj; bp->b_vp = vp2; bp->b_iooffset = dbtob(bp->b_blkno); bstrategy(bp); - return; + VOP_UNLOCK(vp2); } static void swapdev_close(struct thread *td, struct swdevt *sp) { + struct vnode *vp; - VOP_CLOSE(sp->sw_vp, FREAD | FWRITE, td->td_ucred, td); - vrele(sp->sw_vp); + vp = sp->sw_vp; + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + VOP_CLOSE(vp, FREAD | FWRITE, td->td_ucred, td); + vput(vp); } static int @@ -3068,6 +3075,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) struct swdevt *sp; int error; + ASSERT_VOP_ELOCKED(vp, "swaponvp"); if (nblks == 0) return (ENXIO); mtx_lock(&sw_dev_mtx); @@ -3079,14 +3087,12 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) } mtx_unlock(&sw_dev_mtx); - (void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC error = mac_system_check_swapon(td->td_ucred, vp); if (error == 0) #endif error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td, NULL); - (void) VOP_UNLOCK(vp); - if (error) + if (error != 0) return (error); swaponsomething(vp, vp, nblks, swapdev_strategy, swapdev_close, From nobody Wed Nov 24 12:00:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A7C09189A5A2; Wed, 24 Nov 2021 12:00:29 +0000 (UTC) (envelope-from C.Koehne@beckhoff.com) Received: from Internet2.beckhoff.com (internet2.beckhoff.com [194.25.186.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.beckhoff.com", Issuer "Thawte TLS RSA CA G1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hzfhr642Sz4hsX; Wed, 24 Nov 2021 12:00:28 +0000 (UTC) (envelope-from C.Koehne@beckhoff.com) Received: from 172.17.5.63 by Internet2.beckhoff.com (Tls12, Aes256, Sha384, DiffieHellmanEllipticKey256); Wed, 24 Nov 2021 12:00:21 GMT Received: from ex04.beckhoff.com (172.17.5.170) by ex02.beckhoff.com (172.17.5.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.17; Wed, 24 Nov 2021 13:00:20 +0100 Received: from ex04.beckhoff.com ([fe80::e827:f858:3be0:ad6b]) by ex04.beckhoff.com ([fe80::e827:f858:3be0:ad6b%9]) with mapi id 15.01.2375.017; Wed, 24 Nov 2021 13:00:20 +0100 From: =?utf-8?B?Q29ydmluIEvDtmhuZQ==?= To: John Baldwin , Emmanuel Vadot , "src-committers@FreeBSD.org" , "dev-commits-src-all@FreeBSD.org" , "dev-commits-src-main@FreeBSD.org" Subject: RE: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync Thread-Topic: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync Thread-Index: AQHX4EhAtg1PhJfq9EuiAM/NMll7O6wQ1zVggABkTQCAAVQu4A== Date: Wed, 24 Nov 2021 12:00:20 +0000 Message-ID: <80ac3d256ce94f809a39f5badc864588@beckhoff.com> References: <202111221530.1AMFUUJn079855@gitrepo.freebsd.org> <428e410d-33c1-7ff8-9689-41943db3d9c3@FreeBSD.org> <084d5b5845554221901ce4902fb878d1@beckhoff.com> <0d0a6a77-b2d1-d0c2-f0de-e5c97307e140@FreeBSD.org> In-Reply-To: <0d0a6a77-b2d1-d0c2-f0de-e5c97307e140@FreeBSD.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [94.134.103.5] x-olx-disclaimer: EX02.BECKHOFF.COM Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 X-Rspamd-Queue-Id: 4Hzfhr642Sz4hsX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N SGkgSm9obiwNCg0KPiBXb3VsZCB5b3UgYmUgYWJsZSB0byB0ZXN0IGlmIHRoYXQgY2hhbmdlIHdv cmtzIGluIHlvdXIgZW52aXJvbm1lbnQ/ICBJIHdhcw0KPiBuZXZlciBhYmxlIHRvIGNvbmZpcm0g dGhhdCBpdCBmaXhlZCB0aGUgYnVnIEkgd2FzIHRyeWluZyB0byBhZGRyZXNzLCBidXQgSQ0KPiBk byB0aGluayBpdCBpcyBtb3JlIGNvcnJlY3QuICBUaGUgYnVzbWFzdGVyaW5nIHRoaW5nIGlzIHRv IHdvcmsgYXJvdW5kIExpbnV4DQo+IGNsZWFyaW5nIHRoYXQgZmxhZyBvbiBzaHV0ZG93biBvZiBh IGd1ZXN0LCBhbmQgSSB3YW50ZWQgdG8gcHJlc2VydmUgb3RoZXINCj4gYml0cyBpbiB0aGUgY29t bWFuZCByZWdpc3RlciB0aGF0IHdlcmVuJ3QgcmVsYXRlZCB0byBCQVJzLCBldGMuDQoNClRoZSBj aGFuZ2Ugd29ya3MgaW4gbXkgZW52aXJvbm1lbnQuIEFzIHlvdSBoYXZlIG1lbnRpb25lZCwgbXkg TGludXggZ3Vlc3QNCmNsZWFycyB0aGUgYnVzbWFzdGVyaW5nIGJpdCBvbiBzaHV0ZG93bi4gSG93 ZXZlciwgaW4gbXkgb3BpbmlvbiB3ZSBzaG91bGQNCmluaXRpYWxpemUgdGhlIGNvbW1hbmQgcmVn aXN0ZXIgYml0cyBpbiB0aGUgc2FtZSB3YXkgYXMgYSByZWFsIHN5c3RlbSBkb2VzLg0KDQpJIHRv b2sgYSBzaG9ydCBsb29rIGludG8gYSBwdWJsaWMgYXZhaWxhYmxlIFBDSSBzcGVjaWZpY2F0aW9u DQooaHR0cHM6Ly93d3cuaWNzLnVjaS5lZHUvfmhhcnJpcy9pY3MyMTYvcGNpL1BDSV8yMi5wZGYp Lg0KRm9yIGJ1c21hc3RlcmluZyAoYW5kIGFsc28gZm9yIElPL01lbSBkZWNvZGluZykgaXQgc3Rh dGVzIHRoYXQgaXQncyBkZWZhdWx0IHZhbHVlDQppcyAwLiBUaGVyZWZvcmUsIEknZCBwcmVmZXIg dG8gdW5jb25kaXRpb25hbGx5IGNsZWFyIHRob3NlIGJpdHMgb24gc3RhcnR1cC4NCg0KDQpCZXN0 IHJlZ2FyZHMNCkNvcnZpbg0KDQoNCg0KQmVja2hvZmYgQXV0b21hdGlvbiBHbWJIICYgQ28uIEtH IHwgTWFuYWdpbmcgRGlyZWN0b3I6IERpcGwuIFBoeXMuIEhhbnMgQmVja2hvZmYNClJlZ2lzdGVy ZWQgb2ZmaWNlOiBWZXJsLCBHZXJtYW55IHwgUmVnaXN0ZXIgY291cnQ6IEd1ZXRlcnNsb2ggSFJB IDcwNzUNCg0KDQo= From nobody Wed Nov 24 12:00:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7252A189AA99; Wed, 24 Nov 2021 12:01:05 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzfjY1Kgjz4jJ5; Wed, 24 Nov 2021 12:01:05 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 48BD28D4A179; Wed, 24 Nov 2021 12:00:57 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 90885E7084C; Wed, 24 Nov 2021 12:00:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id MU1pdjBHfHxs; Wed, 24 Nov 2021 12:00:55 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 2ED1BE70847; Wed, 24 Nov 2021 12:00:55 +0000 (UTC) Date: Wed, 24 Nov 2021 12:00:54 +0000 (UTC) From: "Bjoern A. Zeeb" To: Baptiste Daroussin cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a46722b58056 - main - ncurses: register formw as usable lib for LIBADD In-Reply-To: <202111241003.1AOA3pxZ008905@gitrepo.freebsd.org> Message-ID: References: <202111241003.1AOA3pxZ008905@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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; format=flowed X-Rspamd-Queue-Id: 4HzfjY1Kgjz4jJ5 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 24 Nov 2021, Baptiste Daroussin wrote: > The branch main has been updated by bapt: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a46722b580567799b484b5a81728eaf380777e04 > > commit a46722b580567799b484b5a81728eaf380777e04 > Author: Baptiste Daroussin > AuthorDate: 2021-11-24 09:20:10 +0000 > Commit: Baptiste Daroussin > CommitDate: 2021-11-24 10:02:22 +0000 > > ncurses: register formw as usable lib for LIBADD is LIBFORM to be LIBFORMW or do we need another new entry? 1393 make[7]: "share/mk/bsd.libnames.mk" line 190: lib/ncurses/form: Missing value for LIBFORMW in bsd.libnames.mk. Likely should be: LIBFORMW?= ${LIBDESTDIR}${LIBDIR_BASE}/libformw.a > --- > share/mk/src.libnames.mk | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk > index 7873d05d18da..6fee77357480 100644 > --- a/share/mk/src.libnames.mk > +++ b/share/mk/src.libnames.mk > @@ -129,6 +129,7 @@ _LIBRARIES= \ > execinfo \ > fetch \ > figpar \ > + formw \ > geom \ > gpio \ > gssapi \ > @@ -381,6 +382,7 @@ _DP_stats= sbuf pthread > _DP_stdthreads= pthread > _DP_tacplus= md > _DP_ncursesw= tinfow > +_DP_formw= ncursesw > _DP_nvpair= spl > _DP_panelw= ncursesw > _DP_rpcsec_gss= gssapi > -- Bjoern A. Zeeb r15:7 From nobody Wed Nov 24 12:32:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D988318AD75A; Wed, 24 Nov 2021 12:33:09 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp6.goneo.de (smtp6.goneo.de [IPv6:2001:1640:5::8:31]) (using TLSv1.3 with cipher TLS_AES_256_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 4HzgQY4c9Zz3CWs; Wed, 24 Nov 2021 12:33:09 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from hub1.goneo.de (hub1.goneo.de [IPv6:2001:1640:5::8:52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by smtp6.goneo.de (Postfix) with ESMTPS id 8807110A3310; Wed, 24 Nov 2021 13:33:01 +0100 (CET) Received: from hub1.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPS id 3FD0910B4FAD; Wed, 24 Nov 2021 13:32:59 +0100 (CET) Received: from hermann (dynamic-2a01-0c22-a5fc-2b00-2ad2-44ff-fe79-8732.c22.pool.telefonica.de [IPv6:2a01:c22:a5fc:2b00:2ad2:44ff:fe79:8732]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPSA id 006681097AA7; Wed, 24 Nov 2021 13:32:58 +0100 (CET) Date: Wed, 24 Nov 2021 13:32:58 +0100 From: FreeBSD User To: Baptiste Daroussin Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a46722b58056 - main - ncurses: register formw as usable lib for LIBADD Message-ID: <20211124133258.08ffc356@hermann> In-Reply-To: <202111241003.1AOA3pxZ008905@gitrepo.freebsd.org> References: <202111241003.1AOA3pxZ008905@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-Transfer-Encoding: 7bit X-Rspamd-UID: bcfd61 X-Rspamd-UID: bd42ba X-Rspamd-Queue-Id: 4HzgQY4c9Zz3CWs X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 24 Nov 2021 10:03:51 GMT Baptiste Daroussin wrote: > The branch main has been updated by bapt: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a46722b580567799b484b5a81728eaf380777e04 > > commit a46722b580567799b484b5a81728eaf380777e04 > Author: Baptiste Daroussin > AuthorDate: 2021-11-24 09:20:10 +0000 > Commit: Baptiste Daroussin > CommitDate: 2021-11-24 10:02:22 +0000 > > ncurses: register formw as usable lib for LIBADD > --- > share/mk/src.libnames.mk | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk > index 7873d05d18da..6fee77357480 100644 > --- a/share/mk/src.libnames.mk > +++ b/share/mk/src.libnames.mk > @@ -129,6 +129,7 @@ _LIBRARIES= \ > execinfo \ > fetch \ > figpar \ > + formw \ > geom \ > gpio \ > gssapi \ > @@ -381,6 +382,7 @@ _DP_stats= sbuf pthread > _DP_stdthreads= pthread > _DP_tacplus= md > _DP_ncursesw= tinfow > +_DP_formw= ncursesw > _DP_nvpair= spl > _DP_panelw= ncursesw > _DP_rpcsec_gss= gssapi > buildworld is failing at: ===> lib/clang/libclang (includes) --- includes_subdir_lib/ncurses --- make[5]: "/usr/src/share/mk/bsd.libnames.mk" line 190: /usr/src/lib/ncurses/form: Missing value for LIBFORMW in bsd.libnames.mk. Likely should be: LIBFORMW?= ${LIBDESTDIR}${LIBDIR_BASE}/libformw.a Kind regards O. Hartmann From nobody Wed Nov 24 12:49:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C88801895585; Wed, 24 Nov 2021 12:49:35 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzgnW0Lf6z3H5H; Wed, 24 Nov 2021 12:49:34 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id A6F8A8D4A179; Wed, 24 Nov 2021 12:49:33 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id CB7C8E70847; Wed, 24 Nov 2021 12:49:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id KQlQMLmzQtM3; Wed, 24 Nov 2021 12:49:31 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 2829DE70846; Wed, 24 Nov 2021 12:49:31 +0000 (UTC) Date: Wed, 24 Nov 2021 12:49:30 +0000 (UTC) From: "Bjoern A. Zeeb" To: Baptiste Daroussin cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a46722b58056 - main - ncurses: register formw as usable lib for LIBADD In-Reply-To: Message-ID: References: <202111241003.1AOA3pxZ008905@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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; format=flowed X-Rspamd-Queue-Id: 4HzgnW0Lf6z3H5H X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 2a01:4f8:13b:39f::9f:25 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net X-Spamd-Result: default: False [-0.51 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-0.18)[-0.176]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:13b:39f::9f:25]; DMARC_NA(0.00)[zabbadoz.net]; NEURAL_SPAM_SHORT(0.97)[0.965]; NEURAL_HAM_LONG(-1.00)[-0.997]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; RCVD_TLS_LAST(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 24 Nov 2021, Bjoern A. Zeeb wrote: > On Wed, 24 Nov 2021, Baptiste Daroussin wrote: > >> The branch main has been updated by bapt: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=a46722b580567799b484b5a81728eaf380777e04 >> >> commit a46722b580567799b484b5a81728eaf380777e04 >> Author: Baptiste Daroussin >> AuthorDate: 2021-11-24 09:20:10 +0000 >> Commit: Baptiste Daroussin >> CommitDate: 2021-11-24 10:02:22 +0000 >> >> ncurses: register formw as usable lib for LIBADD > > is LIBFORM to be LIBFORMW or do we need another new entry? > > 1393 make[7]: "share/mk/bsd.libnames.mk" line 190: lib/ncurses/form: > Missing value for LIBFORMW in bsd.libnames.mk. Likely should be: LIBFORMW?= > ${LIBDESTDIR}${LIBDIR_BASE}/libformw.a and later still: 6315 ld: error: unable to find library -lformw 6316 cc: error: linker command failed with exit code 1 (use -v to see invocation) 6317 --- libprivatebsddialog.so.0.full --- 6318 *** [libprivatebsddialog.so.0.full] Error code 1 @ 848ee2a3a8b47c9905fc51fefcf60eb371edbb98 > > >> --- >> share/mk/src.libnames.mk | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk >> index 7873d05d18da..6fee77357480 100644 >> --- a/share/mk/src.libnames.mk >> +++ b/share/mk/src.libnames.mk >> @@ -129,6 +129,7 @@ _LIBRARIES= \ >> execinfo \ >> fetch \ >> figpar \ >> + formw \ >> geom \ >> gpio \ >> gssapi \ >> @@ -381,6 +382,7 @@ _DP_stats= sbuf pthread >> _DP_stdthreads= pthread >> _DP_tacplus= md >> _DP_ncursesw= tinfow >> +_DP_formw= ncursesw >> _DP_nvpair= spl >> _DP_panelw= ncursesw >> _DP_rpcsec_gss= gssapi >> > > -- Bjoern A. Zeeb r15:7 From nobody Wed Nov 24 12:59:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EB685189A188; Wed, 24 Nov 2021 12:59: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 4Hzh0c4szWz3LhX; Wed, 24 Nov 2021 12:59:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87225222B; Wed, 24 Nov 2021 12:59: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 1AOCxCM4037524; Wed, 24 Nov 2021 12:59:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOCxCNZ037523; Wed, 24 Nov 2021 12:59:12 GMT (envelope-from git) Date: Wed, 24 Nov 2021 12:59:12 GMT Message-Id: <202111241259.1AOCxCNZ037523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 1cd0117ff6a1 - main - ncurses: libform is installed as libformw List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1cd0117ff6a147d5979ebf736afe00c6d4287f2d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637758752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8tTzacqj06kkOJi/mUfyYusVlq/Ds3RbAXxTAo0y+5I=; b=SkHwZ1QOELlO5swzPkvnZ+L0UgRWwh6rtIRqFl1jVkq/BrVgJgQ4mczXnCUXYCMrlFhrgz SYnzVhDk1shQuRcQzGBySel0Evo6jfBTEs2YnmO+2wPPE5CF05YrMMoS+eblfEwohh+/8S YGgCI/bdQM1vTlmIXp95P03yBgLtYKquOxUZeXIWt83Yy/r6K2G8GdmoQ0JR8mVQ3IJCc0 RxE3xUcxcXc8UeeYSeuJUETjzCWgXi09BK5+Tyi5whvBHQAsD7ogJdDEPo7y+vLCh01K1J mOSwg3yGDH91iB/J9L8cGagagkURYAPJaUT+7Fm6hzDRrTMUSa1y7duahlkGnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637758752; a=rsa-sha256; cv=none; b=tvE55qgrMoNQILXSGIfP4HLjl248fX+KWa/GvmqDA647a4qbqzAkha8Z+oCqcSkYGyQH0v snwxhto3FBoX8onlvZuluUthUAIjim7/Uzn9IkeopmgLs/yLvaFgw7CidlEbSrJk0hb7qP JnLPRd3RG64WFiGhWVaffwcD56lQmoTyp722NYE+tUFo4WbXRb9frGOOSV29N0FckfH8iH xQF34YeC2xIlu+wH/o63j84MNTq7v+ajo5mkM1KKCimlNLqbqul1MkY92C15pnDXvd5nX6 jtkNU3nDjfX2GOAeUHgwgd2JgWmunH2FVuHUEPWDuxRfxrhIFgUg5fYxJlukWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=1cd0117ff6a147d5979ebf736afe00c6d4287f2d commit 1cd0117ff6a147d5979ebf736afe00c6d4287f2d Author: Baptiste Daroussin AuthorDate: 2021-11-24 12:58:17 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 12:58:17 +0000 ncurses: libform is installed as libformw Reported by: many --- share/mk/bsd.libnames.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk index bc59c4babfd4..f71664bf5858 100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@ -64,7 +64,7 @@ LIBEXECINFO?= ${LIBDESTDIR}${LIBDIR_BASE}/libexecinfo.a LIBFETCH?= ${LIBDESTDIR}${LIBDIR_BASE}/libfetch.a LIBFIGPAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libfigpar.a LIBFL?= "don't use LIBFL, use LIBL" -LIBFORM?= ${LIBDESTDIR}${LIBDIR_BASE}/libform.a +LIBFORMW?= ${LIBDESTDIR}${LIBDIR_BASE}/libformw.a LIBG2C?= ${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a LIBGEOM?= ${LIBDESTDIR}${LIBDIR_BASE}/libgeom.a LIBGPIO?= ${LIBDESTDIR}${LIBDIR_BASE}/libgpio.a From nobody Wed Nov 24 14:22:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 485B118957BB; Wed, 24 Nov 2021 14:22: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 4HzjrL6Rs8z4Yj8; Wed, 24 Nov 2021 14:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BEBDA33F1; Wed, 24 Nov 2021 14:22: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 1AOEMA2O057823; Wed, 24 Nov 2021 14:22:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOEMA3v057822; Wed, 24 Nov 2021 14:22:10 GMT (envelope-from git) Date: Wed, 24 Nov 2021 14:22:10 GMT Message-Id: <202111241422.1AOEMA3v057822@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: f1d2f22b34ab - stable/13 - pca954x: driver for PCA954x / TCA954x I2C switches List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f1d2f22b34ab6c7216fcc980c57b60d5ef8f21d2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637763731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ukstGtGWg1f5mdTI/yNII5iQw45syjs0lnud1PZrvSU=; b=FSNYJPFixxrqyrddAvPpXj4cGb68qspDWF67cGnB0dW1BLF21J1DV4SWsZJlOMVDeVZRzL Sj5Jl5S55iVKTcUKJ0JbiBomCaFDYbsDO7DzkXeMi5nm/6Eha9QUThaXzRoYlEyYAwuYII Nb8VcOcIMlMmNtZY3HZjMBwURP1cDt5p3dkiwIevspJ8yV8wOgsInwkHpsQUIVc5Zr7P1I FS7mnwZqB2Uq6zX4XFpsH3jn6aGxix1CmDNxkazUWhNxLWkZJyabrmpTlyGWcHsDIWiEIi ewsYXx8krPIDLp7yCwnCLP/anKfLcE/I4HY2DkaFRrP9fVtNEXrFtQpgcbpgsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637763731; a=rsa-sha256; cv=none; b=krhzQxfjPT0P1YJAeDccd0DffBtsEuEv1fw8TZYNB0IYq6suwTecCysLVu0hN1Qj5BS4tK tvN9A0EAklQ+8U3b7fxB08sRl4ml2Y0NMSa/Q1gcg3/LCZiufuzz7QS1pAdZn/Csk9RzbF WYZu6rxgRbyfN01IW9fUeaF3BnKXtcGNPCFKMt3H6AiwHxvLs2cNecLivLahBBPs0vC7t5 eoSOiaSnI6IwZWj9vkN9oRR7TcoRgdFwjGeDPLqVvzn83Cmn4sx/t29RB8k8nNhcdELzT4 hZiY6VjT+fA4LTPVy31RXAbmy+2wM/Hsfqs7bYmgxnUUQNEXfR5m7fcE0wNm4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=f1d2f22b34ab6c7216fcc980c57b60d5ef8f21d2 commit f1d2f22b34ab6c7216fcc980c57b60d5ef8f21d2 Author: Andriy Gapon AuthorDate: 2020-08-18 09:16:28 +0000 Commit: Andriy Gapon CommitDate: 2021-11-24 14:19:09 +0000 pca954x: driver for PCA954x / TCA954x I2C switches At the moment only PCA9548A is supported and has been tested. (cherry picked from commit c0525ab1d1ce69ab3d589e95733caedb04e0dcbd) --- share/man/man4/Makefile | 1 + share/man/man4/pca954x.4 | 119 +++++++++++++++++++ sys/conf/files | 1 + sys/dev/iicbus/mux/pca954x.c | 214 +++++++++++++++++++++++++++++++++++ sys/modules/i2c/mux/Makefile | 1 + sys/modules/i2c/mux/pca954x/Makefile | 20 ++++ 6 files changed, 356 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index e8c0a5651ff8..be66bf02e9f7 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -422,6 +422,7 @@ MAN= aac.4 \ owc.4 \ ${_padlock.4} \ pass.4 \ + pca954x.4 \ pccard.4 \ pccbb.4 \ pcf.4 \ diff --git a/share/man/man4/pca954x.4 b/share/man/man4/pca954x.4 new file mode 100644 index 000000000000..d845740f9b6c --- /dev/null +++ b/share/man/man4/pca954x.4 @@ -0,0 +1,119 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2020 Andriy Gapon +.\" +.\" 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$ +.\" +.Dd November 13, 2021 +.Dt PCA954X 4 +.Os +.Sh NAME +.Nm pca954x +.Nd driver for PCA9548A I2C switch +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device pca954x" +.Cd "device iicmux" +.Cd "device iicbus" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +pca954x_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver supports the PCA9548A I2C bus switch and compatible chips such as +TCA9548A. +It automatically connects an upstream I2C bus to one of several downstream +buses as needed when slave devices on the downstream buses initiate I/O. +More information on the automatic switching behavior is available in +.Xr iicmux 4 . +.Sh FDT CONFIGURATION +On an +.Xr FDT 4 +based system, an +.Nm +device node is defined as a child node of its upstream I2C bus. +The children of the +.Nm +node are additional I2C buses, which will have their own I2C slave +devices described in their child nodes. +.Pp +The +.Nm +driver attaches to nodes where the +.Va compatible +property is set to one of +.Bl -bullet +.It +.Qq nxp,pca9548 +.El +.Pp +The +.Nm +driver supports the following optional properties in addition to the standard +I2C mux properties: +.Bl -tag -width i2c-mux-idle-disconnect +.It Va i2c-mux-idle-disconnect +if defined, forces the switch to disconnect all children in idle state. +.El +.Sh HINTS CONFIGURATION +On a +.Xr device.hints 5 +based system, these values are configurable for +.Nm : +.Bl -tag -width hint.pca954x..chip_type +.It Va hint.pca954x..at +The upstream +.Xr iicbus 4 +the +.Nm +instance is attached to. +.It Va hint.pca954x..chip_type +The type of the chip. +At present, only +.Qq pca9548 +is supported. +.El +.Pp +When configured via hints, the driver automatically adds an +.Xr iicbus 4 +instance for every downstream bus supported by the chip. +There is currently no way to indicate used versus unused channels. +.Sh SEE ALSO +.Xr iicbus 4 , +.Xr iicmux 4 +.Sh HISTORY +The +.Nm +driver and this manual page was written by +.An Andriy Gapon Aq Mt avg@FreeBSD.org . diff --git a/sys/conf/files b/sys/conf/files index 5051a38b2997..3dc1caf8b53a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1884,6 +1884,7 @@ dev/iicbus/mux/iicmux.c optional iicmux dev/iicbus/mux/iicmux_if.m optional iicmux dev/iicbus/mux/iic_gpiomux.c optional iic_gpiomux fdt dev/iicbus/mux/ltc430x.c optional ltc430x +dev/iicbus/mux/pca954x.c optional pca954x dev/iicbus/nxprtc.c optional nxprtc | pcf8563 dev/iicbus/ofw_iicbus.c optional fdt iicbus dev/iicbus/pcf8574.c optional pcf8574 diff --git a/sys/dev/iicbus/mux/pca954x.c b/sys/dev/iicbus/mux/pca954x.c new file mode 100644 index 000000000000..44c81539691e --- /dev/null +++ b/sys/dev/iicbus/mux/pca954x.c @@ -0,0 +1,214 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) Andriy Gapon + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include + +#ifdef FDT +#include +#include +#include +#endif + +#include +#include +#include "iicbus_if.h" +#include "iicmux_if.h" +#include + +struct pca954x_descr { + const char *partname; + const char *description; + int numchannels; +}; + +static struct pca954x_descr pca9548_descr = { + .partname = "pca9548", + .description = "PCA9548A I2C Mux", + .numchannels = 8, +}; + +#ifdef FDT +static struct ofw_compat_data compat_data[] = { + { "nxp,pca9548", (uintptr_t)&pca9548_descr }, + { NULL, 0 }, +}; +#else +static struct pca954x_descr *part_descrs[] = { + &pca9548_descr, +}; +#endif + +struct pca954x_softc { + struct iicmux_softc mux; + uint8_t addr; + bool idle_disconnect; +}; + +static int +pca954x_bus_select(device_t dev, int busidx, struct iic_reqbus_data *rd) +{ + struct iic_msg msg; + struct pca954x_softc *sc = device_get_softc(dev); + uint8_t busbits; + int error; + + /* + * The iicmux caller ensures busidx is between 0 and the number of buses + * we passed to iicmux_init_softc(), no need for validation here. If + * the fdt data has the idle_disconnect property we idle the bus by + * selecting no downstream buses, otherwise we just leave the current + * bus active. + */ + if (busidx == IICMUX_SELECT_IDLE) { + if (sc->idle_disconnect) + busbits = 0; + else + return (0); + } else { + busbits = 1u << busidx; + } + + msg.slave = sc->addr; + msg.flags = IIC_M_WR; + msg.len = 1; + msg.buf = &busbits; + error = iicbus_transfer(dev, &msg, 1); + return (error); +} + +static const struct pca954x_descr * +pca954x_find_chip(device_t dev) +{ +#ifdef FDT + const struct ofw_compat_data *compat; + + compat = ofw_bus_search_compatible(dev, compat_data); + if (compat == NULL) + return (NULL); + return ((const struct pca954x_descr *)compat->ocd_data); +#else + const char *type; + int i; + + if (resource_string_value(device_get_name(dev), device_get_unit(dev), + "chip_type", &type) == 0) { + for (i = 0; i < nitems(part_descrs) - 1; ++i) { + if (strcasecmp(type, part_descrs[i]->partname) == 0) + return (part_descrs[i]); + } + } + return (NULL); +#endif +} + +static int +pca954x_probe(device_t dev) +{ + const struct pca954x_descr *descr; + + descr = pca954x_find_chip(dev); + if (descr == NULL) + return (ENXIO); + + device_set_desc(dev, descr->description); + return (BUS_PROBE_DEFAULT); +} + +static int +pca954x_attach(device_t dev) +{ +#ifdef FDT + phandle_t node; +#endif + struct pca954x_softc *sc; + const struct pca954x_descr *descr; + int err; + + sc = device_get_softc(dev); + sc->addr = iicbus_get_addr(dev); +#ifdef FDT + node = ofw_bus_get_node(dev); + sc->idle_disconnect = OF_hasprop(node, "i2c-mux-idle-disconnect"); +#endif + + descr = pca954x_find_chip(dev); + err = iicmux_attach(dev, device_get_parent(dev), descr->numchannels); + if (err == 0) + bus_generic_attach(dev); + return (err); +} + +static int +pca954x_detach(device_t dev) +{ + int err; + + err = iicmux_detach(dev); + return (err); +} + +static device_method_t pca954x_methods[] = { + /* device methods */ + DEVMETHOD(device_probe, pca954x_probe), + DEVMETHOD(device_attach, pca954x_attach), + DEVMETHOD(device_detach, pca954x_detach), + + /* iicmux methods */ + DEVMETHOD(iicmux_bus_select, pca954x_bus_select), + + DEVMETHOD_END +}; + +static devclass_t pca954x_devclass; + +DEFINE_CLASS_1(pca9548, pca954x_driver, pca954x_methods, + sizeof(struct pca954x_softc), iicmux_driver); +DRIVER_MODULE(pca9548, iicbus, pca954x_driver, pca954x_devclass, 0, 0); + +#ifdef FDT +DRIVER_MODULE(ofw_iicbus, pca9548, ofw_iicbus_driver, ofw_iicbus_devclass, 0, 0); +#else +DRIVER_MODULE(iicbus, pca9548, iicbus_driver, iicbus_devclass, 0, 0); +#endif + +MODULE_DEPEND(pca9548, iicmux, 1, 1, 1); +MODULE_DEPEND(pca9548, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); +MODULE_VERSION(pca9548, 1); + +#ifdef FDT +IICBUS_FDT_PNP_INFO(compat_data); +#endif diff --git a/sys/modules/i2c/mux/Makefile b/sys/modules/i2c/mux/Makefile index 8e228a7a7fef..a972a00a3b3a 100644 --- a/sys/modules/i2c/mux/Makefile +++ b/sys/modules/i2c/mux/Makefile @@ -3,6 +3,7 @@ SUBDIR = \ iicmux \ ltc430x \ + pca954x \ .if !empty(OPT_FDT) SUBDIR+= iic_gpiomux diff --git a/sys/modules/i2c/mux/pca954x/Makefile b/sys/modules/i2c/mux/pca954x/Makefile new file mode 100644 index 000000000000..622b327204c5 --- /dev/null +++ b/sys/modules/i2c/mux/pca954x/Makefile @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/iicbus/mux + +KMOD= pca954x +SRCS= pca954x.c + +SRCS+= \ + bus_if.h \ + device_if.h \ + iicbus_if.h \ + iicmux_if.h \ + opt_platform.h \ + +.if !empty(OPT_FDT) +SRCS+= ofw_bus_if.h +.endif + + +.include From nobody Wed Nov 24 14:41:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6E906189F366; Wed, 24 Nov 2021 14:41:22 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzkGT4Gksz4fw6; Wed, 24 Nov 2021 14:41:21 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1mptSS-000IaR-Tk; Wed, 24 Nov 2021 17:41:12 +0300 Date: Wed, 24 Nov 2021 17:41:12 +0300 From: Slawa Olhovchenkov To: Marcin Wojtas Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables Message-ID: <20211124144112.GF77338@zxy.spb.ru> References: <202111162226.1AGMQg00099240@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: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 4HzkGT4Gksz4fw6 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of slw@zxy.spb.ru has no SPF policy when checking 195.70.199.98) smtp.mailfrom=slw@zxy.spb.ru X-Spamd-Result: default: False [-0.89 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.49)[-0.486]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zxy.spb.ru]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.31)[-0.307]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:5495, ipnet:195.70.192.0/19, country:RU]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Tue, Nov 16, 2021 at 10:26:42PM +0000, Marcin Wojtas wrote: > > Enable ASLR by default for 64-bit executables > Now any core dumps will be useless? From nobody Wed Nov 24 15:28:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BFE5D18A19B5; Wed, 24 Nov 2021 15:28:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzlJh1gHMz3C8j; Wed, 24 Nov 2021 15:28:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1553846EA; Wed, 24 Nov 2021 15:28: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 1AOFSJWh038654; Wed, 24 Nov 2021 15:28:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOFSJdf038653; Wed, 24 Nov 2021 15:28:19 GMT (envelope-from git) Date: Wed, 24 Nov 2021 15:28:19 GMT Message-Id: <202111241528.1AOFSJdf038653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 169e06fa7852 - main - os-release: Quote variables as documented in the manual List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 169e06fa7852810f4ced2cce7a3c14ca9443bf39 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637767700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JKc6aAAGoxunm2Se8kjTFAySQ0QpvtUxqChwCEljbiM=; b=t7xeCXJjq/W1/DaP8gNqFUYW243ucRrze/YlGxWKGpkw2OgZetI+osxX61tkA23fzF40iZ g2Br+XC2NdUv1cF+WOiJhIvJ/9g/jYjEkRp37WsmqYIV5hNk0Fq2cqXZJhpHwwiQ+/puk6 haULhvdYUXArar0E8YUXmX6KDlQrX2KOzsAou0SHaQB8+3H6TGpR2SOhXf9KMKK5k6dGF1 hfEpk0hJu38T6kYJ8jUo//1HydMS6y1ty3B4e7GaO/SGSMrFYYtYw/z1XthQmCZsWgjgaP EtpzmoPMwJ3+Uwa/yfhnupf243lX3SawcgYU5hTVZu1p1hhr7ecsfrVKi4eAKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637767700; a=rsa-sha256; cv=none; b=uv+ibcyCxLBhhHB8d1JJBT+fWxw0PXBT17qUshbbzemUqoVYA6a6cMPZj6TipcItoAK4eS Drg6Y4szSjh1iMfo3j+bTjBEQGB6qdtlRy6NlKndVwzbndhSrUoHtMj4YBJ4vTmGGMLBlL yiQli1hxnvoUbqb1JZSMsbStcE+QlPyrd/nFdDXGW8RbKZrrRolX6ZGvaNac/DNY4zD4mG GkqhZ8JyoCW2xOsnvar2vbfRneXkREE1fycw054V/OUZR4JkFZhGNHhXHarFRfWzULBvHY PG8N6DpgmlR+VN8ekV4Fkbl2KWind9WlXrxvsuX7YYPxvX5i2pKJ9RvawaPKRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=169e06fa7852810f4ced2cce7a3c14ca9443bf39 commit 169e06fa7852810f4ced2cce7a3c14ca9443bf39 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-23 10:26:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 15:17:01 +0000 os-release: Quote variables as documented in the manual Variables must be quoted if they contain non-alphanumeric characters. Warner noted in the review that the lack of quoting causing problems here is rather an edge case. I believe that it's worth adding the quotes here anyway because this is what the specification says and there is no good reason not to follow it. Reviewed by: imp Approved by: imp (src) MFC after: 7 days --- libexec/rc/rc.d/os-release | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libexec/rc/rc.d/os-release b/libexec/rc/rc.d/os-release index c328e161a70e..16f8cb178db8 100755 --- a/libexec/rc/rc.d/os-release +++ b/libexec/rc/rc.d/os-release @@ -27,14 +27,14 @@ osrelease_start() t=$(mktemp -t os-release) cat > "$t" <<-__EOF__ NAME=FreeBSD - VERSION=$_version - VERSION_ID=$_version_id + VERSION="$_version" + VERSION_ID="$_version_id" ID=freebsd ANSI_COLOR="0;31" PRETTY_NAME="FreeBSD $_version" - CPE_NAME=cpe:/o:freebsd:freebsd:$_version_id - HOME_URL=https://FreeBSD.org/ - BUG_REPORT_URL=https://bugs.FreeBSD.org/ + CPE_NAME="cpe:/o:freebsd:freebsd:$_version_id" + HOME_URL="https://FreeBSD.org/" + BUG_REPORT_URL="https://bugs.FreeBSD.org/" __EOF__ install -C -o root -g wheel -m ${osrelease_perms} "$t" "${osrelease_file}" rm -f "$t" From nobody Wed Nov 24 15:34:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ACFA118A54DB; Wed, 24 Nov 2021 15:34:08 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzlRM2xYfz3FD6; Wed, 24 Nov 2021 15:34:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 6EE358D4A212; Wed, 24 Nov 2021 15:34:05 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id DE13DE70847; Wed, 24 Nov 2021 15:34:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 5QCXisw6sBDg; Wed, 24 Nov 2021 15:34:03 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1DD59E70846; Wed, 24 Nov 2021 15:34:03 +0000 (UTC) Date: Wed, 24 Nov 2021 15:34:02 +0000 (UTC) From: "Bjoern A. Zeeb" To: Baptiste Daroussin cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a46722b58056 - main - ncurses: register formw as usable lib for LIBADD In-Reply-To: Message-ID: References: <202111241003.1AOA3pxZ008905@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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; format=flowed X-Rspamd-Queue-Id: 4HzlRM2xYfz3FD6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 2a01:4f8:13b:39f::9f:25 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net X-Spamd-Result: default: False [-2.90 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-0.63)[-0.633]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:13b:39f::9f:25]; DMARC_NA(0.00)[zabbadoz.net]; NEURAL_HAM_LONG(-0.98)[-0.981]; NEURAL_HAM_SHORT(-0.99)[-0.991]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; RCVD_TLS_LAST(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 24 Nov 2021, Bjoern A. Zeeb wrote: > On Wed, 24 Nov 2021, Bjoern A. Zeeb wrote: > >> On Wed, 24 Nov 2021, Baptiste Daroussin wrote: >> >>> The branch main has been updated by bapt: >>> >>> URL: >>> https://cgit.FreeBSD.org/src/commit/?id=a46722b580567799b484b5a81728eaf380777e04 >>> >>> commit a46722b580567799b484b5a81728eaf380777e04 >>> Author: Baptiste Daroussin >>> AuthorDate: 2021-11-24 09:20:10 +0000 >>> Commit: Baptiste Daroussin >>> CommitDate: 2021-11-24 10:02:22 +0000 >>> >>> ncurses: register formw as usable lib for LIBADD >> >> is LIBFORM to be LIBFORMW or do we need another new entry? >> >> 1393 make[7]: "share/mk/bsd.libnames.mk" line 190: lib/ncurses/form: >> Missing value for LIBFORMW in bsd.libnames.mk. Likely should be: >> LIBFORMW?= ${LIBDESTDIR}${LIBDIR_BASE}/libformw.a > > > and later still: > > 6315 ld: error: unable to find library -lformw > 6316 cc: error: linker command failed with exit code 1 (use -v to see > invocation) > 6317 --- libprivatebsddialog.so.0.full --- > 6318 *** [libprivatebsddialog.so.0.full] Error code 1 > > > @ 848ee2a3a8b47c9905fc51fefcf60eb371edbb98 I've locally fixed this (it seems) like this for now: diff --git a/Makefile.inc1 b/Makefile.inc1 index d8f50cf77d4b..620d9f239b6e 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2943,6 +2943,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_lib_casper} \ lib/ncurses/tinfo \ lib/ncurses/ncurses \ + lib/ncurses/form \ lib/libopie lib/libpam/libpam lib/libthr \ ${_lib_libradius} lib/libsbuf lib/libtacplus \ lib/libgeom \ @@ -2982,6 +2983,7 @@ _lib_libradius= lib/libradius .endif lib/ncurses/ncurses__L: lib/ncurses/tinfo__L +lib/ncurses/form__L: lib/ncurses/ncurses__L .if ${MK_OFED} != "no" _prebuild_libs+= \ -- Bjoern A. Zeeb r15:7 From nobody Wed Nov 24 15:37:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6E40918A72D4; Wed, 24 Nov 2021 15:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzlWY5Lzsz3G6B; Wed, 24 Nov 2021 15:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E4B448C4; Wed, 24 Nov 2021 15:37: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 1AOFbjOW052335; Wed, 24 Nov 2021 15:37:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOFbjjB052334; Wed, 24 Nov 2021 15:37:45 GMT (envelope-from git) Date: Wed, 24 Nov 2021 15:37:45 GMT Message-Id: <202111241537.1AOFbjjB052334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: dd978721a223 - main - Remove redundant declarations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd978721a223e3f9d35a7be5407c52a281fcec8f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637768265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9pc7oisgrlec5DneOlwajLhQ/N9OngJZT1buhNqV+sg=; b=iR3IWa/5vK3tkEmAB0FrjuU/jvV260x2Kyk5MGYmIgJsvCGzPTkRqKkP/4bdfCjATCDRC9 hbKrCQuvwbVlfZAMRux397FT9EIMMf1U1en0HW2QG5cx2RTzT6wn+gb/C70icJKanul7nA Vyl61McELbKgLdlQ2AegEW+MrzSWbg+QGZRNqJNvRPQH+ECT8sQxc+Sg1kZCq44l2dRG1r pXrAHALl6FjIyQgzm0wb/gcDoHf32Rl8JaDwxr2XMOJFtH13RTeuAkpCM89PYS9INqAZGB fgR1pUEewi631p85zm42KEjUwaaYtQyReyTKBcrrKZCcIlGSodF+BDKO8VN+rA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637768265; a=rsa-sha256; cv=none; b=KRedWu7PdRWc1HKh3zmLNxEOk7AssL0dPWQdqKwCTzqe/78E5mH+WCFUjXsZpSoQhVrye0 95NJkwagUCC/n/yIUxHW1iOBBMedeD0MG7fAiH4ha5xOEaxtSdLp9uNICQIixetgxgMUEA Rqv+siG0qZ0nZM3orDALxMa/7NZB8AREdr7S0q1URYFNXSHk2CoAzCCrbXOI2rreKdWa14 ZB2Fca3jgwwGHlGHqIeaFwwvxfASLU6swIgdU7E0/vEzx378Tl2/pLDpLTBJqUa3yiVlUX uXzoB0O4o87UlwFSW5SyKEPVRFGtrcdL8KPkRd4pHG+72Wh7Ij4986cuwAG9BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=dd978721a223e3f9d35a7be5407c52a281fcec8f commit dd978721a223e3f9d35a7be5407c52a281fcec8f Author: Andrew Turner AuthorDate: 2021-11-23 17:26:35 +0000 Commit: Andrew Turner CommitDate: 2021-11-24 15:31:50 +0000 Remove redundant declarations These are already defined in the same file. Sponsored by: The FreeBSD Foundation --- sys/arm64/rockchip/clk/rk_clk_fract.c | 3 --- sys/arm64/rockchip/rk_pcie_phy.c | 1 - 2 files changed, 4 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk_clk_fract.c b/sys/arm64/rockchip/clk/rk_clk_fract.c index afdf56cfade7..2b347db91790 100644 --- a/sys/arm64/rockchip/clk/rk_clk_fract.c +++ b/sys/arm64/rockchip/clk/rk_clk_fract.c @@ -179,9 +179,6 @@ rk_clk_fract_set_gate(struct clknode *clk, bool enable) return (0); } -static int -rk_clk_fract_set_freq(struct clknode *clk, uint64_t fin, uint64_t *fout, - int flags, int *stop); static int rk_clk_fract_recalc(struct clknode *clk, uint64_t *freq) { diff --git a/sys/arm64/rockchip/rk_pcie_phy.c b/sys/arm64/rockchip/rk_pcie_phy.c index eaa7619e15c3..d01aa930906b 100644 --- a/sys/arm64/rockchip/rk_pcie_phy.c +++ b/sys/arm64/rockchip/rk_pcie_phy.c @@ -252,7 +252,6 @@ rk_pcie_phy_enable(struct phynode *phynode, bool enable) } /* Phy class and methods. */ -static int rk_pcie_phy_enable(struct phynode *phynode, bool enable); static phynode_method_t rk_pcie_phy_phynode_methods[] = { PHYNODEMETHOD(phynode_enable, rk_pcie_phy_enable), From nobody Wed Nov 24 15:37:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3E9AF18A7028; Wed, 24 Nov 2021 15:37: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 4HzlWZ46Ldz3GDQ; Wed, 24 Nov 2021 15:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60ABD4A0E; Wed, 24 Nov 2021 15:37: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 1AOFbkTF052359; Wed, 24 Nov 2021 15:37:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOFbkmw052358; Wed, 24 Nov 2021 15:37:46 GMT (envelope-from git) Date: Wed, 24 Nov 2021 15:37:46 GMT Message-Id: <202111241537.1AOFbkmw052358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 3ff041945054 - main - Fix bracketing in the arm64 minidump 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ff041945054e692672f506a2448d1200133032d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637768266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+4cpZbPDCYOyCeuqwvdQGtLIv9WWVPIK+0g76Fu/Moc=; b=LKZKZRdcQL08pfxTMlQeixmexWhs8apasmlmf2k4NQbdwX1jBbzP44K5bJcKQjrikDDGJR mACeVRbS2GX/cce7nfcNAxgT1kt6o3PmU0rnTENcmq7YqHu90fWN/8PsENnDWarQt3NJN0 e0fio02+F6XBWYMHJ9PCWqPU8/vFUhxs9RHLiCLnITprKHeyoTW7Yxjt4j6VfT69hBI0+/ 07Lf4LXJBU6E2H8Bv9Dby2gu1xtHVyxWnf11EdVW+6M+dkyjdx4jFb7Ff8CNdhyg+q+d6Q O7CQAa2JQ6Rr1PF6wfAUCPqLOosF0WiG1KzIJP+j2uz8GF9qFsvUoc93nFEAow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637768266; a=rsa-sha256; cv=none; b=VhjeWv3toMl1eaygrjTH6wegGnhWi/KD46gapfVOk/q8QUgxq3lCeCFUqAdsa5iCyODDKv eF3+ObpXsFj3jdxk+SOxFY2m7n+C/G9fU0jxVQRqL2BkATpj0n543KuWoFAfJmpW44tx0o ggVS+c3aiJgzXGXT/J2Y7F6E7p28j6O4dQGIihZk/8mAOPv53TyqSQqqQ0II5HeCCigrfh OI5chXLxUUq7SNNCliVM08QM1U8RyTISYK1BN/jQ1HwZOZuIxspwknEVkROFxnwoJo3bJF h7S7lCq5QzvfhY+418PGyQUSP37nEvoScN07k5AmA1sfY8H4yB4teDLrSJvgxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=3ff041945054e692672f506a2448d1200133032d commit 3ff041945054e692672f506a2448d1200133032d Author: Andrew Turner AuthorDate: 2021-11-23 18:28:28 +0000 Commit: Andrew Turner CommitDate: 2021-11-24 15:31:56 +0000 Fix bracketing in the arm64 minidump code When building with gcc10 it suggests the parentheses are wrong. Set them to be the calculated physical address or'd with page table attributes. Reviewed by: mhorne, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33099 --- sys/arm64/arm64/minidump_machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/minidump_machdep.c b/sys/arm64/arm64/minidump_machdep.c index 8383d69fc5f8..ac5a7b271b85 100644 --- a/sys/arm64/arm64/minidump_machdep.c +++ b/sys/arm64/arm64/minidump_machdep.c @@ -303,8 +303,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) for (i = 0; i < Ln_ENTRIES; i++) { for (j = 0; j < Ln_ENTRIES; j++) { - tmpbuffer[j] = pa + i * L2_SIZE + - j * PAGE_SIZE | ATTR_DEFAULT | + tmpbuffer[j] = (pa + i * L2_SIZE + + j * PAGE_SIZE) | ATTR_DEFAULT | L3_PAGE; } error = blk_write(di, (char *)&tmpbuffer, 0, @@ -323,7 +323,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state) /* Generate fake l3 entries based upon the l1 entry */ for (i = 0; i < Ln_ENTRIES; i++) { - tmpbuffer[i] = pa + (i * PAGE_SIZE) | + tmpbuffer[i] = (pa + i * PAGE_SIZE) | ATTR_DEFAULT | L3_PAGE; } error = blk_write(di, (char *)&tmpbuffer, 0, PAGE_SIZE); From nobody Wed Nov 24 15:43:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EBDA218A9CD2; Wed, 24 Nov 2021 15:43:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzlfG4Gbpz3JXX; Wed, 24 Nov 2021 15:43:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 6D6352FF07; Wed, 24 Nov 2021 15:43:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f172.google.com with SMTP id 132so3221520qkj.11; Wed, 24 Nov 2021 07:43:34 -0800 (PST) X-Gm-Message-State: AOAM533vl2bXY8eviVdJxrUyRf9w27ZpFR+dAQ37kjLtjffJqmSFvm5S 6NPj+FJNmxfI/Q4oJSCqFCMxfa5jZDso/v8KRZU= X-Google-Smtp-Source: ABdhPJzGi3KYla7p+d8ZJ5sWk9ecM3qA4HHqqel6FxJ5qKCTV4LQFwqtWVuQWM993TlOBMXi+aX/MJd0VubTXqV6J4E= X-Received: by 2002:a05:620a:1a10:: with SMTP id bk16mr7303107qkb.258.1637768613989; Wed, 24 Nov 2021 07:43:33 -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: <202111241003.1AOA3pxZ008905@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Wed, 24 Nov 2021 09:43:22 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: a46722b58056 - main - ncurses: register formw as usable lib for LIBADD To: "Bjoern A. Zeeb" Cc: Baptiste Daroussin , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637768614; 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=LCd4nkhumBHhI8Y4uf4d/RgwsUW+MAW50tQZ2GP0YcE=; b=Lyb8IYU62J9L4VuhcVBmVca+fu+MrRuF5KodK4Q/szR8hHY1XckZrS2q36z/d30RGZC1uf BCW9IkhcdUxOHlxIfQEq6kA+KTvmy6kcoeKgmBOmQVzHmyan6Se9wngNrVStm+n6SDhKpe jMFxU2DldXj9v0wV2p4y2XdLJon/thhjn1DcLLFr2qvKvxFgHGxC1cJzMJlm8Wzxzw4Oag B/VbdSvkdeBynZkWadPX0/X1varDTkgUZ/wI9w/R3+XAPFJny5L7xD3ts9o4jKadNFfaZs 8LuEA7cI//uI82QKxuMj5FQtX+GFCmh+nclHrjCeMpRqYmPSrbtfjngjcwKc4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637768614; a=rsa-sha256; cv=none; b=sRP98IR23f0068qPiPnWEUw5M/kkDTedEt+f0eUkGRPAYyaTdiJb6kVRexC4UZccTiC3Zk s7Coiepslv1zq/+4Mg9EqNtSnvbIzzIM39QZZPHx4/SIWreUFt+sZ/0jdx0gUcWLD8FEKa zavqFl1Gtfh2GFcfjPT3IQzb3cWnXC/9VFNZJ3b1paVNoyEjVuju4mr7usD9Hfc8io0c0o d8ic+ryqAyd9gUOAMLYcsjeDsKhdWprAES29OiWjfL+OCP2g0YHL9pzm6DVRxQynVEMz/c Q0iN8ORB3138yMA5TPl5Z78zMS2TLeXYhv2PWoxYcAyFK3kgt+/kxBLF8rfhzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 24, 2021 at 9:34 AM Bjoern A. Zeeb wrote: > > On Wed, 24 Nov 2021, Bjoern A. Zeeb wrote: > > > On Wed, 24 Nov 2021, Bjoern A. Zeeb wrote: > > > >> On Wed, 24 Nov 2021, Baptiste Daroussin wrote: > >> > >>> The branch main has been updated by bapt: > >>> > >>> URL: > >>> https://cgit.FreeBSD.org/src/commit/?id=a46722b580567799b484b5a81728eaf380777e04 > >>> > >>> commit a46722b580567799b484b5a81728eaf380777e04 > >>> Author: Baptiste Daroussin > >>> AuthorDate: 2021-11-24 09:20:10 +0000 > >>> Commit: Baptiste Daroussin > >>> CommitDate: 2021-11-24 10:02:22 +0000 > >>> > >>> ncurses: register formw as usable lib for LIBADD > >> > >> is LIBFORM to be LIBFORMW or do we need another new entry? > >> > >> 1393 make[7]: "share/mk/bsd.libnames.mk" line 190: lib/ncurses/form: > >> Missing value for LIBFORMW in bsd.libnames.mk. Likely should be: > >> LIBFORMW?= ${LIBDESTDIR}${LIBDIR_BASE}/libformw.a > > > > > > and later still: > > > > 6315 ld: error: unable to find library -lformw > > 6316 cc: error: linker command failed with exit code 1 (use -v to see > > invocation) > > 6317 --- libprivatebsddialog.so.0.full --- > > 6318 *** [libprivatebsddialog.so.0.full] Error code 1 > > > > > > @ 848ee2a3a8b47c9905fc51fefcf60eb371edbb98 > > I've locally fixed this (it seems) like this for now: > > diff --git a/Makefile.inc1 b/Makefile.inc1 > index d8f50cf77d4b..620d9f239b6e 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -2943,6 +2943,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ > ${_lib_casper} \ > lib/ncurses/tinfo \ > lib/ncurses/ncurses \ > + lib/ncurses/form \ > lib/libopie lib/libpam/libpam lib/libthr \ > ${_lib_libradius} lib/libsbuf lib/libtacplus \ > lib/libgeom \ > @@ -2982,6 +2983,7 @@ _lib_libradius= lib/libradius > .endif > > lib/ncurses/ncurses__L: lib/ncurses/tinfo__L > +lib/ncurses/form__L: lib/ncurses/ncurses__L > > .if ${MK_OFED} != "no" > _prebuild_libs+= \ > I would also add a SUBDIR_DEPEND_form in lib/ncurses/Makefile to reflect this dependency for local builds of lib/ncurses, but otherwise: Reviewed by: Kyle Evans From nobody Wed Nov 24 15:49:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D725F18AD6C1; Wed, 24 Nov 2021 15:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hzlmb4K5kz3M2m; Wed, 24 Nov 2021 15:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 73DFE4BD1; Wed, 24 Nov 2021 15:49: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 1AOFn3kb065447; Wed, 24 Nov 2021 15:49:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOFn3nX065446; Wed, 24 Nov 2021 15:49:03 GMT (envelope-from git) Date: Wed, 24 Nov 2021 15:49:03 GMT Message-Id: <202111241549.1AOFn3nX065446@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 5abafe4aa0b8 - main - bsddialog, mark the lib as dependent on ncurses List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5abafe4aa0b82a3ce96425b016641324c290a8b4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637768943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XP6W1kSuoZ6JlcsgxUgWLn9xlzTIX9PxLiHJbOHk1t0=; b=mBVAl/QUZPzBbBT/+nXUPfNjRGeXSAgRcr6r868TLZer1ta9Ad1eYtBQGJ1TAgPXTDG/4b n86NDU7hX0Q0FmpNWb7in8HBo6bbzMEul96R381Rs63uTr+iLQuPKOIUzO7vV9QRSJ28z2 CJnnTxqS5Ygund64z6hTCwpXnxy5sszaR7wij4dVD+Utu/WPzwD8XXZ4hxQoSgAhtQ9D8g xl7JWbhBpVgHYTbvnShTUSyaecggaGB+52VL6UfB5VdzAzQQUvvX9Wvrv0ki0mnUPbQpuI QJl+H23sU8CbbA+K0ez6mJrGNjZvnhDNeCrccMreXYebUzSuPKOW/eMa3CTxZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637768943; a=rsa-sha256; cv=none; b=nHnciKY4vKC0ch1OGClBj5aIUpfYJuuyvd8bFgi7yhQOSire11e0J4IsR4/F5kXJ7GbJvy U0NU7BiDjCC02soh3xSoLoxim8mLxzQDJh5/qpg4p6/70PgheAVBX1VSyrrKmswL1cI/9K tgzX0HLkL9RQACsOipPgwddDofvgwpnrbGPHrPqVI4sHIH0EY1NELJZU8riYa25P7EqvZi aYlC6CVNcM4Bqe22YV/hM1wWq8/S8+EcVzr6bGCPBuwM6wUckC7uDgq+ujVQ7+tWgtOvpW lu2dYhSQx0t0Fz0Fdsun3R+Y5+Z02Or3ttRTOFJWAtURzGTQqvSfmH+cqiN3hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5abafe4aa0b82a3ce96425b016641324c290a8b4 commit 5abafe4aa0b82a3ce96425b016641324c290a8b4 Author: Baptiste Daroussin AuthorDate: 2021-11-24 15:47:39 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-24 15:48:44 +0000 bsddialog, mark the lib as dependent on ncurses --- lib/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Makefile b/lib/Makefile index 3af6b938ee74..2cba5feaee19 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -117,6 +117,7 @@ SUBDIR_DEPEND_geom= libufs SUBDIR_DEPEND_googletest= libregex SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd SUBDIR_DEPEND_libauditdm= libbsm +SUBDIR_DEPEND_libbsddialog= ncurses SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} SUBDIR_DEPEND_libc++:= libcxxrt # libssp_nonshared doesn't need to be linked into libc on every arch, but it is From nobody Wed Nov 24 15:49:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3306A18ADA5A; Wed, 24 Nov 2021 15:49:53 +0000 (UTC) (envelope-from bapt@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 4HzlnX6Hygz3MFM; Wed, 24 Nov 2021 15:49:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id A09282FDF5; Wed, 24 Nov 2021 15:49:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id D2DE14EB1F; Wed, 24 Nov 2021 16:49:50 +0100 (CET) Date: Wed, 24 Nov 2021 16:49:50 +0100 From: Baptiste Daroussin To: "Bjoern A. Zeeb" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a46722b58056 - main - ncurses: register formw as usable lib for LIBADD Message-ID: <20211124154950.iu62azibagbgosjh@aniel.nours.eu> References: <202111241003.1AOA3pxZ008905@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: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637768992; 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=AO5pBizeLHX5amJUEBwIXkX1tXN6cC8fEaxOD+iy9j0=; b=bAgXAo9yYjtif+ScvS5/1rIlwHZU4kj4kJm+Wg8mbxPEhh1Gdt2fp+6O+WcDwRWB2BKoip cfjF3JqJ8OSP18JRA4L0gAuvz6wlk0F9hfPfD99GjI+duxolDNwvuUwGMsKQIzMKbDyMZo Ge67k2s/08sn/yRB5uR6nfeOJ/hrP1S/bQDb1/Z/IL0NRb+e/NVptvPDAQ2WFTy1lcAYHI 2cqUSSBCtBg15UahZgE/AMKEpvTV6APZ3W27mTpeIgCKxKUU9BoC99RSzJtMG/Mex59sn0 /oS2mmE4dMS9UCOTjy25attci8dSdEje+baX8/1JXgVdz9vJchXUIOtk+c2idQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637768992; a=rsa-sha256; cv=none; b=Ba/3l30/YPJfuOjr4wVqIRV6D1xjg7vkJmVgJ8g1C/K+CNmRH5CnUIPHNldvQ7kZp+JqUv l/XrzkZcMufQV6BLeYmn+xi9XFsyYj4hJD8nurq/vDDLo0EzH9RsuO9G6TZzEV8lNJjD5V fMInPbpRL/snEH732sObo7vbG0H+JUMGZdjBq2/Q6PLi4y40CYFv+UnKJY2BQiKDSd06t+ vl8cikDqAquOv+072xZoWkFCd7Vk5dAhwrs7/MXIfM1BDQLFYYteR2qvMdOKimgCELIqUN NCAyNQWC+XDDqmnLf91okkNzRyQDwU41tDSz+/rUGku/bWme+RZz53JGPC+tZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 24, 2021 at 03:34:02PM +0000, Bjoern A. Zeeb wrote: > On Wed, 24 Nov 2021, Bjoern A. Zeeb wrote: > > > On Wed, 24 Nov 2021, Bjoern A. Zeeb wrote: > > > > > On Wed, 24 Nov 2021, Baptiste Daroussin wrote: > > > > > > > The branch main has been updated by bapt: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=a46722b580567799b484b5a81728eaf380777e04 > > > > > > > > commit a46722b580567799b484b5a81728eaf380777e04 > > > > Author: Baptiste Daroussin > > > > AuthorDate: 2021-11-24 09:20:10 +0000 > > > > Commit: Baptiste Daroussin > > > > CommitDate: 2021-11-24 10:02:22 +0000 > > > > > > > > ncurses: register formw as usable lib for LIBADD > > > > > > is LIBFORM to be LIBFORMW or do we need another new entry? > > > > > > 1393 make[7]: "share/mk/bsd.libnames.mk" line 190: > > > lib/ncurses/form: Missing value for LIBFORMW in bsd.libnames.mk. > > > Likely should be: LIBFORMW?= ${LIBDESTDIR}${LIBDIR_BASE}/libformw.a > > > > > > and later still: > > > > 6315 ld: error: unable to find library -lformw > > 6316 cc: error: linker command failed with exit code 1 (use -v to see > > invocation) > > 6317 --- libprivatebsddialog.so.0.full --- > > 6318 *** [libprivatebsddialog.so.0.full] Error code 1 > > > > > > @ 848ee2a3a8b47c9905fc51fefcf60eb371edbb98 > > I've locally fixed this (it seems) like this for now: > > diff --git a/Makefile.inc1 b/Makefile.inc1 > index d8f50cf77d4b..620d9f239b6e 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -2943,6 +2943,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ > ${_lib_casper} \ > lib/ncurses/tinfo \ > lib/ncurses/ncurses \ > + lib/ncurses/form \ > lib/libopie lib/libpam/libpam lib/libthr \ > ${_lib_libradius} lib/libsbuf lib/libtacplus \ > lib/libgeom \ > @@ -2982,6 +2983,7 @@ _lib_libradius= lib/libradius > .endif > > lib/ncurses/ncurses__L: lib/ncurses/tinfo__L > +lib/ncurses/form__L: lib/ncurses/ncurses__L > > .if ${MK_OFED} != "no" > _prebuild_libs+= \ > I think it should be fixed, I don't think it is necessary to add it to the prebuild_libs Best regards, Bapt From nobody Wed Nov 24 15:50:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 92D6318ADCFE; Wed, 24 Nov 2021 15:50:26 +0000 (UTC) (envelope-from bapt@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 4HzlpB2wypz3MgQ; Wed, 24 Nov 2021 15:50:26 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 32C4E2F9A7; Wed, 24 Nov 2021 15:50:26 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id A217B4EC0A; Wed, 24 Nov 2021 16:50:23 +0100 (CET) Date: Wed, 24 Nov 2021 16:50:23 +0100 From: Baptiste Daroussin To: Kyle Evans Cc: "Bjoern A. Zeeb" , src-committers , "" , dev-commits-src-main@freebsd.org Subject: Re: git: a46722b58056 - main - ncurses: register formw as usable lib for LIBADD Message-ID: <20211124155023.eqwvw5jamk6vzdxm@aniel.nours.eu> References: <202111241003.1AOA3pxZ008905@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: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637769026; 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=LzNCKs0ikLJFw/XoRcOLbtk9pa+kGqvHWl9w8wMdVk4=; b=C/gWoliKn23btsNmP2fZrddloyTK8XtdwbiQ26DRtrCtCx/ajxnpoRvdjUO/X88CW+fNpp cqdRwEisQqFjcQUl0pPnkiQlgZowW0ff/mAE57G49J28KzLo/JhnSNGwxO5Ccov5DuAJ4W 2EQjv279Vcy7b4j0cYyAUeDwoWkYkXAwvZZFBtriUNYVX3VoF5mEnJL7Q790+qdCJkHhnq 6RnWEFVR98ZZ/JKZX7sETpJMhfpwxJTDo6GOJJDNzsmc9rvpem7YcHm5APCoKp/KesAINK /nPPGPsF6bxvrDHb3a+E4HydRIlbhI2fnjbXt9Y1TwYz/yV5V062gk3C+IR9bA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637769026; a=rsa-sha256; cv=none; b=xRt8bNZOwtWIoB3zlrA1Wrw98UD5m0Pe8FCKjHmUxMO2USs7fvGk4BQ0nuA6dj4YeQ5C5/ yr9mfhAwggrld9X1EjCBRSWy44MbIRi66ENe+J0Hh2L3TEFVxvFCW5SRSCSjFtttq7APc7 iPwUoRT5RrOpCyOwnn82CXMdWdkTOEmPRdIMe7rn2uW/K5H1RdI0tQHzYJQ4PskiGmUMqs pNIyqVjhsKO4iXtis4eurLBDUxC4nQjUDyGe2VfOxbsvau+/Aym6hl5/SsBtwgsHvQBUep pS6W/XZ7Fa6pzIBS1Pust9rWlN2PTYVK8mTdUJadOasvSeA9Oa4JJIDKMLb+/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 24, 2021 at 09:43:22AM -0600, Kyle Evans wrote: > On Wed, Nov 24, 2021 at 9:34 AM Bjoern A. Zeeb > wrote: > > > > On Wed, 24 Nov 2021, Bjoern A. Zeeb wrote: > > > > > On Wed, 24 Nov 2021, Bjoern A. Zeeb wrote: > > > > > >> On Wed, 24 Nov 2021, Baptiste Daroussin wrote: > > >> > > >>> The branch main has been updated by bapt: > > >>> > > >>> URL: > > >>> https://cgit.FreeBSD.org/src/commit/?id=a46722b580567799b484b5a81728eaf380777e04 > > >>> > > >>> commit a46722b580567799b484b5a81728eaf380777e04 > > >>> Author: Baptiste Daroussin > > >>> AuthorDate: 2021-11-24 09:20:10 +0000 > > >>> Commit: Baptiste Daroussin > > >>> CommitDate: 2021-11-24 10:02:22 +0000 > > >>> > > >>> ncurses: register formw as usable lib for LIBADD > > >> > > >> is LIBFORM to be LIBFORMW or do we need another new entry? > > >> > > >> 1393 make[7]: "share/mk/bsd.libnames.mk" line 190: lib/ncurses/form: > > >> Missing value for LIBFORMW in bsd.libnames.mk. Likely should be: > > >> LIBFORMW?= ${LIBDESTDIR}${LIBDIR_BASE}/libformw.a > > > > > > > > > and later still: > > > > > > 6315 ld: error: unable to find library -lformw > > > 6316 cc: error: linker command failed with exit code 1 (use -v to see > > > invocation) > > > 6317 --- libprivatebsddialog.so.0.full --- > > > 6318 *** [libprivatebsddialog.so.0.full] Error code 1 > > > > > > > > > @ 848ee2a3a8b47c9905fc51fefcf60eb371edbb98 > > > > I've locally fixed this (it seems) like this for now: > > > > diff --git a/Makefile.inc1 b/Makefile.inc1 > > index d8f50cf77d4b..620d9f239b6e 100644 > > --- a/Makefile.inc1 > > +++ b/Makefile.inc1 > > @@ -2943,6 +2943,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ > > ${_lib_casper} \ > > lib/ncurses/tinfo \ > > lib/ncurses/ncurses \ > > + lib/ncurses/form \ > > lib/libopie lib/libpam/libpam lib/libthr \ > > ${_lib_libradius} lib/libsbuf lib/libtacplus \ > > lib/libgeom \ > > @@ -2982,6 +2983,7 @@ _lib_libradius= lib/libradius > > .endif > > > > lib/ncurses/ncurses__L: lib/ncurses/tinfo__L > > +lib/ncurses/form__L: lib/ncurses/ncurses__L > > > > .if ${MK_OFED} != "no" > > _prebuild_libs+= \ > > > > I would also add a SUBDIR_DEPEND_form in lib/ncurses/Makefile to > reflect this dependency for local builds of lib/ncurses, but > otherwise: > it is already there the SUBDIR_DEPEND Bapt From nobody Wed Nov 24 15:51:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CF42418AE274; Wed, 24 Nov 2021 15:51:08 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hzlq04jgmz3NGN; Wed, 24 Nov 2021 15:51:08 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 5E5BE8D4A179; Wed, 24 Nov 2021 15:51:07 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id DF1EFE70847; Wed, 24 Nov 2021 15:51:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id vqYf-P7q5P6a; Wed, 24 Nov 2021 15:51:04 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 66CF9E70846; Wed, 24 Nov 2021 15:51:04 +0000 (UTC) Date: Wed, 24 Nov 2021 15:51:03 +0000 (UTC) From: "Bjoern A. Zeeb" To: Baptiste Daroussin cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a46722b58056 - main - ncurses: register formw as usable lib for LIBADD In-Reply-To: <20211124154950.iu62azibagbgosjh@aniel.nours.eu> Message-ID: References: <202111241003.1AOA3pxZ008905@gitrepo.freebsd.org> <20211124154950.iu62azibagbgosjh@aniel.nours.eu> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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; format=flowed X-Rspamd-Queue-Id: 4Hzlq04jgmz3NGN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 24 Nov 2021, Baptiste Daroussin wrote: > On Wed, Nov 24, 2021 at 03:34:02PM +0000, Bjoern A. Zeeb wrote: >> On Wed, 24 Nov 2021, Bjoern A. Zeeb wrote: >> >>> On Wed, 24 Nov 2021, Bjoern A. Zeeb wrote: >>> >>>> On Wed, 24 Nov 2021, Baptiste Daroussin wrote: >>>> >>>>> The branch main has been updated by bapt: >>>>> >>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=a46722b580567799b484b5a81728eaf380777e04 >>>>> >>>>> commit a46722b580567799b484b5a81728eaf380777e04 >>>>> Author: Baptiste Daroussin >>>>> AuthorDate: 2021-11-24 09:20:10 +0000 >>>>> Commit: Baptiste Daroussin >>>>> CommitDate: 2021-11-24 10:02:22 +0000 >>>>> >>>>> ncurses: register formw as usable lib for LIBADD >>>> >>>> is LIBFORM to be LIBFORMW or do we need another new entry? >>>> >>>> 1393 make[7]: "share/mk/bsd.libnames.mk" line 190: >>>> lib/ncurses/form: Missing value for LIBFORMW in bsd.libnames.mk. >>>> Likely should be: LIBFORMW?= ${LIBDESTDIR}${LIBDIR_BASE}/libformw.a >>> >>> >>> and later still: >>> >>> 6315 ld: error: unable to find library -lformw >>> 6316 cc: error: linker command failed with exit code 1 (use -v to see >>> invocation) >>> 6317 --- libprivatebsddialog.so.0.full --- >>> 6318 *** [libprivatebsddialog.so.0.full] Error code 1 >>> >>> >>> @ 848ee2a3a8b47c9905fc51fefcf60eb371edbb98 >> >> I've locally fixed this (it seems) like this for now: >> >> diff --git a/Makefile.inc1 b/Makefile.inc1 >> index d8f50cf77d4b..620d9f239b6e 100644 >> --- a/Makefile.inc1 >> +++ b/Makefile.inc1 >> @@ -2943,6 +2943,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ >> ${_lib_casper} \ >> lib/ncurses/tinfo \ >> lib/ncurses/ncurses \ >> + lib/ncurses/form \ >> lib/libopie lib/libpam/libpam lib/libthr \ >> ${_lib_libradius} lib/libsbuf lib/libtacplus \ >> lib/libgeom \ >> @@ -2982,6 +2983,7 @@ _lib_libradius= lib/libradius >> .endif >> >> lib/ncurses/ncurses__L: lib/ncurses/tinfo__L >> +lib/ncurses/form__L: lib/ncurses/ncurses__L >> >> .if ${MK_OFED} != "no" >> _prebuild_libs+= \ >> > > I think it should be fixed, I don't think it is necessary to add it to the > prebuild_libs I just saw it flying in; thanks a lot! I had just used a hammer. -- Bjoern A. Zeeb r15:7 From nobody Wed Nov 24 15:55:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AE1AC18B1847; Wed, 24 Nov 2021 15: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 4HzlwQ2wLkz3QD5; Wed, 24 Nov 2021 15:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4401E4BEE; Wed, 24 Nov 2021 15: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 1AOFtosk078324; Wed, 24 Nov 2021 15: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 1AOFtod5078323; Wed, 24 Nov 2021 15:55:50 GMT (envelope-from git) Date: Wed, 24 Nov 2021 15:55:50 GMT Message-Id: <202111241555.1AOFtod5078323@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: f69572733023 - stable/13 - Export symbols from opensolaris.ko and dtrace.ko List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f69572733023aa8017bddc5bed24358d3bc14847 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637769350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GD/21h7dyyUrkk+r7BseuLpJNYueszJpF3ls5m0ZCbs=; b=YshPssfnM07lO7DvT8tJoFaAi05wDdNAlWeOWnAghFXRlzukMitz4Uxoa6fTy0r2G1eECA YQTwZSom/lkp4sTswgWIODiYdbMHE3uKxoBDo919x5/YDFcM9TKO/9aUVkNgqDY7X8C+So gf+Kz02yai7h6wuZtyuzpM0/IPCXPVX5jA1icLdH2IaILaydaNVsOaXJFUFxJ9TsAGwlwv XyUYMqDWEljimCODvazD4OQDyg8fb8YM1wYpw910ZPPKxU1ClF/reZdTuUXt2iOt63TXll Nd/kYjjCQroB07UiaNnWHVPW2O2EMieHUrdrhB0pCgHkud6PKm9RJvjsy9S7Ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637769350; a=rsa-sha256; cv=none; b=CLjOTuFlmL5bFlbeOIEVYiJXs3YQHboEBAaV41BP2kkmresnZbD2JtSMC2pswdu7iZOZNl Y7kYtrPyr4EIbQBeOIgNwwYc/bH8Mfv3mmsw7EoWhjTqLNDMl5+rzVuAWtEr7icA1RYcRq 6raQB9hMg8amxKEXoyzJTA1yT6GJQd7BxsGjloRmwGtrnUP15S2HjASnlWiyzfCQsqMILV KZYCwLLN6CCRp69qOes02P8jKtnwfsvUKkpxfGOeunnz8pM9erjsRzPihxn20mhYBvunDh zl+3kjOM2Q84vK+Emw5xQnRtlOu/JtO8BOKX3voaFpBKfXKDxw4hj280UvSQ9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f69572733023aa8017bddc5bed24358d3bc14847 commit f69572733023aa8017bddc5bed24358d3bc14847 Author: Mark Johnston AuthorDate: 2021-11-17 16:01:59 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 15:55:37 +0000 Export symbols from opensolaris.ko and dtrace.ko Both modules provide many symbols used by various DTrace provider modules, so just export everything. Sponsored by: The FreeBSD Foundation (cherry picked from commit 8a693ccf86f90469910c5b2425ddb8a75e298487) --- sys/modules/dtrace/dtrace/Makefile | 4 +--- sys/modules/opensolaris/Makefile | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile index 55f9f4f66f36..712e10331a38 100644 --- a/sys/modules/dtrace/dtrace/Makefile +++ b/sys/modules/dtrace/dtrace/Makefile @@ -49,9 +49,7 @@ CFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/common/util \ -I${SYSDIR} -DDIS_MEM -EXPORT_SYMS= dtrace_register \ - dtrace_unregister \ - dtrace_probe_lookup +EXPORT_SYMS= YES dtrace_asm.o: assym.inc diff --git a/sys/modules/opensolaris/Makefile b/sys/modules/opensolaris/Makefile index 536b9637cd3c..7010485b0ee7 100644 --- a/sys/modules/opensolaris/Makefile +++ b/sys/modules/opensolaris/Makefile @@ -27,7 +27,7 @@ SRCS+= opensolaris_atomic.c CFLAGS+= ${OPENZFS_CFLAGS} -EXPORT_SYMS= cpu_core +EXPORT_SYMS= YES IGNORE_PRAGMA= 1 From nobody Wed Nov 24 16:03:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A0D0E18B46EA; Wed, 24 Nov 2021 16:03: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 4Hzm5f2Wfbz3hyn; Wed, 24 Nov 2021 16:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 365924E52; Wed, 24 Nov 2021 16:03: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 1AOG3oBv092691; Wed, 24 Nov 2021 16:03:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOG3or8092690; Wed, 24 Nov 2021 16:03:50 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:03:50 GMT Message-Id: <202111241603.1AOG3or8092690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 615b3385c990 - stable/13 - top: Sort flags in usage message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 615b3385c9906a2f476ff3962639c41b1c61b321 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637769830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bfth+NRKZ520kLYFg22kw69uwJG6H3eEwYgYfx/tzTo=; b=m0rqRRlHFSjcZ/quVOHGwDop+pCZh359Hs58uhoeIgoX5St/ZdRIgH5QSGnPqapK2CVMIv WG7BaWXDaMmMdgTGtWc3G88LGrCIzCnCACsudhYT5SB2pZAUaGA18sinJqltx9H9SCfWNA pLSmcdKdpAlgZ9I6VXnP7gKVBnPfnFN3toXND4cNbyppk5jbU/GZ5PZOVlC7lLy9YStnWF irdnwqpVIacgXuAwZ0mDvqVelsEUpVn4jz81P2bCzLj20XO9a2porImSe+EB3SU89oA4jr 2K+EppflY98rgAnan1oz1xZ9gYwlCYzLQzdU74uan/uYWylfgU5z8seQJ2UMOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637769830; a=rsa-sha256; cv=none; b=gwTgzxCQXjv0/aKNHcfeMidVp2QSGQT6e5Dqv3cOM7s6jurj3nQzKU8Jn3yUHeD6iaSAHU dsU+RUmE4/9AnMbJYePtgRffkw7ytJyQu52uHTA6rtSLZNQRSCw+W4Ff2Jm5K8SICND9el SrfIezvJySkaIoAXUh8BrJTuUZL/TXgCtHLZSSiPzcuQsNcAloo4n28Ac0CIn7hwjaLNLh VqHXu7abvOEBI6qcWazqZf+Hk2b+SNYQzcKKhfUR26YrQv8nmMMsbS7hDvm1dckTAfhTTJ C3ko9f5lz63Yx8T1zKUEEnrO6me3mDRw4PLUp7qK0Vlt5SxtxdD1J03tHlS+0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=615b3385c9906a2f476ff3962639c41b1c61b321 commit 615b3385c9906a2f476ff3962639c41b1c61b321 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 13:21:34 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 16:03:37 +0000 top: Sort flags in usage message While here, fix the indentation of the second line in the message. MFC after: 3 days (cherry picked from commit 82d0f865ee9a93213876c14342b147e31b7ade0d) --- usr.bin/top/top.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index 08248911e99a..68b7bdf1dfb5 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -465,8 +465,8 @@ main(int argc, const char *argv[]) default: errx(1, -"[-abCHIijnPqStuvwz] [-d count] [-m io | cpu] [-o field] [-p pid]\n" -" [-s time] [-J jail] [-U username] [number]"); +"[-abCHIijnPqStuvwz] [-d count] [-J jail] [-m cpu | io] [-o field]\n" +" [-p pid] [-s time] [-U username] [number]"); } } From nobody Wed Nov 24 16:04:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C714718B4D4E; Wed, 24 Nov 2021 16:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hzm6j39F3z3j4H; Wed, 24 Nov 2021 16:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C8D74768; Wed, 24 Nov 2021 16:04: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 1AOG4j4R092860; Wed, 24 Nov 2021 16:04:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOG4jR0092859; Wed, 24 Nov 2021 16:04:45 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:04:45 GMT Message-Id: <202111241604.1AOG4jR0092859@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 6d20d6e5d887 - stable/12 - top: Sort flags in usage message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6d20d6e5d887221d8b5cfd6322995560add6b999 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637769885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dfyBXSI4X2GGhADrYJZ07Dedd8+ItFYqqptwcxqsQwg=; b=ppHH+NFKhbOkKvpTwolFGa1pmjKYZ5J/wLAp3JWeZSoJnyG2eAQ6lDWeftwKorbgd92LR4 pp1jPeM8nl+oFAhFU7Bbe+TkPCiaRFIzxP4A2ryLetKyK8yeenxTxFtDZ3eBkgVL9y6pv9 Fo2hQ3Ha8ewXdxYmh4Jtg7V0J3q8sjxAJr+NFPWdwOS+u0SmhoQCIzFownITj2vUUB5ZZP E+7X6U08vBRJguNCej5Cl4VZE4Ka1t6m0NwsX2hYZ6Y39y8qWk1D3qPDTnc5Y4RgekSAqV mxl4BGonAbb2unwWL0CdYDECjPYY4SMl3T2T8CTF7f+dOd835wjP/Do8vk0+lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637769885; a=rsa-sha256; cv=none; b=n8AVsPHM+Hf2MlIsBvDhOn3hOZgAgTxrMqfelhBJCcKqD29KaUNtKvMBdQ4RUs2UXczScX 5ysDIqRsjMZjZ7pGALkCLMVrY5LIuTkWHpGVY/X9gtoetVCcOwDDU2SyJ7Ynxi/dUuWJ6p Ugd6FE3Ak+sGMb6takZtmHZVHUR+r4FnoiVeYgi2U7a1tb3/PgYSsHBMU6Jl0kneF06riw q8uAqx41VlpP0LuQl2Fen/NEtit6fZ4dpLeBWqvK/vAeaFwUNVJfJpLNjOd9Xh7mY60SJ5 8ayzix4CZ9E+Rygcie0VQgupfk+I6cYuxUf9+GEcRyKzNUA4o8IZ2VJ5Esuzew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=6d20d6e5d887221d8b5cfd6322995560add6b999 commit 6d20d6e5d887221d8b5cfd6322995560add6b999 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 13:21:34 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 16:04:15 +0000 top: Sort flags in usage message While here, fix the indentation of the second line in the message. MFC after: 3 days (cherry picked from commit 82d0f865ee9a93213876c14342b147e31b7ade0d) --- usr.bin/top/top.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index 4b624aacb6b0..50e199ba71d0 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -459,8 +459,8 @@ main(int argc, const char *argv[]) default: errx(1, -"[-abCHIijnPqStuvwz] [-d count] [-m io | cpu] [-o field] [-p pid]\n" -" [-s time] [-J jail] [-U username] [number]"); +"[-abCHIijnPqStuvwz] [-d count] [-J jail] [-m cpu | io] [-o field]\n" +" [-p pid] [-s time] [-U username] [number]"); } } From nobody Wed Nov 24 16:10:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7A94018B7CA5; Wed, 24 Nov 2021 16:10:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzmFJ1Ty9z3klH; Wed, 24 Nov 2021 16:10:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 8035D2F9AD; Wed, 24 Nov 2021 16:10:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <78d7b522-3de3-4011-c0cc-98e23779d577@FreeBSD.org> Date: Wed, 24 Nov 2021 08:10:26 -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.14; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync Content-Language: en-US To: =?UTF-8?Q?Corvin_K=c3=b6hne?= , Emmanuel Vadot , "src-committers@FreeBSD.org" , "dev-commits-src-all@FreeBSD.org" , "dev-commits-src-main@FreeBSD.org" References: <202111221530.1AMFUUJn079855@gitrepo.freebsd.org> <428e410d-33c1-7ff8-9689-41943db3d9c3@FreeBSD.org> <084d5b5845554221901ce4902fb878d1@beckhoff.com> <0d0a6a77-b2d1-d0c2-f0de-e5c97307e140@FreeBSD.org> <80ac3d256ce94f809a39f5badc864588@beckhoff.com> From: John Baldwin In-Reply-To: <80ac3d256ce94f809a39f5badc864588@beckhoff.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637770228; h=from:from:reply-to:subject: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=yaUS1eWjO86CsDeAMNDOq6Xtd7OP9NXX/tByfi40R1k=; b=yf/K0tvogEwFZTt+O8eAhn2rZI+bc+DDqhYn+W0VQ8Oyisp+zaRHzzHAsL7WiXfS5L/wzg ah+aghrhWWz6J2Eg7pUc+LRJ8hI68dRM3Tzc/XdXEA6RJ0FLQ6DAl17h1mLDDY7Dzyyuvk 1XVg3GupvpbWyvHzhdrkOhtwwpD58HQQDIthnZS98nIJalYauQsQrspqzizjcvtea1JNl2 8zUO5aBfn30eKQgc7jS0va+GjTFAR1MldTCJJsDfBQEUsUK+5C54iKcvo/K05jMj/qDZQs hWx5RGBKhTCydPqYpe85RECfgmd6dqnfvjgmJRiMCRKpnNeBRlEN7mJ2i2eLaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637770228; a=rsa-sha256; cv=none; b=hSiNjs53E5Ygiy/3t4BzNOPpkGR3Q59y4yR7JLEn+hpqmF8fPmdkQ5KZPN8h9CxA2C4bsI kkDi5Ij5Rs/w8jHefpZ2E1Es18OME+yIBaCaWgAFifKaEahrM1B3+phzUZlXxoXBCYpEhv wvGshDBHmbFJw8F1mHqceKlmiZqHEhKG0fEZ0HwuzoBKhZkkurTJ9mj9PIuxS/F1HaBw+X N3O7kRHUZFDT+p46VeA3nGJPQFayjghtqTXn8zGZs4zkm1SUh0GCZqFfTDwaoyo71j3f5E eNXbWglGMUwxVGmKmGpVHHuNopfPe35uYkIjcuurGaI7tz0+xSfxGXU6hOCp/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 11/24/21 4:00 AM, Corvin Köhne wrote: > Hi John, > >> Would you be able to test if that change works in your environment? I was >> never able to confirm that it fixed the bug I was trying to address, but I >> do think it is more correct. The busmastering thing is to work around Linux >> clearing that flag on shutdown of a guest, and I wanted to preserve other >> bits in the command register that weren't related to BARs, etc. > > The change works in my environment. As you have mentioned, my Linux guest > clears the busmastering bit on shutdown. However, in my opinion we should > initialize the command register bits in the same way as a real system does. > > I took a short look into a public available PCI specification > (https://www.ics.uci.edu/~harris/ics216/pci/PCI_22.pdf). > For busmastering (and also for IO/Mem decoding) it states that it's default value > is 0. Therefore, I'd prefer to unconditionally clear those bits on startup. While it's true that real systems do that on reset, most firmware set those bits while populating BARs. Bhyve doesn't always run boot firmware to do those tasks and needs to provide working devices out of the box. This is similar to how bhyve pre-populates BARs with resources rather than relying on firmware to assign resources to BARs. -- John Baldwin From nobody Wed Nov 24 16:11:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3502218900EA; Wed, 24 Nov 2021 16:11: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 4HzmGJ6nNRz3lQV; Wed, 24 Nov 2021 16:11:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8D844AF4; Wed, 24 Nov 2021 16:11: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 1AOGBKhY001769; Wed, 24 Nov 2021 16:11:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGBKhv001768; Wed, 24 Nov 2021 16:11:20 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:11:20 GMT Message-Id: <202111241611.1AOGBKhv001768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: cd66a1b1c8c5 - stable/13 - top.1: Sort options alphabetically List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cd66a1b1c8c5afb995e13534e4c818a5df78013e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637770281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vca5WgUMD3B9RmZ6oqY1NsrgJ66b/Ir9mOMgprYPeFQ=; b=ou0m72xxHeIUKMHqWiLi/CvUQdJ6U0WnDKMDMHU4sbfU+goqlFkpEGL+GGfTIzO/IgGHQ2 LLCLgYf2jZ6ljdbB2di5x4G/Lnm6O17Z5lSrpsRv+TMYjXE5dJN8uIJahYZqc+HniCrx62 MHM7/xxJqP06e/HIg8W1Y7C81Jg6WsG1UwshiDJFqqCmadtlKrdnmrHjfJCSWqh9qhS5f2 ilXh/Z3QIuzU2BrBkaqbs7gSnFBzVYGgbEtflws3KUiWjr84fHjsl5JRf0Y3Y9bodxm6BO 4Ymvnil0ihlzBhg7+xB9YWWxL7L1vzApv6/c5tqGT49NobXl710B/HrVznUnFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637770281; a=rsa-sha256; cv=none; b=uaERJpfciqH3vDwVFcKxQJxAPtMEBfaP1abC+7EnziMkoAen1GPMHsRtbq4LPMDGDfaC4T PMryA3tWzSYcQhzsbB9zXuRdMt+/tG/tUwjirlssYzrkxD3Zz9UclbFFITI5l6XlWZhrva p8TYIlFvqgoU7L4qzDi/zH2diYlQL20gC/HYu9pvY4y+NjWr71RVf4hxKkpojvppDcVMB6 F8yF0pXfQfMltdMG2hQJlY5kILG+RTuPSdX8xZDyxE+jANwvkqZkKy6iY+kky29QnLTq7X ciNLa8Yh27v3HbRlmN+8r4sIkyziPxnkOZ4pGuSKv78b4pe644cTNlsNLPc2CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=cd66a1b1c8c5afb995e13534e4c818a5df78013e commit cd66a1b1c8c5afb995e13534e4c818a5df78013e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 13:11:23 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 16:07:02 +0000 top.1: Sort options alphabetically While here, add a short sentence introducing the options. MFC after: 3 days (cherry picked from commit 112539041590259a9d1e34999a80dc607c69f4db) --- usr.bin/top/top.1 | 155 +++++++++++++++++++++++++++--------------------------- 1 file changed, 77 insertions(+), 78 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 42282bebdafe..f435cfe5e206 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -7,14 +7,14 @@ .Nd display and update information about the top cpu processes .Sh SYNOPSIS .Nm -.Op Fl CHIPSTabijnpqtuvxz -.Op Fl J Ar jail -.Op Fl U Ar uid +.Op Fl abCHIijnPpqSTtuvxz .Op Fl d Ar count +.Op Fl J Ar jail .Op Fl m Ar cpu|io -.Op Fl s Ar time .Op Fl o Ar field .Op Fl p Ar pid +.Op Fl s Ar time +.Op Fl U Ar uid .Op Ar number .Sh DESCRIPTION .Nm @@ -43,22 +43,9 @@ If the output of .Nm is redirected to a file, it acts as if it were being run on a dumb terminal. -.Bl -tag -width indent -compact -.It Fl C -Toggle CPU display mode. -By default top displays the weighted CPU percentage in the WCPU column -(this is the same value that -.Xr ps 1 -displays as CPU). -Each time -.Fl C -flag is passed it toggles between \*(lqraw cpu\*(rq mode -and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or -the \*(lqWCPU\*(rq column respectively. -.It Fl S -Show system processes in the display. -Normally, system processes such as the pager and the swapper are not shown. -This option makes them visible. +.Pp +The options are as follows: +.Bl -tag -width indent .It Fl a Display command names derived from the argv[] vector, rather than real executable name. @@ -75,9 +62,34 @@ In this mode, all input from the terminal is ignored. Interrupt characters (such as ^C and ^\e) still have an effect. This is the default on a dumb terminal, or when the output is not a terminal. +.It Fl C +Toggle CPU display mode. +By default top displays the weighted CPU percentage in the WCPU column +(this is the same value that +.Xr ps 1 +displays as CPU). +Each time +.Fl C +flag is passed it toggles between \*(lqraw cpu\*(rq mode +and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or +the \*(lqWCPU\*(rq column respectively. +.It Fl d Ar count +Show only +.Ar count +displays, then exit. +A display is considered to be one update of the +screen. +The default is 1 for dumb terminals. +Note that for +.Ar count += 1 +no information is available about the percentage of time spent by the CPU in every state. .It Fl H Display each thread for a multithreaded process individually. By default a single summary line is displayed for each process. +.It Fl I +Do not display idle processes. +By default, top displays both active and idle processes. .It Fl i Use \*(lqinteractive\*(rq mode. In this mode, any input is immediately @@ -90,19 +102,23 @@ screen will immediately be updated, even if the command was not understood. This mode is the default when standard output is an intelligent terminal. -.It Fl I -Do not display idle processes. -By default, top displays both active and idle processes. +.It Fl J Ar jail +Show only those processes owned by +.Ar jail . +This may be either the +.Ar jid +or +.Ar name +of the jail. +Use +0 +to limit to host processes. +Using this option implies +.Fl j . .It Fl j Display the .Xr jail 8 ID. -.It Fl T -Toggle displaying thread ID (tid) instead of process id (pid). -.It Fl t -Do not display the -.Nm -process itself. .It Fl m Ar display Display either 'cpu' or 'io' statistics. Default is 'cpu'. @@ -110,8 +126,19 @@ Default is 'cpu'. Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq mode. +.It Fl o Ar field +Sort the process display area on the specified field. +The field name +is the name of the column as seen in the output, but in lower case: +\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, +\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, +\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, +\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. .It Fl P Display per-cpu CPU usage statistics. +.It Fl p Ar pid +Show only the process +.Ar pid . .It Fl q Renice .Nm @@ -119,6 +146,26 @@ to -20 so that it will run faster. This can be used when the system is being very sluggish to improve the possibility of discovering the problem. This option can only be used by root. +.It Fl S +Show system processes in the display. +Normally, system processes such as the pager and the swapper are not shown. +This option makes them visible. +.It Fl s Ar time +Set the delay between screen updates to +.Ar time +seconds, which may be fractional. +The default delay between updates is 1 second. +.It Fl T +Toggle displaying thread ID (tid) instead of process id (pid). +.It Fl t +Do not display the +.Nm +process itself. +.It Fl U Ar username +Show only those processes owned by +.Ar username . +This option currently only accepts usernames and will not understand +uid numbers. .It Fl u Do not map uid numbers to usernames. Normally, @@ -133,52 +180,6 @@ Write version number information to stderr then exit immediately. Display approximate swap usage for each process. .It Fl z Do not display the system idle process. -.It Fl d Ar count -Show only -.Ar count -displays, then exit. -A display is considered to be one update of the -screen. -The default is 1 for dumb terminals. -Note that for -.Ar count -= 1 -no information is available about the percentage of time spent by the CPU in every state. -.It Fl s Ar time -Set the delay between screen updates to -.Ar time -seconds, which may be fractional. -The default delay between updates is 1 second. -.It Fl o Ar field -Sort the process display area on the specified field. -The field name -is the name of the column as seen in the output, but in lower case: -\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, -\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, -\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, -\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. -.It Fl p Ar pid -Show only the process -.Ar pid . -.It Fl J Ar jail -Show only those processes owned by -.Ar jail . -This may be either the -.Ar jid -or -.Ar name -of the jail. -Use -0 -to limit to host processes. -Using this option implies -.Fl j . -.Pp -.It Fl U Ar username -Show only those processes owned by -.Ar username . -This option currently only accepts usernames and will not understand -uid numbers. .El .Pp Both @@ -238,9 +239,7 @@ Quit .Nm .It d Change the number of displays to show (prompt for new number). -Remember that the next display counts as one, so typing -.It d1 -will make +Remember that the next display counts as one, so typing 'd1' will make .Nm show one final display and then immediately exit. .It / From nobody Wed Nov 24 16:11:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A6EBD18900F8; Wed, 24 Nov 2021 16:11: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 4HzmGL2WlKz3ldv; Wed, 24 Nov 2021 16:11:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20E994C6E; Wed, 24 Nov 2021 16:11: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 1AOGBLqh001886; Wed, 24 Nov 2021 16:11:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGBL05001885; Wed, 24 Nov 2021 16:11:21 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:11:21 GMT Message-Id: <202111241611.1AOGBL05001885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: a9bfcefbdb6b - stable/12 - top.1: Sort options alphabetically List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a9bfcefbdb6bc58949292c505aad98b35d57c897 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637770282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u3q87qqiPqeG8KhiD9eGdo54DD7+LDYMjA+ql7y2KPE=; b=MTkreNrSQ674Wu/k63gkIKESvDmrBhzmvTN6/YUfETVpMeYtcTDgTYSrn23zvnYjU+cmUR 2+XD/bdaA265fmhP+4UUTep78jQ8WRvT5IbhrqIIaUUQ3/aRC8JOzbgxp5EP6176F8zU4g UsigXsYuiak6OJNyk9kM8KUBLL8YXlh/fGWyxHSQ0yuZnlNqm751pt8wxglFS0uF8KSiBo 5figeflGGmLAOb1K4RehcvxhLSDRNBzQI/Avd5GMLQg/rpMMX1yTwZV4P5ENbpnB2JX+w6 V3V0JoqADQxLg9I8o+swRRxSq9XdDVlUnEaVbPpPVqitVQLon502ZLXS8T6kMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637770282; a=rsa-sha256; cv=none; b=FwcRV8l2cMpx+pRwFCxfK5wrhnubS9yUeyAPVFKUs8TCQSVy6ZmqBwQF+xMoCShXBMiIDP 44w4FQbK+uQtrfp2EFOvuUNHeVw8gASKVgIoBN+hW/eFuuHyIMmem5BX6ZWBJe0QYYvxkj g7gUAY2uM02OTRGtbPLvQ0g0nbTs+vk5TdAo3WDWpmsk6wc1vfXMccOM35DHce4Mtngw5/ e+004XD6tQY5pPAPHdnPGt/coTiNFnqkCpXKg5cqmUhaw5LAKuNhBeKubeSZhaFl0motL3 IG+rUC3JCQIu853FLjlWXzFupMf+xNKiSkpqOh2YvJLaGSRYohrMteBBTOmphA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a9bfcefbdb6bc58949292c505aad98b35d57c897 commit a9bfcefbdb6bc58949292c505aad98b35d57c897 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 13:11:23 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 16:07:12 +0000 top.1: Sort options alphabetically While here, add a short sentence introducing the options. MFC after: 3 days (cherry picked from commit 112539041590259a9d1e34999a80dc607c69f4db) --- usr.bin/top/top.1 | 155 +++++++++++++++++++++++++++--------------------------- 1 file changed, 77 insertions(+), 78 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 104b979abd00..e70c3c022d43 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -7,14 +7,14 @@ .Nd display and update information about the top cpu processes .Sh SYNOPSIS .Nm -.Op Fl CHIPSTabijnpqtuvxz -.Op Fl J Ar jail -.Op Fl U Ar uid +.Op Fl abCHIijnPpqSTtuvxz .Op Fl d Ar count +.Op Fl J Ar jail .Op Fl m Ar cpu|io -.Op Fl s Ar time .Op Fl o Ar field .Op Fl p Ar pid +.Op Fl s Ar time +.Op Fl U Ar uid .Op Ar number .Sh DESCRIPTION .Nm @@ -43,22 +43,9 @@ If the output of .Nm is redirected to a file, it acts as if it were being run on a dumb terminal. -.Bl -tag -width indent -compact -.It Fl C -Toggle CPU display mode. -By default top displays the weighted CPU percentage in the WCPU column -(this is the same value that -.Xr ps 1 -displays as CPU). -Each time -.Fl C -flag is passed it toggles between \*(lqraw cpu\*(rq mode -and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or -the \*(lqWCPU\*(rq column respectively. -.It Fl S -Show system processes in the display. -Normally, system processes such as the pager and the swapper are not shown. -This option makes them visible. +.Pp +The options are as follows: +.Bl -tag -width indent .It Fl a Display command names derived from the argv[] vector, rather than real executable name. @@ -72,9 +59,34 @@ In this mode, all input from the terminal is ignored. Interrupt characters (such as ^C and ^\e) still have an effect. This is the default on a dumb terminal, or when the output is not a terminal. +.It Fl C +Toggle CPU display mode. +By default top displays the weighted CPU percentage in the WCPU column +(this is the same value that +.Xr ps 1 +displays as CPU). +Each time +.Fl C +flag is passed it toggles between \*(lqraw cpu\*(rq mode +and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or +the \*(lqWCPU\*(rq column respectively. +.It Fl d Ar count +Show only +.Ar count +displays, then exit. +A display is considered to be one update of the +screen. +The default is 1 for dumb terminals. +Note that for +.Ar count += 1 +no information is available about the percentage of time spent by the CPU in every state. .It Fl H Display each thread for a multithreaded process individually. By default a single summary line is displayed for each process. +.It Fl I +Do not display idle processes. +By default, top displays both active and idle processes. .It Fl i Use \*(lqinteractive\*(rq mode. In this mode, any input is immediately @@ -87,19 +99,23 @@ screen will immediately be updated, even if the command was not understood. This mode is the default when standard output is an intelligent terminal. -.It Fl I -Do not display idle processes. -By default, top displays both active and idle processes. +.It Fl J Ar jail +Show only those processes owned by +.Ar jail . +This may be either the +.Ar jid +or +.Ar name +of the jail. +Use +0 +to limit to host processes. +Using this option implies +.Fl j . .It Fl j Display the .Xr jail 8 ID. -.It Fl T -Toggle displaying thread ID (tid) instead of process id (pid). -.It Fl t -Do not display the -.Nm -process itself. .It Fl m Ar display Display either 'cpu' or 'io' statistics. Default is 'cpu'. @@ -107,8 +123,19 @@ Default is 'cpu'. Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq mode. +.It Fl o Ar field +Sort the process display area on the specified field. +The field name +is the name of the column as seen in the output, but in lower case: +\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, +\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, +\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, +\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. .It Fl P Display per-cpu CPU usage statistics. +.It Fl p Ar pid +Show only the process +.Ar pid . .It Fl q Renice .Nm @@ -116,6 +143,26 @@ to -20 so that it will run faster. This can be used when the system is being very sluggish to improve the possibility of discovering the problem. This option can only be used by root. +.It Fl S +Show system processes in the display. +Normally, system processes such as the pager and the swapper are not shown. +This option makes them visible. +.It Fl s Ar time +Set the delay between screen updates to +.Ar time +seconds, which may be fractional. +The default delay between updates is 1 second. +.It Fl T +Toggle displaying thread ID (tid) instead of process id (pid). +.It Fl t +Do not display the +.Nm +process itself. +.It Fl U Ar username +Show only those processes owned by +.Ar username . +This option currently only accepts usernames and will not understand +uid numbers. .It Fl u Do not map uid numbers to usernames. Normally, @@ -130,52 +177,6 @@ Write version number information to stderr then exit immediately. Display approximate swap usage for each process. .It Fl z Do not display the system idle process. -.It Fl d Ar count -Show only -.Ar count -displays, then exit. -A display is considered to be one update of the -screen. -The default is 1 for dumb terminals. -Note that for -.Ar count -= 1 -no information is available about the percentage of time spent by the CPU in every state. -.It Fl s Ar time -Set the delay between screen updates to -.Ar time -seconds, which may be fractional. -The default delay between updates is 1 second. -.It Fl o Ar field -Sort the process display area on the specified field. -The field name -is the name of the column as seen in the output, but in lower case: -\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, -\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, -\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, -\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. -.It Fl p Ar pid -Show only the process -.Ar pid . -.It Fl J Ar jail -Show only those processes owned by -.Ar jail . -This may be either the -.Ar jid -or -.Ar name -of the jail. -Use -0 -to limit to host processes. -Using this option implies -.Fl j . -.Pp -.It Fl U Ar username -Show only those processes owned by -.Ar username . -This option currently only accepts usernames and will not understand -uid numbers. .El .Pp Both @@ -235,9 +236,7 @@ Quit .Nm .It d Change the number of displays to show (prompt for new number). -Remember that the next display counts as one, so typing -.It d1 -will make +Remember that the next display counts as one, so typing 'd1' will make .Nm show one final display and then immediately exit. .It / From nobody Wed Nov 24 16:11:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AB0A91890075; Wed, 24 Nov 2021 16:11: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 4HzmGL25JVz3lDv; Wed, 24 Nov 2021 16:11:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E9A94D64; Wed, 24 Nov 2021 16:11: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 1AOGBLnt001846; Wed, 24 Nov 2021 16:11:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGBL5g001839; Wed, 24 Nov 2021 16:11:21 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:11:21 GMT Message-Id: <202111241611.1AOGBL5g001839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 5f3b6ce64f99 - stable/13 - top.1: Fix a typo in description of H interactive command List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5f3b6ce64f99b110f2ba7595c7d680b843efc3e8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637770282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cnpMdfKmUDDLo+ZCbYaTxAXEHknC1PXL4luJYvu7mkU=; b=ACxEVt2oBUSkYF5IJx8SFhvI8naF78y0fvbYmYjrMg5lQFVErRBamBx0OxnKoNt+auagCy 3iRfTE7vmUfYHXXNjVkq31j1K4FhMb3rGffCfS8+QKvQM7PIuSO2wyoucCCYwBEzEx8TQF V11GWb26hXPZQZIxAiIexy4naU5aWYih8ldvOIYQ80jadh4V2shnE28csF/J5pNi5utKF4 YwJOb+VgZ1QefUdJV/0DtsterUDeYvI2ZBj/rn7x/4p5hi56uSB5wi4+PD1+11cyx9Lav6 ZxixxVD01bmfw+Iuj+f6Cv/VgjS3t1DEiabvtpNyVYLhaMxSEqrdjFlleeytwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637770282; a=rsa-sha256; cv=none; b=b176pc7Es3GTOAjfzQkaqt7kflffBSlml4jl80CoWIBnA9+P4/AOxzg8LHio4DwW0EaHC/ baUzqSYIjVaKzXD4AkdVHFpJSqI/OwbUsetj6o607W/v+4BuHvWXLotXZtQt7jNO/TFuYq sStQWBz3YXg4Wbk9eQ5NsswAhco+YajuymmTqxoPY+wx1jC7qp+8anuMy0LqzDf+egvx9+ hOz+cAqbsbvRxKoR+WZ/BPoFIDaL1XEDDeFS/++/xwd4MwtJ2t2nLIC2IzfXPzhQiPPbhW h0PsJv4hEP7JvErl0fUnM3J1eLZBLs054Gi6qqFJIKloh7XgF5YhBW0YjNJeVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5f3b6ce64f99b110f2ba7595c7d680b843efc3e8 commit 5f3b6ce64f99b110f2ba7595c7d680b843efc3e8 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 12:50:56 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 16:09:31 +0000 top.1: Fix a typo in description of H interactive command B is listed as an interactive command to toggle the display of threads. This is a typo introduced during the conversion of the manual page to mdoc. Fixes: 9d6cce02a78c967e69b603d503545c4b43d7765f MFC after: 3 days (cherry picked from commit b8135ed67ce86e40fa7b46653ff54c769f2e7c98) --- usr.bin/top/top.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index f435cfe5e206..5989831fe8a9 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd September 21, 2019 +.Dd November 18, 2021 .Dt TOP 1 .Os .Sh NAME @@ -286,7 +286,7 @@ If the pid specified is simply \*(lq+\*(rq, then show all processes. .It e Display a list of system errors (if any) generated by the last command. -.It B H +.It H Toggle the display of threads. .It i or I Toggle the display of idle processes. From nobody Wed Nov 24 16:11:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E4DE2189007A; Wed, 24 Nov 2021 16:11: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 4HzmGM2zFTz3lQn; Wed, 24 Nov 2021 16:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27B474C70; Wed, 24 Nov 2021 16:11: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 1AOGBNPW001932; Wed, 24 Nov 2021 16:11:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGBNrY001925; Wed, 24 Nov 2021 16:11:23 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:11:23 GMT Message-Id: <202111241611.1AOGBNrY001925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 745ffe0ee867 - stable/13 - top.1: Improve description of -m List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 745ffe0ee86751541867e90af262ac355d061827 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637770283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U1rnFK7SZKs3XuFi+uLUNLTzUwE176arptBBtZhEmp0=; b=XENs9Ik2VjHjM4BW/T2ObFkEuHPGw4XMy8JqZoPss60ns2P+rcZvMTiF+Se62/AA9gvD9L eeSKoIXazfURYz6l8N4MqAf4iDSeOxYtJtbx1YrvfGvgnk8IqN0kDZJZ7veRBg19SMyaFC 0LOPUCfjDUk2G36mUT34qevTF8HI8/kIivdJYPKvFBXi/5fgv2NxkW8kVqWUKh68QAqeql ep87QBcPja8sLxQ1rih0prxBXaMs+vw1QBn1Sipzumr8GBEqh+bC39QMtIqTVSKXhdkEYX umBeW4apGWqhfFHQkGPobX8+GTAfNy7OnV2iyKKnZe1oiHlHfXrExoQLWnZXkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637770283; a=rsa-sha256; cv=none; b=lE8rsfBwBH94iaNBAuQqXO36fNmrxcHuI2O1qFlDhcpbZOwAkU22OrvQsiDmsRfgaNk5FW hGjNSp3L5tSQgYMy/zGZbjj7Y62FR0SQHrfKzlb/SHE43Yyg23ohXS88XnUAYBd052n0UK xRqgBqSklVNmJG3VHtk1HdyaTC65G4mvetw1u/u0s0fFFWvcFBX4bpcyqUNRi3cIyFtWtj unXGgnueHPOm5JHB67aq9G98T0WA0dObZUc1ld288l1hJ10YHNR979S0hDSkW2l8DH03ge S1N92u5Ex0wuFBOpGrwQMhd2UmFa4a6A7PB4l1ouN4zeJ0otff7lBlVTf+yeqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=745ffe0ee86751541867e90af262ac355d061827 commit 745ffe0ee86751541867e90af262ac355d061827 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 14:31:48 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 16:10:04 +0000 top.1: Improve description of -m Describe -m argument as "mode" instead of "display". MFC after: 3 days (cherry picked from commit c947fc5fae31c5935a57abcaa76f40fc8950ce59) --- usr.bin/top/top.1 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 5989831fe8a9..892ee8307e27 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -10,7 +10,7 @@ .Op Fl abCHIijnPpqSTtuvxz .Op Fl d Ar count .Op Fl J Ar jail -.Op Fl m Ar cpu|io +.Op Fl m Ar mode .Op Fl o Ar field .Op Fl p Ar pid .Op Fl s Ar time @@ -119,9 +119,15 @@ Using this option implies Display the .Xr jail 8 ID. -.It Fl m Ar display -Display either 'cpu' or 'io' statistics. -Default is 'cpu'. +.It Fl m Ar mode +Display statistics in the specified +.Ar mode . +Available modes are +.Cm cpu +and +.Cm io . +Default is +.Cm cpu . .It Fl n Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq From nobody Wed Nov 24 16:11:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1C9EB18B7F55; Wed, 24 Nov 2021 16:11: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 4HzmGM43Djz3lBg; Wed, 24 Nov 2021 16:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3045A4D67; Wed, 24 Nov 2021 16:11: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 1AOGBNSw001933; Wed, 24 Nov 2021 16:11:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGBN2Y001931; Wed, 24 Nov 2021 16:11:23 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:11:23 GMT Message-Id: <202111241611.1AOGBN2Y001931@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 14454e662a6b - stable/12 - top.1: Fix a typo in description of H interactive command List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 14454e662a6b3fd6e4b4cf2261132efd6dd231d3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637770283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nq5RLqdcVvkyKbY52cSYTL304wF6B7pdpryi3lYU9zY=; b=SFGHIcSAsjrmQ41uaCxWVaZbriFy2RsVEVjgls86LR/OoDVZXBuC07hHVn9jQgNzhdZCTy SBAYZqJDB2ov+btpw9H4VQ55eMPvgth0vB9FfXSJ76MqGdDqLMAHtEXDWicJ99zMQ8XBcD MMJjYCHg98CY26U2kVPjsZS3xhmvOZC3TXcnzwPjtQdOyepNggZyvNzYJ+2dejr4jEQosc 2srW3N0gTJPmnvjumM+sSPCxk6yXSUEOp+NC60gda7o7VKDiWdF0/aaoDEG4zvad+Voplt ubBnBicCVOsriHvI1m4iTka479Zmx+tvyj+Y0Z6dYTXzZ2wo42qaW9wQ59lKdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637770283; a=rsa-sha256; cv=none; b=IJznkC5HuamHcX5zMPhkxbALcnEOM8Z2LLN6XgCv3ndwio9NSUhyRtluNaudIcMlwnpDBQ uwJtcg8JdQKiqGYiCKsBsScNi3VcNXUrHONraK2C1bUddBLH9XJLD5x+pyVWPR9+kajZse G6E18ENK+t3eiEoGbV1oCIRwWcWSJu2q6kA4ivmLVnp9+VipYGk3IlISrSoqveJ2T+0+QQ GIsxv0ff4CVHd4dtCTpAzr5aB609Wx2GtnfjWCSf8j+94Od+2sz6WOKGvd99EdAtXz1VtA Q1Q+XNJfBtomYiZoUdVi2Jl1KDvRVegCvRLuAM85rHUG47Nb3Jl0pCv1oPjGAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=14454e662a6b3fd6e4b4cf2261132efd6dd231d3 commit 14454e662a6b3fd6e4b4cf2261132efd6dd231d3 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 12:50:56 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 16:09:02 +0000 top.1: Fix a typo in description of H interactive command B is listed as an interactive command to toggle the display of threads. This is a typo introduced during the conversion of the manual page to mdoc. Fixes: 9d6cce02a78c967e69b603d503545c4b43d7765f MFC after: 3 days (cherry picked from commit b8135ed67ce86e40fa7b46653ff54c769f2e7c98) --- usr.bin/top/top.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index e70c3c022d43..1f0be330ddc8 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd October 2, 2018 +.Dd November 18, 2021 .Dt TOP 1 .Os .Sh NAME @@ -283,7 +283,7 @@ If the pid specified is simply \*(lq+\*(rq, then show all processes. .It e Display a list of system errors (if any) generated by the last command. -.It B H +.It H Toggle the display of threads. .It i or I Toggle the display of idle processes. From nobody Wed Nov 24 16:11:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4D72718B7F73; Wed, 24 Nov 2021 16:11: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 4HzmGN51C5z3lBs; Wed, 24 Nov 2021 16:11:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B7834AF6; Wed, 24 Nov 2021 16:11: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 1AOGBOEd001989; Wed, 24 Nov 2021 16:11:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGBOVB001987; Wed, 24 Nov 2021 16:11:24 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:11:24 GMT Message-Id: <202111241611.1AOGBOVB001987@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 4614bc803462 - stable/12 - top.1: Improve description of -m List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4614bc803462366cb64b4a0609989fa2e3205b28 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637770285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I0CPuO/YcMAf2b2fpWX+44MwhJbACeTWYtkTv+7IsTs=; b=rwf0OrhR9eifB33e9lbDSkh7pju1xTzR2dJGwRlHJNgMKyN5/Z3IVSk8DutbeWMKNQdM2p mBGVP+Mlhv6a16awkGcCV4M6Ic/KRdv28+4A2un039uwQgbJn8Iu/Rmb/l7L6SMR3Hj4HP xEVf8+qvG3UUseU7iPOdlf27tDCdcZO7DgVoxl2s7mNCOK28xWku5MDeUqW4FBl1ST1e+S QXMKbrTKdcuwB1dbifFvxLEt8n4pzWPgarFH+Jgh+RDZ97T88L0LSENhCMiR/l1oosn0+2 oIQD27xpmNLllSDyX/3Ywho6ca3O8YI3f6uTMxkCz/WP9plYRRVqfKrYlTs+wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637770285; a=rsa-sha256; cv=none; b=OW51HblVvckRhrW8JOfgla3EgllPHJepO90HHI3Fy0S9pXZWC4Yb8kdCY3n/o3yjKOYfgk m9JTKN7EOxBunLyRHEBu7VLJJQoYmeFROVqvl+Q7Vi0ktMB0LRYbRCJ687dp/fBZX4MgmE I55SuH8lrBD2jzpAwa4KzyORIkPm6uYTUTqocCn/O3hEH+c40EGm7V+I6xw0PiyGCVfrGF ZI44qY1AmXR5OeDvs/vU50y9MyBJzW4J2xPN0FhW3n+WhQS/sGT4i4OQ5jjxYm5ZuxY9uY F+Lsfy48vHuAzQ7bIG59pClLoIqbdRZJRx7TVrwsT+hZgbqKjTvt7x4UPk63mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=4614bc803462366cb64b4a0609989fa2e3205b28 commit 4614bc803462366cb64b4a0609989fa2e3205b28 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 14:31:48 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 16:10:10 +0000 top.1: Improve description of -m Describe -m argument as "mode" instead of "display". MFC after: 3 days (cherry picked from commit c947fc5fae31c5935a57abcaa76f40fc8950ce59) --- usr.bin/top/top.1 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 1f0be330ddc8..deda87a973f0 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -10,7 +10,7 @@ .Op Fl abCHIijnPpqSTtuvxz .Op Fl d Ar count .Op Fl J Ar jail -.Op Fl m Ar cpu|io +.Op Fl m Ar mode .Op Fl o Ar field .Op Fl p Ar pid .Op Fl s Ar time @@ -116,9 +116,15 @@ Using this option implies Display the .Xr jail 8 ID. -.It Fl m Ar display -Display either 'cpu' or 'io' statistics. -Default is 'cpu'. +.It Fl m Ar mode +Display statistics in the specified +.Ar mode . +Available modes are +.Cm cpu +and +.Cm io . +Default is +.Cm cpu . .It Fl n Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq From nobody Wed Nov 24 16:11:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3316F1890420; Wed, 24 Nov 2021 16:11: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 4HzmGN4R9pz3lBr; Wed, 24 Nov 2021 16:11:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 541775109; Wed, 24 Nov 2021 16:11: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 1AOGBO0D001988; Wed, 24 Nov 2021 16:11:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGBOPY001984; Wed, 24 Nov 2021 16:11:24 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:11:24 GMT Message-Id: <202111241611.1AOGBOPY001984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 51f4d6a6bcf9 - stable/13 - top.1: Use the Dq macros instead of \*lq and \*rq List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 51f4d6a6bcf905c20f661302461e87c798f668ab Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637770285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tlOgDTVj/kkc7beRRqodu9Sooxj7/EzA2t5augA4vZA=; b=ULqsoSGTWKSmDFUKpoqcoA1d/edrasg6Nkt2NxXX6GjTVQPwBcy/KKv0jUwgd5BBSYlIo3 AsFlIqtG3GoalaX7yWy8V345663RMZ/12zbO1CF7BeqwR0cg+W6j2RVdrjeqe9t+1QJUHH jTp3MM6NZ+91BBg+8UD4gyED+yrFi8tyzXW6E0ur4Jly3HaQizIWIOqHypEdokUdNkM879 qZWGuW4spYaVDliZRflXqjF3BrzHz867WcUrmSfS4JaAPXfYA6+L4T48WIJG0GX7J8yIRU U26wBQ4cDsSYXxEfWfdeBPbKAO+f4IlnNcsOHeP+QZIXUhkPROjSBgGwXrSvEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637770285; a=rsa-sha256; cv=none; b=TkC6rjRP7cvuiWZOG1PUA6rlajZHYrN/UB6R4sNuUa8Ya+jp1LgKmgvqOVKtLMp/mtgdxp EdUNUkr4Ye0jHb6+L+8BDUiJr1pfdLzOHp4K5kjhxROjAKeHVNlUFClK57tBg4OQ8ZoX/l RvwDoJbfuiitPrrwM3hy6D8twS544H+9mTmT6Xo07ELne1pVLx3K3j/JYnalGNfGfVPDYM PzeB8aOUbmOdtCDvdsrkof/m1jSPC2HDYmZQRgLmBmMHJ9CbjYkVzltgggGrguRsdMUAfX /+iS7g3YhQ8m29bl5+6u6BTJP1qSushh8DuzUtbq8TushRl0RlNi+T0Py0Wz4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=51f4d6a6bcf905c20f661302461e87c798f668ab commit 51f4d6a6bcf905c20f661302461e87c798f668ab Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 14:55:27 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 16:10:31 +0000 top.1: Use the Dq macros instead of \*lq and \*rq MFC after: 3 days (cherry picked from commit 01e3140571bab1a7283e33669de171865cdb8028) --- usr.bin/top/top.1 | 144 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 107 insertions(+), 37 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 892ee8307e27..3aff7012f3d8 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -35,9 +35,13 @@ processes will be displayed instead of the default. makes a distinction between terminals that support advanced capabilities and those that do not. This distinction affects the choice of defaults for certain options. -In the remainder of this document, an \*(lqintelligent\*(rq terminal is one that +In the remainder of this document, an +.Dq intelligent +terminal is one that supports cursor addressing, clear screen, and clear to end of line. -Conversely, a \*(lqdumb\*(rq terminal is one that does not support such +Conversely, a +.Dq dumb +terminal is one that does not support such features. If the output of .Nm @@ -57,7 +61,9 @@ Non-printable characters in the command line are encoded in C-style backslash sequences or a three digit octal sequences. .It Fl b -Use \*(lqbatch\*(rq mode. +Use +.Dq batch +mode. In this mode, all input from the terminal is ignored. Interrupt characters (such as ^C and ^\e) still have an effect. @@ -70,9 +76,15 @@ By default top displays the weighted CPU percentage in the WCPU column displays as CPU). Each time .Fl C -flag is passed it toggles between \*(lqraw cpu\*(rq mode -and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or -the \*(lqWCPU\*(rq column respectively. +flag is passed it toggles between +.Dq raw cpu +mode and +.Dq weighted cpu +mode, showing the +.Dq CPU +or the +.Dq WCPU +column respectively. .It Fl d Ar count Show only .Ar count @@ -91,10 +103,13 @@ By default a single summary line is displayed for each process. Do not display idle processes. By default, top displays both active and idle processes. .It Fl i -Use \*(lqinteractive\*(rq mode. +Use +.Dq interactive +mode. In this mode, any input is immediately read for processing. -See the section on \*(lqInteractive Mode\*(rq +See the section on +.Dq Interactive Mode for an explanation of which keys perform what functions. After the command is processed, the @@ -129,17 +144,32 @@ and Default is .Cm cpu . .It Fl n -Use \*(lqnon-interactive\*(rq mode. -This is identical to \*(lqbatch\*(rq +Use +.Dq non-interactive +mode. +This is identical to +.Dq batch mode. .It Fl o Ar field Sort the process display area on the specified field. The field name is the name of the column as seen in the output, but in lower case: -\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, -\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, -\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, -\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. +.Dq cpu , +.Dq size , +.Dq res , +.Dq time , +.Dq pri , +.Dq threads , +.Dq total , +.Dq read , +.Dq write , +.Dq fault , +.Dq vcsw , +.Dq ivcsw , +.Dq jid , +.Dq swap , +or +.Dq pid . .It Fl P Display per-cpu CPU usage statistics. .It Fl p Ar pid @@ -176,7 +206,9 @@ uid numbers. Do not map uid numbers to usernames. Normally, .Nm -will read as much of the file \*(lq/etc/passwd\*(rq as is necessary to map +will read as much of the file +.Pa /etc/passwd +as is necessary to map all the user id numbers it encounters into login names. This option disables all that, while possibly decreasing execution time. The uid numbers are displayed instead of the names. @@ -192,23 +224,29 @@ Both .Ar count and .Ar number -fields can be specified as \*(lqinfinite\*(rq, indicating that they can +fields can be specified as +.Dq infinite , +indicating that they can stretch as far as possible. This is accomplished by using any proper prefix of the keywords -\*(lqinfinity\*(rq, -\*(lqmaximum\*(rq, +.Dq infinity , +.Dq maximum , or -\*(lqall\*(rq. +.Dq all . Boolean flags are toggles. A second specification of any of these options will negate the first. .Sh "INTERACTIVE MODE" When .Nm -is running in \*(lqinteractive mode\*(rq, it reads commands from the +is running in +.Dq interactive mode , +it reads commands from the terminal and acts upon them accordingly. In this mode, the terminal is -put in \*(lqCBREAK\*(rq, so that a character will be +put in +.Dq CBREAK , +so that a character will be processed as soon as it is typed. Almost always, a key will be pressed when @@ -265,30 +303,45 @@ Toggle the display of system processes. .It a Toggle the display of process titles. .It k -Send a signal (\*(lqkill\*(rq by default) to a list of processes. +Send a signal +.Pq SIGKILL by default +to a list of processes. This acts similarly to the command .Xr kill 1 . .It r -Change the priority (the \*(lqnice\*(rq) of a list of processes. +Change the priority +.Pq the Dq nice +of a list of processes. This acts similarly to .Xr renice 8 . .It u Display only processes owned by a specific set of usernames (prompt for username). -If the username specified is simply \*(lq+\*(rq or \*(lq-\*(rq, +If the username specified is simply +.Dq + +or +.Dq - , then processes belonging to all users will be displayed. Usernames can be added -to and removed from the set by prepending them with \*(lq+\*(rq and -\*(lq-\*(rq, respectively. +to and removed from the set by prepending them with +.Dq + +and +.Dq - , +respectively. .It o Change the order in which the display is sorted. The sort key names include -\*(lqcpu\*(rq, \*(lqres\*(rq, \*(lqsize\*(rq, -\*(lqtime\*(rq. +.Dq cpu , +.Dq res , +.Dq size , +and +.Dq time. The default is cpu. .It p Display a specific process (prompt for pid). -If the pid specified is simply \*(lq+\*(rq, then show all processes. +If the pid specified is simply +.Dq + , +then show all processes. .It e Display a list of system errors (if any) generated by the last command. @@ -302,7 +355,9 @@ Toggle the display of ID. .It J Display only processes owned by a specific jail (prompt for jail). -If the jail specified is simply \*(lq+\*(rq, then processes belonging +If the jail specified is simply +.Dq + , +then processes belonging to all jails and the host will be displayed. This will also enable the display of JID. .It P @@ -351,10 +406,18 @@ SIZE is the total size of the process (text, data, and stack), RES is the current amount of resident memory, SWAP is the approximate amount of swap, if enabled (SIZE, RES and SWAP are given in kilobytes), -STATE is the current state (one of \*(lqSTART\*(rq, \*(lqRUN\*(rq -(shown as \*(lqCPUn\*(rq on SMP systems), \*(lqSLEEP\*(rq, \*(lqSTOP\*(rq, -\*(lqZOMB\*(rq, \*(lqWAIT\*(rq, \*(lqLOCK\*(rq or the event on which the -process waits), +STATE is the current state (one of +.Dq START , +.Dq RUN +(shown as +.Dq CPUn +on SMP systems), +.Dq SLEEP , +.Dq STOP , +.Dq ZOMB , +.Dq WAIT , +.Dq LOCK , +or the event on which the process waits), C is the processor number on which the process is executing (visible only on SMP systems), TIME is the number of system and user cpu seconds that the process has used, @@ -365,12 +428,19 @@ displays as CPU), CPU is the raw percentage and is the field that is sorted to determine the order of the processes, and COMMAND is the name of the command that the process is currently running -(if the process is swapped out, this column is marked \*(lq\*(rq). +(if the process is swapped out, this column is marked +.Dq ) . .Pp -If a process is in the \*(lqSLEEP\*(rq or \*(lqLOCK\*(rq state, +If a process is in the +.Dq SLEEP +or +.Dq LOCK +state, the state column will report the name of the event or lock on which the process is waiting. -Lock names are prefixed with an asterisk \*(lq*\*(rq while sleep events +Lock names are prefixed with an asterisk +.Dq * +while sleep events are not. .Sh DESCRIPTION OF MEMORY .Bd -literal From nobody Wed Nov 24 16:11:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AE0BE1890519; Wed, 24 Nov 2021 16:11: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 4HzmGP6TSkz3lTj; Wed, 24 Nov 2021 16:11:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60C3A4AF8; Wed, 24 Nov 2021 16:11: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 1AOGBPDI002034; Wed, 24 Nov 2021 16:11:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGBPoV002030; Wed, 24 Nov 2021 16:11:25 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:11:25 GMT Message-Id: <202111241611.1AOGBPoV002030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: cf1f1f91e914 - stable/12 - top.1: Use the Dq macros instead of \*lq and \*rq List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: cf1f1f91e91425c8796b1af4263e98d280ee7e0a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637770286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i1p0ofc/akoScUgRjEKJoBqCueK0gOBegUlSxBieX48=; b=ZlkQ5Eydru/QqTIN+asIS9YFNon9xqW8cWJbtFz0b1SzHFp45fZGMpap9EDvI/iacayMHW Qhyo4U/AUOl3O1z5QuJ07VENgAup9Tvidp3u0AIunw1CFFVqsDzY1HTP+gggQOL44MKacB EHY8+3AXaEXtYyXhwOEKTsoYZ1Z20XlO5TzQ9wo68UJxNNqiLM9orPuDPFavGlAcVVGAsg SNC9RLe2LOuJDw7Y/gQp/5AlSQIQFENnR7P22TqSIGTxaAVWxypmvwXvaUzDqPjQZowz+E GuihpZiAnnxroXlTNzfY1RYI8z4W5oSlgTb6lF5GCWXdoo4XbMUOg9rgLttxqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637770286; a=rsa-sha256; cv=none; b=fyaiib6zPcd02GlmNOqEfm9IZ44SkMSA9KoUFfEZFfyRwkEDstvaUfLCkqiuwkOSeQKH0j Q0H4nu1xfZWp8LCPF2F6xld8mXH1yWc2n0iLWV4KOW/Er5pJxQy/AHTks/ZkdT3cibd2Dq HPVWCfRh3JTxXy27tf5EMefs07o7pP7r3oAxx3xHlQ+EZEXLPeqzQ4zTfQxzmsSXN+nq/2 tZgTNBiWe14xZ0qs4jyLOMprsVgMRuO27ccPq5laFq8wwE+0LqZmVtSQ86LaejeZO/EFhJ Jog1yZ2vHzKjgFY5C2R9+CNZusyeRZkJhYcryk4A/7OJUykYiWI8WxLMO4LmjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=cf1f1f91e91425c8796b1af4263e98d280ee7e0a commit cf1f1f91e91425c8796b1af4263e98d280ee7e0a Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 14:55:27 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 16:10:24 +0000 top.1: Use the Dq macros instead of \*lq and \*rq MFC after: 3 days (cherry picked from commit 01e3140571bab1a7283e33669de171865cdb8028) --- usr.bin/top/top.1 | 144 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 107 insertions(+), 37 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index deda87a973f0..4a587877dba6 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -35,9 +35,13 @@ processes will be displayed instead of the default. makes a distinction between terminals that support advanced capabilities and those that do not. This distinction affects the choice of defaults for certain options. -In the remainder of this document, an \*(lqintelligent\*(rq terminal is one that +In the remainder of this document, an +.Dq intelligent +terminal is one that supports cursor addressing, clear screen, and clear to end of line. -Conversely, a \*(lqdumb\*(rq terminal is one that does not support such +Conversely, a +.Dq dumb +terminal is one that does not support such features. If the output of .Nm @@ -54,7 +58,9 @@ puts their status information there. If the real name differs from argv[0], it will be displayed in parenthesis. .It Fl b -Use \*(lqbatch\*(rq mode. +Use +.Dq batch +mode. In this mode, all input from the terminal is ignored. Interrupt characters (such as ^C and ^\e) still have an effect. @@ -67,9 +73,15 @@ By default top displays the weighted CPU percentage in the WCPU column displays as CPU). Each time .Fl C -flag is passed it toggles between \*(lqraw cpu\*(rq mode -and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or -the \*(lqWCPU\*(rq column respectively. +flag is passed it toggles between +.Dq raw cpu +mode and +.Dq weighted cpu +mode, showing the +.Dq CPU +or the +.Dq WCPU +column respectively. .It Fl d Ar count Show only .Ar count @@ -88,10 +100,13 @@ By default a single summary line is displayed for each process. Do not display idle processes. By default, top displays both active and idle processes. .It Fl i -Use \*(lqinteractive\*(rq mode. +Use +.Dq interactive +mode. In this mode, any input is immediately read for processing. -See the section on \*(lqInteractive Mode\*(rq +See the section on +.Dq Interactive Mode for an explanation of which keys perform what functions. After the command is processed, the @@ -126,17 +141,32 @@ and Default is .Cm cpu . .It Fl n -Use \*(lqnon-interactive\*(rq mode. -This is identical to \*(lqbatch\*(rq +Use +.Dq non-interactive +mode. +This is identical to +.Dq batch mode. .It Fl o Ar field Sort the process display area on the specified field. The field name is the name of the column as seen in the output, but in lower case: -\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, -\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, -\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, -\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. +.Dq cpu , +.Dq size , +.Dq res , +.Dq time , +.Dq pri , +.Dq threads , +.Dq total , +.Dq read , +.Dq write , +.Dq fault , +.Dq vcsw , +.Dq ivcsw , +.Dq jid , +.Dq swap , +or +.Dq pid . .It Fl P Display per-cpu CPU usage statistics. .It Fl p Ar pid @@ -173,7 +203,9 @@ uid numbers. Do not map uid numbers to usernames. Normally, .Nm -will read as much of the file \*(lq/etc/passwd\*(rq as is necessary to map +will read as much of the file +.Pa /etc/passwd +as is necessary to map all the user id numbers it encounters into login names. This option disables all that, while possibly decreasing execution time. The uid numbers are displayed instead of the names. @@ -189,23 +221,29 @@ Both .Ar count and .Ar number -fields can be specified as \*(lqinfinite\*(rq, indicating that they can +fields can be specified as +.Dq infinite , +indicating that they can stretch as far as possible. This is accomplished by using any proper prefix of the keywords -\*(lqinfinity\*(rq, -\*(lqmaximum\*(rq, +.Dq infinity , +.Dq maximum , or -\*(lqall\*(rq. +.Dq all . Boolean flags are toggles. A second specification of any of these options will negate the first. .Sh "INTERACTIVE MODE" When .Nm -is running in \*(lqinteractive mode\*(rq, it reads commands from the +is running in +.Dq interactive mode , +it reads commands from the terminal and acts upon them accordingly. In this mode, the terminal is -put in \*(lqCBREAK\*(rq, so that a character will be +put in +.Dq CBREAK , +so that a character will be processed as soon as it is typed. Almost always, a key will be pressed when @@ -262,30 +300,45 @@ Toggle the display of system processes. .It a Toggle the display of process titles. .It k -Send a signal (\*(lqkill\*(rq by default) to a list of processes. +Send a signal +.Pq SIGKILL by default +to a list of processes. This acts similarly to the command .Xr kill 1 . .It r -Change the priority (the \*(lqnice\*(rq) of a list of processes. +Change the priority +.Pq the Dq nice +of a list of processes. This acts similarly to .Xr renice 8 . .It u Display only processes owned by a specific set of usernames (prompt for username). -If the username specified is simply \*(lq+\*(rq or \*(lq-\*(rq, +If the username specified is simply +.Dq + +or +.Dq - , then processes belonging to all users will be displayed. Usernames can be added -to and removed from the set by prepending them with \*(lq+\*(rq and -\*(lq-\*(rq, respectively. +to and removed from the set by prepending them with +.Dq + +and +.Dq - , +respectively. .It o Change the order in which the display is sorted. The sort key names include -\*(lqcpu\*(rq, \*(lqres\*(rq, \*(lqsize\*(rq, -\*(lqtime\*(rq. +.Dq cpu , +.Dq res , +.Dq size , +and +.Dq time. The default is cpu. .It p Display a specific process (prompt for pid). -If the pid specified is simply \*(lq+\*(rq, then show all processes. +If the pid specified is simply +.Dq + , +then show all processes. .It e Display a list of system errors (if any) generated by the last command. @@ -299,7 +352,9 @@ Toggle the display of ID. .It J Display only processes owned by a specific jail (prompt for jail). -If the jail specified is simply \*(lq+\*(rq, then processes belonging +If the jail specified is simply +.Dq + , +then processes belonging to all jails and the host will be displayed. This will also enable the display of JID. .It P @@ -348,10 +403,18 @@ SIZE is the total size of the process (text, data, and stack), RES is the current amount of resident memory, SWAP is the approximate amount of swap, if enabled (SIZE, RES and SWAP are given in kilobytes), -STATE is the current state (one of \*(lqSTART\*(rq, \*(lqRUN\*(rq -(shown as \*(lqCPUn\*(rq on SMP systems), \*(lqSLEEP\*(rq, \*(lqSTOP\*(rq, -\*(lqZOMB\*(rq, \*(lqWAIT\*(rq, \*(lqLOCK\*(rq or the event on which the -process waits), +STATE is the current state (one of +.Dq START , +.Dq RUN +(shown as +.Dq CPUn +on SMP systems), +.Dq SLEEP , +.Dq STOP , +.Dq ZOMB , +.Dq WAIT , +.Dq LOCK , +or the event on which the process waits), C is the processor number on which the process is executing (visible only on SMP systems), TIME is the number of system and user cpu seconds that the process has used, @@ -362,12 +425,19 @@ displays as CPU), CPU is the raw percentage and is the field that is sorted to determine the order of the processes, and COMMAND is the name of the command that the process is currently running -(if the process is swapped out, this column is marked \*(lq\*(rq). +(if the process is swapped out, this column is marked +.Dq ) . .Pp -If a process is in the \*(lqSLEEP\*(rq or \*(lqLOCK\*(rq state, +If a process is in the +.Dq SLEEP +or +.Dq LOCK +state, the state column will report the name of the event or lock on which the process is waiting. -Lock names are prefixed with an asterisk \*(lq*\*(rq while sleep events +Lock names are prefixed with an asterisk +.Dq * +while sleep events are not. .Sh DESCRIPTION OF MEMORY .Bd -literal From nobody Wed Nov 24 16:15:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3558918950F7; Wed, 24 Nov 2021 16:15:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzmM36Ph7z3q5Q; Wed, 24 Nov 2021 16:15:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 0DE2E21C; Wed, 24 Nov 2021 16:15:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Wed, 24 Nov 2021 08:15:26 -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.14; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: git: 3a60869237b8 - main - Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le Content-Language: en-US To: Piotr Kubaj , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202111232227.1ANMRCYk070382@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202111232227.1ANMRCYk070382@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637770527; h=from:from:reply-to:subject: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=3Z/fukWPOACb0BEQYHCIKuJBD68sIwop/j3u6hQu0g4=; b=tQUUUcvXTt5rD7ws5zjAQT91IDmlh3OrTJlpRjOgstVKYj9x7lRGdYWCx/nUorJH1Kw/gw aessZUch5Kcn+Wt2APuJ1Q/0nOQvJa6MEsrY+0hBsIba7suDG9n8HULEftl/akt2La0GEs TN4mdstTA5pupS0BopDcb9ArgO1UOEiSuAgX6Wa9fk++zaWXzbZEqMo17IPthYuGqHpYPI fnfygiubQJrvFjW7HoROCaqvKO6CtI+iN3K7Vg/Afzlkt7wTpVBd3+6J/eeLWKAe9po8ZN 7n0qVJzr71AqX63ACv9JXwJzUMGubVIBhtnK0VMtx2zxVusfIFSBloYPLhHKDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637770527; a=rsa-sha256; cv=none; b=DwUcBjDyGMQixf0qSEfPOWKPgsGlISlC4t6AeSGkeSYQKyXeW+qV3dHVxD9qAbn0AwvJdd 460l6XBDdgsjnAIETnbWuDJjMi/jTewnpc+npooUOJDOWHL7MeQc4lLnCRNLIp3tDH5q2f V7M7MQePln9V/Op5X6N8EdlN9oHMZNlr4032I/zNlTytlsfHhO5osaCKb9R3l+hHE35nqU SByqap81iL5JqCeGFA2QqQMwr287S2Y+QZSopaM9/1WpRw5/Phd9xFWiunWjCIYKJhfk3S xJ9D9VdAJJKbOWZriWxjdRpqQTD5Vw56z7noABxp+QsRfbBK6BQtpr2N1lu5sA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 11/23/21 2:27 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: https://cgit.FreeBSD.org/src/commit/?id=3a60869237b8b315fe66497cf5299ec08b688533 > > commit 3a60869237b8b315fe66497cf5299ec08b688533 > Author: Piotr Kubaj > AuthorDate: 2021-11-22 02:28:46 +0000 > Commit: Piotr Kubaj > CommitDate: 2021-11-23 22:26:53 +0000 > > Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le > > Summary: > 1. https://github.com/openssl/openssl/commit/34ab13b7d8e3e723adb60be8142e38b7c9cd382a > needs to be merged for ELFv2 support on big-endian. > 2. crypto/openssl/crypto/ppccap.c needs to be patched. > Same reason as in https://github.com/openssl/openssl/pull/17082. Have you looked at adding powerpc support to ossl(4)? It should be fairly simple (just adding the right asm files in Makefiles and the powerpc equivalent of OSSL_cpuid). -- John Baldwin From nobody Wed Nov 24 16:23:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B31871899BC6; Wed, 24 Nov 2021 16:23:56 +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 4HzmXr41ZNz3sqT; Wed, 24 Nov 2021 16:23:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id D70B23D9; Wed, 24 Nov 2021 16:23:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <30da11f2-d34b-d12e-836a-bf53949ed499@FreeBSD.org> Date: Wed, 24 Nov 2021 08:23:55 -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.14; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables Content-Language: en-US To: Slawa Olhovchenkov , Marcin Wojtas Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> <20211124144112.GF77338@zxy.spb.ru> From: John Baldwin In-Reply-To: <20211124144112.GF77338@zxy.spb.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637771036; 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=GX3dcqEUxnAMiNo0+MLVDe3mV6/CUUUkE2sY/aJiZ1M=; b=PpZj2+6vljFtKGF7kTZonKgJGWBwcyjuNFI29+vGpetQCTzHo2ggW2GFPUX3ZUejHbiXv4 l5LwDPPryxK4Hs22rHeofFYPwikzSHHnxEYt9JyLfuQbZbugO06P+c8IGUXdB7sUF/vfPe hn80QuRUG2XwuIg/HTDqww6Tzvxgo0HU83Qzxhbf+U8byvrNkUH1Vf3hTnUoTuaqZs+6qE OTH9rhInrtrMV2T9llQKby22M+ARow2O2c8D0c3mY8SjxXRrta658SOdTO71NHzMV8222j qqDibMjnPwLTgHwmEwxb5bDj805ZoN9PP7VdvmzmUDS+8CBTK0JYVSNrfS1dRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637771036; a=rsa-sha256; cv=none; b=r2syi1Yo1flk1mhklb5A8kzP7UOt5tz/auq886xQaMCydeo6t183+GVtZQApYMbFUXr3Eq ZVozK9kV8OoOP9+SeGCJjMAABm64e3w061NsG/kUnmx1e7UltecNg/7kDGRUbASJfM2/WM ofBkPJOoMjVQWBF9kToEXmh8kGYrZhWlMNdEZ9pEAeDmV490KFMQzRyW8LY8awQUBLiPIQ lHtShpRxojKTdDiy75lBZ8wFBrKmBb82Xxdmh5Zmh64vi7oova6qqOGgxPJzsQlGD6zTCn ZLYB9xINNjHL7Yv+3rZYq4L2nKoOHTmjjioqtzQWRoJohvsCkSh8l9GVZ6ZLnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 11/24/21 6:41 AM, Slawa Olhovchenkov wrote: > On Tue, Nov 16, 2021 at 10:26:42PM +0000, Marcin Wojtas wrote: > >> >> Enable ASLR by default for 64-bit executables >> > > Now any core dumps will be useless? I believe core dumps should be fine. We include the ELF auxv values in core dumps as a NT_PROCSTAT_AUXV note that GDB (and I presume LLDB) both look at to determine the location of the main executable (AT_BASE). Once the dynamic section of the main executable is found, DT_DEBUG is used to find the linked list of shared libraries (including rtld itself) just as with PDEs. -- John Baldwin From nobody Wed Nov 24 16:25:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1D774189A0DE; Wed, 24 Nov 2021 16:25: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 4Hzmb763mMz3tLv; Wed, 24 Nov 2021 16:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD8E2541C; Wed, 24 Nov 2021 16:25: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 1AOGPt2S019634; Wed, 24 Nov 2021 16:25:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGPtoU019633; Wed, 24 Nov 2021 16:25:55 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:25:55 GMT Message-Id: <202111241625.1AOGPtoU019633@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: 1caaf5558544 - main - 32-bit compat: plug a set-but-not-unused var in freebsd32_copy_msg_out List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1caaf5558544ad672dc7b0e70a2492cdcc5e362e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637771155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fgs/JfBhFyy1TJbmT+1zyO7dUPEbr0VmS5Liow+G/9A=; b=Lvj2qmgSM91RFPhy9OIow8FW/ogf9BgNcQMXN0N5HK1UTrYRNlH0nCA72HOWSlbCpHuptp +5qlQvA8kqbH+MXm+5xRzFZR486ZF1ZMniUN6z+qktWFbAedfxuUv8ZoUGJtnI/X9Y+8p3 15JGKfGKFuttigReho8uO0r+gtsW6+xKkmGeJjp9z9qMfr9gX5et9R1C1KGEJNv61PRztJ o+LOXOnqPCLXy7i6aaspDCIfT2G3N3gqLY6+5+JbghZ1EP3y9k7W5Z7rU1kimMYYEUl6ZI Je+F0cnzGWOu8wy/vIuJ6RS6aT9DVCVLFHNMh03my2V8sd8P8mm4FaRmVOKiBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637771155; a=rsa-sha256; cv=none; b=uWnBA1hZgffruui9M5XiYngtPnsV3NwysDf+Q+01ciXSPfXexo2w6ut5Y6NVDrqKBKYtmp kptFSM+GeEhIBnuUBnUFyeUZw8atuULDnU9Q9ymwzQwTID4tDfjBD/XuWuFH8ediToy3uE bR1ZkT0eZ3gsW71iycLdwgUsQ7ggWSgmp42uMpa7Zq+Qzf/7KHvZDpI0nUfgv1zU2nU9na 7rIE6oQFXyUcTxaHn4zrgXlZb3LBAizxGo1rnz5kYOHxEds6y/KnS0PvwGE+04uh6SGer9 /S3+yCjCmCBXut3tCKEBX60JHpA4F98xHtCNKWq4FuJEx1PjiAmdPp116mPz3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1caaf5558544ad672dc7b0e70a2492cdcc5e362e commit 1caaf5558544ad672dc7b0e70a2492cdcc5e362e Author: Mateusz Guzik AuthorDate: 2021-11-24 16:15:10 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 16:25:50 +0000 32-bit compat: plug a set-but-not-unused var in freebsd32_copy_msg_out Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/compat/freebsd32/freebsd32_misc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index e81148d3577c..a51daec85fcd 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1357,12 +1357,11 @@ freebsd32_copy_msg_out(struct msghdr *msg, struct mbuf *control) socklen_t clen, datalen, datalen_out, oldclen; int error; caddr_t ctlbuf; - int len, maxlen, copylen; + int len, copylen; struct mbuf *m; error = 0; len = msg->msg_controllen; - maxlen = msg->msg_controllen; msg->msg_controllen = 0; ctlbuf = msg->msg_control; From nobody Wed Nov 24 16:25:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4C827189A230; Wed, 24 Nov 2021 16:25: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 4Hzmb86Qhfz3tTm; Wed, 24 Nov 2021 16:25:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCBCD5160; Wed, 24 Nov 2021 16:25: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 1AOGPu7e019658; Wed, 24 Nov 2021 16:25:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGPuHD019657; Wed, 24 Nov 2021 16:25:56 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:25:56 GMT Message-Id: <202111241625.1AOGPuHD019657@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: 3279341dc541 - main - aesni: plug a set-but-not-unused var in aesni_newsession List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3279341dc541cfc730c80b8dd29ae9a6cd106325 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637771156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dO2pEWV4DtorXEpibGUOclVqefdm+LA14FRZaP1juUw=; b=RSZiHgF4xxOxXYoRPp3CK4WprgZDf6Dx/ScyzcajD7ZjvhNHNVD1VvQfDWkfIVPEcDk/sW v9ROyklM5Nn+Is9in5MYZVILwXfJl+vH5W0lQPG5KwUx2W07ow4/IraFnt2sO1cRfIMnx4 eYnjsnNK83D//7i8fjipqJ4CI9BfMNaNTGAWNeJ67IGfXwlJrhFVxsuJMDJTQTYNc9vQpg Qg79XD4EVxRpXryr8bxgItq/OYTokICy6aWC6KIo12wQezFvPPp8pSUaeD841FGYpou34N bmZ/J1qwxIWoQN0FM3ir4gPZTDwdjJr7SZGlAUWLRNv33x4tricgm2Urwt5VyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637771156; a=rsa-sha256; cv=none; b=DtJZKzDWGIgOcMC8RDUInHOC3/Ce3sXEcLbB5f2pkmlaQXrk+k+7dUFlw+gSvBqD1YTjYJ 7DUSWiy3WnnCvYldNdSdlmISZAn678B9WrfocroiIjnSRGRqF9Baw8H6hxLM9GnK7FVaXY 3syO1pBwghdsOBmJmrVDRo2VaJxFXLSwS1E78C7xOWRYsR03g7t34G1n2Ze31MjYwuXkyn W3h7+Ute9enw1xy0OKUsHn6CDwKQd5rwcprd9Wy/fLlMFW/5m8J58wUXO7iUCuF2x6259S 1D7YRc3xdIKp64Th8ue57KbYQdWtZGBpH0/y4nw9hVoSLOxxBnf8JEUDX5uHVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3279341dc541cfc730c80b8dd29ae9a6cd106325 commit 3279341dc541cfc730c80b8dd29ae9a6cd106325 Author: Mateusz Guzik AuthorDate: 2021-11-24 16:17:09 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 16:25:50 +0000 aesni: plug a set-but-not-unused var in aesni_newsession Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/crypto/aesni/aesni.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/crypto/aesni/aesni.c b/sys/crypto/aesni/aesni.c index de797abd1af5..cd31287b08f0 100644 --- a/sys/crypto/aesni/aesni.c +++ b/sys/crypto/aesni/aesni.c @@ -342,12 +342,9 @@ static int aesni_newsession(device_t dev, crypto_session_t cses, const struct crypto_session_params *csp) { - struct aesni_softc *sc; struct aesni_session *ses; int error; - sc = device_get_softc(dev); - ses = crypto_get_driver_session(cses); switch (csp->csp_mode) { From nobody Wed Nov 24 16:25:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 60B4C189A238; Wed, 24 Nov 2021 16:25: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 4HzmbB1ym8z3tGC; Wed, 24 Nov 2021 16:25:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB8985161; Wed, 24 Nov 2021 16:25: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 1AOGPv5J019682; Wed, 24 Nov 2021 16:25:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGPvi2019681; Wed, 24 Nov 2021 16:25:57 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:25:57 GMT Message-Id: <202111241625.1AOGPvi2019681@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: cfe94aa8c117 - main - agp: plug a set-but-not-unused var in agp_intel_gtt_map_memory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: cfe94aa8c117f3b8fa6cc69ed5a5093ea3cb959f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637771158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A/vnReHw2DJO9KBf6SmITGNwcWD8JcVzM0gpm5C4NtA=; b=JkQg7t2N+ZpjhAVWWS3UTQVTg+eSSa60Vd6UJ9WA4QmEpQN5/FBNQTmc3g2keljF7CPgkJ 3gOrBbNCOKIpyvhZ7rBveMwDS6nfwrApURD2W6cz4iERpcNtvngzxfD4YbQeUy8mpXJA5h 02RyW/hybhbWbIZyEdPBSSfI91eSuQMXeBSRPqZaCVX/k5vWvuyHJKVQFgsDdQpfVVHnlh 09I/kltMLRguQeoe2bCQ/cQ1Gu39U/nTLtN8AqKxdlbjxT4A5NXxJ5Bd2undRS1k9zEmm8 3/CElNYs0LdGH6kBrdtbpbaW6A7U9kfYKKIfSYrWdkmRjgYC7bBnADDAhh28Kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637771158; a=rsa-sha256; cv=none; b=P7XLJsURU3yZP8iEHnQgmeHoDAbxRDDTFOLuYsi8hbz6gwDK7FEalcrYbitEVlwcETxrP5 0KhYMaOjuOTkqKEzmP9FrCouK6EHHmiDqZF0fjUBrRLOQ99jQ/rNHF8ikV7Mu/jn5Znbon tRGR/2rJX8xyIYwta6GqgQI5VVfFveopSlTC1BfdnYSP+SwhcaUTr+HtFWTx0sIm9qg6cP vHbxBqzaVqdvvZ2QiZekkhTXk0zZNV5pnMNRSoE2MMxjqC8MV5+mQOhUGuBG1WFLyjCwiH vt/Y1tjOyjNA5V4wRkhIfONCWYTFs63RVN+fYi59qWhFIEblj8xTiw9efSArug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cfe94aa8c117f3b8fa6cc69ed5a5093ea3cb959f commit cfe94aa8c117f3b8fa6cc69ed5a5093ea3cb959f Author: Mateusz Guzik AuthorDate: 2021-11-24 16:20:39 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 16:25:50 +0000 agp: plug a set-but-not-unused var in agp_intel_gtt_map_memory Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/agp/agp_i810.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c index 9bca2f556a60..50749863a5f5 100644 --- a/sys/dev/agp/agp_i810.c +++ b/sys/dev/agp/agp_i810.c @@ -2202,7 +2202,9 @@ int agp_intel_gtt_map_memory(device_t dev, vm_page_t *pages, u_int num_entries, struct sglist **sg_list) { +#if 0 struct agp_i810_softc *sc; +#endif struct sglist *sg; int i; #if 0 @@ -2212,7 +2214,9 @@ agp_intel_gtt_map_memory(device_t dev, vm_page_t *pages, u_int num_entries, if (*sg_list != NULL) return (0); +#if 0 sc = device_get_softc(dev); +#endif sg = sglist_alloc(num_entries, M_WAITOK /* XXXKIB */); for (i = 0; i < num_entries; i++) { sg->sg_segs[i].ss_paddr = VM_PAGE_TO_PHYS(pages[i]); From nobody Wed Nov 24 16:25:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C50C2189A392; Wed, 24 Nov 2021 16:26: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 4HzmbC4Xtkz3tGF; Wed, 24 Nov 2021 16:25:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 240E9541D; Wed, 24 Nov 2021 16:25: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 1AOGPw8H019712; Wed, 24 Nov 2021 16:25:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGPwuA019711; Wed, 24 Nov 2021 16:25:58 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:25:58 GMT Message-Id: <202111241625.1AOGPwuA019711@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: ab9d2f02a098 - main - amd_ecc_inject: return an error instead of ignoring it in tsc_modevent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ab9d2f02a098aad38bb2e04edb22a33294c18ac0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637771160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7bVQ0jxLITtDsvLoE6YTr7XEPXvvzyqLah0/FG+9YB4=; b=vkQFJ2UTLg+ZY+am7mUjSwV8g4qvyv/3DMlOH815aGqdp5548fvJh7l2IC3sNWL8oFb+18 PIGYuww+QElB8aTq1imBvO0VwlAGu5/4ES5TdqtGJkOMsHbZxX5VDncaDH0kl0ztQ0hSvy BD8BjiJkmFfpo1E2w2KTSUZt/rBX28+NN0VUyUi7OWb6lPKCfE2pPEQQRij9KuJs92Nn35 D7IzrNsvR8nZv2FCq3GkYAbWzkO0vZdLPJYGxwD8k6dhqiC+oklpM94rn6T62oeE1Ixq+P GpwDepGWe/8Agg2++Ao/U9uNayUHmNVgiT1oD8NPHykVmgxhF4kiI+fsRPHwog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637771160; a=rsa-sha256; cv=none; b=q1AIZilqGUWwvd6wMweX6P7OFkfixg7pZQD0KfiOjNf14iwrlr636uklNblHSxKeRENk2t HZDloej9wmgeAmhdmyIMzLzVGJussC6xM7KVCKOFgFwb4HDhQJtx5TW3MWF1WTn49Bd7oF kEMvSQ45SOy6RrVQhdCdbKKVbj/0eBHlZV0Cgkoi6XV9qAYC/kFvbO+LtMsP4tT0FA3ORI wFIiS7xMET3+jMPgJnyNgMX/7uWVWmV6+vIqu/d+q3DTyq0z7yNKK8nmjVIZWmEUksfILf FuCJi9i01wGwlhUy7BFH0VuL92qrZUjgDP6zgDfbqXX83FpYfLzBr3dnaKnhWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ab9d2f02a098aad38bb2e04edb22a33294c18ac0 commit ab9d2f02a098aad38bb2e04edb22a33294c18ac0 Author: Mateusz Guzik AuthorDate: 2021-11-24 16:22:56 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 16:25:50 +0000 amd_ecc_inject: return an error instead of ignoring it in tsc_modevent Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/amd_ecc_inject/ecc_inject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/amd_ecc_inject/ecc_inject.c b/sys/dev/amd_ecc_inject/ecc_inject.c index c0f3c142a3c8..657e10407dbc 100644 --- a/sys/dev/amd_ecc_inject/ecc_inject.c +++ b/sys/dev/amd_ecc_inject/ecc_inject.c @@ -237,9 +237,9 @@ tsc_modevent(module_t mod __unused, int type, void *data __unused) case MOD_SHUTDOWN: break; default: - return (EOPNOTSUPP); + error = EOPNOTSUPP; } - return (0); + return (error); } DEV_MODULE(tsc, tsc_modevent, NULL); From nobody Wed Nov 24 16:28:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6D1AF189BF6C; Wed, 24 Nov 2021 16:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzmfN0Jmmz3wMg; Wed, 24 Nov 2021 16:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8048522C; Wed, 24 Nov 2021 16:28: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 1AOGShVA020010; Wed, 24 Nov 2021 16:28:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGShfV020009; Wed, 24 Nov 2021 16:28:43 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:28:43 GMT Message-Id: <202111241628.1AOGShfV020009@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: e052f7269108 - main - alc: plug a set-but-not-unused var in alc_init_locked List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e052f72691088229c34e8f908593319c413b2a10 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637771324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fF/jRZZ0bFmlh2Y1jjLJQaI7EmEgHlYmJJZy1RrcwfU=; b=DO2S2B5+buVY3xC+rJplezaVDejLRbenV4Nc7xxvBRGeRLYzheMXRi/LUO609zsedO9gU7 6atUXeGgItJ5rqD71W2TnfN0QArvWC0gsrJZbvdGwZDeo33FY8EN/b3Ke+Rc8+VLuyXdqx mHJfRi30jCkuIH9YDRL37zGJxFb9cdVQrAaNkRAOCsajmGSnvVjJaMgE0JC82QFeX9XJlQ AlXMoxS/aU5kIJxgNZc790wfhUMYsOOUTHETsAaUhuC4ddUO8TvrSbN6lGJrE5AnSoNjbE NJSZhvafxu1MnPe1mY4TleiNORgVmmUgVliQLzXSurmSOWY2zSE+LvVDQ00cSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637771324; a=rsa-sha256; cv=none; b=CmmzIrlf8GdjtTES+P8J8a/fWTxvbawP5wALFHAGjxTQ762aeMwMvJDV/JhzEiSEv73cjD 7gMJbEAisSoYmxH3NpAnNQoZ9JdLbeF2sB+ZGZ0xoT+TGLFf0vBwG5BEAqdTcYnNsCBEhN cXFO+HEvJSL1hnJ9HXUK4SKbRCefvYtIDLbcOHrfz2MX6ze2aQmc/HwNcO4JVLTZHQS9PX ZbSBWHIAVqQBXQbFf587jLesB1tPKwp3QVHaoIx+cQoxZywX5eodgtfn+1L7VVaHZFIUKo X5Ge3vQ+wdRaFFMsNOdK6SIC0nBAqt60c1CPHAfzqGU4ARY4Zl9UpOt01RfL3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e052f72691088229c34e8f908593319c413b2a10 commit e052f72691088229c34e8f908593319c413b2a10 Author: Mateusz Guzik AuthorDate: 2021-11-24 16:26:57 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 16:26:57 +0000 alc: plug a set-but-not-unused var in alc_init_locked Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/alc/if_alc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c index eb906d60bcbe..bedbd20c1f04 100644 --- a/sys/dev/alc/if_alc.c +++ b/sys/dev/alc/if_alc.c @@ -3932,7 +3932,6 @@ static void alc_init_locked(struct alc_softc *sc) { struct ifnet *ifp; - struct mii_data *mii; uint8_t eaddr[ETHER_ADDR_LEN]; bus_addr_t paddr; uint32_t reg, rxf_hi, rxf_lo; @@ -3940,7 +3939,6 @@ alc_init_locked(struct alc_softc *sc) ALC_LOCK_ASSERT(sc); ifp = sc->alc_ifp; - mii = device_get_softc(sc->alc_miibus); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) return; From nobody Wed Nov 24 16:37:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1AD3618A1A0F for ; Wed, 24 Nov 2021 16:38:09 +0000 (UTC) (envelope-from dgr@semihalf.com) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 4HzmsD4ttVz4Tjg for ; Wed, 24 Nov 2021 16:38:08 +0000 (UTC) (envelope-from dgr@semihalf.com) Received: by mail-ed1-x52d.google.com with SMTP id r11so13086826edd.9 for ; Wed, 24 Nov 2021 08:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PrGvHz/FsJ2j0PcwWgF7sWE7vu174Mhu56wwrjvHrYc=; b=ECIEhEmyYMiB0RUw2n4+x7tZq2GbRbLdJGZQFN451mc+//0NhG9fb7eJuw+ew8lqmY IGI5ROrvGhxXC/Cuxm2S8fBwBPa1R/AHnkq5bpujJBY9un3h2vLc7iwE5wfQRgNbw4ei enrdQAFyriA2awuAhwbUi9DuWHUCEO6Ntm5olRSM9UMOv6dR726qYCo1CinyssmttLNB XuFct4uIVdDlSn33IAJwg7fSOK9uETX7jlzSJ8NOleJ5naEYSVP7TLfd9Uvo6cn9c29I oXmuubPFPNZlfX4qJOvNbOt7n1hYbQ2uuxqMGRrl1PuaWnNkA7v6wPfYPHWzu5OrVAS2 qwWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PrGvHz/FsJ2j0PcwWgF7sWE7vu174Mhu56wwrjvHrYc=; b=GV5VxnMJmqOsO5WImc4i4qkOVA9zaIUddaG2y+ZhUXhN9TKe0iJnULznHfT9B0MK/B oOIa+hv+/6gBlJ8THH7phlssAtrvzGyqc9cxd25gChFU98+BHdKbFoedAi48l+beM4Rq EvmbaXduY75SuWrSWzT2VjGLtP44czD8KOfHu1SaSOelM8U4wSONQEnD9ZUH7Ct+fpsm CYOdEYzG/BeePTNWW2jU47/dc+TIDehW8XoN11MYM9WXw7xfWM5Xq03BVj+xafoKh3au aSVbY8zrxujH+1rB0oo/rJb2BnPSorQyh5Soe2OC50u6R72O/uSqL1o56OUri0WF4/56 DgGw== X-Gm-Message-State: AOAM530gPNB8bK0lKIUPI2Use3v8nmU9OxGFx4FiVAmjQFbkoySgWnVM MTLvpCVtnxY+3Zo9CBSArex+PnTtFhEMQuEz0gx4qg== X-Google-Smtp-Source: ABdhPJwtrchPWsgpJ4eGYNfMYm9epEOEqnqota6sSXj7wKQ1AMtl/srBMNuqMP3uF0TjHrM7Ue1t0LA21tsMde25nio= X-Received: by 2002:a17:907:2d10:: with SMTP id gs16mr21123713ejc.353.1637771887141; Wed, 24 Nov 2021 08:38:07 -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: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> <20211124144112.GF77338@zxy.spb.ru> In-Reply-To: <20211124144112.GF77338@zxy.spb.ru> From: =?UTF-8?Q?Dawid_G=C3=B3recki?= Date: Wed, 24 Nov 2021 17:37:56 +0100 Message-ID: Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables To: Slawa Olhovchenkov Cc: Marcin Wojtas , 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: 4HzmsD4ttVz4Tjg X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 24, 2021 at 3:41 PM Slawa Olhovchenkov wrote: > > On Tue, Nov 16, 2021 at 10:26:42PM +0000, Marcin Wojtas wrote: > > > > > Enable ASLR by default for 64-bit executables > > > > Now any core dumps will be useless? > Core dumps work fine. I just created a test application to confirm. LLDB resolves everything without issues. First run: root@aslr-dgr:~/coretest # lldb ./coretest --core ./coretest.core (lldb) target create "./coretest" --core "./coretest.core" Core file '/root/coretest/coretest.core' (x86_64) was loaded. (lldb) bt This version of LLDB has no plugin for the language "assembler". Inspection of frame variables will be limited. * thread #1, name = 'coretest', stop reason = signal SIGABRT * frame #0: 0x000021d0be68c53a libc.so.7`__sys_thr_kill at thr_kill.S:4 frame #1: 0x000021d0be604bf4 libc.so.7`__raise(s=6) at raise.c:52:10 frame #2: 0x000021d0be6b62c9 libc.so.7`abort at abort.c:67:8 frame #3: 0x000021c8bd67d9f5 coretest`main at coretest.c:10:2 frame #4: 0x000021c8bd67d7cd coretest`_start(ap=, cleanup=) at crt1_c.c:73:7 (lldb) frame select 3 frame #3: 0x000021c8bd67d9f5 coretest`main at coretest.c:10:2 7 int a = 1; 8 printf("Core dump test.\n"); 9 -> 10 abort(); 11 12 return 0; 13 } (lldb) frame v (int) a = 1 (lldb) quit Second run: root@aslr-dgr:~/coretest # ./coretest Core dump test. Abort trap (core dumped) root@aslr-dgr:~/coretest # lldb ./coretest --core ./coretest.core (lldb) target create "./coretest" --core "./coretest.core" Core file '/root/coretest/coretest.core' (x86_64) was loaded. (lldb) bt This version of LLDB has no plugin for the language "assembler". Inspection of frame variables will be limited. * thread #1, name = 'coretest', stop reason = signal SIGABRT * frame #0: 0x0000063d5022353a libc.so.7`__sys_thr_kill at thr_kill.S:4 frame #1: 0x0000063d5019bbf4 libc.so.7`__raise(s=6) at raise.c:52:10 frame #2: 0x0000063d5024d2c9 libc.so.7`abort at abort.c:67:8 frame #3: 0x000006354fc1d9f5 coretest`main at coretest.c:10:2 frame #4: 0x000006354fc1d7cd coretest`_start(ap=, cleanup=) at crt1_c.c:73:7 (lldb) You can see that addresses change but core dump still works. From nobody Wed Nov 24 16:42:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 046EB18A421F for ; Wed, 24 Nov 2021 16:42:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x936.google.com (mail-ua1-x936.google.com [IPv6:2607:f8b0:4864:20::936]) (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 4Hzmyh69cmz4WRm for ; Wed, 24 Nov 2021 16:42:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x936.google.com with SMTP id a14so6512153uak.0 for ; Wed, 24 Nov 2021 08:42:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DYLjw+67Z5zFdtVflmppzQU521XbY9tPIuGN6+8+qhc=; b=ycnpNZSGZH3j3ibQORLsLFqrBKWQ5vtnnAyoly7Oi4fxUBKt0VJqL0K8foTYN+drNx 6Raw4sbgeTbbCU5Xv02/TO0jdbDuL3xCkr7lLLtUyIFZQawGXb/ZmNjqNMo7VwNHFVlH uCVm9oBSGFd1b+Ied8daWZV2ZVsvdFAP2xqx7QhVs21NMCt2UkbL3KeM5OTewJLxl/Lz b1o3NvY06q47tX+Jlx1uQXWF8Ym2jvKf749vTIPPGxcniQbcjXQclVNbOApsS8r7rl6H wb9eCmYf68fw87MbEKv8vo91QY3Rhy4Eh88nFaMc5oK45M6cEhkad71pJBzoYvkGAZJO LYmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DYLjw+67Z5zFdtVflmppzQU521XbY9tPIuGN6+8+qhc=; b=jFaa6zK0NJa+ebwYqNF76p8Ho8y3m00ZqOrK4Mh+58qiHH0R4bp85PjC/zn25ukFTK tOAYItBYPsR/IJKi0jbIJ/OcLLBGPcefvD7k1yjSWZgJaZNKMCNM3tCCUj7Mmp49BFRp E+dIYwtqKtH1lmW0rpkA2DafPJoOPmcEAjIZr1cXMPZ3LWAbP5ACZa+Q23caWT3PCadB KlwGxjBk+KOxhW73CI5DT5txo+lMzqMh2HWnaiAHyMRqDh0GVxcDIdnSFqjmguGFzU5J 5j5hhU1WDiOYvFQsrkmLUSZ3Im7VEtYtwMh83MeBHoMmbAolXqBsYLaNhwxlYGI6CCgY ORyQ== X-Gm-Message-State: AOAM532D8WvlcIxG6npJwbQUgml3JS+N4QFeX42xf+2WcRpEm1ER7cAQ vGm2CZTWYQWj2CBAil2dvVwBZAf5kzcBNkckZ8RjKg== X-Google-Smtp-Source: ABdhPJyCk+AoBiWt75o5Xz+zgjcODnlPmFPv+GP+kqlRmulhmG5HeFgALgRDpSNSEVo+4f9HHKjY5kNt1jlU9CVSVWs= X-Received: by 2002:ab0:4405:: with SMTP id m5mr12507387uam.11.1637772172240; Wed, 24 Nov 2021 08:42:52 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202111241528.1AOFSJdf038653@gitrepo.freebsd.org> In-Reply-To: <202111241528.1AOFSJdf038653@gitrepo.freebsd.org> From: Warner Losh Date: Wed, 24 Nov 2021 09:42:41 -0700 Message-ID: Subject: Re: git: 169e06fa7852 - main - os-release: Quote variables as documented in the manual To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000008cc16505d18b8cbb" X-Rspamd-Queue-Id: 4Hzmyh69cmz4WRm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --0000000000008cc16505d18b8cbb Content-Type: text/plain; charset="UTF-8" On Wed, Nov 24, 2021 at 8:28 AM Mateusz Piotrowski <0mp@freebsd.org> wrote: > The branch main has been updated by 0mp (doc, ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=169e06fa7852810f4ced2cce7a3c14ca9443bf39 > > commit 169e06fa7852810f4ced2cce7a3c14ca9443bf39 > Author: Mateusz Piotrowski <0mp@FreeBSD.org> > AuthorDate: 2021-11-23 10:26:47 +0000 > Commit: Mateusz Piotrowski <0mp@FreeBSD.org> > CommitDate: 2021-11-24 15:17:01 +0000 > > os-release: Quote variables as documented in the manual > > Variables must be quoted if they contain non-alphanumeric characters. > > Warner noted in the review that the lack of quoting causing problems > here is rather an edge case. I believe that it's worth adding the > quotes > here anyway because this is what the specification says and there is no > good reason not to follow it. > The only place it might be needed is for _version. Everything else can't have troublesome characters. The manual does not say you have to quote non-alphanumeric characters in variable assignment being my main point. Certainly not the paths and URLs. That's just gratuitous and not generally done in shell scripts (which I thought was a good enough reason to not do it). I'd have preferred if that nuance had been better reflected in the commit message since the change itself won't break anything. Warner > Reviewed by: imp > Approved by: imp (src) > MFC after: 7 days > --- > libexec/rc/rc.d/os-release | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/libexec/rc/rc.d/os-release b/libexec/rc/rc.d/os-release > index c328e161a70e..16f8cb178db8 100755 > --- a/libexec/rc/rc.d/os-release > +++ b/libexec/rc/rc.d/os-release > @@ -27,14 +27,14 @@ osrelease_start() > t=$(mktemp -t os-release) > cat > "$t" <<-__EOF__ > NAME=FreeBSD > - VERSION=$_version > - VERSION_ID=$_version_id > + VERSION="$_version" > + VERSION_ID="$_version_id" > ID=freebsd > ANSI_COLOR="0;31" > PRETTY_NAME="FreeBSD $_version" > - CPE_NAME=cpe:/o:freebsd:freebsd:$_version_id > - HOME_URL=https://FreeBSD.org/ > - BUG_REPORT_URL=https://bugs.FreeBSD.org/ > + CPE_NAME="cpe:/o:freebsd:freebsd:$_version_id" > + HOME_URL="https://FreeBSD.org/" > + BUG_REPORT_URL="https://bugs.FreeBSD.org/" > __EOF__ > install -C -o root -g wheel -m ${osrelease_perms} "$t" > "${osrelease_file}" > rm -f "$t" > --0000000000008cc16505d18b8cbb-- From nobody Wed Nov 24 16:54:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0E75318ABD48 for ; Wed, 24 Nov 2021 16:54:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.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 4HznDS6S05z4dBk for ; Wed, 24 Nov 2021 16:54:48 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f50.google.com with SMTP id u18so5369519wrg.5 for ; Wed, 24 Nov 2021 08:54:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QMpAJ+c11QOXg3P3HQDcNER91D5N5J2U4VsCV1ANspM=; b=MtqKmCDQqQ8MJzqxACr1ajtjNQ1oiM9WkVoVr/l6njocyor8bxVWXou3A324S6O9h5 rGBaEJjGqK9bwXEmqxHN5wNXuxF0hG1dbMLl+clCkb1R9ZOP2JMrNNh0ixhJPWvdYUfm zDp8aw+gCt1no+xgywDtz1t8zlNk+hoGnmlT3HNr3aRBgHVfRHaIU6pbFiJYkXVeakzw XhHEN8zGndUsccVVdcCV0AL7zJUZuMZIbqn4Dea0q+Pn9SmGMuPodeHhoM+QO8ev5tTT a8X4PfBqiJOFGE0aLbMYjniUYhrBSjMoHZB+tmIrkW9BDR1OWqbmg/V3204weFyNtWVE C40g== X-Gm-Message-State: AOAM532X5iR90pO+m8cMBw03f/YJvXiUySPX/uDMKsUoLS+2by5qctFO ZmGMFPp1VQF9+M4FWX9uljjhlA== X-Google-Smtp-Source: ABdhPJzzmqDzuQEJ1BFOkeKesqnnkUcqhVJ+9Acg5fZkIXr+N10pKqA1VWrgW8EYJPbpUebCA6CasQ== X-Received: by 2002:a5d:50c6:: with SMTP id f6mr20972447wrt.131.1637772881931; Wed, 24 Nov 2021 08:54:41 -0800 (PST) Received: from smtpclient.apple (global-5-141.nat-2.net.cam.ac.uk. [131.111.5.141]) by smtp.gmail.com with ESMTPSA id m20sm6197271wmq.11.2021.11.24.08.54.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Nov 2021 08:54:41 -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 14.0 \(3654.120.0.1.13\)) Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables From: Jessica Clarke In-Reply-To: <30da11f2-d34b-d12e-836a-bf53949ed499@FreeBSD.org> Date: Wed, 24 Nov 2021 16:54:40 +0000 Cc: Slawa Olhovchenkov , Marcin Wojtas , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <56DAB1C2-C8EB-4A34-B9B6-A482A2BAC511@freebsd.org> References: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> <20211124144112.GF77338@zxy.spb.ru> <30da11f2-d34b-d12e-836a-bf53949ed499@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4HznDS6S05z4dBk X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 24 Nov 2021, at 16:23, John Baldwin wrote: > On 11/24/21 6:41 AM, Slawa Olhovchenkov wrote: >> On Tue, Nov 16, 2021 at 10:26:42PM +0000, Marcin Wojtas wrote: >>>=20 >>> Enable ASLR by default for 64-bit executables >>> =20 >> Now any core dumps will be useless? >=20 > I believe core dumps should be fine. We include the ELF auxv values = in core > dumps as a NT_PROCSTAT_AUXV note that GDB (and I presume LLDB) both = look at > to determine the location of the main executable (AT_BASE). Once the = dynamic > section of the main executable is found, DT_DEBUG is used to find the = linked > list of shared libraries (including rtld itself) just as with PDEs. And if it were broken, it would=E2=80=99ve been broken by switching to = building PIEs, not enabling ASLR. PIEs are linked with a base address of 0, so even if the kernel has a deterministic address at which it maps such executables (i.e. ASLR were disabled), it still needs to communicate that to the debugger somehow. Well, unless you hard-code the address for every architecture in the debugger, which is clearly a bad idea and not done. Jess From nobody Wed Nov 24 16:58:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0BE7218AC883; Wed, 24 Nov 2021 16:58: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 4HznK15J6Vz4djf; Wed, 24 Nov 2021 16:58:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9614D5467; Wed, 24 Nov 2021 16:58: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 1AOGwjZq059572; Wed, 24 Nov 2021 16:58:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGwjkp059571; Wed, 24 Nov 2021 16:58:45 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:58:45 GMT Message-Id: <202111241658.1AOGwjkp059571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: eaab06d53dfa - stable/13 - devfs.rules: Correctly unhide pf in vnet jails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eaab06d53dfa7fbf926a2c19aa00a6804b5e6349 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637773125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bJGb2/pIWW1JtG9uuWE4R/eTYmyJDpJ3wGgjZMAI54Q=; b=lec5BiuUy51RjCxiueAG7JQGLg8u75zfOd51vujyke+Xr9FUH8T1Ul+EQxkaXI800q2+8H QjPdxvehcCA+exJ0lSfwyvBaIyo+4iLxRB8VtSaxbK5DQxWY8XAWGBkOGYK/MyzQIJmtcj ul3DRe3VFzUnFZcEzCDjFylNHwTcsA8U+UshVpHBFMDqo52Jeoq88qy+MW+ugljozB3Vxn IOCWui1QxmnCPlrebIP5VPvjX/MriK0lyJoxMw4jko5G5otP/FFXd3yJK8nzfWSZqy970/ NBrnSVj4HBX/Eq0UOY+nRVJSjprOqHBh4iutQ5uwVH7WJcI+8zhN8guqi8hBhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637773125; a=rsa-sha256; cv=none; b=SLc7G1Sm7PDFRgEHrJzgSdVvS0ZSD5qaFKu405nBupOfoOVnxUQWjevNHMsGkADFNffLm/ 22TRxzelEYTbn+/wsPmvzH9l0ng0M2Q+M/sOQIbIw6/LlEXB25goIjGvNvzuVDgAeWMx3U tUam8+R5iyKJ+bS+b3mpu7JusMCJix6VaQH42NIBvS4UEZnwOHdpq2f+LEccQZgD0gDRyy piQighnset5N5Rs+zesK8R+QWvp5mxX9FEjUWNGYFH2+0LP9yvMPFI6JVijghI4StDNIYk WfuJkhwFrzz46t9+SLk3/XAF5padCHPQClvdywZTjdQ0U1nhVZY0NJ07x9gIjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=eaab06d53dfa7fbf926a2c19aa00a6804b5e6349 commit eaab06d53dfa7fbf926a2c19aa00a6804b5e6349 Author: Zhenlei Huang AuthorDate: 2021-11-03 11:46:48 +0000 Commit: Kristof Provost CommitDate: 2021-11-24 16:45:51 +0000 devfs.rules: Correctly unhide pf in vnet jails Revision 9e9be081d8 introduced a new devfs rule devfsrules_jail_vnet. It includes rule devfsrules_jail which include other rules. Unfortunately devfs could not recursively parse the action include and thus devfsrules_jail_vnet will expose all nodes. PR: 255660 Reviewed by: kp Obtained from: Gijs Peskens MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D32814 (cherry picked from commit 7acd322ebe2072b1d73b1d19c14ab12a300ba8e8) --- sbin/devfs/devfs.rules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sbin/devfs/devfs.rules b/sbin/devfs/devfs.rules index 01d8e5194c17..9543e20947d9 100644 --- a/sbin/devfs/devfs.rules +++ b/sbin/devfs/devfs.rules @@ -88,5 +88,8 @@ add path fuse unhide add path zfs unhide [devfsrules_jail_vnet=5] +add include $devfsrules_hide_all +add include $devfsrules_unhide_basic +add include $devfsrules_unhide_login add include $devfsrules_jail add path pf unhide From nobody Wed Nov 24 16:58:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0F91318AC6A1; Wed, 24 Nov 2021 16: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 4HznK254R9z4dvw; Wed, 24 Nov 2021 16:58:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8EBA85935; Wed, 24 Nov 2021 16:58: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 1AOGwkDS059662; Wed, 24 Nov 2021 16: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 1AOGwkFj059660; Wed, 24 Nov 2021 16:58:46 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:58:46 GMT Message-Id: <202111241658.1AOGwkFj059660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: c31b7fd8b294 - stable/12 - riscv: add COMPAT_FREEBSD12 option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c31b7fd8b294e64b285898ffbfb613b178948126 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637773126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uZ0vm1LfZ9PEBLKJ391NYXC2N7XHwXep0pS5L/nhktc=; b=pD3o/XjS3JO17v5SlM5FfyOHUECy20UpXDkN988yCEP/SzS8qTgvq42f5SihY04BtsHAw2 gGpwwRppuJ9NTkdnYJUoV652yctXhx+hSdkSRd/lmUbrkJWcFisswRf7654k6pQjplSSjV vYZlW2w81WcugSpBX6ZY00WyDaVkPKkTXc66KdMd647ALd+Ggk0O6rrzn3/qXzRolQoOM4 uyHGu/NIEdzrL6vvaZeUimRI2ra6m9+S0FXyv2MrwIHwhC6VG5n1UkHwUpKo7pXk2KSYlQ VlrXNTCrWQ06TRk2Eumr6NcgZKBAlJyQttsEj8a2e98pMXUThZpZkRm2pphQ1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637773126; a=rsa-sha256; cv=none; b=dSApYXuccmLycxX/nfLvQ5tZaq0gD2TxaJWIBlt14qDRLWegOMhAATKp+RVzhya58xowO2 /Q6bBXq/E3wqY5FRx8XOVOo046Izl2GB/Mvq0tdQTRkTcihngY60RTl+ElJ2dufINAK9Ud 24Q0AeC5zgBS6KiVEDJvDZmQfsWprxWiS0ztl6972yqMO64f/BRGOgfSxIob4Zd6MiszpG sgl33gVim5sjJ9IJ99Z9apB8m2liDvepJcwiVBGq1peXa9AjoKlR8asOIoBHct1bK6W6E4 AV/LRwgwdPBJdHwiT1IpeF/nbqacDnhdtjS3dZlkP1aXNXeCS/mTDsceD26A7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c31b7fd8b294e64b285898ffbfb613b178948126 commit c31b7fd8b294e64b285898ffbfb613b178948126 Author: Kristof Provost AuthorDate: 2021-11-16 19:46:26 +0000 Commit: Kristof Provost CommitDate: 2021-11-24 16:57:23 +0000 riscv: add COMPAT_FREEBSD12 option Turn on compat option for older FreeBSD versions (i.e. 12). We do not enable the compat options for 11 or older because riscv was never supported in those versions. Reviewed by: jrtc27 (previous version) MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33015 (cherry picked from commit 23e1961e78b0ac4d1cf03426d1a642962069f2b9) --- sys/riscv/conf/GENERIC | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 4982c48ece39..5cba4cc2f94f 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -51,6 +51,7 @@ options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization +options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support From nobody Wed Nov 24 16:58:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 95B5018AC6A4; Wed, 24 Nov 2021 16: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 4HznK26NZTz4djj; Wed, 24 Nov 2021 16:58:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B24895936; Wed, 24 Nov 2021 16:58: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 1AOGwkEx059686; Wed, 24 Nov 2021 16: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 1AOGwkJY059685; Wed, 24 Nov 2021 16:58:46 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:58:46 GMT Message-Id: <202111241658.1AOGwkJY059685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 576d71e383f1 - stable/13 - riscv: add COMPAT_FREEBSD12 option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 576d71e383f10cde0de14da16baf98835d51ecec Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637773126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k+9MNHV7NR/O4zJr54ncG09bwSHexqdwqnGuoN4d2Yg=; b=NecWWjIWsvcDJodKF+JmWAnVPcOldFqJ8h+u5lhAQzP5NjZ1wW3yXd5dA9UwkPBl+QcB8T EDVm0gM4/xOBkn6hjOgOnfD2YlY6kX+6gJg3p3YWZ+NAjZs2ebZbfrjMu/ju4QRBI1ALRu QF8yQ6Y6RglDFkfVWuyiROR2XbJ0wx4dbqCMEDE2AKnHYygHA+u7KzCvV5lIGT79GKLsmj 2o939ursBo5W5Qh8+1cPHpv6o9FGuOYGZgYjhqTeFl03KiP0JkCMTYLCZqpEO2CbhVwaCq dVHtffPJQEBy02kQ/uCa/iMymFqTaohUGEa80dL3ujJX1gJ7A+dZPWVjWkeQ9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637773126; a=rsa-sha256; cv=none; b=sS93jLdMM46jqu+IF3yNxhwZIVxVyJikLq9b4sN+NLKYBhZUtCssDXhJUBrvvRkpHd/GbQ cJ+uF3/PjTzZ/35+hJS+UfVAEYetpndINLh2ky+cIAV0LLacxxzPLr4DENcgYCKPmPeWuP NGoKsPvFnvmAGCKYN6LQju4P/RxqeYt5zBivQca8Hv6gfwK11sXEMaG4yvOdzdJIJVqt9D ixGeaxmZCYc/moOfKTOe/Z++k/Nh5BaDT2iI/Lo/lTE21cK/00AmWJMoE8lMGHK85OshxL Q170lghXrd17z6K5Aaq5WXodImnZzXZG7mGsrlwiV61RccMWwc5ciIhaiGuDZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=576d71e383f10cde0de14da16baf98835d51ecec commit 576d71e383f10cde0de14da16baf98835d51ecec Author: Kristof Provost AuthorDate: 2021-11-16 19:46:26 +0000 Commit: Kristof Provost CommitDate: 2021-11-24 16:45:51 +0000 riscv: add COMPAT_FREEBSD12 option Turn on compat option for older FreeBSD versions (i.e. 12). We do not enable the compat options for 11 or older because riscv was never supported in those versions. Reviewed by: jrtc27 (previous version) MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33015 (cherry picked from commit 23e1961e78b0ac4d1cf03426d1a642962069f2b9) --- sys/riscv/conf/GENERIC | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 8c3162d6ae1e..4ce3ffe059ba 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -52,6 +52,7 @@ options TMPFS # Efficient memory filesystem options GEOM_PART_GPT # GUID Partition Tables. options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization +options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support From nobody Wed Nov 24 16:58:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1825418AC814; Wed, 24 Nov 2021 16: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 4HznK42WrLz4dqg; Wed, 24 Nov 2021 16:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC21A5A8E; Wed, 24 Nov 2021 16: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 1AOGwl05059734; Wed, 24 Nov 2021 16:58:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGwlGD059733; Wed, 24 Nov 2021 16:58:47 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:58:47 GMT Message-Id: <202111241658.1AOGwlGD059733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 094b79ea7342 - stable/13 - pf tests: route_to:icmp_nat_head requires scapy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 094b79ea7342c3c6e5b698816d9486bb80e9518b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637773128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=22in+5qYPmx4mJ20QoVrWQGvMaTEofBlPDFklCjpHYI=; b=edrWMx8jCcWO5GD0FvuaLdMy4wR17tEVVfzag7jn+wQtX3mGvMHXDwOgY6c1QhUWqpzI8R vr3cj8vv3PkoTCvrZug59BK320O2oO8/J//WNLllAXuBbC9789T5e/uaieExhnfSSMnNfM u5jhCCQKWEO4CS9ifLBfFvhmNvxTjjSmSifAEc/FNTleYO1dgkzPQK3D0RYc1oZ8h0sop5 iFjKQowVjIAcC5iEots/NmCoFsHjt/iX3EY+k9onKVi8WUFK3YQRyhBLqSnDFoquwQ+4MT QQdRHlF0PmY0XhQ9bWs/co1BffClGASfz4E6Tp4dnANhA8oRpN3JFCiPU5KZMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637773128; a=rsa-sha256; cv=none; b=oBDwRzLtdEWDS3CSTG1RXCYiwK8tvGcTfe3J5knttRqNwwaRqYTx5x5Wig/RSREQsY4Al9 SeIKZOcEiVMiDpvB/FShs3vVZcmiw1fNmIVwApnoi3MdyqwwyMy3K0U5xYes+3s1pgH3R5 KyaKaHytQ4LPKtKVhCi/czzOZbLaaPRIw79xMQX2Jw8iGUYZB4Nk4AwDI6fKj1JRyhOCuZ GtRSRlDA3VotztlokuCeE1vGViYx6W3RIz08Newgync8nXaazU03ZWZmEmyaPdJgcoqStM bLWLqDYexgCFDin0UrgmLqY252KF+ZfU96+1SJzifzk31C+oFkSXI5XV+PAUXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=094b79ea7342c3c6e5b698816d9486bb80e9518b commit 094b79ea7342c3c6e5b698816d9486bb80e9518b Author: Kristof Provost AuthorDate: 2021-11-03 09:34:20 +0000 Commit: Kristof Provost CommitDate: 2021-11-24 16:45:51 +0000 pf tests: route_to:icmp_nat_head requires scapy Document the requirement so the test is skipped if scapy is not installed. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 11703705c2f77498246b9523aae44040bd346c00) --- tests/sys/netpfil/pf/route_to.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/netpfil/pf/route_to.sh b/tests/sys/netpfil/pf/route_to.sh index e7646a5fb7f7..570d1feb36ff 100644 --- a/tests/sys/netpfil/pf/route_to.sh +++ b/tests/sys/netpfil/pf/route_to.sh @@ -257,6 +257,7 @@ icmp_nat_head() { atf_set descr 'Test that ICMP packets are correct for route-to + NAT' atf_set require.user root + atf_set require.progs scapy } icmp_nat_body() From nobody Wed Nov 24 16:58:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A52E418AC810; Wed, 24 Nov 2021 16: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 4HznK36vpZz4dw4; Wed, 24 Nov 2021 16:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC74A5937; Wed, 24 Nov 2021 16: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 1AOGwlHj059710; Wed, 24 Nov 2021 16:58:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGwlEC059709; Wed, 24 Nov 2021 16:58:47 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:58:47 GMT Message-Id: <202111241658.1AOGwlEC059709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: b991674ba5af - stable/12 - pf tests: route_to:icmp_nat_head requires scapy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b991674ba5afeb11b7c4eb70028cce4a4e0ad41f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637773128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=02lEwtKXtTVV3mKUXVSPRYPQvcbU7c9xv6rTauupHGw=; b=rUViEihrMaK9b8DhNnDV04UBDpppU0IvomA4fRg4MnNsgdJWbBxgDKHMff2kZozE3I/sOd ZUZ9MQ1ftMxchoI9dFh/oE/SOUi97HWwNUBYPmrdCsInNL4NG5xKKqq0cHjXJHNe2iUQnV QOhE3Cn9lybPKCzW2+hROHCrRD0akCaLRbK/xAcoEfp4XDcI3q2ZMO33pIb1nnUjHHzkv6 9RHAckZ9KsO+Krd/deVgnhHRO78M9aXWuukjKjUtIyPaYmlbV59DVCr1GxYkBHB4VEc5US D2pajoa21q1jM8H0wJCA9jgA4RjC1iPWdyP15h6or1NudZ4oatifS5v5KuM5zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637773128; a=rsa-sha256; cv=none; b=v1iI3Feo8gdVzEXS7fyOPRKnoUD2mZ97Lvyhc40eJw18RnhvgT5fNorFC1HijoIIa0Ddq/ NR1EW33Pafdy1jicketwY7/BtrtcOAzwX5DB63pzq0pvONM4pZpVsd060SW+5NvJjZroln CiLSfObI7A7fCv+uVCXZzRKOhwP3YB1l6VgAVCq2kgUjug1mgFutbnw9oVmfdGcV6HJ/y1 6/oG3K1a/V2a/RtN1b/Gbut16iOJqrTsa33hIJx5SejSb63kcz7pJBXgCAH769I7darjHg ay//kXfn4WrE2K3Aj+Cd4ewBXq3+cmXT29234EtZ1hW5OGQKjOwxJkYGGG+oPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b991674ba5afeb11b7c4eb70028cce4a4e0ad41f commit b991674ba5afeb11b7c4eb70028cce4a4e0ad41f Author: Kristof Provost AuthorDate: 2021-11-03 09:34:20 +0000 Commit: Kristof Provost CommitDate: 2021-11-24 16:57:23 +0000 pf tests: route_to:icmp_nat_head requires scapy Document the requirement so the test is skipped if scapy is not installed. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 11703705c2f77498246b9523aae44040bd346c00) --- tests/sys/netpfil/pf/route_to.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/netpfil/pf/route_to.sh b/tests/sys/netpfil/pf/route_to.sh index e7646a5fb7f7..570d1feb36ff 100755 --- a/tests/sys/netpfil/pf/route_to.sh +++ b/tests/sys/netpfil/pf/route_to.sh @@ -257,6 +257,7 @@ icmp_nat_head() { atf_set descr 'Test that ICMP packets are correct for route-to + NAT' atf_set require.user root + atf_set require.progs scapy } icmp_nat_body() From nobody Wed Nov 24 17:44:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 71A43189DF31; Wed, 24 Nov 2021 17:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzpKS1MtJz3Crx; Wed, 24 Nov 2021 17:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F3B8643F; Wed, 24 Nov 2021 17: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 1AOHiBSp026781; Wed, 24 Nov 2021 17:44:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOHiBYI026780; Wed, 24 Nov 2021 17:44:11 GMT (envelope-from git) Date: Wed, 24 Nov 2021 17:44:11 GMT Message-Id: <202111241744.1AOHiBYI026780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 05ea7a3e5e74 - main - net80211: fix -Wunused-but-set-variable warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05ea7a3e5e748547a0229efa80be0e71eaf84f52 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637775852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1qV/I3nHSZIge6JAONHVMmRmU/2LjI3KEYSc7ZND28=; b=vdRG7Gtqi1ZkLsHeP17P0ar2t5imukPvorlfYJmv78dMLrWNC10bEs2LfdItsojCl+emcl mfUQ75NToNJe9DRS6u3EQRXMj2/LPetvWwwFbef5BRiKvm4w18ShgD6ogYcuTf4bp5tCB+ yxiGfHAGVOoWnc9KMS/qtqbvYL0wOx5NGWFHpiGfj4F7dPfKRuquYKz5FyTXdQphuIo4NV /SKnfKkIpiJ6jMl150lo4CAGJZ3UlfC1BbDx3IZveEoxdaE+uab1rnVo/Ar6Jg+xOeOjqc hajURvHDnIA37KxwVKUrxcWSjNqmkvKkpn61su4EbMJ8vqpWbF3CkxtHMzF3LQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637775852; a=rsa-sha256; cv=none; b=Cdcxh6LrnObCGwMMv5AQ2BwTVDtJEZKw0pjlDX5pqnF3w9lChTN1fe+YbxTXXKUkFHTPrr aCM8lYYpJllLk/ncj3h2gxld3XQokF359eXu9jk0UD9CR5e4cRuqG5A/CDDYBDkVKaA1kj niONN4W4pEFCF5LuPgJEX6IaGdDTdAlRQ4kNe1X1BVa+BxvYu6CZrsllyvpHUBSieC7hGn 7S5zV0ZjlWz8Ei31EYxVuHFLY+iwpn+sDLpOprNeGgGWqXzTAsAgPPzyGb6kllsr5ppRv1 8HC+x5Crx/29QengpsnKqeyJFeRq9I/YHe6fdzbUx2obWkwZSf8jNW3e0rE1Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=05ea7a3e5e748547a0229efa80be0e71eaf84f52 commit 05ea7a3e5e748547a0229efa80be0e71eaf84f52 Author: Bjoern A. Zeeb AuthorDate: 2021-11-24 17:36:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-24 17:39:19 +0000 net80211: fix -Wunused-but-set-variable warnings Put the offending variables under the appropriate #ifdefs (mostly IEEE80211_DEBUG, in one case IEEE80211_SUPPORT_SUPERG, and in two cases under __notyet__ to revisit why these had been left there but not used). Sponsored by: The FreeBSD Foundation MFC after: 10 days --- sys/net80211/ieee80211_adhoc.c | 5 ++++- sys/net80211/ieee80211_crypto_wep.c | 8 +++++--- sys/net80211/ieee80211_hostap.c | 16 +++++++++++++++- sys/net80211/ieee80211_ht.c | 21 ++++++++++++++++----- sys/net80211/ieee80211_output.c | 6 ++++++ sys/net80211/ieee80211_sta.c | 7 ++++++- 6 files changed, 52 insertions(+), 11 deletions(-) diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c index 150515222268..57e46dd5ad0b 100644 --- a/sys/net80211/ieee80211_adhoc.c +++ b/sys/net80211/ieee80211_adhoc.c @@ -1009,7 +1009,6 @@ ahdemo_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; - struct ieee80211_frame *wh; /* * Process management frames when scanning; useful for doing @@ -1018,7 +1017,11 @@ ahdemo_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, if (ic->ic_flags & IEEE80211_F_SCAN) adhoc_recv_mgmt(ni, m0, subtype, rxs, rssi, nf); else { +#ifdef IEEE80211_DEBUG + struct ieee80211_frame *wh; + wh = mtod(m0, struct ieee80211_frame *); +#endif switch (subtype) { case IEEE80211_FC0_SUBTYPE_ASSOC_REQ: case IEEE80211_FC0_SUBTYPE_ASSOC_RESP: diff --git a/sys/net80211/ieee80211_crypto_wep.c b/sys/net80211/ieee80211_crypto_wep.c index 797de006cdf2..164157559cb2 100644 --- a/sys/net80211/ieee80211_crypto_wep.c +++ b/sys/net80211/ieee80211_crypto_wep.c @@ -241,11 +241,8 @@ wep_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen) { struct wep_ctx *ctx = k->wk_private; struct ieee80211vap *vap = ctx->wc_vap; - struct ieee80211_frame *wh; const struct ieee80211_rx_stats *rxs; - wh = mtod(m, struct ieee80211_frame *); - rxs = ieee80211_get_rx_params_ptr(m); if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP)) @@ -258,6 +255,11 @@ wep_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen) */ if ((k->wk_flags & IEEE80211_KEY_SWDECRYPT) && !wep_decrypt(k, m, hdrlen)) { +#ifdef IEEE80211_DEBUG + struct ieee80211_frame *wh; + + wh = mtod(m, struct ieee80211_frame *); +#endif IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr2, "%s", "WEP ICV mismatch on decrypt"); vap->iv_stats.is_rx_wepfail++; diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 4fa9c6a72145..f3a85848fc84 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -997,7 +997,7 @@ hostap_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh, { struct ieee80211vap *vap = ni->ni_vap; uint8_t *challenge; - int allocbs, estatus; + int estatus; KASSERT(vap->iv_state == IEEE80211_S_RUN, ("state %d", vap->iv_state)); @@ -1070,17 +1070,26 @@ hostap_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh, } switch (seq) { case IEEE80211_AUTH_SHARED_REQUEST: + { +#ifdef IEEE80211_DEBUG + bool allocbs; +#endif + if (ni == vap->iv_bss) { ni = ieee80211_dup_bss(vap, wh->i_addr2); if (ni == NULL) { /* NB: no way to return an error */ return; } +#ifdef IEEE80211_DEBUG allocbs = 1; +#endif } else { if ((ni->ni_flags & IEEE80211_NODE_AREF) == 0) (void) ieee80211_ref_node(ni); +#ifdef IEEE80211_DEBUG allocbs = 0; +#endif } /* * Mark the node as referenced to reflect that it's @@ -1120,6 +1129,7 @@ hostap_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh, return; } break; + } case IEEE80211_AUTH_SHARED_RESPONSE: if (ni == vap->iv_bss) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_AUTH, @@ -2299,7 +2309,9 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, case IEEE80211_FC0_SUBTYPE_DEAUTH: case IEEE80211_FC0_SUBTYPE_DISASSOC: { +#ifdef IEEE80211_DEBUG uint16_t reason; +#endif if (vap->iv_state != IEEE80211_S_RUN || /* NB: can happen when in promiscuous mode */ @@ -2312,7 +2324,9 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, * [2] reason */ IEEE80211_VERIFY_LENGTH(efrm - frm, 2, return); +#ifdef IEEE80211_DEBUG reason = le16toh(*(uint16_t *)frm); +#endif if (subtype == IEEE80211_FC0_SUBTYPE_DEAUTH) { vap->iv_stats.is_rx_deauth++; IEEE80211_NODE_STAT(ni, rx_deauth); diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index fc10e07cc4fc..e680db5faa52 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -2351,7 +2351,7 @@ ieee80211_addba_response(struct ieee80211_node *ni, int status, int baparamset, int batimeout) { struct ieee80211vap *vap = ni->ni_vap; - int bufsiz, tid; + int bufsiz; /* XXX locking */ addba_stop_timeout(tap); @@ -2360,7 +2360,9 @@ ieee80211_addba_response(struct ieee80211_node *ni, /* XXX override our request? */ tap->txa_wnd = (bufsiz == 0) ? IEEE80211_AGGR_BAWMAX : min(bufsiz, IEEE80211_AGGR_BAWMAX); +#ifdef __notyet__ tid = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_TID); +#endif tap->txa_flags |= IEEE80211_AGGR_RUNNING; tap->txa_attempts = 0; /* TODO: this should be a vap flag */ @@ -2486,16 +2488,20 @@ ht_recv_action_ba_addba_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap; uint8_t dialogtoken, policy; uint16_t baparamset, batimeout, code; - int tid, bufsiz; - int amsdu; + int tid; +#ifdef IEEE80211_DEBUG + int amsdu, bufsiz; +#endif dialogtoken = frm[2]; code = le16dec(frm+3); baparamset = le16dec(frm+5); tid = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_TID); +#ifdef IEEE80211_DEBUG bufsiz = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ); - policy = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_POLICY); amsdu = !! _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_AMSDU); +#endif + policy = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_POLICY); batimeout = le16dec(frm+7); tap = &ni->ni_tx_ampdu[tid]; @@ -2563,11 +2569,16 @@ ht_recv_action_ba_delba(struct ieee80211_node *ni, struct ieee80211com *ic = ni->ni_ic; struct ieee80211_rx_ampdu *rap; struct ieee80211_tx_ampdu *tap; - uint16_t baparamset, code; + uint16_t baparamset; +#ifdef IEEE80211_DEBUG + uint16_t code; +#endif int tid; baparamset = le16dec(frm+2); +#ifdef IEEE80211_DEBUG code = le16dec(frm+4); +#endif tid = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_DELBAPS_TID); diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 4f9e9614f732..9b1898df7b10 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -126,10 +126,12 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m, struct ifnet *ifp = vap->iv_ifp; int mcast; int do_ampdu = 0; +#ifdef IEEE80211_SUPPORT_SUPERG int do_amsdu = 0; int do_ampdu_amsdu = 0; int no_ampdu = 1; /* Will be set to 0 if ampdu is active */ int do_ff = 0; +#endif if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && (m->m_flags & M_PWR_SAV) == 0) { @@ -187,12 +189,14 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m, */ do_ampdu = ((ni->ni_flags & IEEE80211_NODE_AMPDU_TX) && (vap->iv_flags_ht & IEEE80211_FHT_AMPDU_TX)); +#ifdef IEEE80211_SUPPORT_SUPERG do_amsdu = ((ni->ni_flags & IEEE80211_NODE_AMSDU_TX) && (vap->iv_flags_ht & IEEE80211_FHT_AMSDU_TX)); do_ff = ((ni->ni_flags & IEEE80211_NODE_HT) == 0) && ((ni->ni_flags & IEEE80211_NODE_VHT) == 0) && (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF)); +#endif /* * Check if A-MPDU tx aggregation is setup or if we @@ -246,9 +250,11 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m, * have also set or cleared the amsdu-in-ampdu txa_flags * combination so we can correctly do A-MPDU + A-MSDU. */ +#ifdef IEEE80211_SUPPORT_SUPERG no_ampdu = (! IEEE80211_AMPDU_RUNNING(tap) || (IEEE80211_AMPDU_NACKED(tap))); do_ampdu_amsdu = IEEE80211_AMPDU_RUNNING_AMSDU(tap); +#endif } } diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 7ea6187332b1..9e103f6877c4 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -1569,7 +1569,10 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype, int ix = aid / NBBY; int min = tim->tim_bitctl &~ 1; int max = tim->tim_len + min - 4; - int tim_ucast = 0, tim_mcast = 0; + int tim_ucast = 0; +#ifdef __notyet__ + int tim_mcast = 0; +#endif /* * Only do this for unicast traffic in the TIM @@ -1582,6 +1585,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype, tim_ucast = 1; } +#ifdef __notyet__ /* * Do a separate notification * for the multicast bit being set. @@ -1589,6 +1593,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype, if (tim->tim_bitctl & 1) { tim_mcast = 1; } +#endif /* * If the TIM indicates there's traffic for From nobody Wed Nov 24 18:02:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F2DA718A83E4; Wed, 24 Nov 2021 18:02:48 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from tor1-11.mx.scaleengine.net (tor1-11.mx.scaleengine.net [209.51.186.6]) (using TLSv1.3 with cipher TLS_AES_256_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 4Hzpkw5RRyz3K27; Wed, 24 Nov 2021 18:02:48 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.3] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by tor1-11.mx.scaleengine.net (Postfix) with ESMTPSA id 3DE6C2EEBD; Wed, 24 Nov 2021 18:02:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 tor1-11.mx.scaleengine.net 3DE6C2EEBD Message-ID: <8664c9a1-f000-d07f-5f48-3b18d3e5f629@freebsd.org> Date: Wed, 24 Nov 2021 13:02:47 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features Content-Language: en-US To: Emmanuel Vadot , Helge Oldach Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org References: <202111231936.1ANJaeDT011754@nuc.oldach.net> <20211124093016.e031bc2e2e935d1c67dbc0ae@bidouilliste.com> From: Allan Jude In-Reply-To: <20211124093016.e031bc2e2e935d1c67dbc0ae@bidouilliste.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Hzpkw5RRyz3K27 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 11/24/2021 3:30 AM, Emmanuel Vadot wrote: > On Tue, 23 Nov 2021 20:36:40 +0100 (CET) > freebsd@oldach.net (Helge Oldach) wrote: > >> Allan Jude wrote on Tue, 23 Nov 2021 20:14:53 +0100 (CET): >>> On 11/23/2021 5:00 AM, Helge Oldach wrote: >>>> Allan Jude wrote on Mon, 22 Nov 2021 19:14:13 +0100 (CET): >>>> Hmmm. On a RPi4/8G: >>>> >>>> Before (FreeBSD 13.0-STABLE (GENERIC) #366 stable/13-n248173-d16fbc488e6): >>>> | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes >>>> | aes-256-gcm 35791.98k 38533.57k 39986.77k 41397.59k 39840.43k 39638.36k >>>> >>>> After (FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621) >>>> >>>> | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes >>>> | aes-256-gcm 21277.62k 23226.64k 23613.90k 23687.51k 23892.93k 23947.95k >>>> >>>> It seems that AES throughput is actually cut by almost half? >>> >>> Do you know which of the CPU optimizations your RPi4 supports? >> >> Is this what you need? >> >> Instruction Set Attributes 0 = > > So there is no AES+PMULL instruction set on RPI4, I guess that openssl > uses them for aes-gcm. > > I wonder what it uses before that make it have this boost. > > On my rockpro64 I do see the improvement btw : > root@generic:~ # cpuset -l 4,5 openssl speed -evp aes-256-gcm > ... > aes-256-gcm 122861.59k 337938.39k 565408.44k 661223.09k 709175.19k 712327.25k > root@generic:~ # cpuset -l 4,5 env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm > ... > aes-256-gcm 34068.11k 38068.62k 39435.24k 39818.75k 39905.34k 39922.35k > > Running on the big cores at max freq. > >> Instruction Set Attributes 1 = <> >> Processor Features 0 = >> Processor Features 1 = <> >> Memory Model Features 0 = >> Memory Model Features 1 = <8bit VMID> >> Memory Model Features 2 = <32bit CCIDX,48bit VA> >> Debug Features 0 = >> Debug Features 1 = <> >> Auxiliary Features 0 = <> >> Auxiliary Features 1 = <> >> AArch32 Instruction Set Attributes 5 = >> AArch32 Media and VFP Features 0 = >> AArch32 Media and VFP Features 1 = >> >>> You can set the environment variable OPENSSL_armcap to override >>> OpenSSL's detection. >>> >>> Try: env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm >> >> On FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621 again (i.e. after this commit): >> >> hmo@p48 ~ $ env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm >> Doing aes-256-gcm for 3s on 16 size blocks: 6445704 aes-256-gcm's in 3.08s >> Doing aes-256-gcm for 3s on 64 size blocks: 1861149 aes-256-gcm's in 3.00s >> Doing aes-256-gcm for 3s on 256 size blocks: 479664 aes-256-gcm's in 3.01s >> Doing aes-256-gcm for 3s on 1024 size blocks: 122853 aes-256-gcm's in 3.04s >> Doing aes-256-gcm for 3s on 8192 size blocks: 15181 aes-256-gcm's in 3.00s >> Doing aes-256-gcm for 3s on 16384 size blocks: 7796 aes-256-gcm's in 3.07s >> OpenSSL 1.1.1l-freebsd 24 Aug 2021 >> built on: reproducible build, date unspecified >> options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) >> compiler: clang >> The 'numbers' are in 1000s of bytes per second processed. >> type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes >> aes-256-gcm 33504.57k 39704.51k 40825.01k 41394.83k 41454.25k 41601.52k >> hmo@p48 ~ $ openssl speed -evp aes-256-gcm >> Doing aes-256-gcm for 3s on 16 size blocks: 4066201 aes-256-gcm's in 3.00s >> Doing aes-256-gcm for 3s on 64 size blocks: 1087387 aes-256-gcm's in 3.00s >> Doing aes-256-gcm for 3s on 256 size blocks: 280110 aes-256-gcm's in 3.03s >> Doing aes-256-gcm for 3s on 1024 size blocks: 70412 aes-256-gcm's in 3.04s >> Doing aes-256-gcm for 3s on 8192 size blocks: 8762 aes-256-gcm's in 3.00s >> Doing aes-256-gcm for 3s on 16384 size blocks: 4402 aes-256-gcm's in 3.02s >> OpenSSL 1.1.1l-freebsd 24 Aug 2021 >> built on: reproducible build, date unspecified >> options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) >> compiler: clang >> The 'numbers' are in 1000s of bytes per second processed. >> type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes >> aes-256-gcm 21686.41k 23197.59k 23656.30k 23725.04k 23926.10k 23916.23k >> hmo@p48 ~ $ >> >> Kind regards, >> Helge > > So based on results from Manu, and Mark Millard, it seems almost every ARM platform is faster when it takes advantage of the CPU features, except the RPi4(B). As Manu pointed out, it doesn't appear to have the AES+PMULL feature, which means it must be something else that is slowing it down. What might help, is to try each feature in turn, and figure out which one is causing slower results. #define HWCAP_FP 0x00000001 #define HWCAP_ASIMD 0x00000002 #define HWCAP_EVTSTRM 0x00000004 #define HWCAP_AES 0x00000008 #define HWCAP_PMULL 0x00000010 #define HWCAP_SHA1 0x00000020 #define HWCAP_SHA2 0x00000040 #define HWCAP_CRC32 0x00000080 So try: env OPENSSL_armcap=1 openssl speed -evp aes-256-gcm as well as with armcap=2, 3 (both FP and ASIMD), 8 (just AES) etc. For ones where the CPU lacks the feature, it will crash with 'Illegal instruction' Separately, it might also be interesting to see the results of `openssl speed -evp sha256` before/after/with the different OPENSSL_armcap values -- Allan Jude From nobody Wed Nov 24 18:08:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5063418A9605; Wed, 24 Nov 2021 18:08: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 4Hzps52Tr7z3Knc; Wed, 24 Nov 2021 18:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32CB766AB; Wed, 24 Nov 2021 18:08: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 1AOI89Pf054829; Wed, 24 Nov 2021 18:08:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOI89js054828; Wed, 24 Nov 2021 18:08:09 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:08:09 GMT Message-Id: <202111241808.1AOI89js054828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: f29f6b2e1fc9 - main - ichsmb: Add PCI IDs for Intel Alder Lake SMBus controller List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f29f6b2e1fc93ea68171f6c974ffe654232d09ca Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637777289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iW62aA3d9sDx5aFTH8Ziv/WGtZ6K/fPs3KBXQ0O/qnY=; b=mFzwMHFNbdXQW9VMgfPO/IfDRKseQOXtoAWxipPDCxkB6Tu0/3rXLzrAZ3Ea+7q8LYVC// 1m+oWi3YPWEKUpb01n7UQ8Yf3+FVDLYb5l4btguQNdy0IttVbWrGewxYLAeif1ahIvweAq ddnZba1Oe78AAqkRQUOAffoPOEgGXbC4e5cTINKYWGvck0mvCqXW7yEa1yItoKW+O5+83Y TCt3q+qziYBvUyYKMP5Va3isrwqVSytnVx02wq++xg1nuFFkSgy+DwlROOXmpiuOKw2AvV l0s5RcYLB91XR85rXBupMwcL78mIRihD6lU7Vf8kQ6cQy3nDzp4aASl66Jfdhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637777289; a=rsa-sha256; cv=none; b=sIesSVU0D+vpcSt23T0cvy2RXpIip4UeYLlrIKSuFDIdnr3Nyys+TdgkpfvhFpZtzygF+E S6Q0DIvXWRFUJFAO2wVVEQ71/vi6nIOIwF0qtj9pJrbeP/gpJkjjjFZ5cIYnQFKHw0r/ie L5NmtuhQOA2uVE8uxzkeNr/TEVNb7X9nsVSVv0ioyAMcCojBI+aoDSZ1lOvfXA8BflAKuk zmVS43UyzXTjoE5JcRyHfovL672Dyt10hwSz22QZz+IyUMwwmz5Qx3dl44rGaCG/A7p86p 82dzB6Ax4YRz7L5MbYxv1AddD1AMxPLk99gvi6GwFqXYwDGF20t1fgsvuis9KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=f29f6b2e1fc93ea68171f6c974ffe654232d09ca commit f29f6b2e1fc93ea68171f6c974ffe654232d09ca Author: Alexander Motin AuthorDate: 2021-11-24 18:06:52 +0000 Commit: Alexander Motin CommitDate: 2021-11-24 18:07:58 +0000 ichsmb: Add PCI IDs for Intel Alder Lake SMBus controller Submitted by: Dmitry Luhtionov MFC after: 2 weeks --- sys/dev/ichsmb/ichsmb_pci.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/ichsmb/ichsmb_pci.c b/sys/dev/ichsmb/ichsmb_pci.c index 51049643ae15..32c6c1fbbcf2 100644 --- a/sys/dev/ichsmb/ichsmb_pci.c +++ b/sys/dev/ichsmb/ichsmb_pci.c @@ -110,6 +110,9 @@ __FBSDID("$FreeBSD$"); #define ID_TIGERLAKE 0xa0a3 #define ID_TIGERLAKE2 0x43a3 #define ID_GEMINILAKE 0x31d4 +#define ID_ALDERLAKE 0x7aa3 +#define ID_ALDERLAKE2 0x51a3 +#define ID_ALDERLAKE3 0x54a3 static const struct pci_device_table ichsmb_devices[] = { { PCI_DEV(PCI_VENDOR_INTEL, ID_82801AA), @@ -202,6 +205,12 @@ static const struct pci_device_table ichsmb_devices[] = { PCI_DESCR("Intel Tiger Lake SMBus controller") }, { PCI_DEV(PCI_VENDOR_INTEL, ID_GEMINILAKE), PCI_DESCR("Intel Gemini Lake SMBus controller") }, + { PCI_DEV(PCI_VENDOR_INTEL, ID_ALDERLAKE), + PCI_DESCR("Intel Alder Lake SMBus controller") }, + { PCI_DEV(PCI_VENDOR_INTEL, ID_ALDERLAKE2), + PCI_DESCR("Intel Alder Lake SMBus controller") }, + { PCI_DEV(PCI_VENDOR_INTEL, ID_ALDERLAKE3), + PCI_DESCR("Intel Alder Lake SMBus controller") }, }; /* Internal functions */ From nobody Wed Nov 24 18:10:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B891818AC0C4; Wed, 24 Nov 2021 18: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 4HzpwB3797z3MNh; Wed, 24 Nov 2021 18:10:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C2646A24; Wed, 24 Nov 2021 18: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 1AOIAoHD063337; Wed, 24 Nov 2021 18: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 1AOIAogS063336; Wed, 24 Nov 2021 18:10:50 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:10:50 GMT Message-Id: <202111241810.1AOIAogS063336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 1c55b0ce1c94 - main - std.nodebug: turn off net80211 debugging as well List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c55b0ce1c944c0b1b7657b7efa151cd25a74f5b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637777450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=avZ4ln2hmc6ZF8ipp1Uv3nguNNZcez8GccheTmVfmck=; b=hjZvCblto263SNGRKlds1cMd2nSXmZojOzwaNxXyy+gNl2aamD1gvxab+wuFdkWuHc86uT v+ATXzafGhsLURo8dAc43CLoqdRgHsWU487VAOtN8uUmfwbvG6Mt19kAXbA1mU0meF4Sbd NUGX/rRgopnqC2d1V50FFEozu4y52HaWGj13unTnEQZLlq2ZVHZCXZQ/VJ+LqL1GEgCpO1 /fp6IPC3Y/Z4QvdVxsPreJT8RtBHODDtr3tZ0stSwVo/E8BPmI4JiGuxJPldRkCYXAZuMw Jn1OmY/le6ycwXDHDAsYBAW8lhaU33NiR0CfMQS/T3q+xGmHm8gBmCfNyaPUug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637777450; a=rsa-sha256; cv=none; b=o7jS2HG181TAhlm88NpHUKdklCFbdAnSKlRguc30a1i4leFsTxGxVDCsyUWIn/oFwBzkRE 9v8RG6++siYgA8YDHiUrjcO2xb848b+q4GjXz33GF7hHGdcsGJ0Y6W6G6S6Cpl5SWV6lLW 5ukoEA+vHcVM8FzYha5kKIvqFiBr1w/+N25Yinkh0XOgEULQ05N+1peYMRKzXhPDGviqvH 9gU2FW5hfWQmr4kRr6uNIDIL1TJUGTwodoBaDlKYO6Qzq/corKDIhAwEWde7vNVmM6pg/P 8NFOLpvmoOxMTY5p+Ry8vJPzFnyoUKEFTrQwQbNXvSf24MhRohQ+oSBQvzx/BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1c55b0ce1c944c0b1b7657b7efa151cd25a74f5b commit 1c55b0ce1c944c0b1b7657b7efa151cd25a74f5b Author: Bjoern A. Zeeb AuthorDate: 2021-11-24 18:03:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-24 18:06:20 +0000 std.nodebug: turn off net80211 debugging as well Add IEEE80211_DEBUG to turn off some net80211 debbugging for no-debug builds. Sponsored by: The FreeBSD Foundation MFC after: 10 days --- sys/conf/std.nodebug | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/conf/std.nodebug b/sys/conf/std.nodebug index 53a7fc6b2f81..b0bf9d4d47f6 100644 --- a/sys/conf/std.nodebug +++ b/sys/conf/std.nodebug @@ -14,6 +14,9 @@ nooptions KCOV nooptions MALLOC_DEBUG_MAXZONES nooptions QUEUE_MACRO_DEBUG_TRASH +# Net80211 debugging +nooptions IEEE80211_DEBUG + # USB debugging nooptions USB_DEBUG nooptions HID_DEBUG From nobody Wed Nov 24 18:11:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1BB1D18AC613; Wed, 24 Nov 2021 18:11:29 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from mail.anongoth.pl (mail.anongoth.pl [46.248.190.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X448 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "anongoth.pl", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hzpww6ZnHz3Mbd; Wed, 24 Nov 2021 18:11:28 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from anongoth.pl (unknown [192.168.1.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: pkubaj@anongoth.pl) by mail.anongoth.pl (Postfix) with ESMTPSA id 4740710AAEA; Wed, 24 Nov 2021 19:11:19 +0100 (CET) Date: Wed, 24 Nov 2021 19:11:17 +0100 From: Piotr Kubaj To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3a60869237b8 - main - Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le Message-ID: References: <202111232227.1ANMRCYk070382@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="44jlvOkB4ldT3XLB" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Hzpww6ZnHz3Mbd X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N --44jlvOkB4ldT3XLB Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, it's quite funny, I was actually starting to do it. On 21-11-24 08:15:26, John Baldwin wrote: > On 11/23/21 2:27 PM, Piotr Kubaj wrote: > > The branch main has been updated by pkubaj (ports committer): > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3a60869237b8b315fe66497c= f5299ec08b688533 > >=20 > > commit 3a60869237b8b315fe66497cf5299ec08b688533 > > Author: Piotr Kubaj > > AuthorDate: 2021-11-22 02:28:46 +0000 > > Commit: Piotr Kubaj > > CommitDate: 2021-11-23 22:26:53 +0000 > >=20 > > Add assembly optimized code for OpenSSL on powerpc, powerpc64 and = powerpc64le > > =20 > > Summary: > > 1. https://github.com/openssl/openssl/commit/34ab13b7d8e3e723adb60= be8142e38b7c9cd382a > > needs to be merged for ELFv2 support on big-endian. > > 2. crypto/openssl/crypto/ppccap.c needs to be patched. > > Same reason as in https://github.com/openssl/openssl/pull/17082. >=20 > Have you looked at adding powerpc support to ossl(4)? It should be fairl= y simple > (just adding the right asm files in Makefiles and the powerpc equivalent = of > OSSL_cpuid). >=20 > --=20 > John Baldwin --44jlvOkB4ldT3XLB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAmGegEUACgkQelmbhSCD nJ3JYQ/9H58+UcCTWQp5xp+bpq/NsB0kUjtdglJO78wshxWNicE0XOSsfN2KcAim 1+2dF9H80/1oxLlzmlzG4H+zzYI/Ju1NwkB7Y4FIzxcu3ORjo06utsmy03LcBsmp K3enKGuXONb/ynAhvgyIrP+VX6x0MujcMibQ99tukZ00X3IerEZ6nRfYxdWPwXJ4 R23wxWGam1F2Q+ILQec9IofFxwCU/D7soUhQTxVQzxMvY6pFGtpQGIWSwwagsGAB 26E0PcHDgTGXWAKDTJFYb/uOlHhbIH48AevfhsoZkgxGkQEVv6+QmqvJ4C2zztvr RMNMzhN+OtE77PQ9w2GAA/bczltsM2QgevssPsO4q1ZBI2kMqLi20qd4QQBjCxkR RAn3CPIWEJlH3v48dBEcCz7ptmbaMDJugfvI03KU/ahwdCTc0xZivOCwnTAHvGDO CGaxH5DyjXQ9RPMJp6KUDHaIXw1egqEAoRV0z1+qMsm0/Wg+z1HzfUStQ+DIGO9D TU6gOfUF0PS1Q9auo45YH4O4EfZDPS+DzI+xG6aGjOPpSOUwJLe8AwleoYGTD3mj f+zojy4Qj0TNocL1OqdeejeU2hfL9KMV3/DQjt458rwF9izDWf96Jn1yYK5WXHCr /A8Sz/470SsZb5nDOQQvL/LovX6Kdtq8Lq5KV6mVq5ohHpSSPgU= =h0To -----END PGP SIGNATURE----- --44jlvOkB4ldT3XLB-- From nobody Wed Nov 24 18:24:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 649741893D10; Wed, 24 Nov 2021 18:24:46 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from mail.anongoth.pl (mail.anongoth.pl [46.248.190.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X448 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "anongoth.pl", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzqDG0w85z3hlg; Wed, 24 Nov 2021 18:24:46 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from anongoth.pl (unknown [192.168.1.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: pkubaj@anongoth.pl) by mail.anongoth.pl (Postfix) with ESMTPSA id 9AD0F10AFEE; Wed, 24 Nov 2021 19:24:42 +0100 (CET) Date: Wed, 24 Nov 2021 19:24:40 +0100 From: Piotr Kubaj To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3a60869237b8 - main - Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le Message-ID: References: <202111232227.1ANMRCYk070382@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qRjQw2/MAoU9sVAt" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4HzqDG0w85z3hlg X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N --qRjQw2/MAoU9sVAt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable OK, it looks like ossl uses fpu_kern functions and those are available only= an aarch64, amd64 and i386: cc -O2 -pipe -fno-common -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MOD= ULE -nostdinc -include /usr/obj/usr/src/powerpc.powerpc64/sys/modules/oss= l/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-co= mmon -fPIC -mlongcall -fno-omit-frame-pointer -fdebug-prefix-map=3D./machi= ne=3D/usr/src/sys/powerpc/include -MD -MF.depend.ossl.o -MTossl.o -mno= -altivec -msoft-float -mabi=3Delfv2 -ffreestanding -fwrapv -fstack-protecto= r -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-pr= ototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__= =3D__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wn= o-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wn= o-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-= sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -Wno-for= mat-zero-length -std=3Diso9899:1999 -c /usr/src/sys/crypto/openssl/ossl= =2Ec -o ossl.o /usr/src/sys/crypto/openssl/ossl.c:190:4: error: implicit declaration of fu= nction 'fpu_kern_enter' is invalid in C99 [-Werror,-Wimplicit-function-decl= aration] fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); ^ /usr/src/sys/crypto/openssl/ossl.c:190:36: error: use of undeclared identif= ier 'FPU_KERN_NOCTX' fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); ^ /usr/src/sys/crypto/openssl/ossl.c:193:4: error: implicit declaration of fu= nction 'fpu_kern_leave' is invalid in C99 [-Werror,-Wimplicit-function-decl= aration] fpu_kern_leave(curthread, NULL); ^ /usr/src/sys/crypto/openssl/ossl.c:193:4: note: did you mean 'fpu_kern_ente= r'? /usr/src/sys/crypto/openssl/ossl.c:190:4: note: 'fpu_kern_enter' declared h= ere fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); ^ /usr/src/sys/crypto/openssl/ossl.c:214:6: error: implicit declaration of fu= nction 'is_fpu_kern_thread' is invalid in C99 [-Werror,-Wimplicit-function-= declaration] if (is_fpu_kern_thread(0)) { ^ /usr/src/sys/crypto/openssl/ossl.c:217:3: error: implicit declaration of fu= nction 'fpu_kern_enter' is invalid in C99 [-Werror,-Wimplicit-function-decl= aration] fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); ^ /usr/src/sys/crypto/openssl/ossl.c:217:35: error: use of undeclared identif= ier 'FPU_KERN_NOCTX' fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); ^ /usr/src/sys/crypto/openssl/ossl.c:263:3: error: implicit declaration of fu= nction 'fpu_kern_leave' is invalid in C99 [-Werror,-Wimplicit-function-decl= aration] fpu_kern_leave(curthread, NULL); ^ 7 errors generated. AFAIK porting those is not easy and it's certainly above my pay grade. On 21-11-24 08:15:26, John Baldwin wrote: > On 11/23/21 2:27 PM, Piotr Kubaj wrote: > > The branch main has been updated by pkubaj (ports committer): > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3a60869237b8b315fe66497c= f5299ec08b688533 > >=20 > > commit 3a60869237b8b315fe66497cf5299ec08b688533 > > Author: Piotr Kubaj > > AuthorDate: 2021-11-22 02:28:46 +0000 > > Commit: Piotr Kubaj > > CommitDate: 2021-11-23 22:26:53 +0000 > >=20 > > Add assembly optimized code for OpenSSL on powerpc, powerpc64 and = powerpc64le > > =20 > > Summary: > > 1. https://github.com/openssl/openssl/commit/34ab13b7d8e3e723adb60= be8142e38b7c9cd382a > > needs to be merged for ELFv2 support on big-endian. > > 2. crypto/openssl/crypto/ppccap.c needs to be patched. > > Same reason as in https://github.com/openssl/openssl/pull/17082. >=20 > Have you looked at adding powerpc support to ossl(4)? It should be fairl= y simple > (just adding the right asm files in Makefiles and the powerpc equivalent = of > OSSL_cpuid). >=20 > --=20 > John Baldwin --qRjQw2/MAoU9sVAt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAmGeg2gACgkQelmbhSCD nJ1eVBAApv3riGUqY+aVDZT4uNSX61jyAcn7uSq43PZdqFoqXO1uQ/iNfAwx4kas 9w7OshIWJT4EwH9RDFh1KUqseOdLQzbCj35/qZclWxIQO+qbCVti8yHkhdj4BgY9 pSaxL3NOHq20+JlzqosUd1cTL/vnX/hhu6na2cf4w3vriPGAe5bNKQbj642LonET QLUBcMNjQE7E6tI8x+wm3gsAexx/hhz92JlpDIrwoWKf0PxagMDu00HqHqlssOZ0 DuASEg6eSkf4ctuVwusnuLgmlKG7O9mrMLzN3mCLHNKi5jAbSPrETOux9bcAOAjH kRQN4ZespyB9xxF5s3LQTHXF58Ha9ziWkiqZTVa0GkdVYFNC4+jMYZhk6fTNSBol Exuj97J9xT5btvMUMBptbnpMhN664Jyo+3Yh9zdvuSbM3hlYPu/oDHINcE3CEzpB acDj72bNluyAI+I3kBf0vtQRbAxpAbk3mwiIk8PxIYZYtlVYB9p+dTbvAyYKOzhJ C0Y6fcBNDmBmAirvMNNbWBulYAf5cYs6l8v0aLgLuQfr8aRawr0AUy+JpDsqwdkr aKt+S13wqS94xQB1E8wAEQKBoKPyYlXFN4K4OfSONjrm8c33CMzeCU1grY+Bq91E 0UMUa195pDCcpAWBabrSaEJcyLxSOnn7XXbSHN5vCjbYlYBe9PA= =uQmv -----END PGP SIGNATURE----- --qRjQw2/MAoU9sVAt-- From nobody Wed Nov 24 18:27:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 71B6018941C3; Wed, 24 Nov 2021 18:27: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 4HzqHf1Jtdz3ht9; Wed, 24 Nov 2021 18:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09B816B95; Wed, 24 Nov 2021 18:27: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 1AOIRfSP081022; Wed, 24 Nov 2021 18:27:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIRfJm081021; Wed, 24 Nov 2021 18:27:41 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:27:41 GMT Message-Id: <202111241827.1AOIRfJm081021@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: b194db935565 - main - sys/acct.h: Add sys/types.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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b194db935565d58392c21906419cbd99a5ecc0c3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637778462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e/eeNYEoiG5e1jFduseBS6VVQD3RsVhj7rd9mKZU4ow=; b=LZKMfSAsykcUXOvlokTjjj76CtHF+0+nqzA9J9hd4B3KAs39Z6F8/AHOTQSX3XW8Un5oUv TGiBimFMI8WEu+DUm3b6XuRdqg0Q9NkxWSFHW3IXcZYfUrKkv0XW/HX20JJO3XBV+n/go4 jUG93dtFLqMZepPxRt65KFF8Fdll4Z3xydzUH3tV7N2ncglfeTy+TVvq0Tv2R4XRF5EQA4 mxEI3AQDp10+8qE1qOGRR0zwALYXFFHfikQi86+nZKnfMQbMXCjYYgnFdPQ4ahsmlhjS/U 177WeUKg9C5ySpJ2vzZ3egpDff4113xKAQ4sAbYVJruA1ECHTyhx5m5CiP/P4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637778462; a=rsa-sha256; cv=none; b=sUb99PKi9t+JV+PPpar74Jx/C8M/7HfNOcyVp1Mu0Kdp2EPQmMTeEmRcNDuUSQoVAVw8Ch FtHLDik4OTIMAPTRRqFpHoOi9BU30SkT5kqhi2JVPmNoawuadNULBf1FgV4WRoCha9HM8F Ovu8Lc3uci1lN8nj+XPoQykxM2WehnSfvHGv+uV81KmTpCBVTsu74q8461qCSybP+Om1zO OtcNtgb+A21hKXRqNG8klJor9RYW5Vbux619HjuOTK2uypKHlxZCISNZyC+FgxUweW5msr xVVcDb9LB6qrYZSaawNnbYDFve4fxvE5tp8WMLUWq8g6emnAz+GBNK9EWMSdwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b194db935565d58392c21906419cbd99a5ecc0c3 commit b194db935565d58392c21906419cbd99a5ecc0c3 Author: Warner Losh AuthorDate: 2021-11-24 17:37:48 +0000 Commit: Warner Losh CommitDate: 2021-11-24 18:26:44 +0000 sys/acct.h: Add sys/types.h include There's no harm in including sys/types.h here and acct.h needs it. This file isn't defined by any standard, so what we do here wrt namespaces likely doesn't matter. If it does, it will be easy enough to add the necessary __BSD_VISIBLE guards in the future. Sponsored by: Netflix --- sys/sys/acct.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sys/acct.h b/sys/sys/acct.h index 36c6a5e23d06..7f61f3f4fc10 100644 --- a/sys/sys/acct.h +++ b/sys/sys/acct.h @@ -42,6 +42,8 @@ #ifdef _KERNEL #define float uint32_t +#else +#include #endif #define AC_COMM_LEN 16 From nobody Wed Nov 24 18:27:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1A06E18940AA; Wed, 24 Nov 2021 18:27: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 4HzqHg1v8mz3htB; Wed, 24 Nov 2021 18:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 224E86D93; Wed, 24 Nov 2021 18:27: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 1AOIRhCl081046; Wed, 24 Nov 2021 18:27:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIRh0f081045; Wed, 24 Nov 2021 18:27:43 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:27:43 GMT Message-Id: <202111241827.1AOIRh0f081045@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: 242d6201a6c8 - main - sys/alq.h: Kernel only file, mark as such List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 242d6201a6c840a68dc19b0df1157568751e1391 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637778463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aYlgwyt3a4esrLt07SfddZ1L9a1fcYj5kYBKRQ3BCeE=; b=rSModH1mfRAkGWCYTEnZBoWU7U30f4qMKluBkJRi/BTnxJU2MVn8LUHFRrxx2bFd+TgD8S gWpKBbukJglNykU/s3oa7Dl5N1ao7jnApl9A0zIcmmzoeE8zlJ05T/Aff5s/uJW8zMmR4m OP89dv91NIwB3Fj/YO6sQHupTJGKpONEaz0l8vfjqQ8JxuVTPPelWA2X1w0n1/qKHkSKpB 976SUT7jzOhHKxOQDEqKbJQFrvphK0+2n6YAsieXWJy4dzbSAK9NbfoDn07PzBAVQSXEGv Okqvn698aZpNbh5ZHoW3duayiAmnM2DvMWlocwL9b3Yp/zudn/8SKVS2N6grsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637778463; a=rsa-sha256; cv=none; b=fcyItoxXIroL2tscoe0Hae/F8y1IlNrhUCMEaxlD8NoUyGXT2IlAXX6OJqTwnvcs2RVHph OlEiFHYPC7Eeg4crulvW7+qbMHfPgPIF0dYsOBBesVcUI47ZsHNVhxbejtbUb2RiL2L2MR 6ZENiqUbLmjqLc3IplJGjSOKA3j7qqxAY8Fw58M6jLTwC+2uwQ7ejzr4qH6bUMVV5z94q0 nuEA5iLaZxjyEPQ6y8pjBO/51mldGOS06m76OYGB4WveF67cQH6kHdEkrQtrZBbjkmloSX QqztlyXK/GYjKUUxcBIB2oKxMIHEZdQAieOapwiSxZky8VfvKyNt6ZMcg7e9jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=242d6201a6c840a68dc19b0df1157568751e1391 commit 242d6201a6c840a68dc19b0df1157568751e1391 Author: Warner Losh AuthorDate: 2021-11-24 17:39:10 +0000 Commit: Warner Losh CommitDate: 2021-11-24 18:26:45 +0000 sys/alq.h: Kernel only file, mark as such The alq interfaces are 100% in-kernel, so make this whole file #ifdef _KERNEL. There's no users of this in the tree outside of the kernel, nor does it define anything that could be useful at peeking into the state of alq. Sponsored by: Netflix --- sys/sys/alq.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sys/alq.h b/sys/sys/alq.h index 536fa2077357..fc8962c13cdb 100644 --- a/sys/sys/alq.h +++ b/sys/sys/alq.h @@ -37,6 +37,7 @@ #ifndef _SYS_ALQ_H_ #define _SYS_ALQ_H_ +#ifdef _KERNEL /* * Opaque type for the Async. Logging Queue */ @@ -143,4 +144,5 @@ alq_post(struct alq *alq, struct ale *ale) alq_post_flags(alq, ale, 0); } +#endif /* _KERNEL */ #endif /* _SYS_ALQ_H_ */ From nobody Wed Nov 24 18:27:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EFA4C1894231; Wed, 24 Nov 2021 18:27: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 4HzqHj15jmz3htH; Wed, 24 Nov 2021 18:27:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66EEC6C46; Wed, 24 Nov 2021 18:27: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 1AOIRiMA081070; Wed, 24 Nov 2021 18:27:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIRi3b081069; Wed, 24 Nov 2021 18:27:44 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:27:44 GMT Message-Id: <202111241827.1AOIRi3b081069@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: fde1edaae7f0 - main - sys/disk/*.h: Include sys/types.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: fde1edaae7f05f753f3d0787744bcb466b634e7b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637778465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LYXgitdF/pIxNRcyXvIUnXy6Nww0DaP8nAdIrqEYSCU=; b=shTzJE2VEirDfg9z/vtbVyzrKVoaqvZaIYrf9KzVY/W3xtSJmSJmN2JJ8i0SrTJK2+y1Yv nZfjQcZLH+Y+h8X6p2RJVhsHvni9VyZyTcxZYSfuN+OhMl8t9HpSTp4QvECDYCpUnvvck8 C0sMkN8epiDUfH5l052nLP9Fh/ONPi/D6mjMmzpe0bkNBip88hsTql/IuO0bNgynmS+t0h aOvLf5HudsV1PNcA/LHsWHVuPYEW7jmF8O/9ofCf4AXC6hhuxYIeKi8LGP4VDyA1cBFLRd yPRaxJ6HnLS5LxB+4sODotNA6yf64wQiqfs8q6tIdwmNILfJA1yuHBR41uAEmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637778465; a=rsa-sha256; cv=none; b=xjRvN7pse+Uq57SgSB+6J/AcN0PDenh5fNk9FjpObBin9QHccA2tJuwkX4QrUGAO2xGQnR n6K79MjE+hHC8A+UNdukqPQncunDjsNld/JA/7tFs9uD59wyarK4WTr9mEtJsORnwtRJH6 x/YnjqP3rreHNNp4SH3JejDyLp34nKAQwsyExMS+wu0k4XTFAkSSw7yuZW4Ke48sX8euex hyrKDJqMpA0DRLj2mqkPli9J99FRzjZuAbymfae4tvLDgFQEl0W6ZW5R18uqf57h6cVU1I juJiIcFAvoGYWdQDlhOxTsxnXpHqwAUCjZMUI0ZYV6MB+laxBT2gAklNxYHsnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fde1edaae7f05f753f3d0787744bcb466b634e7b commit fde1edaae7f05f753f3d0787744bcb466b634e7b Author: Warner Losh AuthorDate: 2021-11-24 17:41:57 +0000 Commit: Warner Losh CommitDate: 2021-11-24 18:26:45 +0000 sys/disk/*.h: Include sys/types.h All these files use types defined by sys/types.h. Add an include of it at the top to make them standalone. Sponsored by: Netflix --- sys/sys/disk/apm.h | 2 ++ sys/sys/disk/bsd.h | 2 ++ sys/sys/disk/gpt.h | 2 ++ sys/sys/disk/mbr.h | 2 ++ sys/sys/disk/vtoc.h | 2 ++ 5 files changed, 10 insertions(+) diff --git a/sys/sys/disk/apm.h b/sys/sys/disk/apm.h index a9183b5e3aa7..1cf64a53b81a 100644 --- a/sys/sys/disk/apm.h +++ b/sys/sys/disk/apm.h @@ -29,6 +29,8 @@ #ifndef _SYS_DISK_APM_H_ #define _SYS_DISK_APM_H_ +#include + /* Driver Descriptor Record. */ struct apm_ddr { uint16_t ddr_sig; diff --git a/sys/sys/disk/bsd.h b/sys/sys/disk/bsd.h index 6b1e55ce6545..3e627db09099 100644 --- a/sys/sys/disk/bsd.h +++ b/sys/sys/disk/bsd.h @@ -33,6 +33,8 @@ #ifndef _SYS_DISK_BSD_H_ #define _SYS_DISK_BSD_H_ +#include + /* The disk magic number */ #define BSD_MAGIC 0x82564557U diff --git a/sys/sys/disk/gpt.h b/sys/sys/disk/gpt.h index c68524b9051e..3cb8d8e071e8 100644 --- a/sys/sys/disk/gpt.h +++ b/sys/sys/disk/gpt.h @@ -29,6 +29,8 @@ #ifndef _SYS_DISK_GPT_H_ #define _SYS_DISK_GPT_H_ +#include + /* * Applications can define GPT_UUID_TYPE if they want the GPT structures * to use a particular type definition for UUIDs/GUIDs. This header uses diff --git a/sys/sys/disk/mbr.h b/sys/sys/disk/mbr.h index 39b47c4a7386..1241059b02ea 100644 --- a/sys/sys/disk/mbr.h +++ b/sys/sys/disk/mbr.h @@ -33,6 +33,8 @@ #ifndef _SYS_DISK_MBR_H_ #define _SYS_DISK_MBR_H_ +#include + #define DOSBBSECTOR 0 /* DOS boot block relative sector number */ #define DOSDSNOFF 440 /* WinNT/2K/XP Drive Serial Number offset */ #define DOSPARTOFF 446 diff --git a/sys/sys/disk/vtoc.h b/sys/sys/disk/vtoc.h index c784d92717cf..c8e6e86268e4 100644 --- a/sys/sys/disk/vtoc.h +++ b/sys/sys/disk/vtoc.h @@ -29,6 +29,8 @@ #ifndef _SYS_DISK_VTOC_H_ #define _SYS_DISK_VTOC_H_ +#include + #define VTOC_TAG_UNASSIGNED 0x00 #define VTOC_TAG_BOOT 0x01 #define VTOC_TAG_ROOT 0x02 From nobody Wed Nov 24 18:27:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1901F18941D3; Wed, 24 Nov 2021 18:27: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 4HzqHk0D0Gz3jHS; Wed, 24 Nov 2021 18:27:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EA596C47; Wed, 24 Nov 2021 18:27: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 1AOIRjQQ081096; Wed, 24 Nov 2021 18:27:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIRjZc081095; Wed, 24 Nov 2021 18:27:45 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:27:45 GMT Message-Id: <202111241827.1AOIRjZc081095@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: d69b6fa5b449 - main - sys/ata.h: Include sys/types.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: d69b6fa5b449422b217aad22a81f3e3ec8dd6894 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637778466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vjGvjmVuxvd502n1MyKCwX1gkMuBkvQulJc9Pcb0fO8=; b=mPeFAbMXH+1oW1+3mfVzyHjB0+YRvB8VAMDtrPpyuY9VdpVckznTbMf/U2lB4/FiNocGW5 SaSUiuolqUplgYiEv7u73jV/7JogHoq2lXEW7kESfzcS6m36pKubw21C3DD2x1E+ey5Mgu gbSD4fqH3yyCD6nE/dGCB9bIF+74uodQ62SC/XSYueAhaaCN95a/OXxVDr7K1SXgnQTVR0 IPFsrSSymTU2oB071pO0naPTfO6wCZkauSXLJydVK1xe+CHrUGfXaa3Q4qX2t5/Hwq+cGW F0TyYS798FLlf4gBIUTRxQUxJ34G/OJ39SHQlyKQn/CrjDpliifLEe9B6LSvrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637778466; a=rsa-sha256; cv=none; b=iySLMvMBWzobHINl32OOpLI4X91iPo+by4ctOu918dYK2LVmx8/iU7259/WGr7FPh+VCJT NguXqJZ8VJGjIxMVZZFzrlZ7MfpKZQbQPGBycctXLpw7yrREmOcj1xU3AqazOfx8XShmUh hc91wunLOYfltNWQ9qgFhQW/fO6RRlfdPOrINJEI+IzZhVaCtQqpiJN3ufx6LmVLCgsTIG FSUxwnwAtFGC3rWgzyn30OqxPmz1bA+pDqRqjmy8mSgG+XIh7Ktyul62DE/9q/WKNlcwEp bFww9tFmK6oQOqAGGxKncgDVG1l9rC6/L5C20v5Jz1GsusyWLPR008MN9YZHvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d69b6fa5b449422b217aad22a81f3e3ec8dd6894 commit d69b6fa5b449422b217aad22a81f3e3ec8dd6894 Author: Warner Losh AuthorDate: 2021-11-24 17:48:10 +0000 Commit: Warner Losh CommitDate: 2021-11-24 18:26:45 +0000 sys/ata.h: Include sys/types.h This file needs types defined by sys/types.h, and there's no reason not to include sys/types.h here. Sponsored by: Netflix --- sys/sys/ata.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/ata.h b/sys/sys/ata.h index 83eb089dbecf..7f89d96790fe 100644 --- a/sys/sys/ata.h +++ b/sys/sys/ata.h @@ -31,6 +31,7 @@ #ifndef _SYS_ATA_H_ #define _SYS_ATA_H_ +#include #include /* ATA/ATAPI device parameters */ From nobody Wed Nov 24 18:27:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D08C91894111; Wed, 24 Nov 2021 18:27: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 4HzqHl0Mbzz3j9X; Wed, 24 Nov 2021 18:27:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85F396D94; Wed, 24 Nov 2021 18:27: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 1AOIRksC081125; Wed, 24 Nov 2021 18:27:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIRkS6081124; Wed, 24 Nov 2021 18:27:46 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:27:46 GMT Message-Id: <202111241827.1AOIRkS6081124@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: 9be3985f6501 - main - sys/backlight.h: include sys/types.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: 9be3985f6501034f15b220fd1ce16a8cdc011f6a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637778467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Gjugy28CcpvgzFtj2a5kh1iuSp5acfMd/ExV2oaeOA=; b=RyGHmvCzOXe70fUAgWMO3ygjcuE3OA2BiH03qHkWXV2TT2zmOrMe+aoHv06gHcpydH5r65 c91AFKWGo5pWIpaTTY2S6HW6zPlMJpzq0cqZRSLM+6J3kSE6jBfiATF6fl4kZK9yEf+TAr MflGNyz9zTOLXF25croqqWBu5qw6Ud87SatNH7dOYHBOdZ1pjcM6dLCLpWsRT8XLZgS+bF BCNEDDFWb3PTExocnN/kMpqFYmbx7JJQzkUYrEhCCXP18B3FFtvR9o6bH9JsyNtJiqTf/R p4VEOQWM6e2ApODScrTjgn+yrfbB/djbBbZ/jYG87ftoZ5XEdQwAzJ5iB9dVow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637778467; a=rsa-sha256; cv=none; b=U/psYTrFoLADFIeM9D3GWBfnpQmgyH5J47zsFRIq0kaA8zGWxKDDBfHZvq5AFNWXP6gPUf C32th7vDTHkjd5/B0+HrvOaFyLrRhVMeru5k59m1QbFLlV5rVmRscYOiQLtarTkeTJJ+R/ e0hgJFyAE6/Eh1mTuSaGTpU61UdvrKwNf/jqndkasaHMlW2mp5r8GDI23KwMFdBQYfNQdY PjpHe2tX1PYdDX8zC8jhf3xNDaR+F1sU63aZHFHpMt1hyfYGDG1oQzcjP01dghpyTQCxdQ BVf7N4Yku1sVCnfxuQdSKHl6mU5XpO+t6gckqIuHOHgWMIlyhZcPSXaxhgcPjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9be3985f6501034f15b220fd1ce16a8cdc011f6a commit 9be3985f6501034f15b220fd1ce16a8cdc011f6a Author: Warner Losh AuthorDate: 2021-11-24 17:49:34 +0000 Commit: Warner Losh CommitDate: 2021-11-24 18:26:45 +0000 sys/backlight.h: include sys/types.h Sponsored by: Netflix --- sys/sys/backlight.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sys/backlight.h b/sys/sys/backlight.h index 4742d40e746c..697e0b6b6349 100644 --- a/sys/sys/backlight.h +++ b/sys/sys/backlight.h @@ -30,6 +30,8 @@ #ifndef __BACKLIGHT_H__ #define __BACKLIGHT_H__ +#include + #define BACKLIGHTMAXLEVELS 100 struct backlight_props { From nobody Wed Nov 24 18:27:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E851418941F9; Wed, 24 Nov 2021 18:27: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 4HzqHm2m6Zz3jNd; Wed, 24 Nov 2021 18:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1DFC6E0A; Wed, 24 Nov 2021 18:27: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 1AOIRlBw081149; Wed, 24 Nov 2021 18:27:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIRlHB081148; Wed, 24 Nov 2021 18:27:47 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:27:47 GMT Message-Id: <202111241827.1AOIRlHB081148@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: 00dbcdbe0a5a - main - sys/uuid.h: Include sys/types.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: 00dbcdbe0a5af49d76711a48a84a720ab4243a57 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637778468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iEkFi2jyEwuvUhQEG01/d0CO3KUuG4+0FNJCnXaZ988=; b=bgzdC27Wk4X2lV0xrmeg3u6HPdjjBsReIlj56VS6oOCg4jSWMJWCxpFppkV56myoi7iZ7Y vFFvQGFWxtwpz96XBJbOSPHlL6vLY+X9rNY5KNPEVDEFF92HnfHySy9zt89uCExcAKgVk6 WTX3/8zsHeamftgjjJjBNGXsO8fHmW7jNMBf0ZU2DFZkPWPH2oWZ/ralW9BIiSCY9SsS3G v/krV9vhUq0gr5Mes//nnpo7emzRMgKA+YBBYlC6/wEG0XDR8eOPsZP72PpnGlDJDhDjb1 faX2F/OcOA9e66vCgIpUNzPLLz07OxdWVmv7RAyW8SJVC3P4qPHTzhGy1bwsmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637778468; a=rsa-sha256; cv=none; b=nmssj1FhwKMlKNgBjJTtcw0QNfT8wydu2C83xdoiyI+I62CIfcrNCE9dpFrlGJ09Dqk5NT bha/1rmHFwyPTVN7MVuvrFZlt6cl8lkkv7vk3gO1ejl8lKcJalDnsM+Cf7juXToHagzLwp CDqoY1hBy6YuPJfb1tmkpY8x7+6bGtwTN2ct6g8GcxhK0U5hOV1oT8YOhRM2G+xDXYZc0X zplAVzumjfK8ZIBsWtXReDBFqUDa1Rz9uU6XVcSDxbBQg05OgDAKIbLxuOBB5NRWh6KNYZ dGJGf9xdtJkdsbeVzgWM5IR+f8HMaZkyerW5OU0PO1jQ/42HscD9IP3502v8ZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=00dbcdbe0a5af49d76711a48a84a720ab4243a57 commit 00dbcdbe0a5af49d76711a48a84a720ab4243a57 Author: Warner Losh AuthorDate: 2021-11-24 17:49:53 +0000 Commit: Warner Losh CommitDate: 2021-11-24 18:26:45 +0000 sys/uuid.h: Include sys/types.h Change the include of sys/cdefs.h to sys/types.h to pick up all the types. sys/types.h includes cdefs.h. Sponsored by: Netflix --- sys/sys/uuid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/uuid.h b/sys/sys/uuid.h index 95050d0f8d20..bbb85732dd50 100644 --- a/sys/sys/uuid.h +++ b/sys/sys/uuid.h @@ -31,7 +31,7 @@ #ifndef _SYS_UUID_H_ #define _SYS_UUID_H_ -#include +#include /* Length of a node address (an IEEE 802 address). */ #define _UUID_NODE_LEN 6 From nobody Wed Nov 24 18:34:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0CFC2189A1E5; Wed, 24 Nov 2021 18:34:38 +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 4HzqRd6CMPz3nlj; Wed, 24 Nov 2021 18:34:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 0A5DA1493; Wed, 24 Nov 2021 18:34:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <133897a3-6db4-9353-cccd-c1d82e23146e@FreeBSD.org> Date: Wed, 24 Nov 2021 10:34:36 -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.14; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: git: 3a60869237b8 - main - Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le Content-Language: en-US To: Piotr Kubaj Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202111232227.1ANMRCYk070382@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637778877; 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=lA0Ndo7objBkI9mjM3geAFMXiw0FDRMCeICvjqvHyyc=; b=QTwSDk2BUIN/GBLovS3bm1uKkcDihKDyJmTVdb1RSZD8XVy6hmaZ6ogFiHmxXyTyvf6UGV ql1+nwndOu3caKNxabHfu6X2nVTwcr+aDbAi2kVB69jlt+Zfs+dVwbQieJdiL8DX8kH/77 9tinlB/gLUaVoNWL9nf4pjYbzYRpEZx84ZjQGrVUoieamz43qYIPY/2SY1XfS+d5r31oEo DyGqlfSyooXy2iB7WTj/YT9Thz2g/49G75WoV/eVrN4UcBkJSLAPiArYapdc5AJhM2YC3Y 8ffTtOckmlSTlrNZkLdbXR4vKTw4zgSaJGeue/ZMgGS1c8s4OA1iemLNB/ro/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637778877; a=rsa-sha256; cv=none; b=kW186fZds43hFEiREFCOv5dMDlxf6SfTFck2aut1fShEV809TPYstd/ZPH1KkU0wDyaei8 Bt1NHGq5Th+CchmCxqMeyPZq29N9gwZVB6gyfIernvvx33BLpSNRgw42K+l0B/in516QPU A9/V4wsj4ZAWg//GVyrL+qjucgv2I6BuFSqzPGD6CFogs8oVUhK/IpVT8dk7QpY+OvTxyp YJHhfAfxUqkAKCIbz+20k+0aUrhGX2CGcMS6lAqDRYHaGy7xbgEJF/VXzasyB3FZ5h7Erk DpC8y2iDhuAFRUPP7HGdBXpgekEEuaoJJfApMamBzXlerzpQo01mWF7P/LT6ZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 11/24/21 10:24 AM, Piotr Kubaj wrote: > OK, it looks like ossl uses fpu_kern functions and those are available only an aarch64, amd64 and i386: > cc -O2 -pipe -fno-common -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -include /usr/obj/usr/src/powerpc.powerpc64/sys/modules/ossl/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fPIC -mlongcall -fno-omit-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/powerpc/include -MD -MF.depend.ossl.o -MTossl.o -mno-altivec -msoft-float -mabi=elfv2 -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -Wno-format-zero-length -std=iso9899:1999 -c /usr/src/sys/crypto/openssl/ossl.c -o ossl.o > /usr/src/sys/crypto/openssl/ossl.c:190:4: error: implicit declaration of function 'fpu_kern_enter' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); > ^ > /usr/src/sys/crypto/openssl/ossl.c:190:36: error: use of undeclared identifier 'FPU_KERN_NOCTX' > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); > ^ > /usr/src/sys/crypto/openssl/ossl.c:193:4: error: implicit declaration of function 'fpu_kern_leave' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > fpu_kern_leave(curthread, NULL); > ^ > /usr/src/sys/crypto/openssl/ossl.c:193:4: note: did you mean 'fpu_kern_enter'? > /usr/src/sys/crypto/openssl/ossl.c:190:4: note: 'fpu_kern_enter' declared here > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); > ^ > /usr/src/sys/crypto/openssl/ossl.c:214:6: error: implicit declaration of function 'is_fpu_kern_thread' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > if (is_fpu_kern_thread(0)) { > ^ > /usr/src/sys/crypto/openssl/ossl.c:217:3: error: implicit declaration of function 'fpu_kern_enter' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); > ^ > /usr/src/sys/crypto/openssl/ossl.c:217:35: error: use of undeclared identifier 'FPU_KERN_NOCTX' > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); > ^ > /usr/src/sys/crypto/openssl/ossl.c:263:3: error: implicit declaration of function 'fpu_kern_leave' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > fpu_kern_leave(curthread, NULL); > ^ > 7 errors generated. > > AFAIK porting those is not easy and it's certainly above my pay grade. Do the powerpc instructions use additional registers that are not part of the normal GPRs saved/restored on a context switch? If so, then, yes, you will need to implement something here (though the FPU_KERN_NOCTX variant is a bit simpler as it disables context switches and it's sufficient just to init the registers and permit accesses without raising a trap until fpu_kern_leave). If not, then you can make the use of those functions conditional on architecture. > On 21-11-24 08:15:26, John Baldwin wrote: >> On 11/23/21 2:27 PM, Piotr Kubaj wrote: >>> The branch main has been updated by pkubaj (ports committer): >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3a60869237b8b315fe66497cf5299ec08b688533 >>> >>> commit 3a60869237b8b315fe66497cf5299ec08b688533 >>> Author: Piotr Kubaj >>> AuthorDate: 2021-11-22 02:28:46 +0000 >>> Commit: Piotr Kubaj >>> CommitDate: 2021-11-23 22:26:53 +0000 >>> >>> Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le >>> >>> Summary: >>> 1. https://github.com/openssl/openssl/commit/34ab13b7d8e3e723adb60be8142e38b7c9cd382a >>> needs to be merged for ELFv2 support on big-endian. >>> 2. crypto/openssl/crypto/ppccap.c needs to be patched. >>> Same reason as in https://github.com/openssl/openssl/pull/17082. >> >> Have you looked at adding powerpc support to ossl(4)? It should be fairly simple >> (just adding the right asm files in Makefiles and the powerpc equivalent of >> OSSL_cpuid). >> >> -- >> John Baldwin -- John Baldwin From nobody Wed Nov 24 18:39:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BA733189E283; Wed, 24 Nov 2021 18: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 4HzqYL3LXJz3qp2; Wed, 24 Nov 2021 18:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 529C06DFD; Wed, 24 Nov 2021 18: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 1AOIdYLh095034; Wed, 24 Nov 2021 18: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 1AOIdYeq095033; Wed, 24 Nov 2021 18:39:34 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:39:34 GMT Message-Id: <202111241839.1AOIdYeq095033@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: 09100f936be0 - main - netinet: Remove in_cksum_update() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 09100f936be0684aa8caef441b96345960fd9c72 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637779174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3RsIarDFzLIM+5CKcV/uaIsWApGVPaWI2c5p1FuJyrY=; b=V3DuSACV4fFpifjjUlTIhEd0FJtMXXCNG3FdL962BgocuNi1uwdWF0WmXF5CGR0vaj8I2f dlbHOg5/D8WunFYCGYu8Ov/yNn7fy6Vv8BA9ii5+Ao0Sv0ZrvYmUsroGxclUfdYb6IX0Nr DPcV63ba7PrbE1gXiA9aApJzC0kUFdEHvOT9UKHtXZYQCy41YNI7QyU2wzwfV8eiuNhv5y Ht7fueOGeAAt6EsLIRkdK08+asmRe6WiD7TfiTmjtOhKOXTZf0NrGPb9TlQfXmuw9FL+lZ D1UddB5jZqkeNpk0k5bxJUw9WAVk8eGvgjujN6LCGjCKIngeCYsKv8z5weOWxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637779174; a=rsa-sha256; cv=none; b=jAz6z+rsRXA9T2XX2dU26DR3QjlrLy6r7jGc+3iocsQ9Wf5v5SWgZZwaaZSr+P/KnmYprz hQWk+Ss+3MQjCFHJ6rL0bBfFQ3YbQwGYvy4IJ3Libc8vCaFWEBrxJ4YN0v34hacOx2q4uJ 86xWsLzOf4P1Soc6YCZ7NkzM5nMrzbDF0r2yfA32A0NCyBXI0em62TvDzhh17YJcjNhtOY Cgnnn642pCumOfb8GLkE+e/EdkT5dMnq6O4bc97+xiz6afWnZ6zDnv86K875jr1kpjMf/4 aw9QLIJ5Rra/+PfVub609vnepAJpYgL7IdCGdJedrNAzL7dCDdUcNuRzlldyng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=09100f936be0684aa8caef441b96345960fd9c72 commit 09100f936be0684aa8caef441b96345960fd9c72 Author: Mark Johnston AuthorDate: 2021-11-24 18:15:40 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 18:31:15 +0000 netinet: Remove in_cksum_update() It was never implemented on powerpc or riscv and appears to have been unused since it was added in 1998. No functional change intended. Reviewed by: kp, glebius, cy MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33093 --- sys/amd64/include/in_cksum.h | 29 ----------------------------- sys/i386/include/in_cksum.h | 19 ------------------- sys/mips/include/in_cksum.h | 29 ----------------------------- sys/powerpc/include/in_cksum.h | 29 ----------------------------- 4 files changed, 106 deletions(-) diff --git a/sys/amd64/include/in_cksum.h b/sys/amd64/include/in_cksum.h index 79d30cafbc90..89ff1097f369 100644 --- a/sys/amd64/include/in_cksum.h +++ b/sys/amd64/include/in_cksum.h @@ -45,35 +45,6 @@ #define in_cksum(m, len) in_cksum_skip(m, len, 0) -#if defined(IPVERSION) && (IPVERSION == 4) -/* - * It it useful to have an Internet checksum routine which is inlineable - * and optimized specifically for the task of computing IP header checksums - * in the normal case (where there are no options and the header length is - * therefore always exactly five 32-bit words. - */ -#ifdef __CC_SUPPORTS___INLINE - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} - -#else - -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif -#endif - #ifdef _KERNEL #if defined(IPVERSION) && (IPVERSION == 4) u_int in_cksum_hdr(const struct ip *ip); diff --git a/sys/i386/include/in_cksum.h b/sys/i386/include/in_cksum.h index 87c18ec4066d..a8214e97cd9a 100644 --- a/sys/i386/include/in_cksum.h +++ b/sys/i386/include/in_cksum.h @@ -83,14 +83,6 @@ in_cksum_hdr(const struct ip *ip) return ~sum & 0xffff; } - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} #endif static __inline u_short @@ -123,17 +115,6 @@ in_pseudo(u_int sum, u_int b, u_int c) sum -= 0xffff; return (sum); } - -#else -#if defined(IPVERSION) && (IPVERSION == 4) -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif #endif #ifdef _KERNEL diff --git a/sys/mips/include/in_cksum.h b/sys/mips/include/in_cksum.h index d55b838b42ed..580fb9c024f8 100644 --- a/sys/mips/include/in_cksum.h +++ b/sys/mips/include/in_cksum.h @@ -42,35 +42,6 @@ #define in_cksum(m, len) in_cksum_skip(m, len, 0) -#if defined(IPVERSION) && (IPVERSION == 4) -/* - * It it useful to have an Internet checksum routine which is inlineable - * and optimized specifically for the task of computing IP header checksums - * in the normal case (where there are no options and the header length is - * therefore always exactly five 32-bit words. - */ -#ifdef __CC_SUPPORTS___INLINE - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} - -#else - -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif -#endif - #ifdef _KERNEL #if defined(IPVERSION) && (IPVERSION == 4) u_int in_cksum_hdr(const struct ip *ip); diff --git a/sys/powerpc/include/in_cksum.h b/sys/powerpc/include/in_cksum.h index fd34e13d3822..7407b4ad7104 100644 --- a/sys/powerpc/include/in_cksum.h +++ b/sys/powerpc/include/in_cksum.h @@ -41,35 +41,6 @@ #define in_cksum(m, len) in_cksum_skip(m, len, 0) -#if defined(IPVERSION) && (IPVERSION == 4) -/* - * It it useful to have an Internet checksum routine which is inlineable - * and optimized specifically for the task of computing IP header checksums - * in the normal case (where there are no options and the header length is - * therefore always exactly five 32-bit words. - */ -#ifdef __CC_SUPPORTS___INLINE - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} - -#else - -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif -#endif - #ifdef _KERNEL #if defined(IPVERSION) && (IPVERSION == 4) u_int in_cksum_hdr(const struct ip *ip); From nobody Wed Nov 24 18:39:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 19855189E135; Wed, 24 Nov 2021 18:39:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzqYM4KbCz3qt8; Wed, 24 Nov 2021 18:39:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7550E6E54; Wed, 24 Nov 2021 18: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 1AOIdZm9095058; Wed, 24 Nov 2021 18: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 1AOIdZCJ095057; Wed, 24 Nov 2021 18:39:35 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:39:35 GMT Message-Id: <202111241839.1AOIdZCJ095057@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: 5195bcc2126b - main - netinet: Remove in_cksum.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/main X-Git-Reftype: branch X-Git-Commit: 5195bcc2126b302802643f5204d1030e5893fb62 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637779175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=19x7j8m4K5lOKL2Ny+5LZrmKyrsC95VVcHr1DQyvjNo=; b=T6CHK4N3RcOG2ugE85QiPlfoesL/R6kbghG2/XAT64FR7Pky4zEZ8D2W823lZNPAy8G/k+ f6a6Y/CNXt163AaCFfq5yJ+qVQWck1AoitFYZInBfrtjMgY9ff8wLpMLlfSSOyOA9ETmCI YgkuAAezMtoom8Ym5eSMZW8CO9QqYMp2/sVytQlKaK2D8TP7X2txczcNQEiHTeGkUTa4dA gvgmVD1cx2WWTQLCj0lnMQ2qp+2O177LtmI8sgec7JQVQtvfYDZ8z98OwvBn2uhDSzMvk1 O7KSw8C4jGgquJyEXBfHcFLlOdLudRctABaGZJjnn68x7Hfh4/CGsNvi6bPswA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637779175; a=rsa-sha256; cv=none; b=ea5lUGpqkUczqVlakeewxiHOgaknvdXDP766JB/skcVCicG111F2sBvOSI/Ds0F0wtxhIm SPZH1pR2xg5hyCoP+0uBfFQ3VhZYKNpHCjxRxCr/az6U4wxqBPJAX3E3dtMmtb8uTYgUY4 PyMMYPi8uDhOLTGTw8JDLlBhmSXyiFKmXcyRCK9I2xx5XOlbGbQ954t6KrKCic91CKHbin roYO8g8Xr4K0SDSlQpDDFw/wVCQ2OHq9mMQdfAsTInd+V2Cr3OUGZoD26qOsyIlpjOAEXU 4ijqSmVXeTARHZy+A/7zP4BIb4bWQRpwobqdfMYOrMHcD+2mIEvI8sWvp6tjcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5195bcc2126b302802643f5204d1030e5893fb62 commit 5195bcc2126b302802643f5204d1030e5893fb62 Author: Mark Johnston AuthorDate: 2021-11-24 18:19:34 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 18:31:16 +0000 netinet: Remove in_cksum.c It does not get compiled into the kernel. No functional change inteneded. Reviewed by: kp, glebius, cy MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33094 --- sys/netinet/in_cksum.c | 148 ------------------------------------------------- 1 file changed, 148 deletions(-) diff --git a/sys/netinet/in_cksum.c b/sys/netinet/in_cksum.c deleted file mode 100644 index 64a69760dab7..000000000000 --- a/sys/netinet/in_cksum.c +++ /dev/null @@ -1,148 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1988, 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93 - */ - -#include -__FBSDID("$FreeBSD$"); - -#include -#include - -/* - * Checksum routine for Internet Protocol family headers (Portable Version). - * - * This routine is very heavily used in the network - * code and should be modified for each CPU to be as fast as possible. - */ - -#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x) -#define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);} - -int -in_cksum(struct mbuf *m, int len) -{ - u_short *w; - int sum = 0; - int mlen = 0; - int byte_swapped = 0; - - union { - char c[2]; - u_short s; - } s_util; - union { - u_short s[2]; - long l; - } l_util; - - for (;m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - w = mtod(m, u_short *); - if (mlen == -1) { - /* - * The first byte of this mbuf is the continuation - * of a word spanning between this mbuf and the - * last mbuf. - * - * s_util.c[0] is already saved when scanning previous - * mbuf. - */ - s_util.c[1] = *(char *)w; - sum += s_util.s; - w = (u_short *)((char *)w + 1); - mlen = m->m_len - 1; - len--; - } else - mlen = m->m_len; - if (len < mlen) - mlen = len; - len -= mlen; - /* - * Force to even boundary. - */ - if ((1 & (uintptr_t) w) && (mlen > 0)) { - REDUCE; - sum <<= 8; - s_util.c[0] = *(u_char *)w; - w = (u_short *)((char *)w + 1); - mlen--; - byte_swapped = 1; - } - /* - * Unroll the loop to make overhead from - * branches &c small. - */ - while ((mlen -= 32) >= 0) { - sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; - sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7]; - sum += w[8]; sum += w[9]; sum += w[10]; sum += w[11]; - sum += w[12]; sum += w[13]; sum += w[14]; sum += w[15]; - w += 16; - } - mlen += 32; - while ((mlen -= 8) >= 0) { - sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; - w += 4; - } - mlen += 8; - if (mlen == 0 && byte_swapped == 0) - continue; - REDUCE; - while ((mlen -= 2) >= 0) { - sum += *w++; - } - if (byte_swapped) { - REDUCE; - sum <<= 8; - byte_swapped = 0; - if (mlen == -1) { - s_util.c[1] = *(char *)w; - sum += s_util.s; - mlen = 0; - } else - mlen = -1; - } else if (mlen == -1) - s_util.c[0] = *(char *)w; - } - if (len) - printf("cksum: out of data\n"); - if (mlen == -1) { - /* The last mbuf has odd # of bytes. Follow the - standard (the odd byte may be shifted left by 8 bits - or not as determined by endian-ness of the machine) */ - s_util.c[1] = 0; - sum += s_util.s; - } - REDUCE; - return (~sum & 0xffff); -} From nobody Wed Nov 24 18:39:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 564D2189DF67; Wed, 24 Nov 2021 18:39: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 4HzqYN5Btsz3qcf; Wed, 24 Nov 2021 18:39:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86F686E99; Wed, 24 Nov 2021 18:39: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 1AOIda5Q095089; Wed, 24 Nov 2021 18:39:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIdaY5095088; Wed, 24 Nov 2021 18:39:36 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:39:36 GMT Message-Id: <202111241839.1AOIdaY5095088@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: ecbbe831445a - main - netinet: Deduplicate most in_cksum() implementations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ecbbe831445a4b94279e5932828d60076e4ca444 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637779176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MXIiSzmuUJ5q/mE9HA5iQlxKGNnBNYRMNM9/amHTMcA=; b=fWWCGsrOafsW8Psf7iRZIaICl61IeRr/rIGGhcODLvu/I89FR1konxQQSBR5NEu71xdZB+ RErYaW6U6v+uxxpdoZRMBAG9DnlvqutaAsFxAJLP02MHS5lAfxV97nTZv2lPorlcpxD5sj 76mioNuCRHEUzt/wTB1GZceoeeYNpj18OmAPJO4isAN4nyfv2NAeMMPPsSbsw6HcTKEPHU 3XReijCwPeRiUhHUj7RsXwJwDT2Tzi7/uWV8tDkbdrKuordIyWnikRDlRv7eqdK0aCcFI1 imqLsynT5BsiOLRswqzWsVO2J/vZVo8YzKXtbSZsBYnmZFryQ9dlo9S5bi+2Qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637779176; a=rsa-sha256; cv=none; b=L1p1Kf8i+om6YaQ78/mRGM0Tw12gGi0AKByERtdnsvq2yXqUWhhsaQuA2qT3bEvzrsjN3R uxJGigTqUjmOD1WtACNdrjD7hjL8Y59WP4fUFbyOmq9DIJy1fdWIn0Yt6lgQgAhenq2oBI qR11VfEal4zzlqmNL2pr+PfykYH5HLF1mIfBfYDlaiY29ZRoibrTZLmPEJMxYb4KtYnP4l 3UNcqj0AHvN9Z3Fu2dWdgX5/6NrhAFj5/aXRf+eAWdieaDDsheaZDfZ+W+1bqgH4SkcJ0U pxHmeno+zu0IiRCh8r/Qdgm2dhhr6DorktkG8fc3npQIVhC0gS0OV5ekyKCYYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ecbbe831445a4b94279e5932828d60076e4ca444 commit ecbbe831445a4b94279e5932828d60076e4ca444 Author: Mark Johnston AuthorDate: 2021-11-24 18:19:44 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 18:31:16 +0000 netinet: Deduplicate most in_cksum() implementations in_cksum() and related routines are implemented separately for each platform, but only i386 and arm have optimized versions. Other platforms' copies of in_cksum.c are identical except for style differences and support for big-endian CPUs. Deduplicate the implementations for the rest of the platforms. This will make it easier to implement in_cksum() for unmapped mbufs. On arm and i386, define HAVE_MD_IN_CKSUM to mean that the MI implementation is not to be compiled. No functional change intended. Reviewed by: kp, glebius MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33095 --- sys/amd64/amd64/in_cksum.c | 243 ---------------------- sys/arm/arm/{in_cksum.c => in_cksum_machdep.c} | 0 sys/arm/include/in_cksum.h | 3 + sys/arm64/arm64/in_cksum.c | 241 --------------------- sys/conf/files | 1 + sys/conf/files.amd64 | 1 - sys/conf/files.arm | 2 +- sys/conf/files.arm64 | 1 - sys/conf/files.i386 | 2 +- sys/conf/files.mips | 1 - sys/conf/files.powerpc | 1 - sys/conf/files.riscv | 1 - sys/i386/i386/{in_cksum.c => in_cksum_machdep.c} | 0 sys/i386/include/in_cksum.h | 3 + sys/{mips/mips => netinet}/in_cksum.c | 7 + sys/powerpc/powerpc/in_cksum.c | 253 ----------------------- sys/riscv/riscv/in_cksum.c | 243 ---------------------- 17 files changed, 16 insertions(+), 987 deletions(-) diff --git a/sys/amd64/amd64/in_cksum.c b/sys/amd64/amd64/in_cksum.c deleted file mode 100644 index 30e90f043cc3..000000000000 --- a/sys/amd64/amd64/in_cksum.c +++ /dev/null @@ -1,243 +0,0 @@ -/* $NetBSD: in_cksum.c,v 1.7 1997/09/02 13:18:15 thorpej Exp $ */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 1988, 1992, 1993 - * The Regents of the University of California. All rights reserved. - * Copyright (c) 1996 - * Matt Thomas - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93 - */ - -#include /* RCS ID & Copyright macro defns */ -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include - -/* - * Checksum routine for Internet Protocol family headers - * (Portable Alpha version). - * - * This routine is very heavily used in the network - * code and should be modified for each CPU to be as fast as possible. - */ - -#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x) -#define REDUCE32 \ - { \ - q_util.q = sum; \ - sum = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - } -#define REDUCE16 \ - { \ - q_util.q = sum; \ - l_util.l = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - sum = l_util.s[0] + l_util.s[1]; \ - ADDCARRY(sum); \ - } - -static const u_int32_t in_masks[] = { - /*0 bytes*/ /*1 byte*/ /*2 bytes*/ /*3 bytes*/ - 0x00000000, 0x000000FF, 0x0000FFFF, 0x00FFFFFF, /* offset 0 */ - 0x00000000, 0x0000FF00, 0x00FFFF00, 0xFFFFFF00, /* offset 1 */ - 0x00000000, 0x00FF0000, 0xFFFF0000, 0xFFFF0000, /* offset 2 */ - 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, /* offset 3 */ -}; - -union l_util { - u_int16_t s[2]; - u_int32_t l; -}; -union q_util { - u_int16_t s[4]; - u_int32_t l[2]; - u_int64_t q; -}; - -static u_int64_t -in_cksumdata(const void *buf, int len) -{ - const u_int32_t *lw = (const u_int32_t *) buf; - u_int64_t sum = 0; - u_int64_t prefilled; - int offset; - union q_util q_util; - - if ((3 & (long) lw) == 0 && len == 20) { - sum = (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3] + lw[4]; - REDUCE32; - return sum; - } - - if ((offset = 3 & (long) lw) != 0) { - const u_int32_t *masks = in_masks + (offset << 2); - lw = (u_int32_t *) (((long) lw) - offset); - sum = *lw++ & masks[len >= 3 ? 3 : len]; - len -= 4 - offset; - if (len <= 0) { - REDUCE32; - return sum; - } - } -#if 0 - /* - * Force to cache line boundary. - */ - offset = 32 - (0x1f & (long) lw); - if (offset < 32 && len > offset) { - len -= offset; - if (4 & offset) { - sum += (u_int64_t) lw[0]; - lw += 1; - } - if (8 & offset) { - sum += (u_int64_t) lw[0] + lw[1]; - lw += 2; - } - if (16 & offset) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - } -#endif - /* - * access prefilling to start load of next cache line. - * then add current cache line - * save result of prefilling for loop iteration. - */ - prefilled = lw[0]; - while ((len -= 32) >= 4) { - u_int64_t prefilling = lw[8]; - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - prefilled = prefilling; - } - if (len >= 0) { - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - } else { - len += 32; - } - while ((len -= 16) >= 0) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - len += 16; - while ((len -= 4) >= 0) { - sum += (u_int64_t) *lw++; - } - len += 4; - if (len > 0) - sum += (u_int64_t) (in_masks[len] & *lw); - REDUCE32; - return sum; -} - -u_short -in_addword(u_short a, u_short b) -{ - u_int64_t sum = a + b; - - ADDCARRY(sum); - return (sum); -} - -u_short -in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c) -{ - u_int64_t sum; - union q_util q_util; - union l_util l_util; - - sum = (u_int64_t) a + b + c; - REDUCE16; - return (sum); -} - -u_short -in_cksum_skip(struct mbuf *m, int len, int skip) -{ - u_int64_t sum = 0; - int mlen = 0; - int clen = 0; - caddr_t addr; - union q_util q_util; - union l_util l_util; - - len -= skip; - for (; skip && m; m = m->m_next) { - if (m->m_len > skip) { - mlen = m->m_len - skip; - addr = mtod(m, caddr_t) + skip; - goto skip_start; - } else { - skip -= m->m_len; - } - } - - for (; m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - mlen = m->m_len; - addr = mtod(m, caddr_t); -skip_start: - if (len < mlen) - mlen = len; - if ((clen ^ (long) addr) & 1) - sum += in_cksumdata(addr, mlen) << 8; - else - sum += in_cksumdata(addr, mlen); - - clen += mlen; - len -= mlen; - } - REDUCE16; - return (~sum & 0xffff); -} - -u_int in_cksum_hdr(const struct ip *ip) -{ - u_int64_t sum = in_cksumdata(ip, sizeof(struct ip)); - union q_util q_util; - union l_util l_util; - REDUCE16; - return (~sum & 0xffff); -} diff --git a/sys/arm/arm/in_cksum.c b/sys/arm/arm/in_cksum_machdep.c similarity index 100% rename from sys/arm/arm/in_cksum.c rename to sys/arm/arm/in_cksum_machdep.c diff --git a/sys/arm/include/in_cksum.h b/sys/arm/include/in_cksum.h index a75433830d73..352d46f07e7b 100644 --- a/sys/arm/include/in_cksum.h +++ b/sys/arm/include/in_cksum.h @@ -40,6 +40,9 @@ #include #ifdef _KERNEL + +#define HAVE_MD_IN_CKSUM + u_short in_cksum(struct mbuf *m, int len); u_short in_addword(u_short sum, u_short b); u_short in_cksum_skip(struct mbuf *m, int len, int skip); diff --git a/sys/arm64/arm64/in_cksum.c b/sys/arm64/arm64/in_cksum.c deleted file mode 100644 index ae02e91d9203..000000000000 --- a/sys/arm64/arm64/in_cksum.c +++ /dev/null @@ -1,241 +0,0 @@ -/* $NetBSD: in_cksum.c,v 1.7 1997/09/02 13:18:15 thorpej Exp $ */ - -/*- - * Copyright (c) 1988, 1992, 1993 - * The Regents of the University of California. All rights reserved. - * Copyright (c) 1996 - * Matt Thomas - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93 - */ - -#include /* RCS ID & Copyright macro defns */ -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include - -/* - * Checksum routine for Internet Protocol family headers - * (Portable Alpha version). - * - * This routine is very heavily used in the network - * code and should be modified for each CPU to be as fast as possible. - */ - -#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x) -#define REDUCE32 \ - { \ - q_util.q = sum; \ - sum = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - } -#define REDUCE16 \ - { \ - q_util.q = sum; \ - l_util.l = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - sum = l_util.s[0] + l_util.s[1]; \ - ADDCARRY(sum); \ - } - -static const u_int32_t in_masks[] = { - /*0 bytes*/ /*1 byte*/ /*2 bytes*/ /*3 bytes*/ - 0x00000000, 0x000000FF, 0x0000FFFF, 0x00FFFFFF, /* offset 0 */ - 0x00000000, 0x0000FF00, 0x00FFFF00, 0xFFFFFF00, /* offset 1 */ - 0x00000000, 0x00FF0000, 0xFFFF0000, 0xFFFF0000, /* offset 2 */ - 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, /* offset 3 */ -}; - -union l_util { - u_int16_t s[2]; - u_int32_t l; -}; -union q_util { - u_int16_t s[4]; - u_int32_t l[2]; - u_int64_t q; -}; - -static u_int64_t -in_cksumdata(const void *buf, int len) -{ - const u_int32_t *lw = (const u_int32_t *) buf; - u_int64_t sum = 0; - u_int64_t prefilled; - int offset; - union q_util q_util; - - if ((3 & (long) lw) == 0 && len == 20) { - sum = (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3] + lw[4]; - REDUCE32; - return sum; - } - - if ((offset = 3 & (long) lw) != 0) { - const u_int32_t *masks = in_masks + (offset << 2); - lw = (u_int32_t *) (((long) lw) - offset); - sum = *lw++ & masks[len >= 3 ? 3 : len]; - len -= 4 - offset; - if (len <= 0) { - REDUCE32; - return sum; - } - } -#if 0 - /* - * Force to cache line boundary. - */ - offset = 32 - (0x1f & (long) lw); - if (offset < 32 && len > offset) { - len -= offset; - if (4 & offset) { - sum += (u_int64_t) lw[0]; - lw += 1; - } - if (8 & offset) { - sum += (u_int64_t) lw[0] + lw[1]; - lw += 2; - } - if (16 & offset) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - } -#endif - /* - * access prefilling to start load of next cache line. - * then add current cache line - * save result of prefilling for loop iteration. - */ - prefilled = lw[0]; - while ((len -= 32) >= 4) { - u_int64_t prefilling = lw[8]; - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - prefilled = prefilling; - } - if (len >= 0) { - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - } else { - len += 32; - } - while ((len -= 16) >= 0) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - len += 16; - while ((len -= 4) >= 0) { - sum += (u_int64_t) *lw++; - } - len += 4; - if (len > 0) - sum += (u_int64_t) (in_masks[len] & *lw); - REDUCE32; - return sum; -} - -u_short -in_addword(u_short a, u_short b) -{ - u_int64_t sum = a + b; - - ADDCARRY(sum); - return (sum); -} - -u_short -in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c) -{ - u_int64_t sum; - union q_util q_util; - union l_util l_util; - - sum = (u_int64_t) a + b + c; - REDUCE16; - return (sum); -} - -u_short -in_cksum_skip(struct mbuf *m, int len, int skip) -{ - u_int64_t sum = 0; - int mlen = 0; - int clen = 0; - caddr_t addr; - union q_util q_util; - union l_util l_util; - - len -= skip; - for (; skip && m; m = m->m_next) { - if (m->m_len > skip) { - mlen = m->m_len - skip; - addr = mtod(m, caddr_t) + skip; - goto skip_start; - } else { - skip -= m->m_len; - } - } - - for (; m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - mlen = m->m_len; - addr = mtod(m, caddr_t); -skip_start: - if (len < mlen) - mlen = len; - if ((clen ^ (long) addr) & 1) - sum += in_cksumdata(addr, mlen) << 8; - else - sum += in_cksumdata(addr, mlen); - - clen += mlen; - len -= mlen; - } - REDUCE16; - return (~sum & 0xffff); -} - -u_int in_cksum_hdr(const struct ip *ip) -{ - u_int64_t sum = in_cksumdata(ip, sizeof(struct ip)); - union q_util q_util; - union l_util l_util; - REDUCE16; - return (~sum & 0xffff); -} diff --git a/sys/conf/files b/sys/conf/files index f25508f1fded..8936cdaf5bd3 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4333,6 +4333,7 @@ netinet/accf_http.c optional accept_filter_http inet netinet/if_ether.c optional inet ether netinet/igmp.c optional inet netinet/in.c optional inet +netinet/in_cksum.c optional inet | inet6 netinet/in_debug.c optional inet ddb netinet/in_kdtrace.c optional inet | inet6 netinet/ip_carp.c optional inet carp | inet6 carp diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 6b51c1a5a55d..9a741906c868 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -62,7 +62,6 @@ amd64/amd64/exception.S standard amd64/amd64/exec_machdep.c standard amd64/amd64/fpu.c standard amd64/amd64/gdb_machdep.c optional gdb -amd64/amd64/in_cksum.c optional inet | inet6 amd64/amd64/initcpu.c standard amd64/amd64/io.c optional io amd64/amd64/locore.S standard no-obj diff --git a/sys/conf/files.arm b/sys/conf/files.arm index ce9c4933a024..4a5e9cc0bac9 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -35,8 +35,8 @@ arm/arm/gic.c optional gic arm/arm/gic_fdt.c optional gic fdt arm/arm/gic_if.m optional gic arm/arm/identcpu-v6.c standard -arm/arm/in_cksum.c optional inet | inet6 arm/arm/in_cksum_arm.S optional inet | inet6 +arm/arm/in_cksum_machdep.c optional inet | inet6 kern/subr_intr.c standard arm/arm/locore.S standard no-obj arm/arm/hypervisor-stub.S standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 2b7c8bc569c7..722a33da812d 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -56,7 +56,6 @@ arm64/arm64/gic_v3.c standard arm64/arm64/gic_v3_acpi.c optional acpi arm64/arm64/gic_v3_fdt.c optional fdt arm64/arm64/identcpu.c standard -arm64/arm64/in_cksum.c optional inet | inet6 arm64/arm64/locore.S standard no-obj arm64/arm64/machdep.c standard arm64/arm64/machdep_boot.c standard diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 0c681d6a84a0..bca5f04aeb1d 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -108,7 +108,7 @@ i386/i386/elf_machdep.c standard i386/i386/exception.s standard i386/i386/gdb_machdep.c optional gdb i386/i386/geode.c optional cpu_geode -i386/i386/in_cksum.c optional inet | inet6 +i386/i386/in_cksum_machdep.c optional inet | inet6 i386/i386/initcpu.c standard i386/i386/io.c optional io i386/i386/k6_mem.c optional mem diff --git a/sys/conf/files.mips b/sys/conf/files.mips index 6211c90f4e7e..777d4af57c06 100644 --- a/sys/conf/files.mips +++ b/sys/conf/files.mips @@ -20,7 +20,6 @@ mips/mips/exception.S standard mips/mips/fp.S standard mips/mips/freebsd32_machdep.c optional compat_freebsd32 mips/mips/gdb_machdep.c standard -mips/mips/in_cksum.c optional inet mips/mips/libkern_machdep.c standard mips/mips/locore.S standard no-obj mips/mips/machdep.c standard diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 5d10740ce41d..25fdfea388b9 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -254,7 +254,6 @@ powerpc/powerpc/elf64_machdep.c optional powerpc64 | powerpc64le powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c standard powerpc/powerpc/gdb_machdep.c optional gdb -powerpc/powerpc/in_cksum.c optional inet | inet6 powerpc/powerpc/interrupt.c standard powerpc/powerpc/intr_machdep.c standard powerpc/powerpc/iommu_if.m standard diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv index 72939b42d67d..e343b9b7f9b3 100644 --- a/sys/conf/files.riscv +++ b/sys/conf/files.riscv @@ -47,7 +47,6 @@ riscv/riscv/elf_machdep.c standard riscv/riscv/exception.S standard riscv/riscv/exec_machdep.c standard riscv/riscv/intr_machdep.c standard -riscv/riscv/in_cksum.c optional inet | inet6 riscv/riscv/identcpu.c standard riscv/riscv/locore.S standard no-obj riscv/riscv/machdep.c standard diff --git a/sys/i386/i386/in_cksum.c b/sys/i386/i386/in_cksum_machdep.c similarity index 100% rename from sys/i386/i386/in_cksum.c rename to sys/i386/i386/in_cksum_machdep.c diff --git a/sys/i386/include/in_cksum.h b/sys/i386/include/in_cksum.h index a8214e97cd9a..6b9c62942561 100644 --- a/sys/i386/include/in_cksum.h +++ b/sys/i386/include/in_cksum.h @@ -118,6 +118,9 @@ in_pseudo(u_int sum, u_int b, u_int c) #endif #ifdef _KERNEL + +#define HAVE_MD_IN_CKSUM + #if !defined(__GNUCLIKE_ASM) #if defined(IPVERSION) && (IPVERSION == 4) u_int in_cksum_hdr(const struct ip *ip); diff --git a/sys/mips/mips/in_cksum.c b/sys/netinet/in_cksum.c similarity index 98% rename from sys/mips/mips/in_cksum.c rename to sys/netinet/in_cksum.c index 8f9a2d9de106..581950c8afa4 100644 --- a/sys/mips/mips/in_cksum.c +++ b/sys/netinet/in_cksum.c @@ -48,6 +48,11 @@ __FBSDID("$FreeBSD$"); #include #include +/* + * These implementations may be overridden on a per-platform basis. + */ +#ifndef HAVE_MD_IN_CKSUM + /* * Checksum routine for Internet Protocol family headers * (Portable Alpha version). @@ -248,3 +253,5 @@ u_int in_cksum_hdr(const struct ip *ip) REDUCE16; return (~sum & 0xffff); } + +#endif /* !HAVE_MD_IN_CKSUM */ diff --git a/sys/powerpc/powerpc/in_cksum.c b/sys/powerpc/powerpc/in_cksum.c deleted file mode 100644 index 906dc7e8d9a3..000000000000 --- a/sys/powerpc/powerpc/in_cksum.c +++ /dev/null @@ -1,253 +0,0 @@ -/* $FreeBSD$ */ -/* $NetBSD: in_cksum.c,v 1.7 1997/09/02 13:18:15 thorpej Exp $ */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 1988, 1992, 1993 - * The Regents of the University of California. All rights reserved. - * Copyright (c) 1996 - * Matt Thomas - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93 - */ - -#include /* RCS ID & Copyright macro defns */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Checksum routine for Internet Protocol family headers - * (Portable Alpha version). - * - * This routine is very heavily used in the network - * code and should be modified for each CPU to be as fast as possible. - */ - -#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x) -#define REDUCE32 \ - { \ - q_util.q = sum; \ - sum = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - } -#define REDUCE16 \ - { \ - q_util.q = sum; \ - l_util.l = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - sum = l_util.s[0] + l_util.s[1]; \ - ADDCARRY(sum); \ - } - -static const u_int32_t in_masks[] = { -#if _BYTE_ORDER == _LITTLE_ENDIAN - /*0 bytes*/ /*1 byte*/ /*2 bytes*/ /*3 bytes*/ - 0x00000000, 0x000000FF, 0x0000FFFF, 0x00FFFFFF, /* offset 0 */ - 0x00000000, 0x0000FF00, 0x00FFFF00, 0xFFFFFF00, /* offset 1 */ - 0x00000000, 0x00FF0000, 0xFFFF0000, 0xFFFF0000, /* offset 2 */ - 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, /* offset 3 */ -#else - /*0 bytes*/ /*1 byte*/ /*2 bytes*/ /*3 bytes*/ - 0x00000000, 0xFF000000, 0xFFFF0000, 0xFFFFFF00, /* offset 0 */ - 0x00000000, 0x00FF0000, 0x00FFFF00, 0x00FFFFFF, /* offset 1 */ - 0x00000000, 0x0000FF00, 0x0000FFFF, 0x0000FFFF, /* offset 2 */ - 0x00000000, 0x000000FF, 0x000000FF, 0x000000FF, /* offset 3 */ -#endif -}; - -union l_util { - u_int16_t s[2]; - u_int32_t l; -}; -union q_util { - u_int16_t s[4]; - u_int32_t l[2]; - u_int64_t q; -}; - -static u_int64_t -in_cksumdata(const void *buf, int len) -{ - const u_int32_t *lw = (const u_int32_t *) buf; - u_int64_t sum = 0; - u_int64_t prefilled; - int offset; - union q_util q_util; - - if ((3 & (long) lw) == 0 && len == 20) { - sum = (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3] + lw[4]; - REDUCE32; - return sum; - } - - if ((offset = 3 & (long) lw) != 0) { - const u_int32_t *masks = in_masks + (offset << 2); - lw = (u_int32_t *) (((long) lw) - offset); - sum = *lw++ & masks[len >= 3 ? 3 : len]; - len -= 4 - offset; - if (len <= 0) { - REDUCE32; - return sum; - } - } -#if 0 - /* - * Force to cache line boundary. - */ - offset = 32 - (0x1f & (long) lw); - if (offset < 32 && len > offset) { - len -= offset; - if (4 & offset) { - sum += (u_int64_t) lw[0]; - lw += 1; - } - if (8 & offset) { - sum += (u_int64_t) lw[0] + lw[1]; - lw += 2; - } - if (16 & offset) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - } -#endif - /* - * access prefilling to start load of next cache line. - * then add current cache line - * save result of prefilling for loop iteration. - */ - prefilled = lw[0]; - while ((len -= 32) >= 4) { - u_int64_t prefilling = lw[8]; - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - prefilled = prefilling; - } - if (len >= 0) { - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - } else { - len += 32; - } - while ((len -= 16) >= 0) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - len += 16; - while ((len -= 4) >= 0) { - sum += (u_int64_t) *lw++; - } - len += 4; - if (len > 0) - sum += (u_int64_t) (in_masks[len] & *lw); - REDUCE32; - return sum; -} - -u_short -in_addword(u_short a, u_short b) -{ - u_int64_t sum = a + b; - - ADDCARRY(sum); - return (sum); -} - -u_short -in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c) -{ - u_int64_t sum; - union q_util q_util; - union l_util l_util; - - sum = (u_int64_t) a + b + c; - REDUCE16; - return (sum); -} - -u_short -in_cksum_skip(struct mbuf *m, int len, int skip) -{ - u_int64_t sum = 0; - int mlen = 0; - int clen = 0; - caddr_t addr; - union q_util q_util; - union l_util l_util; - - len -= skip; - for (; skip && m; m = m->m_next) { - if (m->m_len > skip) { - mlen = m->m_len - skip; - addr = mtod(m, caddr_t) + skip; - goto skip_start; - } else { - skip -= m->m_len; - } - } - - for (; m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - mlen = m->m_len; - addr = mtod(m, caddr_t); -skip_start: - if (len < mlen) - mlen = len; - - if ((clen ^ (long) addr) & 1) - sum += in_cksumdata(addr, mlen) << 8; - else - sum += in_cksumdata(addr, mlen); - - clen += mlen; - len -= mlen; - } - REDUCE16; - return (~sum & 0xffff); -} - -u_int in_cksum_hdr(const struct ip *ip) -{ - u_int64_t sum = in_cksumdata(ip, sizeof(struct ip)); - union q_util q_util; - union l_util l_util; - REDUCE16; - return (~sum & 0xffff); -} diff --git a/sys/riscv/riscv/in_cksum.c b/sys/riscv/riscv/in_cksum.c deleted file mode 100644 index 30e90f043cc3..000000000000 --- a/sys/riscv/riscv/in_cksum.c +++ /dev/null @@ -1,243 +0,0 @@ -/* $NetBSD: in_cksum.c,v 1.7 1997/09/02 13:18:15 thorpej Exp $ */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 1988, 1992, 1993 - * The Regents of the University of California. All rights reserved. - * Copyright (c) 1996 - * Matt Thomas - * - * 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. *** 225 LINES SKIPPED *** From nobody Wed Nov 24 18:39:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 44592189E1AA; Wed, 24 Nov 2021 18:39: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 4HzqYQ1b3Pz3qj6; Wed, 24 Nov 2021 18:39:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A906D6F8A; Wed, 24 Nov 2021 18:39: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 1AOIdbYQ095113; Wed, 24 Nov 2021 18:39:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIdbg5095112; Wed, 24 Nov 2021 18:39:37 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:39:37 GMT Message-Id: <202111241839.1AOIdbg5095112@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: 0d9c3423f59b - main - netinet: Implement in_cksum_skip() using m_apply() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0d9c3423f59bb305301f5a5bc7c8f5daf7b7aa52 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637779178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K6t9UPt3epYm3iTwkuQGWkf2HHR3nwyBZ7bq8iAijtA=; b=JVcoA2H7sjK2wdXK71Sc6byYeo8JlOJ8kAYSx+G6ahzUYy8AWxOtKaML/Hy8KZmE/Ts/wy kmRGswzyh8xWSmmEoO2W+qw661bdwLTsRBptWofBJhw2/6X7TJB+Ic1kf78REnEHr/9qzL 8HjncC/pMgItoZgv1dK7S6ybU2xWZmjXs6bHolnS540taGGeDlAxNUOOSI/AkMIMqXMSEt +pJypIWt4lQWDkimlvQNsFWQfWNfwIeJzqEXCjShWGzEAoQwRUNFCl9NF5wRDHW4+1uFpR efKCzOB4xjAwm4ZwdVAFfLB9XO6hsX8JGACHM96PTKxlCukyobfZ4hMQ5zxlCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637779178; a=rsa-sha256; cv=none; b=bH/BXWUSEXSmWiclyMijhQLdmAPdk1DbDCiqPJa9qTvG4kUbtTlFfgCTrD6N5+94SJyAoY +gVddOyN1ZJqJSeDglD44qFIcCXbt+B61JaQKJkHRIVnwG6bffxwRB2swNrd/vx5cTjwvJ yYihJNxziQvuA+yhNpYLUT8IPQ4IT0EBWAx0B/7c62OprBqWPSA8p/xbcXZGbzlpWGgOIP QlOvCaGccUBbiTIY+ioWg8nk2LCV6zCIPPOQxEzG9s5w9vB52NOi0E5gscWvTOzbTJdrk3 ZTfF4fmdwjVZ3XeZNa7UtcdlaWDmsl3b2o8qFSV2RZbXBzQa7ob8qqbwsbE0Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0d9c3423f59bb305301f5a5bc7c8f5daf7b7aa52 commit 0d9c3423f59bb305301f5a5bc7c8f5daf7b7aa52 Author: Mark Johnston AuthorDate: 2021-11-24 18:19:54 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 18:31:16 +0000 netinet: Implement in_cksum_skip() using m_apply() This allows it to work with unmapped mbufs. In particular, in_cksum_skip() calls no longer need to be preceded by calls to mb_unmapped_to_ext() to avoid a page fault. PR: 259645 Reviewed by: gallatin, glebius, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33096 --- sys/netinet/in_cksum.c | 63 +++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/sys/netinet/in_cksum.c b/sys/netinet/in_cksum.c index 581950c8afa4..98317d4dac4a 100644 --- a/sys/netinet/in_cksum.c +++ b/sys/netinet/in_cksum.c @@ -49,7 +49,9 @@ __FBSDID("$FreeBSD$"); #include /* - * These implementations may be overridden on a per-platform basis. + * These implementations may be overridden on a per-platform basis. On + * platforms with a direct map, the implementation of in_cksum() must handle + * unmapped mbufs. */ #ifndef HAVE_MD_IN_CKSUM @@ -203,44 +205,43 @@ in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c) return (sum); } +struct cksum_skip_partial_args { + uint64_t csum; + int clen; +}; + +static int +in_cksum_skip_partial(void *arg, void *data, u_int len) +{ + struct cksum_skip_partial_args *a; + + a = arg; + if (((uintptr_t)data ^ a->clen) & 1) + a->csum += in_cksumdata(data, len) << 8; + else + a->csum += in_cksumdata(data, len); + a->clen += len; + return (0); +} + u_short in_cksum_skip(struct mbuf *m, int len, int skip) { - u_int64_t sum = 0; - int mlen = 0; - int clen = 0; - caddr_t addr; + struct cksum_skip_partial_args a; union q_util q_util; union l_util l_util; + uint64_t sum; len -= skip; - for (; skip && m; m = m->m_next) { - if (m->m_len > skip) { - mlen = m->m_len - skip; - addr = mtod(m, caddr_t) + skip; - goto skip_start; - } else { - skip -= m->m_len; - } - } - - for (; m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - mlen = m->m_len; - addr = mtod(m, caddr_t); -skip_start: - if (len < mlen) - mlen = len; - - if ((clen ^ (uintptr_t) addr) & 1) - sum += in_cksumdata(addr, mlen) << 8; - else - sum += in_cksumdata(addr, mlen); - clen += mlen; - len -= mlen; - } + /* + * The use of m_apply() allows this routine to operate on unmapped + * mbufs. + */ + a.csum = 0; + a.clen = 0; + (void)m_apply(m, skip, len, in_cksum_skip_partial, &a); + sum = a.csum; REDUCE16; return (~sum & 0xffff); } From nobody Wed Nov 24 18:39:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D54BB189E310; Wed, 24 Nov 2021 18:39: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 4HzqYR1Fycz3qpK; Wed, 24 Nov 2021 18:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFEA26F8B; Wed, 24 Nov 2021 18:39: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 1AOIdcap095137; Wed, 24 Nov 2021 18:39:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIdcA3095136; Wed, 24 Nov 2021 18:39:38 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:39:38 GMT Message-Id: <202111241839.1AOIdcA3095136@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: 44775b163bfa - main - netinet: Remove unneeded mb_unmapped_to_ext() calls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 44775b163bfa902ea96658343e852062e2e67a8e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637779179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qXfoCu9+GE/0vKm8LOa485bFWLdgNqx5qyiTQTivMac=; b=tP3PVi8cGElIDK9MH7v7Ozc8Gt/BLHaAcFsgTYmd1UEP5i32y5f2ltnCOHZkZzlYk/gpDp +qxk3bTtEN0setGn2ZuU6r5QoRaEYND05CYpt0u1pvesMW0c77kWh6HoIbZ7i1SREKiISR bgNXfYCxYKMlVMep8gkPZDhGt2DF2HK5cQT825/TI+7c6ynyCwesDQEAXUVF+eHhztb/Tq HqHn20z3ENkrdY35XQydDKJvLu1XyJtZ8Xnf6gNAUztSP7ixK2DYRRWdkf5hHHIxXii2/Q B+3josprTZPK4CKqhBCRGzRmVpzYt3U3+fGWATNIYeW9aVM1yfjH1hKK+YhC2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637779179; a=rsa-sha256; cv=none; b=xBuG8LhtYvXuGyLEXnm/sw2KRoEenJJoJHDn7C0CPGZMJ9Se188MhncVPXsGJuW9YVsK6E eDCXP8XBOFHif/VVmWVoGbhspwOX3oC8EZCfJAHdbtNov7gbPE2Oou9P5AP+63CXOjDmmR GKMh39JIRCZJlnULVX0F3QWBANUP+eeXNKPlud8/nuo6VMI4xAdOZq+W1zNepzMx46qiFR wmDcLhIeW+i70P0ddnq35L9ZGUMAkiaHw3XSmcUh7+kkCOp6q4PseYHewjTjArG038PfuG cfGIbU01RoeLyG3G1lXNfG9aXo2PKTQu63w8YG5UGWMGCQsIG+9ekQEXvoxhnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=44775b163bfa902ea96658343e852062e2e67a8e commit 44775b163bfa902ea96658343e852062e2e67a8e Author: Mark Johnston AuthorDate: 2021-11-24 18:20:09 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 18:31:16 +0000 netinet: Remove unneeded mb_unmapped_to_ext() calls in_cksum_skip() now handles unmapped mbufs on platforms where they're permitted. Reviewed by: glebius, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33097 --- sys/netinet/ip_divert.c | 6 ---- sys/netinet/ip_output.c | 21 ++++------- sys/netinet6/ip6_output.c | 62 ++++++++++++++------------------ sys/netipsec/ipsec_output.c | 12 ------- sys/netpfil/ipfw/nat64/nat64_translate.c | 10 ------ sys/netpfil/pf/pf.c | 6 ---- 6 files changed, 32 insertions(+), 85 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index fb4eba220703..265fc1918d82 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -212,9 +212,6 @@ divert_packet(struct mbuf *m, bool incoming) /* Delayed checksums are currently not compatible with divert. */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - m = mb_unmapped_to_ext(m); - if (m == NULL) - return; in_delayed_cksum(m); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } @@ -226,9 +223,6 @@ divert_packet(struct mbuf *m, bool incoming) #endif #ifdef INET6 if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) - return; in6_delayed_cksum(m, m->m_pkthdr.len - sizeof(struct ip6_hdr), sizeof(struct ip6_hdr)); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index cfa6b1919a06..e30339f8c4aa 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -733,23 +733,20 @@ sendit: } } - m->m_pkthdr.csum_flags |= CSUM_IP; - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { + /* Ensure the packet data is mapped if the interface requires it. */ + if ((ifp->if_capenable & IFCAP_MEXTPG) == 0) { m = mb_unmapped_to_ext(m); if (m == NULL) { IPSTAT_INC(ips_odropped); error = ENOBUFS; goto bad; } + } + + m->m_pkthdr.csum_flags |= CSUM_IP; + if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { in_delayed_cksum(m); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; - } else if ((ifp->if_capenable & IFCAP_MEXTPG) == 0) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSTAT_INC(ips_odropped); - error = ENOBUFS; - goto bad; - } } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { @@ -894,12 +891,6 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, * fragmented packets, then do it here. */ if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) { - error = ENOBUFS; - IPSTAT_INC(ips_odropped); - goto done; - } in_delayed_cksum(m0); m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index fedb6c6b6c78..6091951e2ba2 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -212,42 +212,26 @@ in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset) *(u_short *)mtodo(m, offset) = csum; } -static int +static void ip6_output_delayed_csum(struct mbuf *m, struct ifnet *ifp, int csum_flags, - int plen, int optlen, bool frag) + int plen, int optlen) { KASSERT((plen >= optlen), ("%s:%d: plen %d < optlen %d, m %p, ifp %p " - "csum_flags %#x frag %d\n", - __func__, __LINE__, plen, optlen, m, ifp, csum_flags, frag)); + "csum_flags %#x", + __func__, __LINE__, plen, optlen, m, ifp, csum_flags)); - if ((csum_flags & CSUM_DELAY_DATA_IPV6) || -#if defined(SCTP) || defined(SCTP_SUPPORT) - (csum_flags & CSUM_SCTP_IPV6) || -#endif - (!frag && (ifp->if_capenable & IFCAP_MEXTPG) == 0)) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - if (frag) - in6_ifstat_inc(ifp, ifs6_out_fragfail); - else - IP6STAT_INC(ip6s_odropped); - return (ENOBUFS); - } - if (csum_flags & CSUM_DELAY_DATA_IPV6) { - in6_delayed_cksum(m, plen - optlen, - sizeof(struct ip6_hdr) + optlen); - m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; - } + if (csum_flags & CSUM_DELAY_DATA_IPV6) { + in6_delayed_cksum(m, plen - optlen, + sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; + } #if defined(SCTP) || defined(SCTP_SUPPORT) - if (csum_flags & CSUM_SCTP_IPV6) { - sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); - m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; - } -#endif + if (csum_flags & CSUM_SCTP_IPV6) { + sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; } - - return (0); +#endif } int @@ -1104,6 +1088,16 @@ nonh6lookup: passout: if (vlan_pcp > -1) EVL_APPLY_PRI(m, vlan_pcp); + + /* Ensure the packet data is mapped if the interface requires it. */ + if ((ifp->if_capenable & IFCAP_MEXTPG) == 0) { + m = mb_unmapped_to_ext(m); + if (m == NULL) { + IP6STAT_INC(ip6s_odropped); + return (ENOBUFS); + } + } + /* * Send the packet to the outgoing interface. * If necessary, do IPv6 fragmentation before sending. @@ -1136,9 +1130,7 @@ passout: * XXX-BZ Need a framework to know when the NIC can handle it, even * with ext. hdrs. */ - error = ip6_output_delayed_csum(m, ifp, sw_csum, plen, optlen, false); - if (error != 0) - goto bad; + ip6_output_delayed_csum(m, ifp, sw_csum, plen, optlen); /* XXX-BZ m->m_pkthdr.csum_flags &= ~ifp->if_hwassist; */ tlen = m->m_pkthdr.len; @@ -1217,10 +1209,8 @@ passout: * fragmented packets, then do it here. * XXX-BZ handle the hw offloading case. Need flags. */ - error = ip6_output_delayed_csum(m, ifp, m->m_pkthdr.csum_flags, - plen, optlen, true); - if (error != 0) - goto bad; + ip6_output_delayed_csum(m, ifp, m->m_pkthdr.csum_flags, plen, + optlen); /* * Change the next header field of the last header in the diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index 0b171e9c4970..b0298f8145d4 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -398,12 +398,6 @@ ipsec4_common_output(struct mbuf *m, struct inpcb *inp, int forwarding) * this is done in the normal processing path. */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSECSTAT_INC(ips_out_nomem); - key_freesp(&sp); - return (ENOBUFS); - } in_delayed_cksum(m); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } @@ -773,12 +767,6 @@ ipsec6_common_output(struct mbuf *m, struct inpcb *inp, int forwarding) * this is done in the normal processing path. */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSEC6STAT_INC(ips_out_nomem); - key_freesp(&sp); - return (ENOBUFS); - } in6_delayed_cksum(m, m->m_pkthdr.len - sizeof(struct ip6_hdr), sizeof(struct ip6_hdr)); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; diff --git a/sys/netpfil/ipfw/nat64/nat64_translate.c b/sys/netpfil/ipfw/nat64/nat64_translate.c index aa6f47656d9d..fecc8ff334d2 100644 --- a/sys/netpfil/ipfw/nat64/nat64_translate.c +++ b/sys/netpfil/ipfw/nat64/nat64_translate.c @@ -1292,11 +1292,6 @@ nat64_do_handle_ip4(struct mbuf *m, struct in6_addr *saddr, /* Handle delayed checksums if needed. */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - NAT64STAT_INC(&cfg->stats, nomem); - return (NAT64RETURN); - } in_delayed_cksum(m); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } @@ -1674,11 +1669,6 @@ nat64_do_handle_ip6(struct mbuf *m, uint32_t aaddr, uint16_t aport, /* Handle delayed checksums if needed. */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - NAT64STAT_INC(&cfg->stats, nomem); - return (NAT64RETURN); - } in6_delayed_cksum(m, plen, hlen); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; } diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 837417d6a43d..d01ee906740f 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5989,9 +5989,6 @@ pf_route(struct mbuf **m, struct pf_krule *r, int dir, struct ifnet *oifp, /* Copied from FreeBSD 10.0-CURRENT ip_output. */ m0->m_pkthdr.csum_flags |= CSUM_IP; if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) - goto done; in_delayed_cksum(m0); m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } @@ -6178,9 +6175,6 @@ pf_route6(struct mbuf **m, struct pf_krule *r, int dir, struct ifnet *oifp, if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6 & ~ifp->if_hwassist) { uint32_t plen = m0->m_pkthdr.len - sizeof(*ip6); - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) - goto done; in6_delayed_cksum(m0, plen, sizeof(struct ip6_hdr)); m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; } From nobody Wed Nov 24 18:39:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 86D0B189E398; Wed, 24 Nov 2021 18:39: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 4HzqYS2D4Dz3qtX; Wed, 24 Nov 2021 18:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 005B67083; Wed, 24 Nov 2021 18:39: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 1AOIdd9Z095161; Wed, 24 Nov 2021 18:39:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIddN6095160; Wed, 24 Nov 2021 18:39:39 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:39:39 GMT Message-Id: <202111241839.1AOIddN6095160@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: 517373f72302 - main - natd: Remove uneeded in_cksum.h 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 517373f7230207e60e4561bc44c8b3c44acea963 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637779181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uy/3ezJuHDmmlvswtjYVE3lLDdED9V+KTtFbarV0xgc=; b=tTkf5plrQAdPiNEoVx8ot/8c3Q5y1xoC96kCWkQMyBFpo8TWP33MLmP59LLemHFLTw3bK5 n3U3P9sXUpTkpfwVU/nrelfcaa4nWMzeaxPob4et182u72gqh2orDxQH8R6kNfXKhd2byJ 4uFIQ5sSIoA5o/rpxb6AeVzq+DwaIobc16nUavO+VgZwPE4srvZF4iL39djQ2u2k6zuklF SUL7Q4K2I5HkxjmbXuGNFovSNdpIWCjMrmL3gVuXCh8O9ZymTEOb27RYAM31ZHCHPIgRSf grqjSb32xB7S5qxs3kf9u1qW+YTLQr8e8GWDd9N6ZQvlRUaFH3AkrzDfJgVDtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637779181; a=rsa-sha256; cv=none; b=AAHUpHA5kkshlbjjg05Raoa68uWHvT9iDxXBOgdWubOab5QCyzNQl8gUTduuLWV9OT9bwG gu3TeWJweuUntcg+GGkMYyD4oefvmVsMYDyMn7SxXWWVVqmxTLc3DrotvBg6zRpR1uSYem gl5IV7lZpl5YDs/gxlYQme+z0LQ1mUOPelU2v86xeqq57CgNsOG5/lwSwHx3cVCH2jrPxh sBzOXYHZ1Gdlpa8F57Q+9XAB1vaPe/JKAXVI7/f0qAIZNa72HoMG7oWbAbyvoQkQtygP8j SoglrJF8gjRAPyIXA9V2vwHMbF1JmgM/loPkALQPHyjIshZLffL8M51k5YD6Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=517373f7230207e60e4561bc44c8b3c44acea963 commit 517373f7230207e60e4561bc44c8b3c44acea963 Author: Mark Johnston AuthorDate: 2021-11-24 18:30:28 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 18:31:16 +0000 natd: Remove uneeded in_cksum.h includes MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sbin/natd/icmp.c | 1 - sbin/natd/natd.c | 1 - 2 files changed, 2 deletions(-) diff --git a/sbin/natd/icmp.c b/sbin/natd/icmp.c index 1509b965f4b8..f85457ac4773 100644 --- a/sbin/natd/icmp.c +++ b/sbin/natd/icmp.c @@ -30,7 +30,6 @@ #include #include #include -#include #include diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c index 268850c0a95a..402c430dfdfd 100644 --- a/sbin/natd/natd.c +++ b/sbin/natd/natd.c @@ -24,7 +24,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From nobody Wed Nov 24 18:39:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4884E189E429; Wed, 24 Nov 2021 18:39: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 4HzqYT63brz3qrL; Wed, 24 Nov 2021 18:39:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 186247084; Wed, 24 Nov 2021 18:39: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 1AOIdfdZ095185; Wed, 24 Nov 2021 18:39:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIdfuQ095184; Wed, 24 Nov 2021 18:39:41 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:39:41 GMT Message-Id: <202111241839.1AOIdfuQ095184@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: 60c95f316374 - main - safexcel: Fix -Wunused-but-set-variable warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 60c95f316374fdd383f70b50e98ad097460accf3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637779182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lZv8yYL/9xh7dY9PVnKJ0NmCEm+QGy/VNc8yJEa0rqM=; b=XQI1Fj+MtR2Iyn7IXmK/ia926M9/a744zMo6ykjB3c4WAhj6Q1OoexBmY1WihtOXdUGTAz x6uIq9aFa9uokwhtznHBnHmmSm28S7VoiWzMwCfsypUNawrO5pDcVcbFxXpNgh1sfKCX2S MUzObSlqbTJcm9jZ05FNsajVeAGwsh8kQWUlXfNnrw0rVnTRhqNJQIoQFIAC/+3i/mIXWR ocGPTlwbPdMMhrofcHQVVC6uAzWwvXLkUOBWpanO1gTyv2K5zFipQT3RI/obYDqBIRfMPy xlzDTACNt/Y3kZCHzx/0LX9FT0IiBsOJRVZ5jRTjyBbXfh/+sgwvBDo/n4VYHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637779182; a=rsa-sha256; cv=none; b=Zo3fskmOaxQg25IZ/7wYHtXzNVdj9UWTqRYlgj0fJfE4QVxrlmmd+P1UFLSWQSDOJoWIgD wL8Gir3zTmQvQbV1KS0FeQqt2ZF17ZmEEiZny0dXF/4J8fggqtOt0GSCL8HVElyjgqs0vL Ofg4MgWsAiV+FkzolSDkvZwiSIoOlVk1O24Dx30UgjywErCQBxzYSdBPVi0X8gZhfscz8t 32hFCHPeKakFirn3H+2ft9YgGJoDZBuCDj7tDbjrKBVIXdprGRH/+rJ9MXJLJzUDvkaecO +aY4v0npdfs3Cg7TNtleB76COZgVvoYZwQuf+m/Ix6Hsa9mKOUhJChtqM6dZ/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=60c95f316374fdd383f70b50e98ad097460accf3 commit 60c95f316374fdd383f70b50e98ad097460accf3 Author: Mark Johnston AuthorDate: 2021-11-24 18:30:39 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 18:31:16 +0000 safexcel: Fix -Wunused-but-set-variable warnings MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/dev/safexcel/safexcel.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/dev/safexcel/safexcel.c b/sys/dev/safexcel/safexcel.c index 36bd65642403..dc43b7dfc026 100644 --- a/sys/dev/safexcel/safexcel.c +++ b/sys/dev/safexcel/safexcel.c @@ -168,7 +168,7 @@ safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) struct safexcel_res_descr *rdesc; struct safexcel_request *req; struct safexcel_ring *ring; - uint32_t blocked, error, i, ncdescs, nrdescs, nreqs; + uint32_t blocked, error, i, nrdescs, nreqs; blocked = 0; ring = &sc->sc_ring[ringidx]; @@ -194,7 +194,7 @@ safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) bus_dmamap_sync(ring->dma_atok.tag, ring->dma_atok.map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - ncdescs = nrdescs = 0; + nrdescs = 0; for (i = 0; i < nreqs; i++) { req = safexcel_next_request(ring); @@ -203,7 +203,6 @@ safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) bus_dmamap_sync(ring->data_dtag, req->dmap, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - ncdescs += req->cdescs; while (req->cdescs-- > 0) { cdesc = safexcel_cmd_descr_next(&ring->cdr); KASSERT(cdesc != NULL, @@ -306,7 +305,6 @@ static int safexcel_configure(struct safexcel_softc *sc) { uint32_t i, mask, pemask, reg; - device_t dev; if (sc->sc_type == 197) { sc->sc_offsets = eip197_regs_offset; @@ -316,8 +314,6 @@ safexcel_configure(struct safexcel_softc *sc) pemask = EIP97_N_PES_MASK; } - dev = sc->sc_dev; - /* Scan for valid ring interrupt controllers. */ for (i = 0; i < SAFEXCEL_MAX_RING_AIC; i++) { reg = SAFEXCEL_READ(sc, SAFEXCEL_HIA_AIC_R(sc) + @@ -1625,12 +1621,10 @@ static void safexcel_instr_eta(struct safexcel_request *req, struct safexcel_instr *instr, struct safexcel_cmd_descr *cdesc) { - const struct crypto_session_params *csp; struct cryptop *crp; struct safexcel_instr *start; crp = req->crp; - csp = crypto_get_params(crp->crp_session); start = instr; /* Insert the AAD. */ @@ -2452,9 +2446,7 @@ safexcel_newsession(device_t dev, crypto_session_t cses, const struct crypto_session_params *csp) { struct safexcel_session *sess; - struct safexcel_softc *sc; - sc = device_get_softc(dev); sess = crypto_get_driver_session(cses); sess->cses = cses; @@ -2533,7 +2525,6 @@ safexcel_newsession(device_t dev, crypto_session_t cses, static int safexcel_process(device_t dev, struct cryptop *crp, int hint) { - const struct crypto_session_params *csp; struct safexcel_request *req; struct safexcel_ring *ring; struct safexcel_session *sess; @@ -2542,7 +2533,6 @@ safexcel_process(device_t dev, struct cryptop *crp, int hint) sc = device_get_softc(dev); sess = crypto_get_driver_session(crp->crp_session); - csp = crypto_get_params(crp->crp_session); if (__predict_false(crypto_buffer_len(&crp->crp_buf) > SAFEXCEL_MAX_REQUEST_SIZE)) { From nobody Wed Nov 24 18:43:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0477418A1622; Wed, 24 Nov 2021 18:43: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 4HzqdW3H0Qz3tYw; Wed, 24 Nov 2021 18:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08DCA7387; Wed, 24 Nov 2021 18:43: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 1AOIhA4C007936; Wed, 24 Nov 2021 18:43:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIhAhI007935; Wed, 24 Nov 2021 18:43:10 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:43:10 GMT Message-Id: <202111241843.1AOIhAhI007935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: d9ed1dcc5c68 - main - acpi: Fix error code returned in acpi_bus_get_prop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9ed1dcc5c6894e376e6e4ef6f2554dd056baf4e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637779391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JkKNz2vQO6AtMXzHUGUfnzLhwDRKJso0vB5DpLVHev8=; b=OWq1czzU+x6NrppjvLUbwHu0DdsPSJNf7Y3DkoA4GToNaiC8/SvO9DhMOKRk0hXq4uhxEu R/ZeVOZMojftt0X3hDyRWuz0I7gfVnbjjVOZgmkBeFKqDsAAkoGOh2Vw2ypUJuTJW2O1dT 9G/fbVwq/LUBhCvApvgd5A27LhvE3N7/PnG648qUnREFNLzFJflRLL2Qr5amgOOwupwDQY pl32rr/mpF5bxb1MJKI/i+tRboSxlj9GK+l3Vs02dLzQcx55AquyzzOUEbOWfNCy591M+U 8DoRgAUmG4ZE5XCYNZF56nT8wDwQ43CZKGxF3K6yQhhW8ARNiTPAHO3ltabJ9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637779391; a=rsa-sha256; cv=none; b=golwDNr8RRADX7br+IMOJ+n4LRQZR+Vi/n69irzJy4Z4iFir7n+/qVeDsi77W2a+iL3evQ vko3DRZz2QCqtqSUdEweD7HAdpT12bBPotj5Yo+9CFv0NE4xa0naGFf740+h7gPg7NfHVL MHKuzv+54+/XcKw8COEp2vTNDQ/sFqAQ0zNLlvF0WoMCMSu9NdavzpXljiR9yahMCU+ozs yrWkB7UfR9472VuMuAkTPUnaqoGqgGml+vhBtL6yGrLfsY1KU3e3Ud+G73r4Gx56DLPIxU tEjd8+XZWaMiQRr5MHC5fkp47GjQTMilcGPW+92MIHtDF46p+raxJvIsV5lJHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=d9ed1dcc5c6894e376e6e4ef6f2554dd056baf4e commit d9ed1dcc5c6894e376e6e4ef6f2554dd056baf4e Author: Bartlomiej Grzesik AuthorDate: 2021-11-22 14:05:57 +0000 Commit: Marcin Wojtas CommitDate: 2021-11-24 18:42:43 +0000 acpi: Fix error code returned in acpi_bus_get_prop ACPI implementation of device_get_property would return "-1" when property was found, but it's type wasn't supported. This causes device_has_property to return false in that scenario, which arguably could be considered as incorrect. Fix that by returning "0" in that case. Reviewed by: bz, mw Tested by: mw MFC after: 2 weeks Obtained from: Semihalf Differential Revision: https://reviews.freebsd.org/D33103 --- sys/dev/acpica/acpi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 5d2b895bbe88..9b728b84bd12 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1849,9 +1849,10 @@ acpi_bus_get_prop(device_t bus, device_t child, const char *propname, memcpy(propvalue, obj->Buffer.Pointer, MIN(size, obj->Buffer.Length)); return (obj->Buffer.Length); - } - return (-1); + default: + return (0); + } } int From nobody Wed Nov 24 18:51:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BF76918A5283; Wed, 24 Nov 2021 18:52:08 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.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 4Hzqqr4dplz4S1b; Wed, 24 Nov 2021 18:52:08 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f47.google.com with SMTP id y16so4486873ioc.8; Wed, 24 Nov 2021 10:52:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HBgq16VJjR65zLzMdUWMJtHAyqA/nG55Hvi7ihkRioY=; b=A4pMDm5nV6HP8eRh3B8bmkEzmgM0cZxF6fV2riZ9dGfhRSJnKpNbY55d96AFzHlhLB UDUrcHNb5Z/4BeT1QqU9+iLokkkM35gGaedUYnL1zfxu/n6mAuLvgUNVGDtuIhZt64IS +kLpKLjoiGBW2dODRq+wXTjGiQDTuw91S4eHfU7zgea51DRNBmzz+OHP++MbXdOtv5TA HZelSG03wDOYsnaGg3MUEn/WcyKKxJ4gGH4DSMB6R3W/zX+kEiMjQ9b9D02QLD+S0ZPz YfMRJI5Q1rr9M8w3ET+mhDIqgmcv1S8uho+x8i40Wv+qsyp1zFrHzLbDR/is54I3MrI7 5rEQ== X-Gm-Message-State: AOAM532dZtbcBVC5aiRc+rotwmU3M38heUPmxD9z1iU3fQr+FCeArO5U 7cd9Ws8OvY0s5j2GWeEoFJTs4jBKuLqk9Q6ajyKWI8Lmh90= X-Google-Smtp-Source: ABdhPJwbGhRdZ00tNL9rH/r9iPxQSTYNXW4K9PJ89m+H9yhn4Nk+xJDdtzwb9PYLRPpiNGWm2LYl9B6omijO6urjvDA= X-Received: by 2002:a05:6602:1592:: with SMTP id e18mr17271136iow.142.1637779922083; Wed, 24 Nov 2021 10:52:02 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202111241003.1AOA3pxZ008905@gitrepo.freebsd.org> <20211124154950.iu62azibagbgosjh@aniel.nours.eu> In-Reply-To: <20211124154950.iu62azibagbgosjh@aniel.nours.eu> From: Ed Maste Date: Wed, 24 Nov 2021 13:51:46 -0500 Message-ID: Subject: Re: git: a46722b58056 - main - ncurses: register formw as usable lib for LIBADD To: Baptiste Daroussin Cc: "Bjoern A. Zeeb" , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Hzqqr4dplz4S1b X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 24 Nov 2021 at 10:49, Baptiste Daroussin wrote: > > I think it should be fixed, I don't think it is necessary to add it to the > prebuild_libs https://ci.freebsd.org/tinderbox/ (at e052f7269108) and https://cirrus-ci.com/github/freebsd/freebsd-src/main (at 05ea7a3 right now) are still red. From nobody Wed Nov 24 19:03:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E6FC018ABA3E; Wed, 24 Nov 2021 19:03: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 4Hzr4Z42w8z4X2B; Wed, 24 Nov 2021 19:03:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AF6573E5; Wed, 24 Nov 2021 19:03: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 1AOJ3Afn035448; Wed, 24 Nov 2021 19:03:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOJ3AkP035447; Wed, 24 Nov 2021 19:03:10 GMT (envelope-from git) Date: Wed, 24 Nov 2021 19:03:10 GMT Message-Id: <202111241903.1AOJ3AkP035447@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: 45c09a74d681 - main - vm_fault: Move nera into faultstate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 45c09a74d681cfcad0a556b753cd56f6084ace46 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637780590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HADp9/rck+Y5csfdpMpomoHi1YClrCdClJpl4UtfmD4=; b=vLFPWZyHnD4iHRIlKsuk9lrT5yIDSh/rdftJmglU7lUdO+ZtN/LG1cZrJfkPA0Oi8BDTg2 ggyLK+qWynllCntg/+YvquPZ38mAzRyIsA1VcWy8y0+dhvu2KdgUAplSEwdg17Y6drFK3G EjuioOCMKQj4Z3O4Aie09iyzH48qzrxlkSNZYxLCHTXMUQo/CuTBR0loVXEaGnBC7b0cRX oRP/MyMWvK1Q4/CWv3gLjqRly4hhftgIeuIYclrB3thFmsj0h8kZdQxqsGy4cAXzlrbF3Z 2mY+RUFsrMWtSM8IcfjukQJnFj8rKTjIAGbnQxFOcZmxIfVHFhef3ZrtcDXypg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637780590; a=rsa-sha256; cv=none; b=I7xi1NO41F4r8O9pSAuQG8MGQ19zUd968kn8Yrl3DWAia44H9+fWcZgS3bsg4fj4kkt5Pi un8B9nWn8EnqOMR22uLxYxjAkD8K8eqBOEDKU6hOXxmuo5xIyj58XHn+IdJ8jNfzq6qWca yJfPgG9M3A8trAdl5gPfWlyheG5KRsNfbDtpGuYKTGSEE4lR7pZUJFH7ovQkZ695Zpq+Vv cLtdoG7Bl23XzKQ1P1NNODBogp46KwfRuii/5t172egd1lEb+7kP0wdmvn1Yr0yPbrgP8I xFwLTEHj8EWip0vyvHQ1fQuLsEZSHJVdb3gq/AC9rGqiYQlVOhVTznWxV35yQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=45c09a74d681cfcad0a556b753cd56f6084ace46 commit 45c09a74d681cfcad0a556b753cd56f6084ace46 Author: Mark Johnston AuthorDate: 2021-11-24 18:42:32 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 19:02:55 +0000 vm_fault: Move nera into faultstate This makes it easier to factor out pieces of vm_fault(). No functional change intended. Obtained from: jeff (object_concurrency patches) Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33016 --- sys/vm/vm_fault.c | 62 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index d459bad78dd8..75868c17d32d 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -125,9 +125,12 @@ struct faultstate { vm_prot_t fault_type; vm_prot_t prot; int fault_flags; + boolean_t wired; + + /* Control state. */ struct timeval oom_start_time; bool oom_started; - boolean_t wired; + int nera; /* Page reference for cow. */ vm_page_t m_cow; @@ -1184,7 +1187,7 @@ vm_fault_allocate(struct faultstate *fs) * pages at the same time. */ static int -vm_fault_getpages(struct faultstate *fs, int nera, int *behindp, int *aheadp) +vm_fault_getpages(struct faultstate *fs, int *behindp, int *aheadp) { vm_offset_t e_end, e_start; int ahead, behind, cluster_offset, rv; @@ -1202,6 +1205,20 @@ vm_fault_getpages(struct faultstate *fs, int nera, int *behindp, int *aheadp) e_end = fs->entry->end; behavior = vm_map_entry_behavior(fs->entry); + /* + * If the pager for the current object might have + * the page, then determine the number of additional + * pages to read and potentially reprioritize + * previously read pages for earlier reclamation. + * These operations should only be performed once per + * page fault. Even if the current pager doesn't + * have the page, the number of additional pages to + * read will apply to subsequent objects in the + * shadow chain. + */ + if (fs->nera == -1 && !P_KILLED(curproc)) + fs->nera = vm_fault_readahead(fs); + /* * Release the map lock before locking the vnode or * sleeping in the pager. (If the current object has @@ -1221,15 +1238,15 @@ vm_fault_getpages(struct faultstate *fs, int nera, int *behindp, int *aheadp) * Page in the requested page and hint the pager, * that it may bring up surrounding pages. */ - if (nera == -1 || behavior == MAP_ENTRY_BEHAV_RANDOM || + if (fs->nera == -1 || behavior == MAP_ENTRY_BEHAV_RANDOM || P_KILLED(curproc)) { behind = 0; ahead = 0; } else { /* Is this a sequential fault? */ - if (nera > 0) { + if (fs->nera > 0) { behind = 0; - ahead = nera; + ahead = fs->nera; } else { /* * Request a cluster of pages that is @@ -1261,8 +1278,14 @@ vm_fault_getpages(struct faultstate *fs, int nera, int *behindp, int *aheadp) * outside the range of the pager, clean up and return * an error. */ - if (rv == VM_PAGER_ERROR || rv == VM_PAGER_BAD) + if (rv == VM_PAGER_ERROR || rv == VM_PAGER_BAD) { + VM_OBJECT_WLOCK(fs->object); + fault_page_free(&fs->m); + unlock_and_deallocate(fs); return (KERN_OUT_OF_BOUNDS); + } + KASSERT(rv == VM_PAGER_FAIL, + ("%s: unepxected pager error %d", __func__, rv)); return (KERN_NOT_RECEIVER); } @@ -1307,7 +1330,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, { struct faultstate fs; int ahead, behind, faultcount; - int nera, result, rv; + int result, rv; bool dead, hardfault; VM_CNT_INC(v_vm_faults); @@ -1322,8 +1345,8 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, fs.map = map; fs.lookup_still_valid = false; fs.oom_started = false; + fs.nera = -1; faultcount = 0; - nera = -1; hardfault = false; RetryFault: @@ -1490,21 +1513,7 @@ RetryFault: */ VM_OBJECT_WUNLOCK(fs.object); - /* - * If the pager for the current object might have - * the page, then determine the number of additional - * pages to read and potentially reprioritize - * previously read pages for earlier reclamation. - * These operations should only be performed once per - * page fault. Even if the current pager doesn't - * have the page, the number of additional pages to - * read will apply to subsequent objects in the - * shadow chain. - */ - if (nera == -1 && !P_KILLED(curproc)) - nera = vm_fault_readahead(&fs); - - rv = vm_fault_getpages(&fs, nera, &behind, &ahead); + rv = vm_fault_getpages(&fs, &behind, &ahead); if (rv == KERN_SUCCESS) { faultcount = behind + 1 + ahead; hardfault = true; @@ -1512,12 +1521,9 @@ RetryFault: } if (rv == KERN_RESOURCE_SHORTAGE) goto RetryFault; - VM_OBJECT_WLOCK(fs.object); - if (rv == KERN_OUT_OF_BOUNDS) { - fault_page_free(&fs.m); - unlock_and_deallocate(&fs); + if (rv == KERN_OUT_OF_BOUNDS) return (rv); - } + VM_OBJECT_WLOCK(fs.object); } /* From nobody Wed Nov 24 19:03:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 34D4218ABA46; Wed, 24 Nov 2021 19:03: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 4Hzr4b5GpGz4Wfn; Wed, 24 Nov 2021 19:03:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CA237479; Wed, 24 Nov 2021 19:03: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 1AOJ3BH9035472; Wed, 24 Nov 2021 19:03:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOJ3BD2035471; Wed, 24 Nov 2021 19:03:11 GMT (envelope-from git) Date: Wed, 24 Nov 2021 19:03:11 GMT Message-Id: <202111241903.1AOJ3BD2035471@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: f1b642c255a2 - main - vm_fault: Introduce a fault_status enum for internal return types List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f1b642c255a2931fd793219d11562310a2ce49c8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637780591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Qb6SzEAoCBfSkdN+aFLcX4xYIJlZ3Zb3CRXe/lmsgw=; b=M1kOU41VUgs2/NN/fCQoJo/5lWYIZAGVSUsBcFVckshO5jClgilMNs10vI/tVUAELP0hTM pPWGnPAY+wl/lZ6ls3sZWJpqLvCCJldN/4M6uhWBoo+84FFRHlRO0z9rkmVWyqXagOJN8z 0g6Hnm9db47aTeSMyxpjbgvueb2EEABhuP6UnR95VWMYonwsaN7CF7irUnIrcepigvZvhE pmakaBSoywx8iWYYv3UYuBlUxEK7240lKhMbtvShIQTDcAdNArX3XZtFrqxdFvbQuzX19s 5e0PVQlZbcLCbZm5/R+hqhG3qBj1zPpa7iUovXnc3zf53DH9qZ7YoSU/bo1Ivw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637780591; a=rsa-sha256; cv=none; b=NzlccCQkAXlp8+igoCa1xiMwi8oW8wxNsGKA52UDJcgVvZNCXbb0fWbDQ2ex005agzsWje 5Vf7SAlAo2Nz6Hg7MULnlspLBIzVD7zPOsb0jUO2reRKdM1gmfcqDH9xhIgsUmZztKKgCi AfjDR9V/bLLm1dHYGb50myLCKPH7JKqP/IN7Bhq70GQmMhsZ71akZmton2zwUEbbqcWnsi qFUXMU0V7KMoR+Y5OO/fJtIr9FlnVQu063khr/+GFzkewET6DKipQS6rFgiu0iJDtemnXX XaHgRDd0xWZGJTLFQswX34XJLI3ptQQYgsesncu7CQadWAAnEbOBfMm3Wg6YCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f1b642c255a2931fd793219d11562310a2ce49c8 commit f1b642c255a2931fd793219d11562310a2ce49c8 Author: Mark Johnston AuthorDate: 2021-11-24 18:43:26 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 19:02:55 +0000 vm_fault: Introduce a fault_status enum for internal return types Rather than overloading the meanings of the Mach statuses, introduce a new set for use internally in the fault code. This makes the control flow easier to follow and provides some extra error checking when a fault status variable is used in a switch statement. vm_fault_lookup() and vm_fault_relookup() continue to use Mach statuses for now, as there isn't much benefit to converting them and they effectively pass through a status from vm_map_lookup(). Obtained from: jeff (object_concurrency patches) Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33017 --- sys/vm/vm_fault.c | 202 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 111 insertions(+), 91 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 75868c17d32d..0e4d9fd33c6f 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -155,6 +155,19 @@ struct faultstate { struct vnode *vp; }; +/* + * Return codes for internal fault routines. + */ +enum fault_status { + FAULT_SUCCESS = 1, /* Return success to user. */ + FAULT_FAILURE, /* Return failure to user. */ + FAULT_CONTINUE, /* Continue faulting. */ + FAULT_RESTART, /* Restart fault. */ + FAULT_OUT_OF_BOUNDS, /* Invalid address for pager. */ + FAULT_HARD, /* Performed I/O. */ + FAULT_SOFT, /* Found valid page. */ +}; + static void vm_fault_dontneed(const struct faultstate *fs, vm_offset_t vaddr, int ahead); static void vm_fault_prefault(const struct faultstate *fs, vm_offset_t addra, @@ -298,7 +311,7 @@ vm_fault_dirty(struct faultstate *fs, vm_page_t m) /* * Unlocks fs.first_object and fs.map on success. */ -static int +static enum fault_status vm_fault_soft_fast(struct faultstate *fs) { vm_page_t m, m_map; @@ -306,17 +319,20 @@ vm_fault_soft_fast(struct faultstate *fs) vm_page_t m_super; int flags; #endif - int psind, rv; + 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)) { - rv = KERN_FAILURE; + res = FAULT_FAILURE; goto out; } m_map = m; @@ -351,10 +367,12 @@ vm_fault_soft_fast(struct faultstate *fs) } } #endif - rv = pmap_enter(fs->map->pmap, vaddr, m_map, fs->prot, fs->fault_type | - PMAP_ENTER_NOSLEEP | (fs->wired ? PMAP_ENTER_WIRED : 0), psind); - if (rv != KERN_SUCCESS) + 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; + } if (fs->m_hold != NULL) { (*fs->m_hold) = m; vm_page_wire(m); @@ -368,7 +386,7 @@ vm_fault_soft_fast(struct faultstate *fs) out: vm_object_unbusy(fs->first_object); - return (rv); + return (res); } static void @@ -417,13 +435,14 @@ vm_fault_populate_cleanup(vm_object_t object, vm_pindex_t first, } } -static int +static enum fault_status vm_fault_populate(struct faultstate *fs) { vm_offset_t vaddr; vm_page_t m; vm_pindex_t map_first, map_last, pager_first, pager_last, pidx; int bdry_idx, i, npages, psind, rv; + enum fault_status res; MPASS(fs->object == fs->first_object); VM_OBJECT_ASSERT_WLOCKED(fs->first_object); @@ -436,6 +455,8 @@ vm_fault_populate(struct faultstate *fs) unlock_map(fs); unlock_vp(fs); + res = FAULT_SUCCESS; + /* * Call the pager (driver) populate() method. * @@ -456,11 +477,11 @@ vm_fault_populate(struct faultstate *fs) */ vm_fault_restore_map_lock(fs); if (fs->map->timestamp != fs->map_generation) - return (KERN_RESTART); - return (KERN_NOT_RECEIVER); + return (FAULT_RESTART); + return (FAULT_CONTINUE); } if (rv != VM_PAGER_OK) - return (KERN_FAILURE); /* AKA SIGSEGV */ + return (FAULT_FAILURE); /* AKA SIGSEGV */ /* Ensure that the driver is obeying the interface. */ MPASS(pager_first <= pager_last); @@ -480,7 +501,7 @@ vm_fault_populate(struct faultstate *fs) if (m != fs->m) vm_page_xunbusy(m); } - return (KERN_RESTART); + return (FAULT_RESTART); } /* @@ -510,8 +531,10 @@ vm_fault_populate(struct faultstate *fs) PMAP_ENTER_LARGEPAGE, bdry_idx); VM_OBJECT_WLOCK(fs->first_object); vm_page_xunbusy(m); - if (rv != KERN_SUCCESS) + if (rv != KERN_SUCCESS) { + res = FAULT_FAILURE; goto out; + } if ((fs->fault_flags & VM_FAULT_WIRE) != 0) { for (i = 0; i < atop(pagesizes[bdry_idx]); i++) vm_page_wire(m + i); @@ -596,7 +619,7 @@ vm_fault_populate(struct faultstate *fs) } out: curthread->td_ru.ru_majflt++; - return (rv); + return (res); } static int prot_fault_translation; @@ -699,18 +722,18 @@ vm_fault_trap(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, return (result); } -static int +static enum fault_status vm_fault_lock_vnode(struct faultstate *fs, bool objlocked) { struct vnode *vp; int error, locked; if (fs->object->type != OBJT_VNODE) - return (KERN_SUCCESS); + return (FAULT_CONTINUE); vp = fs->object->handle; if (vp == fs->vp) { ASSERT_VOP_LOCKED(vp, "saved vnode is not locked"); - return (KERN_SUCCESS); + return (FAULT_CONTINUE); } /* @@ -732,7 +755,7 @@ vm_fault_lock_vnode(struct faultstate *fs, bool objlocked) error = vget(vp, locked | LK_CANRECURSE | LK_NOWAIT); if (error == 0) { fs->vp = vp; - return (KERN_SUCCESS); + return (FAULT_CONTINUE); } vhold(vp); @@ -744,7 +767,7 @@ vm_fault_lock_vnode(struct faultstate *fs, bool objlocked) vdrop(vp); fs->vp = vp; KASSERT(error == 0, ("vm_fault: vget failed %d", error)); - return (KERN_RESOURCE_SHORTAGE); + return (FAULT_RESTART); } /* @@ -1112,33 +1135,35 @@ vm_fault_allocate_oom(struct faultstate *fs) /* * Allocate a page directly or via the object populate method. */ -static int +static enum fault_status vm_fault_allocate(struct faultstate *fs) { struct domainset *dset; - int rv; + enum fault_status res; if ((fs->object->flags & OBJ_SIZEVNLOCK) != 0) { - rv = vm_fault_lock_vnode(fs, true); - MPASS(rv == KERN_SUCCESS || rv == KERN_RESOURCE_SHORTAGE); - if (rv == KERN_RESOURCE_SHORTAGE) - return (rv); + res = vm_fault_lock_vnode(fs, true); + MPASS(res == FAULT_CONTINUE || res == FAULT_RESTART); + if (res == FAULT_RESTART) + return (res); } - if (fs->pindex >= fs->object->size) - return (KERN_OUT_OF_BOUNDS); + if (fs->pindex >= fs->object->size) { + unlock_and_deallocate(fs); + return (FAULT_OUT_OF_BOUNDS); + } if (fs->object == fs->first_object && (fs->first_object->flags & OBJ_POPULATE) != 0 && fs->first_object->shadow_count == 0) { - rv = vm_fault_populate(fs); - switch (rv) { - case KERN_SUCCESS: - case KERN_FAILURE: - case KERN_PROTECTION_FAILURE: - case KERN_RESTART: - return (rv); - case KERN_NOT_RECEIVER: + res = vm_fault_populate(fs); + switch (res) { + case FAULT_SUCCESS: + case FAULT_FAILURE: + case FAULT_RESTART: + unlock_and_deallocate(fs); + return (res); + case FAULT_CONTINUE: /* * Pager's populate() method * returned VM_PAGER_BAD. @@ -1174,11 +1199,11 @@ vm_fault_allocate(struct faultstate *fs) if (fs->m == NULL) { if (vm_fault_allocate_oom(fs)) vm_waitpfault(dset, vm_pfault_oom_wait * hz); - return (KERN_RESOURCE_SHORTAGE); + return (FAULT_RESTART); } fs->oom_started = false; - return (KERN_NOT_RECEIVER); + return (FAULT_CONTINUE); } /* @@ -1186,11 +1211,12 @@ vm_fault_allocate(struct faultstate *fs) * that the pager has it, and potentially retrieve additional * pages at the same time. */ -static int +static enum fault_status vm_fault_getpages(struct faultstate *fs, int *behindp, int *aheadp) { vm_offset_t e_end, e_start; int ahead, behind, cluster_offset, rv; + enum fault_status status; u_char behavior; /* @@ -1227,10 +1253,10 @@ vm_fault_getpages(struct faultstate *fs, int *behindp, int *aheadp) */ unlock_map(fs); - rv = vm_fault_lock_vnode(fs, false); - MPASS(rv == KERN_SUCCESS || rv == KERN_RESOURCE_SHORTAGE); - if (rv == KERN_RESOURCE_SHORTAGE) - return (rv); + status = vm_fault_lock_vnode(fs, false); + MPASS(status == FAULT_CONTINUE || status == FAULT_RESTART); + if (status == FAULT_RESTART) + return (status); KASSERT(fs->vp == NULL || !fs->map->system_map, ("vm_fault: vnode-backed object mapped by system map")); @@ -1269,7 +1295,7 @@ vm_fault_getpages(struct faultstate *fs, int *behindp, int *aheadp) *aheadp = ahead; rv = vm_pager_get_pages(fs->object, &fs->m, 1, behindp, aheadp); if (rv == VM_PAGER_OK) - return (KERN_SUCCESS); + return (FAULT_HARD); if (rv == VM_PAGER_ERROR) printf("vm_fault: pager read error, pid %d (%s)\n", curproc->p_pid, curproc->p_comm); @@ -1282,11 +1308,11 @@ vm_fault_getpages(struct faultstate *fs, int *behindp, int *aheadp) VM_OBJECT_WLOCK(fs->object); fault_page_free(&fs->m); unlock_and_deallocate(fs); - return (KERN_OUT_OF_BOUNDS); + return (FAULT_OUT_OF_BOUNDS); } KASSERT(rv == VM_PAGER_FAIL, ("%s: unepxected pager error %d", __func__, rv)); - return (KERN_NOT_RECEIVER); + return (FAULT_CONTINUE); } /* @@ -1329,8 +1355,8 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags, vm_page_t *m_hold) { struct faultstate fs; - int ahead, behind, faultcount; - int result, rv; + int ahead, behind, faultcount, rv; + enum fault_status res; bool dead, hardfault; VM_CNT_INC(v_vm_faults); @@ -1356,11 +1382,11 @@ RetryFault: * Find the backing store object and offset into it to begin the * search. */ - result = vm_fault_lookup(&fs); - if (result != KERN_SUCCESS) { - if (result == KERN_RESOURCE_SHORTAGE) + rv = vm_fault_lookup(&fs); + if (rv != KERN_SUCCESS) { + if (rv == KERN_RESOURCE_SHORTAGE) goto RetryFault; - return (result); + return (rv); } /* @@ -1374,9 +1400,9 @@ RetryFault: (fs.entry->eflags & MAP_ENTRY_SPLIT_BOUNDARY_MASK) == 0 && (fs.fault_flags & (VM_FAULT_WIRE | VM_FAULT_DIRTY)) == 0) { VM_OBJECT_RLOCK(fs.first_object); - rv = vm_fault_soft_fast(&fs); - if (rv == KERN_SUCCESS) - return (rv); + res = vm_fault_soft_fast(&fs); + if (res == FAULT_SUCCESS) + return (KERN_SUCCESS); if (!VM_OBJECT_TRYUPGRADE(fs.first_object)) { VM_OBJECT_RUNLOCK(fs.first_object); VM_OBJECT_WLOCK(fs.first_object); @@ -1406,23 +1432,20 @@ RetryFault: fs.pindex = fs.first_pindex; if ((fs.entry->eflags & MAP_ENTRY_SPLIT_BOUNDARY_MASK) != 0) { - rv = vm_fault_allocate(&fs); - switch (rv) { - case KERN_RESTART: - unlock_and_deallocate(&fs); - /* FALLTHROUGH */ - case KERN_RESOURCE_SHORTAGE: + res = vm_fault_allocate(&fs); + switch (res) { + case FAULT_RESTART: goto RetryFault; - case KERN_SUCCESS: - case KERN_FAILURE: - case KERN_PROTECTION_FAILURE: - case KERN_OUT_OF_BOUNDS: - unlock_and_deallocate(&fs); - return (rv); - case KERN_NOT_RECEIVER: + case FAULT_SUCCESS: + return (KERN_SUCCESS); + case FAULT_FAILURE: + return (KERN_FAILURE); + case FAULT_OUT_OF_BOUNDS: + return (KERN_OUT_OF_BOUNDS); + case FAULT_CONTINUE: break; default: - panic("vm_fault: Unhandled rv %d", rv); + panic("vm_fault: Unhandled status %d", res); } } @@ -1474,23 +1497,20 @@ RetryFault: */ if (fs.m == NULL && (fs.object->type != OBJT_DEFAULT || fs.object == fs.first_object)) { - rv = vm_fault_allocate(&fs); - switch (rv) { - case KERN_RESTART: - unlock_and_deallocate(&fs); - /* FALLTHROUGH */ - case KERN_RESOURCE_SHORTAGE: + res = vm_fault_allocate(&fs); + switch (res) { + case FAULT_RESTART: goto RetryFault; - case KERN_SUCCESS: - case KERN_FAILURE: - case KERN_PROTECTION_FAILURE: - case KERN_OUT_OF_BOUNDS: - unlock_and_deallocate(&fs); - return (rv); - case KERN_NOT_RECEIVER: + case FAULT_SUCCESS: + return (KERN_SUCCESS); + case FAULT_FAILURE: + return (KERN_FAILURE); + case FAULT_OUT_OF_BOUNDS: + return (KERN_OUT_OF_BOUNDS); + case FAULT_CONTINUE: break; default: - panic("vm_fault: Unhandled rv %d", rv); + panic("vm_fault: Unhandled status %d", res); } } @@ -1513,16 +1533,16 @@ RetryFault: */ VM_OBJECT_WUNLOCK(fs.object); - rv = vm_fault_getpages(&fs, &behind, &ahead); - if (rv == KERN_SUCCESS) { + res = vm_fault_getpages(&fs, &behind, &ahead); + if (res == FAULT_SUCCESS) { faultcount = behind + 1 + ahead; hardfault = true; break; /* break to PAGE HAS BEEN FOUND. */ } - if (rv == KERN_RESOURCE_SHORTAGE) + if (res == FAULT_RESTART) goto RetryFault; - if (rv == KERN_OUT_OF_BOUNDS) - return (rv); + if (res == FAULT_OUT_OF_BOUNDS) + return (KERN_OUT_OF_BOUNDS); VM_OBJECT_WLOCK(fs.object); } @@ -1583,12 +1603,12 @@ RetryFault: * lookup. */ if (!fs.lookup_still_valid) { - result = vm_fault_relookup(&fs); - if (result != KERN_SUCCESS) { + rv = vm_fault_relookup(&fs); + if (rv != KERN_SUCCESS) { fault_deallocate(&fs); - if (result == KERN_RESTART) + if (rv == KERN_RESTART) goto RetryFault; - return (result); + return (rv); } } VM_OBJECT_ASSERT_UNLOCKED(fs.object); From nobody Wed Nov 24 19:03:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BF83818ABD0A; Wed, 24 Nov 2021 19:03: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 4Hzr4d0RTSz4Wrc; Wed, 24 Nov 2021 19:03:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE149747A; Wed, 24 Nov 2021 19:03: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 1AOJ3Cru035503; Wed, 24 Nov 2021 19:03:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOJ3Ca6035501; Wed, 24 Nov 2021 19:03:12 GMT (envelope-from git) Date: Wed, 24 Nov 2021 19:03:12 GMT Message-Id: <202111241903.1AOJ3Ca6035501@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: d47d3a94bb2d - main - vm_fault: Factor out per-object operations into vm_fault_object() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d47d3a94bb2d873b1c3a5cdfe9cc00e4619f649b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637780593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JDdOehMkSUgIWSj7cKsG7zsoJN+Wlb3kYNX4qkehPV8=; b=UhD15Ikh1OBgFzZLcDrZg+8UI0vfHylS+P6lr1WYiJEJ8uMIzifXPyomaQjvloT4CEwoi+ TLkd3TWVu4Ih4MexE0WqtygRj6flK01BAGYrGe7O9P92HiTxayfrBZLMVhSanRt5kYP3bc yah31/R3GNqJwBqCAehxa1eniAnd4AV1ZY/PiN6O6EwHKW/q3GNT83GrTMTKOFqpFIq1fJ 8wPMqr8iYrY//q3uQ891oQzdDgtRXJDZmxSVLvW5wYmxEgythX+JP+59tWJEKfyKuSVEzN cUvcT0X+R5kYyulicIAfpW6AUR99go0H8yzKRekDtRPsqLHz+GH2FdhgajNZ9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637780593; a=rsa-sha256; cv=none; b=cdYnw87l9frKxmzQPsSOK5OY6BhV/hJ1qVgJRlq7pwbPW4sSlfL3d2mYtAhAB0t3rcUfBO KMR8HHWj7Qe6jZGWEk6MjKMPb6rIVC+o/r5RfdnyNXtmg6hTyKd6XB2BZrG7C6HhoNaGQ/ oV65YUzEfLKBXh7C/7ZVP5JWO53d5GInD9kEVMIIMU5Nw8n5UjKvTYOXVOOhvzd2/XGE2/ tNjHTT4zad568uSB856gZ4kOa8I4lh4NOAqWiF5QaNl9W9nLhx2argrvYXbR3eGm0+Bw8g Ts8Si3tF+ZUb4em0VyjgVMtCkuhdyDHOs9lZjWU+im3E0XGs1sh6r2spLJM5Mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d47d3a94bb2d873b1c3a5cdfe9cc00e4619f649b commit d47d3a94bb2d873b1c3a5cdfe9cc00e4619f649b Author: Mark Johnston AuthorDate: 2021-11-24 18:43:38 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 19:02:56 +0000 vm_fault: Factor out per-object operations into vm_fault_object() No functional change intended. Obtained from: jeff (object_concurrency patches) Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33018 --- sys/vm/vm_fault.c | 213 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 118 insertions(+), 95 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 0e4d9fd33c6f..a929351257ce 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -166,6 +166,7 @@ enum fault_status { FAULT_OUT_OF_BOUNDS, /* Invalid address for pager. */ FAULT_HARD, /* Performed I/O. */ FAULT_SOFT, /* Found valid page. */ + FAULT_PROTECTION_FAILURE, /* Invalid access. */ }; static void vm_fault_dontneed(const struct faultstate *fs, vm_offset_t vaddr, @@ -1350,6 +1351,96 @@ vm_fault_busy_sleep(struct faultstate *fs) vm_object_deallocate(fs->first_object); } +/* + * Handle page lookup, populate, allocate, page-in for the current + * object. + * + * The object is locked on entry and will remain locked with a return + * code of FAULT_CONTINUE so that fault may follow the shadow chain. + * Otherwise, the object will be unlocked upon return. + */ +static enum fault_status +vm_fault_object(struct faultstate *fs, int *behindp, int *aheadp) +{ + enum fault_status res; + bool dead; + + /* + * If the object is marked for imminent termination, we retry + * here, since the collapse pass has raced with us. Otherwise, + * if we see terminally dead object, return fail. + */ + if ((fs->object->flags & OBJ_DEAD) != 0) { + dead = fs->object->type == OBJT_DEAD; + unlock_and_deallocate(fs); + if (dead) + return (FAULT_PROTECTION_FAILURE); + pause("vmf_de", 1); + return (FAULT_RESTART); + } + + /* + * See if the page is resident. + */ + fs->m = vm_page_lookup(fs->object, fs->pindex); + if (fs->m != NULL) { + if (!vm_page_tryxbusy(fs->m)) { + vm_fault_busy_sleep(fs); + return (FAULT_RESTART); + } + + /* + * The page is marked busy for other processes and the + * pagedaemon. If it is still completely valid we are + * done. + */ + if (vm_page_all_valid(fs->m)) { + VM_OBJECT_WUNLOCK(fs->object); + return (FAULT_SOFT); + } + } + VM_OBJECT_ASSERT_WLOCKED(fs->object); + + /* + * Page is not resident. If the pager might contain the page + * or this is the beginning of the search, allocate a new + * page. (Default objects are zero-fill, so there is no real + * pager for them.) + */ + if (fs->m == NULL && (fs->object->type != OBJT_DEFAULT || + fs->object == fs->first_object)) { + res = vm_fault_allocate(fs); + if (res != FAULT_CONTINUE) + return (res); + } + + /* + * Default objects have no pager so no exclusive busy exists + * to protect this page in the chain. Skip to the next + * object without dropping the lock to preserve atomicity of + * shadow faults. + */ + if (fs->object->type != OBJT_DEFAULT) { + /* + * At this point, we have either allocated a new page + * or found an existing page that is only partially + * valid. + * + * We hold a reference on the current object and the + * page is exclusive busied. The exclusive busy + * prevents simultaneous faults and collapses while + * the object lock is dropped. + */ + VM_OBJECT_WUNLOCK(fs->object); + res = vm_fault_getpages(fs, behindp, aheadp); + if (res == FAULT_CONTINUE) + VM_OBJECT_WLOCK(fs->object); + } else { + res = FAULT_CONTINUE; + } + return (res); +} + int vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags, vm_page_t *m_hold) @@ -1357,7 +1448,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, struct faultstate fs; int ahead, behind, faultcount, rv; enum fault_status res; - bool dead, hardfault; + bool hardfault; VM_CNT_INC(v_vm_faults); @@ -1452,98 +1543,29 @@ RetryFault: while (TRUE) { KASSERT(fs.m == NULL, ("page still set %p at loop start", fs.m)); - /* - * If the object is marked for imminent termination, - * we retry here, since the collapse pass has raced - * with us. Otherwise, if we see terminally dead - * object, return fail. - */ - if ((fs.object->flags & OBJ_DEAD) != 0) { - dead = fs.object->type == OBJT_DEAD; - unlock_and_deallocate(&fs); - if (dead) - return (KERN_PROTECTION_FAILURE); - pause("vmf_de", 1); - goto RetryFault; - } - - /* - * See if page is resident - */ - fs.m = vm_page_lookup(fs.object, fs.pindex); - if (fs.m != NULL) { - if (vm_page_tryxbusy(fs.m) == 0) { - vm_fault_busy_sleep(&fs); - goto RetryFault; - } - - /* - * The page is marked busy for other processes and the - * pagedaemon. If it still is completely valid we - * are done. - */ - if (vm_page_all_valid(fs.m)) { - VM_OBJECT_WUNLOCK(fs.object); - break; /* break to PAGE HAS BEEN FOUND. */ - } - } - VM_OBJECT_ASSERT_WLOCKED(fs.object); - - /* - * Page is not resident. If the pager might contain the page - * or this is the beginning of the search, allocate a new - * page. (Default objects are zero-fill, so there is no real - * pager for them.) - */ - if (fs.m == NULL && (fs.object->type != OBJT_DEFAULT || - fs.object == fs.first_object)) { - res = vm_fault_allocate(&fs); - switch (res) { - case FAULT_RESTART: - goto RetryFault; - case FAULT_SUCCESS: - return (KERN_SUCCESS); - case FAULT_FAILURE: - return (KERN_FAILURE); - case FAULT_OUT_OF_BOUNDS: - return (KERN_OUT_OF_BOUNDS); - case FAULT_CONTINUE: - break; - default: - panic("vm_fault: Unhandled status %d", res); - } - } - /* - * Default objects have no pager so no exclusive busy exists - * to protect this page in the chain. Skip to the next - * object without dropping the lock to preserve atomicity of - * shadow faults. - */ - if (fs.object->type != OBJT_DEFAULT) { - /* - * At this point, we have either allocated a new page - * or found an existing page that is only partially - * valid. - * - * We hold a reference on the current object and the - * page is exclusive busied. The exclusive busy - * prevents simultaneous faults and collapses while - * the object lock is dropped. - */ - VM_OBJECT_WUNLOCK(fs.object); - - res = vm_fault_getpages(&fs, &behind, &ahead); - if (res == FAULT_SUCCESS) { - faultcount = behind + 1 + ahead; - hardfault = true; - break; /* break to PAGE HAS BEEN FOUND. */ - } - if (res == FAULT_RESTART) - goto RetryFault; - if (res == FAULT_OUT_OF_BOUNDS) - return (KERN_OUT_OF_BOUNDS); - VM_OBJECT_WLOCK(fs.object); + res = vm_fault_object(&fs, &behind, &ahead); + switch (res) { + case FAULT_SOFT: + goto found; + case FAULT_HARD: + faultcount = behind + 1 + ahead; + hardfault = true; + goto found; + case FAULT_RESTART: + goto RetryFault; + case FAULT_SUCCESS: + return (KERN_SUCCESS); + case FAULT_FAILURE: + return (KERN_FAILURE); + case FAULT_OUT_OF_BOUNDS: + return (KERN_OUT_OF_BOUNDS); + case FAULT_PROTECTION_FAILURE: + return (KERN_PROTECTION_FAILURE); + case FAULT_CONTINUE: + break; + default: + panic("vm_fault: Unhandled status %d", res); } /* @@ -1563,12 +1585,13 @@ RetryFault: vm_fault_zerofill(&fs); /* Don't try to prefault neighboring pages. */ faultcount = 1; - break; /* break to PAGE HAS BEEN FOUND. */ + break; } +found: /* - * PAGE HAS BEEN FOUND. A valid page has been found and exclusively - * busied. The object lock must no longer be held. + * A valid page has been found and exclusively busied. The + * object lock must no longer be held. */ vm_page_assert_xbusied(fs.m); VM_OBJECT_ASSERT_UNLOCKED(fs.object); From nobody Wed Nov 24 19:41:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4AFE11897618; Wed, 24 Nov 2021 19:41: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 4HzrxD0BFpz4ky1; Wed, 24 Nov 2021 19:41:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DAAE57A6A; Wed, 24 Nov 2021 19:41: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 1AOJfpgO087100; Wed, 24 Nov 2021 19:41:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOJfpEu087099; Wed, 24 Nov 2021 19:41:51 GMT (envelope-from git) Date: Wed, 24 Nov 2021 19:41:51 GMT Message-Id: <202111241941.1AOJfpEu087099@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: 483a226238ed - main - Add ncurses/form to _prebuild_libs to fix build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 483a226238ed8949c6d280ae0757a0683962a74b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637782912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1DP+bpnY4XqQmnH8iI+OfdS/18/Ex4NV1cbsLIfy+m0=; b=WO4wvC1ZDonSDIeHzMM7bRtDnDUhHwAhal9HFml5SHAJpGEhjXfnYR2N+izUC0KmX6gLkg dGM1Ua875oQ5xITXOR3TNlp2yIgoBuhMT9KZuF0XwIveRUIdDkO1mbfj3Z3/kxjQToFoxI kXa0kXobdQAvGmpfzb5EIYGBQxewinqsdFx3dqXMi1dmHxlxAnaeunzJ0qqS/Omel+zq0i u5hh/+YEim8lLbd1o1PIuCzx50zci5TLEzaX20rsTU93qPnIbzIGeAExebyw48xJ+4f7Yz 8wqbP29UbgDSsBG0ddvIRc0FHaw0RMC8Xn7w68pjQruEdUKaF3y4thjgqpVNSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637782912; a=rsa-sha256; cv=none; b=skJIUtty9xxlxQ7U6kWu/PpzGrRmMSvGAODtGG3xwv9qiej3dNxhzbvxCwiYs0tfeYTrz5 uP61NurJCHutAzrC9Mb/ns+jsv70Q8OsXuMJfgNO+tq3BaVMdjYK0fYQEa3hGD2SjuYZKX yk9pmU2j3DEOX6zSP1ZjLBOfVLqHzGhV5fagqmBwBrrfILwuF9yMZkZUPYa01zgbTmm/W7 4YEHyvE12kZxsc7ZT8DCSAvv2+kU6Vw5fsIw8lXan53F5q17CEBGejIkIzXZAwPJn4ojiT y4ex2HXCTwG9Lc6yQxCgOLakSpSelFXVYIh/yOOsJdW7z1s6BnVTb4+YFU7oRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=483a226238ed8949c6d280ae0757a0683962a74b commit 483a226238ed8949c6d280ae0757a0683962a74b Author: Ed Maste AuthorDate: 2021-11-24 18:56:38 +0000 Commit: Ed Maste CommitDate: 2021-11-24 19:39:37 +0000 Add ncurses/form to _prebuild_libs to fix build Reported by: bz --- Makefile.inc1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index d8f50cf77d4b..1ba3716a02db 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2943,6 +2943,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_lib_casper} \ lib/ncurses/tinfo \ lib/ncurses/ncurses \ + lib/ncurses/form \ lib/libopie lib/libpam/libpam lib/libthr \ ${_lib_libradius} lib/libsbuf lib/libtacplus \ lib/libgeom \ @@ -2982,6 +2983,7 @@ _lib_libradius= lib/libradius .endif lib/ncurses/ncurses__L: lib/ncurses/tinfo__L +lib/ncurses/form__L: lib/ncurses/ncurses__L .if ${MK_OFED} != "no" _prebuild_libs+= \ From nobody Wed Nov 24 19:54:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7AC7B189F150; Wed, 24 Nov 2021 19:54: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 4HzsCz74Rvz4q4w; Wed, 24 Nov 2021 19:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6E6410507; Wed, 24 Nov 2021 19: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 1AOJsdkY001279; Wed, 24 Nov 2021 19: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 1AOJsdTl001278; Wed, 24 Nov 2021 19:54:39 GMT (envelope-from git) Date: Wed, 24 Nov 2021 19:54:39 GMT Message-Id: <202111241954.1AOJsdTl001278@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: ca853dee3b8f - main - iavf(4): Split source and update to 3.0.26-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: ca853dee3b8f26f53d48d685f32ec0b8396369e8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637783680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rDWxhIfzkyaq/et9y5wBEkPrhNM1jYhLs/0H6eZ4sI8=; b=DF/901Uj7LAmSctrfGAlboGS26eQBXEL4X0316HngXTc+/NyM3j6scGfN2t2zoExdXRLFo 6MAeKFHCfQTZuIo5EmUbZ+/t7SVlPc+WOKT8AecdvtBXVwOj+xb6YHKCnVy4QVQQPqy1M4 hwWPseoVjAB6ey6lPeoE7DCfUGMPKm1HMuW1+Vk2DWFBSBc96mgbNAoPrTs5KDM61EWLOb 78Kjmv+FbPu/HJwzXcrNDbxIvoQVSZB02oy1R2/e0RXtirNre6vVEPhPXCO8Y1PfOa0MnE zQwSHhbir3sAcUzjvqCvLq+F0TBZBmY7bdznb19n01fG9wK1k9Gu744GTqWrDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637783680; a=rsa-sha256; cv=none; b=C5pzN6lEU4UA1WaibVt9WKuCr/+3j7A8WWV3tv7FsNza0Fv3vrP9NYoWGUsVshkmFPkspM uonykIzKKJFxw5iL0hbhKnmnwL+KyuiEZzWwZRxD+5WOteEFNXpZtZgwuBu9JlxUfU2JlG kHrr85/7OYm1uExdy9WrvAmB/S/mBDHjMhJJQ3sCcv/eonhB7EV7EXMxqiqJgPNSL+zP1P RJ0aXLAHVzIiGnuKgl4cAOb40wKWOA2m/TMd3GJ+vhJn8xnkGxEr5L+RcwKBxu154vOGhb uPXTdR6DL0mZdemnS/TUGPokp56O4tk8nRufTCa1jNaLra/ZkGLfivvWgWz7sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=ca853dee3b8f26f53d48d685f32ec0b8396369e8 commit ca853dee3b8f26f53d48d685f32ec0b8396369e8 Author: Eric Joyner AuthorDate: 2021-02-12 21:28:18 +0000 Commit: Eric Joyner CommitDate: 2021-11-24 19:54:08 +0000 iavf(4): Split source and update to 3.0.26-k The iavf(4) driver now uses a different source base from ixl(4), since it will be the standard VF driver for new Intel Ethernet products going forward, including ice(4). It continues to use the iflib framework for network drivers. Since it now uses a different source code base, this commit adds a new sys/dev/iavf entry, but it re-uses the existing module name so no configuration changes are necessary. Signed-off-by: Eric Joyner Reviewed by: kbowling@ Tested by: lukasz.szczepaniak@intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D28636 --- sys/conf/files.amd64 | 34 +- sys/dev/iavf/iavf_adminq.c | 990 +++++++++++++++++ sys/dev/iavf/iavf_adminq.h | 122 ++ sys/dev/iavf/iavf_adminq_cmd.h | 678 ++++++++++++ sys/dev/iavf/iavf_alloc.h | 64 ++ sys/dev/iavf/iavf_common.c | 1053 ++++++++++++++++++ sys/dev/iavf/iavf_debug.h | 131 +++ sys/dev/iavf/iavf_devids.h | 45 + sys/dev/iavf/iavf_drv_info.h | 78 ++ sys/dev/iavf/iavf_iflib.h | 407 +++++++ sys/dev/iavf/iavf_lib.c | 1531 ++++++++++++++++++++++++++ sys/dev/iavf/iavf_lib.h | 512 +++++++++ sys/dev/iavf/iavf_opts.h | 48 + sys/dev/iavf/iavf_osdep.c | 405 +++++++ sys/dev/iavf/iavf_osdep.h | 250 +++++ sys/dev/iavf/iavf_prototype.h | 122 ++ sys/dev/iavf/iavf_register.h | 121 ++ sys/dev/iavf/iavf_status.h | 107 ++ sys/dev/iavf/iavf_sysctls_common.h | 158 +++ sys/dev/iavf/iavf_sysctls_iflib.h | 46 + sys/dev/iavf/iavf_txrx_common.h | 93 ++ sys/dev/iavf/iavf_txrx_iflib.c | 789 +++++++++++++ sys/dev/iavf/iavf_type.h | 1037 +++++++++++++++++ sys/dev/iavf/iavf_vc_common.c | 1330 ++++++++++++++++++++++ sys/dev/iavf/iavf_vc_common.h | 83 ++ sys/dev/iavf/iavf_vc_iflib.c | 178 +++ sys/dev/iavf/if_iavf_iflib.c | 2138 ++++++++++++++++++++++++++++++++++++ sys/dev/iavf/virtchnl.h | 991 +++++++++++++++++ sys/modules/iavf/Makefile | 11 +- 29 files changed, 13536 insertions(+), 16 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 9a741906c868..125a8cff6705 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -110,6 +110,22 @@ dev/axgbe/xgbe-i2c.c optional axp dev/axgbe/xgbe-phy-v2.c optional axp dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv +dev/iavf/if_iavf_iflib.c optional iavf pci \ + compile-with "${NORMAL_C} -I$S/dev/iavf" +dev/iavf/iavf_lib.c optional iavf pci \ + compile-with "${NORMAL_C} -I$S/dev/iavf" +dev/iavf/iavf_osdep.c optional iavf pci \ + compile-with "${NORMAL_C} -I$S/dev/iavf" +dev/iavf/iavf_txrx_iflib.c optional iavf pci \ + compile-with "${NORMAL_C} -I$S/dev/iavf" +dev/iavf/iavf_common.c optional iavf pci \ + compile-with "${NORMAL_C} -I$S/dev/iavf" +dev/iavf/iavf_adminq.c optional iavf pci \ + compile-with "${NORMAL_C} -I$S/dev/iavf" +dev/iavf/iavf_vc_common.c optional iavf pci \ + compile-with "${NORMAL_C} -I$S/dev/iavf" +dev/iavf/iavf_vc_iflib.c optional iavf pci \ + compile-with "${NORMAL_C} -I$S/dev/iavf" dev/ice/if_ice_iflib.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" dev/ice/ice_lib.c optional ice pci \ @@ -172,23 +188,19 @@ dev/ixl/ixl_pf_iov.c optional ixl pci pci_iov \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/ixl_pf_i2c.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" -dev/ixl/if_iavf.c optional iavf pci \ +dev/ixl/ixl_txrx.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" -dev/ixl/iavf_vc.c optional iavf pci \ +dev/ixl/i40e_osdep.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" -dev/ixl/ixl_txrx.c optional ixl pci | iavf pci \ +dev/ixl/i40e_lan_hmc.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" -dev/ixl/i40e_osdep.c optional ixl pci | iavf pci \ +dev/ixl/i40e_hmc.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" -dev/ixl/i40e_lan_hmc.c optional ixl pci | iavf pci \ +dev/ixl/i40e_common.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" -dev/ixl/i40e_hmc.c optional ixl pci | iavf pci \ +dev/ixl/i40e_nvm.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" -dev/ixl/i40e_common.c optional ixl pci | iavf pci \ - compile-with "${NORMAL_C} -I$S/dev/ixl" -dev/ixl/i40e_nvm.c optional ixl pci | iavf pci \ - compile-with "${NORMAL_C} -I$S/dev/ixl" -dev/ixl/i40e_adminq.c optional ixl pci | iavf pci \ +dev/ixl/i40e_adminq.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/i40e_dcb.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" diff --git a/sys/dev/iavf/iavf_adminq.c b/sys/dev/iavf/iavf_adminq.c new file mode 100644 index 000000000000..75b9c508cc63 --- /dev/null +++ b/sys/dev/iavf/iavf_adminq.c @@ -0,0 +1,990 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ +/* Copyright (c) 2021, Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/*$FreeBSD$*/ + +#include "iavf_status.h" +#include "iavf_type.h" +#include "iavf_register.h" +#include "iavf_adminq.h" +#include "iavf_prototype.h" + +/** + * iavf_adminq_init_regs - Initialize AdminQ registers + * @hw: pointer to the hardware structure + * + * This assumes the alloc_asq and alloc_arq functions have already been called + **/ +STATIC void iavf_adminq_init_regs(struct iavf_hw *hw) +{ + /* set head and tail registers in our local struct */ + hw->aq.asq.tail = IAVF_VF_ATQT1; + hw->aq.asq.head = IAVF_VF_ATQH1; + hw->aq.asq.len = IAVF_VF_ATQLEN1; + hw->aq.asq.bal = IAVF_VF_ATQBAL1; + hw->aq.asq.bah = IAVF_VF_ATQBAH1; + hw->aq.arq.tail = IAVF_VF_ARQT1; + hw->aq.arq.head = IAVF_VF_ARQH1; + hw->aq.arq.len = IAVF_VF_ARQLEN1; + hw->aq.arq.bal = IAVF_VF_ARQBAL1; + hw->aq.arq.bah = IAVF_VF_ARQBAH1; +} + +/** + * iavf_alloc_adminq_asq_ring - Allocate Admin Queue send rings + * @hw: pointer to the hardware structure + **/ +enum iavf_status iavf_alloc_adminq_asq_ring(struct iavf_hw *hw) +{ + enum iavf_status ret_code; + + ret_code = iavf_allocate_dma_mem(hw, &hw->aq.asq.desc_buf, + iavf_mem_atq_ring, + (hw->aq.num_asq_entries * + sizeof(struct iavf_aq_desc)), + IAVF_ADMINQ_DESC_ALIGNMENT); + if (ret_code) + return ret_code; + + ret_code = iavf_allocate_virt_mem(hw, &hw->aq.asq.cmd_buf, + (hw->aq.num_asq_entries * + sizeof(struct iavf_asq_cmd_details))); + if (ret_code) { + iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf); + return ret_code; + } + + return ret_code; +} + +/** + * iavf_alloc_adminq_arq_ring - Allocate Admin Queue receive rings + * @hw: pointer to the hardware structure + **/ +enum iavf_status iavf_alloc_adminq_arq_ring(struct iavf_hw *hw) +{ + enum iavf_status ret_code; + + ret_code = iavf_allocate_dma_mem(hw, &hw->aq.arq.desc_buf, + iavf_mem_arq_ring, + (hw->aq.num_arq_entries * + sizeof(struct iavf_aq_desc)), + IAVF_ADMINQ_DESC_ALIGNMENT); + + return ret_code; +} + +/** + * iavf_free_adminq_asq - Free Admin Queue send rings + * @hw: pointer to the hardware structure + * + * This assumes the posted send buffers have already been cleaned + * and de-allocated + **/ +void iavf_free_adminq_asq(struct iavf_hw *hw) +{ + iavf_free_virt_mem(hw, &hw->aq.asq.cmd_buf); + iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf); +} + +/** + * iavf_free_adminq_arq - Free Admin Queue receive rings + * @hw: pointer to the hardware structure + * + * This assumes the posted receive buffers have already been cleaned + * and de-allocated + **/ +void iavf_free_adminq_arq(struct iavf_hw *hw) +{ + iavf_free_dma_mem(hw, &hw->aq.arq.desc_buf); +} + +/** + * iavf_alloc_arq_bufs - Allocate pre-posted buffers for the receive queue + * @hw: pointer to the hardware structure + **/ +STATIC enum iavf_status iavf_alloc_arq_bufs(struct iavf_hw *hw) +{ + enum iavf_status ret_code; + struct iavf_aq_desc *desc; + struct iavf_dma_mem *bi; + int i; + + /* We'll be allocating the buffer info memory first, then we can + * allocate the mapped buffers for the event processing + */ + + /* buffer_info structures do not need alignment */ + ret_code = iavf_allocate_virt_mem(hw, &hw->aq.arq.dma_head, + (hw->aq.num_arq_entries * sizeof(struct iavf_dma_mem))); + if (ret_code) + goto alloc_arq_bufs; + hw->aq.arq.r.arq_bi = (struct iavf_dma_mem *)hw->aq.arq.dma_head.va; + + /* allocate the mapped buffers */ + for (i = 0; i < hw->aq.num_arq_entries; i++) { + bi = &hw->aq.arq.r.arq_bi[i]; + ret_code = iavf_allocate_dma_mem(hw, bi, + iavf_mem_arq_buf, + hw->aq.arq_buf_size, + IAVF_ADMINQ_DESC_ALIGNMENT); + if (ret_code) + goto unwind_alloc_arq_bufs; + + /* now configure the descriptors for use */ + desc = IAVF_ADMINQ_DESC(hw->aq.arq, i); + + desc->flags = CPU_TO_LE16(IAVF_AQ_FLAG_BUF); + if (hw->aq.arq_buf_size > IAVF_AQ_LARGE_BUF) + desc->flags |= CPU_TO_LE16(IAVF_AQ_FLAG_LB); + desc->opcode = 0; + /* This is in accordance with Admin queue design, there is no + * register for buffer size configuration + */ + desc->datalen = CPU_TO_LE16((u16)bi->size); + desc->retval = 0; + desc->cookie_high = 0; + desc->cookie_low = 0; + desc->params.external.addr_high = + CPU_TO_LE32(IAVF_HI_DWORD(bi->pa)); + desc->params.external.addr_low = + CPU_TO_LE32(IAVF_LO_DWORD(bi->pa)); + desc->params.external.param0 = 0; + desc->params.external.param1 = 0; + } + +alloc_arq_bufs: + return ret_code; + +unwind_alloc_arq_bufs: + /* don't try to free the one that failed... */ + i--; + for (; i >= 0; i--) + iavf_free_dma_mem(hw, &hw->aq.arq.r.arq_bi[i]); + iavf_free_virt_mem(hw, &hw->aq.arq.dma_head); + + return ret_code; +} + +/** + * iavf_alloc_asq_bufs - Allocate empty buffer structs for the send queue + * @hw: pointer to the hardware structure + **/ +STATIC enum iavf_status iavf_alloc_asq_bufs(struct iavf_hw *hw) +{ + enum iavf_status ret_code; + struct iavf_dma_mem *bi; + int i; + + /* No mapped memory needed yet, just the buffer info structures */ + ret_code = iavf_allocate_virt_mem(hw, &hw->aq.asq.dma_head, + (hw->aq.num_asq_entries * sizeof(struct iavf_dma_mem))); + if (ret_code) + goto alloc_asq_bufs; + hw->aq.asq.r.asq_bi = (struct iavf_dma_mem *)hw->aq.asq.dma_head.va; + + /* allocate the mapped buffers */ + for (i = 0; i < hw->aq.num_asq_entries; i++) { + bi = &hw->aq.asq.r.asq_bi[i]; + ret_code = iavf_allocate_dma_mem(hw, bi, + iavf_mem_asq_buf, + hw->aq.asq_buf_size, + IAVF_ADMINQ_DESC_ALIGNMENT); + if (ret_code) + goto unwind_alloc_asq_bufs; + } +alloc_asq_bufs: + return ret_code; + +unwind_alloc_asq_bufs: + /* don't try to free the one that failed... */ + i--; + for (; i >= 0; i--) + iavf_free_dma_mem(hw, &hw->aq.asq.r.asq_bi[i]); + iavf_free_virt_mem(hw, &hw->aq.asq.dma_head); + + return ret_code; +} + +/** + * iavf_free_arq_bufs - Free receive queue buffer info elements + * @hw: pointer to the hardware structure + **/ +STATIC void iavf_free_arq_bufs(struct iavf_hw *hw) +{ + int i; + + /* free descriptors */ + for (i = 0; i < hw->aq.num_arq_entries; i++) + iavf_free_dma_mem(hw, &hw->aq.arq.r.arq_bi[i]); + + /* free the descriptor memory */ + iavf_free_dma_mem(hw, &hw->aq.arq.desc_buf); + + /* free the dma header */ + iavf_free_virt_mem(hw, &hw->aq.arq.dma_head); +} + +/** + * iavf_free_asq_bufs - Free send queue buffer info elements + * @hw: pointer to the hardware structure + **/ +STATIC void iavf_free_asq_bufs(struct iavf_hw *hw) +{ + int i; + + /* only unmap if the address is non-NULL */ + for (i = 0; i < hw->aq.num_asq_entries; i++) + if (hw->aq.asq.r.asq_bi[i].pa) + iavf_free_dma_mem(hw, &hw->aq.asq.r.asq_bi[i]); + + /* free the buffer info list */ + iavf_free_virt_mem(hw, &hw->aq.asq.cmd_buf); + + /* free the descriptor memory */ + iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf); + + /* free the dma header */ + iavf_free_virt_mem(hw, &hw->aq.asq.dma_head); +} + +/** + * iavf_config_asq_regs - configure ASQ registers + * @hw: pointer to the hardware structure + * + * Configure base address and length registers for the transmit queue + **/ +STATIC enum iavf_status iavf_config_asq_regs(struct iavf_hw *hw) +{ + enum iavf_status ret_code = IAVF_SUCCESS; + u32 reg = 0; + + /* Clear Head and Tail */ + wr32(hw, hw->aq.asq.head, 0); + wr32(hw, hw->aq.asq.tail, 0); + + /* set starting point */ + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | + IAVF_VF_ATQLEN1_ATQENABLE_MASK)); + wr32(hw, hw->aq.asq.bal, IAVF_LO_DWORD(hw->aq.asq.desc_buf.pa)); + wr32(hw, hw->aq.asq.bah, IAVF_HI_DWORD(hw->aq.asq.desc_buf.pa)); + + /* Check one register to verify that config was applied */ + reg = rd32(hw, hw->aq.asq.bal); + if (reg != IAVF_LO_DWORD(hw->aq.asq.desc_buf.pa)) + ret_code = IAVF_ERR_ADMIN_QUEUE_ERROR; + + return ret_code; +} + +/** + * iavf_config_arq_regs - ARQ register configuration + * @hw: pointer to the hardware structure + * + * Configure base address and length registers for the receive (event queue) + **/ +STATIC enum iavf_status iavf_config_arq_regs(struct iavf_hw *hw) +{ + enum iavf_status ret_code = IAVF_SUCCESS; + u32 reg = 0; + + /* Clear Head and Tail */ + wr32(hw, hw->aq.arq.head, 0); + wr32(hw, hw->aq.arq.tail, 0); + + /* set starting point */ + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | + IAVF_VF_ARQLEN1_ARQENABLE_MASK)); + wr32(hw, hw->aq.arq.bal, IAVF_LO_DWORD(hw->aq.arq.desc_buf.pa)); + wr32(hw, hw->aq.arq.bah, IAVF_HI_DWORD(hw->aq.arq.desc_buf.pa)); + + /* Update tail in the HW to post pre-allocated buffers */ + wr32(hw, hw->aq.arq.tail, hw->aq.num_arq_entries - 1); + + /* Check one register to verify that config was applied */ + reg = rd32(hw, hw->aq.arq.bal); + if (reg != IAVF_LO_DWORD(hw->aq.arq.desc_buf.pa)) + ret_code = IAVF_ERR_ADMIN_QUEUE_ERROR; + + return ret_code; +} + +/** + * iavf_init_asq - main initialization routine for ASQ + * @hw: pointer to the hardware structure + * + * This is the main initialization routine for the Admin Send Queue + * Prior to calling this function, drivers *MUST* set the following fields + * in the hw->aq structure: + * - hw->aq.num_asq_entries + * - hw->aq.arq_buf_size + * + * Do *NOT* hold the lock when calling this as the memory allocation routines + * called are not going to be atomic context safe + **/ +enum iavf_status iavf_init_asq(struct iavf_hw *hw) +{ + enum iavf_status ret_code = IAVF_SUCCESS; + + if (hw->aq.asq.count > 0) { + /* queue already initialized */ + ret_code = IAVF_ERR_NOT_READY; + goto init_adminq_exit; + } + + /* verify input for valid configuration */ + if ((hw->aq.num_asq_entries == 0) || + (hw->aq.asq_buf_size == 0)) { + ret_code = IAVF_ERR_CONFIG; + goto init_adminq_exit; + } + + hw->aq.asq.next_to_use = 0; + hw->aq.asq.next_to_clean = 0; + + /* allocate the ring memory */ + ret_code = iavf_alloc_adminq_asq_ring(hw); + if (ret_code != IAVF_SUCCESS) + goto init_adminq_exit; + + /* allocate buffers in the rings */ + ret_code = iavf_alloc_asq_bufs(hw); + if (ret_code != IAVF_SUCCESS) + goto init_adminq_free_rings; + + /* initialize base registers */ + ret_code = iavf_config_asq_regs(hw); + if (ret_code != IAVF_SUCCESS) + goto init_config_regs; + + /* success! */ + hw->aq.asq.count = hw->aq.num_asq_entries; + goto init_adminq_exit; + +init_adminq_free_rings: + iavf_free_adminq_asq(hw); + return ret_code; + +init_config_regs: + iavf_free_asq_bufs(hw); + +init_adminq_exit: + return ret_code; +} + +/** + * iavf_init_arq - initialize ARQ + * @hw: pointer to the hardware structure + * + * The main initialization routine for the Admin Receive (Event) Queue. + * Prior to calling this function, drivers *MUST* set the following fields + * in the hw->aq structure: + * - hw->aq.num_asq_entries + * - hw->aq.arq_buf_size + * + * Do *NOT* hold the lock when calling this as the memory allocation routines + * called are not going to be atomic context safe + **/ +enum iavf_status iavf_init_arq(struct iavf_hw *hw) +{ + enum iavf_status ret_code = IAVF_SUCCESS; + + if (hw->aq.arq.count > 0) { + /* queue already initialized */ + ret_code = IAVF_ERR_NOT_READY; + goto init_adminq_exit; + } + + /* verify input for valid configuration */ + if ((hw->aq.num_arq_entries == 0) || + (hw->aq.arq_buf_size == 0)) { + ret_code = IAVF_ERR_CONFIG; + goto init_adminq_exit; + } + + hw->aq.arq.next_to_use = 0; + hw->aq.arq.next_to_clean = 0; + + /* allocate the ring memory */ + ret_code = iavf_alloc_adminq_arq_ring(hw); + if (ret_code != IAVF_SUCCESS) + goto init_adminq_exit; + + /* allocate buffers in the rings */ + ret_code = iavf_alloc_arq_bufs(hw); + if (ret_code != IAVF_SUCCESS) + goto init_adminq_free_rings; + + /* initialize base registers */ + ret_code = iavf_config_arq_regs(hw); + if (ret_code != IAVF_SUCCESS) + goto init_adminq_free_rings; + + /* success! */ + hw->aq.arq.count = hw->aq.num_arq_entries; + goto init_adminq_exit; + +init_adminq_free_rings: + iavf_free_adminq_arq(hw); + +init_adminq_exit: + return ret_code; +} + +/** + * iavf_shutdown_asq - shutdown the ASQ + * @hw: pointer to the hardware structure + * + * The main shutdown routine for the Admin Send Queue + **/ +enum iavf_status iavf_shutdown_asq(struct iavf_hw *hw) +{ + enum iavf_status ret_code = IAVF_SUCCESS; + + iavf_acquire_spinlock(&hw->aq.asq_spinlock); + + if (hw->aq.asq.count == 0) { + ret_code = IAVF_ERR_NOT_READY; + goto shutdown_asq_out; + } + + /* Stop firmware AdminQ processing */ + wr32(hw, hw->aq.asq.head, 0); + wr32(hw, hw->aq.asq.tail, 0); + wr32(hw, hw->aq.asq.len, 0); + wr32(hw, hw->aq.asq.bal, 0); + wr32(hw, hw->aq.asq.bah, 0); + + hw->aq.asq.count = 0; /* to indicate uninitialized queue */ + + /* free ring buffers */ + iavf_free_asq_bufs(hw); + +shutdown_asq_out: + iavf_release_spinlock(&hw->aq.asq_spinlock); + return ret_code; +} + +/** + * iavf_shutdown_arq - shutdown ARQ + * @hw: pointer to the hardware structure + * + * The main shutdown routine for the Admin Receive Queue + **/ +enum iavf_status iavf_shutdown_arq(struct iavf_hw *hw) +{ + enum iavf_status ret_code = IAVF_SUCCESS; + + iavf_acquire_spinlock(&hw->aq.arq_spinlock); + + if (hw->aq.arq.count == 0) { + ret_code = IAVF_ERR_NOT_READY; + goto shutdown_arq_out; + } + + /* Stop firmware AdminQ processing */ + wr32(hw, hw->aq.arq.head, 0); + wr32(hw, hw->aq.arq.tail, 0); + wr32(hw, hw->aq.arq.len, 0); + wr32(hw, hw->aq.arq.bal, 0); + wr32(hw, hw->aq.arq.bah, 0); + + hw->aq.arq.count = 0; /* to indicate uninitialized queue */ + + /* free ring buffers */ + iavf_free_arq_bufs(hw); + +shutdown_arq_out: + iavf_release_spinlock(&hw->aq.arq_spinlock); + return ret_code; +} + +/** + * iavf_init_adminq - main initialization routine for Admin Queue + * @hw: pointer to the hardware structure + * + * Prior to calling this function, drivers *MUST* set the following fields + * in the hw->aq structure: + * - hw->aq.num_asq_entries + * - hw->aq.num_arq_entries + * - hw->aq.arq_buf_size + * - hw->aq.asq_buf_size + **/ +enum iavf_status iavf_init_adminq(struct iavf_hw *hw) +{ + enum iavf_status ret_code; + + /* verify input for valid configuration */ + if ((hw->aq.num_arq_entries == 0) || + (hw->aq.num_asq_entries == 0) || + (hw->aq.arq_buf_size == 0) || + (hw->aq.asq_buf_size == 0)) { + ret_code = IAVF_ERR_CONFIG; + goto init_adminq_exit; + } + iavf_init_spinlock(&hw->aq.asq_spinlock); + iavf_init_spinlock(&hw->aq.arq_spinlock); + + /* Set up register offsets */ + iavf_adminq_init_regs(hw); + + /* setup ASQ command write back timeout */ + hw->aq.asq_cmd_timeout = IAVF_ASQ_CMD_TIMEOUT; + + /* allocate the ASQ */ + ret_code = iavf_init_asq(hw); + if (ret_code != IAVF_SUCCESS) + goto init_adminq_destroy_spinlocks; + + /* allocate the ARQ */ + ret_code = iavf_init_arq(hw); + if (ret_code != IAVF_SUCCESS) + goto init_adminq_free_asq; + + /* success! */ + goto init_adminq_exit; + +init_adminq_free_asq: + iavf_shutdown_asq(hw); +init_adminq_destroy_spinlocks: + iavf_destroy_spinlock(&hw->aq.asq_spinlock); + iavf_destroy_spinlock(&hw->aq.arq_spinlock); + +init_adminq_exit: + return ret_code; +} + +/** + * iavf_shutdown_adminq - shutdown routine for the Admin Queue + * @hw: pointer to the hardware structure + **/ +enum iavf_status iavf_shutdown_adminq(struct iavf_hw *hw) +{ + enum iavf_status ret_code = IAVF_SUCCESS; + + if (iavf_check_asq_alive(hw)) + iavf_aq_queue_shutdown(hw, true); + + iavf_shutdown_asq(hw); + iavf_shutdown_arq(hw); + iavf_destroy_spinlock(&hw->aq.asq_spinlock); + iavf_destroy_spinlock(&hw->aq.arq_spinlock); + + return ret_code; +} + +/** + * iavf_clean_asq - cleans Admin send queue + * @hw: pointer to the hardware structure + * + * returns the number of free desc + **/ +u16 iavf_clean_asq(struct iavf_hw *hw) +{ + struct iavf_adminq_ring *asq = &(hw->aq.asq); + struct iavf_asq_cmd_details *details; + u16 ntc = asq->next_to_clean; + struct iavf_aq_desc desc_cb; + struct iavf_aq_desc *desc; + + desc = IAVF_ADMINQ_DESC(*asq, ntc); + details = IAVF_ADMINQ_DETAILS(*asq, ntc); + while (rd32(hw, hw->aq.asq.head) != ntc) { + iavf_debug(hw, IAVF_DEBUG_AQ_MESSAGE, + "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head)); + + if (details->callback) { + IAVF_ADMINQ_CALLBACK cb_func = + (IAVF_ADMINQ_CALLBACK)details->callback; + iavf_memcpy(&desc_cb, desc, sizeof(struct iavf_aq_desc), + IAVF_DMA_TO_DMA); + cb_func(hw, &desc_cb); + } + iavf_memset(desc, 0, sizeof(*desc), IAVF_DMA_MEM); + iavf_memset(details, 0, sizeof(*details), IAVF_NONDMA_MEM); + ntc++; + if (ntc == asq->count) + ntc = 0; + desc = IAVF_ADMINQ_DESC(*asq, ntc); + details = IAVF_ADMINQ_DETAILS(*asq, ntc); + } + + asq->next_to_clean = ntc; + + return IAVF_DESC_UNUSED(asq); +} + +/** + * iavf_asq_done - check if FW has processed the Admin Send Queue + * @hw: pointer to the hw struct + * + * Returns true if the firmware has processed all descriptors on the + * admin send queue. Returns false if there are still requests pending. + **/ +bool iavf_asq_done(struct iavf_hw *hw) +{ + /* AQ designers suggest use of head for better + * timing reliability than DD bit + */ + return rd32(hw, hw->aq.asq.head) == hw->aq.asq.next_to_use; + +} + +/** + * iavf_asq_send_command - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * + * This is the main send command driver routine for the Admin Queue send + * queue. It runs the queue, cleans the queue, etc + **/ +enum iavf_status iavf_asq_send_command(struct iavf_hw *hw, + struct iavf_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct iavf_asq_cmd_details *cmd_details) +{ + enum iavf_status status = IAVF_SUCCESS; + struct iavf_dma_mem *dma_buff = NULL; + struct iavf_asq_cmd_details *details; + struct iavf_aq_desc *desc_on_ring; + bool cmd_completed = false; + u16 retval = 0; + u32 val = 0; + + iavf_acquire_spinlock(&hw->aq.asq_spinlock); + + hw->aq.asq_last_status = IAVF_AQ_RC_OK; + + if (hw->aq.asq.count == 0) { + iavf_debug(hw, IAVF_DEBUG_AQ_MESSAGE, + "AQTX: Admin queue not initialized.\n"); + status = IAVF_ERR_QUEUE_EMPTY; + goto asq_send_command_error; + } + + val = rd32(hw, hw->aq.asq.head); + if (val >= hw->aq.num_asq_entries) { + iavf_debug(hw, IAVF_DEBUG_AQ_MESSAGE, + "AQTX: head overrun at %d\n", val); + status = IAVF_ERR_QUEUE_EMPTY; + goto asq_send_command_error; + } + + details = IAVF_ADMINQ_DETAILS(hw->aq.asq, hw->aq.asq.next_to_use); + if (cmd_details) { + iavf_memcpy(details, + cmd_details, + sizeof(struct iavf_asq_cmd_details), + IAVF_NONDMA_TO_NONDMA); + + /* If the cmd_details are defined copy the cookie. The + * CPU_TO_LE32 is not needed here because the data is ignored + * by the FW, only used by the driver + */ + if (details->cookie) { + desc->cookie_high = + CPU_TO_LE32(IAVF_HI_DWORD(details->cookie)); + desc->cookie_low = + CPU_TO_LE32(IAVF_LO_DWORD(details->cookie)); + } + } else { + iavf_memset(details, 0, + sizeof(struct iavf_asq_cmd_details), + IAVF_NONDMA_MEM); + } + + /* clear requested flags and then set additional flags if defined */ + desc->flags &= ~CPU_TO_LE16(details->flags_dis); + desc->flags |= CPU_TO_LE16(details->flags_ena); + + if (buff_size > hw->aq.asq_buf_size) { + iavf_debug(hw, + IAVF_DEBUG_AQ_MESSAGE, + "AQTX: Invalid buffer size: %d.\n", + buff_size); + status = IAVF_ERR_INVALID_SIZE; + goto asq_send_command_error; + } + + if (details->postpone && !details->async) { + iavf_debug(hw, + IAVF_DEBUG_AQ_MESSAGE, + "AQTX: Async flag not set along with postpone flag"); + status = IAVF_ERR_PARAM; + goto asq_send_command_error; + } + + /* call clean and check queue available function to reclaim the + * descriptors that were processed by FW, the function returns the + * number of desc available + */ + /* the clean function called here could be called in a separate thread + * in case of asynchronous completions + */ + if (iavf_clean_asq(hw) == 0) { + iavf_debug(hw, + IAVF_DEBUG_AQ_MESSAGE, + "AQTX: Error queue is full.\n"); + status = IAVF_ERR_ADMIN_QUEUE_FULL; + goto asq_send_command_error; + } + + /* initialize the temp desc pointer with the right desc */ + desc_on_ring = IAVF_ADMINQ_DESC(hw->aq.asq, hw->aq.asq.next_to_use); + + /* if the desc is available copy the temp desc to the right place */ + iavf_memcpy(desc_on_ring, desc, sizeof(struct iavf_aq_desc), + IAVF_NONDMA_TO_DMA); + + /* if buff is not NULL assume indirect command */ + if (buff != NULL) { + dma_buff = &(hw->aq.asq.r.asq_bi[hw->aq.asq.next_to_use]); + /* copy the user buff into the respective DMA buff */ + iavf_memcpy(dma_buff->va, buff, buff_size, + IAVF_NONDMA_TO_DMA); + desc_on_ring->datalen = CPU_TO_LE16(buff_size); + + /* Update the address values in the desc with the pa value + * for respective buffer + */ + desc_on_ring->params.external.addr_high = + CPU_TO_LE32(IAVF_HI_DWORD(dma_buff->pa)); + desc_on_ring->params.external.addr_low = + CPU_TO_LE32(IAVF_LO_DWORD(dma_buff->pa)); + } + + /* bump the tail */ + iavf_debug(hw, IAVF_DEBUG_AQ_MESSAGE, "AQTX: desc and buffer:\n"); + iavf_debug_aq(hw, IAVF_DEBUG_AQ_COMMAND, (void *)desc_on_ring, + buff, buff_size); + (hw->aq.asq.next_to_use)++; + if (hw->aq.asq.next_to_use == hw->aq.asq.count) + hw->aq.asq.next_to_use = 0; + if (!details->postpone) + wr32(hw, hw->aq.asq.tail, hw->aq.asq.next_to_use); + + /* if cmd_details are not defined or async flag is not set, + * we need to wait for desc write back + */ + if (!details->async && !details->postpone) { + u32 total_delay = 0; + + do { + /* AQ designers suggest use of head for better + * timing reliability than DD bit + */ + if (iavf_asq_done(hw)) + break; + iavf_usec_delay(50); + total_delay += 50; + } while (total_delay < hw->aq.asq_cmd_timeout); + } + + /* if ready, copy the desc back to temp */ + if (iavf_asq_done(hw)) { + iavf_memcpy(desc, desc_on_ring, sizeof(struct iavf_aq_desc), + IAVF_DMA_TO_NONDMA); + if (buff != NULL) + iavf_memcpy(buff, dma_buff->va, buff_size, + IAVF_DMA_TO_NONDMA); + retval = LE16_TO_CPU(desc->retval); + if (retval != 0) { + iavf_debug(hw, + IAVF_DEBUG_AQ_MESSAGE, + "AQTX: Command completed with error 0x%X.\n", + retval); + + /* strip off FW internal code */ + retval &= 0xff; + } + cmd_completed = true; + if ((enum iavf_admin_queue_err)retval == IAVF_AQ_RC_OK) + status = IAVF_SUCCESS; + else if ((enum iavf_admin_queue_err)retval == IAVF_AQ_RC_EBUSY) + status = IAVF_ERR_NOT_READY; + else + status = IAVF_ERR_ADMIN_QUEUE_ERROR; + hw->aq.asq_last_status = (enum iavf_admin_queue_err)retval; + } + + iavf_debug(hw, IAVF_DEBUG_AQ_MESSAGE, + "AQTX: desc and buffer writeback:\n"); + iavf_debug_aq(hw, IAVF_DEBUG_AQ_COMMAND, (void *)desc, buff, buff_size); + + /* save writeback aq if requested */ + if (details->wb_desc) + iavf_memcpy(details->wb_desc, desc_on_ring, + sizeof(struct iavf_aq_desc), IAVF_DMA_TO_NONDMA); + + /* update the error if time out occurred */ + if ((!cmd_completed) && + (!details->async && !details->postpone)) { + if (rd32(hw, hw->aq.asq.len) & IAVF_VF_ATQLEN1_ATQCRIT_MASK) { + iavf_debug(hw, IAVF_DEBUG_AQ_MESSAGE, + "AQTX: AQ Critical error.\n"); + status = IAVF_ERR_ADMIN_QUEUE_CRITICAL_ERROR; + } else { + iavf_debug(hw, IAVF_DEBUG_AQ_MESSAGE, + "AQTX: Writeback timeout.\n"); + status = IAVF_ERR_ADMIN_QUEUE_TIMEOUT; + } + } + +asq_send_command_error: *** 12827 LINES SKIPPED *** From nobody Wed Nov 24 19:54:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B6653189F584; Wed, 24 Nov 2021 19: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 4HzsD11MfWz4pk2; Wed, 24 Nov 2021 19:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3F1B1013D; Wed, 24 Nov 2021 19: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 1AOJseeJ001303; Wed, 24 Nov 2021 19: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 1AOJseIR001302; Wed, 24 Nov 2021 19:54:40 GMT (envelope-from git) Date: Wed, 24 Nov 2021 19:54:40 GMT Message-Id: <202111241954.1AOJseIR001302@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: 409b36ad911d - main - ixl(4): Remove iavf(4) source 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: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 409b36ad911d0a12a45c1488369b458965691379 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637783681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+OxEOVh0WL5a1XwAIQqwdLUnPqjniXRdRQ/NAq8eo8g=; b=r543R4b4uPgyfJKBTji3ay6VxHKgY9EjtO8rI+OkPkSaL108N6v3OAToszFLnkAV9MjXXY +dzEP6U6Gxqh5YFL+7isr19pZ+27VYXxo+O6i6oE9uw3oBZykZopPVsXEqrgxinxuykpSF qWbAwkvsSb3hNbSmtCzeR3PfXOVEjfVBgDXUXYdRN0RnWfSbM/fOPtK0m83nm1MxgkQlSr dkaA4TyFWlI6rJ5x01eV83NcSwP7H/sRoUGQdBrXrMmI+f6ywyWBXxE9stJhP2RZ7aMsLd yXEURpxb4C8OTCVc+WDuGZ031bwQt+K5AiiqbMaLr+RDpWCwBxKXwXjCpfQhhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637783681; a=rsa-sha256; cv=none; b=gwGs7VIET+ZdcAbg1F2YMhCk7fbe1KOS++jUq7mLUsmemEZhAgqbFuRVEPLCt+UkcJ2SG9 MzcklGovqAH68XxUQBd9lb7uzIoVapYdkVpEQfAy3Ukt34K7wl5KcRoa5qRdp1P259uwNL c+CpuWLfltjf3eikNDkmle4EmdIfyxCnp2kTIyfYIPrENneANFlYR3E3QJ0742BY/KVhYB hoKG+iuwHV7pKziZ9xoDLyy5bW233i/pALzp2xVsMGL+Lx60euNugpc5kgFquqCH5tK5WK odr4m3sk7+gXtAne481PvlLr+w3AkR0Z7Zo4wJXOrfukK+feDFmnI6TImtae4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=409b36ad911d0a12a45c1488369b458965691379 commit 409b36ad911d0a12a45c1488369b458965691379 Author: Eric Joyner AuthorDate: 2021-02-13 00:04:54 +0000 Commit: Eric Joyner CommitDate: 2021-11-24 19:54:08 +0000 ixl(4): Remove iavf(4) source files Since iavf(4) no longer shares code with ixl(4) as of commit f2fbd56a8d07665bc0a5e8b7e40026b50a591e2a and now has its own directory, remove these now-unused iavf(4)-only files. Signed-off-by: Eric Joyner Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D28638 --- sys/dev/ixl/iavf.h | 225 ----- sys/dev/ixl/iavf_vc.c | 1010 -------------------- sys/dev/ixl/if_iavf.c | 2448 ------------------------------------------------- 3 files changed, 3683 deletions(-) diff --git a/sys/dev/ixl/iavf.h b/sys/dev/ixl/iavf.h deleted file mode 100644 index 9a7716c5e5a2..000000000000 --- a/sys/dev/ixl/iavf.h +++ /dev/null @@ -1,225 +0,0 @@ -/****************************************************************************** - - Copyright (c) 2013-2018, Intel Corporation - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Intel Corporation nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************/ -/*$FreeBSD$*/ - - -#ifndef _IAVF_H_ -#define _IAVF_H_ - -#include "ixl.h" - -#define IAVF_AQ_MAX_ERR 200 -#define IAVF_MAX_FILTERS 128 -#define IAVF_MAX_QUEUES 16 -#define IAVF_AQ_TIMEOUT (1 * hz) - -/* MacVlan Flags */ -#define IAVF_FILTER_USED (u16)(1 << 0) -#define IAVF_FILTER_VLAN (u16)(1 << 1) -#define IAVF_FILTER_ADD (u16)(1 << 2) -#define IAVF_FILTER_DEL (u16)(1 << 3) -#define IAVF_FILTER_MC (u16)(1 << 4) - -#define IAVF_FLAG_AQ_ENABLE_QUEUES (u32)(1 << 0) -#define IAVF_FLAG_AQ_DISABLE_QUEUES (u32)(1 << 1) -#define IAVF_FLAG_AQ_ADD_MAC_FILTER (u32)(1 << 2) -#define IAVF_FLAG_AQ_ADD_VLAN_FILTER (u32)(1 << 3) -#define IAVF_FLAG_AQ_DEL_MAC_FILTER (u32)(1 << 4) -#define IAVF_FLAG_AQ_DEL_VLAN_FILTER (u32)(1 << 5) -#define IAVF_FLAG_AQ_CONFIGURE_QUEUES (u32)(1 << 6) -#define IAVF_FLAG_AQ_MAP_VECTORS (u32)(1 << 7) -#define IAVF_FLAG_AQ_HANDLE_RESET (u32)(1 << 8) -#define IAVF_FLAG_AQ_CONFIGURE_PROMISC (u32)(1 << 9) -#define IAVF_FLAG_AQ_GET_STATS (u32)(1 << 10) -#define IAVF_FLAG_AQ_CONFIG_RSS_KEY (u32)(1 << 11) -#define IAVF_FLAG_AQ_SET_RSS_HENA (u32)(1 << 12) -#define IAVF_FLAG_AQ_GET_RSS_HENA_CAPS (u32)(1 << 13) -#define IAVF_FLAG_AQ_CONFIG_RSS_LUT (u32)(1 << 14) - -/* printf %b flag args */ -#define IAVF_FLAGS \ - "\20\1ENABLE_QUEUES\2DISABLE_QUEUES\3ADD_MAC_FILTER" \ - "\4ADD_VLAN_FILTER\5DEL_MAC_FILTER\6DEL_VLAN_FILTER" \ - "\7CONFIGURE_QUEUES\10MAP_VECTORS\11HANDLE_RESET" \ - "\12CONFIGURE_PROMISC\13GET_STATS\14CONFIG_RSS_KEY" \ - "\15SET_RSS_HENA\16GET_RSS_HENA_CAPS\17CONFIG_RSS_LUT" -#define IAVF_PRINTF_VF_OFFLOAD_FLAGS \ - "\20\1L2" \ - "\2IWARP" \ - "\3RSVD" \ - "\4RSS_AQ" \ - "\5RSS_REG" \ - "\6WB_ON_ITR" \ - "\7REQ_QUEUES" \ - "\21VLAN" \ - "\22RX_POLLING" \ - "\23RSS_PCTYPE_V2" \ - "\24RSS_PF" \ - "\25ENCAP" \ - "\26ENCAP_CSUM" \ - "\27RX_ENCAP_CSUM" - -MALLOC_DECLARE(M_IAVF); - -/* Driver state */ -enum iavf_state_t { - IAVF_RESET_REQUIRED, - IAVF_RESET_PENDING, - IAVF_INIT_READY, - IAVF_RUNNING, -}; - -/* Structs */ - -struct iavf_mac_filter { - SLIST_ENTRY(iavf_mac_filter) next; - u8 macaddr[ETHER_ADDR_LEN]; - u16 flags; -}; -SLIST_HEAD(mac_list, iavf_mac_filter); - -struct iavf_vlan_filter { - SLIST_ENTRY(iavf_vlan_filter) next; - u16 vlan; - u16 flags; -}; -SLIST_HEAD(vlan_list, iavf_vlan_filter); - -/* Software controller structure */ -struct iavf_sc { - struct ixl_vsi vsi; - - struct i40e_hw hw; - struct i40e_osdep osdep; - device_t dev; - - struct resource *pci_mem; - - enum iavf_state_t init_state; - - struct ifmedia media; - struct virtchnl_version_info version; - enum ixl_dbg_mask dbg_mask; - u16 promisc_flags; - - bool link_up; - enum virtchnl_link_speed link_speed; - - /* Tunable settings */ - int tx_itr; - int rx_itr; - int dynamic_tx_itr; - int dynamic_rx_itr; - - /* Filter lists */ - struct mac_list *mac_filters; - struct vlan_list *vlan_filters; - - /* Virtual comm channel */ - struct virtchnl_vf_resource *vf_res; - struct virtchnl_vsi_resource *vsi_res; - - /* Misc stats maintained by the driver */ - u64 admin_irq; - - /* Buffer used for reading AQ responses */ - u8 aq_buffer[IXL_AQ_BUF_SZ]; - - /* State flag used in init/stop */ - u32 queues_enabled; - u8 enable_queues_chan; - u8 disable_queues_chan; -}; - -/* -** This checks for a zero mac addr, something that will be likely -** unless the Admin on the Host has created one. -*/ -static inline bool -iavf_check_ether_addr(u8 *addr) -{ - bool status = TRUE; - - if ((addr[0] == 0 && addr[1]== 0 && addr[2] == 0 && - addr[3] == 0 && addr[4]== 0 && addr[5] == 0)) - status = FALSE; - return (status); -} - -/* Debug printing */ -#define iavf_dbg(sc, m, s, ...) ixl_debug_core(sc->dev, sc->dbg_mask, m, s, ##__VA_ARGS__) -#define iavf_dbg_init(sc, s, ...) ixl_debug_core(sc->dev, sc->dbg_mask, IAVF_DBG_INIT, s, ##__VA_ARGS__) -#define iavf_dbg_info(sc, s, ...) ixl_debug_core(sc->dev, sc->dbg_mask, IAVF_DBG_INFO, s, ##__VA_ARGS__) -#define iavf_dbg_vc(sc, s, ...) ixl_debug_core(sc->dev, sc->dbg_mask, IAVF_DBG_VC, s, ##__VA_ARGS__) -#define iavf_dbg_filter(sc, s, ...) ixl_debug_core(sc->dev, sc->dbg_mask, IAVF_DBG_FILTER, s, ##__VA_ARGS__) - -/* -** VF Common function prototypes -*/ -void iavf_if_init(if_ctx_t ctx); - -int iavf_send_api_ver(struct iavf_sc *); -int iavf_verify_api_ver(struct iavf_sc *); -int iavf_send_vf_config_msg(struct iavf_sc *); -int iavf_get_vf_config(struct iavf_sc *); -void iavf_init(void *); -int iavf_reinit_locked(struct iavf_sc *); -int iavf_configure_queues(struct iavf_sc *); -int iavf_enable_queues(struct iavf_sc *); -int iavf_disable_queues(struct iavf_sc *); -int iavf_map_queues(struct iavf_sc *); -void iavf_enable_intr(struct ixl_vsi *); -void iavf_disable_intr(struct ixl_vsi *); -int iavf_add_ether_filters(struct iavf_sc *); -int iavf_del_ether_filters(struct iavf_sc *); -int iavf_request_stats(struct iavf_sc *); -int iavf_request_reset(struct iavf_sc *); -void iavf_vc_completion(struct iavf_sc *, - enum virtchnl_ops, enum virtchnl_status_code, - u8 *, u16); -int iavf_add_ether_filter(struct iavf_sc *); -int iavf_add_vlans(struct iavf_sc *); -int iavf_del_vlans(struct iavf_sc *); -void iavf_update_stats_counters(struct iavf_sc *, - struct i40e_eth_stats *); -void iavf_update_link_status(struct iavf_sc *); -int iavf_get_default_rss_key(u32 *, bool); -int iavf_config_rss_key(struct iavf_sc *); -int iavf_set_rss_hena(struct iavf_sc *); -int iavf_config_rss_lut(struct iavf_sc *); -int iavf_config_promisc_mode(struct iavf_sc *); - -int ixl_vc_send_cmd(struct iavf_sc *sc, uint32_t request); -char *iavf_vc_speed_to_string(enum virtchnl_link_speed link_speed); -void *ixl_vc_get_op_chan(struct iavf_sc *sc, uint32_t request); -#endif /* _IAVF_H_ */ diff --git a/sys/dev/ixl/iavf_vc.c b/sys/dev/ixl/iavf_vc.c deleted file mode 100644 index ed9cc8432438..000000000000 --- a/sys/dev/ixl/iavf_vc.c +++ /dev/null @@ -1,1010 +0,0 @@ -/****************************************************************************** - - Copyright (c) 2013-2018, Intel Corporation - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Intel Corporation nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************/ -/*$FreeBSD$*/ - -/* -** Virtual Channel support -** These are support functions to communication -** between the VF and PF drivers. -*/ - -#include "ixl.h" -#include "iavf.h" - -/* busy wait delay in msec */ -#define IAVF_BUSY_WAIT_DELAY 10 -#define IAVF_BUSY_WAIT_COUNT 50 - -/* -** iavf_send_pf_msg -** -** Send message to PF and print status if failure. -*/ -static int -iavf_send_pf_msg(struct iavf_sc *sc, - enum virtchnl_ops op, u8 *msg, u16 len) -{ - struct i40e_hw *hw = &sc->hw; - device_t dev = sc->dev; - i40e_status status; - int val_err; - - /* Validating message before sending it to the PF */ - val_err = virtchnl_vc_validate_vf_msg(&sc->version, op, msg, len); - if (val_err) - device_printf(dev, "Error validating msg to PF for op %d," - " msglen %d: error %d\n", op, len, val_err); - - if (!i40e_check_asq_alive(hw)) { - if (op != VIRTCHNL_OP_GET_STATS) - device_printf(dev, "Unable to send opcode %s to PF, " - "ASQ is not alive\n", ixl_vc_opcode_str(op)); - return (0); - } - - if (op != VIRTCHNL_OP_GET_STATS) - iavf_dbg_vc(sc, - "Sending msg (op=%s[%d]) to PF\n", - ixl_vc_opcode_str(op), op); - - status = i40e_aq_send_msg_to_pf(hw, op, I40E_SUCCESS, msg, len, NULL); - if (status && op != VIRTCHNL_OP_GET_STATS) - device_printf(dev, "Unable to send opcode %s to PF, " - "status %s, aq error %s\n", - ixl_vc_opcode_str(op), - i40e_stat_str(hw, status), - i40e_aq_str(hw, hw->aq.asq_last_status)); - - return (status); -} - -/* -** iavf_send_api_ver -** -** Send API version admin queue message to the PF. The reply is not checked -** in this function. Returns 0 if the message was successfully -** sent, or one of the I40E_ADMIN_QUEUE_ERROR_ statuses if not. -*/ -int -iavf_send_api_ver(struct iavf_sc *sc) -{ - struct virtchnl_version_info vvi; - - vvi.major = VIRTCHNL_VERSION_MAJOR; - vvi.minor = VIRTCHNL_VERSION_MINOR; - - return iavf_send_pf_msg(sc, VIRTCHNL_OP_VERSION, - (u8 *)&vvi, sizeof(vvi)); -} - -/* -** iavf_verify_api_ver -** -** Compare API versions with the PF. Must be called after admin queue is -** initialized. Returns 0 if API versions match, EIO if -** they do not, or I40E_ERR_ADMIN_QUEUE_NO_WORK if the admin queue is empty. -*/ -int -iavf_verify_api_ver(struct iavf_sc *sc) -{ - struct virtchnl_version_info *pf_vvi; - struct i40e_hw *hw = &sc->hw; - struct i40e_arq_event_info event; - device_t dev = sc->dev; - i40e_status err; - int retries = 0; - - event.buf_len = IXL_AQ_BUF_SZ; - event.msg_buf = malloc(event.buf_len, M_IAVF, M_WAITOK); - - for (;;) { - if (++retries > IAVF_AQ_MAX_ERR) - goto out_alloc; - - /* Initial delay here is necessary */ - i40e_msec_pause(100); - err = i40e_clean_arq_element(hw, &event, NULL); - if (err == I40E_ERR_ADMIN_QUEUE_NO_WORK) - continue; - else if (err) { - err = EIO; - goto out_alloc; - } - - if ((enum virtchnl_ops)le32toh(event.desc.cookie_high) != - VIRTCHNL_OP_VERSION) { - DDPRINTF(dev, "Received unexpected op response: %d\n", - le32toh(event.desc.cookie_high)); - /* Don't stop looking for expected response */ - continue; - } - - err = (i40e_status)le32toh(event.desc.cookie_low); - if (err) { - err = EIO; - goto out_alloc; - } else - break; - } - - pf_vvi = (struct virtchnl_version_info *)event.msg_buf; - if ((pf_vvi->major > VIRTCHNL_VERSION_MAJOR) || - ((pf_vvi->major == VIRTCHNL_VERSION_MAJOR) && - (pf_vvi->minor > VIRTCHNL_VERSION_MINOR))) { - device_printf(dev, "Critical PF/VF API version mismatch!\n"); - err = EIO; - } else { - sc->version.major = pf_vvi->major; - sc->version.minor = pf_vvi->minor; - } - - /* Log PF/VF api versions */ - device_printf(dev, "PF API %d.%d / VF API %d.%d\n", - pf_vvi->major, pf_vvi->minor, - VIRTCHNL_VERSION_MAJOR, VIRTCHNL_VERSION_MINOR); - -out_alloc: - free(event.msg_buf, M_IAVF); - return (err); -} - -/* -** iavf_send_vf_config_msg -** -** Send VF configuration request admin queue message to the PF. The reply -** is not checked in this function. Returns 0 if the message was -** successfully sent, or one of the I40E_ADMIN_QUEUE_ERROR_ statuses if not. -*/ -int -iavf_send_vf_config_msg(struct iavf_sc *sc) -{ - u32 caps; - - caps = VIRTCHNL_VF_OFFLOAD_L2 | - VIRTCHNL_VF_OFFLOAD_RSS_PF | - VIRTCHNL_VF_OFFLOAD_VLAN; - - iavf_dbg_info(sc, "Sending offload flags: 0x%b\n", - caps, IAVF_PRINTF_VF_OFFLOAD_FLAGS); - - if (sc->version.minor == VIRTCHNL_VERSION_MINOR_NO_VF_CAPS) - return iavf_send_pf_msg(sc, VIRTCHNL_OP_GET_VF_RESOURCES, - NULL, 0); - else - return iavf_send_pf_msg(sc, VIRTCHNL_OP_GET_VF_RESOURCES, - (u8 *)&caps, sizeof(caps)); -} - -/* -** iavf_get_vf_config -** -** Get VF configuration from PF and populate hw structure. Must be called after -** admin queue is initialized. Busy waits until response is received from PF, -** with maximum timeout. Response from PF is returned in the buffer for further -** processing by the caller. -*/ -int -iavf_get_vf_config(struct iavf_sc *sc) -{ - struct i40e_hw *hw = &sc->hw; - device_t dev = sc->dev; - struct i40e_arq_event_info event; - u16 len; - i40e_status err = 0; - u32 retries = 0; - - /* Note this assumes a single VSI */ - len = sizeof(struct virtchnl_vf_resource) + - sizeof(struct virtchnl_vsi_resource); - event.buf_len = len; - event.msg_buf = malloc(event.buf_len, M_IAVF, M_WAITOK); - - for (;;) { - err = i40e_clean_arq_element(hw, &event, NULL); - if (err == I40E_ERR_ADMIN_QUEUE_NO_WORK) { - if (++retries <= IAVF_AQ_MAX_ERR) - i40e_msec_pause(10); - } else if ((enum virtchnl_ops)le32toh(event.desc.cookie_high) != - VIRTCHNL_OP_GET_VF_RESOURCES) { - DDPRINTF(dev, "Received a response from PF," - " opcode %d, error %d", - le32toh(event.desc.cookie_high), - le32toh(event.desc.cookie_low)); - retries++; - continue; - } else { - err = (i40e_status)le32toh(event.desc.cookie_low); - if (err) { - device_printf(dev, "%s: Error returned from PF," - " opcode %d, error %d\n", __func__, - le32toh(event.desc.cookie_high), - le32toh(event.desc.cookie_low)); - err = EIO; - goto out_alloc; - } - /* We retrieved the config message, with no errors */ - break; - } - - if (retries > IAVF_AQ_MAX_ERR) { - INIT_DBG_DEV(dev, "Did not receive response after %d tries.", - retries); - err = ETIMEDOUT; - goto out_alloc; - } - } - - memcpy(sc->vf_res, event.msg_buf, min(event.msg_len, len)); - i40e_vf_parse_hw_config(hw, sc->vf_res); - -out_alloc: - free(event.msg_buf, M_IAVF); - return err; -} - -/* -** iavf_configure_queues -** -** Request that the PF set up our queues. -*/ -int -iavf_configure_queues(struct iavf_sc *sc) -{ - device_t dev = sc->dev; - struct ixl_vsi *vsi = &sc->vsi; - if_softc_ctx_t scctx = iflib_get_softc_ctx(vsi->ctx); - struct ixl_tx_queue *tx_que = vsi->tx_queues; - struct ixl_rx_queue *rx_que = vsi->rx_queues; - struct tx_ring *txr; - struct rx_ring *rxr; - int len, pairs; - - struct virtchnl_vsi_queue_config_info *vqci; - struct virtchnl_queue_pair_info *vqpi; - - /* XXX: Linux PF driver wants matching ids in each tx/rx struct, so both TX/RX - * queues of a pair need to be configured */ - pairs = max(vsi->num_tx_queues, vsi->num_rx_queues); - len = sizeof(struct virtchnl_vsi_queue_config_info) + - (sizeof(struct virtchnl_queue_pair_info) * pairs); - vqci = malloc(len, M_IAVF, M_NOWAIT | M_ZERO); - if (!vqci) { - device_printf(dev, "%s: unable to allocate memory\n", __func__); - return (ENOMEM); - } - vqci->vsi_id = sc->vsi_res->vsi_id; - vqci->num_queue_pairs = pairs; - vqpi = vqci->qpair; - /* Size check is not needed here - HW max is 16 queue pairs, and we - * can fit info for 31 of them into the AQ buffer before it overflows. - */ - // TODO: the above is wrong now; X722 VFs can have 256 queues - for (int i = 0; i < pairs; i++, tx_que++, rx_que++, vqpi++) { - txr = &tx_que->txr; - rxr = &rx_que->rxr; - - vqpi->txq.vsi_id = vqci->vsi_id; - vqpi->txq.queue_id = i; - vqpi->txq.ring_len = scctx->isc_ntxd[0]; - vqpi->txq.dma_ring_addr = txr->tx_paddr; - /* Enable Head writeback */ - if (!vsi->enable_head_writeback) { - vqpi->txq.headwb_enabled = 0; - vqpi->txq.dma_headwb_addr = 0; - } else { - vqpi->txq.headwb_enabled = 1; - vqpi->txq.dma_headwb_addr = txr->tx_paddr + - sizeof(struct i40e_tx_desc) * scctx->isc_ntxd[0]; - } - - vqpi->rxq.vsi_id = vqci->vsi_id; - vqpi->rxq.queue_id = i; - vqpi->rxq.ring_len = scctx->isc_nrxd[0]; - vqpi->rxq.dma_ring_addr = rxr->rx_paddr; - vqpi->rxq.max_pkt_size = scctx->isc_max_frame_size; - vqpi->rxq.databuffer_size = rxr->mbuf_sz; - vqpi->rxq.splithdr_enabled = 0; - } - - iavf_send_pf_msg(sc, VIRTCHNL_OP_CONFIG_VSI_QUEUES, - (u8 *)vqci, len); - free(vqci, M_IAVF); - - return (0); -} - -/* -** iavf_enable_queues -** -** Request that the PF enable all of our queues. -*/ -int -iavf_enable_queues(struct iavf_sc *sc) -{ - struct virtchnl_queue_select vqs; - - vqs.vsi_id = sc->vsi_res->vsi_id; - /* XXX: In Linux PF, as long as neither of these is 0, - * every queue in VF VSI is enabled. */ - vqs.tx_queues = (1 << sc->vsi.num_tx_queues) - 1; - vqs.rx_queues = vqs.tx_queues; - iavf_send_pf_msg(sc, VIRTCHNL_OP_ENABLE_QUEUES, - (u8 *)&vqs, sizeof(vqs)); - return (0); -} - -/* -** iavf_disable_queues -** -** Request that the PF disable all of our queues. -*/ -int -iavf_disable_queues(struct iavf_sc *sc) -{ - struct virtchnl_queue_select vqs; - - vqs.vsi_id = sc->vsi_res->vsi_id; - /* XXX: In Linux PF, as long as neither of these is 0, - * every queue in VF VSI is disabled. */ - vqs.tx_queues = (1 << sc->vsi.num_tx_queues) - 1; - vqs.rx_queues = vqs.tx_queues; - iavf_send_pf_msg(sc, VIRTCHNL_OP_DISABLE_QUEUES, - (u8 *)&vqs, sizeof(vqs)); - return (0); -} - -/* -** iavf_map_queues -** -** Request that the PF map queues to interrupt vectors. Misc causes, including -** admin queue, are always mapped to vector 0. -*/ -int -iavf_map_queues(struct iavf_sc *sc) -{ - struct virtchnl_irq_map_info *vm; - int i, q, len; - struct ixl_vsi *vsi = &sc->vsi; - struct ixl_rx_queue *rx_que = vsi->rx_queues; - if_softc_ctx_t scctx = vsi->shared; - device_t dev = sc->dev; - - // XXX: What happens if we only get 1 MSI-X vector? - MPASS(scctx->isc_vectors > 1); - - /* How many queue vectors, adminq uses one */ - // XXX: How do we know how many interrupt vectors we have? - q = scctx->isc_vectors - 1; - - len = sizeof(struct virtchnl_irq_map_info) + - (scctx->isc_vectors * sizeof(struct virtchnl_vector_map)); - vm = malloc(len, M_IAVF, M_NOWAIT); - if (!vm) { - device_printf(dev, "%s: unable to allocate memory\n", __func__); - return (ENOMEM); - } - - vm->num_vectors = scctx->isc_vectors; - /* Queue vectors first */ - for (i = 0; i < q; i++, rx_que++) { - vm->vecmap[i].vsi_id = sc->vsi_res->vsi_id; - vm->vecmap[i].vector_id = i + 1; /* first is adminq */ - // TODO: Re-examine this - vm->vecmap[i].txq_map = (1 << rx_que->rxr.me); - vm->vecmap[i].rxq_map = (1 << rx_que->rxr.me); - vm->vecmap[i].rxitr_idx = 0; - vm->vecmap[i].txitr_idx = 1; - } - - /* Misc vector last - this is only for AdminQ messages */ - vm->vecmap[i].vsi_id = sc->vsi_res->vsi_id; - vm->vecmap[i].vector_id = 0; - vm->vecmap[i].txq_map = 0; - vm->vecmap[i].rxq_map = 0; - vm->vecmap[i].rxitr_idx = 0; - vm->vecmap[i].txitr_idx = 0; - - iavf_send_pf_msg(sc, VIRTCHNL_OP_CONFIG_IRQ_MAP, - (u8 *)vm, len); - free(vm, M_IAVF); - - return (0); -} - -/* -** Scan the Filter List looking for vlans that need -** to be added, then create the data to hand to the AQ -** for handling. -*/ -int -iavf_add_vlans(struct iavf_sc *sc) -{ - struct virtchnl_vlan_filter_list *v; - struct iavf_vlan_filter *f, *ftmp; - device_t dev = sc->dev; - int len, i = 0, cnt = 0; - - /* Get count of VLAN filters to add */ - SLIST_FOREACH(f, sc->vlan_filters, next) { - if (f->flags & IAVF_FILTER_ADD) - cnt++; - } - - if (!cnt) /* no work... */ - return (ENOENT); - - len = sizeof(struct virtchnl_vlan_filter_list) + - (cnt * sizeof(u16)); - - if (len > IXL_AQ_BUF_SZ) { - device_printf(dev, "%s: Exceeded Max AQ Buf size\n", - __func__); - return (EFBIG); - } - - v = malloc(len, M_IAVF, M_NOWAIT); - if (!v) { - device_printf(dev, "%s: unable to allocate memory\n", - __func__); - return (ENOMEM); - } - - v->vsi_id = sc->vsi_res->vsi_id; - v->num_elements = cnt; - - /* Scan the filter array */ - SLIST_FOREACH_SAFE(f, sc->vlan_filters, next, ftmp) { - if (f->flags & IAVF_FILTER_ADD) { - bcopy(&f->vlan, &v->vlan_id[i], sizeof(u16)); - f->flags = IAVF_FILTER_USED; - i++; - } - if (i == cnt) - break; - } - - iavf_send_pf_msg(sc, VIRTCHNL_OP_ADD_VLAN, (u8 *)v, len); - free(v, M_IAVF); - /* add stats? */ - return (0); -} - -/* -** Scan the Filter Table looking for vlans that need -** to be removed, then create the data to hand to the AQ -** for handling. -*/ -int -iavf_del_vlans(struct iavf_sc *sc) -{ - struct virtchnl_vlan_filter_list *v; - struct iavf_vlan_filter *f, *ftmp; - device_t dev = sc->dev; - int len, i = 0, cnt = 0; - - /* Get count of VLAN filters to delete */ - SLIST_FOREACH(f, sc->vlan_filters, next) { - if (f->flags & IAVF_FILTER_DEL) - cnt++; - } - - if (!cnt) /* no work... */ - return (ENOENT); - - len = sizeof(struct virtchnl_vlan_filter_list) + - (cnt * sizeof(u16)); - - if (len > IXL_AQ_BUF_SZ) { - device_printf(dev, "%s: Exceeded Max AQ Buf size\n", - __func__); - return (EFBIG); - } - - v = malloc(len, M_IAVF, M_NOWAIT | M_ZERO); - if (!v) { - device_printf(dev, "%s: unable to allocate memory\n", - __func__); - return (ENOMEM); - } - - v->vsi_id = sc->vsi_res->vsi_id; - v->num_elements = cnt; - - /* Scan the filter array */ - SLIST_FOREACH_SAFE(f, sc->vlan_filters, next, ftmp) { - if (f->flags & IAVF_FILTER_DEL) { - bcopy(&f->vlan, &v->vlan_id[i], sizeof(u16)); - i++; - SLIST_REMOVE(sc->vlan_filters, f, iavf_vlan_filter, next); - free(f, M_IAVF); - } - if (i == cnt) - break; - } - - iavf_send_pf_msg(sc, VIRTCHNL_OP_DEL_VLAN, (u8 *)v, len); - free(v, M_IAVF); - /* add stats? */ - return (0); -} - - -/* -** This routine takes additions to the vsi filter -** table and creates an Admin Queue call to create -** the filters in the hardware. -*/ -int -iavf_add_ether_filters(struct iavf_sc *sc) -{ - struct virtchnl_ether_addr_list *a; - struct iavf_mac_filter *f; - device_t dev = sc->dev; - int len, j = 0, cnt = 0; - enum i40e_status_code status; - - /* Get count of MAC addresses to add */ - SLIST_FOREACH(f, sc->mac_filters, next) { - if (f->flags & IAVF_FILTER_ADD) - cnt++; - } - if (cnt == 0) { /* Should not happen... */ - iavf_dbg_vc(sc, "%s: cnt == 0, exiting...\n", __func__); - return (ENOENT); - } - - len = sizeof(struct virtchnl_ether_addr_list) + - (cnt * sizeof(struct virtchnl_ether_addr)); - - a = malloc(len, M_IAVF, M_NOWAIT | M_ZERO); - if (a == NULL) { - device_printf(dev, "%s: Failed to get memory for " - "virtchnl_ether_addr_list\n", __func__); - return (ENOMEM); - } - a->vsi_id = sc->vsi.id; - a->num_elements = cnt; - - /* Scan the filter array */ - SLIST_FOREACH(f, sc->mac_filters, next) { - if (f->flags & IAVF_FILTER_ADD) { - bcopy(f->macaddr, a->list[j].addr, ETHER_ADDR_LEN); - f->flags &= ~IAVF_FILTER_ADD; - j++; - - iavf_dbg_vc(sc, "ADD: " MAC_FORMAT "\n", - MAC_FORMAT_ARGS(f->macaddr)); - } - if (j == cnt) - break; - } - DDPRINTF(dev, "len %d, j %d, cnt %d", - len, j, cnt); - - status = iavf_send_pf_msg(sc, - VIRTCHNL_OP_ADD_ETH_ADDR, (u8 *)a, len); - /* add stats? */ - free(a, M_IAVF); - return (status); -} - -/* -** This routine takes filters flagged for deletion in the -** sc MAC filter list and creates an Admin Queue call -** to delete those filters in the hardware. -*/ -int -iavf_del_ether_filters(struct iavf_sc *sc) -{ - struct virtchnl_ether_addr_list *d; - struct iavf_mac_filter *f, *f_temp; - device_t dev = sc->dev; - int len, j = 0, cnt = 0; - - /* Get count of MAC addresses to delete */ - SLIST_FOREACH(f, sc->mac_filters, next) { - if (f->flags & IAVF_FILTER_DEL) - cnt++; - } - if (cnt == 0) { - iavf_dbg_vc(sc, "%s: cnt == 0, exiting...\n", __func__); - return (ENOENT); - } - - len = sizeof(struct virtchnl_ether_addr_list) + - (cnt * sizeof(struct virtchnl_ether_addr)); - - d = malloc(len, M_IAVF, M_NOWAIT | M_ZERO); - if (d == NULL) { - device_printf(dev, "%s: Failed to get memory for " - "virtchnl_ether_addr_list\n", __func__); - return (ENOMEM); - } - d->vsi_id = sc->vsi.id; - d->num_elements = cnt; - - /* Scan the filter array */ - SLIST_FOREACH_SAFE(f, sc->mac_filters, next, f_temp) { - if (f->flags & IAVF_FILTER_DEL) { - bcopy(f->macaddr, d->list[j].addr, ETHER_ADDR_LEN); - iavf_dbg_vc(sc, "DEL: " MAC_FORMAT "\n", - MAC_FORMAT_ARGS(f->macaddr)); - j++; - SLIST_REMOVE(sc->mac_filters, f, iavf_mac_filter, next); - free(f, M_IAVF); - } - if (j == cnt) - break; - } - iavf_send_pf_msg(sc, - VIRTCHNL_OP_DEL_ETH_ADDR, (u8 *)d, len); - /* add stats? */ - free(d, M_IAVF); - return (0); -} - -/* -** iavf_request_reset -** Request that the PF reset this VF. No response is expected. -*/ -int -iavf_request_reset(struct iavf_sc *sc) -{ - /* - ** Set the reset status to "in progress" before - ** the request, this avoids any possibility of - ** a mistaken early detection of completion. - */ - wr32(&sc->hw, I40E_VFGEN_RSTAT, VIRTCHNL_VFR_INPROGRESS); - iavf_send_pf_msg(sc, VIRTCHNL_OP_RESET_VF, NULL, 0); - return (0); -} - -/* -** iavf_request_stats -** Request the statistics for this VF's VSI from PF. -*/ -int -iavf_request_stats(struct iavf_sc *sc) -{ - struct virtchnl_queue_select vqs; - int error = 0; - - vqs.vsi_id = sc->vsi_res->vsi_id; - /* Low priority, we don't need to error check */ - error = iavf_send_pf_msg(sc, VIRTCHNL_OP_GET_STATS, - (u8 *)&vqs, sizeof(vqs)); - if (error) - device_printf(sc->dev, "Error sending stats request to PF: %d\n", error); - - return (0); -} - -/* -** Updates driver's stats counters with VSI stats returned from PF. -*/ -void -iavf_update_stats_counters(struct iavf_sc *sc, struct i40e_eth_stats *es) -{ - struct ixl_vsi *vsi = &sc->vsi; - uint64_t tx_discards; - - tx_discards = es->tx_discards; - - /* Update ifnet stats */ *** 2740 LINES SKIPPED *** From nobody Wed Nov 24 20:19:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7791518AA900; Wed, 24 Nov 2021 20:19: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 4Hzsn31KX8z3Cwl; Wed, 24 Nov 2021 20:19:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D27F10796; Wed, 24 Nov 2021 20:19: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 1AOKJomL029390; Wed, 24 Nov 2021 20:19:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOKJoLs029389; Wed, 24 Nov 2021 20:19:50 GMT (envelope-from git) Date: Wed, 24 Nov 2021 20:19:50 GMT Message-Id: <202111242019.1AOKJoLs029389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: b0c7681ed739 - stable/12 - iser: Remove redundant linuxkpi MODULE_DEPEND List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b0c7681ed7398182de7b9026714c24ec20982796 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637785191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VmTa61eP4mwbByCpQ1UqA3untf7+Zp81zgfVaAqbY/s=; b=RDz5o/mnwwfGUYrffVBuyKKxHpbgYFBhSGRgC6f4aABrVoDbZMDKq6aXWmbQm1EJg0sFBO mASU/ctBaE9QWYullccMYpqKaI+kGTqfO4HI85/MLMVe0/gJ88vt+P0XyKBKYXuOzrw0Mh nPGBMrRwqlB1MY8OXA+Q9vUipwpRXdBzyedcq6aYJjzkArqFOiR49XZ/nU4AGD6TJoHl8o 2KTNDZCrp1Jbb+/zbX7wZDhCLo/c8yEpUj/McMAvc0ZIraHdwJ5dK2d9RF8V8yoZ3WLgRs c+a9VxmCEB30CmlnKUXaUaXyE1tC9/TaxCgn9WrOq9FuOKpnZCtBnmfs7Dd/zQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637785191; a=rsa-sha256; cv=none; b=Llu0dG9HucMwrosdmctj2wByxRLxDzKn9ww3h/yQJIZyzvjXgJ4pL5gws4yZkuAWRPjg/l dFUK+uzt7jPTiAXqnJ+jX9GJ0JTiWKjYP9r94ODiYPv8lU9D9UdXKDJlwFgoio+CwENfhh VJoF2OiCpsdOUjOmCH81ET8izfTIdbCeoYZn8YrycM8MAJHGLxcmbcZKcdMthyQVQnmS78 ZMoxz2layhj0lnj50PSuBkiV5wRPCnhp0ZV2KAw0NOtBQWJ5AoWAhYu1A0fQIPcaKkJ/Qd GSTfflwsNaXEC7wpKOM1558Q+Zuqm5Wcrm/WT5lcrues4bZ0C86gLJRKEuYrgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=b0c7681ed7398182de7b9026714c24ec20982796 commit b0c7681ed7398182de7b9026714c24ec20982796 Author: Ka Ho Ng AuthorDate: 2021-11-15 06:04:08 +0000 Commit: Ka Ho Ng CommitDate: 2021-11-24 20:18:12 +0000 iser: Remove redundant linuxkpi MODULE_DEPEND Since ibcore depends on linuxkpi, there is no need to pull in the linuxkpi dependency in iser. Sponsored by: The FreeBSD Foundation Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D32977 (cherry picked from commit f7523c8a19d008412ccc969b12eeb756613f3678) --- sys/dev/iser/icl_iser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/iser/icl_iser.c b/sys/dev/iser/icl_iser.c index 622178ab4dd3..dba3eaeb8587 100644 --- a/sys/dev/iser/icl_iser.c +++ b/sys/dev/iser/icl_iser.c @@ -565,5 +565,4 @@ moduledata_t icl_iser_data = { DECLARE_MODULE(icl_iser, icl_iser_data, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); MODULE_DEPEND(icl_iser, icl, 1, 1, 1); MODULE_DEPEND(icl_iser, ibcore, 1, 1, 1); -MODULE_DEPEND(icl_iser, linuxkpi, 1, 1, 1); MODULE_VERSION(icl_iser, 1); From nobody Wed Nov 24 20:20:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1997F18AA74B; Wed, 24 Nov 2021 20:20: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 4HzsnH3bdwz3Csj; Wed, 24 Nov 2021 20:20:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DB97106EE; Wed, 24 Nov 2021 20:20: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 1AOKK329031441; Wed, 24 Nov 2021 20:20:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOKK39a031439; Wed, 24 Nov 2021 20:20:03 GMT (envelope-from git) Date: Wed, 24 Nov 2021 20:20:03 GMT Message-Id: <202111242020.1AOKK39a031439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 35f26bdf5948 - stable/13 - iser: Remove redundant linuxkpi MODULE_DEPEND List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 35f26bdf5948bc8439a210292018738ea42ad3b0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637785203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zR61mkTv+tu0J3Ofq8X/nag+y/nbe8j1wCIwX3sqMaA=; b=Wrns/6/22knMRpQSebV8bndXuJlrNlsRQrNFgSD5dX8t0CxUES/6NWw6j5ToMlH+RzGwnE PwamH5MtMmTx+1+1PTy6W/1sor5amQm1iNOZ072mw8aI27BV3wED7NF99LgJyUCXiqqjM2 mazDlcm88T5UP0+EBRypHSc9NUeIQQdHdUwXHWzKN0/WDKQZ5kkRPW+OSP18GE9h3WMZ0h 3pp9mLJYOqvvZt63dCja3f7i194o1TBFuGF/TuAO28Y3Rum77hFxqs0RMRjqd7ki4rAUxw K+/atnXfLQ7FFo+pbsf452yUa45151E8vBjgqcO/JcnBJkHXeAPi8GtSgaMg7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637785203; a=rsa-sha256; cv=none; b=tH4yrJVlKep6ZVXWmWjuTBxaS2M5FpSWfyVXhxh/FOLiSeJ32YJgtOUjDAn/AeJ7hfwqNG LaksIOTqpy1ylBj4co4JWKaj2UCENrPPKJ05GlncfhIB5uiyzMiEf9ZSb7erdWYg4xGf82 O/dOtn2Ss10rg73s67kQjh9rosp4lFN2paT7UE0TrBqr28Q2lD8crRH+sFIXQC8dAbhQBS 1ILG9CSsq3gXduu74NpFMozlppaTak63PhSVQErrtfW3IuxWQepJFRSfD8UhLlRIa4ymXa 0wkrF2ZlqnEur2YGhUFbltmKiWLI+uN7xmIu/rLGo57//81ttakcaZHb8l9Tcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=35f26bdf5948bc8439a210292018738ea42ad3b0 commit 35f26bdf5948bc8439a210292018738ea42ad3b0 Author: Ka Ho Ng AuthorDate: 2021-11-15 06:04:08 +0000 Commit: Ka Ho Ng CommitDate: 2021-11-24 20:17:26 +0000 iser: Remove redundant linuxkpi MODULE_DEPEND Since ibcore depends on linuxkpi, there is no need to pull in the linuxkpi dependency in iser. Sponsored by: The FreeBSD Foundation Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D32977 (cherry picked from commit f7523c8a19d008412ccc969b12eeb756613f3678) --- sys/dev/iser/icl_iser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/iser/icl_iser.c b/sys/dev/iser/icl_iser.c index be09a3649dd9..f3780a441e01 100644 --- a/sys/dev/iser/icl_iser.c +++ b/sys/dev/iser/icl_iser.c @@ -566,5 +566,4 @@ moduledata_t icl_iser_data = { DECLARE_MODULE(icl_iser, icl_iser_data, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); MODULE_DEPEND(icl_iser, icl, 1, 1, 1); MODULE_DEPEND(icl_iser, ibcore, 1, 1, 1); -MODULE_DEPEND(icl_iser, linuxkpi, 1, 1, 1); MODULE_VERSION(icl_iser, 1); From nobody Wed Nov 24 21:16:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ACCC318A1F55; Wed, 24 Nov 2021 21:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hzv2S2kF8z3p75; Wed, 24 Nov 2021 21:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DCDE1154D; Wed, 24 Nov 2021 21:16: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 1AOLGWft009152; Wed, 24 Nov 2021 21:16:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOLGWDU009151; Wed, 24 Nov 2021 21:16:32 GMT (envelope-from git) Date: Wed, 24 Nov 2021 21:16:32 GMT Message-Id: <202111242116.1AOLGWDU009151@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: 74a0e24f0797 - main - linux: plug set-but-not-unused vars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 74a0e24f07974b4d51c57afa7525b5f88574ad31 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637788592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y90WVCHNEpXQQI9GjIthGBr1vmJ2VN2KtTMcCqw6U80=; b=sFh7jo0zeiGJQ6UuFWUNz9hP8ieLh6GNY/Rme+DiVfO2B/bH2yORPlm43YtkxaLM/DCWLe QUq7u6a0CICHxiN2QrSTsqVsXXA1IpPj8vKPZC5fiuwNmnOKPeK7K/1IEUrS5Qvv9OnmlB KbAc+G0Ee7Kh/JECZyX6l6UbUJMZHJmD+fopY/mUHPfw1tAMFKPxfFSoHHWx3ZsCDAuI+o ykm+sENd4+/tNFkdztC4ZtiAsf9f2w66awcftdEMpO0C1/HRLZPxWdeaTYBRP+1AMWa/w2 vumf2EVMVFYsgUuWv3Nslx0HKYlTqhtQ3C9gmfK7WCjR8H4ltJ3zmNADkj9Hvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637788592; a=rsa-sha256; cv=none; b=UYCsmifANnKqWiQ4jWzfsrQPrnyDscDGO4O+HTctMLui7RU3Z6aSewX2KVpif8jjt6qAPA 4HNhskCeJNBm7/5zBtz3vZn2Vuqold0SU0Uorz68gqFmXvdLlQDH3Msv5C/Wo8lv0GTICk zGqY5HLs8l4MOYEY8KoDT3ViNKrIyvwo8zyyDUSvtt8dkSzsIRLTiJHkTHlffVCxSHGNVi LIH621Jwb09h69n//SP2lSRff2SZxYUv47gc5tHNgTIg5InzwKo63jGES6WMiWjO1iClTz ufyWnr9HvngMNOwEMft1DX8my2K/Kh5Di102cxC8v6qXCvEhvN/V7oM5XSVjDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=74a0e24f07974b4d51c57afa7525b5f88574ad31 commit 74a0e24f07974b4d51c57afa7525b5f88574ad31 Author: Mateusz Guzik AuthorDate: 2021-11-24 21:16:03 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 21:16:03 +0000 linux: plug set-but-not-unused vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/compat/linux/linux_emul.c | 9 +++++---- sys/compat/linux/linux_event.c | 2 -- sys/compat/linux/linux_misc.c | 2 -- sys/compat/linux/linux_mmap.c | 2 -- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c index 86688d50c8a8..83c82fc84fee 100644 --- a/sys/compat/linux/linux_emul.c +++ b/sys/compat/linux/linux_emul.c @@ -363,12 +363,13 @@ void linux_schedtail(struct thread *td) { struct linux_emuldata *em; - struct proc *p; - int error = 0; +#ifdef KTR + int error; +#else + int error __unused; +#endif int *child_set_tid; - p = td->td_proc; - em = em_find(td); KASSERT(em != NULL, ("linux_schedtail: thread emuldata not found.\n")); child_set_tid = em->child_set_tid; diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c index 2539b406618f..fa6ebc366ae9 100644 --- a/sys/compat/linux/linux_event.c +++ b/sys/compat/linux/linux_event.c @@ -615,7 +615,6 @@ linux_eventfd2(struct thread *td, struct linux_eventfd2_args *args) int linux_timerfd_create(struct thread *td, struct linux_timerfd_create_args *args) { - struct filedesc *fdp; struct timerfd *tfd; struct file *fp; clockid_t clockid; @@ -634,7 +633,6 @@ linux_timerfd_create(struct thread *td, struct linux_timerfd_create_args *args) if ((args->flags & LINUX_TFD_CLOEXEC) != 0) fflags |= O_CLOEXEC; - fdp = td->td_proc->p_fd; error = falloc(td, &fp, &fd, fflags); if (error != 0) return (error); diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 5ae4051aaf38..589ad911266f 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1087,7 +1087,6 @@ linux_waitid(struct thread *td, struct linux_waitid_args *args) siginfo_t siginfo; l_siginfo_t lsi; idtype_t idtype; - struct proc *p; int error; options = 0; @@ -1127,7 +1126,6 @@ linux_waitid(struct thread *td, struct linux_waitid_args *args) return (error); } if (args->info != NULL) { - p = td->td_proc; bzero(&lsi, sizeof(lsi)); if (td->td_retval[0] != 0) { sig = bsd_to_linux_signal(siginfo.si_signo); diff --git a/sys/compat/linux/linux_mmap.c b/sys/compat/linux/linux_mmap.c index d7f12b782e96..af2ccc74ba12 100644 --- a/sys/compat/linux/linux_mmap.c +++ b/sys/compat/linux/linux_mmap.c @@ -83,14 +83,12 @@ linux_mmap_common(struct thread *td, uintptr_t addr, size_t len, int prot, struct proc *p = td->td_proc; struct vmspace *vms = td->td_proc->p_vmspace; int bsd_flags, error; - struct file *fp; LINUX_CTR6(mmap2, "0x%lx, %ld, %ld, 0x%08lx, %ld, 0x%lx", addr, len, prot, flags, fd, pos); error = 0; bsd_flags = 0; - fp = NULL; /* * Linux mmap(2): From nobody Wed Nov 24 21:18:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 017C118A25BB; Wed, 24 Nov 2021 21:18: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 4Hzv5D4xzfz3pY4; Wed, 24 Nov 2021 21:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A85011249; Wed, 24 Nov 2021 21:18: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 1AOLIuPk009421; Wed, 24 Nov 2021 21:18:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOLIu5U009420; Wed, 24 Nov 2021 21:18:56 GMT (envelope-from git) Date: Wed, 24 Nov 2021 21:18:56 GMT Message-Id: <202111242118.1AOLIu5U009420@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: ae3d955404da - main - linprocfs: plug set-but-not-unused vars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ae3d955404dac5c22fdbbc9bd1a3583b4c7d8637 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637788736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CtCr88LA55YWpoWnzwqw615sk8b6f+DT2TYo6jEaABM=; b=dn7Nn/KluhVANKqHdaBa3eT8ITPCDwVyncWf6w+eHVq/bfu3dEsy3hOb0L65sBtny7Zoip n15757mf3rx41HrFMFJcuJGWRu1vxWcv1n3DLEylRusMOXvJpRjMfjO3XAV0sqPfddyyCs O5KzpxMDImfi6D+Wnc/du+KEwO3wJBv/BjmmEeY+Mueu1WySbcFMzwYGt+lKW0N0q2Qdlz suXulraZ73+HlC3rJo87tFVXLGxiWJSWeYo6QpGPzPmoS+iE6jEIBFd1PEdZHXQvsOBueb FxBuU0lBMnBtNEP7QnwWWGg6I9ohJB1JdsKG5P5iePyL7hfvXknNBmX+1xTqvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637788736; a=rsa-sha256; cv=none; b=v2NpbeMMBR3sSQzXm4cLXQ1fLAmypQZ/5mzBGmUc0ZuoWHxWCaPrkGkrkOVoNwuXJk2eHg xRRldJyzJNWK5+RBXkxHOsULWsMsGvYyfIwwY997sRxP9DQYpEcywx/RUB3MAXRVz676E4 nhARpLkhZ98dSIO4nz7aneAGZIOBOZFJ7WYcTddm0yqqjlmsBJP2ss04Ovc7SRFEXtEkSU LzeqvzZOcu/BUnH4WSTTsxG8dUcPNF7KLuzpjHLIanDoYCnOkECDgICBw7RTCP44HVEsl5 zxis7ywvYWmkYQnSqM1p002A7ru9QrSdUoBmn34rQfOyHMnewbLY+QG9pZ1lKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ae3d955404dac5c22fdbbc9bd1a3583b4c7d8637 commit ae3d955404dac5c22fdbbc9bd1a3583b4c7d8637 Author: Mateusz Guzik AuthorDate: 2021-11-24 21:18:36 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 21:18:36 +0000 linprocfs: plug set-but-not-unused vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/compat/linprocfs/linprocfs.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 66c6d1cf76ac..16755402bb7b 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -1277,7 +1277,6 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) char *name = "", *freename = NULL; const char *l_map_str; ino_t ino; - int ref_count, shadow_count, flags; int error; struct vnode *vp; struct vattr vat; @@ -1331,9 +1330,6 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) vref(vp); if (lobj != obj) VM_OBJECT_RUNLOCK(lobj); - flags = obj->flags; - ref_count = obj->ref_count; - shadow_count = obj->shadow_count; VM_OBJECT_RUNLOCK(obj); if (vp != NULL) { vn_fullpath(vp, &name, &freename); @@ -1353,10 +1349,6 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) if (e_end == p->p_sysent->sv_usrstack) name = stack_str; } - } else { - flags = 0; - ref_count = 0; - shadow_count = 0; } /* From nobody Wed Nov 24 21:23:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 14D3B18A6276; Wed, 24 Nov 2021 21: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 4HzvBD52vtz3rpT; Wed, 24 Nov 2021 21:23:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DB05116E3; Wed, 24 Nov 2021 21: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 1AOLNGx4022768; Wed, 24 Nov 2021 21: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 1AOLNGFm022767; Wed, 24 Nov 2021 21:23:16 GMT (envelope-from git) Date: Wed, 24 Nov 2021 21:23:16 GMT Message-Id: <202111242123.1AOLNGFm022767@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: cb2bfd3ecb70 - main - geom_journal: plug set-but-not-unused vars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: cb2bfd3ecb7029fb2ba1d0a8d4091b8b3e68167a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637788996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bo7y0IU4qbt0IXtrCxw3ydgo/u7lKV5iBNWIun31QkE=; b=Uh2q3xk7wOBiVzAJmUwxL3X0idULTokwK3VggtWJE1aZJPOHsfI/jRdH0WsRJ9vamm995j j/+lpQ4q6TMCysbISZvAu8BMw9RW6MtEucLPxl4+lZDlMehq3FaH8jJcRZ23zY6eSEDXtm XwAYJ+k0gY0TWXGz9slYyL/bbj0nTb7ecaRVtXtBvrzMssfPuxglusGlGZ4VFVIZa10TuY 7cdCQ1KG1NBujXlKGq3JP0Js0VGgJckJsEtlXOjgXolngxVTMugBCDDgtVG7IukaFSkViZ AUw2qbBtOOjwn5/063VIDn4zVKptxzud4qsQXDFXtIMj1JJf2qH5SV65ZywBVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637788996; a=rsa-sha256; cv=none; b=ndZ0uhJ2OSJjRlipkOkhkIcOjShMNhKN6CR6xdArTKmgNTE72IMacQc13sDVax5eh3EGee sqn7c/+xGIxlk2jTXOofHnIz4IGAExumSTB8bB7lF1c5glh59YzjRKC5EILADfxn/q4/Oz kcVDV/csWF/zX5ehb57TvGz1YXzg+seSlJ5vYAIPm8sQ4PMZ3VVLjUPsgnm/srjmLA6/rM k+yDwkxqiqkpGA4/w01pJ5RhgxVOMETJcJGvIOtBYg9skMYqiylBa9BzKrMIrUwZljhVY7 +ZXWpcgsVd8eDffe+QXEOrCJmEe5r1Y/3y8OEguBfRYhlmR/Kqt11BD0Y4zMOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cb2bfd3ecb7029fb2ba1d0a8d4091b8b3e68167a commit cb2bfd3ecb7029fb2ba1d0a8d4091b8b3e68167a Author: Mateusz Guzik AuthorDate: 2021-11-24 21:21:59 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 21:21:59 +0000 geom_journal: plug set-but-not-unused vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/geom/journal/g_journal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/geom/journal/g_journal.c b/sys/geom/journal/g_journal.c index e57d58d6f7ca..954d0dbf2c6b 100644 --- a/sys/geom/journal/g_journal.c +++ b/sys/geom/journal/g_journal.c @@ -421,15 +421,13 @@ static int g_journal_access(struct g_provider *pp, int acr, int acw, int ace) { struct g_journal_softc *sc; - int dcr, dcw, dce; + int dcw; g_topology_assert(); GJ_DEBUG(2, "Access request for %s: r%dw%de%d.", pp->name, acr, acw, ace); - dcr = pp->acr + acr; dcw = pp->acw + acw; - dce = pp->ace + ace; sc = pp->geom->softc; if (sc == NULL || (sc->sc_flags & GJF_DEVICE_DESTROY)) { From nobody Wed Nov 24 21:25:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 529CF18A6C1F; Wed, 24 Nov 2021 21:25: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 4HzvF90R3hz3sC4; Wed, 24 Nov 2021 21:25:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF121111F5; Wed, 24 Nov 2021 21:25: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 1AOLPmJg023073; Wed, 24 Nov 2021 21:25:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOLPmnP023072; Wed, 24 Nov 2021 21:25:48 GMT (envelope-from git) Date: Wed, 24 Nov 2021 21:25:48 GMT Message-Id: <202111242125.1AOLPmnP023072@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: 35b12b8711d0 - main - fdescfs: plug a set-but-not-unused 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35b12b8711d0d20f9aba77d7f62cffa59e625b7a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637789149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jh+AiQJuKlU5oUWe5lIVw+2im7xXPveT8lCsyLf5/xM=; b=HalT9d/0iXs/q6XELu5llnAe2+IcjI2g+eqFnXIGUAwdmTMQ+hZJFvp3Hl1EnSiVmv4QKf W9y8T+a9ZN0po6LmcaP22Gom/cLxM1lR53KA6U5rW0RkNek05GENB9xFea1c1dTzVTSB4D Lzs5ObPHjYnwSdKLmXmhFA0K61b3VD3exu1pNcx2LGGwghFcn5WlvezczbLKwPXujUA2lw kpyuG8b7VFne7zk3n4/q5EvQo7ISkKFaSX8ipwLzZHyc8Hem7JakcV7SaxoK0hywWBeglb T8LxoVJ5Q8xmKw/DIVaSEVdiI83XC4PWURgvm4yIEtSizPoJ3rp7To33+wyc8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637789149; a=rsa-sha256; cv=none; b=Jycd4GR+KCVzo+U0A+5ZEamjKaAGjUuNJCELOdpceQF3n5b2dw2JU84S/Wlub1fgyLPFsp /cVAmyI7RcpdmPxYaw3xeo5C2Q2P6I76fWbuBAUrXbp8u7jdJSCK66Egkq1ysMZPhEQr5h j32GRp/2a1IsUd2GTpViCS8mLqNrrOEMsVozM9yIITJ9TpneGL6bVa0XSW/LyPk0GJruqh C6IA07kvXzQ+PiQnWkNIhE294+U9nPF34AjwBhC4bG6DaQFZfYp4ciMaWSuOWDwN4zW5p/ yGxf+jB1rbGxEKkrmfaPIZhF5Ov7FOt6CwX258JCsRJjTGMXUX421CAVL0xS7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=35b12b8711d0d20f9aba77d7f62cffa59e625b7a commit 35b12b8711d0d20f9aba77d7f62cffa59e625b7a Author: Mateusz Guzik AuthorDate: 2021-11-24 21:25:24 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 21:25:24 +0000 fdescfs: plug a set-but-not-unused var Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/fs/fdescfs/fdesc_vnops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 209e3b3df4f3..d8dab3d7598c 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -159,10 +159,8 @@ fdesc_allocvp(fdntype ftype, unsigned fd_fd, int ix, struct mount *mp, struct fdhashhead *fc; struct fdescnode *fd, *fd2; struct vnode *vp, *vp2; - struct thread *td; int error; - td = curthread; fc = FD_NHASH(ix); loop: mtx_lock(&fdesc_hashmtx); From nobody Wed Nov 24 21:29:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D35DA18AA52D; Wed, 24 Nov 2021 21:29: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 4HzvKF6Pw6z3vbk; Wed, 24 Nov 2021 21:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B87831143D; Wed, 24 Nov 2021 21:29: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 1AOLTL9n023422; Wed, 24 Nov 2021 21:29:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOLTLbE023421; Wed, 24 Nov 2021 21:29:21 GMT (envelope-from git) Date: Wed, 24 Nov 2021 21:29:21 GMT Message-Id: <202111242129.1AOLTLbE023421@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: 2cedfc3f7eb5 - main - if_epair: ifdef vars only used with ALTQ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2cedfc3f7eb58c8a3d35de226c63066946d9beb0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637789362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tAiEuI31Iz2SWS7ZrEeHs7SW1qqufneroMwofDyMiZY=; b=CY4bpV7q8yn6Z2PLmayv82FYK/68fU0b07g5Y6b5OetPPAfetUSk3qsxO3C+dvP3jBrFDa d8+cfROKU9RmtbP7hHIHZeMBqsEp0xRJ1tNTcq5u8TMQ1TA257XVvqEzbtNhCYFsKBGBGY 2vxCUYjGWqjoFykYqOrJd2daGCEQoH8YHuifGKHZ5a/ViBoXBH7XVD+FeTau3VJw2BLsVF eUxduP05cu7ZX7VTrunn4cdm9AGbCujic0slyTnAmxA6vELnhTO4tGZUbp1J1ZdWWxP+48 xj8W5t2O9XmYitganPuVToswEpZv20wZhpOSE2FE0ayPDRruwqtN19T4wk1k8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637789362; a=rsa-sha256; cv=none; b=TjidwdoWa6qswDQWVdzwrg1T+R9wHaj8Q9zIiyszbmeltN3PZp0vk8ddZiBv2wgdaYtQzk 8pCF0tozLQlXGqPHMWVuFJm+9N04pkXbhKi/PCdJSn2KezIRFQbrqqQeX3F6u/nKHi1wS9 /MbXqTQvUNQsXYfajgHHO6GU6QHkqv4eJI4M/mu9BtBhmSpDnrr/pMJSpCeCUiAUtCrsIz Tq8EtHfDYCTSxHIvJzuj/AFxQ5aD/3/AmBZ/si4oDNZ6oaBR4t0shnP1P0GZ6lzQodMiQI StGqXlIL3vQEEASpEAsQ95MigyhHykLE97gTVSrzTP3PH9JCy2T7zbDBYm0gIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2cedfc3f7eb58c8a3d35de226c63066946d9beb0 commit 2cedfc3f7eb58c8a3d35de226c63066946d9beb0 Author: Mateusz Guzik AuthorDate: 2021-11-24 21:28:54 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 21:28:54 +0000 if_epair: ifdef vars only used with ALTQ Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/if_epair.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 89483db46337..699d74ee4fb4 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -271,8 +271,11 @@ epair_transmit(struct ifnet *ifp, struct mbuf *m) { struct epair_softc *sc; struct ifnet *oifp; - int error, len; + int error; +#ifdef ALTQ + int len; short mflags; +#endif if (m == NULL) return (0); @@ -309,10 +312,11 @@ epair_transmit(struct ifnet *ifp, struct mbuf *m) m_freem(m); return (0); } + +#ifdef ALTQ len = m->m_pkthdr.len; mflags = m->m_flags; -#ifdef ALTQ /* Support ALTQ via the classic if_start() path. */ IF_LOCK(&ifp->if_snd); if (ALTQ_IS_ENABLED(&ifp->if_snd)) { From nobody Wed Nov 24 21:32:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 381CA18AB2C6; Wed, 24 Nov 2021 21:32: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 4HzvNW4lmbz4RFL; Wed, 24 Nov 2021 21:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84AC1116F6; Wed, 24 Nov 2021 21:32: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 1AOLWBul036082; Wed, 24 Nov 2021 21:32:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOLWBwq036081; Wed, 24 Nov 2021 21:32:11 GMT (envelope-from git) Date: Wed, 24 Nov 2021 21:32:11 GMT Message-Id: <202111242132.1AOLWBwq036081@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: 873606999f88 - main - unionfs: plug a set-but-not-unused 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 873606999f880afbc9b9eae85ee7737aead57b83 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637789531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OaDOs6QARtHMEG6MVHhi2RNTg85J+3RboKCxDfSGBmA=; b=SUYOzAn3gR1x4hbxXRdXEfXRVJawzg+rd6zjObu+8YBcJh8AH/mEx7HEsUiggCV62Vm/Oj kpFbc/7JH5RZZIvTENuChqfEEMytIU/n7t+9VcA0ukvmd+ktiSMoqkaAutEOUoxkvshaeR F+cGWVgkTtreqi7muJDrd52OhJmiWW7yjocfWyuS41fAnytrPmlE9Rh2fldWsilk9MO6uY GgSjiI9VKyHd3jfw+ZxAmpSwdrN9IKacPj9wiTW7JqNeAcTxTGLW+m3GNU7bPzSFnkWodb 7ADA49vUOSeEmAcigyxxpRRA6qrThSCQAPwfMB0tblwP0wO5PK4Sd4dIbgLQzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637789531; a=rsa-sha256; cv=none; b=WJGEURcLQ9/K6rVSJwKw2PI2MYwV06VubSnqbAFQPYlxZREPUPC0gRlCerI6Jn0lJWKLoa qvN/P9E13BE8UIpFFZ/C6fM/j2n+U8LyMbX+RuOtnt9f8wC3330gPPyYvqfgW/XAP/YKa1 DYtlQyzSO1Sg4MIRXoSJlrmcA95/CzN3pGw4SWI6Jg3J71rt1bpTM6kouQIGQtiad4gdP6 68dmdC8/CRmv2CQIQGhS9x+VpM2sVWvyuFcIrKUiof+DoPgwEMkA1vdjyAAKxXriz/VKfk lv3k0seS+snfQz71DPk9VP7aW2VboepDBEHWDdxpNSVyn+d5Xqi4AEa/fzJn/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=873606999f880afbc9b9eae85ee7737aead57b83 commit 873606999f880afbc9b9eae85ee7737aead57b83 Author: Mateusz Guzik AuthorDate: 2021-11-24 21:31:35 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 21:31:35 +0000 unionfs: plug a set-but-not-unused var Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/fs/unionfs/union_vnops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 81741dc19349..93249b21ccb3 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -631,7 +631,6 @@ static int unionfs_check_corrected_access(accmode_t accmode, struct vattr *va, struct ucred *cred) { - int count; uid_t uid; /* upper side vnode's uid */ gid_t gid; /* upper side vnode's gid */ u_short vmode; /* upper side vnode's mode */ @@ -654,7 +653,6 @@ unionfs_check_corrected_access(accmode_t accmode, struct vattr *va, } /* check group */ - count = 0; if (groupmember(gid, cred)) { if (accmode & VEXEC) mask |= S_IXGRP; From nobody Wed Nov 24 21:38:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4F20C18AF858; Wed, 24 Nov 2021 21:38: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 4HzvXM0NW9z4VWb; Wed, 24 Nov 2021 21:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E278D11A1E; Wed, 24 Nov 2021 21:38: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 1AOLcwWV036702; Wed, 24 Nov 2021 21:38:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOLcwsu036701; Wed, 24 Nov 2021 21:38:58 GMT (envelope-from git) Date: Wed, 24 Nov 2021 21:38:58 GMT Message-Id: <202111242138.1AOLcwsu036701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7043359ce3c1 - main - LinuxKPI: fix -Wunused-but-set-variable warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7043359ce3c1e56ed55c8b41867a14a418511a05 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637789939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AjMJ1uCd9bZ7nqiVPgtgyj/xQBEfZDaET7HbKw1gCf4=; b=rZ9hCxtF0g7aiy0Imm2j5cNeQmwWQDeTfkZUoGqM8HJe/bmNujaSyht+f3UCZffX66zG8D iMqXdEPocBomimxo98ni7/9beB8I752Z/sgNUPKUF1Fh5n/zhO6EjxErc/Wvqt8h5gOsGR vDEqtPeqWAB0+6koLfnRfnf23nM62LqZdAetaKFPON0oihQPJHkjzL0+czyy/kjtUza1g1 qHX50ueel+e9h5t1djUM2NCrw9vr1sfV5R/FLMY4bBx8GEkK57M5Q+zOQt0lcboTAq5hIq vrJxwcktfNzqK1tTmd3AOzITneEXeiCGG9621I/WUKab8m67oLzqj3O5os24LA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637789939; a=rsa-sha256; cv=none; b=E98VSD4iPCxcE4RlpeU7VecT91mDHnifx8j4h8knoxWh+v26y05ejNxpFevv2fQQCogRqi o1Z0ADAeinJ39hwCkx10jK8rQdppbhA2Xz2Maij2XOHJ39I5MzGc83kd7vQQDDm6Gc8pmw 7azfuL88Q6wU9Ins8lz+eqYISkd//3V43vMIcSCzNsQS1vAnCDnTIZ55UvBoOTjbuJx6lT H8RA7jqEHpDDiUevQP7TJkBwmkY5B2AGjb51TCHiqHJNDtHCP3A1aXbRArZcS53jlGMb4z 0fH0//pUSPOFIWkdfBLEbZiaqzOKnLAXsTAo4uymf49taM2X8ygOkgvBOgkPnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7043359ce3c1e56ed55c8b41867a14a418511a05 commit 7043359ce3c1e56ed55c8b41867a14a418511a05 Author: Bjoern A. Zeeb AuthorDate: 2021-11-24 21:20:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-24 21:32:38 +0000 LinuxKPI: fix -Wunused-but-set-variable warnings Handle write-only variables by removing the unused return value from void functions or removing the unused variables entirely. Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D33107 --- sys/compat/linuxkpi/common/src/linux_firmware.c | 3 +-- sys/compat/linuxkpi/common/src/linux_pci.c | 4 ---- sys/compat/linuxkpi/common/src/linux_usb.c | 8 +++----- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_firmware.c b/sys/compat/linuxkpi/common/src/linux_firmware.c index d779b509105e..47cccd42da20 100644 --- a/sys/compat/linuxkpi/common/src/linux_firmware.c +++ b/sys/compat/linuxkpi/common/src/linux_firmware.c @@ -150,7 +150,6 @@ lkpi_fw_task(void *ctx, int pending) { struct lkpi_fw_task *lfwt; const struct linuxkpi_firmware *fw; - int error; KASSERT(ctx != NULL && pending == 1, ("%s: lfwt %p, pending %d\n", __func__, ctx, pending)); @@ -159,7 +158,7 @@ lkpi_fw_task(void *ctx, int pending) if (lfwt->cont == NULL) goto out; - error = _linuxkpi_request_firmware(lfwt->fw_name, &fw, lfwt->dev, + _linuxkpi_request_firmware(lfwt->fw_name, &fw, lfwt->dev, lfwt->gfp, true, true); /* diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 8ec6a5af2140..bf28c10fbf96 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -1063,11 +1063,9 @@ dma_pool_obj_import(void *arg, void **store, int count, int domain __unused, int flags) { struct dma_pool *pool = arg; - struct linux_dma_priv *priv; struct linux_dma_obj *obj; int error, i; - priv = pool->pool_device->dma_priv; for (i = 0; i < count; i++) { obj = uma_zalloc(linux_dma_obj_zone, flags); if (obj == NULL) @@ -1090,11 +1088,9 @@ static void dma_pool_obj_release(void *arg, void **store, int count) { struct dma_pool *pool = arg; - struct linux_dma_priv *priv; struct linux_dma_obj *obj; int i; - priv = pool->pool_device->dma_priv; for (i = 0; i < count; i++) { obj = store[i]; bus_dmamem_free(pool->pool_dmat, obj->vaddr, obj->dmamap); diff --git a/sys/compat/linuxkpi/common/src/linux_usb.c b/sys/compat/linuxkpi/common/src/linux_usb.c index e93559f95264..11f400bc2c52 100644 --- a/sys/compat/linuxkpi/common/src/linux_usb.c +++ b/sys/compat/linuxkpi/common/src/linux_usb.c @@ -1185,15 +1185,14 @@ usb_linux_free_device(struct usb_device *dev) { struct usb_host_endpoint *uhe; struct usb_host_endpoint *uhe_end; - int err; uhe = dev->linux_endpoint_start; uhe_end = dev->linux_endpoint_end; while (uhe != uhe_end) { - err = usb_setup_endpoint(dev, uhe, 0); + usb_setup_endpoint(dev, uhe, 0); uhe++; } - err = usb_setup_endpoint(dev, &dev->ep0, 0); + usb_setup_endpoint(dev, &dev->ep0, 0); free(dev->linux_endpoint_start, M_USBDEV); } @@ -1276,7 +1275,6 @@ usb_linux_cleanup_interface(struct usb_device *dev, struct usb_interface *iface) struct usb_host_interface *uhi_end; struct usb_host_endpoint *uhe; struct usb_host_endpoint *uhe_end; - int err; uhi = iface->altsetting; uhi_end = iface->altsetting + iface->num_altsetting; @@ -1284,7 +1282,7 @@ usb_linux_cleanup_interface(struct usb_device *dev, struct usb_interface *iface) uhe = uhi->endpoint; uhe_end = uhi->endpoint + uhi->desc.bNumEndpoints; while (uhe != uhe_end) { - err = usb_setup_endpoint(dev, uhe, 0); + usb_setup_endpoint(dev, uhe, 0); uhe++; } uhi++; From nobody Wed Nov 24 21:38:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AA92218AF85D; Wed, 24 Nov 2021 21:39: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 4HzvXN1P04z4VWf; Wed, 24 Nov 2021 21:39:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FE24116FA; Wed, 24 Nov 2021 21:39: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 1AOLcxDA036733; Wed, 24 Nov 2021 21:38:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOLcxss036732; Wed, 24 Nov 2021 21:38:59 GMT (envelope-from git) Date: Wed, 24 Nov 2021 21:38:59 GMT Message-Id: <202111242138.1AOLcxss036732@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 943df073a348 - main - LinuxKPI: USB return possible error from suspend/resume List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 943df073a348bcb1e701c3677536f913761d4123 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637789940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6v8tiEeEtPdt4HXFdqBi/aAtBKDvE33H55r0BWGcHWQ=; b=V/RBxubZFoq30nmycAczpG3ujhgv5Cp2DcdhJ3C6bwHFpAhWkNq+CF7Ffs/SEveCUApJkC tQh9t9g0qofKNnqp/4cG3m1XBJh1G5CBj66uQl+UGGnTQrDxlQ0HWQpe3jCzv4btq7CQ5g Up+1Ab0DZUXzpzUNGUHvAreKV7RguCK9DiTjgTPo+iuBW1oPz1FwB5ipyZgGydOSVcbJ9u TLQwsmwgKWbU1RQ7CZVTB9MrBL9BDWAWAKqtUgtepgHmOwVQj3WGWZIpMkAiJpfEEENGdh KWrGw3QEtOYMAqpv1zeFYxo9qMNFXCmjoUVhoPlhruGh13k73rlmvani2XTdyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637789940; a=rsa-sha256; cv=none; b=e35+RZtSbb4SnHyks86EXV2aLt0TbK+0Y92nIUUh8hW5lFBCnOGngqE/V0jxQT2ap0LG3S 504vJtIULtqRyIuac7qySJf1/crQhxFQp6t+JVzKFMZWcQVxqoYmJiHVw2qofZkhSJ0QnW LgjduGEYpkbqI8Hp4ews70xBs772vvBSAGe8P15K28JF650Qvr/5g6ynKZQ9e/vlRqVg38 oVFGRHz0odRhRI06sgZbmJC6eRhsccugEaEE07FSHguuvXxghu2AL+qbx7jW28i926Mi2p 7VBtMiqnN4gUzP1xQkpt8QipXVJ8+D+GRmHmx4VclRrNL7MDbtSpqgdXAoKc+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=943df073a348bcb1e701c3677536f913761d4123 commit 943df073a348bcb1e701c3677536f913761d4123 Author: Bjoern A. Zeeb AuthorDate: 2021-11-24 21:28:46 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-24 21:32:38 +0000 LinuxKPI: USB return possible error from suspend/resume USB suspend/resume cannot fail so we never returned the error which resulted in a -Wunused-but-set-variable warning. Initialize the return variable and return a possible error possibly triggering a printf upstream to at least have a trace of the problem. This also fixes the warning. Suggested by: hselasky Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D33107 --- sys/compat/linuxkpi/common/src/linux_usb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_usb.c b/sys/compat/linuxkpi/common/src/linux_usb.c index 11f400bc2c52..72aa561fcfbb 100644 --- a/sys/compat/linuxkpi/common/src/linux_usb.c +++ b/sys/compat/linuxkpi/common/src/linux_usb.c @@ -343,10 +343,10 @@ usb_linux_suspend(device_t dev) struct usb_driver *udrv = usb_linux_get_usb_driver(sc); int err; - if (udrv && udrv->suspend) { + err = 0; + if (udrv && udrv->suspend) err = (udrv->suspend) (sc->sc_ui, 0); - } - return (0); + return (-err); } /*------------------------------------------------------------------------* @@ -361,10 +361,10 @@ usb_linux_resume(device_t dev) struct usb_driver *udrv = usb_linux_get_usb_driver(sc); int err; - if (udrv && udrv->resume) { + err = 0; + if (udrv && udrv->resume) err = (udrv->resume) (sc->sc_ui); - } - return (0); + return (-err); } /*------------------------------------------------------------------------* From nobody Wed Nov 24 21:52:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AAFF2189917D; Wed, 24 Nov 2021 21:52:29 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from mail.anongoth.pl (mail.anongoth.pl [46.248.190.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X448 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "anongoth.pl", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hzvqx3MB3z4d93; Wed, 24 Nov 2021 21:52:29 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from anongoth.pl (unknown [192.168.1.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: pkubaj@anongoth.pl) by mail.anongoth.pl (Postfix) with ESMTPSA id 6804610BF91; Wed, 24 Nov 2021 22:52:24 +0100 (CET) Date: Wed, 24 Nov 2021 22:52:23 +0100 From: Piotr Kubaj To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3a60869237b8 - main - Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le Message-ID: References: <202111232227.1ANMRCYk070382@gitrepo.freebsd.org> <133897a3-6db4-9353-cccd-c1d82e23146e@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="gpxZNAEMkcVKCTsV" Content-Disposition: inline In-Reply-To: <133897a3-6db4-9353-cccd-c1d82e23146e@FreeBSD.org> X-Rspamd-Queue-Id: 4Hzvqx3MB3z4d93 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N --gpxZNAEMkcVKCTsV Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 21-11-24 10:34:36, John Baldwin wrote: > On 11/24/21 10:24 AM, Piotr Kubaj wrote: > > OK, it looks like ossl uses fpu_kern functions and those are available = only an aarch64, amd64 and i386: > > cc -O2 -pipe -fno-common -fno-strict-aliasing -Werror -D_KERNEL -DKLD= _MODULE -nostdinc -include /usr/obj/usr/src/powerpc.powerpc64/sys/modules= /ossl/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fn= o-common -fPIC -mlongcall -fno-omit-frame-pointer -fdebug-prefix-map=3D./m= achine=3D/usr/src/sys/powerpc/include -MD -MF.depend.ossl.o -MTossl.o = -mno-altivec -msoft-float -mabi=3Delfv2 -ffreestanding -fwrapv -fstack-prot= ector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissin= g-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__prin= tf__=3D__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option= -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body= -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-poin= ter-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -Wno= -format-zero-length -std=3Diso9899:1999 -c /usr/src/sys/crypto/openssl/= ossl.c -o ossl.o > > /usr/src/sys/crypto/openssl/ossl.c:190:4: error: implicit declaration o= f function 'fpu_kern_enter' is invalid in C99 [-Werror,-Wimplicit-function-= declaration] > > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX= ); > > ^ > > /usr/src/sys/crypto/openssl/ossl.c:190:36: error: use of undeclared ide= ntifier 'FPU_KERN_NOCTX' > > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX= ); > > ^ > > /usr/src/sys/crypto/openssl/ossl.c:193:4: error: implicit declaration o= f function 'fpu_kern_leave' is invalid in C99 [-Werror,-Wimplicit-function-= declaration] > > fpu_kern_leave(curthread, NULL); > > ^ > > /usr/src/sys/crypto/openssl/ossl.c:193:4: note: did you mean 'fpu_kern_= enter'? > > /usr/src/sys/crypto/openssl/ossl.c:190:4: note: 'fpu_kern_enter' declar= ed here > > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX= ); > > ^ > > /usr/src/sys/crypto/openssl/ossl.c:214:6: error: implicit declaration o= f function 'is_fpu_kern_thread' is invalid in C99 [-Werror,-Wimplicit-funct= ion-declaration] > > if (is_fpu_kern_thread(0)) { > > ^ > > /usr/src/sys/crypto/openssl/ossl.c:217:3: error: implicit declaration o= f function 'fpu_kern_enter' is invalid in C99 [-Werror,-Wimplicit-function-= declaration] > > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); > > ^ > > /usr/src/sys/crypto/openssl/ossl.c:217:35: error: use of undeclared ide= ntifier 'FPU_KERN_NOCTX' > > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); > > ^ > > /usr/src/sys/crypto/openssl/ossl.c:263:3: error: implicit declaration o= f function 'fpu_kern_leave' is invalid in C99 [-Werror,-Wimplicit-function-= declaration] > > fpu_kern_leave(curthread, NULL); > > ^ > > 7 errors generated. > >=20 > > AFAIK porting those is not easy and it's certainly above my pay grade. >=20 > Do the powerpc instructions use additional registers that are not part of= the normal > GPRs saved/restored on a context switch? If so, then, yes, you will need= to implement > something here (though the FPU_KERN_NOCTX variant is a bit simpler as it = disables > context switches and it's sufficient just to init the registers and permi= t accesses > without raising a trap until fpu_kern_leave). If not, then you can make = the use of > those functions conditional on architecture. I guess bdragon, jhibbits, luporl or adalava would be better source of info= rmation. That said, after looking at https://community.nxp.com/t5/MPC5xxx/Example-co= de-for-context-switch-for-MPC56XX-PowerPC/m-p/732248/highlight/true, it see= ms like indeed registers other than GPRs are saved and restored. I tried looking at https://cgit.freebsd.org/src/diff/?id=3D6ed982a221e024d6= 4dd0ab776e6197643fa1530e. fpu_kern_enter() and fpu_kern_leave() are quite s= cary :) >=20 > > On 21-11-24 08:15:26, John Baldwin wrote: > >> On 11/23/21 2:27 PM, Piotr Kubaj wrote: > >>> The branch main has been updated by pkubaj (ports committer): > >>> > >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D3a60869237b8b315fe6649= 7cf5299ec08b688533 > >>> > >>> commit 3a60869237b8b315fe66497cf5299ec08b688533 > >>> Author: Piotr Kubaj > >>> AuthorDate: 2021-11-22 02:28:46 +0000 > >>> Commit: Piotr Kubaj > >>> CommitDate: 2021-11-23 22:26:53 +0000 > >>> > >>> Add assembly optimized code for OpenSSL on powerpc, powerpc64 a= nd powerpc64le > >>> =20 > >>> Summary: > >>> 1. https://github.com/openssl/openssl/commit/34ab13b7d8e3e723ad= b60be8142e38b7c9cd382a > >>> needs to be merged for ELFv2 support on big-endian. > >>> 2. crypto/openssl/crypto/ppccap.c needs to be patched. > >>> Same reason as in https://github.com/openssl/openssl/pull/17082. > >> > >> Have you looked at adding powerpc support to ossl(4)? It should be fa= irly simple > >> (just adding the right asm files in Makefiles and the powerpc equivale= nt of > >> OSSL_cpuid). > >> > >> --=20 > >> John Baldwin >=20 >=20 > --=20 > John Baldwin --=20 --gpxZNAEMkcVKCTsV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAmGetBcACgkQelmbhSCD nJ1SoA/8DsY/DUW5sKWt4/j8mkOZpAOAttuYup7q62kGXM26udH4NLpqXZX8wXi8 2cB6JALsW/zqQTwH4NDkrVEzOZYCulxKCOEvsZVmfty14GXN5jVGWbi9IqopNtDq mhd7HT1ajxLhGwfe4UWeJbcP2XiCTxT0XrNy1mazTlBwlYMmvPfIpsd7KrRPmUbA h/md4fa7921xWuz42WUX94hs9enJX7RcxvUyPvxPQkgvgz+r0GBBndyX5JIg98an znkKhtL+RwirzAPe9jDUoD/drc/SlXR3XyqwXSHk34mYIKmUtmVRd0rWa0kz2BBX b8bmTHW5HAS6jwvSJRebZXYdIbLv06uVMKyq1I8I4waB9HpHYCI5ltoXlP/Cpjxx UNTMzlTuE3HDlxMxAI+OkTfgtv+6BTRqG5PX+P3+jaUt2R0zcVtHzIdJWri0t/RE AdiE6hmSSVSOQ3lZq/z3mqILORCqt4Xye5XNGYGPPmwvYGJEue0ZazM7tzYEzcdR DLfObyxfXnsbci23cKD8NvBD/Ij/J4war+oH78Uy8FmVmQKxtELuzbls6HtbVlLL Dqa5HJILbi3wDSAS7nLaxayU9birPJmzSwCf86XI5nBd0nYPBFepqBBpSVMSVRs6 Z2XxbL8IhQljBW1CkZ4B90jXhJZMPYUIH3MtWddnDLk/0q0o9vo= =OZhX -----END PGP SIGNATURE----- --gpxZNAEMkcVKCTsV-- From nobody Wed Nov 24 22:34:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B548518AF08A; Wed, 24 Nov 2021 22: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 4Hzwms2cB3z4rXM; Wed, 24 Nov 2021 22:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 397AF123B6; Wed, 24 Nov 2021 22: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 1AOMYrfw016415; Wed, 24 Nov 2021 22:34:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOMYrwY016414; Wed, 24 Nov 2021 22:34:53 GMT (envelope-from git) Date: Wed, 24 Nov 2021 22:34:53 GMT Message-Id: <202111242234.1AOMYrwY016414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 3f539826e12e - stable/13 - nfsd: Fix f_bavail and f_ffree for NFSv4 when negative List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3f539826e12e3177655add03f6297f49019ac08b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637793293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r7lwS9BumkqJVAHZ9TS954/+iyQUE2r1/NKRm71HD7g=; b=e/xuSIX2MgMTfqPozMofMT5oFn3wtFjSjNTh+dWPXmAditex1iCSn9Xv5qNPv3JtTmywwr WfsQhZoGwq4YhtT6oEWuPljQztiSPS5Tnh28eBilQtymS7qEXyqrj/VbP6F2lk3Lh2vRvw L29a1wc1AErKXaq1XDrGlDUg9JbTC6TENAb5AlYWzu+rgzL9JFzH5OLVTvOt6OS1uwYlaq dT1KWzkRFWcTdn6RT8ZY8krAsXjPoz5RNxj9xNKAlVvTsDyzdrhjUe6L+y40XSvqACqIlt YtKPgWoufkbeKX/yW9h6DSiLs09/cUePC5Bv1I5hQcf55WjAGe5VFEkAvYVrMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637793293; a=rsa-sha256; cv=none; b=T2/kjxoPAfQf3bIFm2piW6/+ZJAWdz0Z74pxXuAb6SAkBFQQABhLYFgG1yR1VFs2+bmq9n hOVxsJz+GYZesSYwLXK8C6I4TuvGfzxHRj/Z8QolaFmmKsw97NMhQ4XAjkgVN/zU6Xf0HA HxaOu7f0Pkm3Be40PvaGAYNiRtPoZZ6Wt8mabFucDynsATswyXvPs7CfxrxDp34oLhbUQD cHpnJUpCB4JXnfBCkzv7DZrYiI5zQmCClX4jeQm+rvfZ8sA3yITpgIh0V6Og4GZdJmBbfy NqTQouNXtlSvT6QWrl/7325VNS0T53ZZnSauwskrg7TkLg6kv9IlfuG89GJwlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=3f539826e12e3177655add03f6297f49019ac08b commit 3f539826e12e3177655add03f6297f49019ac08b Author: Rick Macklem AuthorDate: 2021-11-08 20:59:31 +0000 Commit: Rick Macklem CommitDate: 2021-11-24 22:31:55 +0000 nfsd: Fix f_bavail and f_ffree for NFSv4 when negative Since the NFS Space_available and Files_available are unsigned, the NFSv3 server sets them to 0 when negative, so that they do not appear to be large positive values for non-FreeBSD clients. This patch fixes the NFSv4 server to do the same. Found during a recent IEFT NFSv4 working group testing event. (cherry picked from commit d70ca5b00eede3367ce659a03b2f9cc9729cd0dd) --- sys/fs/nfs/nfs_commonsubs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index c8534982ee0e..144b2e215496 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -2511,6 +2511,17 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, } NFSCLRSTATFS_ATTRBIT(retbitp); } + /* + * Since NFS handles these values as unsigned on the + * wire, there is no way to represent negative values, + * so set them to 0. Without this, they will appear + * to be very large positive values for clients like + * Solaris10. + */ + if (fs->f_bavail < 0) + fs->f_bavail = 0; + if (fs->f_ffree < 0) + fs->f_ffree = 0; } #endif From nobody Wed Nov 24 22:38:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 94B7E18B20A5; Wed, 24 Nov 2021 22:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzwsT2bSWz4tMt; Wed, 24 Nov 2021 22:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35A5712522; Wed, 24 Nov 2021 22:38: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 1AOMcrTb016837; Wed, 24 Nov 2021 22:38:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOMcrkl016836; Wed, 24 Nov 2021 22:38:53 GMT (envelope-from git) Date: Wed, 24 Nov 2021 22:38:53 GMT Message-Id: <202111242238.1AOMcrkl016836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 354988ca3f9d - stable/13 - nfsd: Fix the NFSv4.2 pNFS MDS server for NFSERR_NOSPC via LayoutError List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 354988ca3f9db745ce0734ef1bda2daba584f723 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637793533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QnEoioRmOq4m0kxphxCSUugkn92UKTAa/PF5vB0KFR0=; b=dZjYEF9B3L/H6tdATj5tU+h0yrf9rMcFOZZ4Q+nnS6ealtEjB3ltlj1Eb9nF629jkOW73m Lzo5aAoaXSab98SBJuI5QqEmpC5OvH9uQp2+ossFEK9z+G/xBksk5iFcjOh7KVQd/eZyf4 uKwGsf5ZNx+Gch1iRInO4nF9gBZc5xJBa8Z548lUFe6yiXNeF8w4qydRVKTo6hOPS0YUVB rVpri5yEn7VfDCDhaDZM5S3Ws6SnS2hxGAW7B7cTRAWdtBogSsWXQhomni5FfQgfNMR2yO R+BYn/x3x4ELVal4v537wZlo9oFTvArmlR+ji/Yab6UJo+z03IGOKPIQpZuUVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637793533; a=rsa-sha256; cv=none; b=UbSkQn9Pr7Jr0dWhx25PkBkJ7j7XquwZFi2NnHP+HFfjTj94KbeuCmVTtn1u6muT3RJvE6 gITs7qPuAGJ4qNgn8dujB2dhKXHDyvvDZjtBHjOLmSBw4zov/DJ2/Phn0xYMGHe2U08AMe cugbz69nTj4kG+U5RxTFu1uF4XBc84d78qx+1dyr8zqiwmPJIsDSpBJ/tq85EZNB0UEtFQ UahMrg/dx/o1MscJbr4JBQBR/qrtK9mR4GBTX0lK4rviWM6qYhSMbkMKWfiQrQ9wiStQrq l+k9+VNHiywW7/F2RElJmdojpCMGz1mUo9SYGFQTgJWdFLnJ1c4IdwByfQKHtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=354988ca3f9db745ce0734ef1bda2daba584f723 commit 354988ca3f9db745ce0734ef1bda2daba584f723 Author: Rick Macklem AuthorDate: 2021-11-08 23:58:00 +0000 Commit: Rick Macklem CommitDate: 2021-11-24 22:35:03 +0000 nfsd: Fix the NFSv4.2 pNFS MDS server for NFSERR_NOSPC via LayoutError If a pNFS server's DS runs out of disk space, it replies NFSERR_NOSPC to the client doing writing. For the Linux client, it then sends a LayoutError RPC to the MDS server to tell it about the error and keeps retrying, doing repeated LayoutGets to the MDS and Write RPCs to the DS. The Linux client is "stuck" until disk space on the DS is free'd up unless a subsequent LayoutGet request is sent a NFSERR_NOSPC reply. The looping problem still occurs for NFSv4.1 mounts, but no fix for this is known at this time. This patch changes the pNFS MDS server to reply to LayoutGet operations with NFSERR_NOSPC once a LayoutError reports the problem, until the DS has available space. This keeps the Linux NFSv4.2 from looping. Found during recent testing because of issues w.r.t. a DS being out of space found during a recent IEFT NFSv4 working group testing event. (cherry picked from commit f8dc06303bac39be53872de7429aa54694b3f86a) --- sys/fs/nfs/nfs_var.h | 2 ++ sys/fs/nfs/nfsrvstate.h | 3 +++ sys/fs/nfsserver/nfs_nfsdport.c | 53 +++++++++++++++++++++++++++++++++++++++ sys/fs/nfsserver/nfs_nfsdserv.c | 4 +++ sys/fs/nfsserver/nfs_nfsdsocket.c | 3 +++ sys/fs/nfsserver/nfs_nfsdstate.c | 53 +++++++++++++++++++++++++++++++++++++-- 6 files changed, 116 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index b45143067c46..1f20c1cb76a8 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -170,6 +170,7 @@ int nfsrv_copymr(vnode_t, vnode_t, vnode_t, struct nfsdevice *, int nfsrv_mdscopymr(char *, char *, char *, char *, int *, char *, NFSPROC_T *, struct vnode **, struct vnode **, struct pnfsdsfile **, struct nfsdevice **, struct nfsdevice **); +void nfsrv_marknospc(char *, bool); /* nfs_nfsdserv.c */ int nfsrvd_access(struct nfsrv_descript *, int, @@ -762,6 +763,7 @@ int nfsvno_listxattr(struct vnode *, uint64_t, struct ucred *, struct thread *, void nfsm_trimtrailing(struct nfsrv_descript *, struct mbuf *, char *, int, int); bool nfsrv_checkwrongsec(struct nfsrv_descript *, int, enum vtype); +void nfsrv_checknospc(void); /* nfs_commonkrpc.c */ int newnfs_nmcancelreqs(struct nfsmount *); diff --git a/sys/fs/nfs/nfsrvstate.h b/sys/fs/nfs/nfsrvstate.h index 427d5b132281..9eebeece9727 100644 --- a/sys/fs/nfs/nfsrvstate.h +++ b/sys/fs/nfs/nfsrvstate.h @@ -132,6 +132,7 @@ struct nfslayout { nfsv4stateid_t lay_stateid; nfsquad_t lay_clientid; fhandle_t lay_fh; + char lay_deviceid[NFSX_V4DEVICEID]; fsid_t lay_fsid; uint32_t lay_layoutlen; uint16_t lay_mirrorcnt; @@ -147,6 +148,7 @@ struct nfslayout { #define NFSLAY_RECALL 0x0004 #define NFSLAY_RETURNED 0x0008 #define NFSLAY_CALLB 0x0010 +#define NFSLAY_NOSPC 0x0020 /* * Structure for an NFSv4.1 session. @@ -353,6 +355,7 @@ struct nfsdevice { char *nfsdev_host; fsid_t nfsdev_mdsfsid; uint32_t nfsdev_nextdir; + bool nfsdev_nospc; vnode_t nfsdev_dsdir[0]; }; diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index f48e57e449c9..bd833f1c375a 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -6733,6 +6733,59 @@ nfsrv_checkwrongsec(struct nfsrv_descript *nd, int nextop, enum vtype vtyp) return (true); } +/* + * Check DSs marked no space. + */ +void +nfsrv_checknospc(void) +{ + struct statfs *tsf; + struct nfsdevice *ds; + struct vnode **dvpp, **tdvpp, *dvp; + char *devid, *tdevid; + int cnt, error = 0, i; + + if (nfsrv_devidcnt <= 0) + return; + dvpp = mallocarray(nfsrv_devidcnt, sizeof(*dvpp), M_TEMP, M_WAITOK); + devid = malloc(nfsrv_devidcnt * NFSX_V4DEVICEID, M_TEMP, M_WAITOK); + tsf = malloc(sizeof(*tsf), M_TEMP, M_WAITOK); + + /* Get an array of the dvps for the DSs. */ + tdvpp = dvpp; + tdevid = devid; + i = 0; + NFSDDSLOCK(); + /* First, search for matches for same file system. */ + TAILQ_FOREACH(ds, &nfsrv_devidhead, nfsdev_list) { + if (ds->nfsdev_nmp != NULL && ds->nfsdev_nospc) { + if (++i > nfsrv_devidcnt) + break; + *tdvpp++ = ds->nfsdev_dvp; + NFSBCOPY(ds->nfsdev_deviceid, tdevid, NFSX_V4DEVICEID); + tdevid += NFSX_V4DEVICEID; + } + } + NFSDDSUNLOCK(); + + /* Do a VFS_STATFS() for each of the DSs and clear no space. */ + cnt = i; + tdvpp = dvpp; + tdevid = devid; + for (i = 0; i < cnt && error == 0; i++) { + dvp = *tdvpp++; + error = VFS_STATFS(dvp->v_mount, tsf); + if (error == 0 && tsf->f_bavail > 0) { + NFSD_DEBUG(1, "nfsrv_checknospc: reset nospc\n"); + nfsrv_marknospc(tdevid, false); + } + tdevid += NFSX_V4DEVICEID; + } + free(tsf, M_TEMP); + free(dvpp, M_TEMP); + free(devid, M_TEMP); +} + extern int (*nfsd_call_nfsd)(struct thread *, struct nfssvc_args *); /* diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 0e447778d639..f5ff9f8fab83 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -5052,6 +5052,10 @@ nfsrvd_layouterror(struct nfsrv_descript *nd, __unused int isdgram, if (stat != NFSERR_ACCES && stat != NFSERR_STALE && stat != NFSERR_NOSPC) nfsrv_delds(devid, curthread); + + /* For NFSERR_NOSPC, mark all deviceids and layouts. */ + if (stat == NFSERR_NOSPC) + nfsrv_marknospc(devid, true); } nfsmout: vput(vp); diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c index 85771974be2f..002236113068 100644 --- a/sys/fs/nfsserver/nfs_nfsdsocket.c +++ b/sys/fs/nfsserver/nfs_nfsdsocket.c @@ -722,6 +722,9 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, p = curthread; + /* Check for and optionally clear the no space flags for DSs. */ + nfsrv_checknospc(); + NFSVNO_EXINIT(&vpnes); NFSVNO_EXINIT(&savevpnes); /* diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 797b9b0a466e..e6a919093738 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -6817,9 +6817,14 @@ nfsrv_layoutget(struct nfsrv_descript *nd, vnode_t vp, struct nfsexstuff *exp, NFSD_DEBUG(1, "ret layout too small\n"); return (NFSERR_TOOSMALL); } - if (*iomode == NFSLAYOUTIOMODE_RW) + if (*iomode == NFSLAYOUTIOMODE_RW) { + if ((lyp->lay_flags & NFSLAY_NOSPC) != 0) { + NFSUNLOCKLAYOUT(lhyp); + NFSD_DEBUG(1, "ret layout nospace\n"); + return (NFSERR_NOSPC); + } lyp->lay_flags |= NFSLAY_RW; - else + } else lyp->lay_flags |= NFSLAY_READ; NFSBCOPY(lyp->lay_xdr, layp, lyp->lay_layoutlen); *layoutlenp = lyp->lay_layoutlen; @@ -6892,6 +6897,7 @@ nfsrv_filelayout(struct nfsrv_descript *nd, int iomode, fhandle_t *fhp, NFSBCOPY(fhp, &lyp->lay_fh, sizeof(*fhp)); lyp->lay_clientid.qval = nd->nd_clientid.qval; lyp->lay_fsid = fs; + NFSBCOPY(devid, lyp->lay_deviceid, NFSX_V4DEVICEID); /* Fill in the xdr for the files layout. */ tl = (uint32_t *)lyp->lay_xdr; @@ -6941,6 +6947,7 @@ nfsrv_flexlayout(struct nfsrv_descript *nd, int iomode, int mirrorcnt, lyp->lay_clientid.qval = nd->nd_clientid.qval; lyp->lay_fsid = fs; lyp->lay_mirrorcnt = mirrorcnt; + NFSBCOPY(devid, lyp->lay_deviceid, NFSX_V4DEVICEID); /* Fill in the xdr for the files layout. */ tl = (uint32_t *)lyp->lay_xdr; @@ -7015,6 +7022,10 @@ nfsrv_flexlayouterr(struct nfsrv_descript *nd, uint32_t *layp, int maxcnt, if (stat != NFSERR_ACCES && stat != NFSERR_STALE && stat != NFSERR_NOSPC) nfsrv_delds(devid, p); + + /* For NFSERR_NOSPC, mark all devids and layouts. */ + if (stat == NFSERR_NOSPC) + nfsrv_marknospc(devid, true); } } } @@ -8773,3 +8784,41 @@ nfsrv_findmirroredds(struct nfsmount *nmp) } return (fndds); } + +/* + * Mark the appropriate devid and all associated layout as "out of space". + */ +void +nfsrv_marknospc(char *devid, bool setit) +{ + struct nfsdevice *ds; + struct nfslayout *lyp; + struct nfslayouthash *lhyp; + int i; + + NFSDDSLOCK(); + TAILQ_FOREACH(ds, &nfsrv_devidhead, nfsdev_list) { + if (NFSBCMP(ds->nfsdev_deviceid, devid, NFSX_V4DEVICEID) == 0) { + NFSD_DEBUG(1, "nfsrv_marknospc: devid %d\n", setit); + ds->nfsdev_nospc = setit; + } + } + NFSDDSUNLOCK(); + + for (i = 0; i < nfsrv_layouthashsize; i++) { + lhyp = &nfslayouthash[i]; + NFSLOCKLAYOUT(lhyp); + TAILQ_FOREACH(lyp, &lhyp->list, lay_list) { + if (NFSBCMP(lyp->lay_deviceid, devid, + NFSX_V4DEVICEID) == 0) { + NFSD_DEBUG(1, "nfsrv_marknospc: layout %d\n", + setit); + if (setit) + lyp->lay_flags |= NFSLAY_NOSPC; + else + lyp->lay_flags &= ~NFSLAY_NOSPC; + } + } + NFSUNLOCKLAYOUT(lhyp); + } +} From nobody Wed Nov 24 23:02:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C0183188E49D; Wed, 24 Nov 2021 23:02: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 4HzxNs3XRVz3KML; Wed, 24 Nov 2021 23:02:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5AE8112762; Wed, 24 Nov 2021 23:02: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 1AON2bmG056780; Wed, 24 Nov 2021 23:02:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AON2buG056779; Wed, 24 Nov 2021 23:02:37 GMT (envelope-from git) Date: Wed, 24 Nov 2021 23:02:37 GMT Message-Id: <202111242302.1AON2buG056779@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: 40dd1c9c06eb - main - ext2: plug set-but-not-used vars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 40dd1c9c06ebe8dc7ea082c4bdc79343137a3997 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637794957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q8tgvVWlaIkLgJ+1l8rhDK4JsXdg5X7qyAMdOKOVkzk=; b=K0xVwPOcG5W/swKfRaO1iAsIuER3Tz9hQTDRC7xI55nIsD2dxp/IWDF+deGShjmbXXXwZd WGiTyKHR0CJHhj52rNM94ATEYGkEb1+yl7IQAFUyD2pVUyd52wsAYuVr8r+6vHHBD8rE4F ptISS/GpixxlZHr9Zv+OS6/pmNxSr8Bq7FTreX1vptgXkOPE6+lClxMgcSmjfqKeuwSl8i 25q1wKqmAoeFMOHTSXOa5kXuUI1zbHfVUMGarN53QglzO0I11FC09ndd/EfpoLaCQ8npwV CQKeB3X854c9K+651n22rSuow0PPop8NIly8TJ53I0pG6+4B9b1twK+KUbVhAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637794957; a=rsa-sha256; cv=none; b=Ge+hqE2Y6VII4yVKJMgPwueRAINgM26SvxV3bUm8cX+xQOw1ePZufbe61Okkd6IrsIUelT HppJVrgu7Y46aWPJCANLZOJOaI50A/ugs3eYC7b9zWisjcV8VXbLcN/Or7HewPg1g4ETlM hTHmLX8tfxVVYGnm9fRFfSZNR3UK/Bv1uUpRQ5yj0PX3P2+fzWZHgzpnsA+Xlgf8hprCsF J/QwsAUSGVwX+4Vyem+iHgcImEsSIqC1pV7wlkvo9LLu+cmo3zTSC2gU1lrcjUt2F28HqS eq1Ls11UYnld+pQqTRJKKU1fngbKkO4WBy4NmYXGdkN6co9fuws5yK03WUJj3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=40dd1c9c06ebe8dc7ea082c4bdc79343137a3997 commit 40dd1c9c06ebe8dc7ea082c4bdc79343137a3997 Author: Mateusz Guzik AuthorDate: 2021-11-24 22:59:51 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-24 23:02:26 +0000 ext2: plug set-but-not-used vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/fs/ext2fs/ext2_extents.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c index 408f1a27ae76..3d393c4b7bbe 100644 --- a/sys/fs/ext2fs/ext2_extents.c +++ b/sys/fs/ext2fs/ext2_extents.c @@ -280,11 +280,8 @@ ext4_ext_in_cache(struct inode *ip, daddr_t lbn, struct ext4_extent *ep) static int ext4_ext_check_header(struct inode *ip, struct ext4_extent_header *eh) { - struct m_ext2fs *fs; char *error_msg; - fs = ip->i_e2fs; - if (le16toh(eh->eh_magic) != EXT4_EXT_MAGIC) { error_msg = "header: invalid magic"; goto corrupted; @@ -418,14 +415,12 @@ int ext4_ext_find_extent(struct inode *ip, daddr_t block, struct ext4_extent_path **ppath) { - struct m_ext2fs *fs; struct ext4_extent_header *eh; struct ext4_extent_path *path; struct buf *bp; uint64_t blk; int error, depth, i, ppos, alloc; - fs = ip->i_e2fs; eh = ext4_ext_inode_header(ip); depth = ext4_ext_inode_depth(ip); ppos = 0; @@ -690,12 +685,9 @@ static int ext4_ext_insert_index(struct inode *ip, struct ext4_extent_path *path, uint32_t lblk, e4fs_daddr_t blk) { - struct m_ext2fs *fs; struct ext4_extent_index *idx; int len; - fs = ip->i_e2fs; - if (lblk == le32toh(path->ep_index->ei_blk)) { SDT_PROBE2(ext2fs, , trace, extents, 1, "lblk == index blk => extent corrupted"); From nobody Wed Nov 24 23:56:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 451EE18AD9CF; Wed, 24 Nov 2021 23:56:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzyZp6bwVz4R0h; Wed, 24 Nov 2021 23:56:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BEB64132DE; Wed, 24 Nov 2021 23: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 1AONuIgB022535; Wed, 24 Nov 2021 23: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 1AONuI1M022534; Wed, 24 Nov 2021 23:56:18 GMT (envelope-from git) Date: Wed, 24 Nov 2021 23:56:18 GMT Message-Id: <202111242356.1AONuI1M022534@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: 83511ce5c473 - main - ldconfig: remove a comment which is another remnant of a.out support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83511ce5c473406e0661247e40971be28e218684 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637798178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HyCOCK+ctB5z8Cz9eOVGKEvuyJwlUJnrTFZDAa8I3Eo=; b=MjIc4PNdrcWNuWfVL28HnLaEPWb6HpZC+hbZpSmyc/hAT8yA7vBUIfJ5ivfBZT5TPG2kLH 6a3ZzvYUeRmK06FE/It9qeYWJlZrCAmJPgx/wvf8SF0u3ba0N/Fqp9wf5CNI2uGHbrQCB9 xWRYUxRKcm86UR8xbMDA0vJ1EWJNH1AwG9PV+EmthdK0l1RyNNDevdysFtI7kPigUEvOaK CGOfRRqOWdSqYoaTqKtx12F9NO8gaSL070u3M7c5L7MOS4PeDUn8dbC78Krk7dovEAiDW0 3hQXHafRD80ks8hlQfbfcXwkf7EGBPeJICo29PlWhgEzmQ3s7JoPiY97e7W1PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637798178; a=rsa-sha256; cv=none; b=KzwEZjAX+KAU25ZNCdVy+ffYLw5NIWgteRTKbQI2NikgrjKv7I5U4sqsLpF4sfpXwyWaI0 eFFKnMF96XEuHv9VpJ30d2rTrtOrNrVoIp7cblAeWJMIoabsWNzqda9xPCpLIviM2JO6LT JJmoLns8vMX46LIBvF1U1i5XpW6XYzXuXZlIr7RUX4rDPo3z9inIB45Cd/w9JgDlJkcKgn wF8+Cit8FsxTNumxudQrtlWmnw89JY6BFqfA/O6B1HBaAghvTfWVW5DicoP4aDRTRx6W8y n/arwNlFYuvbv2EtyJPKDR/UQQDmKO4KG/TLNPVDMlfXKmrU1Cqq3fu4vxETrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=83511ce5c473406e0661247e40971be28e218684 commit 83511ce5c473406e0661247e40971be28e218684 Author: Konstantin Belousov AuthorDate: 2021-11-24 20:44:20 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-24 23:55:03 +0000 ldconfig: remove a comment which is another remnant of a.out support Noted and reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33058 --- sbin/ldconfig/ldconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index d0c6c9802a52..389cbb6101b5 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -102,7 +102,7 @@ main(int argc, char **argv) } if (is_soft) - hints_file = _PATH_ELFSOFT_HINTS; /* Never will have a.out softfloat */ + hints_file = _PATH_ELFSOFT_HINTS; else if (is_32) hints_file = _PATH_ELF32_HINTS; else From nobody Wed Nov 24 23:56:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 476DD18ADB8A; Wed, 24 Nov 2021 23: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 4HzyZr05vzz4RBn; Wed, 24 Nov 2021 23:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D825313731; Wed, 24 Nov 2021 23: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 1AONuJxq022559; Wed, 24 Nov 2021 23: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 1AONuJwa022558; Wed, 24 Nov 2021 23:56:19 GMT (envelope-from git) Date: Wed, 24 Nov 2021 23:56:19 GMT Message-Id: <202111242356.1AONuJwa022558@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: 3f2c6f559841 - main - ldconfig: start of cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f2c6f5598410b7233b0acd1c804a0473fa1e9fa Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637798180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GabUQCsdko6Y6PlSZKp/fVc1QkBoID99qNioU3mzmjM=; b=cHI1kN1LYbS/3zogphzi4CAzNeHx4EpLFN+wSgym4aEMALHIFOCX6HYspuYBWywlgv7wGS 35GZXpA3dZzhfpbxHWhL/83iWqM3gASpZbV7zDx9caN/jqCuWfw7lJeOyTAQml3f4K+IL5 EkH5ODOfssOSxFNL9SPQm8eNnA8JGy6KYVC5gzJBrIKgNgOjdO3HPH0uEBskFWh+yv4jUd YSvXRWVA1KkbZB/q4MW0kGu3H2A2VVZ1RGzxLnpNWpe9YXrjimfl/pivFoTMimmirYUgtm CScGT9G88kfZsSKezOWU9gly747rGydT5AY+6WzKZJtGy1i8nRzBqZWiTgXOEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637798180; a=rsa-sha256; cv=none; b=Z3+TgS9kFsKzkE+7EcG2NFGuEx6hnrb6A/hER2xkaKfQ/neVvT79xs0rHZ453iSYYuqp51 iBjGrETk0wyHi4TJMf1k0qHkqspQ8SDHPWPKzLzrlapx0eWsjx7SbGtCp/5mtc8dpSmXrH +3m50nMHVeiYEufIe8s6VN9zDY7X0KWxHXxBLUdTcHDFBntgwxEYoE5HTaGqAdeDKpSz1N PmYbuy1S2iay5FtJ5FAqFgIYYPE/YEhuZUKmGqn6VeKik/50Lbbd1gU4FGO/gVf3BN/zma 6Q8wnHO6gP/08y7rnMzMpivYhlufX7xKs2IfZf/26WgzyntYx0rUVehVDrXBYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3f2c6f5598410b7233b0acd1c804a0473fa1e9fa commit 3f2c6f5598410b7233b0acd1c804a0473fa1e9fa Author: Konstantin Belousov AuthorDate: 2021-11-19 03:35:50 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-24 23:55:03 +0000 ldconfig: start of cleanup Use bool. Use local variables instead of static. Remove non-functional debugging override of hints file path. Use explicit exit() instead of return from main. Minor style tweaks. Reviewed by: emaste Tested by: jbeich Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33058 --- sbin/ldconfig/elfhints.c | 19 ++++++++--------- sbin/ldconfig/ldconfig.c | 55 +++++++++++++++++------------------------------- sbin/ldconfig/ldconfig.h | 5 +++-- 3 files changed, 31 insertions(+), 48 deletions(-) diff --git a/sbin/ldconfig/elfhints.c b/sbin/ldconfig/elfhints.c index bbedac64b3ff..81236feec5ca 100644 --- a/sbin/ldconfig/elfhints.c +++ b/sbin/ldconfig/elfhints.c @@ -48,17 +48,17 @@ #define MAXDIRS 1024 /* Maximum directories in path */ #define MAXFILESIZE (16*1024) /* Maximum hints file size */ -static void add_dir(const char *, const char *, int); +static void add_dir(const char *, const char *, bool); static void read_dirs_from_file(const char *, const char *); -static void read_elf_hints(const char *, int); +static void read_elf_hints(const char *, bool); static void write_elf_hints(const char *); static const char *dirs[MAXDIRS]; static int ndirs; -int insecure; +bool insecure; static void -add_dir(const char *hintsfile, const char *name, int trusted) +add_dir(const char *hintsfile, const char *name, bool trusted) { struct stat stbuf; int i; @@ -186,7 +186,7 @@ read_dirs_from_file(const char *hintsfile, const char *listfile) } static void -read_elf_hints(const char *hintsfile, int must_exist) +read_elf_hints(const char *hintsfile, bool must_exist) { int fd; struct stat s; @@ -231,15 +231,14 @@ read_elf_hints(const char *hintsfile, int must_exist) } void -update_elf_hints(const char *hintsfile, int argc, char **argv, int merge) +update_elf_hints(const char *hintsfile, int argc, char **argv, bool merge) { - int i; + struct stat s; + int i; if (merge) - read_elf_hints(hintsfile, 0); + read_elf_hints(hintsfile, false); for (i = 0; i < argc; i++) { - struct stat s; - if (stat(argv[i], &s) == -1) warn("warning: %s", argv[i]); else if (S_ISREG(s.st_mode)) diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 389cbb6101b5..3f623d6f38b1 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -30,11 +30,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include @@ -46,6 +41,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -53,34 +49,20 @@ static const char rcsid[] = #include "ldconfig.h" -#if DEBUG -/* test */ -#undef _PATH_ELF_HINTS -#define _PATH_ELF_HINTS "./ld-elf.so.hints" -#endif - #define _PATH_LD32_HINTS "/var/run/ld32.so.hints" #define _PATH_ELF32_HINTS "/var/run/ld-elf32.so.hints" #define _PATH_ELFSOFT_HINTS "/var/run/ld-elf-soft.so.hints" -#undef major -#undef minor - -static int verbose; -static int nostd; -static int justread; -static int merge; -static int rescan; -static const char *hints_file; - -static void usage(void); +static void usage(void); int main(int argc, char **argv) { - int c; - int is_32 = 0; - int is_soft = 0; + const char *hints_file; + int c; + bool is_32, is_soft, justread, merge, nostd, rescan, verbose; + + is_32 = is_soft = justread = merge = nostd = rescan = verbose = false; while (argc > 1) { if (strcmp(argv[1], "-aout") == 0) { @@ -89,11 +71,11 @@ main(int argc, char **argv) argc--; argv++; } else if (strcmp(argv[1], "-32") == 0) { - is_32 = 1; + is_32 = true; argc--; argv++; } else if (strcmp(argv[1], "-soft") == 0) { - is_soft = 1; + is_soft = true; argc--; argv++; } else { @@ -108,29 +90,29 @@ main(int argc, char **argv) else hints_file = _PATH_ELF_HINTS; if (argc == 1) - rescan = 1; + rescan = true; else while((c = getopt(argc, argv, "Rf:imrsv")) != -1) { switch (c) { case 'R': - rescan = 1; + rescan = true; break; case 'f': hints_file = optarg; break; case 'i': - insecure = 1; + insecure = true; break; case 'm': - merge = 1; + merge = true; break; case 'r': - justread = 1; + justread = true; break; case 's': - nostd = 1; + nostd = true; break; case 'v': - verbose = 1; + verbose = true; break; default: usage(); @@ -143,13 +125,14 @@ main(int argc, char **argv) else update_elf_hints(hints_file, argc - optind, argv + optind, merge || rescan); - return 0; + exit(0); } static void usage(void) { fprintf(stderr, - "usage: ldconfig [-32] [-elf] [-Rimrsv] [-f hints_file] [directory | file ...]\n"); + "usage: ldconfig [-32] [-elf] [-Rimrsv] [-f hints_file] " + "[directory | file ...]\n"); exit(1); } diff --git a/sbin/ldconfig/ldconfig.h b/sbin/ldconfig/ldconfig.h index 9b278255ac07..8aff4e6a5ef2 100644 --- a/sbin/ldconfig/ldconfig.h +++ b/sbin/ldconfig/ldconfig.h @@ -32,12 +32,13 @@ #define LDCONFIG_H 1 #include +#include -extern int insecure; /* -i flag, needed here for elfhints.c */ +extern bool insecure; /* -i flag, needed here for elfhints.c */ __BEGIN_DECLS void list_elf_hints(const char *); -void update_elf_hints(const char *, int, char **, int); +void update_elf_hints(const char *, int, char **, bool); __END_DECLS #endif From nobody Wed Nov 24 23:56:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 019A118AD9D6; Wed, 24 Nov 2021 23: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 4HzyZs28G3z4Qqx; Wed, 24 Nov 2021 23:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07475135AA; Wed, 24 Nov 2021 23: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 1AONuK1w022583; Wed, 24 Nov 2021 23: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 1AONuKbs022582; Wed, 24 Nov 2021 23:56:20 GMT (envelope-from git) Date: Wed, 24 Nov 2021 23:56:20 GMT Message-Id: <202111242356.1AONuKbs022582@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: b828161d123b - main - ldconfig(8): nostd/-s does nothing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b828161d123bec894bc5a320ef26d6afc9b13ae8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637798181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzBUzqa6MjzGrobKQqfFwX67FqUe9p1VWcW1GxQIIIk=; b=JXZVgSYz+e5WROB6CC7ZvY8vVqdL8ZzH++NqO1mgR0pdkTFXyjIbXIct7GEw+ZwOCIWnxI teMRHqBq9C1lxndnBM8EJhWQ4Jak92ZwJqAAzi2HZyviHBrRA7PIUxdgnO0Ip2OOMYYsQk pUGvXpxIF5v+iiQCCKp4rye1LBQU7fM8JYbRnA3zqKa8KkblCymP+qlUp8A4JGWf6nC7Vx mRF2FmXYVEaAkrV52bQs5B1lv7WZ3uTawEBp34oWkMb337puKdEKTXPoMPoJczmpPhQjQ4 9rSfXEcErOTYag6bUYPyscF3Ssq6cRjqkpa13xu+CIU6plmYOSOtJRtX1VOLbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637798181; a=rsa-sha256; cv=none; b=OXgWpC2U2B09Onu6j32uJzzcSOQEH1YD86woZSq26ZbJ5dWuuWaN9Ogy726tN/ye382awg 3DSjKJP7wnpVkI4csuMq0DktEDgGg4nJJJ3sVFqjd3CjH27y39rZ0HrDgXE/gp0GZrrOoq LD/mPamvAEV3h9ktD1etnXjhjiyPAdFTZbBwBKEKzkGAmLZ57ury79kumgMarvIR5un8sE 0RO8OdEa5LygEpdrc1mJGfqTG5UZcBGGKHoXo7XEdWSKmq3ioi21z1dlJZnVG05YHm962/ Fs8LCr0MsHlyqeK5tK/MDwPB7ZyzbKBLrcYA/ejYiTme0Dvy9oYNz36mIqiV8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b828161d123bec894bc5a320ef26d6afc9b13ae8 commit b828161d123bec894bc5a320ef26d6afc9b13ae8 Author: Konstantin Belousov AuthorDate: 2021-11-19 05:21:21 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-24 23:55:03 +0000 ldconfig(8): nostd/-s does nothing Remove the option from man page and summary. Silently ignore it when parsing command line for backward compatibility. Reviewed by: emaste Tested by: jbeich Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33058 --- sbin/ldconfig/ldconfig.8 | 6 +----- sbin/ldconfig/ldconfig.c | 8 ++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sbin/ldconfig/ldconfig.8 b/sbin/ldconfig/ldconfig.8 index 63e2271b7cd5..7718f018bc70 100644 --- a/sbin/ldconfig/ldconfig.8 +++ b/sbin/ldconfig/ldconfig.8 @@ -43,7 +43,7 @@ .Sh SYNOPSIS .Nm .Op Fl 32 -.Op Fl Rimrsv +.Op Fl Rimrv .Op Fl f Ar hints_file .Op Ar directory | Ar .Sh DESCRIPTION @@ -128,10 +128,6 @@ on the standard output. The hints file is not modified. .Pp Scan and print all libraries found on the directories list. -.It Fl s -Do not scan the built-in system directory -.Pq Dq /usr/lib -for shared libraries. .It Fl v Switch on verbose mode. .El diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 3f623d6f38b1..777895936834 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -60,9 +60,9 @@ main(int argc, char **argv) { const char *hints_file; int c; - bool is_32, is_soft, justread, merge, nostd, rescan, verbose; + bool is_32, is_soft, justread, merge, rescan, verbose; - is_32 = is_soft = justread = merge = nostd = rescan = verbose = false; + is_32 = is_soft = justread = merge = rescan = verbose = false; while (argc > 1) { if (strcmp(argv[1], "-aout") == 0) { @@ -109,7 +109,7 @@ main(int argc, char **argv) justread = true; break; case 's': - nostd = true; + /* was nostd */ break; case 'v': verbose = true; @@ -132,7 +132,7 @@ static void usage(void) { fprintf(stderr, - "usage: ldconfig [-32] [-elf] [-Rimrsv] [-f hints_file] " + "usage: ldconfig [-32] [-elf] [-Rimrv] [-f hints_file] " "[directory | file ...]\n"); exit(1); } From nobody Wed Nov 24 23:56:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0A55B18ADAD5; Wed, 24 Nov 2021 23:56: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 4HzyZt3Wmkz4Qwk; Wed, 24 Nov 2021 23:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E20713783; Wed, 24 Nov 2021 23: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 1AONuMO7022607; Wed, 24 Nov 2021 23: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 1AONuMIw022606; Wed, 24 Nov 2021 23:56:22 GMT (envelope-from git) Date: Wed, 24 Nov 2021 23:56:22 GMT Message-Id: <202111242356.1AONuMIw022606@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: f340188625d4 - main - rtld_paths.h: Provide _PATH_ELF32_HINTS string, unconditionally List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f340188625d4e0e4db850becb0a9b25448053e10 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637798183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eX1cjP/L/1tZaicjx6wHO18RgyGrBdgNrJfzoTKlwUo=; b=aO3Y3E5rFwUzljfdzLcZIUQ7g/NPakkJVc6DO8AqIp6aY05DZBNqnV8Iy+9cx5rZk0kw4/ kPuxAw6iMzKXLckpctKFEOIx0A7GKtRK6R69SSHjBTiRCFa4RlmHlFIvjLo1cLabQooZLf QQE/gSgMgurwuh6A8xF8L7TJ0o8ll0kiIvF6bqlY/W+CL5dQ30AGPoMvlr7S3H2t43TW0M YzNWuMEUvvROaFaPyOQtZmF3Dvc/SEmORY5bEPCwnM71tNPDNLoGb5xqv7ZXiEYwEVAUvO YW9VPRjopmAn7uaCuIUXJDELc58NYm+tCxHY9e5+AKvAzOSNwJrps46s+juXwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637798183; a=rsa-sha256; cv=none; b=qsRo1ZDV2isqguAVLU9HmSt2rs157vkyxaXHFKEtkgVazEALARLob7aICV+IheATxG/Ssn EmAuWs7UgIoQ6uscVMVDGzND9cgDW6CyDIbx6idOuSLuimjlHoaXCiPpbg92V2Ei5LDr3n /5YlL11lvDaqdZgHB6xHhYIXsTO7WkbgnbPfCukNbRMN5OrPEBrqcgGNmvIygbz6ynSxhn FNqIzD90/mXDAdLO/FjxAaefq7mPmfMCe0xzuB58zg6VVHsPhm0Uq0iHivRqAI1zQVoNRf ylIO8KZhwhtJfqmlt6Pb9J5Gwok1ykIw+lsbB2tha+ZZo5amoIqnf1a11A9Qcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f340188625d4e0e4db850becb0a9b25448053e10 commit f340188625d4e0e4db850becb0a9b25448053e10 Author: Konstantin Belousov AuthorDate: 2021-11-19 03:44:33 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-24 23:55:03 +0000 rtld_paths.h: Provide _PATH_ELF32_HINTS string, unconditionally Reviewed by: emaste Tested by: jbeich Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33058 --- libexec/rtld-elf/rtld_paths.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld_paths.h b/libexec/rtld-elf/rtld_paths.h index 4ce423ce6dbb..6ead517e8feb 100644 --- a/libexec/rtld-elf/rtld_paths.h +++ b/libexec/rtld-elf/rtld_paths.h @@ -35,8 +35,12 @@ #define _COMPAT32_BASENAME_RTLD "ld-elf32.so.1" #endif +#ifndef _PATH_ELF32_HINTS +#define _PATH_ELF32_HINTS "/var/run/ld-elf32.so.hints" +#endif + #ifdef COMPAT_32BIT -#define _PATH_ELF_HINTS "/var/run/ld-elf32.so.hints" +#define _PATH_ELF_HINTS _PATH_ELF32_HINTS #define _PATH_LIBMAP_CONF "/etc/libmap32.conf" #define _BASENAME_RTLD _COMPAT32_BASENAME_RTLD #define STANDARD_LIBRARY_PATH "/lib32:/usr/lib32" From nobody Wed Nov 24 23:56:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 76F7518ADBB0; Wed, 24 Nov 2021 23:56: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 4HzyZv3Kr4z4RFb; Wed, 24 Nov 2021 23:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DE30135AB; Wed, 24 Nov 2021 23:56: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 1AONuNBU022631; Wed, 24 Nov 2021 23: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 1AONuNDF022630; Wed, 24 Nov 2021 23:56:23 GMT (envelope-from git) Date: Wed, 24 Nov 2021 23:56:23 GMT Message-Id: <202111242356.1AONuNDF022630@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: af9115870670 - main - ldconfig: use libexec/rtld-elf/rtld_paths.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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af9115870670f508c11b3d173bcff5116d8ef320 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637798183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ax0GTQY/phd6ASKs+fcB5kIkhflHtNeFNiAqUJmmYtQ=; b=m82mIJo+aiALyWJMAPjgdugzhmYv0f99+PA+h9wu+YqXePo/lXz8cD4TxZmCt8YBd38TT/ 4kZcHlqGItWhJkDP/RCFsFuuxLHeCv5WF+2Akk5vDoHwi0ELv9eJiLKbJ2gZUDnnMv8G2Z /G3P3nMvlzoEoQfoedj7VW+/nCIk1wC4V35I7uJclPVVY0iIXz0SHMMyfJROdM4kqlqCiy 9s/tHtYHrAUn/X3u279zeN5cWlqFKp8U3Nm3o6f4SmWlg4oCo/Kqs/HTHTZiJnJXtyzPZH HRadzZ1srZWgud0vWgB0RVved4I5wtttYkcmKsUO6KL8/uDi58fTFoLN2gyERw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637798183; a=rsa-sha256; cv=none; b=kPiJ0jOsxUXBzgcgMAYu+D4r8tfcd7vy7JQW8USczm3kqJfMJbYShpM0yw6/o+gn3UNw2E b9PzLmNXggbPP51eIcoOQSyOCx5RnE9GriOt9mss6exD4w5Rvywvy98cnISZbdYAF1hUI7 ouhoVB3fh8ENyDwWFUYXSdJrg/a7lHbxa4XvBgBmlL1ts04mMh5Vvn3VKSJwtcKJhTjuia A33KEOv5boMyk8TKRl6F5SCbAlfYrA4VjQ4gRmyDm1HoBw1GmA64w3AJpLa6ug1n/K59qr mgyteomXklInNcKoq94v6eBdWQXadcBlwWe0OHrsp8ZXGOa9ysWttMj3IXQH5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=af9115870670f508c11b3d173bcff5116d8ef320 commit af9115870670f508c11b3d173bcff5116d8ef320 Author: Konstantin Belousov AuthorDate: 2021-11-19 03:45:31 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-24 23:55:04 +0000 ldconfig: use libexec/rtld-elf/rtld_paths.h instead of duplicating definitions using slighly different macro names. Reviewed by: emaste Tested by: jbeich Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33058 --- sbin/ldconfig/Makefile | 1 + sbin/ldconfig/ldconfig.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sbin/ldconfig/Makefile b/sbin/ldconfig/Makefile index 2ead668578f6..070c2c3d6901 100644 --- a/sbin/ldconfig/Makefile +++ b/sbin/ldconfig/Makefile @@ -3,6 +3,7 @@ PACKAGE=runtime PROG= ldconfig SRCS= elfhints.c ldconfig.c +CFLAGS+= -I${SRCTOP}/libexec/rtld-elf MAN= ldconfig.8 .include diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 777895936834..288c22813121 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -48,6 +48,7 @@ #include #include "ldconfig.h" +#include "rtld_paths.h" #define _PATH_LD32_HINTS "/var/run/ld32.so.hints" #define _PATH_ELF32_HINTS "/var/run/ld-elf32.so.hints" @@ -84,7 +85,7 @@ main(int argc, char **argv) } if (is_soft) - hints_file = _PATH_ELFSOFT_HINTS; + hints_file = _PATH_SOFT_ELF_HINTS; else if (is_32) hints_file = _PATH_ELF32_HINTS; else From nobody Wed Nov 24 23:56:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B78FB18ADC08; Wed, 24 Nov 2021 23: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 4HzyZx23XZz4R8r; Wed, 24 Nov 2021 23:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 549EE13784; Wed, 24 Nov 2021 23: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 1AONuOKk022661; Wed, 24 Nov 2021 23: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 1AONuOBN022660; Wed, 24 Nov 2021 23:56:24 GMT (envelope-from git) Date: Wed, 24 Nov 2021 23:56:24 GMT Message-Id: <202111242356.1AONuOBN022660@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: 3ede04c78c7c - main - ldconfig(8): check for no-args command line after options are parsed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3ede04c78c7c726ed79a39d22c65a58d0ecc5d00 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637798185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKO+hOG30WgS4IUBneag0Bs2eWjRaExcDEFzm0ubapk=; b=p9lmEkUQmVXoM2HvarqgHU8Gg47zD1ac9UVpFU5GqC/1DGsNr5PPX43fwP8Cbd24NXahTq ovhY78vVpJ/en6H/QCG5qrVHehVuEjQxvTFSQ3mIfs2pFDLTDpE7vTrbJw3gYafUN01k0H ih4UCJw3JPNdXgDIEwMxmIfhV86FONHNWuI0P8Jl2xMGgDwf4mH8Vq+wysuMoG4hT1JTx/ qjtDFOyYb7YuPA3CBrdgv+2HnG1tIp44x73evUNdHbWKvj5ddkEsNKvXjIUy2eo0zcJJTV tO6rwv1zEXetYHzQ8O2wvo+M2/rkauJBDy6jvus/bmwTFSMf8TOOQp4JFF+1bQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637798185; a=rsa-sha256; cv=none; b=qrxDNUdRB3nwgb4llr5D5p0jPZOxLgplfIQADpBvWY4G9++XNJPb+pIahZEGsizb8IU4/X 1fn0cEnO2KS1LH3W5qT6jyNe3DIqLpmjpJKYvzYESpC9UukvZNJGjizsgny7TYOkUeYhl8 bPIYwYS3uy6Bati+TzFhdoUcTTL06Hs4TMMlLkB5kRaxlhIEj6Ceew/WRfR4CJ+lVRYnUW CKxDJaHOHW8G38jRsMnAV2lAm7nJ9Y7PJzyyBJZIgHyrQzHOIVs51sndBhcXc8VXV/0blh ZfbvKW0WOjA031wjqA5qwU39hWfgv3fbiLgFZnsDXlQsrUR0QDnQubcE/oAy2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3ede04c78c7c726ed79a39d22c65a58d0ecc5d00 commit 3ede04c78c7c726ed79a39d22c65a58d0ecc5d00 Author: Konstantin Belousov AuthorDate: 2021-11-19 04:07:58 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-24 23:55:04 +0000 ldconfig(8): check for no-args command line after options are parsed Default action for ldconfig is specified as -R AKA 'append', and for no-args (without options changing default actions), ldconfig should append empty list of directories to current list. But because the check was done before options were parsed out, presence of any option turned off default rescan. As result, innocently-looked commands like `ldconfig -v' were interpreted as setting directory hints list to one specified on the command line, i.e. empty. Reported by: https://github.com/mesonbuild/meson/issues/9592 Reviewed by: emaste Tested by: jbeich Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33058 --- sbin/ldconfig/ldconfig.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 288c22813121..b039412a648b 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -90,9 +90,7 @@ main(int argc, char **argv) hints_file = _PATH_ELF32_HINTS; else hints_file = _PATH_ELF_HINTS; - if (argc == 1) - rescan = true; - else while((c = getopt(argc, argv, "Rf:imrsv")) != -1) { + while((c = getopt(argc, argv, "Rf:imrsv")) != -1) { switch (c) { case 'R': rescan = true; @@ -121,11 +119,14 @@ main(int argc, char **argv) } } - if (justread) + if (justread) { list_elf_hints(hints_file); - else + } else { + if (argc == optind) + rescan = true; update_elf_hints(hints_file, argc - optind, argv + optind, merge || rescan); + } exit(0); } From nobody Thu Nov 25 00:36:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3EA9118A3E2D; Thu, 25 Nov 2021 00:36: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 4HzzSs6fpxz4hyN; Thu, 25 Nov 2021 00:36:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0B6E13C24; Thu, 25 Nov 2021 00:36: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 1AP0aDln075680; Thu, 25 Nov 2021 00:36:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP0aDEN075679; Thu, 25 Nov 2021 00:36:13 GMT (envelope-from git) Date: Thu, 25 Nov 2021 00:36:13 GMT Message-Id: <202111250036.1AP0aDEN075679@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 6e8e261f0d4e - stable/13 - nfscl: Add a LayoutError RPC for NFSv4.2 pNFS mounts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6e8e261f0d4e8b71e2a7ab74a05e0ed7cae5704a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637800573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OUKh27L1MEORK3Fn/WplBZX96NWC0R9OXUi0NdzTIfc=; b=wBTzM7gwNjMiVRPWwkxwNrAtXyUCo1o7/tWu3Finyq1fxEoZyKbdTOoJEXYTbmSIKekx2k 4M5Os96KwPBKItZHd9kJ6WqRgBe+wKego+Xcg3TybsbTFdtj+7kRX/XZAc93PpsaBDmOBI kmegzxF4g7MmnQy6jNeBzO4vA1WIu4CkiyXI86uVl7cDAE+UakCqx6O585NiYu0xdY+ZMb dWroQkPWtyJasOKVBwhfO7gWUwp//yw9ZgpbfYkNJy+K9A4UsNHl8TY3a1iV/d5AEADLrt kfHupau7vNsfIvcODyKUKREBf44zRZ5Ugpd1rcYm8m8zgKwmdy/noTI0V5uKIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637800573; a=rsa-sha256; cv=none; b=SdDbBe2z/LZRHwnjPYNDxua4CJ+sxAVwN2BA4sTh6yokfRQqiRMR936Bb2ivxJJZZbH1td ohpala+irnW5BqzYQGMuDR7T5dI48N7pauV3lNRDOT7s5Cy9jKC36CfrAfVHclmTdh+Rb9 XukExV2o6uvdZ3NCimzBhM9yxz8gU3XQIf6iOcdQjjtDgGuC2weFOGQg3de/LBhnaRwttD BkqRTXwheCEnF+YS8puaXuw2CgPI1QPZyazmvQfLWM+/bTgEJsm27dJfjiGxnDTKnotTZN GvRVlVIkBM91u/cXMhZTxPEVcpHmrEqF6ESS+QsuUo3VMeNjWYmwscKZy8Suow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6e8e261f0d4e8b71e2a7ab74a05e0ed7cae5704a commit 6e8e261f0d4e8b71e2a7ab74a05e0ed7cae5704a Author: Rick Macklem AuthorDate: 2021-11-11 23:43:58 +0000 Commit: Rick Macklem CommitDate: 2021-11-25 00:32:09 +0000 nfscl: Add a LayoutError RPC for NFSv4.2 pNFS mounts If a pNFS server's DS runs out of disk space, it replies NFSERR_NOSPC to the client doing writing. For the Linux client, it then sends a LayoutError RPC to the MDS server to tell it about the error. This patch adds the same to the FreeBSD NFSv4.2 pNFS client, to maintain Linux compatible behaviour, particlularily for non-FreeBSD pNFS servers. (cherry picked from commit 44744f75386e2102584acbca24fbe67de16051ca) --- sys/fs/nfs/nfs_commonsubs.c | 8 ++++-- sys/fs/nfs/nfsport.h | 15 ++++++++--- sys/fs/nfs/nfsproto.h | 11 +++++++- sys/fs/nfsclient/nfs_clrpcops.c | 56 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 144b2e215496..58d517b0b13d 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -215,7 +215,7 @@ static struct nfsrv_lughash *nfsgroupnamehash; static int nfs_bigreply[NFSV42_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 1, 0 }; + 1, 0, 0, 1, 0, 0, 0, 0 }; /* local functions */ static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); @@ -299,6 +299,9 @@ static struct { { NFSV4OP_REMOVEXATTR, 2, "Rmxattr", 7, }, { NFSV4OP_LISTXATTRS, 2, "Listxattr", 9, }, { NFSV4OP_BINDCONNTOSESS, 1, "BindConSess", 11, }, + { NFSV4OP_LOOKUP, 5, "LookupOpen", 10, }, + { NFSV4OP_DEALLOCATE, 2, "Deallocate", 10, }, + { NFSV4OP_LAYOUTERROR, 1, "LayoutError", 11, }, }; /* @@ -307,7 +310,8 @@ static struct { static int nfs_bigrequest[NFSV42_NPROCS] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0 }; /* diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h index cb82666ab397..5dcce15f7f64 100644 --- a/sys/fs/nfs/nfsport.h +++ b/sys/fs/nfs/nfsport.h @@ -415,10 +415,19 @@ /* BindConnectionToSession, done by the krpc for a new connection. */ #define NFSPROC_BINDCONNTOSESS 65 +/* Do a Lookup+Open for "oneopenown". */ +#define NFSPROC_LOOKUPOPEN 66 + +/* Do an NFSv4.2 Deallocate. */ +#define NFSPROC_DEALLOCATE 67 + +/* Do an NFSv4.2 LayoutError. */ +#define NFSPROC_LAYOUTERROR 68 + /* * Must be defined as one higher than the last NFSv4.2 Proc# above. */ -#define NFSV42_NPROCS 66 +#define NFSV42_NPROCS 69 #endif /* NFS_V3NPROCS */ @@ -447,7 +456,7 @@ struct nfsstatsv1 { uint64_t readlink_bios; uint64_t biocache_readdirs; uint64_t readdir_bios; - uint64_t rpccnt[NFSV42_NPROCS + 14]; + uint64_t rpccnt[NFSV42_NPROCS + 11]; uint64_t rpcretries; uint64_t srvrpccnt[NFSV42_NOPS + NFSV4OP_FAKENOPS + 15]; uint64_t reserved_0; @@ -512,7 +521,7 @@ struct nfsstatsov1 { uint64_t readlink_bios; uint64_t biocache_readdirs; uint64_t readdir_bios; - uint64_t rpccnt[NFSV42_NPROCS + 3]; + uint64_t rpccnt[NFSV42_NPROCS]; uint64_t rpcretries; uint64_t srvrpccnt[NFSV42_PURENOPS + NFSV4OP_FAKENOPS]; uint64_t reserved_0; diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h index 13e146154805..968cc6a41cc3 100644 --- a/sys/fs/nfs/nfsproto.h +++ b/sys/fs/nfs/nfsproto.h @@ -396,10 +396,19 @@ /* BindConnectionToSession, done by the krpc for a new connection. */ #define NFSPROC_BINDCONNTOSESS 65 +/* Do a Lookup+Open for "oneopenown". */ +#define NFSPROC_LOOKUPOPEN 66 + +/* Do an NFSv4.2 Deallocate. */ +#define NFSPROC_DEALLOCATE 67 + +/* Do an NFSv4.2 LayoutError. */ +#define NFSPROC_LAYOUTERROR 68 + /* * Must be defined as one higher than the last NFSv4.2 Proc# above. */ -#define NFSV42_NPROCS 66 +#define NFSV42_NPROCS 69 #endif /* NFS_V3NPROCS */ diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 6489569f8acf..b616cd729ab1 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -147,6 +147,9 @@ static int nfsrpc_locku(struct nfsrv_descript *, struct nfsmount *, u_int32_t, struct ucred *, NFSPROC_T *, int); static int nfsrpc_setaclrpc(vnode_t, struct ucred *, NFSPROC_T *, struct acl *, nfsv4stateid_t *, void *); +static int nfsrpc_layouterror(struct nfsmount *, uint8_t *, int, uint64_t, + uint64_t, nfsv4stateid_t *, struct ucred *, NFSPROC_T *, uint32_t, + uint32_t, char *); static int nfsrpc_getlayout(struct nfsmount *, vnode_t, struct nfsfh *, int, uint32_t, uint32_t *, nfsv4stateid_t *, uint64_t, struct nfscllayout **, struct ucred *, NFSPROC_T *); @@ -5459,6 +5462,44 @@ nfsmout: return (error); } +/* + * Do the NFSv4.2 LayoutError. + */ +static int +nfsrpc_layouterror(struct nfsmount *nmp, uint8_t *fh, int fhlen, uint64_t offset, + uint64_t len, nfsv4stateid_t *stateidp, struct ucred *cred, NFSPROC_T *p, + uint32_t stat, uint32_t op, char *devid) +{ + uint32_t *tl; + struct nfsrv_descript nfsd, *nd = &nfsd; + int error; + + nfscl_reqstart(nd, NFSPROC_LAYOUTERROR, nmp, fh, fhlen, NULL, NULL, + 0, 0); + NFSM_BUILD(tl, uint32_t *, 2 * NFSX_HYPER + NFSX_STATEID + + NFSX_V4DEVICEID + 3 * NFSX_UNSIGNED); + txdr_hyper(offset, tl); tl += 2; + txdr_hyper(len, tl); tl += 2; + *tl++ = txdr_unsigned(stateidp->seqid); + *tl++ = stateidp->other[0]; + *tl++ = stateidp->other[1]; + *tl++ = stateidp->other[2]; + *tl++ = txdr_unsigned(1); + NFSBCOPY(devid, tl, NFSX_V4DEVICEID); + tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED); + *tl++ = txdr_unsigned(stat); + *tl = txdr_unsigned(op); + nd->nd_flag |= ND_USEGSSNAME; + error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred, + NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL); + if (error != 0) + return (error); + if (nd->nd_repstat != 0) + error = nd->nd_repstat; + m_freem(nd->nd_mrep); + return (error); +} + /* * Acquire a layout and devinfo, if possible. The caller must have acquired * a reference count on the nfsclclient structure before calling this. @@ -5798,6 +5839,7 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, size_t iovlen = 0; off_t offs = 0; ssize_t resid = 0; + uint32_t op; if (!NFSHASPNFS(nmp) || nfscl_enablecallb == 0 || nfs_numnfscbd == 0 || (np->n_flag & NNOLAYOUT) != 0) @@ -5977,6 +6019,20 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, NFSLOCKMNT(nmp); nmp->nm_state |= NFSSTA_OPENMODE; NFSUNLOCKMNT(nmp); + } else if ((error == NFSERR_NOSPC || + error == NFSERR_IO || error == NFSERR_NXIO) && + nmp->nm_minorvers == NFSV42_MINORVERSION) { + if (docommit != 0) + op = NFSV4OP_COMMIT; + else if (rwaccess == NFSV4OPEN_ACCESSREAD) + op = NFSV4OP_READ; + else + op = NFSV4OP_WRITE; + nfsrpc_layouterror(nmp, np->n_fhp->nfh_fh, + np->n_fhp->nfh_len, off, xfer, + &layp->nfsly_stateid, newcred, p, error, op, + dip->nfsdi_deviceid); + error = EIO; } else error = EIO; if (error == 0) From nobody Thu Nov 25 00:42:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C013418A7AFE; Thu, 25 Nov 2021 00:42: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 4Hzzcd3QXgz4lb1; Thu, 25 Nov 2021 00:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55AB513DAF; Thu, 25 Nov 2021 00:42: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 1AP0gvuY088622; Thu, 25 Nov 2021 00:42:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP0gvCH088621; Thu, 25 Nov 2021 00:42:57 GMT (envelope-from git) Date: Thu, 25 Nov 2021 00:42:57 GMT Message-Id: <202111250042.1AP0gvCH088621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 0c8684ae2001 - stable/13 - param.h: Bump __FreeBSD_version to 1300522 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0c8684ae20019b63c6672cc9fa40e1426708b007 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637800977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AWnIN8M88EA5tmUKc37gb64Pdzasve2DmwJk4GYaodw=; b=lXc2qxCS5AkzhIaanCQnfCrSEWlFaGRUL3zvCEKLfEUComRTgseqNw9dozMtW+dnF6xOdz 9IMZyXqFb06r3bLaadbvyebtqV/P3RcSvq0orLCWNkeFz4hahlRNEt5ozTO/UMBipm1Zp+ pTZ/z6+BsRInsIlkrcn5lkauKeue+M6mR72WMxGP/JzNyU4boIoyKOpHSu0e3A8WEmaQMa iGlJXSHySdAXqyNra0xpgKB0QhQY/nDAEP17WUi/MGwpwVCn6LWGWDmH0ulhsRN+O9F1D1 rFE8LzEAEQPQdDM4VEEzqvBJj3MR9aXJ0bdFzgIyr67ujI0HOA7aFUf66yvCdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637800977; a=rsa-sha256; cv=none; b=DKvYdZp1n41F5czNjfM6oEQNkFtWkqGTmPEMWHmTHeGqAPcaU06Oa3QtU0jkhAGZwzvINx op9FGD/huVuW0hEBK2lArDIaUJExzbeG22DeRvrofCxC/dsNPE2HHx5cGgtBFSQPD17HA0 YKjIobFc6qXAkaZVm45oJHvuwismYhAEmwubvo0h3td71TbA4FboTbxq6hR/5MHXaI8gtl xMl0WtEr5RfAhw7DpbS9V9txc2NWUd+x8pjfD2p362D5ATz/h61WryUEk917mnydRcH11W qvwKE3MIros6ypc7VKc+UgiAj9QUd29SjAHJh/8YGxf2pQOjkf5vFqx2gCOGbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=0c8684ae20019b63c6672cc9fa40e1426708b007 commit 0c8684ae20019b63c6672cc9fa40e1426708b007 Author: Rick Macklem AuthorDate: 2021-11-25 00:39:52 +0000 Commit: Rick Macklem CommitDate: 2021-11-25 00:39:52 +0000 param.h: Bump __FreeBSD_version to 1300522 Commit 6e8e261f0d4e changed the internal KAPI between the NFS modules. Bump __FreeBSD_version to 1300522. This is a direct commit. --- 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 8baeb865e158..66133b80f262 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 1300521 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300522 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Thu Nov 25 00:50:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ED06D18ABD52; Thu, 25 Nov 2021 00:50: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 4Hzzmn4sVqz4p9n; Thu, 25 Nov 2021 00:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 88CE3140CF; Thu, 25 Nov 2021 00:50: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 1AP0o1kk090895; Thu, 25 Nov 2021 00:50:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP0o1gc090884; Thu, 25 Nov 2021 00:50:01 GMT (envelope-from git) Date: Thu, 25 Nov 2021 00:50:01 GMT Message-Id: <202111250050.1AP0o1gc090884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: f4e3699069b3 - stable/13 - UPDATING: Add an entry for commit 6e8e261f0d4e List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f4e3699069b3c3a50b7d1072bdb5ba116b4249b1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637801401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dGPLK1O3HulLAiBgYyVuimHsYMj0A1T60H7I8PXNitM=; b=ck+JYaUdC8lX2Z7XJYvw1S+mig3OYf9HefuJ/AY6fbtcaYLUH+iHcWdo+jH6EKa3EE1FbG V/eswwTh5RDrjkAl9TBYnfpBUcubvVsTgevFCzbjPUK0KVWG1thO8fn64FiQd1u7bvn3Wc TCK5dR3wjFD5T0EXexgtcUgET1RvZTJiDFMonwHcwhFGPsCQNT3ZmfVLHKAR13T1DUoLrO d9lx4SvKxGjWRHy/rjLnEDb9PYfs9TcHNU8+yePfsXk8TLl8WiexGR6DjQKDVBiUYSEcpZ dJfznmnPCBj2GJ/PVZXArlzUJGg1TgW/mbQR8i1xmP7FtvpqHuJdzsmXFNtoCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637801401; a=rsa-sha256; cv=none; b=WncAvUmIoONTZSOIwkIy36uq/15JGv+phkeQEV/pcj0w593Z5XBkXFnoHy7IzDGdk5II4p P49zylg5VeXZGxUqdL9D1mJDqzj78YG1bkwGRg1gJhPdRLe4Kp4WUGK1qrPR2Skw542pLp j30Atd763doJtObfNH+Aws9PCKm8uVfa2KgVI9xEf92uyW7SVx/Na39f6ERJDj38TbwjF9 RrRWY3YUUvkXsWWgVZOyWc2zmq+5fKffauDljHKz4cPmmXErzexNCdZGMrz1OWaDlWl4ff pe2yMWwc90SiOMiJp9/rchbwAcQFllRsA9MAJgPwMy5uvGiEZH3vinZpAbTCDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f4e3699069b3c3a50b7d1072bdb5ba116b4249b1 commit f4e3699069b3c3a50b7d1072bdb5ba116b4249b1 Author: Rick Macklem AuthorDate: 2021-11-25 00:47:03 +0000 Commit: Rick Macklem CommitDate: 2021-11-25 00:47:03 +0000 UPDATING: Add an entry for commit 6e8e261f0d4e This is a direct commit. --- UPDATING | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPDATING b/UPDATING index 7837566e82a7..291037901387 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. +20211124: + Commit 6e8e261f0d4e changed the internal KAPI between the NFS + modules. As such, all the modules must be rebuilt from sources. + __FreeBSD_version has been bumped to 1300522. + 20211119: Bump __FreeBSD_version to 1300521 after merging LinuxKPI and net80211 changes in order to support building various wireless From nobody Thu Nov 25 01:09:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6A8C818B594E; Thu, 25 Nov 2021 01:09:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J00CS0Z8tz4wDq; Thu, 25 Nov 2021 01:09:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E75DF14258; Thu, 25 Nov 2021 01:09: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 1AP19dUR017078; Thu, 25 Nov 2021 01:09:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP19dGj017077; Thu, 25 Nov 2021 01:09:39 GMT (envelope-from git) Date: Thu, 25 Nov 2021 01:09:39 GMT Message-Id: <202111250109.1AP19dGj017077@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: 83271c68c4f4 - stable/13 - Fix some modules to export more used 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: 83271c68c4f4697ba15d49cc3f31912a5d04ff4b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637802580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tb0a+SVg+cDXLjW1T6Iw4LlqLaiQTEs+6P/hy4o2HeE=; b=oJHctXltWsdrRzwob4g0duQiFLP3qBsaEwyd2W3Fhet/UqpL3w+VKneJipKERYJThAVUD3 hNYE3uiesWygTwNcI43MMOniPMczTPFleZIGtXBCToNoYtqhXbQjk5wOmguSqL2rzBDB7I aN9hnRtx0AaOsJW65WQcc7XicAqS3Ns/OupJtGleTHuakbKKuEyHS5uBt3B3+zNY5O4MBH o6050Edhvrg30+iqSjdl4j4H/ZS4jeERdNGFVY5TBG7DzBHRn1qrUUfaJDhVcI+0m5HuUu AvbjeH541ksqMlKFF5c6/h2JFyogBkZytwFNXgYEY1qxEPze1pKkrUW6qoo+kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637802580; a=rsa-sha256; cv=none; b=FjCltf30Dhq8SbQpFPeHuUgTBJd0Qios3BOp36hftaSIpyEpmY0HSCUP6dgPh6/ITVzw9s 32aLlzduMa3BImn8mQoWXifXsG/VyyJZ9qxlsNqBspKc89AS584hWWMRIuc9Ypi6Altr7D XAbuRXpmCj9TeTwFwDAq17PE8suFJUXE+VeQe79K4kha3+eS6li3zpl5RBR6gxtf/ZVdV6 Ka2moANw1Dxc+Qs8A1KRPG4zwl7wCP4FYbkn3T+naRgwagLqHXW8+CzDMP+y42LpdJd9LJ 7nJ4ErqmSa1S33ZKuQmKvQxLxFhZI8dKbqcnhcB2iTOw5NxjTIrJ1sRV4/e9Cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=83271c68c4f4697ba15d49cc3f31912a5d04ff4b commit 83271c68c4f4697ba15d49cc3f31912a5d04ff4b Author: Konstantin Belousov AuthorDate: 2021-11-07 08:42:24 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-25 01:09:21 +0000 Fix some modules to export more used symbols (cherry picked from commit 5bb3134a8c21cb87b30e135ef168483f0333dabb) --- sys/modules/aic7xxx/ahc/Makefile | 2 ++ sys/modules/alq/Makefile | 2 ++ sys/modules/amdsmn/Makefile | 2 ++ sys/modules/amr/Makefile | 2 ++ sys/modules/ata/atacore/Makefile | 2 ++ sys/modules/ata/atapci/Makefile | 2 ++ sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile | 2 ++ sys/modules/ath_hal/Makefile | 2 ++ sys/modules/backlight/Makefile | 2 ++ sys/modules/bhnd/Makefile | 4 +++- sys/modules/bhnd/bhndb/Makefile | 2 ++ sys/modules/bridgestp/Makefile | 2 ++ sys/modules/ctl/Makefile | 2 ++ sys/modules/cxgbe/if_cxgbe/Makefile | 2 ++ sys/modules/dcons/Makefile | 2 ++ sys/modules/efirt/Makefile | 2 ++ sys/modules/evdev/Makefile | 2 ++ sys/modules/exca/Makefile | 2 ++ sys/modules/firewire/firewire/Makefile | 2 ++ sys/modules/firmware/Makefile | 2 ++ sys/modules/geom/geom_flashmap/Makefile | 2 ++ sys/modules/gpio/gpiobus/Makefile | 2 ++ sys/modules/hid/hconf/Makefile | 2 ++ sys/modules/hid/hid/Makefile | 2 ++ sys/modules/hid/hidbus/Makefile | 2 ++ sys/modules/hid/hidmap/Makefile | 2 ++ sys/modules/hyperv/vmbus/Makefile | 2 ++ sys/modules/i2c/iicbb/Makefile | 2 ++ sys/modules/i2c/iicbus/Makefile | 2 ++ sys/modules/i2c/mux/iicmux/Makefile | 2 ++ sys/modules/i2c/smbus/Makefile | 2 ++ sys/modules/ibcore/Makefile | 2 ++ sys/modules/if_gif/Makefile | 2 ++ sys/modules/if_infiniband/Makefile | 2 ++ sys/modules/iflib/Makefile | 2 ++ sys/modules/ipfw/Makefile | 2 ++ sys/modules/iscsi/Makefile | 2 ++ sys/modules/ixl/Makefile | 2 ++ sys/modules/kgssapi/Makefile | 2 ++ sys/modules/krpc/Makefile | 2 ++ sys/modules/libalias/libalias/Makefile | 2 ++ sys/modules/linux/Makefile | 2 ++ sys/modules/linux64/Makefile | 2 ++ sys/modules/linux_common/Makefile | 4 ++-- sys/modules/linuxkpi/Makefile | 2 ++ sys/modules/mfi/Makefile | 2 ++ sys/modules/mii/Makefile | 8 +------- sys/modules/mlx4/Makefile | 2 ++ sys/modules/mlx5/Makefile | 2 ++ sys/modules/mlxfw/Makefile | 2 ++ sys/modules/netgraph/atm/atmbase/Makefile | 2 ++ sys/modules/netgraph/bluetooth/bluetooth/Makefile | 2 ++ sys/modules/netgraph/bluetooth/socket/Makefile | 2 ++ sys/modules/netgraph/netgraph/Makefile | 2 ++ sys/modules/nfscommon/Makefile | 2 ++ sys/modules/nfssvc/Makefile | 2 ++ sys/modules/ntb/ntb/Makefile | 2 ++ sys/modules/ntb/ntb_transport/Makefile | 2 ++ sys/modules/nvme/Makefile | 2 ++ sys/modules/ow/owc/Makefile | 2 ++ sys/modules/pf/Makefile | 2 ++ sys/modules/ppbus/Makefile | 7 +++++-- sys/modules/procfs/Makefile | 2 +- sys/modules/pseudofs/Makefile | 5 ++--- sys/modules/pwm/pwmbus/Makefile | 2 ++ sys/modules/rc4/Makefile | 2 ++ sys/modules/rtwn/Makefile | 2 ++ sys/modules/sdhci/Makefile | 2 ++ sys/modules/sound/driver/sbc/Makefile | 2 ++ sys/modules/sound/driver/spicds/Makefile | 2 ++ sys/modules/spi/spibus/Makefile | 2 ++ sys/modules/spigen/Makefile | 2 ++ sys/modules/superio/Makefile | 2 ++ sys/modules/sysvipc/sysvmsg/Makefile | 2 ++ sys/modules/sysvipc/sysvsem/Makefile | 2 ++ sys/modules/sysvipc/sysvshm/Makefile | 2 ++ sys/modules/toecore/Makefile | 2 ++ sys/modules/ufs/Makefile | 2 ++ sys/modules/usb/ucom/Makefile | 2 ++ sys/modules/usb/uether/Makefile | 2 ++ sys/modules/usb/uhid/Makefile | 2 ++ sys/modules/usb/usb/Makefile | 2 ++ sys/modules/virtio/virtio/Makefile | 2 ++ sys/modules/wlan/Makefile | 2 ++ sys/modules/xdr/Makefile | 2 ++ sys/modules/xz/Makefile | 2 ++ 86 files changed, 174 insertions(+), 16 deletions(-) diff --git a/sys/modules/aic7xxx/ahc/Makefile b/sys/modules/aic7xxx/ahc/Makefile index 41bf2d70c9a2..57451e77f2a1 100644 --- a/sys/modules/aic7xxx/ahc/Makefile +++ b/sys/modules/aic7xxx/ahc/Makefile @@ -52,4 +52,6 @@ cleanfirmware: clean CLEANFILES= ${GENSRCS} .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/alq/Makefile b/sys/modules/alq/Makefile index 911eeca73880..858f2a55ded7 100644 --- a/sys/modules/alq/Makefile +++ b/sys/modules/alq/Makefile @@ -4,4 +4,6 @@ KMOD= alq SRCS= opt_mac.h vnode_if.h kern_alq.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/amdsmn/Makefile b/sys/modules/amdsmn/Makefile index 1f030270e792..0e5e1b182548 100644 --- a/sys/modules/amdsmn/Makefile +++ b/sys/modules/amdsmn/Makefile @@ -5,4 +5,6 @@ KMOD= amdsmn SRCS= amdsmn.c bus_if.h device_if.h pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/amr/Makefile b/sys/modules/amr/Makefile index 1ee2ece51a16..a17ed246b8c7 100644 --- a/sys/modules/amr/Makefile +++ b/sys/modules/amr/Makefile @@ -16,4 +16,6 @@ SRCS= amr.c amr_pci.c amr_disk.c device_if.h bus_if.h pci_if.h # Debugging #CFLAGS+= -DAMR_DEBUG=3 +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ata/atacore/Makefile b/sys/modules/ata/atacore/Makefile index 9ecd03ed0ba5..f0cd0b4349d3 100644 --- a/sys/modules/ata/atacore/Makefile +++ b/sys/modules/ata/atacore/Makefile @@ -6,4 +6,6 @@ KMOD= ata SRCS= ata-all.c ata_if.c ata-lowlevel.c SRCS+= ata_if.h bus_if.h device_if.h opt_cam.h pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ata/atapci/Makefile b/sys/modules/ata/atapci/Makefile index 5aaa265000cf..bc00b57728ee 100644 --- a/sys/modules/ata/atapci/Makefile +++ b/sys/modules/ata/atapci/Makefile @@ -8,4 +8,6 @@ KMOD= atapci SRCS= ata-pci.c ata-dma.c ata-sata.c SRCS+= ata_if.h bus_if.h device_if.h pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile b/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile index 7e44778bc165..52e806366d0e 100644 --- a/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile +++ b/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile @@ -6,4 +6,6 @@ KMOD= atasiliconimage SRCS= ata-siliconimage.c SRCS+= ata_if.h bus_if.h device_if.h pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ath_hal/Makefile b/sys/modules/ath_hal/Makefile index 6b604c6e9dbb..902c32a95b19 100644 --- a/sys/modules/ath_hal/Makefile +++ b/sys/modules/ath_hal/Makefile @@ -44,4 +44,6 @@ CFLAGS+= -I. -I${SRCTOP}/sys/contrib/dev/ath/ath_hal/ .include +EXPORT_SYMS= YES + CWARNFLAGS.ah_regdomain.c= ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} diff --git a/sys/modules/backlight/Makefile b/sys/modules/backlight/Makefile index 1c49d7b55138..31de4e804127 100644 --- a/sys/modules/backlight/Makefile +++ b/sys/modules/backlight/Makefile @@ -10,4 +10,6 @@ SRCS+= bus_if.h \ backlight_if.h \ backlight_if.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/bhnd/Makefile b/sys/modules/bhnd/Makefile index 18e5ad4c2149..54a72a11e28d 100644 --- a/sys/modules/bhnd/Makefile +++ b/sys/modules/bhnd/Makefile @@ -22,7 +22,7 @@ SRCS+= opt_platform.h SRCS+= bhnd_sprom_chipc.c \ bhnd_pmu_chipc.c - + SRCS+= bhnd_pwrctl.c \ bhnd_pwrctl_subr.c \ bhnd_pwrctl_if.c \ @@ -71,5 +71,7 @@ SUBDIR= bcma \ siba \ siba_bhndb +EXPORT_SYMS= YES + .include .include diff --git a/sys/modules/bhnd/bhndb/Makefile b/sys/modules/bhnd/bhndb/Makefile index 87ac5ef231bd..12fcde7e049f 100644 --- a/sys/modules/bhnd/bhndb/Makefile +++ b/sys/modules/bhnd/bhndb/Makefile @@ -15,4 +15,6 @@ SRCS+= bhnd_bus_if.h \ SRCS+= device_if.h bus_if.h pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/bridgestp/Makefile b/sys/modules/bridgestp/Makefile index 0bfd0caa1880..47a28cb8e7cd 100644 --- a/sys/modules/bridgestp/Makefile +++ b/sys/modules/bridgestp/Makefile @@ -5,4 +5,6 @@ KMOD= bridgestp SRCS= bridgestp.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ctl/Makefile b/sys/modules/ctl/Makefile index 49ba041ce224..5ff72216b329 100644 --- a/sys/modules/ctl/Makefile +++ b/sys/modules/ctl/Makefile @@ -28,4 +28,6 @@ SRCS+= opt_cam.h MFILES= kern/bus_if.m kern/device_if.m +EXPORT_SYMS= YES + .include diff --git a/sys/modules/cxgbe/if_cxgbe/Makefile b/sys/modules/cxgbe/if_cxgbe/Makefile index f64e53c91a7a..7210d4e8835e 100644 --- a/sys/modules/cxgbe/if_cxgbe/Makefile +++ b/sys/modules/cxgbe/if_cxgbe/Makefile @@ -44,4 +44,6 @@ SRCS+= fastlz.c CFLAGS+= -I${CXGBE} +EXPORT_SYMS= YES + .include diff --git a/sys/modules/dcons/Makefile b/sys/modules/dcons/Makefile index be27ee22dae0..bdc86609c16c 100644 --- a/sys/modules/dcons/Makefile +++ b/sys/modules/dcons/Makefile @@ -17,4 +17,6 @@ opt_ddb.h: CFLAGS+= -I${SRCTOP}/sys +EXPORT_SYMS= YES + .include diff --git a/sys/modules/efirt/Makefile b/sys/modules/efirt/Makefile index 58f4f9673c2e..4d6e89bc5d07 100644 --- a/sys/modules/efirt/Makefile +++ b/sys/modules/efirt/Makefile @@ -17,4 +17,6 @@ efirt_support.o: efirt_support.S assym.inc ${.IMPSRC} -o ${.TARGET} .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/evdev/Makefile b/sys/modules/evdev/Makefile index 7bea12e3277f..5888825f4773 100644 --- a/sys/modules/evdev/Makefile +++ b/sys/modules/evdev/Makefile @@ -6,4 +6,6 @@ KMOD= evdev SRCS= cdev.c evdev.c evdev_mt.c evdev_utils.c SRCS+= opt_evdev.h bus_if.h device_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/exca/Makefile b/sys/modules/exca/Makefile index 5135ff24adb3..3b51f87b2827 100644 --- a/sys/modules/exca/Makefile +++ b/sys/modules/exca/Makefile @@ -5,4 +5,6 @@ KMOD= exca SRCS= exca.c device_if.h bus_if.h power_if.h card_if.h pccarddevs.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/firewire/firewire/Makefile b/sys/modules/firewire/firewire/Makefile index 72fa049d4326..9ce806ae96d1 100644 --- a/sys/modules/firewire/firewire/Makefile +++ b/sys/modules/firewire/firewire/Makefile @@ -11,4 +11,6 @@ SRCS = bus_if.h device_if.h pci_if.h \ iec13213.h iec68113.h \ fwcrom.c fwdev.c fwmem.c fwmem.h fwdma.c fwdma.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/firmware/Makefile b/sys/modules/firmware/Makefile index 7a9eb4522970..5b74a9dce24c 100644 --- a/sys/modules/firmware/Makefile +++ b/sys/modules/firmware/Makefile @@ -5,4 +5,6 @@ KMOD= firmware SRCS= subr_firmware.c vnode_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/geom/geom_flashmap/Makefile b/sys/modules/geom/geom_flashmap/Makefile index 8b56c145ea51..47e3d6105371 100644 --- a/sys/modules/geom/geom_flashmap/Makefile +++ b/sys/modules/geom/geom_flashmap/Makefile @@ -5,4 +5,6 @@ KMOD= geom_flashmap SRCS= geom_flashmap.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/gpio/gpiobus/Makefile b/sys/modules/gpio/gpiobus/Makefile index 458d56d8b935..6dc40a2a9d65 100644 --- a/sys/modules/gpio/gpiobus/Makefile +++ b/sys/modules/gpio/gpiobus/Makefile @@ -42,4 +42,6 @@ SRCS+= ofw_gpiobus.c CFLAGS+= -I. -I${SRCTOP}/sys/dev/gpio/ +EXPORT_SYMS= YES + .include diff --git a/sys/modules/hid/hconf/Makefile b/sys/modules/hid/hconf/Makefile index 0ac8d969cd71..182d1d9fdf63 100644 --- a/sys/modules/hid/hconf/Makefile +++ b/sys/modules/hid/hconf/Makefile @@ -7,4 +7,6 @@ SRCS= hconf.c SRCS+= opt_hid.h SRCS+= bus_if.h device_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/hid/hid/Makefile b/sys/modules/hid/hid/Makefile index 81fc6c671ed2..749df79beff2 100644 --- a/sys/modules/hid/hid/Makefile +++ b/sys/modules/hid/hid/Makefile @@ -7,4 +7,6 @@ SRCS= hid.c hid_if.c SRCS+= opt_hid.h SRCS+= bus_if.h device_if.h hid_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/hid/hidbus/Makefile b/sys/modules/hid/hidbus/Makefile index e233e3e06f07..c2a452e1e9f2 100644 --- a/sys/modules/hid/hidbus/Makefile +++ b/sys/modules/hid/hidbus/Makefile @@ -6,4 +6,6 @@ KMOD= hidbus SRCS= hidbus.c SRCS+= bus_if.h device_if.h hid_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/hid/hidmap/Makefile b/sys/modules/hid/hidmap/Makefile index 00e7099b287b..e0c1c086e098 100644 --- a/sys/modules/hid/hidmap/Makefile +++ b/sys/modules/hid/hidmap/Makefile @@ -7,4 +7,6 @@ SRCS= hidmap.c SRCS+= opt_hid.h SRCS+= bus_if.h device_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/hyperv/vmbus/Makefile b/sys/modules/hyperv/vmbus/Makefile index 47a83e76204a..0aa489d8fa26 100644 --- a/sys/modules/hyperv/vmbus/Makefile +++ b/sys/modules/hyperv/vmbus/Makefile @@ -35,4 +35,6 @@ vmbus_vector.o: CFLAGS+= -I${SRCTOP}/sys/dev/hyperv/include \ -I${SRCTOP}/sys/dev/hyperv/vmbus +EXPORT_SYMS= YES + .include diff --git a/sys/modules/i2c/iicbb/Makefile b/sys/modules/i2c/iicbb/Makefile index c7737f09e8b9..9b74a5da39d6 100644 --- a/sys/modules/i2c/iicbb/Makefile +++ b/sys/modules/i2c/iicbb/Makefile @@ -10,4 +10,6 @@ KMOD = iicbb SRCS = device_if.h bus_if.h iicbus_if.h \ iicbb_if.h iicbb_if.c iicbb.c ${ofw_bus_if} opt_platform.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/i2c/iicbus/Makefile b/sys/modules/i2c/iicbus/Makefile index 8923615ecada..c6d2822bc20d 100644 --- a/sys/modules/i2c/iicbus/Makefile +++ b/sys/modules/i2c/iicbus/Makefile @@ -24,4 +24,6 @@ SRCS+= acpi_iicbus.c opt_acpi.h acpi_if.h SRCS+= ofw_iicbus.c ofw_bus_if.h .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/i2c/mux/iicmux/Makefile b/sys/modules/i2c/mux/iicmux/Makefile index 1d642bf3e5ae..b3f52c6c926e 100644 --- a/sys/modules/i2c/mux/iicmux/Makefile +++ b/sys/modules/i2c/mux/iicmux/Makefile @@ -16,4 +16,6 @@ SRCS+= \ SRCS+= ofw_bus_if.h .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/i2c/smbus/Makefile b/sys/modules/i2c/smbus/Makefile index b5e78f223b89..0e25b78c6e4f 100644 --- a/sys/modules/i2c/smbus/Makefile +++ b/sys/modules/i2c/smbus/Makefile @@ -5,4 +5,6 @@ KMOD = smbus SRCS = device_if.h bus_if.h smbus_if.h smbus_if.c \ smbconf.h smbconf.c smbus.h smbus.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ibcore/Makefile b/sys/modules/ibcore/Makefile index ba1f65748117..9d0717cf7df8 100644 --- a/sys/modules/ibcore/Makefile +++ b/sys/modules/ibcore/Makefile @@ -39,4 +39,6 @@ CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -DINET6 -DINET -DCONFIG_INFINIBAND_USER_MEM +EXPORT_SYMS= YES + .include diff --git a/sys/modules/if_gif/Makefile b/sys/modules/if_gif/Makefile index 5799a350c8ae..639aed0d94a5 100644 --- a/sys/modules/if_gif/Makefile +++ b/sys/modules/if_gif/Makefile @@ -10,4 +10,6 @@ SRCS= if_gif.c opt_inet.h opt_inet6.h SRCS.INET=in_gif.c SRCS.INET6=in6_gif.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/if_infiniband/Makefile b/sys/modules/if_infiniband/Makefile index ca5e7e3f44db..6593cd7d0574 100644 --- a/sys/modules/if_infiniband/Makefile +++ b/sys/modules/if_infiniband/Makefile @@ -7,4 +7,6 @@ SRCS= if_infiniband.c \ opt_inet.h \ opt_inet6.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/iflib/Makefile b/sys/modules/iflib/Makefile index e86fd7e82dd6..f598db2743dd 100644 --- a/sys/modules/iflib/Makefile +++ b/sys/modules/iflib/Makefile @@ -11,4 +11,6 @@ SRCS+= ifdi_if.c SRCS+= device_if.h bus_if.h pci_if.h pci_iov_if.h ifdi_if.h SRCS+= opt_acpi.h opt_inet.h opt_inet6.h opt_sched.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ipfw/Makefile b/sys/modules/ipfw/Makefile index ae1b597d08ce..df9f451d1d0a 100644 --- a/sys/modules/ipfw/Makefile +++ b/sys/modules/ipfw/Makefile @@ -19,4 +19,6 @@ CFLAGS+= -DIPFIREWALL -I${SRCTOP}/sys/contrib/ck/include #CFLAGS+= -DIPFIREWALL_DEFAULT_TO_ACCEPT # +EXPORT_SYMS= YES + .include diff --git a/sys/modules/iscsi/Makefile b/sys/modules/iscsi/Makefile index 9b150f5c2213..e74f8ff132e2 100644 --- a/sys/modules/iscsi/Makefile +++ b/sys/modules/iscsi/Makefile @@ -22,4 +22,6 @@ CFLAGS+=-DICL_KERNEL_PROXY MFILES= kern/bus_if.m kern/device_if.m dev/iscsi/icl_conn_if.m +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ixl/Makefile b/sys/modules/ixl/Makefile index 2b524e974404..fb2fcf6574ac 100644 --- a/sys/modules/ixl/Makefile +++ b/sys/modules/ixl/Makefile @@ -22,4 +22,6 @@ SRCS += i40e_common.c i40e_nvm.c i40e_adminq.c i40e_lan_hmc.c i40e_hmc.c i40e # CFLAGS += -DIXL_IW # SRCS += ixl_iw.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/kgssapi/Makefile b/sys/modules/kgssapi/Makefile index a720cdd6a487..a21524cb419a 100644 --- a/sys/modules/kgssapi/Makefile +++ b/sys/modules/kgssapi/Makefile @@ -51,4 +51,6 @@ gssd_xdr.c: $S/kgssapi/gssd.x gssd_clnt.c: $S/kgssapi/gssd.x RPCGEN_CPP=${CPP:Q} rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/krpc/Makefile b/sys/modules/krpc/Makefile index 72adceac32ce..e8946f0ba4ef 100644 --- a/sys/modules/krpc/Makefile +++ b/sys/modules/krpc/Makefile @@ -55,4 +55,6 @@ rpctlssd_xdr.c: $S/rpc/rpcsec_tls/rpctlssd.x rpctlssd_clnt.c: $S/rpc/rpcsec_tls/rpctlssd.x RPCGEN_CPP=${CPP:Q} rpcgen -lM $S/rpc/rpcsec_tls/rpctlssd.x | grep -v string.h > rpctlssd_clnt.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/libalias/libalias/Makefile b/sys/modules/libalias/libalias/Makefile index 655e67bebb5e..4da69ea972b0 100644 --- a/sys/modules/libalias/libalias/Makefile +++ b/sys/modules/libalias/libalias/Makefile @@ -5,4 +5,6 @@ KMOD= libalias SRCS= alias.c alias_db.c alias_proxy.c alias_util.c alias_mod.c alias_sctp.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 49d787e2cb99..fd027e2118df 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -90,4 +90,6 @@ linux${SFX}_genassym.o: offset.inc .warning Building Linuxulator outside of a kernel does not make sense .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index c081151e3fc5..994f4aff1dac 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -62,4 +62,6 @@ linux_genassym.o: offset.inc .warning Building Linuxulator outside of a kernel does not make sense .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile index c7d139e2fb9a..9197ba9454bc 100644 --- a/sys/modules/linux_common/Makefile +++ b/sys/modules/linux_common/Makefile @@ -9,8 +9,6 @@ SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \ EXPORT_SYMS= EXPORT_SYMS+= linux_emul_path -EXPORT_SYMS+= linux_ioctl_register_handler -EXPORT_SYMS+= linux_ioctl_unregister_handler EXPORT_SYMS+= linux_get_osname EXPORT_SYMS+= linux_get_osrelease @@ -18,4 +16,6 @@ EXPORT_SYMS+= linux_get_osrelease .warning Building Linuxulator outside of a kernel does not make sense .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index 514428a82509..0d69445e576b 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -38,4 +38,6 @@ SRCS+= ${LINUXKPI_GENSRCS} CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include +EXPORT_SYMS= YES + .include diff --git a/sys/modules/mfi/Makefile b/sys/modules/mfi/Makefile index 53f4164add7b..7a17f9b0f4fa 100644 --- a/sys/modules/mfi/Makefile +++ b/sys/modules/mfi/Makefile @@ -15,4 +15,6 @@ SRCS+= device_if.h bus_if.h pci_if.h #CFLAGS += -DMFI_DEBUG +EXPORT_SYMS= YES + .include diff --git a/sys/modules/mii/Makefile b/sys/modules/mii/Makefile index 5709af97b720..348c9b7b2845 100644 --- a/sys/modules/mii/Makefile +++ b/sys/modules/mii/Makefile @@ -13,12 +13,6 @@ SRCS+= smscphy.c tdkphy.c truephy.c SRCS+= ukphy.c ukphy_subr.c SRCS+= xmphy.c -EXPORT_SYMS= mii_attach \ - mii_bitbang_readreg \ - mii_bitbang_sync \ - mii_bitbang_writereg \ - mii_mediachg \ - mii_pollstat \ - mii_tick +EXPORT_SYMS= YES .include diff --git a/sys/modules/mlx4/Makefile b/sys/modules/mlx4/Makefile index cb140a59854f..96818c2ef3d0 100644 --- a/sys/modules/mlx4/Makefile +++ b/sys/modules/mlx4/Makefile @@ -30,6 +30,8 @@ CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +EXPORT_SYMS= YES + .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith diff --git a/sys/modules/mlx5/Makefile b/sys/modules/mlx5/Makefile index 26b46f8efdbd..87203b635bf7 100644 --- a/sys/modules/mlx5/Makefile +++ b/sys/modules/mlx5/Makefile @@ -50,6 +50,8 @@ SRCS+= \ mlx5fpga_ipsec.c .endif +EXPORT_SYMS= YES + .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} diff --git a/sys/modules/mlxfw/Makefile b/sys/modules/mlxfw/Makefile index 98817b3954b9..3ab9b0f3950d 100644 --- a/sys/modules/mlxfw/Makefile +++ b/sys/modules/mlxfw/Makefile @@ -14,4 +14,6 @@ CFLAGS+= \ -I${SRCTOP}/sys/contrib/xz-embedded/freebsd \ -I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz +EXPORT_SYMS= YES + .include diff --git a/sys/modules/netgraph/atm/atmbase/Makefile b/sys/modules/netgraph/atm/atmbase/Makefile index f495cdbbda78..68959693811e 100644 --- a/sys/modules/netgraph/atm/atmbase/Makefile +++ b/sys/modules/netgraph/atm/atmbase/Makefile @@ -15,4 +15,6 @@ SRCS= ngatmbase.c unimsg_common.c straddr.c \ CFLAGS+= -I${LIBBASE} # -DNGATM_DEBUG +EXPORT_SYMS= YES + .include diff --git a/sys/modules/netgraph/bluetooth/bluetooth/Makefile b/sys/modules/netgraph/bluetooth/bluetooth/Makefile index 2e25d8e37cb5..eb6c64b7ae65 100644 --- a/sys/modules/netgraph/bluetooth/bluetooth/Makefile +++ b/sys/modules/netgraph/bluetooth/bluetooth/Makefile @@ -8,4 +8,6 @@ CFLAGS+= -I${SRCTOP}/sys/netgraph/bluetooth/include KMOD= ng_bluetooth SRCS= ng_bluetooth.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/netgraph/bluetooth/socket/Makefile b/sys/modules/netgraph/bluetooth/socket/Makefile index 36bc4e9fbd0f..1b0e913b1cf8 100644 --- a/sys/modules/netgraph/bluetooth/socket/Makefile +++ b/sys/modules/netgraph/bluetooth/socket/Makefile @@ -13,4 +13,6 @@ SRCS= ng_btsocket.c \ ng_btsocket_rfcomm.c \ ng_btsocket_sco.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/netgraph/netgraph/Makefile b/sys/modules/netgraph/netgraph/Makefile index a34d6164c908..48adf319d718 100644 --- a/sys/modules/netgraph/netgraph/Makefile +++ b/sys/modules/netgraph/netgraph/Makefile @@ -4,4 +4,6 @@ KMOD= netgraph SRCS= ng_base.c ng_parse.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/nfscommon/Makefile b/sys/modules/nfscommon/Makefile index 28d658db75fa..4e96d902b1cb 100644 --- a/sys/modules/nfscommon/Makefile +++ b/sys/modules/nfscommon/Makefile @@ -13,4 +13,6 @@ SRCS= vnode_if.h \ opt_nfs.h \ opt_ufs.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/nfssvc/Makefile b/sys/modules/nfssvc/Makefile index ff9462c685f7..f59b63459fc2 100644 --- a/sys/modules/nfssvc/Makefile +++ b/sys/modules/nfssvc/Makefile @@ -5,4 +5,6 @@ KMOD= nfssvc SRCS= nfs_nfssvc.c \ opt_nfs.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ntb/ntb/Makefile b/sys/modules/ntb/ntb/Makefile index ec6421ac7b66..f318ff0f88b9 100644 --- a/sys/modules/ntb/ntb/Makefile +++ b/sys/modules/ntb/ntb/Makefile @@ -6,4 +6,6 @@ KMOD = ntb SRCS = ntb.c ntb_if.c SRCS += device_if.h bus_if.h ntb_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ntb/ntb_transport/Makefile b/sys/modules/ntb/ntb_transport/Makefile index df39148f64da..f7094a29d6b4 100644 --- a/sys/modules/ntb/ntb_transport/Makefile +++ b/sys/modules/ntb/ntb_transport/Makefile @@ -6,4 +6,6 @@ KMOD = ntb_transport SRCS = ntb_transport.c SRCS += device_if.h bus_if.h ntb_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/nvme/Makefile b/sys/modules/nvme/Makefile index 1fb4604fc33a..7aad95d55e60 100644 --- a/sys/modules/nvme/Makefile +++ b/sys/modules/nvme/Makefile @@ -23,4 +23,6 @@ SRCS = nvme.c \ opt_nvme.h \ pci_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ow/owc/Makefile b/sys/modules/ow/owc/Makefile index 909c2382ad7d..78da808c82bc 100644 --- a/sys/modules/ow/owc/Makefile +++ b/sys/modules/ow/owc/Makefile @@ -7,4 +7,6 @@ SRCS= owc_gpiobus.c SRCS+= gpio_if.h gpiobus_if.h owll_if.h ofw_bus_if.h bus_if.h device_if.h SRCS+= opt_platform.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/pf/Makefile b/sys/modules/pf/Makefile index d361ea0802fb..ed72d95af92f 100644 --- a/sys/modules/pf/Makefile +++ b/sys/modules/pf/Makefile @@ -22,4 +22,6 @@ opt_global.h: .endif .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/ppbus/Makefile b/sys/modules/ppbus/Makefile index 6b29f6985236..b2ebb2430936 100644 --- a/sys/modules/ppbus/Makefile +++ b/sys/modules/ppbus/Makefile @@ -7,7 +7,7 @@ SRCS= bus_if.h device_if.h ppbus_if.h ppbus_if.c \ opt_ppb_1284.h \ ppb_1284.c ppb_base.c ppb_msq.c ppbconf.c -EXPORT_SYMS= ppb_attach_device \ +EXPORT_SYMS= \ ppb_request_bus \ ppb_release_bus \ ppb_get_status \ @@ -17,6 +17,9 @@ EXPORT_SYMS= ppb_attach_device \ ppb_get_epp_protocol \ ppb_set_mode \ ppb_get_mode \ - ppb_write + ppb_write \ + ppb_lock + +EXPORT_SYMS= YES .include diff --git a/sys/modules/procfs/Makefile b/sys/modules/procfs/Makefile index 282b200e5a60..ee41bb8b116d 100644 --- a/sys/modules/procfs/Makefile +++ b/sys/modules/procfs/Makefile @@ -18,11 +18,11 @@ SRCS+= procfs_type.c SRCS+= procfs.c EXPORT_SYMS= -EXPORT_SYMS+= procfs_attr EXPORT_SYMS+= procfs_candebug EXPORT_SYMS+= procfs_docurproc EXPORT_SYMS+= procfs_doprocfile EXPORT_SYMS+= procfs_doprocmem EXPORT_SYMS+= procfs_notsystem +EXPORT_SYMS+= procfs_attr_rw .include diff --git a/sys/modules/pseudofs/Makefile b/sys/modules/pseudofs/Makefile index 45afba941428..eb083cd31d77 100644 --- a/sys/modules/pseudofs/Makefile +++ b/sys/modules/pseudofs/Makefile @@ -10,7 +10,8 @@ SRCS= opt_pseudofs.h \ pseudofs_vncache.c \ pseudofs_vnops.c -EXPORT_SYMS= pfs_mount \ +EXPORT_SYMS= pfs_cmount \ + pfs_mount \ pfs_unmount \ pfs_root \ pfs_statfs \ @@ -19,8 +20,6 @@ EXPORT_SYMS= pfs_mount \ pfs_create_dir \ pfs_create_file \ pfs_create_link \ - pfs_disable \ - pfs_enable \ pfs_destroy .if !defined(KERNBUILDDIR) diff --git a/sys/modules/pwm/pwmbus/Makefile b/sys/modules/pwm/pwmbus/Makefile index 3cf56697f200..1b3c9f3077c3 100644 --- a/sys/modules/pwm/pwmbus/Makefile +++ b/sys/modules/pwm/pwmbus/Makefile @@ -17,4 +17,6 @@ SRCS+= \ pwmbus_if.c \ pwmbus_if.h \ +EXPORT_SYMS= YES + .include diff --git a/sys/modules/rc4/Makefile b/sys/modules/rc4/Makefile index 21d2d85856a1..23cf6480d56b 100644 --- a/sys/modules/rc4/Makefile +++ b/sys/modules/rc4/Makefile @@ -5,4 +5,6 @@ KMOD= rc4 SRCS= rc4.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/rtwn/Makefile b/sys/modules/rtwn/Makefile index 465187e19f35..8f72a28a1e05 100644 --- a/sys/modules/rtwn/Makefile +++ b/sys/modules/rtwn/Makefile @@ -47,4 +47,6 @@ opt_rtwn.h: @echo "#define RTWN_WITHOUT_UCODE 1" >> ${.TARGET} .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/sdhci/Makefile b/sys/modules/sdhci/Makefile index 158ed4cd945a..9d8269d86109 100644 --- a/sys/modules/sdhci/Makefile +++ b/sys/modules/sdhci/Makefile @@ -5,4 +5,6 @@ KMOD= sdhci SRCS= sdhci.c sdhci.h sdhci_if.c sdhci_if.h device_if.h bus_if.h mmcbr_if.h opt_mmccam.h opt_cam.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/sound/driver/sbc/Makefile b/sys/modules/sound/driver/sbc/Makefile index d7894d644e6a..bde54a077696 100644 --- a/sys/modules/sound/driver/sbc/Makefile +++ b/sys/modules/sound/driver/sbc/Makefile @@ -6,4 +6,6 @@ KMOD= snd_sbc SRCS= device_if.h bus_if.h isa_if.h pci_if.h SRCS+= sbc.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/sound/driver/spicds/Makefile b/sys/modules/sound/driver/spicds/Makefile index 87ab0bbf8b55..f271dae20b2e 100644 --- a/sys/modules/sound/driver/spicds/Makefile +++ b/sys/modules/sound/driver/spicds/Makefile @@ -6,4 +6,6 @@ KMOD= snd_spicds SRCS= device_if.h bus_if.h isa_if.h pci_if.h SRCS+= spicds.c +EXPORT_SYMS= YES + .include diff --git a/sys/modules/spi/spibus/Makefile b/sys/modules/spi/spibus/Makefile index 7832c870ca68..01386d39e118 100644 --- a/sys/modules/spi/spibus/Makefile +++ b/sys/modules/spi/spibus/Makefile @@ -17,4 +17,6 @@ SRCS+= \ spibus_if.c \ spibus_if.h \ +EXPORT_SYMS= YES + .include diff --git a/sys/modules/spigen/Makefile b/sys/modules/spigen/Makefile index 401b69a7ed98..5ff4805399b3 100644 --- a/sys/modules/spigen/Makefile +++ b/sys/modules/spigen/Makefile @@ -16,4 +16,6 @@ SRCS+= \ SRCS+= ofw_bus_if.h .endif +EXPORT_SYMS= YES + .include diff --git a/sys/modules/superio/Makefile b/sys/modules/superio/Makefile index 86585a45cc25..064c39863566 100644 --- a/sys/modules/superio/Makefile +++ b/sys/modules/superio/Makefile @@ -6,4 +6,6 @@ KMOD= superio SRCS= superio.c SRCS+= device_if.h bus_if.h isa_if.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/sysvipc/sysvmsg/Makefile b/sys/modules/sysvipc/sysvmsg/Makefile index 8cd9d2008b9a..84cbc70cde48 100644 --- a/sys/modules/sysvipc/sysvmsg/Makefile +++ b/sys/modules/sysvipc/sysvmsg/Makefile @@ -5,4 +5,6 @@ KMOD= sysvmsg SRCS= sysv_msg.c opt_sysvipc.h +EXPORT_SYMS= YES + .include diff --git a/sys/modules/sysvipc/sysvsem/Makefile b/sys/modules/sysvipc/sysvsem/Makefile index 186e7ed94f4b..89509341c2e5 100644 --- a/sys/modules/sysvipc/sysvsem/Makefile +++ b/sys/modules/sysvipc/sysvsem/Makefile @@ -5,4 +5,6 @@ KMOD= sysvsem SRCS= sysv_sem.c opt_sysvipc.h +EXPORT_SYMS= YES + *** 124 LINES SKIPPED *** From nobody Thu Nov 25 01:09:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1F24218B5B9C; Thu, 25 Nov 2021 01:09: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 4J00CT20N6z4wPv; Thu, 25 Nov 2021 01:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F31D141DB; Thu, 25 Nov 2021 01:09: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 1AP19fgp017103; Thu, 25 Nov 2021 01:09:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP19f5W017102; Thu, 25 Nov 2021 01:09:41 GMT (envelope-from git) Date: Thu, 25 Nov 2021 01:09:41 GMT Message-Id: <202111250109.1AP19f5W017102@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: b0f2ca434842 - stable/13 - kmod_syms.awk: fix removal of the export list from the symbol table List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b0f2ca434842cdb7cdd9c55e183dca8fd5a864c5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637802581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4uR2UPMsuYuskbJwNPpQ5FY00deyGx1y9+bw7Gjv5HI=; b=XPPzEXJdnyC/PVujHNz+z49MlSSPCj6avz6jYrrkf6VsEYBPVFpS9dbua6JeU8yz7Ukhdk Rf7sj7kTvHHdJRGjOylBfBlaw0ai/9rdGMsaJK89QKezd/tj9f4p2guwLY04U2n2h0oikj JEZ6rDUsm9aOOYyvbF6Ph4mnm7dRWh/JsbrhvSNq/42ZRTeITn/DkfII+elAl5SoUsjNZj uFEJ0+mLACE+FETjD8CaO2pIfioXcmzkL6yD/+0yCQFm71Vom+Oc/P/o83e4kapdQ+P9sy Er4OMUgFk7khpLFjE9Kbg8Ydv4dFMr8e/qALD1RpIp9l6EdCTKAAXGm1FGkFTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637802581; a=rsa-sha256; cv=none; b=pFEy9O7Sk0+O36Rsq3mduzXgk1b8xNbvGnkNseZvqZTAY4Lg2gwlvNu0NEVr9QSc4329UK 4YxRQlHn2V9vseLhTUWT85MTQ6AHxQgcetDFKrl+TE7f5gCvN2ahgwqM778t+4RQpT+4dk TUIi9qoAeFWpvYcXBzHPGlFbXUm/Qz4oxlMOFFx+mPC1WlDlEKDaLUt6PvKUmgBNEftcJe 1Ulv/a2ijwcThCAU9nMW/Qhua+At/mHJRwzpqvaQnWlQBKDE8Zbv/WOFB4iXRPKAJvRERd xEESCAYwtFerbL4yLoN39dkhPlpE7hT+e6LzVduprOS9tQen4jgwdb2Jjq32Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b0f2ca434842cdb7cdd9c55e183dca8fd5a864c5 commit b0f2ca434842cdb7cdd9c55e183dca8fd5a864c5 Author: Konstantin Belousov AuthorDate: 2021-11-07 09:00:07 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-25 01:09:21 +0000 kmod_syms.awk: fix removal of the export list from the symbol table (cherry picked from commit 0d7a6199b61d55caf0a682ef072bdd107472ab49) --- sys/conf/kmod_syms.awk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/conf/kmod_syms.awk b/sys/conf/kmod_syms.awk index 677d813507ee..8691d2e0b989 100644 --- a/sys/conf/kmod_syms.awk +++ b/sys/conf/kmod_syms.awk @@ -2,6 +2,7 @@ # Read global symbols from object file. BEGIN { + modname = ARGV[1] while ("${NM:='nm'} -g " ARGV[1] | getline) { if (match($0, /^[^[:space:]]+ [^AU] (.*)$/)) { syms[$3] = $2 @@ -12,7 +13,12 @@ BEGIN { # De-list symbols from the export list. { - delete syms[$0] + smbl = $0 + if (!(smbl in syms)) { + printf "Symbol %s is not present in %s\n", \ + smbl, modname > "/dev/stderr" + } + delete syms[smbl] } # Strip commons, make everything else local. From nobody Thu Nov 25 01:15:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CF2EB1891753; Thu, 25 Nov 2021 01:15: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 4J00Kl3nmmz50C3; Thu, 25 Nov 2021 01:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61F0514450; Thu, 25 Nov 2021 01:15: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 1AP1F7ef029752; Thu, 25 Nov 2021 01:15:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP1F7Ll029751; Thu, 25 Nov 2021 01:15:07 GMT (envelope-from git) Date: Thu, 25 Nov 2021 01:15:07 GMT Message-Id: <202111250115.1AP1F7Ll029751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: e8e8d2290ee6 - main - ig4: Add PCI IDs for Intel Alder Lake I2C controller. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8e8d2290ee68ddf8753ea345d4424f959bdb69d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637802907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ix3fqX0ABXA69yn2UqL6Us1CMUC9k5zZvUEv8X2KwSk=; b=r8MvTqk9MG0bfjprVDraXquzBjz4qlbytEXl603FlsK5PuwYSXNGun12P6GU6qHgVUCMhl ahKbC8DdF6mFCOYhfKXetvN1YDUINcBf07yo6EezHjrJvLpqyBzqZnmAJj9JzK+G4rRIA0 LWZkVU9/+2eh87fg2ry8tpT99agdvxXeOdxYepwR4bMAe4vBpNKs19GMrUJBshYGPw+4h4 YVQTwxAOCGyzq03u1XEn/f79BTe6b1TniVYaXsG52wPqcvim4CsWoTQm+2kVlQy7YWnLji BmxBmtD+IjzOzA9GmWaXnZE3ivZd8R6R2XIC2ibdH/mTVjgW0S6Jq/RHWc20Vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637802907; a=rsa-sha256; cv=none; b=FtjjIQmy2FWjGTAbYDL2jlzIGPOmaTWfPDisi9gMzv8U7+rGGj0xjXd068Z7iAQxE0PE5X rOIcSRg3+RLzi4oipdt9xGyXCOhvho3huQGctLqukl9iqZtumRJ8wSFdJosLRHnhUCTYZo CaQbS9mKNVzgJa3dnkiNCYkBYPMuhdgn8tjb2xAGlGFBISV+McXM7LuJrT6E8xvQs5PJfT NZLjNOg3JpOurUIGDPybEdljXKFZFhog7UIiGHqOOk2XMYSSSaRAaD8hrppttBYol+tZ1I iVlMTGwrJJSoC98BJiBRpJAHOkcI8jmdIF3Muqbj3KPjaNBR8uNH1cdKswN1/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=e8e8d2290ee68ddf8753ea345d4424f959bdb69d commit e8e8d2290ee68ddf8753ea345d4424f959bdb69d Author: Alexander Motin AuthorDate: 2021-11-25 01:13:38 +0000 Commit: Alexander Motin CommitDate: 2021-11-25 01:15:02 +0000 ig4: Add PCI IDs for Intel Alder Lake I2C controller. Submitted by: Dmitry Luhtionov MFC after: 2 weeks --- sys/dev/ichiic/ig4_pci.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/sys/dev/ichiic/ig4_pci.c b/sys/dev/ichiic/ig4_pci.c index 2d80a8b1800a..71b95c3d95fb 100644 --- a/sys/dev/ichiic/ig4_pci.c +++ b/sys/dev/ichiic/ig4_pci.c @@ -144,6 +144,26 @@ static int ig4iic_pci_detach(device_t dev); #define PCI_CHIP_GEMINILAKE_I2C_5 0x31b68086 #define PCI_CHIP_GEMINILAKE_I2C_6 0x31b88086 #define PCI_CHIP_GEMINILAKE_I2C_7 0x31ba8086 +#define PCI_CHIP_ALDERLAKE_P_I2C_0 0x51e88086 +#define PCI_CHIP_ALDERLAKE_P_I2C_1 0x51e98086 +#define PCI_CHIP_ALDERLAKE_P_I2C_2 0x51ea8086 +#define PCI_CHIP_ALDERLAKE_P_I2C_3 0x51eb8086 +#define PCI_CHIP_ALDERLAKE_P_I2C_4 0x51c58086 +#define PCI_CHIP_ALDERLAKE_P_I2C_5 0x51c68086 +#define PCI_CHIP_ALDERLAKE_P_I2C_6 0x51d88086 +#define PCI_CHIP_ALDERLAKE_P_I2C_7 0x51d98086 +#define PCI_CHIP_ALDERLAKE_S_I2C_0 0x7acc8086 +#define PCI_CHIP_ALDERLAKE_S_I2C_1 0x7acd8086 +#define PCI_CHIP_ALDERLAKE_S_I2C_2 0x7ace8086 +#define PCI_CHIP_ALDERLAKE_S_I2C_3 0x7acf8086 +#define PCI_CHIP_ALDERLAKE_S_I2C_4 0x7afc8086 +#define PCI_CHIP_ALDERLAKE_S_I2C_5 0x7afd8086 +#define PCI_CHIP_ALDERLAKE_M_I2C_0 0x54e88086 +#define PCI_CHIP_ALDERLAKE_M_I2C_1 0x54e98086 +#define PCI_CHIP_ALDERLAKE_M_I2C_2 0x54ea8086 +#define PCI_CHIP_ALDERLAKE_M_I2C_3 0x54eb8086 +#define PCI_CHIP_ALDERLAKE_M_I2C_4 0x54c58086 +#define PCI_CHIP_ALDERLAKE_M_I2C_5 0x54c68086 struct ig4iic_pci_device { uint32_t devid; @@ -230,6 +250,26 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = { { PCI_CHIP_GEMINILAKE_I2C_5, "Intel Gemini Lake I2C Controller-5", IG4_GEMINILAKE}, { PCI_CHIP_GEMINILAKE_I2C_6, "Intel Gemini Lake I2C Controller-6", IG4_GEMINILAKE}, { PCI_CHIP_GEMINILAKE_I2C_7, "Intel Gemini Lake I2C Controller-7", IG4_GEMINILAKE}, + { PCI_CHIP_ALDERLAKE_P_I2C_0, "Intel Alder Lake-P I2C Controller-0", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_P_I2C_1, "Intel Alder Lake-P I2C Controller-1", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_P_I2C_2, "Intel Alder Lake-P I2C Controller-2", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_P_I2C_3, "Intel Alder Lake-P I2C Controller-3", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_P_I2C_4, "Intel Alder Lake-P I2C Controller-4", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_P_I2C_5, "Intel Alder Lake-P I2C Controller-5", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_P_I2C_6, "Intel Alder Lake-P I2C Controller-6", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_P_I2C_7, "Intel Alder Lake-P I2C Controller-7", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_S_I2C_0, "Intel Alder Lake-S I2C Controller-0", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_S_I2C_1, "Intel Alder Lake-S I2C Controller-1", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_S_I2C_2, "Intel Alder Lake-S I2C Controller-2", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_S_I2C_3, "Intel Alder Lake-S I2C Controller-3", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_S_I2C_4, "Intel Alder Lake-S I2C Controller-4", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_S_I2C_5, "Intel Alder Lake-S I2C Controller-5", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_M_I2C_0, "Intel Alder Lake-M I2C Controller-0", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_M_I2C_1, "Intel Alder Lake-M I2C Controller-1", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_M_I2C_2, "Intel Alder Lake-M I2C Controller-2", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_M_I2C_3, "Intel Alder Lake-M I2C Controller-3", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_M_I2C_4, "Intel Alder Lake-M I2C Controller-4", IG4_TIGERLAKE}, + { PCI_CHIP_ALDERLAKE_M_I2C_5, "Intel Alder Lake-M I2C Controller-5", IG4_TIGERLAKE}, }; static int From nobody Thu Nov 25 01:54:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9F9EC18A80A3; Thu, 25 Nov 2021 01:54: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 4J01Cg2XZnz3DY7; Thu, 25 Nov 2021 01:54:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37B5D14FC0; Thu, 25 Nov 2021 01:54: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 1AP1st2K082299; Thu, 25 Nov 2021 01:54:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP1stBP082298; Thu, 25 Nov 2021 01:54:55 GMT (envelope-from git) Date: Thu, 25 Nov 2021 01:54:55 GMT Message-Id: <202111250154.1AP1stBP082298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bryan Drewery Subject: git: 971677d5fd4c - main - sh: Avoid some headers when NO_HISTORY is set. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bdrewery X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 971677d5fd4cc6e776468cb80e0a05fdd3f4da49 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637805295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FgYQph1TWtzvyd5wJpKw/st577c1TF9JLFz61dBeCbE=; b=SM7Ra3vYMdAvfKTiQyI4rtTeFMUmw92WtXFMaCAux4v0MZro+vIeuGtkpikIxHjA3yVmxi xfuXMc/NC3M9HHvSCl23zh6JgZdwINwahXeWWuXOzTFeSqYc4ne9iUE5mVNyYzckI1VExf XUJyWzbAxNZ7k/5vjxgXdf//Pjas6PtWpFK+ma8iI8+lRo4JtGzmVHR71m1hCELz3BBP2R TtkcC3l4rpzLhQY9hy2MWchr9h2ocS+nO3vnZUlWrb/HRtM1FG9pxhrNIzQhbEWpp9kzxG Nu1dg63KfNzwt4HzTyfRWwPXcM7d7zr8epl9Bowa1wS7cdF7fPDQ4ZXsdIE7iQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637805295; a=rsa-sha256; cv=none; b=YHJ+qJUuoxV21i23hqhnviVCjZiISGTNN2h+/sGKil0SoJidydmASfGx5quxNQJlBKqheW nPUDhYZFwQc8M1WUYWy5uLR77MIF+LBgYqNcwFsbS1kHNjNKtLj++cg8wjppdYQYRMoY2f szpnef9HEgf0MX3UUGL8pHokNd4xt++C1h+uEwfgLwKS6nOqFRwEZzRkaoVb7K8IwmFXxs 3D1l4o9ZiD//I+9qzbIrBmj1Nam2x4MK72+2DwJXJWXnVgvOcVId48NTESZ2F7umxDGPER /ubOnz5cohmF6vUgFRnuN1GQmdd9lb8oIA9ElzMIfGcTHOcuC4ya2P9z7Py5ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bdrewery: URL: https://cgit.FreeBSD.org/src/commit/?id=971677d5fd4cc6e776468cb80e0a05fdd3f4da49 commit 971677d5fd4cc6e776468cb80e0a05fdd3f4da49 Author: Bryan Drewery AuthorDate: 2021-11-25 01:52:11 +0000 Commit: Bryan Drewery CommitDate: 2021-11-25 01:53:39 +0000 sh: Avoid some headers when NO_HISTORY is set. This is more simpler compatibility with using this source on older systems before libedit was made to install filecomplete.h in commit b315a7296d2. --- bin/sh/input.c | 2 ++ bin/sh/trap.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bin/sh/input.c b/bin/sh/input.c index 3933287524a4..12faa33d0f1b 100644 --- a/bin/sh/input.c +++ b/bin/sh/input.c @@ -59,7 +59,9 @@ __FBSDID("$FreeBSD$"); #include "error.h" #include "alias.h" #include "parser.h" +#ifndef NO_HISTORY #include "myhistedit.h" +#endif #include "trap.h" #define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */ diff --git a/bin/sh/trap.c b/bin/sh/trap.c index 2dd394035ca4..7a6ed2f4368a 100644 --- a/bin/sh/trap.c +++ b/bin/sh/trap.c @@ -58,7 +58,9 @@ __FBSDID("$FreeBSD$"); #include "trap.h" #include "mystring.h" #include "builtins.h" +#ifndef NO_HISTORY #include "myhistedit.h" +#endif /* From nobody Thu Nov 25 02:42:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0F2EE1898513; Thu, 25 Nov 2021 02:42: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 4J02Gf54t1z3kCt; Thu, 25 Nov 2021 02:42:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83B9315842; Thu, 25 Nov 2021 02:42: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 1AP2gYTe049504; Thu, 25 Nov 2021 02:42:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP2gYS6049503; Thu, 25 Nov 2021 02:42:34 GMT (envelope-from git) Date: Thu, 25 Nov 2021 02:42:34 GMT Message-Id: <202111250242.1AP2gYS6049503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Scott Long Subject: git: 6ef1ad0dcfe8 - main - Fix "set but not used" warnings in mfi. The one in mfi.c:mfi_data_cb() was a hidden but likely harmless mistake. The rest were just old code that was OBE. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: scottl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ef1ad0dcfe8b0a0d95a571652d8c7183aa6a4e3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637808154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CxDw5BKP3zT8SYJVNus4/6Mf9fG1Qhxl/BXlk2h/dvI=; b=XIOvunFev32HwNIwzM2cW5d2sfM3CPr8Tw98wK5R5O6Aw2XKQVetcBeS5FbN1fCxkp+VH5 r0Ym6yibyzjYSZhz/JoytW3uQARmsu5zhNiUg1IpIONa8Is/256JGUMeZxyeCFAx20+mX5 6WLYb73y48o6J+aZR5n7lWOSxxs3suUxpiIyZzzBfqLt/v/NUHdk2d78+iPXXff3QDDgeJ UFOzj8bTmWFpDpr8SQbdRLj3/0O5Qn2N1ZHKN9NHk1QBmSjDOrBi6Yop/uG2RUbq/D+pAz igVVaXgRvsz0YWLlgthIuHyGDXyP7fxN8QALqQRYcBS7023enK9A1TuNU0A6Ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637808154; a=rsa-sha256; cv=none; b=wB6MCQP0BNLLT/jnz6o9BeQG0MfYkiZ3xzVEJ/dq5suvdc8qAMgibE5q6AcQoJ9DmEkV5y CflI081FYv0UhhCf81SgSX5veVc/Ow+NhE0DCKVf/l1DSF8LsgbAD32kiNO88S0qAQ/dgu rl+MgJhWRHEkxUYybC6KedvgrhidR66GN8NuPOxj4KqUkKP09hbc9WVVEWhAa79e5+6mZy FXBagbMNiiNQLAtGO+gynIP5CTN7qj14ODqgMBwgZ7gkNXwEZU3EWlKRXQW8urU7taLqb4 ErxbbjMiJxBzMhAqCUmRqeLIonKAf/jM5lVGJKCikBwwDXWW5j3h/EzS3p12hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by scottl: URL: https://cgit.FreeBSD.org/src/commit/?id=6ef1ad0dcfe8b0a0d95a571652d8c7183aa6a4e3 commit 6ef1ad0dcfe8b0a0d95a571652d8c7183aa6a4e3 Author: Scott Long AuthorDate: 2021-11-25 02:41:18 +0000 Commit: Scott Long CommitDate: 2021-11-25 02:41:18 +0000 Fix "set but not used" warnings in mfi. The one in mfi.c:mfi_data_cb() was a hidden but likely harmless mistake. The rest were just old code that was OBE. --- sys/dev/mfi/mfi.c | 4 +--- sys/dev/mfi/mfi_cam.c | 2 -- sys/dev/mfi/mfi_disk.c | 5 ----- sys/dev/mfi/mfi_tbolt.c | 8 ++------ 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index 981f5a2673e5..0cf0bdb478af 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -2433,7 +2433,7 @@ mfi_data_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) * least 1 frame, so don't compensate for the modulo of the * following division. */ - cm->cm_total_frame_size += (sc->mfi_sge_size * nsegs); + cm->cm_total_frame_size += (sge_size * nsegs); cm->cm_extra_frames = (cm->cm_total_frame_size - 1) / MFI_FRAME_SIZE; if ((error = mfi_send_frame(sc, cm)) != 0) { @@ -3108,7 +3108,6 @@ mfi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td struct mfi_ioc_passthru iop_swab; #endif int error, locked; - union mfi_sgl *sgl; sc = dev->si_drv1; error = 0; @@ -3200,7 +3199,6 @@ mfi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td cm->cm_sg = (union mfi_sgl *)&cm->cm_frame->bytes[ioc->mfi_sgl_off]; } - sgl = cm->cm_sg; cm->cm_flags = 0; if (cm->cm_frame->header.flags & MFI_FRAME_DATAIN) cm->cm_flags |= MFI_CMD_DATAIN; diff --git a/sys/dev/mfi/mfi_cam.c b/sys/dev/mfi/mfi_cam.c index 2ea27527e158..431dc7b4c129 100644 --- a/sys/dev/mfi/mfi_cam.c +++ b/sys/dev/mfi/mfi_cam.c @@ -406,10 +406,8 @@ mfip_done(struct mfi_command *cm) union ccb *ccb = cm->cm_private; struct ccb_hdr *ccbh = &ccb->ccb_h; struct ccb_scsiio *csio = &ccb->csio; - struct mfip_softc *sc; struct mfi_pass_frame *pt; - sc = ccbh->ccb_mfip_ptr; pt = &cm->cm_frame->pass; switch (pt->header.cmd_status) { diff --git a/sys/dev/mfi/mfi_disk.c b/sys/dev/mfi/mfi_disk.c index 016d3f99e9ad..e1f1420d5676 100644 --- a/sys/dev/mfi/mfi_disk.c +++ b/sys/dev/mfi/mfi_disk.c @@ -304,11 +304,6 @@ mfi_disk_strategy(struct bio *bio) void mfi_disk_complete(struct bio *bio) { - struct mfi_disk *sc; - struct mfi_frame_header *hdr; - - sc = bio->bio_disk->d_drv1; - hdr = bio->bio_driver1; if (bio->bio_flags & BIO_ERROR) { bio->bio_resid = bio->bio_bcount; diff --git a/sys/dev/mfi/mfi_tbolt.c b/sys/dev/mfi/mfi_tbolt.c index f9eaf16912c3..0d2088f3a0a7 100644 --- a/sys/dev/mfi/mfi_tbolt.c +++ b/sys/dev/mfi/mfi_tbolt.c @@ -660,7 +660,6 @@ mfi_tbolt_complete_cmd(struct mfi_softc *sc) struct mfi_cmd_tbolt *cmd_tbolt; uint16_t smid; uint8_t reply_descript_type; - struct mfi_mpi2_request_raid_scsi_io *scsi_io_req; uint32_t status, extStatus; uint16_t num_completed; union desc_value val; @@ -700,7 +699,6 @@ mfi_tbolt_complete_cmd(struct mfi_softc *sc) goto next; } cmd_mfi = &sc->mfi_commands[cmd_tbolt->sync_cmd_idx]; - scsi_io_req = cmd_tbolt->io_request; status = cmd_mfi->cm_frame->dcmd.header.cmd_status; extStatus = cmd_mfi->cm_frame->dcmd.header.scsi_status; @@ -939,7 +937,7 @@ static int mfi_tbolt_make_sgl(struct mfi_softc *sc, struct mfi_command *mfi_cmd, pMpi25IeeeSgeChain64_t sgl_ptr, struct mfi_cmd_tbolt *cmd) { - uint8_t i, sg_processed, sg_to_process; + uint8_t i, sg_processed; uint8_t sge_count, sge_idx; union mfi_sgl *os_sgl; pMpi25IeeeSgeChain64_t sgl_end; @@ -997,7 +995,7 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc, struct mfi_command *mfi_cmd, if (sg_processed < sge_count) { pMpi25IeeeSgeChain64_t sg_chain; - sg_to_process = sge_count - sg_processed; + cmd->io_request->ChainOffset = sc->chain_offset_value_for_main_message; sg_chain = sgl_ptr; @@ -1086,12 +1084,10 @@ int mfi_tbolt_send_frame(struct mfi_softc *sc, struct mfi_command *cm) { struct mfi_frame_header *hdr; - uint8_t *cdb; union mfi_mpi2_request_descriptor *req_desc = NULL; int tm = mfi_polled_cmd_timeout * 1000; hdr = &cm->cm_frame->header; - cdb = cm->cm_frame->pass.cdb; if (sc->adpreset) return 1; if ((cm->cm_flags & MFI_CMD_POLLED) == 0) { From nobody Thu Nov 25 03:20:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 89A3818AB53C; Thu, 25 Nov 2021 03: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 4J036K1QHlz3vnP; Thu, 25 Nov 2021 03:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 065DD161E9; Thu, 25 Nov 2021 03: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 1AP3KOsI098967; Thu, 25 Nov 2021 03:20:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP3KOJC098966; Thu, 25 Nov 2021 03:20:24 GMT (envelope-from git) Date: Thu, 25 Nov 2021 03:20:24 GMT Message-Id: <202111250320.1AP3KOJC098966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Scott Long Subject: git: c154feacc4f2 - main - Fix "set but not used" warnings in CAM. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: scottl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c154feacc4f2e1dc0858eb93eb1994ea997e699b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637810425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4zMnTfjaDMhlhgaDTIzxdT7GyfuLJf/Pp922SzFMx5Q=; b=fVuHe1JIdhC1Ph6wnabUGyHuMiaiQBE2DJeKcs57FMYdo0v4O+/GN8ZdJG6+wOAz1E0TqP FWtMwYxqAMu2ZFVd2GkrMIyaW4zPC+xPblXOEQKdzenw4eysuK7ql3QZBhvjfPTMZIkI9u t1z6ncvi5ED+cDTHozxN+lwp7bn6yBcnQvlGXNh7/++DzDiGSMZ3o6sRnYOQ2YOdteakJ5 evAXHwo1PjfHhCQs+1b4UceOluHkJySgOUDPLz+33jcDAEmO4OhqtxsTGUmDZYG4mUnx3w jQzbQGwnqZR0Q5YMPbkFTV9I21MY2aALYx+TYsDZCH46R63RFNLaCj9pNWRjYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637810425; a=rsa-sha256; cv=none; b=yVhIS+AGIBpHZx67mMwr0f/iCoICF/VQAfDDz6xBxlVVOCfVRvlqVlUh7p4UmmhbxBQ2e/ jlOrYeA7eS3ZY0hkrJtns/X3jt3611dtXehPngh3OWO0gjNYZ8pNnw6FA4huO8B2e8LT6n Wp6dhcb62W09c5X8kSEME7T6aYtwqTqjo4TiPYFQLMOwbVMTrGxCi+Ixg89eBSDeY6QU1n 2UftAzwJZlZ/e5k07M2T09SZJCNBu7QSAyhtxUYLu0HveljYRB+2S+GODnZ36kyA9VL55P QoiE9yUYRWIVmN2oF/xIKzteCiwK/qJzQjZZ5DZjmAcvNYQImElqmlciWwU2Eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by scottl: URL: https://cgit.FreeBSD.org/src/commit/?id=c154feacc4f2e1dc0858eb93eb1994ea997e699b commit c154feacc4f2e1dc0858eb93eb1994ea997e699b Author: Scott Long AuthorDate: 2021-11-25 03:17:54 +0000 Commit: Scott Long CommitDate: 2021-11-25 03:17:54 +0000 Fix "set but not used" warnings in CAM. --- sys/cam/cam_sim.c | 2 +- sys/cam/scsi/scsi_da.c | 2 +- sys/cam/scsi/scsi_pt.c | 5 ----- sys/cam/scsi/scsi_sg.c | 7 ------- sys/cam/scsi/scsi_target.c | 2 -- 5 files changed, 2 insertions(+), 16 deletions(-) diff --git a/sys/cam/cam_sim.c b/sys/cam/cam_sim.c index abf65965fc8e..2dbf581712f1 100644 --- a/sys/cam/cam_sim.c +++ b/sys/cam/cam_sim.c @@ -144,7 +144,7 @@ void cam_sim_free(struct cam_sim *sim, int free_devq) { struct mtx *mtx; - int error; + int error __diagused; if (sim->mtx == NULL) { mtx = &cam_sim_free_mtx; diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 83e14eca35ab..0bcbccc7eab9 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -5921,7 +5921,7 @@ static void dareprobe(struct cam_periph *periph) { struct da_softc *softc; - int status; + int status __diagused; softc = (struct da_softc *)periph->softc; diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c index 4e7ce9566c59..515bfc4b0aba 100644 --- a/sys/cam/scsi/scsi_pt.c +++ b/sys/cam/scsi/scsi_pt.c @@ -560,11 +560,6 @@ ptdone(struct cam_periph *periph, union ccb *done_ccb) static int pterror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { - struct pt_softc *softc; - struct cam_periph *periph; - - periph = xpt_path_periph(ccb->ccb_h.path); - softc = (struct pt_softc *)periph->softc; return(cam_periph_error(ccb, cam_flags, sense_flags)); } diff --git a/sys/cam/scsi/scsi_sg.c b/sys/cam/scsi/scsi_sg.c index c2be014b118b..c0b2328b0c80 100644 --- a/sys/cam/scsi/scsi_sg.c +++ b/sys/cam/scsi/scsi_sg.c @@ -405,7 +405,6 @@ sgdone(struct cam_periph *periph, union ccb *done_ccb) case SG_CCB_RDWR_IO: { struct sg_rdwr *rdwr; - int state; devstat_end_transaction(softc->device_stats, csio->dxfer_len, @@ -417,7 +416,6 @@ sgdone(struct cam_periph *periph, union ccb *done_ccb) NULL, NULL); rdwr = done_ccb->ccb_h.ccb_rdwr; - state = rdwr->state; rdwr->state = SG_RDWR_DONE; wakeup(rdwr); break; @@ -932,11 +930,6 @@ sgsendrdwr(struct cam_periph *periph, union ccb *ccb) static int sgerror(union ccb *ccb, uint32_t cam_flags, uint32_t sense_flags) { - struct cam_periph *periph; - struct sg_softc *softc; - - periph = xpt_path_periph(ccb->ccb_h.path); - softc = (struct sg_softc *)periph->softc; return (cam_periph_error(ccb, cam_flags, sense_flags)); } diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index b743fa2fe9ca..8640067cc531 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -761,13 +761,11 @@ static void targdone(struct cam_periph *periph, union ccb *done_ccb) { struct targ_softc *softc; - cam_status status; CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("targdone %p\n", done_ccb)); softc = (struct targ_softc *)periph->softc; TAILQ_REMOVE(&softc->pending_ccb_queue, &done_ccb->ccb_h, periph_links.tqe); - status = done_ccb->ccb_h.status & CAM_STATUS_MASK; /* If we're no longer enabled, throw away CCB */ if ((softc->state & TARG_STATE_LUN_ENABLED) == 0) { From nobody Thu Nov 25 03:23:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F24E718AD826; Thu, 25 Nov 2021 03:23: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 4J039s4KK8z4RYN; Thu, 25 Nov 2021 03:23:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7563916076; Thu, 25 Nov 2021 03:23: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 1AP3NTdm004011; Thu, 25 Nov 2021 03:23:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP3NTSh004010; Thu, 25 Nov 2021 03:23:29 GMT (envelope-from git) Date: Thu, 25 Nov 2021 03:23:29 GMT Message-Id: <202111250323.1AP3NTSh004010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Scott Long Subject: git: bcce9c5bedfa - main - Fix "set but not used" warnings in the mps 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: scottl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bcce9c5bedfafd6f0f76c022c8a1e45fa8e9fd0a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637810609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mb17wqYTD/fMmLv5lXHmLgY3i4MkCnV3aHwGdOCjfTQ=; b=VgzC6Z2PYPt1FDIz+79OoDaKCumipCNeZlOo6xuuP+/o9K1ddFX9QG1k7tNGTtOI0CfJbQ 4m1sQhaVMIzhkBrdR/40lz4alMx/UAhkSY7dp9g3hJcbjCgt/E5iNNiBSsgSbR6GZ7osN+ RzAOmgOhycwHUKekrHWXd8WD2sVsQh3ow6cd/3J9bzEg9bcG6XzD7s5EaGVA9noq3Vr3qb EZy0teP1JUliIiW4/QXw1SFtZQAkCgQ1ZyfaqwnTfgn8oPqMNrOGLUQtahdt9ZLwE8Ehcj +P8tWB4EmM/5KQQeATHbmbUw7YQgX8QxGAHlLz4VbsLF56whl0tzmoLZDTb8Kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637810609; a=rsa-sha256; cv=none; b=kmJjjtlx+lnCXcO3Per1NrP6Cglzy1jvXfdRP/qf+s6c9I1bul0lTTWk1A3ArIZpoYF4Jt eSxtL0qxRtf+///2LTzr7rk0HI3SyiDV1E6IQ9Q0XoJqsYsAiVEj9Wys9einRBPmaIkf55 /IPV9KHm/wY4jMgnVEfbOxxQU0BoBwCRUSgf2BdQ8gPjL+Vpia1J6RakDE7g2743+XQ93u Jrk4/BA6QMSwDwXzGWcAv9rDau/xitMQ417pKJCWBJo1o1AJtqqkV1gddCjwxtAKQtPgAa wP54cJIA4CxIFBu5fXXEWvisrHwlLoOrmSeP8Xe9butygAqF9TgT6V0+JgFnIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by scottl: URL: https://cgit.FreeBSD.org/src/commit/?id=bcce9c5bedfafd6f0f76c022c8a1e45fa8e9fd0a commit bcce9c5bedfafd6f0f76c022c8a1e45fa8e9fd0a Author: Scott Long AuthorDate: 2021-11-25 03:23:02 +0000 Commit: Scott Long CommitDate: 2021-11-25 03:23:02 +0000 Fix "set but not used" warnings in the mps driver. --- sys/dev/mps/mps_sas.c | 2 -- sys/dev/mps/mps_sas_lsi.c | 3 --- sys/dev/mps/mps_table.c | 2 -- 3 files changed, 7 deletions(-) diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index 6e610c725edb..c54c2a82faff 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -1180,14 +1180,12 @@ static void mpssas_logical_unit_reset_complete(struct mps_softc *sc, struct mps_command *tm) { MPI2_SCSI_TASK_MANAGE_REPLY *reply; - MPI2_SCSI_TASK_MANAGE_REQUEST *req; unsigned int cm_count = 0; struct mps_command *cm; struct mpssas_target *targ; callout_stop(&tm->cm_callout); - req = (MPI2_SCSI_TASK_MANAGE_REQUEST *)tm->cm_req; reply = (MPI2_SCSI_TASK_MANAGE_REPLY *)tm->cm_reply; targ = tm->cm_targ; diff --git a/sys/dev/mps/mps_sas_lsi.c b/sys/dev/mps/mps_sas_lsi.c index 8cfb1700c705..dc22af1e47d0 100644 --- a/sys/dev/mps/mps_sas_lsi.c +++ b/sys/dev/mps/mps_sas_lsi.c @@ -268,9 +268,6 @@ mpssas_fw_work(struct mps_softc *sc, struct mps_fw_event_work *fw_event) } case MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE: { - Mpi2EventDataSasEnclDevStatusChange_t *data; - data = (Mpi2EventDataSasEnclDevStatusChange_t *) - fw_event->event_data; mps_mapping_enclosure_dev_status_change_event(sc, fw_event->event_data); break; diff --git a/sys/dev/mps/mps_table.c b/sys/dev/mps/mps_table.c index e3254570b496..aec97327e6b6 100644 --- a/sys/dev/mps/mps_table.c +++ b/sys/dev/mps/mps_table.c @@ -519,12 +519,10 @@ mps_print_sgl(struct mps_softc *sc, struct mps_command *cm, int offset) { MPI2_SGE_SIMPLE64 *sge; MPI2_SGE_CHAIN32 *sgc; - MPI2_REQUEST_HEADER *req; struct mps_chain *chain = NULL; char *frame; u_int i = 0, flags; - req = (MPI2_REQUEST_HEADER *)cm->cm_req; frame = (char *)cm->cm_req; sge = (MPI2_SGE_SIMPLE64 *)&frame[offset * 4]; printf("SGL for command %p\n", cm); From nobody Thu Nov 25 03:29:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6A5061891080; Thu, 25 Nov 2021 03:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J03JG0rdfz4TPq; Thu, 25 Nov 2021 03:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC7B816394; Thu, 25 Nov 2021 03:29: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 1AP3T1uY004487; Thu, 25 Nov 2021 03:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP3T1bj004486; Thu, 25 Nov 2021 03:29:01 GMT (envelope-from git) Date: Thu, 25 Nov 2021 03:29:01 GMT Message-Id: <202111250329.1AP3T1bj004486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Scott Long Subject: git: 61f17c5fd6cf - main - Fix "set but not used" warnings in the mpr driver. This fixes a minor bug in error 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: scottl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61f17c5fd6cfaaf4fa9f543965997022488a29d5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637810942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dKhIHdit4gEUX1zVLh+ZE07ioAOX21B+DGfXpoyHmOo=; b=qJptnnmFw+F6jrZN1IUcLpA0y7axYpEGgm9JyYAqmmpp74Wy1TYcRuZA1nNjvuWmc4x1ab +bcyOWWkQnvkGe20YPPwXNF3mHf9hjh3K6R40RYTjpmc1y0uoryqzbLR75A2RhDiNVf22F qyqFoIhrsxoDyEJZ3OXSsmNbg8kZstZCpZNZC3/B5fMon5TxwKexNiJnjKMV7MG9EfEWf7 9Q2xj6ZzGdxxaYNETV224/jVN2r1zNi9oFr3D2ueCBx6OyHW1M6D/1otwK02G8wkU5Fvr2 gB5tkdjsBmTTxhwVK0WZpTE4M0I30bI5diG739lCZGYZxizEEckPNjen1y86WA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637810942; a=rsa-sha256; cv=none; b=nJ0e0u9uvEW0flk/BfTcgB1E8fN8SnPguf5RTkrd0n0w3s/rHgxwhPAHrt/TgXW2cG8uGu rvpfZJsTVzQq2mCIYhVRmSBYUx6K1uowPKKbpQWDaswzxI5/n4Jjzy3jOns0IDNW7ccfNP 6bnBrwOR2gI6W0dU4Q4Mt5pusZV0rrZJVHj0HFF5uUnvZy1kXWeWYpPGpOtOZu7Q+85E5N AHW1KYT2NvWToY9CEAOKIaW5s4VmheOAqWR1rqLtxKUFD/njmZ6wmMfVhstMGeNsmX0q8E RpHpdOgheYBC5GEoPj1u7QdHVGqxtFeHmJcjZrGohUgKl1VlZ+Q5bFGL7bGt0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by scottl: URL: https://cgit.FreeBSD.org/src/commit/?id=61f17c5fd6cfaaf4fa9f543965997022488a29d5 commit 61f17c5fd6cfaaf4fa9f543965997022488a29d5 Author: Scott Long AuthorDate: 2021-11-25 03:28:29 +0000 Commit: Scott Long CommitDate: 2021-11-25 03:28:29 +0000 Fix "set but not used" warnings in the mpr driver. This fixes a minor bug in error handling. --- sys/dev/mpr/mpr_sas.c | 7 ++----- sys/dev/mpr/mpr_sas_lsi.c | 3 --- sys/dev/mpr/mpr_table.c | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index a4872dcc769e..db5df14562e7 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -1229,14 +1229,12 @@ static void mprsas_logical_unit_reset_complete(struct mpr_softc *sc, struct mpr_command *tm) { MPI2_SCSI_TASK_MANAGE_REPLY *reply; - MPI2_SCSI_TASK_MANAGE_REQUEST *req; unsigned int cm_count = 0; struct mpr_command *cm; struct mprsas_target *targ; callout_stop(&tm->cm_callout); - req = (MPI2_SCSI_TASK_MANAGE_REQUEST *)tm->cm_req; reply = (MPI2_SCSI_TASK_MANAGE_REPLY *)tm->cm_reply; targ = tm->cm_targ; @@ -1839,10 +1837,11 @@ mprsas_build_nvme_unmap(struct mpr_softc *sc, struct mpr_command *cm, mpr_build_nvme_prp(sc, cm, req, (void *)(uintptr_t)nvme_dsm_ranges_dma_handle, 0, data_length); mpr_map_command(sc, cm); + res = 0; out: free(plist, M_MPR); - return 0; + return (res); } static void @@ -2919,11 +2918,9 @@ mprsas_send_smpcmd(struct mprsas_softc *sassc, union ccb *ccb, uint64_t sasaddr) uint8_t *request, *response; MPI2_SMP_PASSTHROUGH_REQUEST *req; struct mpr_softc *sc; - struct sglist *sg; int error; sc = sassc->sc; - sg = NULL; error = 0; switch (ccb->ccb_h.flags & CAM_DATA_MASK) { diff --git a/sys/dev/mpr/mpr_sas_lsi.c b/sys/dev/mpr/mpr_sas_lsi.c index 025395f6eedd..92b78c5e0d17 100644 --- a/sys/dev/mpr/mpr_sas_lsi.c +++ b/sys/dev/mpr/mpr_sas_lsi.c @@ -271,9 +271,6 @@ mprsas_fw_work(struct mpr_softc *sc, struct mpr_fw_event_work *fw_event) } case MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE: { - Mpi2EventDataSasEnclDevStatusChange_t *data; - data = (Mpi2EventDataSasEnclDevStatusChange_t *) - fw_event->event_data; mpr_mapping_enclosure_dev_status_change_event(sc, fw_event->event_data); break; diff --git a/sys/dev/mpr/mpr_table.c b/sys/dev/mpr/mpr_table.c index 719866b5fa74..7bc629be7335 100644 --- a/sys/dev/mpr/mpr_table.c +++ b/sys/dev/mpr/mpr_table.c @@ -541,12 +541,10 @@ mpr_print_sgl(struct mpr_softc *sc, struct mpr_command *cm, int offset) MPI2_IEEE_SGE_SIMPLE64 *ieee_sge; MPI25_IEEE_SGE_CHAIN64 *ieee_sgc; MPI2_SGE_SIMPLE64 *sge; - MPI2_REQUEST_HEADER *req; struct mpr_chain *chain = NULL; char *frame; u_int i = 0, flags, length; - req = (MPI2_REQUEST_HEADER *)cm->cm_req; frame = (char *)cm->cm_req; ieee_sge = (MPI2_IEEE_SGE_SIMPLE64 *)&frame[offset * 4]; sge = (MPI2_SGE_SIMPLE64 *)&frame[offset * 4]; From nobody Thu Nov 25 03:33:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 28C2D1891F5C; Thu, 25 Nov 2021 03:33: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 4J03Pw6Dbsz4Tkn; Thu, 25 Nov 2021 03:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACF43163BB; Thu, 25 Nov 2021 03:33: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 1AP3XuSD017174; Thu, 25 Nov 2021 03:33:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP3XuEJ017173; Thu, 25 Nov 2021 03:33:56 GMT (envelope-from git) Date: Thu, 25 Nov 2021 03:33:56 GMT Message-Id: <202111250333.1AP3XuEJ017173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Scott Long Subject: git: 79ed7cb3df27 - main - Fix "set but not used" warnings in the ciss 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: scottl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79ed7cb3df2737a18f76b6173e7de864dfb869e0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637811236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8kPyEEltaSLeb92Ylbko4/dofqC9UeUW2HKhYcFCgAk=; b=mAgHw16Omes0FldY9Hoy/Khc4bDflac/n+McTgO4zt/46ySm1yxmWIqAQw0e9XhQVBhFwq xXUid3B0lk8WlzfY7eXVJb19WJQ9G6/gEIYKr2nMX71e1Hs5AJ2iMXEr9OrqE1FADBwSle SXnIyBtt2pRamtUTlgWiAbN5Rqyzg3faWJ05JNs5VcvdzsIF3Y+YJMgOYaI+IIW135no2w QqncVoWU2ZiQD2q3IMhXhEL09f7EiADSp8NmiOkp46/5Tey1WtXUy2QsnaxQSxpe4LrgYN Sq8eSDHfVku9CK/AYaj2S9OZN+KX0luKpczo4ii1ytlLLaGvDQ+lElmNMLyv8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637811236; a=rsa-sha256; cv=none; b=wJrcVRId3OO4BlXyw3U9IiNi34ULPKmBQVBXiwg6ah/LFjAeANfbxJloYTAEF+vh3Cio4t optZYC+0SE5GDLT+7Tk5S//qaxZ95GJb3yKEWtNU/2Cm95kYSdjTKUAWD8BGV7z5lzM62G 0v7jREGu1DKVW0FPvRv1PoRDOzr0JQE9F2G3MUMGWHd0yQ1r7rT+8q1QCiHuS5YYVtI/Y8 Tl9IXCou/MdTjZEHlPniJT6i9OMYwCsuv7W7MdeNefy2xIK8zbcEdH9Ga5pbBr6rcz3kjz kmjtLgQe8PxKMiSBA7OWiIL+oMaoTzPc+MTsE8fE1YKkBJ6daNtn906eM0tnxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by scottl: URL: https://cgit.FreeBSD.org/src/commit/?id=79ed7cb3df2737a18f76b6173e7de864dfb869e0 commit 79ed7cb3df2737a18f76b6173e7de864dfb869e0 Author: Scott Long AuthorDate: 2021-11-25 03:33:39 +0000 Commit: Scott Long CommitDate: 2021-11-25 03:33:39 +0000 Fix "set but not used" warnings in the ciss driver. --- sys/dev/ciss/ciss.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index d87f32610b20..100562cfc737 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -1489,12 +1489,11 @@ ciss_init_physical(struct ciss_softc *sc) struct ciss_lun_report *cll; int error = 0, i; int nphys; - int bus, target; + int bus; debug_called(1); bus = 0; - target = 0; cll = ciss_report_luns(sc, CISS_OPCODE_REPORT_PHYSICAL_LUNS, sc->ciss_cfg->max_physical_supported); @@ -2077,7 +2076,7 @@ ciss_free(struct ciss_softc *sc) static int ciss_start(struct ciss_request *cr) { - struct ciss_command *cc; /* XXX debugging only */ + struct ciss_command *cc __diagused; int error; cc = cr->cr_cc; @@ -2535,12 +2534,9 @@ ciss_preen_command(struct ciss_request *cr) static void ciss_release_request(struct ciss_request *cr) { - struct ciss_softc *sc; debug_called(2); - sc = cr->cr_sc; - /* release the request to the free queue */ ciss_requeue_free(cr); } @@ -3065,7 +3061,7 @@ ciss_cam_action(struct cam_sim *sim, union ccb *ccb) case XPT_GET_TRAN_SETTINGS: { struct ccb_trans_settings *cts = &ccb->cts; - int bus, target; + int bus __diagused, target __diagused; struct ccb_trans_settings_spi *spi = &cts->xport_specific.spi; struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; @@ -3667,14 +3663,12 @@ ciss_notify_event(struct ciss_softc *sc) static void ciss_notify_complete(struct ciss_request *cr) { - struct ciss_command *cc; struct ciss_notify *cn; struct ciss_softc *sc; int scsi_status; int command_status; debug_called(1); - cc = cr->cr_cc; cn = (struct ciss_notify *)cr->cr_data; sc = cr->cr_sc; From nobody Thu Nov 25 04:18:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 561BC18AB119; Thu, 25 Nov 2021 04:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J04Pk0YYrz4lLC; Thu, 25 Nov 2021 04:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD45316D2E; Thu, 25 Nov 2021 04:18: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 1AP4InnH070778; Thu, 25 Nov 2021 04:18:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP4InAb070777; Thu, 25 Nov 2021 04:18:49 GMT (envelope-from git) Date: Thu, 25 Nov 2021 04:18:49 GMT Message-Id: <202111250418.1AP4InAb070777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: ba83762a6230 - main - APEI: Fix Generic Error Data Entry revision 3.0 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba83762a623033576bab5942312365d2d738f437 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637813930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iNUAA/ZzuTE808ixIIyyDRZvwqrK/jZN9ipLrQtsnAI=; b=Lq2Xf3/e/oDlYRhw57O0xA0O+FkkhWvN5Ot4AsMfcMrgpcWX9WX9E9wykRZSKzKr18CtkT RuVLFFQy4C1yvKcquWx5xgWld+3Cq319NRQCIyBnBKeRxIC3T78T8SI6I4QUYFgTR4ZGRG bbUY3pqSxl7Hcn1eZjwnoFv1wCN2+cqGslFQdvYqZlfJzTUDjHQe5M8IPDIxMcvnlYBfc4 hUo5X+ualVAJTYf8nMMxokqBu3qSBYZ3EvYBC608mhLMOghh6Ij2Te3bfJXfbZkV2nVlOJ vJEpM8XzScKfsVGLTYRMfF14uiiD5apRjfnJhD1HUR+gV/1yE7myKwqpNAqfwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637813930; a=rsa-sha256; cv=none; b=X5feQjzBsCNhKJEVQNO8eSAz2zcdaAwJB5g+pdf9jGI2mpaxThafuX9c9S9aZZM+OhTF9M VTGg9z2IGy5f1Y3LrAgXU0nVVRqu1UJoW6Du13S9L+fKL7+n943pHVYyNP7rHsJc04hpRL 1OPPM3QhM64dM1QAikJWzTN1horujZRnCnLp7Pnd5KtWPEKLvN3lcx6b8pnzvWj7VzSlAG H7eJnhVhMQtN8cwQVQs+0H23xq+4C1B1Y/N41S+L3EgyLmNrgfPi/uluLUBdtvOfvy3+g6 Vnju2Mj1OusSlpS67+Ysee9GTZi9XQoELdxIpyQNpl/AFD2W8lpYQRu3F/9F9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=ba83762a623033576bab5942312365d2d738f437 commit ba83762a623033576bab5942312365d2d738f437 Author: Alexander Motin AuthorDate: 2021-11-25 04:03:20 +0000 Commit: Alexander Motin CommitDate: 2021-11-25 04:18:44 +0000 APEI: Fix Generic Error Data Entry revision 3.0 handling. Since revision 3.0 this structure grown another field, breaking access to the following data structures. This change fixes the PCIe errors decoding on newer systems. MFC after: 2 weeks --- sys/dev/acpica/acpi_apei.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/dev/acpica/acpi_apei.c b/sys/dev/acpica/acpi_apei.c index bc1f38f2fc8f..d4bc38887d9e 100644 --- a/sys/dev/acpica/acpi_apei.c +++ b/sys/dev/acpica/acpi_apei.c @@ -131,6 +131,10 @@ apei_bus_write_8(struct resource *res, bus_size_t offset, uint64_t val) #define WRITE8(r, o, v) bus_write_8((r), (o), (v)) #endif +#define GED_SIZE(ged) ((ged)->Revision >= 0x300 ? \ + sizeof(ACPI_HEST_GENERIC_DATA_V300) : sizeof(ACPI_HEST_GENERIC_DATA)) +#define GED_DATA(ged) ((uint8_t *)(ged) + GED_SIZE(ged)) + int apei_nmi_handler(void); static const char * @@ -152,7 +156,7 @@ apei_severity(uint32_t s) static int apei_mem_handler(ACPI_HEST_GENERIC_DATA *ged) { - struct apei_mem_error *p = (struct apei_mem_error *)(ged + 1); + struct apei_mem_error *p = (struct apei_mem_error *)GED_DATA(ged); printf("APEI %s Memory Error:\n", apei_severity(ged->ErrorSeverity)); if (p->ValidationBits & 0x01) @@ -207,7 +211,7 @@ apei_mem_handler(ACPI_HEST_GENERIC_DATA *ged) static int apei_pcie_handler(ACPI_HEST_GENERIC_DATA *ged) { - struct apei_pcie_error *p = (struct apei_pcie_error *)(ged + 1); + struct apei_pcie_error *p = (struct apei_pcie_error *)GED_DATA(ged); int h = 0, off; #ifdef DEV_PCI device_t dev; @@ -314,7 +318,7 @@ apei_ged_handler(ACPI_HEST_GENERIC_DATA *ged) t[3], t[2], t[1], t[0], t[5], t[4], t[7], t[6], t[8], t[9], t[10], t[11], t[12], t[13], t[14], t[15]); printf(" Error Data:\n"); - t = (uint8_t *)(ged + 1); + t = (uint8_t *)GED_DATA(ged); for (off = 0; off < ged->ErrorDataLength; off++) { printf(" %02x", t[off]); if ((off % 16) == 15 || off + 1 == ged->ErrorDataLength) @@ -334,7 +338,7 @@ apei_ged_handler(ACPI_HEST_GENERIC_DATA *ged) } if (ged->ValidationBits & ACPI_HEST_GEN_VALID_FRU_STRING) printf(" FRU Text: %.20s\n", ged->FruText); - if (ged->Revision == 0x300 && + if (ged->Revision >= 0x300 && ged->ValidationBits & ACPI_HEST_GEN_VALID_TIMESTAMP) printf(" Timestamp: %016jx\n", ged3->TimeStamp); } @@ -358,7 +362,7 @@ apei_ge_handler(struct apei_ge *ge, bool copy) for (off = i = 0; i < c && off + sizeof(*ged) <= ges->DataLength; i++) { ged = (ACPI_HEST_GENERIC_DATA *)&buf[sizeof(*ges) + off]; apei_ged_handler(ged); - off += sizeof(*ged) + ged->ErrorDataLength; + off += GED_SIZE(ged) + ged->ErrorDataLength; } /* Acknowledge the error has been processed. */ From nobody Thu Nov 25 05:01:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7420418962FF; Thu, 25 Nov 2021 05:01: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 4J05M96RZwz3DGR; Thu, 25 Nov 2021 05:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE27417928; Thu, 25 Nov 2021 05:01: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 1AP51f1J036850; Thu, 25 Nov 2021 05:01:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP51fS4036849; Thu, 25 Nov 2021 05:01:41 GMT (envelope-from git) Date: Thu, 25 Nov 2021 05:01:41 GMT Message-Id: <202111250501.1AP51fS4036849@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Guangyuan Yang Subject: git: 3218666bd082 - stable/13 - bridge(4): Use American spelling of "behavior" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ygy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3218666bd082737e41d886dc3af8d172bbe111e6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637816501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYAL5g5CYkQXuiBhBdX5b45uzfkPvtRF7Qthpkhk+vg=; b=Mm7lwNVaqKZqhqmHJilOycqeG0jacOvyQnSW1/GrBtsrR4MuRTBdAJoqbPiColtB645sWt LBHRdI9KZJ9iXyBbycHPo8JPcCeABWZEl6m9bgthbjVBUvPdsbH8zNMSeZ+X0RuUn+Uxd/ ymvMJb7WZtWseTlwsQ9lToZGkhN5KdRv78deKPlpZvtgb4ekBDMzexaRhxNZjlO7Gy9ZlN UGOQo2HAVu7tgcMIBMLNb2MN64zg9Pi+5ZKNmSWVhgyQZu5nYR5YnF2KbDgmZCtqVEjIMQ SNWN/zirqpkDNQE3f5X4M45Pu4GhahgZxSEyNJTClCkE8FK4IOxnITiCeE2Y3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637816501; a=rsa-sha256; cv=none; b=ODJaSk3CbExaHN/bNabTAiNAbH5ujKWe2u8Oq0ko1Nbs3KfA38kDvx+zSeM5meGgYIvjDf oFmhS/YBwjnTSVkLuPtGOU8dyfqlOfR1u66bGvwvOiMxgRfIu0sQDFL9E0+WqD6Jrb+6VP mz2+h0JtzSuU7z8Cgh5BAe/qruQAghRRYtRFMSNqRz6XQdSDg2kyYFGiXboQ6qmTYEQxs4 93yHLBYCvCRD/5hlAZQkHdr91laH9yfq+ebvatcoClQ2CRPWA/1JtnxiUIecAQ1R30e4oi Y8nUas6wM6hW/eBZcQJFHY97s2erNFl9LXoCQcCPTdlwTwC/PprvA5kiZbIaLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by ygy (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3218666bd082737e41d886dc3af8d172bbe111e6 commit 3218666bd082737e41d886dc3af8d172bbe111e6 Author: Guangyuan Yang AuthorDate: 2021-11-22 02:41:49 +0000 Commit: Guangyuan Yang CommitDate: 2021-11-25 05:01:16 +0000 bridge(4): Use American spelling of "behavior" Fixes: 8406182dbeb972698775e2468902bc5f6e593d72 Reported by: Pau Amma (cherry picked from commit 28ba36c65db8b4d95abcd543b97f2ec5161cdae5) --- share/man/man4/bridge.4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4 index c79e5da69837..e193724928ca 100644 --- a/share/man/man4/bridge.4 +++ b/share/man/man4/bridge.4 @@ -180,7 +180,7 @@ This situation is clearly against the description in Section 5, RFC 4007. Although it works in most cases, -it can cause some counterintuitive or undesirable behaviour in some +it can cause some counterintuitive or undesirable behavior in some edge cases when both, the .Nm interface and one of the member interfaces, have an IPv6 address @@ -198,7 +198,7 @@ interface has IPv6 addresses, IPv6 addresses on the member interface will be automatically removed before the interface is added. .Pp -This behaviour can be disabled by setting +This behavior can be disabled by setting .Xr sysctl 8 variable .Va net.link.bridge.allow_llz_overlap @@ -250,7 +250,7 @@ When filtering is enabled, bridged packets will pass through the filter inbound on the originating interface, on the bridge interface and outbound on the appropriate interfaces. Either stage can be disabled. -The filtering behaviour can be controlled using +The filtering behavior can be controlled using .Xr sysctl 8 : .Bl -tag -width ".Va net.link.bridge.pfil_onlyip" .It Va net.link.bridge.pfil_onlyip From nobody Thu Nov 25 07:38:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8C358189CDE8; Thu, 25 Nov 2021 07:39:09 +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 4J08rr2F5Vz4q71; Thu, 25 Nov 2021 07:39:08 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.17.1/8.17.1/hmo17dec20) with ESMTPS id 1AP7cvt2042556 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 25 Nov 2021 08:38:57 +0100 (CET) (envelope-from freebsd@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.17.1/8.17.1/Submit) id 1AP7cuCu042555; Thu, 25 Nov 2021 08:38:56 +0100 (CET) (envelope-from freebsd@oldach.net) Message-Id: <202111250738.1AP7cuCu042555@nuc.oldach.net> Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features In-Reply-To: <8664c9a1-f000-d07f-5f48-3b18d3e5f629@freebsd.org> from Allan Jude at "24 Nov 2021 13:02:47" To: allanjude@freebsd.org (Allan Jude) Date: Thu, 25 Nov 2021 08:38:56 +0100 (CET) Cc: manu@bidouilliste.com, 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]); Thu, 25 Nov 2021 08:38:57 +0100 (CET) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:freebsd@oldach.net RCPT: X-Rspamd-Queue-Id: 4J08rr2F5Vz4q71 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=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 X-Spamd-Result: default: False [-3.30 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[oldach.net]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_NO_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N Hi, Allan Jude wrote on Wed, 24 Nov 2021 19:02:47 +0100 (CET): > On 11/24/2021 3:30 AM, Emmanuel Vadot wrote: > > On Tue, 23 Nov 2021 20:36:40 +0100 (CET) > > freebsd@oldach.net (Helge Oldach) wrote: > > > >> Allan Jude wrote on Tue, 23 Nov 2021 20:14:53 +0100 (CET): > >>> On 11/23/2021 5:00 AM, Helge Oldach wrote: > >>>> Allan Jude wrote on Mon, 22 Nov 2021 19:14:13 +0100 (CET): > >>>> Hmmm. On a RPi4/8G: > >>>> > >>>> Before (FreeBSD 13.0-STABLE (GENERIC) #366 stable/13-n248173-d16fbc488e6): > >>>> | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > >>>> | aes-256-gcm 35791.98k 38533.57k 39986.77k 41397.59k 39840.43k 39638.36k > >>>> > >>>> After (FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621) > >>>> > >>>> | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > >>>> | aes-256-gcm 21277.62k 23226.64k 23613.90k 23687.51k 23892.93k 23947.95k > >>>> > >>>> It seems that AES throughput is actually cut by almost half? > >>> > >>> Do you know which of the CPU optimizations your RPi4 supports? > >> > >> Is this what you need? > >> > >> Instruction Set Attributes 0 = > > > > So there is no AES+PMULL instruction set on RPI4, I guess that openssl > > uses them for aes-gcm. > > > > I wonder what it uses before that make it have this boost. > > > > On my rockpro64 I do see the improvement btw : > > root@generic:~ # cpuset -l 4,5 openssl speed -evp aes-256-gcm > > ... > > aes-256-gcm 122861.59k 337938.39k 565408.44k 661223.09k 709175.19k 712327.25k > > root@generic:~ # cpuset -l 4,5 env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm > > ... > > aes-256-gcm 34068.11k 38068.62k 39435.24k 39818.75k 39905.34k 39922.35k > > > > Running on the big cores at max freq. > > > >> Instruction Set Attributes 1 = <> > >> Processor Features 0 = > >> Processor Features 1 = <> > >> Memory Model Features 0 = > >> Memory Model Features 1 = <8bit VMID> > >> Memory Model Features 2 = <32bit CCIDX,48bit VA> > >> Debug Features 0 = > >> Debug Features 1 = <> > >> Auxiliary Features 0 = <> > >> Auxiliary Features 1 = <> > >> AArch32 Instruction Set Attributes 5 = > >> AArch32 Media and VFP Features 0 = > >> AArch32 Media and VFP Features 1 = > >> > >>> You can set the environment variable OPENSSL_armcap to override > >>> OpenSSL's detection. > >>> > >>> Try: env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm > >> > >> On FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621 again (i.e. after this commit): > >> > >> hmo@p48 ~ $ env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm > >> Doing aes-256-gcm for 3s on 16 size blocks: 6445704 aes-256-gcm's in 3.08s > >> Doing aes-256-gcm for 3s on 64 size blocks: 1861149 aes-256-gcm's in 3.00s > >> Doing aes-256-gcm for 3s on 256 size blocks: 479664 aes-256-gcm's in 3.01s > >> Doing aes-256-gcm for 3s on 1024 size blocks: 122853 aes-256-gcm's in 3.04s > >> Doing aes-256-gcm for 3s on 8192 size blocks: 15181 aes-256-gcm's in 3.00s > >> Doing aes-256-gcm for 3s on 16384 size blocks: 7796 aes-256-gcm's in 3.07s > >> OpenSSL 1.1.1l-freebsd 24 Aug 2021 > >> built on: reproducible build, date unspecified > >> options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) > >> compiler: clang > >> The 'numbers' are in 1000s of bytes per second processed. > >> type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > >> aes-256-gcm 33504.57k 39704.51k 40825.01k 41394.83k 41454.25k 41601.52k > >> hmo@p48 ~ $ openssl speed -evp aes-256-gcm > >> Doing aes-256-gcm for 3s on 16 size blocks: 4066201 aes-256-gcm's in 3.00s > >> Doing aes-256-gcm for 3s on 64 size blocks: 1087387 aes-256-gcm's in 3.00s > >> Doing aes-256-gcm for 3s on 256 size blocks: 280110 aes-256-gcm's in 3.03s > >> Doing aes-256-gcm for 3s on 1024 size blocks: 70412 aes-256-gcm's in 3.04s > >> Doing aes-256-gcm for 3s on 8192 size blocks: 8762 aes-256-gcm's in 3.00s > >> Doing aes-256-gcm for 3s on 16384 size blocks: 4402 aes-256-gcm's in 3.02s > >> OpenSSL 1.1.1l-freebsd 24 Aug 2021 > >> built on: reproducible build, date unspecified > >> options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) > >> compiler: clang > >> The 'numbers' are in 1000s of bytes per second processed. > >> type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes > >> aes-256-gcm 21686.41k 23197.59k 23656.30k 23725.04k 23926.10k 23916.23k > >> hmo@p48 ~ $ > >> > >> Kind regards, > >> Helge > > > > > > So based on results from Manu, and Mark Millard, it seems almost every > ARM platform is faster when it takes advantage of the CPU features, > except the RPi4(B). > > As Manu pointed out, it doesn't appear to have the AES+PMULL feature, > which means it must be something else that is slowing it down. > > What might help, is to try each feature in turn, and figure out which > one is causing slower results. > > #define HWCAP_FP 0x00000001 > #define HWCAP_ASIMD 0x00000002 > #define HWCAP_EVTSTRM 0x00000004 > #define HWCAP_AES 0x00000008 > #define HWCAP_PMULL 0x00000010 > #define HWCAP_SHA1 0x00000020 > #define HWCAP_SHA2 0x00000040 > #define HWCAP_CRC32 0x00000080 > > So try: > env OPENSSL_armcap=1 openssl speed -evp aes-256-gcm > as well as with armcap=2, 3 (both FP and ASIMD), 8 (just AES) etc. hmo@p48 ~ $ for f in 0 1 2 3 8 16 32 64 128 ; do echo -n $f:; env OPENSSL_armcap=$f openssl speed -evp aes-256-gcm 2>&1 | tail -1 | cut -wf7; done 0:42295.15k 1:23891.19k 2:42208.57k 3:23970.56k 8:42354.98k 16:42199.06k 32:size Illegal instruction (core dumped) 64:42322.42k 128:42275.00k hmo@p48 ~ $ So I guess HWCAP_FP is the culprit? Maybe related to hard/soft floating point math which indeed is kind of special on the Pi? > For ones where the CPU lacks the feature, it will crash with 'Illegal > instruction' > > Separately, it might also be interesting to see the results of `openssl > speed -evp sha256` before/after/with the different OPENSSL_armcap values Please let me know in case you still require this. Kind regards Helge From nobody Thu Nov 25 07:46:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7AC9618A11CA; Thu, 25 Nov 2021 07:46: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 4J091n0q0mz4sXg; Thu, 25 Nov 2021 07:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F03BB19B90; Thu, 25 Nov 2021 07:46: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 1AP7kq7G049884; Thu, 25 Nov 2021 07:46:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP7kqNk049883; Thu, 25 Nov 2021 07:46:52 GMT (envelope-from git) Date: Thu, 25 Nov 2021 07:46:52 GMT Message-Id: <202111250746.1AP7kqNk049883@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: a9620045a5b9 - main - mly: Remove. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a9620045a5b91f2b86e7ab0f3d27c1030d1ecafc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637826413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RjyVGF4Fdb2koZaaqpic/O4E9Yr3fIyyhwjeHriWd7Q=; b=aXECmpe5ZFLqb8oamwKAvU+BXGGinaul6GsqBXIsNARroaEGNL9ZAT71GUUaqKgm2BKG19 as+pF6RwFsb3XZaVJwtcQ0rkZwFBb+HG7ns6JNIdZ+ovJ+fxWv9wArK5AgvUwgMkXksJuv qIsSB4QROKw4l4t7EbM1a3b7kHDXnpoZSCit9uK1RF8y/AsGoe6JhLAmsmnkYkkwKBTtDs gNUWUv8/ojvJ78n/FyqtssA8aRFpiHUDKeAuwowNbFPJ+16fLsjbsX9wzyCEt7WgkfSpCk VBLaSoTeFpVPcwN0u1MamWP4bS7G873YtpEY5DtP229LQC89pYDYXsmcFauTbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637826413; a=rsa-sha256; cv=none; b=wSPpIwO63/pP+bZTYtgO0AXEYknJ1lRNEIQs2RgbgRK/HV0HhZObp+QbC8B2owA5iZLJVj oNskaytLZ0imFF/H9i4x21IruSe8SEM05SyOufBEVe+yR6HKU3h8tXC0XjFr7TgYL7X0pJ MNs0slJsZsacjrt+f22reWOAXAi7ZwFXknMqNbWMu/iql6b4B89kUwlzwAF2KsGToAno0V g0z9ZH06LPL5lLOeQXrawbOoz4tUTdLQuwyLaFRpiA2kNqEfcK/TwKekQQkrA0jUPklwfk yL0ePphs9tZrbBfbt8UASpezHDb2CtlbvcWhTOwfxF6IzJoorS3Ly0Q2MiEnjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a9620045a5b91f2b86e7ab0f3d27c1030d1ecafc commit a9620045a5b91f2b86e7ab0f3d27c1030d1ecafc Author: Warner Losh AuthorDate: 2021-11-25 07:20:10 +0000 Commit: Warner Losh CommitDate: 2021-11-25 07:45:12 +0000 mly: Remove. We'd said this was going away in 13, but was overlooked. Belatedly remove. Sponsored by: Netflix Relnotes: yes Reviewed by: scottl Differential Revision: https://reviews.freebsd.org/D33111 --- share/man/man4/Makefile | 1 - share/man/man4/mly.4 | 275 --- sys/amd64/conf/GENERIC | 1 - sys/conf/NOTES | 7 - sys/conf/files | 1 - sys/dev/mly/mly.c | 3003 ------------------------------- sys/dev/mly/mly_tables.h | 325 ---- sys/dev/mly/mlyio.h | 72 - sys/dev/mly/mlyreg.h | 1272 ------------- sys/dev/mly/mlyvar.h | 370 ---- sys/i386/conf/GENERIC | 1 - sys/modules/Makefile | 2 - sys/modules/mly/Makefile | 13 - tools/kerneldoc/subsys/Doxyfile-dev_mly | 21 - 14 files changed, 5364 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index dfef254bff56..6bb519b36e1e 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -305,7 +305,6 @@ MAN= aac.4 \ mlx.4 \ mlx4en.4 \ mlx5en.4 \ - mly.4 \ mmc.4 \ mmcsd.4 \ mod_cc.4 \ diff --git a/share/man/man4/mly.4 b/share/man/man4/mly.4 deleted file mode 100644 index 1a59903dfb2c..000000000000 --- a/share/man/man4/mly.4 +++ /dev/null @@ -1,275 +0,0 @@ -.\" -.\" Copyright (c) 2000 Michael Smith -.\" Copyright (c) 2000 BSDi -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission -.\" -.\" 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. -.\" -.\" $FreeBSD$ -.\" -.Dd August 10, 2004 -.Dt MLY 4 -.Os -.Sh NAME -.Nm mly -.Nd Mylex AcceleRAID/eXtremeRAID family driver -.Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device pci" -.Cd "device scbus" -.Cd "device da" -.Cd "device mly" -.Ed -.Pp -Alternatively, to load the driver as a -module at boot time, place the following line in -.Xr loader.conf 5 : -.Bd -literal -offset indent -mly_load="YES" -.Ed -.Sh DEPRECATION NOTICE -The -.Nm -driver is not present in -.Fx 13.0 . -.Sh DESCRIPTION -The -.Nm -driver provides support for Mylex AcceleRAID and eXtremeRAID-family -PCI to SCSI RAID controllers with version 6.00 and later -firmware. -.Pp -Logical devices (array drives) attached to the controller are presented -to the SCSI subsystem as though they were direct-access devices on a -virtual SCSI bus. -Physical devices which are not claimed by a logical -device are presented on SCSI channels which match the physical channels -on the controller. -.Sh HARDWARE -Controllers supported by the -.Nm -driver include: -.Pp -.Bl -bullet -compact -.It -Mylex AcceleRAID 160 -.It -Mylex AcceleRAID 170 -.It -Mylex AcceleRAID 352 -.It -Mylex eXtremeRAID 2000 -.It -Mylex eXtremeRAID 3000 -.El -.Pp -Compatible Mylex controllers not listed should work, but have not been -verified. -.Sh DIAGNOSTICS -.Ss Controller initialisation phase -.Bl -diag -.It "mly%d: controller initialisation started" -.It "mly%d: initialisation complete" -.Pp -The controller firmware has started initialisation. -Normally this process is performed by the controller BIOS, -but the driver may need -to do this in cases where the BIOS has failed, or is not compatible -(e.g.\& on non-x86 systems). -.It "mly%d: drive spinup in progress" -.Pp -Drive startup is in progress; this may take several minutes. -.It "mly%d: mirror race recovery failed, one or more drives offline" -.It "mly%d: mirror race recovery in progress" -.It "mly%d: mirror race recovery on a critical drive" -.Pp -These error codes are undocumented. -.It "mly%d: FATAL MEMORY PARITY ERROR" -.Pp -Firmware detected a fatal memory error; the driver will not attempt to -attach to this controller. -.It "mly%d: unknown initialisation code %x" -.Pp -An unknown error occurred during initialisation; it will be ignored. -.El -.Ss Driver initialisation/shutdown phase -.Bl -diag -.It "mly%d: can't enable busmaster feature" -.It "mly%d: memory window not available" -.It "mly%d: can't allocate register window" -.It "mly%d: can't allocate interrupt" -.It "mly%d: can't set up interrupt" -.Pp -The system's PCI BIOS has not correctly configured the controller's -PCI interface; initialisation has failed and the driver will not -attach to this controller. -.It "mly%d: can't allocate parent DMA tag" -.It "mly%d: can't allocate buffer DMA tag" -.It "mly%d: can't allocate command packet DMA tag" -.It "mly%d: can't allocate scatter/gather DMA tag" -.It "mly%d: can't allocate s/g table" -.It "mly%d: can't allocate memory mailbox DMA tag" -.It "mly%d: can't allocate memory mailbox" -.Pp -A resource allocation error occurred while initialising the driver; -initialisation has failed and the driver will not attach to this -controller. -.It "mly%d: BTL rescan result corrupted" -.Pp -The results of a scan for an attached device were corrupted. -One or more devices may not be correctly reported. -.It "mly%d: flushing cache..." -.Pp -The controller cache is being flushed prior to detach or shutdown. -.El -.Ss Operational diagnostics -.Bl -diag -.It "mly%d: physical device %d:%d online" -.It "mly%d: physical device %d:%d standby" -.It "mly%d: physical device %d:%d automatic rebuild started" -.It "mly%d: physical device %d:%d manual rebuild started" -.It "mly%d: physical device %d:%d rebuild completed" -.It "mly%d: physical device %d:%d rebuild cancelled" -.It "mly%d: physical device %d:%d rebuild failed for unknown reasons" -.It "mly%d: physical device %d:%d rebuild failed due to new physical device" -.It "mly%d: physical device %d:%d rebuild failed due to logical drive failure" -.It "mly%d: physical device %d:%d found" -.It "mly%d: physical device %d:%d gone" -.It "mly%d: physical device %d:%d unconfigured" -.It "mly%d: physical device %d:%d expand capacity started" -.It "mly%d: physical device %d:%d expand capacity completed" -.It "mly%d: physical device %d:%d expand capacity failed" -.It "mly%d: physical device %d:%d parity error" -.It "mly%d: physical device %d:%d soft error" -.It "mly%d: physical device %d:%d miscellaneous error" -.It "mly%d: physical device %d:%d reset" -.It "mly%d: physical device %d:%d active spare found" -.It "mly%d: physical device %d:%d warm spare found" -.It "mly%d: physical device %d:%d initialization started" -.It "mly%d: physical device %d:%d initialization completed" -.It "mly%d: physical device %d:%d initialization failed" -.It "mly%d: physical device %d:%d initialization cancelled" -.It "mly%d: physical device %d:%d write recovery failed" -.It "mly%d: physical device %d:%d scsi bus reset failed" -.It "mly%d: physical device %d:%d double check condition" -.It "mly%d: physical device %d:%d device cannot be accessed" -.It "mly%d: physical device %d:%d gross error on scsi processor" -.It "mly%d: physical device %d:%d bad tag from device" -.It "mly%d: physical device %d:%d command timeout" -.It "mly%d: physical device %d:%d system reset" -.It "mly%d: physical device %d:%d busy status or parity error" -.It "mly%d: physical device %d:%d host set device to failed state" -.It "mly%d: physical device %d:%d selection timeout" -.It "mly%d: physical device %d:%d scsi bus phase error" -.It "mly%d: physical device %d:%d device returned unknown status" -.It "mly%d: physical device %d:%d device not ready" -.It "mly%d: physical device %d:%d device not found at startup" -.It "mly%d: physical device %d:%d COD write operation failed" -.It "mly%d: physical device %d:%d BDT write operation failed" -.It "mly%d: physical device %d:%d missing at startup" -.It "mly%d: physical device %d:%d start rebuild failed due to physical drive too small" -.It "mly%d: physical device %d:%d sense data received" -.It "mly%d: sense key %d asc %02x ascq %02x" -.It "mly%d: info %4D csi %4D" -.It "mly%d: physical device %d:%d offline" -.It "mly%d: sense key %d asc %02x ascq %02x" -.It "mly%d: info %4D csi %4D" -.Pp -The reported event refers to the physical device at the given channel:target -address. -.It "mly%d: logical device %d (%s) consistency check started" -.It "mly%d: logical device %d (%s) consistency check completed" -.It "mly%d: logical device %d (%s) consistency check cancelled" -.It "mly%d: logical device %d (%s) consistency check completed with errors" -.It "mly%d: logical device %d (%s) consistency check failed due to logical drive failure" -.It "mly%d: logical device %d (%s) consistency check failed due to physical device failure" -.It "mly%d: logical device %d (%s) automatic rebuild started" -.It "mly%d: logical device %d (%s) manual rebuild started" -.It "mly%d: logical device %d (%s) rebuild completed" -.It "mly%d: logical device %d (%s) rebuild cancelled" -.It "mly%d: logical device %d (%s) rebuild failed for unknown reasons" -.It "mly%d: logical device %d (%s) rebuild failed due to new physical device" -.It "mly%d: logical device %d (%s) rebuild failed due to logical drive failure" -.It "mly%d: logical device %d (%s) offline" -.It "mly%d: logical device %d (%s) critical" -.It "mly%d: logical device %d (%s) online" -.It "mly%d: logical device %d (%s) initialization started" -.It "mly%d: logical device %d (%s) initialization completed" -.It "mly%d: logical device %d (%s) initialization cancelled" -.It "mly%d: logical device %d (%s) initialization failed" -.It "mly%d: logical device %d (%s) found" -.It "mly%d: logical device %d (%s) gone" -.It "mly%d: logical device %d (%s) expand capacity started" -.It "mly%d: logical device %d (%s) expand capacity completed" -.It "mly%d: logical device %d (%s) expand capacity failed" -.It "mly%d: logical device %d (%s) bad block found" -.It "mly%d: logical device %d (%s) size changed" -.It "mly%d: logical device %d (%s) type changed" -.It "mly%d: logical device %d (%s) bad data block found" -.It "mly%d: logical device %d (%s) read of data block in bdt" -.It "mly%d: logical device %d (%s) write back data for disk block lost" -.Pp -The event report will include the name of the SCSI device which has -attached to the device if possible. -.It "mly%d: enclosure %d fan %d failed" -.It "mly%d: enclosure %d fan %d ok" -.It "mly%d: enclosure %d fan %d not present" -.It "mly%d: enclosure %d power supply %d failed" -.It "mly%d: enclosure %d power supply %d ok" -.It "mly%d: enclosure %d power supply %d not present" -.It "mly%d: enclosure %d temperature sensor %d failed" -.It "mly%d: enclosure %d temperature sensor %d critical" -.It "mly%d: enclosure %d temperature sensor %d ok" -.It "mly%d: enclosure %d temperature sensor %d not present" -.It "mly%d: enclosure %d unit %d access critical" -.It "mly%d: enclosure %d unit %d access ok" -.It "mly%d: enclosure %d unit %d access offline" -.Pp -These events refer to external enclosures by number. -The driver does not attempt to name the enclosures. -.It "mly%d: controller cache write back error" -.It "mly%d: controller battery backup unit found" -.It "mly%d: controller battery backup unit charge level low" -.It "mly%d: controller battery backup unit charge level ok" -.It "mly%d: controller installation aborted" -.It "mly%d: controller mirror race recovery in progress" -.It "mly%d: controller mirror race on critical drive" -.It "mly%d: controller memory soft ecc error" -.It "mly%d: controller memory hard ecc error" -.It "mly%d: controller battery backup unit failed" -.Pp -These events report controller status changes. -.El -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was written by -.An Michael Smith Aq Mt msmith@FreeBSD.org . -.Pp -This manual page was written by -.An Michael Smith Aq Mt msmith@FreeBSD.org . -.Sh BUGS -The driver does not yet provide an external management interface. -.Pp -Enclosures are not named or otherwise identified in event messages. diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 589d81e06dde..7b3a5f91e936 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -185,7 +185,6 @@ device arcmsr # Areca SATA II RAID device ciss # Compaq Smart RAID 5* device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID -device mly # Mylex AcceleRAID/eXtremeRAID device twa # 3ware 9000 series PATA/SATA RAID device smartpqi # Microsemi smartpqi driver device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 79fa149ad33f..d0749fe23b87 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1644,13 +1644,6 @@ device ciss # device iir -# -# Mylex AcceleRAID and eXtremeRAID controllers with v6 and later -# firmware. These controllers have a SCSI-like interface, and require -# the CAM infrastructure. -# -device mly - # # Compaq Smart RAID, Mylex DAC960 and AMI MegaRAID controllers. Only # one entry is needed; the code will find and configure all supported diff --git a/sys/conf/files b/sys/conf/files index 8936cdaf5bd3..e65c318d1514 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2459,7 +2459,6 @@ dev/mlxfw/mlxfw_mfa2_tlv_multi.c optional mlxfw \ dev/mlx/mlx.c optional mlx dev/mlx/mlx_disk.c optional mlx dev/mlx/mlx_pci.c optional mlx pci -dev/mly/mly.c optional mly dev/mmc/mmc_subr.c optional mmc | mmcsd !mmccam dev/mmc/mmc.c optional mmc !mmccam dev/mmc/mmcbr_if.m standard diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c deleted file mode 100644 index 1bdcdbb87443..000000000000 --- a/sys/dev/mly/mly.c +++ /dev/null @@ -1,3003 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2000, 2001 Michael Smith - * Copyright (c) 2000 BSDi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $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 - -static int mly_probe(device_t dev); -static int mly_attach(device_t dev); -static int mly_pci_attach(struct mly_softc *sc); -static int mly_detach(device_t dev); -static int mly_shutdown(device_t dev); -static void mly_intr(void *arg); - -static int mly_sg_map(struct mly_softc *sc); -static void mly_sg_map_helper(void *arg, bus_dma_segment_t *segs, int nseg, int error); -static int mly_mmbox_map(struct mly_softc *sc); -static void mly_mmbox_map_helper(void *arg, bus_dma_segment_t *segs, int nseg, int error); -static void mly_free(struct mly_softc *sc); - -static int mly_get_controllerinfo(struct mly_softc *sc); -static void mly_scan_devices(struct mly_softc *sc); -static void mly_rescan_btl(struct mly_softc *sc, int bus, int target); -static void mly_complete_rescan(struct mly_command *mc); -static int mly_get_eventstatus(struct mly_softc *sc); -static int mly_enable_mmbox(struct mly_softc *sc); -static int mly_flush(struct mly_softc *sc); -static int mly_ioctl(struct mly_softc *sc, struct mly_command_ioctl *ioctl, void **data, - size_t datasize, u_int8_t *status, void *sense_buffer, size_t *sense_length); -static void mly_check_event(struct mly_softc *sc); -static void mly_fetch_event(struct mly_softc *sc); -static void mly_complete_event(struct mly_command *mc); -static void mly_process_event(struct mly_softc *sc, struct mly_event *me); -static void mly_periodic(void *data); - -static int mly_immediate_command(struct mly_command *mc); -static int mly_start(struct mly_command *mc); -static void mly_done(struct mly_softc *sc); -static void mly_complete(struct mly_softc *sc); -static void mly_complete_handler(void *context, int pending); - -static int mly_alloc_command(struct mly_softc *sc, struct mly_command **mcp); -static void mly_release_command(struct mly_command *mc); -static void mly_alloc_commands_map(void *arg, bus_dma_segment_t *segs, int nseg, int error); -static int mly_alloc_commands(struct mly_softc *sc); -static void mly_release_commands(struct mly_softc *sc); -static void mly_map_command(struct mly_command *mc); -static void mly_unmap_command(struct mly_command *mc); - -static int mly_cam_attach(struct mly_softc *sc); -static void mly_cam_detach(struct mly_softc *sc); -static void mly_cam_rescan_btl(struct mly_softc *sc, int bus, int target); -static void mly_cam_action(struct cam_sim *sim, union ccb *ccb); -static int mly_cam_action_io(struct cam_sim *sim, struct ccb_scsiio *csio); -static void mly_cam_poll(struct cam_sim *sim); -static void mly_cam_complete(struct mly_command *mc); -static struct cam_periph *mly_find_periph(struct mly_softc *sc, int bus, int target); -static int mly_name_device(struct mly_softc *sc, int bus, int target); - -static int mly_fwhandshake(struct mly_softc *sc); - -static void mly_describe_controller(struct mly_softc *sc); -#ifdef MLY_DEBUG -static void mly_printstate(struct mly_softc *sc); -static void mly_print_command(struct mly_command *mc); -static void mly_print_packet(struct mly_command *mc); -static void mly_panic(struct mly_softc *sc, char *reason); -static void mly_timeout(void *arg); -#endif -void mly_print_controller(int controller); - -static d_open_t mly_user_open; -static d_close_t mly_user_close; -static d_ioctl_t mly_user_ioctl; -static int mly_user_command(struct mly_softc *sc, struct mly_user_command *uc); -static int mly_user_health(struct mly_softc *sc, struct mly_user_health *uh); - -#define MLY_CMD_TIMEOUT 20 - -static device_method_t mly_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, mly_probe), - DEVMETHOD(device_attach, mly_attach), - DEVMETHOD(device_detach, mly_detach), - DEVMETHOD(device_shutdown, mly_shutdown), - { 0, 0 } -}; - -static driver_t mly_pci_driver = { - "mly", - mly_methods, - sizeof(struct mly_softc) -}; - -static devclass_t mly_devclass; -DRIVER_MODULE(mly, pci, mly_pci_driver, mly_devclass, 0, 0); -MODULE_DEPEND(mly, pci, 1, 1, 1); -MODULE_DEPEND(mly, cam, 1, 1, 1); - -static struct cdevsw mly_cdevsw = { - .d_version = D_VERSION, - .d_open = mly_user_open, - .d_close = mly_user_close, - .d_ioctl = mly_user_ioctl, - .d_name = "mly", -}; - -/******************************************************************************** - ******************************************************************************** - Device Interface - ******************************************************************************** - ********************************************************************************/ - -static struct mly_ident -{ - u_int16_t vendor; - u_int16_t device; - u_int16_t subvendor; - u_int16_t subdevice; - int hwif; - char *desc; -} mly_identifiers[] = { - {0x1069, 0xba56, 0x1069, 0x0040, MLY_HWIF_STRONGARM, "Mylex eXtremeRAID 2000"}, - {0x1069, 0xba56, 0x1069, 0x0030, MLY_HWIF_STRONGARM, "Mylex eXtremeRAID 3000"}, - {0x1069, 0x0050, 0x1069, 0x0050, MLY_HWIF_I960RX, "Mylex AcceleRAID 352"}, - {0x1069, 0x0050, 0x1069, 0x0052, MLY_HWIF_I960RX, "Mylex AcceleRAID 170"}, - {0x1069, 0x0050, 0x1069, 0x0054, MLY_HWIF_I960RX, "Mylex AcceleRAID 160"}, - {0, 0, 0, 0, 0, 0} -}; - -/******************************************************************************** - * Compare the provided PCI device with the list we support. - */ -static int -mly_probe(device_t dev) -{ - struct mly_ident *m; - - debug_called(1); - - for (m = mly_identifiers; m->vendor != 0; m++) { - if ((m->vendor == pci_get_vendor(dev)) && - (m->device == pci_get_device(dev)) && - ((m->subvendor == 0) || ((m->subvendor == pci_get_subvendor(dev)) && - (m->subdevice == pci_get_subdevice(dev))))) { - - device_set_desc(dev, m->desc); - return(BUS_PROBE_DEFAULT); /* allow room to be overridden */ - } - } - return(ENXIO); -} - -/******************************************************************************** - * Initialise the controller and softc - */ -static int -mly_attach(device_t dev) -{ - struct mly_softc *sc = device_get_softc(dev); - int error; - - debug_called(1); - - sc->mly_dev = dev; - mtx_init(&sc->mly_lock, "mly", NULL, MTX_DEF); - callout_init_mtx(&sc->mly_periodic, &sc->mly_lock, 0); - -#ifdef MLY_DEBUG - callout_init_mtx(&sc->mly_timeout, &sc->mly_lock, 0); - if (device_get_unit(sc->mly_dev) == 0) - mly_softc0 = sc; -#endif - - /* - * Do PCI-specific initialisation. - */ - if ((error = mly_pci_attach(sc)) != 0) - goto out; - - /* - * Initialise per-controller queues. - */ - mly_initq_free(sc); - mly_initq_busy(sc); - mly_initq_complete(sc); - - /* - * Initialise command-completion task. - */ - TASK_INIT(&sc->mly_task_complete, 0, mly_complete_handler, sc); - - /* disable interrupts before we start talking to the controller */ - MLY_MASK_INTERRUPTS(sc); - - /* - * Wait for the controller to come ready, handshake with the firmware if required. - * This is typically only necessary on platforms where the controller BIOS does not - * run. - */ - if ((error = mly_fwhandshake(sc))) - goto out; - - /* - * Allocate initial command buffers. - */ - if ((error = mly_alloc_commands(sc))) - goto out; - - /* - * Obtain controller feature information - */ - MLY_LOCK(sc); - error = mly_get_controllerinfo(sc); - MLY_UNLOCK(sc); - if (error) - goto out; - - /* - * Reallocate command buffers now we know how many we want. - */ - mly_release_commands(sc); - if ((error = mly_alloc_commands(sc))) - goto out; - - /* - * Get the current event counter for health purposes, populate the initial - * health status buffer. - */ - MLY_LOCK(sc); - error = mly_get_eventstatus(sc); - - /* - * Enable memory-mailbox mode. - */ - if (error == 0) - error = mly_enable_mmbox(sc); - MLY_UNLOCK(sc); - if (error) - goto out; - - /* - * Attach to CAM. - */ - if ((error = mly_cam_attach(sc))) - goto out; - - /* - * Print a little information about the controller - */ - mly_describe_controller(sc); - - /* - * Mark all attached devices for rescan. - */ - MLY_LOCK(sc); - mly_scan_devices(sc); - - /* - * Instigate the first status poll immediately. Rescan completions won't - * happen until interrupts are enabled, which should still be before - * the SCSI subsystem gets to us, courtesy of the "SCSI settling delay". - */ - mly_periodic((void *)sc); - MLY_UNLOCK(sc); - - /* - * Create the control device. - */ - sc->mly_dev_t = make_dev(&mly_cdevsw, 0, UID_ROOT, GID_OPERATOR, - S_IRUSR | S_IWUSR, "mly%d", device_get_unit(sc->mly_dev)); - sc->mly_dev_t->si_drv1 = sc; - - /* enable interrupts now */ - MLY_UNMASK_INTERRUPTS(sc); - -#ifdef MLY_DEBUG - callout_reset(&sc->mly_timeout, MLY_CMD_TIMEOUT * hz, mly_timeout, sc); -#endif - - out: - if (error != 0) - mly_free(sc); - else - gone_in_dev(dev, 13, "mly(4) removed"); - return(error); -} - -/******************************************************************************** - * Perform PCI-specific initialisation. - */ -static int -mly_pci_attach(struct mly_softc *sc) -{ - int i, error; - - debug_called(1); - - /* assume failure is 'not configured' */ - error = ENXIO; - - /* - * Verify that the adapter is correctly set up in PCI space. - */ - pci_enable_busmaster(sc->mly_dev); - - /* - * Allocate the PCI register window. - */ - sc->mly_regs_rid = PCIR_BAR(0); /* first base address register */ - if ((sc->mly_regs_resource = bus_alloc_resource_any(sc->mly_dev, - SYS_RES_MEMORY, &sc->mly_regs_rid, RF_ACTIVE)) == NULL) { - mly_printf(sc, "can't allocate register window\n"); - goto fail; - } - - /* - * Allocate and connect our interrupt. - */ - sc->mly_irq_rid = 0; - if ((sc->mly_irq = bus_alloc_resource_any(sc->mly_dev, SYS_RES_IRQ, - &sc->mly_irq_rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { - mly_printf(sc, "can't allocate interrupt\n"); - goto fail; - } - if (bus_setup_intr(sc->mly_dev, sc->mly_irq, INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE, NULL, mly_intr, sc, &sc->mly_intr)) { - mly_printf(sc, "can't set up interrupt\n"); - goto fail; - } - - /* assume failure is 'out of memory' */ - error = ENOMEM; - - /* - * Allocate the parent bus DMA tag appropriate for our PCI interface. - * - * Note that all of these controllers are 64-bit capable. - */ - if (bus_dma_tag_create(bus_get_dma_tag(sc->mly_dev),/* PCI parent */ - 1, 0, /* alignment, boundary */ - BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ - BUS_SPACE_UNRESTRICTED, /* nsegments */ - BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ - BUS_DMA_ALLOCNOW, /* flags */ - NULL, /* lockfunc */ - NULL, /* lockarg */ - &sc->mly_parent_dmat)) { - mly_printf(sc, "can't allocate parent DMA tag\n"); - goto fail; - } - - /* - * Create DMA tag for mapping buffers into controller-addressable space. - */ - if (bus_dma_tag_create(sc->mly_parent_dmat, /* parent */ - 1, 0, /* alignment, boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - DFLTPHYS, /* maxsize */ - MLY_MAX_SGENTRIES, /* nsegments */ - BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ - 0, /* flags */ - busdma_lock_mutex, /* lockfunc */ - &sc->mly_lock, /* lockarg */ - &sc->mly_buffer_dmat)) { - mly_printf(sc, "can't allocate buffer DMA tag\n"); - goto fail; - } - - /* - * Initialise the DMA tag for command packets. - */ - if (bus_dma_tag_create(sc->mly_parent_dmat, /* parent */ - 1, 0, /* alignment, boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - sizeof(union mly_command_packet) * MLY_MAX_COMMANDS, 1, /* maxsize, nsegments */ - BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ - BUS_DMA_ALLOCNOW, /* flags */ - NULL, NULL, /* lockfunc, lockarg */ - &sc->mly_packet_dmat)) { - mly_printf(sc, "can't allocate command packet DMA tag\n"); - goto fail; - } - - /* - * Detect the hardware interface version - */ - for (i = 0; mly_identifiers[i].vendor != 0; i++) { - if ((mly_identifiers[i].vendor == pci_get_vendor(sc->mly_dev)) && - (mly_identifiers[i].device == pci_get_device(sc->mly_dev))) { - sc->mly_hwif = mly_identifiers[i].hwif; - switch(sc->mly_hwif) { - case MLY_HWIF_I960RX: - debug(1, "set hardware up for i960RX"); - sc->mly_doorbell_true = 0x00; - sc->mly_command_mailbox = MLY_I960RX_COMMAND_MAILBOX; - sc->mly_status_mailbox = MLY_I960RX_STATUS_MAILBOX; - sc->mly_idbr = MLY_I960RX_IDBR; - sc->mly_odbr = MLY_I960RX_ODBR; - sc->mly_error_status = MLY_I960RX_ERROR_STATUS; - sc->mly_interrupt_status = MLY_I960RX_INTERRUPT_STATUS; - sc->mly_interrupt_mask = MLY_I960RX_INTERRUPT_MASK; - break; - case MLY_HWIF_STRONGARM: - debug(1, "set hardware up for StrongARM"); - sc->mly_doorbell_true = 0xff; /* doorbell 'true' is 0 */ - sc->mly_command_mailbox = MLY_STRONGARM_COMMAND_MAILBOX; - sc->mly_status_mailbox = MLY_STRONGARM_STATUS_MAILBOX; - sc->mly_idbr = MLY_STRONGARM_IDBR; - sc->mly_odbr = MLY_STRONGARM_ODBR; - sc->mly_error_status = MLY_STRONGARM_ERROR_STATUS; - sc->mly_interrupt_status = MLY_STRONGARM_INTERRUPT_STATUS; - sc->mly_interrupt_mask = MLY_STRONGARM_INTERRUPT_MASK; - break; - } - break; - } - } - - /* - * Create the scatter/gather mappings. - */ - if ((error = mly_sg_map(sc))) - goto fail; - - /* - * Allocate and map the memory mailbox - */ - if ((error = mly_mmbox_map(sc))) - goto fail; - - error = 0; - -fail: - return(error); -} - -/******************************************************************************** - * Shut the controller down and detach all our resources. - */ -static int -mly_detach(device_t dev) -{ - int error; - - if ((error = mly_shutdown(dev)) != 0) - return(error); - - mly_free(device_get_softc(dev)); - return(0); -} - -/******************************************************************************** - * Bring the controller to a state where it can be safely left alone. - * - * Note that it should not be necessary to wait for any outstanding commands, - * as they should be completed prior to calling here. - * - * XXX this applies for I/O, but not status polls; we should beware of - * the case where a status command is running while we detach. - */ -static int -mly_shutdown(device_t dev) -{ - struct mly_softc *sc = device_get_softc(dev); - - debug_called(1); - - MLY_LOCK(sc); - if (sc->mly_state & MLY_STATE_OPEN) { - MLY_UNLOCK(sc); - return(EBUSY); - } - - /* kill the periodic event */ - callout_stop(&sc->mly_periodic); -#ifdef MLY_DEBUG - callout_stop(&sc->mly_timeout); -#endif - - /* flush controller */ - mly_printf(sc, "flushing cache..."); - printf("%s\n", mly_flush(sc) ? "failed" : "done"); - - MLY_MASK_INTERRUPTS(sc); - MLY_UNLOCK(sc); - - return(0); -} - -/******************************************************************************* - * Take an interrupt, or be poked by other code to look for interrupt-worthy - * status. - */ -static void -mly_intr(void *arg) -{ - struct mly_softc *sc = (struct mly_softc *)arg; - - debug_called(2); - - MLY_LOCK(sc); - mly_done(sc); - MLY_UNLOCK(sc); -}; - -/******************************************************************************** - ******************************************************************************** - Bus-dependant Resource Management - ******************************************************************************** - ********************************************************************************/ - -/******************************************************************************** - * Allocate memory for the scatter/gather tables - */ -static int -mly_sg_map(struct mly_softc *sc) -{ - size_t segsize; - - debug_called(1); - - /* - * Create a single tag describing a region large enough to hold all of - * the s/g lists we will need. - */ - segsize = sizeof(struct mly_sg_entry) * MLY_MAX_COMMANDS *MLY_MAX_SGENTRIES; - if (bus_dma_tag_create(sc->mly_parent_dmat, /* parent */ - 1, 0, /* alignment,boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - segsize, 1, /* maxsize, nsegments */ - BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ - BUS_DMA_ALLOCNOW, /* flags */ - NULL, NULL, /* lockfunc, lockarg */ - &sc->mly_sg_dmat)) { - mly_printf(sc, "can't allocate scatter/gather DMA tag\n"); - return(ENOMEM); - } - - /* - * Allocate enough s/g maps for all commands and permanently map them into - * controller-visible space. - * - * XXX this assumes we can get enough space for all the s/g maps in one - * contiguous slab. - */ - if (bus_dmamem_alloc(sc->mly_sg_dmat, (void **)&sc->mly_sg_table, - BUS_DMA_NOWAIT, &sc->mly_sg_dmamap)) { *** 4534 LINES SKIPPED *** From nobody Thu Nov 25 07:46:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 898E918A12CE; Thu, 25 Nov 2021 07:46: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 4J091p1t7Qz4sVD; Thu, 25 Nov 2021 07:46:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2075C1987A; Thu, 25 Nov 2021 07:46: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 1AP7ksJk049908; Thu, 25 Nov 2021 07:46:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP7ks5t049907; Thu, 25 Nov 2021 07:46:54 GMT (envelope-from git) Date: Thu, 25 Nov 2021 07:46:54 GMT Message-Id: <202111250746.1AP7ks5t049907@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: 399188a2c60c - main - iir: Remove List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 399188a2c60caffe496d03f8ddd6c1b1c34dc3ed Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637826414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XLlhUkKjPQl+8CxWKyzc0zm6lO9TuS1toZ/cUNFj/Ws=; b=Xba0Hda+OJBf4UmB1ANHeSKIPI01bcblydQYW63aLjjF1EToBttf5jkuNJHckYqlVSEhbf s3tRe3sEhYhyFCcYZxfLFn+eWf3D1TO4xWa1BjDHlK2WLWuJ8aPDE69PcHodce+OQ2G0KJ w1zIEyuE6jXvHxvBGKoyM/zXsmIMXxzpCllFuStElanDxiMJMb70QDdvehL+BEtjR9NWh1 dz2sdxdWWbFjV0KyD302b6gff3S8l34bDbzu4qO/6F29f4iIKLE5nZhr0KOcYxQOOe6ZnO cyzH0m3cAyxjWS1mircVMU3LahijJ1nSV/HlwgmUjrh8ZCPrtc982LOtq1wtcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637826414; a=rsa-sha256; cv=none; b=EdV8KTYvwTvzqcV5/JgxnhoqOH7rePzHgCdV0O163p+t8j5u/n3l1plV71KirWk00Mxe7v 72CBcjpxIEoz/LlKyBIKFUIS70DSbxR0vIJZ8b1U0PQIO85ail39Z4zt0GkrungRvOJwrp mDFb2+CkLKndDrYvO52Qqa4LUmYfVZJ1bBlkQL3gVHe10x3tKiNZN6VJDL6s8ASD39RDDe NkaN2AgOVhQQEZgc1tx+MmTzpF5hfF4OCt/C2wlRNPUcByIkxOUch3Baa5GWIZJBzW61H/ D075LxGwPsuXhEU9XF2lj69dbE+AS41e5lD3iRHqclE58bpdSi6HDKd0MkmVeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=399188a2c60caffe496d03f8ddd6c1b1c34dc3ed commit 399188a2c60caffe496d03f8ddd6c1b1c34dc3ed Author: Warner Losh AuthorDate: 2021-11-25 07:20:31 +0000 Commit: Warner Losh CommitDate: 2021-11-25 07:45:12 +0000 iir: Remove Belatedly remove iir(4). It was slated to go before 13, but was overlooked. Sponsored by: Netflix Relnotes: yes Reviewed by: scottl Differential Revision: https://reviews.freebsd.org/D33112 --- share/man/man4/Makefile | 1 - share/man/man4/iir.4 | 82 -- sys/amd64/conf/GENERIC | 1 - sys/conf/NOTES | 9 - sys/conf/files | 3 - sys/dev/iir/iir.c | 1914 ------------------------------- sys/dev/iir/iir.h | 754 ------------ sys/dev/iir/iir_ctrl.c | 312 ----- sys/dev/iir/iir_pci.c | 460 -------- sys/i386/conf/GENERIC | 1 - sys/modules/Makefile | 2 - sys/modules/iir/Makefile | 9 - tools/kerneldoc/subsys/Doxyfile-dev_iir | 21 - 13 files changed, 3569 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 6bb519b36e1e..3eac0d1b3a39 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -223,7 +223,6 @@ MAN= aac.4 \ iichid.4 \ iicmux.4 \ iicsmb.4 \ - iir.4 \ ${_igc.4} \ ${_imcsmb.4} \ inet.4 \ diff --git a/share/man/man4/iir.4 b/share/man/man4/iir.4 deleted file mode 100644 index fa742965eb90..000000000000 --- a/share/man/man4/iir.4 +++ /dev/null @@ -1,82 +0,0 @@ -.\" $FreeBSD$ -.\" Written by Tom Rhodes -.\" This file is in the public domain. -.\" -.Dd August 8, 2004 -.Dt IIR 4 -.Os -.Sh NAME -.Nm iir -.Nd Intel Integrated RAID controller and ICP Vortex driver -.Sh DEPRECATION NOTICE -The -.Nm -driver is not present in -.Fx 13.0 . -.Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device pci" -.Cd "device scbus" -.Cd "device iir" -.Ed -.Pp -Alternatively, to load the driver as a -module at boot time, place the following line in -.Xr loader.conf 5 : -.Bd -literal -offset indent -iir_load="YES" -.Ed -.Sh DESCRIPTION -The -.Nm -driver claims to interface with the Intel integrated -RAID controller cards, and all versions of the -ICP Vortex controllers (including FC). -.Sh HARDWARE -Controllers supported by the -.Nm -driver include: -.Pp -.Bl -bullet -compact -.It -Intel RAID Controller SRCMR -.It -Intel Server RAID Controller U3-l (SRCU31a) -.It -Intel Server RAID Controller U3-1L (SRCU31La) -.It -Intel Server RAID Controller U3-2 (SRCU32) -.It -All past and future releases of Intel and ICP RAID Controllers. -.El -.Pp -.Bl -bullet -compact -.It -Intel RAID Controller SRCU21 (discontinued) -.It -Intel RAID Controller SRCU31 (older revision, not compatible) -.It -Intel RAID Controller SRCU31L (older revision, not compatible) -.El -.Pp -The SRCU31 and SRCU31L can be updated via a firmware update available -from Intel. -.Sh SEE ALSO -.Xr cam 4 , -.Xr pass 4 , -.Xr xpt 4 , -.Xr camcontrol 8 -.Sh AUTHORS -The -.Nm -driver is supported and maintained by -.An -nosplit -.An Achim Leubner Aq Mt Achim_Leubner@adaptec.com . -.Pp -This manual page was written by -.An Tom Rhodes Aq Mt trhodes@FreeBSD.org -and is based on information supplied by the driver authors and the website of -.An Mike Smith Aq Mt msmith@FreeBSD.org . diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 7b3a5f91e936..afd386f5913e 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -183,7 +183,6 @@ device ses # Enclosure Services (SES and SAF-TE) device amr # AMI MegaRAID device arcmsr # Areca SATA II RAID device ciss # Compaq Smart RAID 5* -device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device twa # 3ware 9000 series PATA/SATA RAID device smartpqi # Microsemi smartpqi driver diff --git a/sys/conf/NOTES b/sys/conf/NOTES index d0749fe23b87..2221f8feb7dd 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1635,15 +1635,6 @@ options ISP_DEFAULT_ROLES=0 # device ciss -# -# Intel Integrated RAID controllers. -# This driver was developed and is maintained by Intel. Contacts -# at Intel for this driver are -# "Kannanthanam, Boji T" and -# "Leubner, Achim" . -# -device iir - # # Compaq Smart RAID, Mylex DAC960 and AMI MegaRAID controllers. Only # one entry is needed; the code will find and configure all supported diff --git a/sys/conf/files b/sys/conf/files index e65c318d1514..637aed6bfb9c 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1874,9 +1874,6 @@ dev/iicbus/syr827.c optional syr827 ext_resources fdt dev/iicbus/gpio/tca6408.c optional tca6408 fdt gpio dev/iicbus/gpio/tca6416.c optional tca6416 fdt dev/iicbus/pmic/fan53555.c optional fan53555 ext_resources fdt -dev/iir/iir.c optional iir -dev/iir/iir_ctrl.c optional iir -dev/iir/iir_pci.c optional iir pci dev/igc/if_igc.c optional igc iflib pci dev/igc/igc_api.c optional igc iflib pci dev/igc/igc_base.c optional igc iflib pci diff --git a/sys/dev/iir/iir.c b/sys/dev/iir/iir.c deleted file mode 100644 index 35ceef8d66a5..000000000000 --- a/sys/dev/iir/iir.c +++ /dev/null @@ -1,1914 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 2000-04 ICP vortex GmbH - * Copyright (c) 2002-04 Intel Corporation - * Copyright (c) 2003-04 Adaptec Inc. - * All Rights Reserved - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions, and the following disclaimer, - * without modification, immediately at the beginning of the file. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * 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. - */ - -/* - * iir.c: SCSI dependent code for the Intel Integrated RAID Controller driver - * - * Written by: Achim Leubner - * Fixes/Additions: Boji Tony Kannanthanam - * - * credits: Niklas Hallqvist; OpenBSD driver for the ICP Controllers. - * Mike Smith; Some driver source code. - * FreeBSD.ORG; Great O/S to work on and for. - * - * $Id: iir.c 1.5 2004/03/30 10:17:53 achim Exp $" - */ - -#include -__FBSDID("$FreeBSD$"); - -#define _IIR_C_ - -/* #include "opt_iir.h" */ -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -static MALLOC_DEFINE(M_GDTBUF, "iirbuf", "iir driver buffer"); - -#ifdef GDT_DEBUG -int gdt_debug = GDT_DEBUG; -#ifdef __SERIAL__ -#define MAX_SERBUF 160 -static void ser_init(void); -static void ser_puts(char *str); -static void ser_putc(int c); -static char strbuf[MAX_SERBUF+1]; -#ifdef __COM2__ -#define COM_BASE 0x2f8 -#else -#define COM_BASE 0x3f8 -#endif -static void ser_init() -{ - unsigned port=COM_BASE; - - outb(port+3, 0x80); - outb(port+1, 0); - /* 19200 Baud, if 9600: outb(12,port) */ - outb(port, 6); - outb(port+3, 3); - outb(port+1, 0); -} - -static void ser_puts(char *str) -{ - char *ptr; - - ser_init(); - for (ptr=str;*ptr;++ptr) - ser_putc((int)(*ptr)); -} - -static void ser_putc(int c) -{ - unsigned port=COM_BASE; - - while ((inb(port+5) & 0x20)==0); - outb(port, c); - if (c==0x0a) - { - while ((inb(port+5) & 0x20)==0); - outb(port, 0x0d); - } -} - -int ser_printf(const char *fmt, ...) -{ - va_list args; - int i; - - va_start(args,fmt); - i = vsprintf(strbuf,fmt,args); - ser_puts(strbuf); - va_end(args); - return i; -} -#endif -#endif - -/* controller cnt. */ -int gdt_cnt = 0; -/* event buffer */ -static gdt_evt_str ebuffer[GDT_MAX_EVENTS]; -static int elastidx, eoldidx; -static struct mtx elock; -MTX_SYSINIT(iir_elock, &elock, "iir events", MTX_DEF); -/* statistics */ -gdt_statist_t gdt_stat; - -/* Definitions for our use of the SIM private CCB area */ -#define ccb_sim_ptr spriv_ptr0 -#define ccb_priority spriv_field1 - -static void iir_action(struct cam_sim *sim, union ccb *ccb); -static int iir_intr_locked(struct gdt_softc *gdt); -static void iir_poll(struct cam_sim *sim); -static void iir_shutdown(void *arg, int howto); -static void iir_timeout(void *arg); - -static void gdt_eval_mapping(u_int32_t size, int *cyls, int *heads, - int *secs); -static int gdt_internal_cmd(struct gdt_softc *gdt, struct gdt_ccb *gccb, - u_int8_t service, u_int16_t opcode, - u_int32_t arg1, u_int32_t arg2, u_int32_t arg3); -static int gdt_wait(struct gdt_softc *gdt, struct gdt_ccb *ccb, - int timeout); - -static struct gdt_ccb *gdt_get_ccb(struct gdt_softc *gdt); - -static int gdt_sync_event(struct gdt_softc *gdt, int service, - u_int8_t index, struct gdt_ccb *gccb); -static int gdt_async_event(struct gdt_softc *gdt, int service); -static struct gdt_ccb *gdt_raw_cmd(struct gdt_softc *gdt, - union ccb *ccb); -static struct gdt_ccb *gdt_cache_cmd(struct gdt_softc *gdt, - union ccb *ccb); -static struct gdt_ccb *gdt_ioctl_cmd(struct gdt_softc *gdt, - gdt_ucmd_t *ucmd); -static void gdt_internal_cache_cmd(struct gdt_softc *gdt, union ccb *ccb); - -static void gdtmapmem(void *arg, bus_dma_segment_t *dm_segs, - int nseg, int error); -static void gdtexecuteccb(void *arg, bus_dma_segment_t *dm_segs, - int nseg, int error); - -int -iir_init(struct gdt_softc *gdt) -{ - u_int16_t cdev_cnt; - int i, id, drv_cyls, drv_hds, drv_secs; - struct gdt_ccb *gccb; - - GDT_DPRINTF(GDT_D_DEBUG, ("iir_init()\n")); - - gdt->sc_state = GDT_POLLING; - gdt_clear_events(); - bzero(&gdt_stat, sizeof(gdt_statist_t)); - - SLIST_INIT(&gdt->sc_free_gccb); - SLIST_INIT(&gdt->sc_pending_gccb); - TAILQ_INIT(&gdt->sc_ccb_queue); - TAILQ_INIT(&gdt->sc_ucmd_queue); - - /* DMA tag for mapping buffers into device visible space. */ - if (bus_dma_tag_create(gdt->sc_parent_dmat, /*alignment*/1, /*boundary*/0, - /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, - /*highaddr*/BUS_SPACE_MAXADDR, - /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/DFLTPHYS, - /*nsegments*/GDT_MAXSG, - /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, - /*flags*/BUS_DMA_ALLOCNOW, - /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&gdt->sc_lock, - &gdt->sc_buffer_dmat) != 0) { - device_printf(gdt->sc_devnode, - "bus_dma_tag_create(..., gdt->sc_buffer_dmat) failed\n"); - return (1); - } - gdt->sc_init_level++; - - /* DMA tag for our ccb structures */ - if (bus_dma_tag_create(gdt->sc_parent_dmat, - /*alignment*/1, - /*boundary*/0, - /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, - /*highaddr*/BUS_SPACE_MAXADDR, - /*filter*/NULL, - /*filterarg*/NULL, - GDT_MAXCMDS * GDT_SCRATCH_SZ, /* maxsize */ - /*nsegments*/1, - /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, - /*flags*/0, /*lockfunc*/busdma_lock_mutex, - /*lockarg*/&gdt->sc_lock, - &gdt->sc_gcscratch_dmat) != 0) { - device_printf(gdt->sc_devnode, - "bus_dma_tag_create(...,gdt->sc_gcscratch_dmat) failed\n"); - return (1); - } - gdt->sc_init_level++; - - /* Allocation for our ccb scratch area */ - if (bus_dmamem_alloc(gdt->sc_gcscratch_dmat, (void **)&gdt->sc_gcscratch, - BUS_DMA_NOWAIT, &gdt->sc_gcscratch_dmamap) != 0) { - device_printf(gdt->sc_devnode, - "bus_dmamem_alloc(...,&gdt->sc_gccbs,...) failed\n"); - return (1); - } - gdt->sc_init_level++; - - /* And permanently map them */ - bus_dmamap_load(gdt->sc_gcscratch_dmat, gdt->sc_gcscratch_dmamap, - gdt->sc_gcscratch, GDT_MAXCMDS * GDT_SCRATCH_SZ, - gdtmapmem, &gdt->sc_gcscratch_busbase, /*flags*/0); - gdt->sc_init_level++; - - /* Clear them out. */ - bzero(gdt->sc_gcscratch, GDT_MAXCMDS * GDT_SCRATCH_SZ); - - /* Initialize the ccbs */ - gdt->sc_gccbs = malloc(sizeof(struct gdt_ccb) * GDT_MAXCMDS, M_GDTBUF, - M_NOWAIT | M_ZERO); - if (gdt->sc_gccbs == NULL) { - device_printf(gdt->sc_devnode, "no memory for gccbs.\n"); - return (1); - } - for (i = GDT_MAXCMDS-1; i >= 0; i--) { - gccb = &gdt->sc_gccbs[i]; - gccb->gc_cmd_index = i + 2; - gccb->gc_flags = GDT_GCF_UNUSED; - gccb->gc_map_flag = FALSE; - if (bus_dmamap_create(gdt->sc_buffer_dmat, /*flags*/0, - &gccb->gc_dmamap) != 0) - return(1); - gccb->gc_map_flag = TRUE; - gccb->gc_scratch = &gdt->sc_gcscratch[GDT_SCRATCH_SZ * i]; - gccb->gc_scratch_busbase = gdt->sc_gcscratch_busbase + GDT_SCRATCH_SZ * i; - callout_init_mtx(&gccb->gc_timeout, &gdt->sc_lock, 0); - SLIST_INSERT_HEAD(&gdt->sc_free_gccb, gccb, sle); - } - gdt->sc_init_level++; - - /* create the control device */ - gdt->sc_dev = gdt_make_dev(gdt); - - /* allocate ccb for gdt_internal_cmd() */ - mtx_lock(&gdt->sc_lock); - gccb = gdt_get_ccb(gdt); - if (gccb == NULL) { - mtx_unlock(&gdt->sc_lock); - device_printf(gdt->sc_devnode, "No free command index found\n"); - return (1); - } - bzero(gccb->gc_cmd, GDT_CMD_SZ); - - if (!gdt_internal_cmd(gdt, gccb, GDT_SCREENSERVICE, GDT_INIT, - 0, 0, 0)) { - device_printf(gdt->sc_devnode, - "Screen service initialization error %d\n", gdt->sc_status); - gdt_free_ccb(gdt, gccb); - mtx_unlock(&gdt->sc_lock); - return (1); - } - - gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_UNFREEZE_IO, - 0, 0, 0); - - if (!gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_INIT, - GDT_LINUX_OS, 0, 0)) { - device_printf(gdt->sc_devnode, "Cache service initialization error %d\n", - gdt->sc_status); - gdt_free_ccb(gdt, gccb); - mtx_unlock(&gdt->sc_lock); - return (1); - } - cdev_cnt = (u_int16_t)gdt->sc_info; - gdt->sc_fw_vers = gdt->sc_service; - - /* Detect number of buses */ - gdt_enc32(gccb->gc_scratch + GDT_IOC_VERSION, GDT_IOC_NEWEST); - gccb->gc_scratch[GDT_IOC_LIST_ENTRIES] = GDT_MAXBUS; - gccb->gc_scratch[GDT_IOC_FIRST_CHAN] = 0; - gccb->gc_scratch[GDT_IOC_LAST_CHAN] = GDT_MAXBUS - 1; - gdt_enc32(gccb->gc_scratch + GDT_IOC_LIST_OFFSET, GDT_IOC_HDR_SZ); - if (gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_IOCTL, - GDT_IOCHAN_RAW_DESC, GDT_INVALID_CHANNEL, - GDT_IOC_HDR_SZ + GDT_MAXBUS * GDT_RAWIOC_SZ)) { - gdt->sc_bus_cnt = gccb->gc_scratch[GDT_IOC_CHAN_COUNT]; - for (i = 0; i < gdt->sc_bus_cnt; i++) { - id = gccb->gc_scratch[GDT_IOC_HDR_SZ + - i * GDT_RAWIOC_SZ + GDT_RAWIOC_PROC_ID]; - gdt->sc_bus_id[i] = id < GDT_MAXID_FC ? id : 0xff; - } - } else { - /* New method failed, use fallback. */ - for (i = 0; i < GDT_MAXBUS; i++) { - gdt_enc32(gccb->gc_scratch + GDT_GETCH_CHANNEL_NO, i); - if (!gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_IOCTL, - GDT_SCSI_CHAN_CNT | GDT_L_CTRL_PATTERN, - GDT_IO_CHANNEL | GDT_INVALID_CHANNEL, - GDT_GETCH_SZ)) { - if (i == 0) { - device_printf(gdt->sc_devnode, "Cannot get channel count, " - "error %d\n", gdt->sc_status); - gdt_free_ccb(gdt, gccb); - mtx_unlock(&gdt->sc_lock); - return (1); - } - break; - } - gdt->sc_bus_id[i] = - (gccb->gc_scratch[GDT_GETCH_SIOP_ID] < GDT_MAXID_FC) ? - gccb->gc_scratch[GDT_GETCH_SIOP_ID] : 0xff; - } - gdt->sc_bus_cnt = i; - } - /* add one "virtual" channel for the host drives */ - gdt->sc_virt_bus = gdt->sc_bus_cnt; - gdt->sc_bus_cnt++; - - if (!gdt_internal_cmd(gdt, gccb, GDT_SCSIRAWSERVICE, GDT_INIT, - 0, 0, 0)) { - device_printf(gdt->sc_devnode, - "Raw service initialization error %d\n", gdt->sc_status); - gdt_free_ccb(gdt, gccb); - mtx_unlock(&gdt->sc_lock); - return (1); - } - - /* Set/get features raw service (scatter/gather) */ - gdt->sc_raw_feat = 0; - if (gdt_internal_cmd(gdt, gccb, GDT_SCSIRAWSERVICE, GDT_SET_FEAT, - GDT_SCATTER_GATHER, 0, 0)) { - if (gdt_internal_cmd(gdt, gccb, GDT_SCSIRAWSERVICE, GDT_GET_FEAT, - 0, 0, 0)) { - gdt->sc_raw_feat = gdt->sc_info; - if (!(gdt->sc_info & GDT_SCATTER_GATHER)) { - panic("%s: Scatter/Gather Raw Service " - "required but not supported!\n", - device_get_nameunit(gdt->sc_devnode)); - gdt_free_ccb(gdt, gccb); - mtx_unlock(&gdt->sc_lock); - return (1); - } - } - } - - /* Set/get features cache service (scatter/gather) */ - gdt->sc_cache_feat = 0; - if (gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_SET_FEAT, - 0, GDT_SCATTER_GATHER, 0)) { - if (gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_GET_FEAT, - 0, 0, 0)) { - gdt->sc_cache_feat = gdt->sc_info; - if (!(gdt->sc_info & GDT_SCATTER_GATHER)) { - panic("%s: Scatter/Gather Cache Service " - "required but not supported!\n", - device_get_nameunit(gdt->sc_devnode)); - gdt_free_ccb(gdt, gccb); - mtx_unlock(&gdt->sc_lock); - return (1); - } - } - } - - /* OEM */ - gdt_enc32(gccb->gc_scratch + GDT_OEM_VERSION, 0x01); - gdt_enc32(gccb->gc_scratch + GDT_OEM_BUFSIZE, sizeof(gdt_oem_record_t)); - if (gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_IOCTL, - GDT_OEM_STR_RECORD, GDT_INVALID_CHANNEL, - sizeof(gdt_oem_str_record_t))) { - strncpy(gdt->oem_name, ((gdt_oem_str_record_t *) - gccb->gc_scratch)->text.scsi_host_drive_inquiry_vendor_id, 7); - gdt->oem_name[7]='\0'; - } else { - /* Old method, based on PCI ID */ - if (gdt->sc_vendor == INTEL_VENDOR_ID_IIR) - strcpy(gdt->oem_name,"Intel "); - else - strcpy(gdt->oem_name,"ICP "); - } - - /* Scan for cache devices */ - for (i = 0; i < cdev_cnt && i < GDT_MAX_HDRIVES; i++) { - if (gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_INFO, - i, 0, 0)) { - gdt->sc_hdr[i].hd_present = 1; - gdt->sc_hdr[i].hd_size = gdt->sc_info; - - /* - * Evaluate mapping (sectors per head, heads per cyl) - */ - gdt->sc_hdr[i].hd_size &= ~GDT_SECS32; - if (gdt->sc_info2 == 0) - gdt_eval_mapping(gdt->sc_hdr[i].hd_size, - &drv_cyls, &drv_hds, &drv_secs); - else { - drv_hds = gdt->sc_info2 & 0xff; - drv_secs = (gdt->sc_info2 >> 8) & 0xff; - drv_cyls = gdt->sc_hdr[i].hd_size / drv_hds / - drv_secs; - } - gdt->sc_hdr[i].hd_heads = drv_hds; - gdt->sc_hdr[i].hd_secs = drv_secs; - /* Round the size */ - gdt->sc_hdr[i].hd_size = drv_cyls * drv_hds * drv_secs; - - if (gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, - GDT_DEVTYPE, i, 0, 0)) - gdt->sc_hdr[i].hd_devtype = gdt->sc_info; - } - } - - GDT_DPRINTF(GDT_D_INIT, ("dpmem %x %d-bus %d cache device%s\n", - gdt->sc_dpmembase, - gdt->sc_bus_cnt, cdev_cnt, - cdev_cnt == 1 ? "" : "s")); - gdt_free_ccb(gdt, gccb); - mtx_unlock(&gdt->sc_lock); - - atomic_add_int(&gdt_cnt, 1); - return (0); -} - -void -iir_free(struct gdt_softc *gdt) -{ - int i; - - GDT_DPRINTF(GDT_D_INIT, ("iir_free()\n")); - - switch (gdt->sc_init_level) { - default: - gdt_destroy_dev(gdt->sc_dev); - case 5: - for (i = GDT_MAXCMDS-1; i >= 0; i--) - if (gdt->sc_gccbs[i].gc_map_flag) { - callout_drain(&gdt->sc_gccbs[i].gc_timeout); - bus_dmamap_destroy(gdt->sc_buffer_dmat, - gdt->sc_gccbs[i].gc_dmamap); - } - bus_dmamap_unload(gdt->sc_gcscratch_dmat, gdt->sc_gcscratch_dmamap); - free(gdt->sc_gccbs, M_GDTBUF); - case 4: - bus_dmamem_free(gdt->sc_gcscratch_dmat, gdt->sc_gcscratch, gdt->sc_gcscratch_dmamap); - case 3: - bus_dma_tag_destroy(gdt->sc_gcscratch_dmat); - case 2: - bus_dma_tag_destroy(gdt->sc_buffer_dmat); - case 1: - bus_dma_tag_destroy(gdt->sc_parent_dmat); - case 0: - break; - } -} - -void -iir_attach(struct gdt_softc *gdt) -{ - struct cam_devq *devq; - int i; - - GDT_DPRINTF(GDT_D_INIT, ("iir_attach()\n")); - - /* - * Create the device queue for our SIM. - * XXX Throttle this down since the card has problems under load. - */ - devq = cam_simq_alloc(32); - if (devq == NULL) - return; - - for (i = 0; i < gdt->sc_bus_cnt; i++) { - /* - * Construct our SIM entry - */ - gdt->sims[i] = cam_sim_alloc(iir_action, iir_poll, "iir", - gdt, device_get_unit(gdt->sc_devnode), &gdt->sc_lock, - /*untagged*/1, /*tagged*/GDT_MAXCMDS, devq); - mtx_lock(&gdt->sc_lock); - if (xpt_bus_register(gdt->sims[i], gdt->sc_devnode, i) != CAM_SUCCESS) { - cam_sim_free(gdt->sims[i], /*free_devq*/i == 0); - mtx_unlock(&gdt->sc_lock); - break; - } - - if (xpt_create_path(&gdt->paths[i], /*periph*/NULL, - cam_sim_path(gdt->sims[i]), - CAM_TARGET_WILDCARD, - CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - xpt_bus_deregister(cam_sim_path(gdt->sims[i])); - cam_sim_free(gdt->sims[i], /*free_devq*/i == 0); - mtx_unlock(&gdt->sc_lock); - break; - } - mtx_unlock(&gdt->sc_lock); - } - if (i > 0) - EVENTHANDLER_REGISTER(shutdown_final, iir_shutdown, - gdt, SHUTDOWN_PRI_DEFAULT); - /* iir_watchdog(gdt); */ - gdt->sc_state = GDT_NORMAL; -} - -static void -gdt_eval_mapping(u_int32_t size, int *cyls, int *heads, int *secs) -{ - *cyls = size / GDT_HEADS / GDT_SECS; - if (*cyls < GDT_MAXCYLS) { - *heads = GDT_HEADS; - *secs = GDT_SECS; - } else { - /* Too high for 64 * 32 */ - *cyls = size / GDT_MEDHEADS / GDT_MEDSECS; - if (*cyls < GDT_MAXCYLS) { - *heads = GDT_MEDHEADS; - *secs = GDT_MEDSECS; - } else { - /* Too high for 127 * 63 */ - *cyls = size / GDT_BIGHEADS / GDT_BIGSECS; - *heads = GDT_BIGHEADS; - *secs = GDT_BIGSECS; - } - } -} - -static int -gdt_wait(struct gdt_softc *gdt, struct gdt_ccb *gccb, - int timeout) -{ - int rv = 0; - - GDT_DPRINTF(GDT_D_INIT, - ("gdt_wait(%p, %p, %d)\n", gdt, gccb, timeout)); - - gdt->sc_state |= GDT_POLL_WAIT; - do { - if (iir_intr_locked(gdt) == gccb->gc_cmd_index) { - rv = 1; - break; - } - DELAY(1); - } while (--timeout); - gdt->sc_state &= ~GDT_POLL_WAIT; - - while (gdt->sc_test_busy(gdt)) - DELAY(1); /* XXX correct? */ - - return (rv); -} - -static int -gdt_internal_cmd(struct gdt_softc *gdt, struct gdt_ccb *gccb, - u_int8_t service, u_int16_t opcode, - u_int32_t arg1, u_int32_t arg2, u_int32_t arg3) -{ - int retries; - - GDT_DPRINTF(GDT_D_CMD, ("gdt_internal_cmd(%p, %d, %d, %d, %d, %d)\n", - gdt, service, opcode, arg1, arg2, arg3)); - - bzero(gccb->gc_cmd, GDT_CMD_SZ); - - for (retries = GDT_RETRIES; ; ) { - gccb->gc_service = service; - gccb->gc_flags = GDT_GCF_INTERNAL; - - gdt_enc32(gccb->gc_cmd + GDT_CMD_COMMANDINDEX, - gccb->gc_cmd_index); - gdt_enc16(gccb->gc_cmd + GDT_CMD_OPCODE, opcode); - - switch (service) { - case GDT_CACHESERVICE: - if (opcode == GDT_IOCTL) { - gdt_enc32(gccb->gc_cmd + GDT_CMD_UNION + - GDT_IOCTL_SUBFUNC, arg1); - gdt_enc32(gccb->gc_cmd + GDT_CMD_UNION + - GDT_IOCTL_CHANNEL, arg2); - gdt_enc16(gccb->gc_cmd + GDT_CMD_UNION + - GDT_IOCTL_PARAM_SIZE, (u_int16_t)arg3); - gdt_enc32(gccb->gc_cmd + GDT_CMD_UNION + GDT_IOCTL_P_PARAM, - gccb->gc_scratch_busbase); - } else { - gdt_enc16(gccb->gc_cmd + GDT_CMD_UNION + - GDT_CACHE_DEVICENO, (u_int16_t)arg1); - gdt_enc32(gccb->gc_cmd + GDT_CMD_UNION + - GDT_CACHE_BLOCKNO, arg2); - } - break; - - case GDT_SCSIRAWSERVICE: - gdt_enc32(gccb->gc_cmd + GDT_CMD_UNION + - GDT_RAW_DIRECTION, arg1); - gccb->gc_cmd[GDT_CMD_UNION + GDT_RAW_BUS] = - (u_int8_t)arg2; - gccb->gc_cmd[GDT_CMD_UNION + GDT_RAW_TARGET] = - (u_int8_t)arg3; - gccb->gc_cmd[GDT_CMD_UNION + GDT_RAW_LUN] = - (u_int8_t)(arg3 >> 8); - } - - gdt->sc_set_sema0(gdt); - gccb->gc_cmd_len = GDT_CMD_SZ; - gdt->sc_cmd_off = 0; - gdt->sc_cmd_cnt = 0; - gdt->sc_copy_cmd(gdt, gccb); - gdt->sc_release_event(gdt); - DELAY(20); - if (!gdt_wait(gdt, gccb, GDT_POLL_TIMEOUT)) - return (0); - if (gdt->sc_status != GDT_S_BSY || --retries == 0) - break; - DELAY(1); - } - return (gdt->sc_status == GDT_S_OK); -} - -static struct gdt_ccb * -gdt_get_ccb(struct gdt_softc *gdt) -{ - struct gdt_ccb *gccb; - - GDT_DPRINTF(GDT_D_QUEUE, ("gdt_get_ccb(%p)\n", gdt)); - - mtx_assert(&gdt->sc_lock, MA_OWNED); - gccb = SLIST_FIRST(&gdt->sc_free_gccb); - if (gccb != NULL) { - SLIST_REMOVE_HEAD(&gdt->sc_free_gccb, sle); - SLIST_INSERT_HEAD(&gdt->sc_pending_gccb, gccb, sle); - ++gdt_stat.cmd_index_act; - if (gdt_stat.cmd_index_act > gdt_stat.cmd_index_max) - gdt_stat.cmd_index_max = gdt_stat.cmd_index_act; - } - return (gccb); -} - -void -gdt_free_ccb(struct gdt_softc *gdt, struct gdt_ccb *gccb) -{ - - GDT_DPRINTF(GDT_D_QUEUE, ("gdt_free_ccb(%p, %p)\n", gdt, gccb)); - - mtx_assert(&gdt->sc_lock, MA_OWNED); - gccb->gc_flags = GDT_GCF_UNUSED; - SLIST_REMOVE(&gdt->sc_pending_gccb, gccb, gdt_ccb, sle); - SLIST_INSERT_HEAD(&gdt->sc_free_gccb, gccb, sle); - --gdt_stat.cmd_index_act; - if (gdt->sc_state & GDT_SHUTDOWN) - wakeup(gccb); -} - -void -gdt_next(struct gdt_softc *gdt) -{ - union ccb *ccb; - gdt_ucmd_t *ucmd; - struct cam_sim *sim; - int bus, target, lun; - int next_cmd; - - struct ccb_scsiio *csio; - struct ccb_hdr *ccbh; - struct gdt_ccb *gccb = NULL; - u_int8_t cmd; - - GDT_DPRINTF(GDT_D_QUEUE, ("gdt_next(%p)\n", gdt)); - - mtx_assert(&gdt->sc_lock, MA_OWNED); - if (gdt->sc_test_busy(gdt)) { - if (!(gdt->sc_state & GDT_POLLING)) { - return; - } - while (gdt->sc_test_busy(gdt)) - DELAY(1); - } - - gdt->sc_cmd_cnt = gdt->sc_cmd_off = 0; - next_cmd = TRUE; - for (;;) { - /* I/Os in queue? controller ready? */ - if (!TAILQ_FIRST(&gdt->sc_ucmd_queue) && - !TAILQ_FIRST(&gdt->sc_ccb_queue)) - break; - - /* 1.: I/Os without ccb (IOCTLs) */ - ucmd = TAILQ_FIRST(&gdt->sc_ucmd_queue); - if (ucmd != NULL) { - TAILQ_REMOVE(&gdt->sc_ucmd_queue, ucmd, links); - if ((gccb = gdt_ioctl_cmd(gdt, ucmd)) == NULL) { - TAILQ_INSERT_HEAD(&gdt->sc_ucmd_queue, ucmd, links); - break; - } - break; - /* wenn mehrere Kdos. zulassen: if (!gdt_polling) continue; */ - } - - /* 2.: I/Os with ccb */ - ccb = (union ccb *)TAILQ_FIRST(&gdt->sc_ccb_queue); - /* ist dann immer != NULL, da oben getestet */ - sim = (struct cam_sim *)ccb->ccb_h.ccb_sim_ptr; - bus = cam_sim_bus(sim); - target = ccb->ccb_h.target_id; - lun = ccb->ccb_h.target_lun; - - TAILQ_REMOVE(&gdt->sc_ccb_queue, &ccb->ccb_h, sim_links.tqe); - --gdt_stat.req_queue_act; - /* ccb->ccb_h.func_code is XPT_SCSI_IO */ - GDT_DPRINTF(GDT_D_QUEUE, ("XPT_SCSI_IO flags 0x%x)\n", - ccb->ccb_h.flags)); - csio = &ccb->csio; - ccbh = &ccb->ccb_h; - cmd = scsiio_cdb_ptr(csio)[0]; - /* Max CDB length is 12 bytes, can't be phys addr */ - if (csio->cdb_len > 12 || (ccbh->flags & CAM_CDB_PHYS)) { - ccbh->status = CAM_REQ_INVALID; - --gdt_stat.io_count_act; - xpt_done(ccb); - } else if (bus != gdt->sc_virt_bus) { - /* raw service command */ - if ((gccb = gdt_raw_cmd(gdt, ccb)) == NULL) { - TAILQ_INSERT_HEAD(&gdt->sc_ccb_queue, &ccb->ccb_h, - sim_links.tqe); - ++gdt_stat.req_queue_act; - if (gdt_stat.req_queue_act > gdt_stat.req_queue_max) - gdt_stat.req_queue_max = gdt_stat.req_queue_act; - next_cmd = FALSE; - } - } else if (target >= GDT_MAX_HDRIVES || - !gdt->sc_hdr[target].hd_present || lun != 0) { - ccbh->status = CAM_DEV_NOT_THERE; - --gdt_stat.io_count_act; - xpt_done(ccb); - } else { - /* cache service command */ - if (cmd == READ_6 || cmd == WRITE_6 || - cmd == READ_10 || cmd == WRITE_10) { - if ((gccb = gdt_cache_cmd(gdt, ccb)) == NULL) { - TAILQ_INSERT_HEAD(&gdt->sc_ccb_queue, &ccb->ccb_h, - sim_links.tqe); - ++gdt_stat.req_queue_act; - if (gdt_stat.req_queue_act > gdt_stat.req_queue_max) - gdt_stat.req_queue_max = gdt_stat.req_queue_act; - next_cmd = FALSE; - } - } else { - gdt_internal_cache_cmd(gdt, ccb); - } - } - if ((gdt->sc_state & GDT_POLLING) || !next_cmd) - break; - } - if (gdt->sc_cmd_cnt > 0) - gdt->sc_release_event(gdt); - - if ((gdt->sc_state & GDT_POLLING) && gdt->sc_cmd_cnt > 0) { - gdt_wait(gdt, gccb, GDT_POLL_TIMEOUT); - } -} - -static struct gdt_ccb * -gdt_raw_cmd(struct gdt_softc *gdt, union ccb *ccb) -{ - struct gdt_ccb *gccb; *** 2732 LINES SKIPPED *** From nobody Thu Nov 25 07:46:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6CC6318A12D3; Thu, 25 Nov 2021 07:46: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 4J091r0JzLz4sQ2; Thu, 25 Nov 2021 07:46:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DB9F19C12; Thu, 25 Nov 2021 07:46: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 1AP7kt1U049932; Thu, 25 Nov 2021 07:46:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP7ktYY049931; Thu, 25 Nov 2021 07:46:55 GMT (envelope-from git) Date: Thu, 25 Nov 2021 07:46:55 GMT Message-Id: <202111250746.1AP7ktYY049931@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: 60de2867c9fc - main - amr: remove List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 60de2867c9fccac5ee3782fcc64fea6f0ae3ef06 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637826416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=umjDTsjF+sgkzTUbmHfyWYPRZNytChRwl2/gyYXcI3c=; b=KJ1un61/6Ilu9kqp3ooTATOyYExEKipHw2UVmK06ApZEQh9vNgexcgj5kwu2dMMcmtBODC p8VhOSRrhEdxe+6IdS3ntYzx1b/uTNTezAwfpTEaudL55Xj1wl3jEobYYstR8aTFJXNlhW KVIjzjug+6I5ObRDUh96W9rPFH3HL4UNeixhPgPaLe7g/JONALal9CBJ1k1fGIUmBsuNis 99yFRZLV7mog7fKL/lK8VaHpb6EqjlnTSB0Y+KdeSQAoQgS2cdA4REWKXYSr8uuj6I3q6C +4pq+1YzeIWFsQXPJmAjN+fvtyLbE/xd/jvluByjN96prtPOwDZKWRiS5lZO4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637826416; a=rsa-sha256; cv=none; b=xzm4v2IZCKojMU8RrZ4dA3nW7gJae3wgrgjIBDyGovpVFSVKNxBXR2fSgpzvdksIqd8gWS 6KJWHoPt8lvzHg5qeFczS0m/lMvtc1trZ/I4ZqhhfeB4/cSmm9ZtjkbqFmb9g9AGcGVsXK xfk1XlVg3FvMMwbfau3awmCMoANMeoH2mdnQ+wCgtkc6AKCqqtC5Q9Ncq+K2mr54rSHi3u pTnEwNlfFqG0qVrxqD+TyaCcJu+Jw7MJaDxjHZPU0vYXzgMat3dPiuYeafwnZ/QlTDCqcB 3jT782qX/7RO9xyXUBftEiWRTXdJgbfNodROEjixpl0NBQbvYffrANXG2nLmdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=60de2867c9fccac5ee3782fcc64fea6f0ae3ef06 commit 60de2867c9fccac5ee3782fcc64fea6f0ae3ef06 Author: Warner Losh AuthorDate: 2021-11-25 07:20:51 +0000 Commit: Warner Losh CommitDate: 2021-11-25 07:45:12 +0000 amr: remove Belatedly remove amr(4). It was slated to depart before 13.0 but was overlooked until now. Sponsored by: Netflix Relnotes: yes Reviewed by: scottl Differential Revision: https://reviews.freebsd.org/D33113 --- share/man/man4/amr.4 | 246 ---- sys/amd64/conf/GENERIC | 1 - sys/conf/NOTES | 2 - sys/conf/files | 4 - sys/dev/amr/amr.c | 2446 ------------------------------- sys/dev/amr/amr_cam.c | 627 -------- sys/dev/amr/amr_disk.c | 267 ---- sys/dev/amr/amr_linux.c | 87 -- sys/dev/amr/amr_pci.c | 705 --------- sys/dev/amr/amr_tables.h | 141 -- sys/dev/amr/amrio.h | 124 -- sys/dev/amr/amrreg.h | 657 --------- sys/dev/amr/amrvar.h | 384 ----- sys/i386/conf/GENERIC | 1 - sys/modules/Makefile | 1 - sys/modules/amr/Makefile | 21 - sys/modules/amr/amr_cam/Makefile | 9 - sys/modules/amr/amr_linux/Makefile | 8 - tools/kerneldoc/subsys/Doxyfile-dev_amr | 21 - 19 files changed, 5752 deletions(-) diff --git a/share/man/man4/amr.4 b/share/man/man4/amr.4 deleted file mode 100644 index 8ef14dfd1d9b..000000000000 --- a/share/man/man4/amr.4 +++ /dev/null @@ -1,246 +0,0 @@ -.\" -.\" Copyright (c) 2000 Jeroen Ruigrok van der Werven -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission -.\" -.\" 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. -.\" -.\" $FreeBSD$ -.\" -.Dd March 29, 2006 -.Dt AMR 4 -.Os -.Sh NAME -.Nm amr -.Nd MegaRAID SCSI/ATA/SATA RAID driver -.Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device pci" -.Cd "device scbus" -.Cd "device amr" -.Ed -.Pp -Alternatively, to load the driver as a -module at boot time, place the following line in -.Xr loader.conf 5 : -.Bd -literal -offset indent -amr_load="YES" -.Ed -.Sh DEPRECATION NOTICE -The -.Nm -driver is not present in -.Fx 13.0 . -.Sh DESCRIPTION -The -.Nm -driver provides support for LSI Logic MegaRAID SCSI, ATA and SATA -RAID controllers and legacy American Megatrends MegaRAID -SCSI RAID controllers, including models relabeled -and sold by Dell and Hewlett-Packard. -.Pp -LSI MegaRAID SAS controllers are supported by -.Xr mfi 4 -and will not work with this driver. -.Sh HARDWARE -Controllers supported by the -.Nm -driver include: -.Pp -.Bl -bullet -compact -.It -MegaRAID SATA 150-4 -.It -MegaRAID SATA 150-6 -.It -MegaRAID SATA 300-4X -.It -MegaRAID SATA 300-8X -.It -MegaRAID SCSI 320-1E -.It -MegaRAID SCSI 320-2E -.It -MegaRAID SCSI 320-4E -.It -MegaRAID SCSI 320-0X -.It -MegaRAID SCSI 320-2X -.It -MegaRAID SCSI 320-4X -.It -MegaRAID SCSI 320-0 -.It -MegaRAID SCSI 320-1 -.It -MegaRAID SCSI 320-2 -.It -MegaRAID SCSI 320-4 -.It -MegaRAID Series 418 -.It -MegaRAID i4 133 RAID -.It -MegaRAID Elite 1500 (Series 467) -.It -MegaRAID Elite 1600 (Series 493) -.It -MegaRAID Elite 1650 (Series 4xx) -.It -MegaRAID Enterprise 1200 (Series 428) -.It -MegaRAID Enterprise 1300 (Series 434) -.It -MegaRAID Enterprise 1400 (Series 438) -.It -MegaRAID Enterprise 1500 (Series 467) -.It -MegaRAID Enterprise 1600 (Series 471) -.It -MegaRAID Express 100 (Series 466WS) -.It -MegaRAID Express 200 (Series 466) -.It -MegaRAID Express 300 (Series 490) -.It -MegaRAID Express 500 (Series 475) -.It -Dell PERC -.It -Dell PERC 2/SC -.It -Dell PERC 2/DC -.It -Dell PERC 3/DCL -.It -Dell PERC 3/QC -.It -Dell PERC 4/DC -.It -Dell PERC 4/IM -.It -Dell PERC 4/SC -.It -Dell PERC 4/Di -.It -Dell PERC 4e/DC -.It -Dell PERC 4e/Di -.It -Dell PERC 4e/Si -.It -Dell PERC 4ei -.It -HP NetRAID-1/Si -.It -HP NetRAID-3/Si (D4943A) -.It -HP Embedded NetRAID -.It -Intel RAID Controller SRCS16 -.It -Intel RAID Controller SRCU42X -.El -.Sh DIAGNOSTICS -.Ss Driver initialisation/shutdown phase -.Bl -diag -.It amr%d: memory window not available -.It amr%d: I/O window not available -.Pp -The PCI BIOS did not allocate resources necessary for the correct operation of -the controller. -The driver cannot attach to this controller. -.It amr%d: busmaster bit not set, enabling -.Pp -The PCI BIOS did not enable busmaster DMA, -which is required for the correct operation of the controller. -The driver has enabled this bit and initialisation will proceed. -.It amr%d: can't allocate register window -.It amr%d: can't allocate interrupt -.It amr%d: can't set up interrupt -.It amr%d: can't allocate parent DMA tag -.It amr%d: can't allocate buffer DMA tag -.It amr%d: can't allocate scatter/gather DMA tag -.It amr%d: can't allocate s/g table -.It amr%d: can't allocate mailbox tag -.It amr%d: can't allocate mailbox memory -.Pp -A resource allocation error occurred while initialising the driver; -initialisation has failed and the driver will not attach to this controller. -.It amr%d: can't obtain configuration data from controller -.It amr%d: can't obtain product data from controller -.Pp -The driver was unable to obtain vital configuration data from the controller. -Initialisation has failed and the driver will not attach to this controller. -.It amr%d: can't establish configuration hook -.It amr%d: can't scan controller for drives -.Pp -The scan for logical drives managed by the controller failed. -No drives will be attached. -.It amr%d: device_add_child failed -.It amr%d: bus_generic_attach returned %d -.Pp -Creation of the logical drive instances failed; -attachment of one or more logical drives may have been aborted. -.It amr%d: flushing cache... -.Pp -The controller cache is being flushed prior to shutdown or detach. -.El -.Ss Operational diagnostics -.Bl -diag -.It amr%d: I/O beyond end of unit (%u,%d > %u) -.Pp -A partitioning error or disk corruption has caused an I/O request -beyond the end of the logical drive. -This may also occur if FlexRAID Virtual Sizing is enabled and -an I/O operation is attempted on a portion of the virtual drive -beyond the actual capacity available. -.It amr%d: polled command timeout -.Pp -An initialisation command timed out. -The initialisation process may fail as a result. -.It amr%d: bad slot %d completed -.Pp -The controller reported completion of a command that the driver did not issue. -This may result in data corruption, -and suggests a hardware or firmware problem with the system or controller. -.It amr%d: I/O error - %x -.Pp -An I/O error has occurred. -.El -.Sh SEE ALSO -.Xr cd 4 , -.Xr da 4 , -.Xr mfi 4 , -.Xr sa 4 , -.Xr scsi 4 -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was written by -.An Mike Smith Aq Mt msmith@FreeBSD.org . -.Pp -This manual page was written by -.An Mike Smith Aq Mt msmith@FreeBSD.org -and -.An Jeroen Ruigrok van der Werven Aq Mt asmodai@FreeBSD.org . diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index afd386f5913e..9d15833e472a 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -180,7 +180,6 @@ device ses # Enclosure Services (SES and SAF-TE) #device ctl # CAM Target Layer # RAID controllers interfaced to the SCSI subsystem -device amr # AMI MegaRAID device arcmsr # Areca SATA II RAID device ciss # Compaq Smart RAID 5* device ips # IBM (Adaptec) ServeRAID diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 2221f8feb7dd..f0546dfca101 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1642,8 +1642,6 @@ device ciss # device ida # Compaq Smart RAID device mlx # Mylex DAC960 -device amr # AMI MegaRAID -device amrp # SCSI Passthrough interface (optional, CAM req.) device mfi # LSI MegaRAID SAS device mfip # LSI MegaRAID SAS passthrough, requires CAM options MFI_DEBUG diff --git a/sys/conf/files b/sys/conf/files index 637aed6bfb9c..650887cf54e6 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -890,10 +890,6 @@ dev/altera/pio/pio.c optional altera_pio dev/altera/pio/pio_if.m optional altera_pio dev/amdpm/amdpm.c optional amdpm pci | nfpm pci dev/amdsmb/amdsmb.c optional amdsmb pci -dev/amr/amr.c optional amr -dev/amr/amr_cam.c optional amrp amr -dev/amr/amr_disk.c optional amr -dev/amr/amr_pci.c optional amr pci # dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c deleted file mode 100644 index 1c4f252345e9..000000000000 --- a/sys/dev/amr/amr.c +++ /dev/null @@ -1,2446 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 1999,2000 Michael Smith - * Copyright (c) 2000 BSDi - * Copyright (c) 2005 Scott Long - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -/*- - * Copyright (c) 2002 Eric Moore - * Copyright (c) 2002, 2004 LSI Logic Corporation - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The party using or redistributing the source code and binary forms - * agrees to the disclaimer below and the terms and conditions set forth - * herein. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD$"); - -/* - * Driver for the AMI MegaRaid family of controllers. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#define AMR_DEFINE_TABLES -#include - -SYSCTL_NODE(_hw, OID_AUTO, amr, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, - "AMR driver parameters"); - -static d_open_t amr_open; -static d_close_t amr_close; -static d_ioctl_t amr_ioctl; - -static struct cdevsw amr_cdevsw = { - .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, - .d_open = amr_open, - .d_close = amr_close, - .d_ioctl = amr_ioctl, - .d_name = "amr", -}; - -int linux_no_adapter = 0; -/* - * Initialisation, bus interface. - */ -static void amr_startup(void *arg); - -/* - * Command wrappers - */ -static int amr_query_controller(struct amr_softc *sc); -static void *amr_enquiry(struct amr_softc *sc, size_t bufsize, - u_int8_t cmd, u_int8_t cmdsub, u_int8_t cmdqual, int *status); -static void amr_completeio(struct amr_command *ac); -static int amr_support_ext_cdb(struct amr_softc *sc); - -/* - * Command buffer allocation. - */ -static void amr_alloccmd_cluster(struct amr_softc *sc); -static void amr_freecmd_cluster(struct amr_command_cluster *acc); - -/* - * Command processing. - */ -static int amr_bio_command(struct amr_softc *sc, struct amr_command **acp); -static int amr_wait_command(struct amr_command *ac) __unused; -static int amr_mapcmd(struct amr_command *ac); -static void amr_unmapcmd(struct amr_command *ac); -static int amr_start(struct amr_command *ac); -static void amr_complete(void *context, ac_qhead_t *head); -static void amr_setup_sg(void *arg, bus_dma_segment_t *segs, int nsegments, int error); -static void amr_setup_data(void *arg, bus_dma_segment_t *segs, int nsegments, int error); -static void amr_setup_ccb(void *arg, bus_dma_segment_t *segs, int nsegments, int error); -static void amr_abort_load(struct amr_command *ac); - -/* - * Interface-specific shims - */ -static int amr_quartz_submit_command(struct amr_command *ac); -static int amr_quartz_get_work(struct amr_softc *sc, struct amr_mailbox *mbsave); -static int amr_quartz_poll_command(struct amr_command *ac); -static int amr_quartz_poll_command1(struct amr_softc *sc, struct amr_command *ac); - -static int amr_std_submit_command(struct amr_command *ac); -static int amr_std_get_work(struct amr_softc *sc, struct amr_mailbox *mbsave); -static int amr_std_poll_command(struct amr_command *ac); -static void amr_std_attach_mailbox(struct amr_softc *sc); - -#ifdef AMR_BOARD_INIT -static int amr_quartz_init(struct amr_softc *sc); -static int amr_std_init(struct amr_softc *sc); -#endif - -/* - * Debugging - */ -static void amr_describe_controller(struct amr_softc *sc); -#ifdef AMR_DEBUG -#if 0 -static void amr_printcommand(struct amr_command *ac); -#endif -#endif - -static void amr_init_sysctl(struct amr_softc *sc); -static int amr_linux_ioctl_int(struct cdev *dev, u_long cmd, caddr_t addr, - int32_t flag, struct thread *td); - -static MALLOC_DEFINE(M_AMR, "amr", "AMR memory"); - -/******************************************************************************** - ******************************************************************************** - Inline Glue - ******************************************************************************** - ********************************************************************************/ - -/******************************************************************************** - ******************************************************************************** - Public Interfaces - ******************************************************************************** - ********************************************************************************/ - -/******************************************************************************** - * Initialise the controller and softc. - */ -int -amr_attach(struct amr_softc *sc) -{ - device_t child; - - debug_called(1); - - /* - * Initialise per-controller queues. - */ - amr_init_qhead(&sc->amr_freecmds); - amr_init_qhead(&sc->amr_ready); - TAILQ_INIT(&sc->amr_cmd_clusters); - bioq_init(&sc->amr_bioq); - - debug(2, "queue init done"); - - /* - * Configure for this controller type. - */ - if (AMR_IS_QUARTZ(sc)) { - sc->amr_submit_command = amr_quartz_submit_command; - sc->amr_get_work = amr_quartz_get_work; - sc->amr_poll_command = amr_quartz_poll_command; - sc->amr_poll_command1 = amr_quartz_poll_command1; - } else { - sc->amr_submit_command = amr_std_submit_command; - sc->amr_get_work = amr_std_get_work; - sc->amr_poll_command = amr_std_poll_command; - amr_std_attach_mailbox(sc); - } - -#ifdef AMR_BOARD_INIT - if ((AMR_IS_QUARTZ(sc) ? amr_quartz_init(sc) : amr_std_init(sc))) - return(ENXIO); -#endif - - /* - * Allocate initial commands. - */ - amr_alloccmd_cluster(sc); - - /* - * Quiz controller for features and limits. - */ - if (amr_query_controller(sc)) - return(ENXIO); - - debug(2, "controller query complete"); - - /* - * preallocate the remaining commands. - */ - while (sc->amr_nextslot < sc->amr_maxio) - amr_alloccmd_cluster(sc); - - /* - * Setup sysctls. - */ - amr_init_sysctl(sc); - - /* - * Attach our 'real' SCSI channels to CAM. - */ - child = device_add_child(sc->amr_dev, "amrp", -1); - sc->amr_pass = child; - if (child != NULL) { - device_set_softc(child, sc); - device_set_desc(child, "SCSI Passthrough Bus"); - bus_generic_attach(sc->amr_dev); - } - - /* - * Create the control device. - */ - sc->amr_dev_t = make_dev(&amr_cdevsw, device_get_unit(sc->amr_dev), UID_ROOT, GID_OPERATOR, - S_IRUSR | S_IWUSR, "amr%d", device_get_unit(sc->amr_dev)); - sc->amr_dev_t->si_drv1 = sc; - linux_no_adapter++; - if (device_get_unit(sc->amr_dev) == 0) - make_dev_alias(sc->amr_dev_t, "megadev0"); - - /* - * Schedule ourselves to bring the controller up once interrupts are - * available. - */ - bzero(&sc->amr_ich, sizeof(struct intr_config_hook)); - sc->amr_ich.ich_func = amr_startup; - sc->amr_ich.ich_arg = sc; - if (config_intrhook_establish(&sc->amr_ich) != 0) { - device_printf(sc->amr_dev, "can't establish configuration hook\n"); - return(ENOMEM); - } - - /* - * Print a little information about the controller. - */ - amr_describe_controller(sc); - - debug(2, "attach complete"); - return(0); -} - -/******************************************************************************** - * Locate disk resources and attach children to them. - */ -static void -amr_startup(void *arg) -{ - struct amr_softc *sc = (struct amr_softc *)arg; - struct amr_logdrive *dr; - int i, error; - - debug_called(1); - - /* get up-to-date drive information */ - if (amr_query_controller(sc)) { - device_printf(sc->amr_dev, "can't scan controller for drives\n"); - return; - } - - /* iterate over available drives */ - for (i = 0, dr = &sc->amr_drive[0]; (i < AMR_MAXLD) && (dr->al_size != 0xffffffff); i++, dr++) { - /* are we already attached to this drive? */ - if (dr->al_disk == 0) { - /* generate geometry information */ - if (dr->al_size > 0x200000) { /* extended translation? */ - dr->al_heads = 255; - dr->al_sectors = 63; - } else { - dr->al_heads = 64; - dr->al_sectors = 32; - } - dr->al_cylinders = dr->al_size / (dr->al_heads * dr->al_sectors); - - dr->al_disk = device_add_child(sc->amr_dev, NULL, -1); - if (dr->al_disk == 0) - device_printf(sc->amr_dev, "device_add_child failed\n"); - device_set_ivars(dr->al_disk, dr); - } - } - - if ((error = bus_generic_attach(sc->amr_dev)) != 0) - device_printf(sc->amr_dev, "bus_generic_attach returned %d\n", error); - - /* mark controller back up */ - sc->amr_state &= ~AMR_STATE_SHUTDOWN; - - /* interrupts will be enabled before we do anything more */ - sc->amr_state |= AMR_STATE_INTEN; - - /* pull ourselves off the intrhook chain */ - if (sc->amr_ich.ich_func) - config_intrhook_disestablish(&sc->amr_ich); - sc->amr_ich.ich_func = NULL; - - return; -} - -static void -amr_init_sysctl(struct amr_softc *sc) -{ - - SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->amr_dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(sc->amr_dev)), - OID_AUTO, "allow_volume_configure", CTLFLAG_RW, &sc->amr_allow_vol_config, 0, - ""); - SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->amr_dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(sc->amr_dev)), - OID_AUTO, "nextslot", CTLFLAG_RD, &sc->amr_nextslot, 0, - ""); - SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->amr_dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(sc->amr_dev)), - OID_AUTO, "busyslots", CTLFLAG_RD, &sc->amr_busyslots, 0, - ""); - SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->amr_dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(sc->amr_dev)), - OID_AUTO, "maxio", CTLFLAG_RD, &sc->amr_maxio, 0, - ""); -} - -/******************************************************************************* - * Free resources associated with a controller instance - */ -void -amr_free(struct amr_softc *sc) -{ - struct amr_command_cluster *acc; - - /* detach from CAM */ - if (sc->amr_pass != NULL) - device_delete_child(sc->amr_dev, sc->amr_pass); - - /* throw away any command buffers */ - while ((acc = TAILQ_FIRST(&sc->amr_cmd_clusters)) != NULL) { - TAILQ_REMOVE(&sc->amr_cmd_clusters, acc, acc_link); - amr_freecmd_cluster(acc); - } - - /* destroy control device */ - if( sc->amr_dev_t != (struct cdev *)NULL) - destroy_dev(sc->amr_dev_t); - - if (mtx_initialized(&sc->amr_hw_lock)) - mtx_destroy(&sc->amr_hw_lock); - - if (mtx_initialized(&sc->amr_list_lock)) - mtx_destroy(&sc->amr_list_lock); -} - -/******************************************************************************* - * Receive a bio structure from a child device and queue it on a particular - * disk resource, then poke the disk resource to start as much work as it can. - */ -int -amr_submit_bio(struct amr_softc *sc, struct bio *bio) -{ - debug_called(2); - - mtx_lock(&sc->amr_list_lock); - amr_enqueue_bio(sc, bio); - amr_startio(sc); - mtx_unlock(&sc->amr_list_lock); - return(0); -} - -/******************************************************************************** - * Accept an open operation on the control device. - */ -static int -amr_open(struct cdev *dev, int flags, int fmt, struct thread *td) -{ - int unit = dev2unit(dev); - struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); - - debug_called(1); - - sc->amr_state |= AMR_STATE_OPEN; - return(0); -} - -#ifdef LSI -static int -amr_del_ld(struct amr_softc *sc, int drv_no, int status) -{ - - debug_called(1); - - sc->amr_state &= ~AMR_STATE_QUEUE_FRZN; - sc->amr_state &= ~AMR_STATE_LD_DELETE; - sc->amr_state |= AMR_STATE_REMAP_LD; - debug(1, "State Set"); - - if (!status) { - debug(1, "disk begin destroyed %d",drv_no); - if (--amr_disks_registered == 0) - cdevsw_remove(&amrddisk_cdevsw); - debug(1, "disk begin destroyed success"); - } - return 0; -} - -static int -amr_prepare_ld_delete(struct amr_softc *sc) -{ - - debug_called(1); - if (sc->ld_del_supported == 0) - return(ENOIOCTL); - - sc->amr_state |= AMR_STATE_QUEUE_FRZN; - sc->amr_state |= AMR_STATE_LD_DELETE; - - /* 5 minutes for the all the commands to be flushed.*/ - tsleep((void *)&sc->ld_del_supported, PCATCH | PRIBIO,"delete_logical_drv",hz * 60 * 1); - if ( sc->amr_busyslots ) - return(ENOIOCTL); - - return 0; -} -#endif - -/******************************************************************************** - * Accept the last close on the control device. - */ -static int -amr_close(struct cdev *dev, int flags, int fmt, struct thread *td) -{ - int unit = dev2unit(dev); - struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); - - debug_called(1); - - sc->amr_state &= ~AMR_STATE_OPEN; - return (0); -} - -/******************************************************************************** - * Handle controller-specific control operations. - */ -static void -amr_rescan_drives(struct cdev *dev) -{ - struct amr_softc *sc = (struct amr_softc *)dev->si_drv1; - int i, error = 0; - - sc->amr_state |= AMR_STATE_REMAP_LD; - while (sc->amr_busyslots) { - device_printf(sc->amr_dev, "idle controller\n"); - amr_done(sc); - } - - /* mark ourselves as in-shutdown */ - sc->amr_state |= AMR_STATE_SHUTDOWN; - - /* flush controller */ - device_printf(sc->amr_dev, "flushing cache..."); - printf("%s\n", amr_flush(sc) ? "failed" : "done"); - - /* delete all our child devices */ - for(i = 0 ; i < AMR_MAXLD; i++) { - if(sc->amr_drive[i].al_disk != 0) { - if((error = device_delete_child(sc->amr_dev, - sc->amr_drive[i].al_disk)) != 0) - goto shutdown_out; - - sc->amr_drive[i].al_disk = 0; - } - } - -shutdown_out: - amr_startup(sc); -} - -/* - * Bug-for-bug compatibility with Linux! - * Some apps will send commands with inlen and outlen set to 0, - * even though they expect data to be transferred to them from the - * card. Linux accidentally allows this by allocating a 4KB - * buffer for the transfer anyways, but it then throws it away - * without copying it back to the app. - * - * The amr(4) firmware relies on this feature. In fact, it assumes - * the buffer is always a power of 2 up to a max of 64k. There is - * also at least one case where it assumes a buffer less than 16k is - * greater than 16k. However, forcing all buffers to a size of 32k - * causes stalls in the firmware. Force each command smaller than - * 64k up to the next power of two except that commands between 8k - * and 16k are rounded up to 32k instead of 16k. - */ -static unsigned long -amr_ioctl_buffer_length(unsigned long len) -{ - - if (len <= 4 * 1024) - return (4 * 1024); - if (len <= 8 * 1024) - return (8 * 1024); - if (len <= 32 * 1024) - return (32 * 1024); - if (len <= 64 * 1024) - return (64 * 1024); - return (len); -} - -int -amr_linux_ioctl_int(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, - struct thread *td) -{ - struct amr_softc *sc = (struct amr_softc *)dev->si_drv1; - struct amr_command *ac; - struct amr_mailbox *mb; - struct amr_linux_ioctl ali; - void *dp, *temp; - int error; - int len, ac_flags = 0; - int logical_drives_changed = 0; - u_int32_t linux_version = 0x02100000; - u_int8_t status; - struct amr_passthrough *ap; /* 60 bytes */ - - error = 0; - dp = NULL; - ac = NULL; - ap = NULL; - - if ((error = copyin(addr, &ali, sizeof(ali))) != 0) - return (error); - switch (ali.ui.fcs.opcode) { - case 0x82: - switch(ali.ui.fcs.subopcode) { - case 'e': - copyout(&linux_version, (void *)(uintptr_t)ali.data, - sizeof(linux_version)); - error = 0; - break; - - case 'm': - copyout(&linux_no_adapter, (void *)(uintptr_t)ali.data, - sizeof(linux_no_adapter)); - td->td_retval[0] = linux_no_adapter; - error = 0; - break; - - default: - printf("Unknown subopcode\n"); - error = ENOIOCTL; - break; - } - break; - - case 0x80: - case 0x81: - if (ali.ui.fcs.opcode == 0x80) - len = max(ali.outlen, ali.inlen); - else - len = ali.ui.fcs.length; - - mb = (void *)&ali.mbox[0]; - - if ((ali.mbox[0] == FC_DEL_LOGDRV && ali.mbox[2] == OP_DEL_LOGDRV) || /* delete */ - (ali.mbox[0] == AMR_CMD_CONFIG && ali.mbox[2] == 0x0d)) { /* create */ - if (sc->amr_allow_vol_config == 0) { - error = EPERM; - break; - } - logical_drives_changed = 1; - } - - if (ali.mbox[0] == AMR_CMD_PASS) { - mtx_lock(&sc->amr_list_lock); - while ((ac = amr_alloccmd(sc)) == NULL) - msleep(sc, &sc->amr_list_lock, PPAUSE, "amrioc", hz); - mtx_unlock(&sc->amr_list_lock); - ap = &ac->ac_ccb->ccb_pthru; - - error = copyin((void *)(uintptr_t)mb->mb_physaddr, ap, - sizeof(struct amr_passthrough)); - if (error) - break; - - if (ap->ap_data_transfer_length) - dp = malloc(ap->ap_data_transfer_length, M_AMR, - M_WAITOK | M_ZERO); - - if (ali.inlen) { - error = copyin((void *)(uintptr_t)ap->ap_data_transfer_address, - dp, ap->ap_data_transfer_length); - if (error) - break; - } - - ac_flags = AMR_CMD_DATAIN|AMR_CMD_DATAOUT|AMR_CMD_CCB; - bzero(&ac->ac_mailbox, sizeof(ac->ac_mailbox)); - ac->ac_mailbox.mb_command = AMR_CMD_PASS; - ac->ac_flags = ac_flags; *** 4945 LINES SKIPPED *** From nobody Thu Nov 25 07:46:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3AC7718A134C; Thu, 25 Nov 2021 07:46: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 4J091r6MvPz4sQ7; Thu, 25 Nov 2021 07:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7013019C8F; Thu, 25 Nov 2021 07: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 1AP7kuCb049956; Thu, 25 Nov 2021 07: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 1AP7kuwn049955; Thu, 25 Nov 2021 07:46:56 GMT (envelope-from git) Date: Thu, 25 Nov 2021 07:46:56 GMT Message-Id: <202111250746.1AP7kuwn049955@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: 0d5935af8f2e - main - esp: Remove List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0d5935af8f2ea7675760af234723f472240c386f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637826417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=50aJ25Qfjsn8+RKusQ09t80nts1u2ftJN4BVUXotF38=; b=GcNLQyt+47SI5FTS0jwgOp/1vR1oPf2Lwetx1fUc9JLmfKMKDSHLHrvZGWHGfmLRc972kJ 5eQ4LcMJtu7cyzDqBMdMtbe+3I5uIsm7QnAPZcv5LEndagbOAuG3h2tAaT6v4D2QayhKHm /bs+QWn+crLGpf4bj0P8xrPXFeFuHduvx52LksYrtL+alWA6z3h1tAqxOFPT5DhBjvvuNH 1eg0E72rRmLYs96FyAp7Y+ZuOAGB+pRQ/37QqpULMDr44EeMWySSuoPiTclj5Qb6XzoJkB QeJud3Zq7JXXT5JzGOx47qobGbyN5vfJ/DEzpC3T9SkaNvJvkpvouiKoG0NoTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637826417; a=rsa-sha256; cv=none; b=voVU+TTKq6zuuCYpqzuEkDTi0RwVxrUUyw2/hFlPLXoxVqRgR4dUnO8BQts5/u4ZZAJZHU aUH7EjpkZ9lz6IuqOmLxF3e19P811IZMywjfV3XOgFXOPKgufQFL+GQ4vn83GQfYth+2OI PBJ7bNlQEpXot+Z0EtSWPYKZzSlwI84MbqWIr/bUAMNpbZw03rM4ps2+UcZnfiSjpSWiEA gJbbA9R0tUmhyhAqEFSWwi1g3sruPbTaBjfL9fXx/+oGgyPn7K8x6qbbmez0YhEbkw1xIM 4qTz8TYVSS+LBQGi2SBXwQj8ZZPJJzCMeOD1qrIoao0ZdLSli481ILb4ULLV1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0d5935af8f2ea7675760af234723f472240c386f commit 0d5935af8f2ea7675760af234723f472240c386f Author: Warner Losh AuthorDate: 2021-11-25 07:21:24 +0000 Commit: Warner Losh CommitDate: 2021-11-25 07:45:12 +0000 esp: Remove Belatedly remove esp(4). It was tagged as gone in 13, but was overlooked until now. Sponsored by: Netflix Reviewed by: scottl Differential Revision: https://reviews.freebsd.org/D33115 --- share/man/man4/Makefile | 1 - share/man/man4/esp.4 | 111 -- sys/amd64/conf/GENERIC | 1 - sys/conf/NOTES | 4 - sys/conf/files | 2 - sys/dev/esp/am53c974reg.h | 74 - sys/dev/esp/esp_pci.c | 656 ------- sys/dev/esp/ncr53c9x.c | 3260 ------------------------------- sys/dev/esp/ncr53c9xreg.h | 296 --- sys/dev/esp/ncr53c9xvar.h | 501 ----- sys/dev/ic/esp.h | 79 - sys/i386/conf/GENERIC | 1 - sys/modules/Makefile | 1 - sys/modules/esp/Makefile | 9 - tools/kerneldoc/subsys/Doxyfile-dev_esp | 21 - 15 files changed, 5017 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 3eac0d1b3a39..ce2ce1ec8640 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -142,7 +142,6 @@ MAN= aac.4 \ ena.4 \ enc.4 \ epair.4 \ - esp.4 \ est.4 \ et.4 \ etherswitch.4 \ diff --git a/share/man/man4/esp.4 b/share/man/man4/esp.4 deleted file mode 100644 index 7fb426a02573..000000000000 --- a/share/man/man4/esp.4 +++ /dev/null @@ -1,111 +0,0 @@ -.\" -.\" Copyright (c) 2011 Marius Strobl -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd December 26, 2020 -.Dt ESP 4 -.Os -.Sh NAME -.Nm esp -.Nd Emulex ESP, NCR 53C9x and QLogic FAS families based SCSI controllers -.Sh SYNOPSIS -To compile this driver into the kernel, place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device scbus" -.Cd "device esp" -.Ed -.Pp -Alternatively, to load the driver as a module at boot time, place the -following line in -.Xr loader.conf 5 : -.Bd -literal -offset indent -if_esp_load="YES" -.Ed -.Sh DEPRECATION NOTICE -The -.Nm -driver is not present in -.Fx 13.0 . -.Sh DESCRIPTION -The -.Nm -driver provides support for the -.Tn AMD -Am53C974, the -.Tn Emulex -ESP100, ESP100A, ESP200 and ESP406, the -.Tn NCR -53C90, 53C94 and 53C96 as well as the -.Tn QLogic -FAS100A, FAS216, FAS366 and FAS408 -.Tn SCSI -controller chips found in a wide variety of systems and peripheral boards. -.Sh HARDWARE -Controllers supported by the -.Nm -driver include: -.Pp -.Bl -bullet -compact -.It -Tekram DC390 -.It -Tekram DC390T -.El -.Sh SEE ALSO -.Xr cd 4 , -.Xr ch 4 , -.Xr da 4 , -.Xr intro 4 , -.Xr pci 4 , -.Xr sa 4 , -.Xr scsi 4 , -.Xr camcontrol 8 -.Sh HISTORY -The -.Nm -driver first appeared in -.Nx 1.3 . -The first -.Fx -version to include it was -.Fx 5.3 . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was ported to -.Fx -by -.An Scott Long Aq Mt scottl@FreeBSD.org -and later on considerably improved by -.An Marius Strobl Aq Mt marius@FreeBSD.org . -.Sh BUGS -The -.Nm -driver should read the EEPROM settings of -.Tn Tekram -controllers. diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 9d15833e472a..f0bc090e376e 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -157,7 +157,6 @@ device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices device ahd # AHA39320/29320 and onboard AIC79xx devices -device esp # AMD Am53C974 (Tekram DC-390(T)) device hptiop # Highpoint RocketRaid 3xxx series device isp # Qlogic family #device ispfw # Firmware for QLogic HBAs- normally a module diff --git a/sys/conf/NOTES b/sys/conf/NOTES index f0546dfca101..c5baff1c9307 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1522,9 +1522,6 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/ # 19160x/29160x, aic7770/aic78xx # ahd: Adaptec 29320/39320 Controllers. -# esp: Emulex ESP, NCR 53C9x and QLogic FAS families based controllers -# including the AMD Am53C974 (found on devices such as the Tekram -# DC-390(T)) and the Sun ESP and FAS families of controllers # isp: Qlogic ISP 1020, 1040 and 1040B PCI SCSI host adapters, # ISP 1240 Dual Ultra SCSI, ISP 1080 and 1280 (Dual) Ultra2, # ISP 12160 Ultra3 SCSI, @@ -1544,7 +1541,6 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) device aacraid device ahc device ahd -device esp device isp envvar hint.isp.0.disable="1" envvar hint.isp.0.role="3" diff --git a/sys/conf/files b/sys/conf/files index 650887cf54e6..4f084a2733a7 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1680,8 +1680,6 @@ dev/ena/ena_sysctl.c optional ena \ compile-with "${NORMAL_C} -I$S/contrib" contrib/ena-com/ena_com.c optional ena contrib/ena-com/ena_eth_com.c optional ena -dev/esp/esp_pci.c optional esp pci -dev/esp/ncr53c9x.c optional esp dev/etherswitch/arswitch/arswitch.c optional arswitch dev/etherswitch/arswitch/arswitch_reg.c optional arswitch dev/etherswitch/arswitch/arswitch_phy.c optional arswitch diff --git a/sys/dev/esp/am53c974reg.h b/sys/dev/esp/am53c974reg.h deleted file mode 100644 index 795aa88d1668..000000000000 --- a/sys/dev/esp/am53c974reg.h +++ /dev/null @@ -1,74 +0,0 @@ -/* $NetBSD: pcscpreg.h,v 1.2 2008/04/28 20:23:55 martin Exp $ */ - -/*- - * SPDX-License-Identifier: BSD-2-Clause-NetBSD - * - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Izumi Tsutsui. - * - * 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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 _AM53C974_H_ -#define _AM53C974_H_ - -/* - * Am53c974 DMA engine registers - */ - -#define DMA_CMD 0x40 /* Command */ -#define DMACMD_RSVD 0xFFFFFF28 /* reserved */ -#define DMACMD_DIR 0x00000080 /* Transfer Direction (read:1) */ -#define DMACMD_INTE 0x00000040 /* DMA Interrupt Enable */ -#define DMACMD_MDL 0x00000010 /* Map to Memory Description List */ -#define DMACMD_DIAG 0x00000004 /* Diagnostic */ -#define DMACMD_CMD 0x00000003 /* Command Code Bit */ -#define DMACMD_IDLE 0x00000000 /* Idle */ -#define DMACMD_BLAST 0x00000001 /* Blast */ -#define DMACMD_ABORT 0x00000002 /* Abort */ -#define DMACMD_START 0x00000003 /* Start */ - -#define DMA_STC 0x44 /* Start Transfer Count */ -#define DMA_SPA 0x48 /* Start Physical Address */ -#define DMA_WBC 0x4C /* Working Byte Counter */ -#define DMA_WAC 0x50 /* Working Address Counter */ - -#define DMA_STAT 0x54 /* Status Register */ -#define DMASTAT_RSVD 0xFFFFFF80 /* reserved */ -#define DMASTAT_PABT 0x00000040 /* PCI master/target Abort */ -#define DMASTAT_BCMP 0x00000020 /* BLAST Complete */ -#define DMASTAT_SINT 0x00000010 /* SCSI Interrupt */ -#define DMASTAT_DONE 0x00000008 /* DMA Transfer Terminated */ -#define DMASTAT_ABT 0x00000004 /* DMA Transfer Aborted */ -#define DMASTAT_ERR 0x00000002 /* DMA Transfer Error */ -#define DMASTAT_PWDN 0x00000001 /* Power Down Indicator */ - -#define DMA_SMDLA 0x58 /* Starting Memory Descpritor List Address */ -#define DMA_WMAC 0x5C /* Working MDL Counter */ -#define DMA_SBAC 0x70 /* SCSI Bus and Control */ - -#endif /* _AM53C974_H_ */ diff --git a/sys/dev/esp/esp_pci.c b/sys/dev/esp/esp_pci.c deleted file mode 100644 index 1e484b29415e..000000000000 --- a/sys/dev/esp/esp_pci.c +++ /dev/null @@ -1,656 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause-NetBSD - * - * Copyright (c) 2011 Marius Strobl - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $NetBSD: pcscp.c,v 1.45 2010/11/13 13:52:08 uebayasi Exp $ */ - -/*- - * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, - * NASA Ames Research Center; Izumi Tsutsui. - * - * 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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. - */ - -/* - * esp_pci.c: device dependent code for AMD Am53c974 (PCscsi-PCI) - * written by Izumi Tsutsui - * - * Technical manual available at - * http://www.amd.com/files/connectivitysolutions/networking/archivednetworking/19113.pdf - */ - -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -#include - -#define PCI_DEVICE_ID_AMD53C974 0x20201022 - -struct esp_pci_softc { - struct ncr53c9x_softc sc_ncr53c9x; /* glue to MI code */ - device_t sc_dev; - - struct resource *sc_res[2]; -#define ESP_PCI_RES_INTR 0 -#define ESP_PCI_RES_IO 1 - - bus_dma_tag_t sc_pdmat; - - bus_dma_tag_t sc_xferdmat; /* DMA tag for transfers */ - bus_dmamap_t sc_xferdmam; /* DMA map for transfers */ - - void *sc_ih; /* interrupt handler */ - - size_t sc_dmasize; /* DMA size */ - void **sc_dmaaddr; /* DMA address */ - size_t *sc_dmalen; /* DMA length */ - int sc_active; /* DMA state */ - int sc_datain; /* DMA Data Direction */ -}; - -static struct resource_spec esp_pci_res_spec[] = { - { SYS_RES_IRQ, 0, RF_SHAREABLE | RF_ACTIVE }, /* ESP_PCI_RES_INTR */ - { SYS_RES_IOPORT, PCIR_BAR(0), RF_ACTIVE }, /* ESP_PCI_RES_IO */ - { -1, 0 } -}; - -#define READ_DMAREG(sc, reg) \ - bus_read_4((sc)->sc_res[ESP_PCI_RES_IO], (reg)) -#define WRITE_DMAREG(sc, reg, var) \ - bus_write_4((sc)->sc_res[ESP_PCI_RES_IO], (reg), (var)) - -#define READ_ESPREG(sc, reg) \ - bus_read_1((sc)->sc_res[ESP_PCI_RES_IO], (reg) << 2) -#define WRITE_ESPREG(sc, reg, val) \ - bus_write_1((sc)->sc_res[ESP_PCI_RES_IO], (reg) << 2, (val)) - -static int esp_pci_probe(device_t); -static int esp_pci_attach(device_t); -static int esp_pci_detach(device_t); -static int esp_pci_suspend(device_t); -static int esp_pci_resume(device_t); - -static device_method_t esp_pci_methods[] = { - DEVMETHOD(device_probe, esp_pci_probe), - DEVMETHOD(device_attach, esp_pci_attach), - DEVMETHOD(device_detach, esp_pci_detach), - DEVMETHOD(device_suspend, esp_pci_suspend), - DEVMETHOD(device_resume, esp_pci_resume), - - DEVMETHOD_END -}; - -static driver_t esp_pci_driver = { - "esp", - esp_pci_methods, - sizeof(struct esp_pci_softc) -}; - -DRIVER_MODULE(esp, pci, esp_pci_driver, esp_devclass, 0, 0); -MODULE_DEPEND(esp, pci, 1, 1, 1); - -/* - * Functions and the switch for the MI code - */ -static void esp_pci_dma_go(struct ncr53c9x_softc *); -static int esp_pci_dma_intr(struct ncr53c9x_softc *); -static int esp_pci_dma_isactive(struct ncr53c9x_softc *); - -static int esp_pci_dma_isintr(struct ncr53c9x_softc *); -static void esp_pci_dma_reset(struct ncr53c9x_softc *); -static int esp_pci_dma_setup(struct ncr53c9x_softc *, void **, size_t *, - int, size_t *); -static void esp_pci_dma_stop(struct ncr53c9x_softc *); -static void esp_pci_write_reg(struct ncr53c9x_softc *, int, uint8_t); -static uint8_t esp_pci_read_reg(struct ncr53c9x_softc *, int); -static void esp_pci_xfermap(void *arg, bus_dma_segment_t *segs, int nseg, - int error); - -static struct ncr53c9x_glue esp_pci_glue = { - esp_pci_read_reg, - esp_pci_write_reg, - esp_pci_dma_isintr, - esp_pci_dma_reset, - esp_pci_dma_intr, - esp_pci_dma_setup, - esp_pci_dma_go, - esp_pci_dma_stop, - esp_pci_dma_isactive, -}; - -static int -esp_pci_probe(device_t dev) -{ - - if (pci_get_devid(dev) == PCI_DEVICE_ID_AMD53C974) { - device_set_desc(dev, "AMD Am53C974 Fast-SCSI"); - return (BUS_PROBE_DEFAULT); - } - - return (ENXIO); -} - -/* - * Attach this instance, and then all the sub-devices - */ -static int -esp_pci_attach(device_t dev) -{ - struct esp_pci_softc *esc; - struct ncr53c9x_softc *sc; - int error; - - esc = device_get_softc(dev); - sc = &esc->sc_ncr53c9x; - - NCR_LOCK_INIT(sc); - - esc->sc_dev = dev; - sc->sc_glue = &esp_pci_glue; - - pci_enable_busmaster(dev); - - error = bus_alloc_resources(dev, esp_pci_res_spec, esc->sc_res); - if (error != 0) { - device_printf(dev, "failed to allocate resources\n"); - bus_release_resources(dev, esp_pci_res_spec, esc->sc_res); - return (error); - } - - error = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, - BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - BUS_SPACE_MAXSIZE_32BIT, BUS_SPACE_UNRESTRICTED, - BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &esc->sc_pdmat); - if (error != 0) { - device_printf(dev, "cannot create parent DMA tag\n"); - goto fail_res; - } - - /* - * XXX More of this should be in ncr53c9x_attach(), but - * XXX should we really poke around the chip that much in - * XXX the MI code? Think about this more... - */ - - /* - * Set up static configuration info. - * - * XXX we should read the configuration from the EEPROM. - */ - sc->sc_id = 7; - sc->sc_cfg1 = sc->sc_id | NCRCFG1_PARENB; - sc->sc_cfg2 = NCRCFG2_SCSI2 | NCRCFG2_FE; - sc->sc_cfg3 = NCRAMDCFG3_IDM | NCRAMDCFG3_FCLK; - sc->sc_cfg4 = NCRAMDCFG4_GE12NS | NCRAMDCFG4_RADE; - sc->sc_rev = NCR_VARIANT_AM53C974; - sc->sc_features = NCR_F_FASTSCSI | NCR_F_DMASELECT; - sc->sc_cfg3_fscsi = NCRAMDCFG3_FSCSI; - sc->sc_freq = 40; /* MHz */ - - /* - * This is the value used to start sync negotiations - * Note that the NCR register "SYNCTP" is programmed - * in "clocks per byte", and has a minimum value of 4. - * The SCSI period used in negotiation is one-fourth - * of the time (in nanoseconds) needed to transfer one byte. - * Since the chip's clock is given in MHz, we have the following - * formula: 4 * period = (1000 / freq) * 4 - */ - sc->sc_minsync = 1000 / sc->sc_freq; - - sc->sc_maxxfer = DFLTPHYS; /* see below */ - sc->sc_maxoffset = 15; - sc->sc_extended_geom = 1; - -#define MDL_SEG_SIZE 0x1000 /* 4kbyte per segment */ - - /* - * Create the DMA tag and map for the data transfers. - * - * Note: given that bus_dma(9) only adheres to the requested alignment - * for the first segment (and that also only for bus_dmamem_alloc()ed - * DMA maps) we can't use the Memory Descriptor List. However, also - * when not using the MDL, the maximum transfer size apparently is - * limited to 4k so we have to split transfers up, which plain sucks. - */ - error = bus_dma_tag_create(esc->sc_pdmat, PAGE_SIZE, 0, - BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - MDL_SEG_SIZE, 1, MDL_SEG_SIZE, BUS_DMA_ALLOCNOW, - busdma_lock_mutex, &sc->sc_lock, &esc->sc_xferdmat); - if (error != 0) { - device_printf(dev, "cannot create transfer DMA tag\n"); - goto fail_pdmat; - } - error = bus_dmamap_create(esc->sc_xferdmat, 0, &esc->sc_xferdmam); - if (error != 0) { - device_printf(dev, "cannot create transfer DMA map\n"); - goto fail_xferdmat; - } - - error = bus_setup_intr(dev, esc->sc_res[ESP_PCI_RES_INTR], - INTR_MPSAFE | INTR_TYPE_CAM, NULL, ncr53c9x_intr, sc, - &esc->sc_ih); - if (error != 0) { - device_printf(dev, "cannot set up interrupt\n"); - goto fail_xferdmam; - } - - /* Do the common parts of attachment. */ - sc->sc_dev = esc->sc_dev; - error = ncr53c9x_attach(sc); - if (error != 0) { - device_printf(esc->sc_dev, "ncr53c9x_attach failed\n"); - goto fail_intr; - } - - return (0); - - fail_intr: - bus_teardown_intr(esc->sc_dev, esc->sc_res[ESP_PCI_RES_INTR], - esc->sc_ih); - fail_xferdmam: - bus_dmamap_destroy(esc->sc_xferdmat, esc->sc_xferdmam); - fail_xferdmat: - bus_dma_tag_destroy(esc->sc_xferdmat); - fail_pdmat: - bus_dma_tag_destroy(esc->sc_pdmat); - fail_res: - bus_release_resources(dev, esp_pci_res_spec, esc->sc_res); - NCR_LOCK_DESTROY(sc); - - return (error); -} - -static int -esp_pci_detach(device_t dev) -{ - struct ncr53c9x_softc *sc; - struct esp_pci_softc *esc; - int error; - - esc = device_get_softc(dev); - sc = &esc->sc_ncr53c9x; - - bus_teardown_intr(esc->sc_dev, esc->sc_res[ESP_PCI_RES_INTR], - esc->sc_ih); - error = ncr53c9x_detach(sc); - if (error != 0) - return (error); - bus_dmamap_destroy(esc->sc_xferdmat, esc->sc_xferdmam); - bus_dma_tag_destroy(esc->sc_xferdmat); - bus_dma_tag_destroy(esc->sc_pdmat); - bus_release_resources(dev, esp_pci_res_spec, esc->sc_res); - NCR_LOCK_DESTROY(sc); - - return (0); -} - -static int -esp_pci_suspend(device_t dev) -{ - - return (ENXIO); -} - -static int -esp_pci_resume(device_t dev) -{ - - return (ENXIO); -} - -static void -esp_pci_xfermap(void *arg, bus_dma_segment_t *segs, int nsegs, int error) -{ - struct esp_pci_softc *esc = (struct esp_pci_softc *)arg; - - if (error != 0) - return; - - KASSERT(nsegs == 1, ("%s: bad transfer segment count %d", __func__, - nsegs)); - KASSERT(segs[0].ds_len <= MDL_SEG_SIZE, - ("%s: bad transfer segment length %ld", __func__, - (long)segs[0].ds_len)); - - /* Program the DMA Starting Physical Address. */ - WRITE_DMAREG(esc, DMA_SPA, segs[0].ds_addr); -} - -/* - * Glue functions - */ - -static uint8_t -esp_pci_read_reg(struct ncr53c9x_softc *sc, int reg) -{ - struct esp_pci_softc *esc = (struct esp_pci_softc *)sc; - - return (READ_ESPREG(esc, reg)); -} - -static void -esp_pci_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v) -{ - struct esp_pci_softc *esc = (struct esp_pci_softc *)sc; - - WRITE_ESPREG(esc, reg, v); -} - -static int -esp_pci_dma_isintr(struct ncr53c9x_softc *sc) -{ - struct esp_pci_softc *esc = (struct esp_pci_softc *)sc; - - return (READ_ESPREG(esc, NCR_STAT) & NCRSTAT_INT) != 0; -} - -static void -esp_pci_dma_reset(struct ncr53c9x_softc *sc) -{ - struct esp_pci_softc *esc = (struct esp_pci_softc *)sc; - - WRITE_DMAREG(esc, DMA_CMD, DMACMD_IDLE); - - esc->sc_active = 0; -} - -static int -esp_pci_dma_intr(struct ncr53c9x_softc *sc) -{ - struct esp_pci_softc *esc = (struct esp_pci_softc *)sc; - bus_dma_tag_t xferdmat; - bus_dmamap_t xferdmam; - size_t dmasize; - int datain, i, resid, trans; - uint32_t dmastat; - char *p = NULL; - - xferdmat = esc->sc_xferdmat; - xferdmam = esc->sc_xferdmam; - datain = esc->sc_datain; - - dmastat = READ_DMAREG(esc, DMA_STAT); - - if ((dmastat & DMASTAT_ERR) != 0) { - /* XXX not tested... */ - WRITE_DMAREG(esc, DMA_CMD, DMACMD_ABORT | (datain != 0 ? - DMACMD_DIR : 0)); - - device_printf(esc->sc_dev, "DMA error detected; Aborting.\n"); - bus_dmamap_sync(xferdmat, xferdmam, datain != 0 ? - BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(xferdmat, xferdmam); - return (-1); - } - - if ((dmastat & DMASTAT_ABT) != 0) { - /* XXX what should be done? */ - device_printf(esc->sc_dev, "DMA aborted.\n"); - WRITE_DMAREG(esc, DMA_CMD, DMACMD_IDLE | (datain != 0 ? - DMACMD_DIR : 0)); - esc->sc_active = 0; - return (0); - } - - KASSERT(esc->sc_active != 0, ("%s: DMA wasn't active", __func__)); - - /* DMA has stopped. */ - - esc->sc_active = 0; - - dmasize = esc->sc_dmasize; - if (dmasize == 0) { - /* A "Transfer Pad" operation completed. */ - NCR_DMA(("%s: discarded %d bytes (tcl=%d, tcm=%d)\n", - __func__, READ_ESPREG(esc, NCR_TCL) | - (READ_ESPREG(esc, NCR_TCM) << 8), - READ_ESPREG(esc, NCR_TCL), READ_ESPREG(esc, NCR_TCM))); - return (0); - } - - resid = 0; - /* - * If a transfer onto the SCSI bus gets interrupted by the device - * (e.g. for a SAVEPOINTER message), the data in the FIFO counts - * as residual since the ESP counter registers get decremented as - * bytes are clocked into the FIFO. - */ - if (datain == 0 && - (resid = (READ_ESPREG(esc, NCR_FFLAG) & NCRFIFO_FF)) != 0) - NCR_DMA(("%s: empty esp FIFO of %d ", __func__, resid)); - - if ((sc->sc_espstat & NCRSTAT_TC) == 0) { - /* - * "Terminal count" is off, so read the residue - * out of the ESP counter registers. - */ - if (datain != 0) { - resid = READ_ESPREG(esc, NCR_FFLAG) & NCRFIFO_FF; - while (resid > 1) - resid = - READ_ESPREG(esc, NCR_FFLAG) & NCRFIFO_FF; - WRITE_DMAREG(esc, DMA_CMD, DMACMD_BLAST | DMACMD_DIR); - - for (i = 0; i < 0x8000; i++) /* XXX 0x8000 ? */ - if ((READ_DMAREG(esc, DMA_STAT) & - DMASTAT_BCMP) != 0) - break; - - /* See the below comments... */ - if (resid != 0) - p = *esc->sc_dmaaddr; - } - - resid += READ_ESPREG(esc, NCR_TCL) | - (READ_ESPREG(esc, NCR_TCM) << 8) | - (READ_ESPREG(esc, NCR_TCH) << 16); - } else - while ((dmastat & DMASTAT_DONE) == 0) - dmastat = READ_DMAREG(esc, DMA_STAT); - - WRITE_DMAREG(esc, DMA_CMD, DMACMD_IDLE | (datain != 0 ? - DMACMD_DIR : 0)); - - /* Sync the transfer buffer. */ - bus_dmamap_sync(xferdmat, xferdmam, datain != 0 ? - BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(xferdmat, xferdmam); - - trans = dmasize - resid; - - /* - * From the technical manual notes: - * - * "In some odd byte conditions, one residual byte will be left - * in the SCSI FIFO, and the FIFO flags will never count to 0. - * When this happens, the residual byte should be retrieved - * via PIO following completion of the BLAST operation." - */ - if (p != NULL) { - p += trans; - *p = READ_ESPREG(esc, NCR_FIFO); - trans++; - } - - if (trans < 0) { /* transferred < 0 ? */ -#if 0 - /* - * This situation can happen in perfectly normal operation - * if the ESP is reselected while using DMA to select - * another target. As such, don't print the warning. - */ - device_printf(dev, "xfer (%d) > req (%d)\n", trans, dmasize); -#endif - trans = dmasize; - } - - NCR_DMA(("%s: tcl=%d, tcm=%d, tch=%d; trans=%d, resid=%d\n", __func__, - READ_ESPREG(esc, NCR_TCL), READ_ESPREG(esc, NCR_TCM), - READ_ESPREG(esc, NCR_TCH), trans, resid)); - - *esc->sc_dmalen -= trans; - *esc->sc_dmaaddr = (char *)*esc->sc_dmaaddr + trans; - - return (0); -} - -static int -esp_pci_dma_setup(struct ncr53c9x_softc *sc, void **addr, size_t *len, - int datain, size_t *dmasize) -{ - struct esp_pci_softc *esc = (struct esp_pci_softc *)sc; - int error; - - WRITE_DMAREG(esc, DMA_CMD, DMACMD_IDLE | (datain != 0 ? DMACMD_DIR : - 0)); - - *dmasize = esc->sc_dmasize = ulmin(*dmasize, MDL_SEG_SIZE); - esc->sc_dmaaddr = addr; - esc->sc_dmalen = len; - esc->sc_datain = datain; - - /* - * There's no need to set up DMA for a "Transfer Pad" operation. - */ - if (*dmasize == 0) - return (0); - - /* Set the transfer length. */ - WRITE_DMAREG(esc, DMA_STC, *dmasize); - - /* - * Load the transfer buffer and program the DMA address. - * Note that the NCR53C9x core can't handle EINPROGRESS so we set - * BUS_DMA_NOWAIT. - */ - error = bus_dmamap_load(esc->sc_xferdmat, esc->sc_xferdmam, - *esc->sc_dmaaddr, *dmasize, esp_pci_xfermap, sc, BUS_DMA_NOWAIT); - - return (error); -} - -static void -esp_pci_dma_go(struct ncr53c9x_softc *sc) -{ - struct esp_pci_softc *esc = (struct esp_pci_softc *)sc; - int datain; - - datain = esc->sc_datain; - - /* No DMA transfer for a "Transfer Pad" operation */ - if (esc->sc_dmasize == 0) - return; - - /* Sync the transfer buffer. */ - bus_dmamap_sync(esc->sc_xferdmat, esc->sc_xferdmam, datain != 0 ? - BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); - - /* Set the DMA engine to the IDLE state. */ - /* XXX DMA Transfer Interrupt Enable bit is broken? */ - WRITE_DMAREG(esc, DMA_CMD, DMACMD_IDLE | /* DMACMD_INTE | */ - (datain != 0 ? DMACMD_DIR : 0)); - - /* Issue a DMA start command. */ - WRITE_DMAREG(esc, DMA_CMD, DMACMD_START | /* DMACMD_INTE | */ - (datain != 0 ? DMACMD_DIR : 0)); - - esc->sc_active = 1; -} - -static void -esp_pci_dma_stop(struct ncr53c9x_softc *sc) -{ - struct esp_pci_softc *esc = (struct esp_pci_softc *)sc; - - /* DMA stop */ - /* XXX what should we do here ? */ - WRITE_DMAREG(esc, DMA_CMD, - DMACMD_ABORT | (esc->sc_datain != 0 ? DMACMD_DIR : 0)); - bus_dmamap_unload(esc->sc_xferdmat, esc->sc_xferdmam); - - esc->sc_active = 0; -} - -static int -esp_pci_dma_isactive(struct ncr53c9x_softc *sc) -{ - struct esp_pci_softc *esc = (struct esp_pci_softc *)sc; - - /* XXX should we check esc->sc_active? */ - if ((READ_DMAREG(esc, DMA_CMD) & DMACMD_CMD) != DMACMD_IDLE) - return (1); - - return (0); -} diff --git a/sys/dev/esp/ncr53c9x.c b/sys/dev/esp/ncr53c9x.c deleted file mode 100644 index 35ce9a4dbf2c..000000000000 --- a/sys/dev/esp/ncr53c9x.c +++ /dev/null @@ -1,3260 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD AND BSD-2-Clause NetBSD - * - * Copyright (c) 2004 Scott Long - * Copyright (c) 2005, 2008 Marius Strobl - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. *** 4193 LINES SKIPPED *** From nobody Thu Nov 25 07:46:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 18C4F18A13AF; Thu, 25 Nov 2021 07:47: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 4J091t6Hyhz4sXr; Thu, 25 Nov 2021 07:46:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9708F1987B; Thu, 25 Nov 2021 07:46: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 1AP7kvqB049987; Thu, 25 Nov 2021 07:46:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP7kvxf049986; Thu, 25 Nov 2021 07:46:57 GMT (envelope-from git) Date: Thu, 25 Nov 2021 07:46:57 GMT Message-Id: <202111250746.1AP7kvxf049986@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: 8722e05ae149 - main - twa: Remove List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8722e05ae1496968114f4be1a68bf5ea62cdbd78 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637826419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AsAUNGizsjb1ow6u38BgPJSdjfVVihysCgJQwb0KSzo=; b=RQZDOmJLl07rU3Oxb2D3z78hJSAaLv3BJtF1Z8B9peNNRIVArXHK0s81LwtI1qR7fl979B VcfiysJXhbRVTV4IpXnhkGHcT9Om9N+gyE+FPhxV5emrokmzqbUEI9RPDrUeS6QCJA+Lxv gQoP/8sxFm2Hik5sMyNvFX3kgbs3GLZeYqOYE3uRBeQSvtLtWWJG0RYr1T104JAb1Qx8rS AvLKTH8MFca4xLtOspAv6U8wf5adqWLta+EUBxSuto7EaSdObTZGEeEAnxUxOpSrtvhrwO bYC/vRQ3BHrgpPXKaeI8EEFELzZb8HYRyBz0Wu4ybyfz4D4zuezz3aZQun00Pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637826419; a=rsa-sha256; cv=none; b=pWoQL3QAmBx41BvJ6KRuxMrkyLgAmxZp4Xf2fq6PqkQGTkVJx0zPbLxs7NKwR5VKk9veQU 1ciDuw63tURujbFCOBufpIMMXvKEGZ7pWgtg2LeQttR4BLOxZLmBqrCV0TuiMLeISC1dcz tuI4b42WHCTKG+eppofGVHgnpzXtCLkwoZBL3R9CE6grib1TTDMBYpvYiSOA3d0gE73c+b 0lrw/3uFUoeAQlEP3DODPfuvCSAF+ABJUM8UeyRy/Czxk+Fz68DfUfosSG8cTN7UjD0myC nZY+hTGjIrbVEIOMc8JbU06aF5s+8l/VQM9pCAZCBgMiWbOdQ9fv+kNBEZpD5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8722e05ae1496968114f4be1a68bf5ea62cdbd78 commit 8722e05ae1496968114f4be1a68bf5ea62cdbd78 Author: Warner Losh AuthorDate: 2021-11-25 07:21:41 +0000 Commit: Warner Losh CommitDate: 2021-11-25 07:45:13 +0000 twa: Remove Belatedly remove twa(4). It was supposed to go before 13.0, but was overlooked. Sponsored by: Netflix Relnotes: yes Reviewed by: scottl Differential Revision: https://reviews.freebsd.org/D33114 --- share/man/man4/Makefile | 1 - share/man/man4/twa.4 | 140 --- sys/amd64/conf/GENERIC | 1 - sys/amd64/conf/NOTES | 7 - sys/conf/files | 12 - sys/conf/options | 2 - sys/dev/twa/tw_cl.h | 324 ------ sys/dev/twa/tw_cl_externs.h | 191 ---- sys/dev/twa/tw_cl_fwif.h | 418 -------- sys/dev/twa/tw_cl_init.c | 696 ------------- sys/dev/twa/tw_cl_intr.c | 724 -------------- sys/dev/twa/tw_cl_io.c | 1407 -------------------------- sys/dev/twa/tw_cl_ioctl.h | 104 -- sys/dev/twa/tw_cl_misc.c | 991 ------------------ sys/dev/twa/tw_cl_share.h | 535 ---------- sys/dev/twa/tw_osl.h | 298 ------ sys/dev/twa/tw_osl_cam.c | 663 ------------ sys/dev/twa/tw_osl_externs.h | 86 -- sys/dev/twa/tw_osl_freebsd.c | 1661 ------------------------------- sys/dev/twa/tw_osl_includes.h | 76 -- sys/dev/twa/tw_osl_inline.h | 309 ------ sys/dev/twa/tw_osl_ioctl.h | 108 -- sys/dev/twa/tw_osl_share.h | 107 -- sys/dev/twa/tw_osl_types.h | 60 -- sys/i386/conf/GENERIC | 1 - sys/i386/conf/NOTES | 7 - sys/modules/Makefile | 2 - sys/modules/twa/Makefile | 47 - tools/kerneldoc/subsys/Doxyfile-dev_twa | 21 - 29 files changed, 8999 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index ce2ce1ec8640..9504cde7626e 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -552,7 +552,6 @@ MAN= aac.4 \ ${_tpm.4} \ tty.4 \ tun.4 \ - twa.4 \ twe.4 \ tws.4 \ udp.4 \ diff --git a/share/man/man4/twa.4 b/share/man/man4/twa.4 deleted file mode 100644 index 64e3e37f7da0..000000000000 --- a/share/man/man4/twa.4 +++ /dev/null @@ -1,140 +0,0 @@ -.\" -.\" Copyright (c) 2004 3ware, Inc. -.\" Copyright (c) 2000 BSDi -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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. -.\" -.\" $FreeBSD$ -.\" -.Dd May 9, 2007 -.Dt TWA 4 -.Os -.Sh NAME -.Nm twa -.Nd 3ware 9000/9500/9550/9650 series SATA RAID controllers driver -.Sh DEPRECATION NOTICE -The -.Nm -driver is not present in -.Fx 13.0 . -.Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device scbus" -.Cd "device twa" -.Ed -.Pp -Alternatively, to load the driver as a -module at boot time, place the following line in -.Xr loader.conf 5 : -.Bd -literal -offset indent -twa_load="YES" -.Ed -.Sh DESCRIPTION -The -.Nm -driver provides support for AMCC's 3ware 9000/9500/9550/9650 series -SATA controllers. -.Pp -These controllers are available in 4, 8, 12 or 16-port configurations, -and support the following RAID levels: 0, 1, 10, 5, 50. -The device nodes for the controllers are of the form -.Pa /dev/twa Ns Ar X , -where -.Ar X -is the controller number. -The driver is implemented as a SCSI SIM -under CAM, and, as such, the logical units that it controls are accessible -via the device nodes, -.Pa /dev/da Ns Ar Y , -where -.Ar Y -is the logical unit number. -.Sh HARDWARE -The -.Nm -driver supports the following SATA RAID controllers: -.Pp -.Bl -bullet -compact -.It -AMCC's 3ware 9500S-4LP -.It -AMCC's 3ware 9500S-8 -.It -AMCC's 3ware 9500S-8MI -.It -AMCC's 3ware 9500S-12 -.It -AMCC's 3ware 9500S-12MI -.It -AMCC's 3ware 9500SX-4LP -.It -AMCC's 3ware 9500SX-8LP -.It -AMCC's 3ware 9500SX-12 -.It -AMCC's 3ware 9500SX-12MI -.It -AMCC's 3ware 9500SX-16ML -.It -AMCC's 3ware 9550SX-4LP -.It -AMCC's 3ware 9550SX-8LP -.It -AMCC's 3ware 9550SX-12 -.It -AMCC's 3ware 9550SX-12MI -.It -AMCC's 3ware 9550SX-16ML -.It -AMCC's 3ware 9650SE-2LP -.It -AMCC's 3ware 9650SE-4LPML -.It -AMCC's 3ware 9650SE-8LPML -.It -AMCC's 3ware 9650SE-12ML -.It -AMCC's 3ware 9650SE-16ML -.It -AMCC's 3ware 9650SE-24M8 -.El -.Sh DIAGNOSTICS -Whenever the driver encounters a command failure, it prints out an error code in -the format: -.Qq Li "ERROR: (: ):" , -followed by a text description of the error. -There are other error messages and warnings that the -driver prints out, depending on the kinds of errors that it encounters. -If the driver is compiled with -.Dv TWA_DEBUG -defined, it prints out a whole bunch of debug -messages, the quantity of which varies depending on the value assigned to -.Dv TWA_DEBUG -(0 to 10). -.Sh AUTHORS -The -.Nm -driver and manpage were written by -.An Vinod Kashyap Aq Mt vkashyap@FreeBSD.org . diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index f0bc090e376e..60d2d0376aac 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -182,7 +182,6 @@ device ses # Enclosure Services (SES and SAF-TE) device arcmsr # Areca SATA II RAID device ciss # Compaq Smart RAID 5* device ips # IBM (Adaptec) ServeRAID -device twa # 3ware 9000 series PATA/SATA RAID device smartpqi # Microsemi smartpqi driver device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES index ce1cf6bb76ce..8cb84d6248c2 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -406,13 +406,6 @@ device arcmsr # Areca SATA II RAID # device smartpqi -# -# 3ware 9000 series PATA/SATA RAID controller driver and options. -# The driver is implemented as a SIM, and so, needs the CAM infrastructure. -# -options TWA_DEBUG # 0-10; 10 prints the most messages. -device twa # 3ware 9000 series PATA/SATA RAID - # # Adaptec FSA RAID controllers, including integrated DELL controllers, # the Dell PERC 2/QC and the HP NetRAID-4M diff --git a/sys/conf/files b/sys/conf/files index 4f084a2733a7..0c54622e2563 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3205,18 +3205,6 @@ dev/syscons/warp/warp_saver.c optional warp_saver dev/tcp_log/tcp_log_dev.c optional tcp_blackbox inet | tcp_blackbox inet6 dev/tdfx/tdfx_pci.c optional tdfx pci dev/ti/if_ti.c optional ti pci -dev/twa/tw_cl_init.c optional twa \ - compile-with "${NORMAL_C} -I$S/dev/twa" -dev/twa/tw_cl_intr.c optional twa \ - compile-with "${NORMAL_C} -I$S/dev/twa" -dev/twa/tw_cl_io.c optional twa \ - compile-with "${NORMAL_C} -I$S/dev/twa" -dev/twa/tw_cl_misc.c optional twa \ - compile-with "${NORMAL_C} -I$S/dev/twa" -dev/twa/tw_osl_cam.c optional twa \ - compile-with "${NORMAL_C} -I$S/dev/twa" -dev/twa/tw_osl_freebsd.c optional twa \ - compile-with "${NORMAL_C} -I$S/dev/twa" dev/twe/twe.c optional twe dev/twe/twe_freebsd.c optional twe dev/tws/tws.c optional tws diff --git a/sys/conf/options b/sys/conf/options index 58cb6458b656..123a770ed74c 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -43,8 +43,6 @@ AHD_DEBUG_OPTS opt_aic79xx.h AHD_TMODE_ENABLE opt_aic79xx.h AHD_REG_PRETTY_PRINT opt_aic79xx.h -TWA_DEBUG opt_twa.h - # Debugging options. ALT_BREAK_TO_DEBUGGER opt_kdb.h BREAK_TO_DEBUGGER opt_kdb.h diff --git a/sys/dev/twa/tw_cl.h b/sys/dev/twa/tw_cl.h deleted file mode 100644 index 8f047329c318..000000000000 --- a/sys/dev/twa/tw_cl.h +++ /dev/null @@ -1,324 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2004-07 Applied Micro Circuits Corporation. - * Copyright (c) 2004-05 Vinod Kashyap - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -/* - * AMCC'S 3ware driver for 9000 series storage controllers. - * - * Author: Vinod Kashyap - * Modifications by: Adam Radford - */ - -#ifndef TW_CL_H - -#define TW_CL_H - -/* - * Common Layer internal macros, structures and functions. - */ - -#define TW_CLI_SECTOR_SIZE 0x200 -#define TW_CLI_REQUEST_TIMEOUT_PERIOD 60 /* seconds */ -#define TW_CLI_RESET_TIMEOUT_PERIOD 60 /* seconds */ -#define TW_CLI_MAX_RESET_ATTEMPTS 2 - -/* Possible values of ctlr->ioctl_lock.lock. */ -#define TW_CLI_LOCK_FREE 0x0 /* lock is free */ -#define TW_CLI_LOCK_HELD 0x1 /* lock is held */ - -/* Possible values of req->state. */ -#define TW_CLI_REQ_STATE_INIT 0x0 /* being initialized */ -#define TW_CLI_REQ_STATE_BUSY 0x1 /* submitted to controller */ -#define TW_CLI_REQ_STATE_PENDING 0x2 /* in pending queue */ -#define TW_CLI_REQ_STATE_COMPLETE 0x3 /* completed by controller */ - -/* Possible values of req->flags. */ -#define TW_CLI_REQ_FLAGS_7K (1<<0) /* 7000 cmd pkt */ -#define TW_CLI_REQ_FLAGS_9K (1<<1) /* 9000 cmd pkt */ -#define TW_CLI_REQ_FLAGS_INTERNAL (1<<2) /* internal request */ -#define TW_CLI_REQ_FLAGS_PASSTHRU (1<<3) /* passthru request */ -#define TW_CLI_REQ_FLAGS_EXTERNAL (1<<4) /* external request */ - -#ifdef TW_OSL_PCI_CONFIG_ACCESSIBLE -/* Register offsets in PCI config space. */ -#define TW_CLI_PCI_CONFIG_COMMAND_OFFSET 0x4 /* cmd register offset */ -#define TW_CLI_PCI_CONFIG_STATUS_OFFSET 0x6 /* status register offset */ -#endif /* TW_OSL_PCI_CONFIG_ACCESSIBLE */ - -#ifdef TW_OSL_DEBUG -struct tw_cli_q_stats { - TW_UINT32 cur_len;/* current # of entries in q */ - TW_UINT32 max_len; /* max # of entries in q, ever reached */ -}; -#endif /* TW_OSL_DEBUG */ - -/* Queues of CL internal request context packets. */ -#define TW_CLI_FREE_Q 0 /* free q */ -#define TW_CLI_BUSY_Q 1 /* q of reqs submitted to fw */ -#define TW_CLI_PENDING_Q 2 /* q of reqs deferred due to 'q full' */ -#define TW_CLI_COMPLETE_Q 3 /* q of reqs completed by fw */ -#define TW_CLI_RESET_Q 4 /* q of reqs reset by timeout */ -#define TW_CLI_Q_COUNT 5 /* total number of queues */ - -/* CL's internal request context. */ -struct tw_cli_req_context { - struct tw_cl_req_handle *req_handle;/* handle to track requests between - OSL & CL */ - struct tw_cli_ctlr_context *ctlr; /* ptr to CL's controller context */ - struct tw_cl_command_packet *cmd_pkt;/* ptr to ctlr cmd pkt */ - TW_UINT64 cmd_pkt_phys; /* cmd pkt physical address */ - TW_VOID *data; /* ptr to data being passed to fw */ - TW_UINT32 length; /* length of data being passed to fw */ - TW_UINT64 data_phys; /* physical address of data */ - - TW_UINT32 state; /* request state */ - TW_UINT32 flags; /* request flags */ - - TW_UINT32 error_code; /* error encountered before submission - of request to fw, if any */ - - TW_VOID *orig_req; /* ptr to original request for use - during callback */ - TW_VOID (*tw_cli_callback)(struct tw_cli_req_context *req); - /* CL internal callback */ - TW_UINT32 request_id; /* request id for tracking with fw */ - struct tw_cl_link link; /* to link this request in a list */ -}; - -/* CL's internal controller context. */ -struct tw_cli_ctlr_context { - struct tw_cl_ctlr_handle *ctlr_handle; /* handle to track ctlr between - OSL & CL. */ - struct tw_cli_req_context *req_ctxt_buf;/* pointer to the array of CL's - internal request context pkts */ - struct tw_cl_command_packet *cmd_pkt_buf;/* ptr to array of cmd pkts */ - - TW_UINT64 cmd_pkt_phys; /* phys addr of cmd_pkt_buf */ - - TW_UINT32 device_id; /* controller device id */ - TW_UINT32 arch_id; /* controller architecture id */ - TW_UINT8 active; /* Initialization done, and controller is active. */ - TW_UINT8 interrupts_enabled; /* Interrupts on controller enabled. */ - TW_UINT8 internal_req_busy; /* Data buffer for internal requests in use. */ - TW_UINT8 get_more_aens; /* More AEN's need to be retrieved. */ - TW_UINT8 reset_needed; /* Controller needs a soft reset. */ - TW_UINT8 reset_in_progress; /* Controller is being reset. */ - TW_UINT8 reset_phase1_in_progress; /* In 'phase 1' of reset. */ - TW_UINT32 flags; /* controller settings */ - TW_UINT32 sg_size_factor; /* SG element size should be a - multiple of this */ - - /* Request queues and arrays. */ - struct tw_cl_link req_q_head[TW_CLI_Q_COUNT]; - - TW_UINT8 *internal_req_data;/* internal req data buf */ - TW_UINT64 internal_req_data_phys;/* phys addr of internal - req data buf */ - TW_UINT32 max_simult_reqs; /* max simultaneous requests - supported */ - TW_UINT32 max_aens_supported;/* max AEN's supported */ - /* AEN handler fields. */ - struct tw_cl_event_packet *aen_queue; /* circular queue of AENs from - firmware/CL/OSL */ - TW_UINT32 aen_head; /* AEN queue head */ - TW_UINT32 aen_tail; /* AEN queue tail */ - TW_UINT32 aen_cur_seq_id; /* index of the last event+1 */ - TW_UINT32 aen_q_overflow; /* indicates if unretrieved - events were overwritten */ - TW_UINT32 aen_q_wrapped; /* indicates if AEN queue ever - wrapped */ - - TW_UINT16 working_srl; /* driver & firmware negotiated - srl */ - TW_UINT16 working_branch; /* branch # of the firmware - that the driver is compatible with */ - TW_UINT16 working_build; /* build # of the firmware - that the driver is compatible with */ - TW_UINT16 fw_on_ctlr_srl; /* srl of running firmware */ - TW_UINT16 fw_on_ctlr_branch;/* branch # of running - firmware */ - TW_UINT16 fw_on_ctlr_build;/* build # of running - firmware */ - TW_UINT32 operating_mode; /* base mode/current mode */ - - TW_INT32 host_intr_pending;/* host intr processing - needed */ - TW_INT32 attn_intr_pending;/* attn intr processing - needed */ - TW_INT32 cmd_intr_pending;/* cmd intr processing - needed */ - TW_INT32 resp_intr_pending;/* resp intr processing - needed */ - - TW_LOCK_HANDLE gen_lock_handle;/* general purpose lock */ - TW_LOCK_HANDLE *gen_lock;/* ptr to general purpose lock */ - TW_LOCK_HANDLE io_lock_handle; /* lock held during cmd - submission */ - TW_LOCK_HANDLE *io_lock;/* ptr to lock held during cmd - submission */ - -#ifdef TW_OSL_CAN_SLEEP - TW_SLEEP_HANDLE sleep_handle; /* handle to co-ordinate sleeps - & wakeups */ -#endif /* TW_OSL_CAN_SLEEP */ - - struct { - TW_UINT32 lock; /* lock state */ - TW_TIME timeout; /* time at which the lock will - become available, even if not - explicitly released */ - } ioctl_lock; /* lock for use by user applications, for - synchronization between ioctl calls */ -#ifdef TW_OSL_DEBUG - struct tw_cli_q_stats q_stats[TW_CLI_Q_COUNT];/* queue statistics */ -#endif /* TW_OSL_DEBUG */ -}; - -/* - * Queue primitives - */ - -#ifdef TW_OSL_DEBUG - -#define TW_CLI_Q_INIT(ctlr, q_type) do { \ - (ctlr)->q_stats[q_type].cur_len = 0; \ - (ctlr)->q_stats[q_type].max_len = 0; \ -} while (0) - -#define TW_CLI_Q_INSERT(ctlr, q_type) do { \ - struct tw_cli_q_stats *q_stats = &((ctlr)->q_stats[q_type]); \ - \ - if (++(q_stats->cur_len) > q_stats->max_len) \ - q_stats->max_len = q_stats->cur_len; \ -} while (0) - -#define TW_CLI_Q_REMOVE(ctlr, q_type) \ - (ctlr)->q_stats[q_type].cur_len-- - -#else /* TW_OSL_DEBUG */ - -#define TW_CLI_Q_INIT(ctlr, q_index) -#define TW_CLI_Q_INSERT(ctlr, q_index) -#define TW_CLI_Q_REMOVE(ctlr, q_index) - -#endif /* TW_OSL_DEBUG */ - -/* Initialize a queue of requests. */ -static __inline TW_VOID -tw_cli_req_q_init(struct tw_cli_ctlr_context *ctlr, TW_UINT8 q_type) -{ - TW_CL_Q_INIT(&(ctlr->req_q_head[q_type])); - TW_CLI_Q_INIT(ctlr, q_type); -} - -/* Insert the given request at the head of the given queue (q_type). */ -static __inline TW_VOID -tw_cli_req_q_insert_head(struct tw_cli_req_context *req, TW_UINT8 q_type) -{ - struct tw_cli_ctlr_context *ctlr = req->ctlr; - - tw_osl_get_lock(ctlr->ctlr_handle, ctlr->gen_lock); - TW_CL_Q_INSERT_HEAD(&(ctlr->req_q_head[q_type]), &(req->link)); - TW_CLI_Q_INSERT(ctlr, q_type); - tw_osl_free_lock(ctlr->ctlr_handle, ctlr->gen_lock); -} - -/* Insert the given request at the tail of the given queue (q_type). */ -static __inline TW_VOID -tw_cli_req_q_insert_tail(struct tw_cli_req_context *req, TW_UINT8 q_type) -{ - struct tw_cli_ctlr_context *ctlr = req->ctlr; - - tw_osl_get_lock(ctlr->ctlr_handle, ctlr->gen_lock); - TW_CL_Q_INSERT_TAIL(&(ctlr->req_q_head[q_type]), &(req->link)); - TW_CLI_Q_INSERT(ctlr, q_type); - tw_osl_free_lock(ctlr->ctlr_handle, ctlr->gen_lock); -} - -/* Remove and return the request at the head of the given queue (q_type). */ -static __inline struct tw_cli_req_context * -tw_cli_req_q_remove_head(struct tw_cli_ctlr_context *ctlr, TW_UINT8 q_type) -{ - struct tw_cli_req_context *req = TW_CL_NULL; - struct tw_cl_link *link; - - tw_osl_get_lock(ctlr->ctlr_handle, ctlr->gen_lock); - if ((link = TW_CL_Q_FIRST_ITEM(&(ctlr->req_q_head[q_type]))) != - TW_CL_NULL) { - req = TW_CL_STRUCT_HEAD(link, - struct tw_cli_req_context, link); - TW_CL_Q_REMOVE_ITEM(&(ctlr->req_q_head[q_type]), &(req->link)); - TW_CLI_Q_REMOVE(ctlr, q_type); - } - tw_osl_free_lock(ctlr->ctlr_handle, ctlr->gen_lock); - return(req); -} - -/* Remove the given request from the given queue (q_type). */ -static __inline TW_VOID -tw_cli_req_q_remove_item(struct tw_cli_req_context *req, TW_UINT8 q_type) -{ - struct tw_cli_ctlr_context *ctlr = req->ctlr; - - tw_osl_get_lock(ctlr->ctlr_handle, ctlr->gen_lock); - TW_CL_Q_REMOVE_ITEM(&(ctlr->req_q_head[q_type]), &(req->link)); - TW_CLI_Q_REMOVE(ctlr, q_type); - tw_osl_free_lock(ctlr->ctlr_handle, ctlr->gen_lock); -} - -/* Create an event packet for an event/error posted by the controller. */ -#define tw_cli_create_ctlr_event(ctlr, event_src, cmd_hdr) do { \ - TW_UINT8 severity = \ - GET_SEVERITY((cmd_hdr)->status_block.res__severity); \ - \ - tw_cl_create_event(ctlr->ctlr_handle, TW_CL_TRUE, event_src, \ - (cmd_hdr)->status_block.error, \ - severity, \ - tw_cli_severity_string_table[severity], \ - (cmd_hdr)->err_specific_desc + \ - tw_osl_strlen((cmd_hdr)->err_specific_desc) + 1, \ - (cmd_hdr)->err_specific_desc); \ - /* Print 18 bytes of sense information. */ \ - tw_cli_dbg_printf(2, ctlr->ctlr_handle, \ - tw_osl_cur_func(), \ - "sense info: %x %x %x %x %x %x %x %x %x " \ - "%x %x %x %x %x %x %x %x %x", \ - (cmd_hdr)->sense_data[0], (cmd_hdr)->sense_data[1], \ - (cmd_hdr)->sense_data[2], (cmd_hdr)->sense_data[3], \ - (cmd_hdr)->sense_data[4], (cmd_hdr)->sense_data[5], \ - (cmd_hdr)->sense_data[6], (cmd_hdr)->sense_data[7], \ - (cmd_hdr)->sense_data[8], (cmd_hdr)->sense_data[9], \ - (cmd_hdr)->sense_data[10], (cmd_hdr)->sense_data[11], \ - (cmd_hdr)->sense_data[12], (cmd_hdr)->sense_data[13], \ - (cmd_hdr)->sense_data[14], (cmd_hdr)->sense_data[15], \ - (cmd_hdr)->sense_data[16], (cmd_hdr)->sense_data[17]); \ -} while (0) - -#endif /* TW_CL_H */ diff --git a/sys/dev/twa/tw_cl_externs.h b/sys/dev/twa/tw_cl_externs.h deleted file mode 100644 index 30ad4a297e06..000000000000 --- a/sys/dev/twa/tw_cl_externs.h +++ /dev/null @@ -1,191 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2004-07 Applied Micro Circuits Corporation. - * Copyright (c) 2004-05 Vinod Kashyap - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -/* - * AMCC'S 3ware driver for 9000 series storage controllers. - * - * Author: Vinod Kashyap - * Modifications by: Adam Radford - */ - -#ifndef TW_CL_EXTERNS_H - -#define TW_CL_EXTERNS_H - -/* - * Data structures and functions global to the Common Layer. - */ - -extern TW_INT8 tw_cli_fw_img[]; -extern TW_INT32 tw_cli_fw_img_size; -extern TW_INT8 *tw_cli_severity_string_table[]; - -/* Do controller initialization. */ -extern TW_INT32 tw_cli_start_ctlr(struct tw_cli_ctlr_context *ctlr); - -/* Establish a logical connection with the firmware on the controller. */ -extern TW_INT32 tw_cli_init_connection(struct tw_cli_ctlr_context *ctlr, - TW_UINT16 message_credits, TW_UINT32 set_features, - TW_UINT16 current_fw_srl, TW_UINT16 current_fw_arch_id, - TW_UINT16 current_fw_branch, TW_UINT16 current_fw_build, - TW_UINT16 *fw_on_ctlr_srl, TW_UINT16 *fw_on_ctlr_arch_id, - TW_UINT16 *fw_on_ctlr_branch, TW_UINT16 *fw_on_ctlr_build, - TW_UINT32 *init_connect_result); - -/* Functions in tw_cl_io.c */ - -/* Submit a command packet to the firmware on the controller. */ -extern TW_INT32 tw_cli_submit_cmd(struct tw_cli_req_context *req); - -/* Get a firmware parameter. */ -extern TW_INT32 tw_cli_get_param(struct tw_cli_ctlr_context *ctlr, - TW_INT32 table_id, TW_INT32 parameter_id, TW_VOID *param_data, - TW_INT32 size, TW_VOID (* callback)(struct tw_cli_req_context *req)); - -/* Set a firmware parameter. */ -extern TW_INT32 tw_cli_set_param(struct tw_cli_ctlr_context *ctlr, - TW_INT32 table_id, TW_INT32 param_id, TW_INT32 param_size, - TW_VOID *data, TW_VOID (* callback)(struct tw_cli_req_context *req)); - -/* Submit a command to the firmware and poll for completion. */ -extern TW_INT32 tw_cli_submit_and_poll_request(struct tw_cli_req_context *req, - TW_UINT32 timeout); - -/* Soft reset the controller. */ -extern TW_INT32 tw_cli_soft_reset(struct tw_cli_ctlr_context *ctlr); -extern int twa_setup_intr(struct twa_softc *sc); -extern int twa_teardown_intr(struct twa_softc *sc); - -/* Send down a SCSI command to the firmware (usually, an internal Req Sense. */ -extern TW_INT32 tw_cli_send_scsi_cmd(struct tw_cli_req_context *req, - TW_INT32 cmd); - -/* Get an AEN from the firmware (by sending down a Req Sense). */ -extern TW_INT32 tw_cli_get_aen(struct tw_cli_ctlr_context *ctlr); - -/* Fill in the scatter/gather list. */ -extern TW_VOID tw_cli_fill_sg_list(struct tw_cli_ctlr_context *ctlr, - TW_VOID *sgl_src, TW_VOID *sgl_dest, TW_INT32 num_sgl_entries); - -/* Functions in tw_cl_intr.c */ - -/* Process a host interrupt. */ -extern TW_VOID tw_cli_process_host_intr(struct tw_cli_ctlr_context *ctlr); - -/* Process an attention interrupt. */ -extern TW_VOID tw_cli_process_attn_intr(struct tw_cli_ctlr_context *ctlr); - -/* Process a command interrupt. */ -extern TW_VOID tw_cli_process_cmd_intr(struct tw_cli_ctlr_context *ctlr); - -/* Process a response interrupt from the controller. */ -extern TW_INT32 tw_cli_process_resp_intr(struct tw_cli_ctlr_context *ctlr); - -/* Submit any requests in the pending queue to the firmware. */ -extern TW_INT32 tw_cli_submit_pending_queue(struct tw_cli_ctlr_context *ctlr); - -/* Process all requests in the complete queue. */ -extern TW_VOID tw_cli_process_complete_queue(struct tw_cli_ctlr_context *ctlr); - -/* CL internal callback for SCSI/fw passthru requests. */ -extern TW_VOID tw_cli_complete_io(struct tw_cli_req_context *req); - -/* Completion routine for SCSI requests. */ -extern TW_VOID tw_cli_scsi_complete(struct tw_cli_req_context *req); - -/* Callback for get/set param requests. */ -extern TW_VOID tw_cli_param_callback(struct tw_cli_req_context *req); - -/* Callback for Req Sense commands to get AEN's. */ -extern TW_VOID tw_cli_aen_callback(struct tw_cli_req_context *req); - -/* Decide what to do with a retrieved AEN. */ -extern TW_UINT16 tw_cli_manage_aen(struct tw_cli_ctlr_context *ctlr, - struct tw_cli_req_context *req); - -/* Enable controller interrupts. */ -extern TW_VOID - tw_cli_enable_interrupts(struct tw_cli_ctlr_context *ctlr_handle); - -/* Disable controller interrupts. */ -extern TW_VOID - tw_cli_disable_interrupts(struct tw_cli_ctlr_context *ctlr_handle); - -/* Functions in tw_cl_misc.c */ - -/* Print if dbg_level is appropriate (by calling OS Layer). */ -extern TW_VOID tw_cli_dbg_printf(TW_UINT8 dbg_level, - struct tw_cl_ctlr_handle *ctlr_handle, const TW_INT8 *cur_func, - TW_INT8 *fmt, ...); - -/* Describe meaning of each set bit in the given register. */ -extern TW_INT8 *tw_cli_describe_bits(TW_UINT32 reg, TW_INT8 *str); - -/* Complete all requests in the complete queue with a RESET status. */ -extern TW_VOID tw_cli_drain_complete_queue(struct tw_cli_ctlr_context *ctlr); - -/* Complete all requests in the busy queue with a RESET status. */ -extern TW_VOID tw_cli_drain_busy_queue(struct tw_cli_ctlr_context *ctlr); - -/* Complete all requests in the pending queue with a RESET status. */ -extern TW_VOID tw_cli_drain_pending_queue(struct tw_cli_ctlr_context *ctlr); - -/* Drain the controller response queue. */ -extern TW_INT32 tw_cli_drain_response_queue(struct tw_cli_ctlr_context *ctlr); - -/* Find a particular response in the controller response queue. */ -extern TW_INT32 tw_cli_find_response(struct tw_cli_ctlr_context *ctlr, - TW_INT32 req_id); - -/* Drain the controller AEN queue. */ -extern TW_INT32 tw_cli_drain_aen_queue(struct tw_cli_ctlr_context *ctlr); - -/* Determine if a given AEN has been posted by the firmware. */ -extern TW_INT32 tw_cli_find_aen(struct tw_cli_ctlr_context *ctlr, - TW_UINT16 aen_code); - -/* Poll for a given status to show up in the firmware status register. */ -extern TW_INT32 tw_cli_poll_status(struct tw_cli_ctlr_context *ctlr, - TW_UINT32 status, TW_UINT32 timeout); - -/* Get a free CL internal request context packet. */ -extern struct tw_cli_req_context * - tw_cli_get_request(struct tw_cli_ctlr_context *ctlr - ); - -/* Notify OSL of controller info (fw/BIOS versions, etc.). */ -extern TW_VOID tw_cli_notify_ctlr_info(struct tw_cli_ctlr_context *ctlr); - -/* Make sure that the firmware status register reports a proper status. */ -extern TW_INT32 tw_cli_check_ctlr_state(struct tw_cli_ctlr_context *ctlr, - TW_UINT32 status_reg); - -#endif /* TW_CL_EXTERNS_H */ diff --git a/sys/dev/twa/tw_cl_fwif.h b/sys/dev/twa/tw_cl_fwif.h deleted file mode 100644 index cade2249d820..000000000000 --- a/sys/dev/twa/tw_cl_fwif.h +++ /dev/null @@ -1,418 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2004-07 Applied Micro Circuits Corporation. - * Copyright (c) 2004-05 Vinod Kashyap - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -/* - * AMCC'S 3ware driver for 9000 series storage controllers. - * - * Author: Vinod Kashyap - * Modifications by: Adam Radford - */ - -#ifndef TW_CL_FWIF_H - -#define TW_CL_FWIF_H - -/* - * Macros and data structures for interfacing with the firmware. - */ - -/* Register offsets from base address. */ -#define TWA_CONTROL_REGISTER_OFFSET 0x0 -#define TWA_STATUS_REGISTER_OFFSET 0x4 -#define TWA_COMMAND_QUEUE_OFFSET 0x8 -#define TWA_RESPONSE_QUEUE_OFFSET 0xC -#define TWA_COMMAND_QUEUE_OFFSET_LOW 0x20 -#define TWA_COMMAND_QUEUE_OFFSET_HIGH 0x24 -#define TWA_LARGE_RESPONSE_QUEUE_OFFSET 0x30 - -/* Control register bit definitions. */ -#define TWA_CONTROL_ISSUE_HOST_INTERRUPT 0x00000020 -#define TWA_CONTROL_DISABLE_INTERRUPTS 0x00000040 -#define TWA_CONTROL_ENABLE_INTERRUPTS 0x00000080 -#define TWA_CONTROL_ISSUE_SOFT_RESET 0x00000100 -#define TWA_CONTROL_UNMASK_RESPONSE_INTERRUPT 0x00004000 -#define TWA_CONTROL_UNMASK_COMMAND_INTERRUPT 0x00008000 -#define TWA_CONTROL_MASK_RESPONSE_INTERRUPT 0x00010000 -#define TWA_CONTROL_MASK_COMMAND_INTERRUPT 0x00020000 -#define TWA_CONTROL_CLEAR_ATTENTION_INTERRUPT 0x00040000 -#define TWA_CONTROL_CLEAR_HOST_INTERRUPT 0x00080000 -#define TWA_CONTROL_CLEAR_PCI_ABORT 0x00100000 -#define TWA_CONTROL_CLEAR_QUEUE_ERROR 0x00400000 -#define TWA_CONTROL_CLEAR_PARITY_ERROR 0x00800000 - -/* Status register bit definitions. */ -#define TWA_STATUS_ROM_BIOS_IN_SBUF 0x00000002 -#define TWA_STATUS_COMMAND_QUEUE_EMPTY 0x00001000 -#define TWA_STATUS_MICROCONTROLLER_READY 0x00002000 -#define TWA_STATUS_RESPONSE_QUEUE_EMPTY 0x00004000 -#define TWA_STATUS_COMMAND_QUEUE_FULL 0x00008000 -#define TWA_STATUS_RESPONSE_INTERRUPT 0x00010000 -#define TWA_STATUS_COMMAND_INTERRUPT 0x00020000 -#define TWA_STATUS_ATTENTION_INTERRUPT 0x00040000 -#define TWA_STATUS_HOST_INTERRUPT 0x00080000 -#define TWA_STATUS_PCI_ABORT_INTERRUPT 0x00100000 -#define TWA_STATUS_MICROCONTROLLER_ERROR 0x00200000 -#define TWA_STATUS_QUEUE_ERROR_INTERRUPT 0x00400000 -#define TWA_STATUS_PCI_PARITY_ERROR_INTERRUPT 0x00800000 -#define TWA_STATUS_MINOR_VERSION_MASK 0x0F000000 -#define TWA_STATUS_MAJOR_VERSION_MASK 0xF0000000 - -#define TWA_STATUS_UNEXPECTED_BITS 0x00D00000 - -/* PCI related defines. */ -#define TWA_IO_CONFIG_REG 0x10 - -#define TWA_PCI_CONFIG_CLEAR_PARITY_ERROR 0xc100 -#define TWA_PCI_CONFIG_CLEAR_PCI_ABORT 0x2000 - -#define TWA_RESET_PHASE1_NOTIFICATION_RESPONSE 0xFFFF -#define TWA_RESET_PHASE1_WAIT_TIME_MS 500 - -/* Command packet opcodes. */ -#define TWA_FW_CMD_NOP 0x00 -#define TWA_FW_CMD_INIT_CONNECTION 0x01 -#define TWA_FW_CMD_READ 0x02 -#define TWA_FW_CMD_WRITE 0x03 -#define TWA_FW_CMD_READVERIFY 0x04 -#define TWA_FW_CMD_VERIFY 0x05 -#define TWA_FW_CMD_ZEROUNIT 0x08 -#define TWA_FW_CMD_REPLACEUNIT 0x09 -#define TWA_FW_CMD_HOTSWAP 0x0A -#define TWA_FW_CMD_SELFTESTS 0x0B -#define TWA_FW_CMD_SYNC_PARAM 0x0C -#define TWA_FW_CMD_REORDER_UNITS 0x0D - -#define TWA_FW_CMD_EXECUTE_SCSI 0x10 -#define TWA_FW_CMD_ATA_PASSTHROUGH 0x11 -#define TWA_FW_CMD_GET_PARAM 0x12 -#define TWA_FW_CMD_SET_PARAM 0x13 -#define TWA_FW_CMD_CREATEUNIT 0x14 -#define TWA_FW_CMD_DELETEUNIT 0x15 -#define TWA_FW_CMD_DOWNLOAD_FIRMWARE 0x16 -#define TWA_FW_CMD_REBUILDUNIT 0x17 -#define TWA_FW_CMD_POWER_MANAGEMENT 0x18 - -#define TWA_FW_CMD_REMOTE_PRINT 0x1B -#define TWA_FW_CMD_HARD_RESET_FIRMWARE 0x1C -#define TWA_FW_CMD_DEBUG 0x1D - -#define TWA_FW_CMD_DIAGNOSTICS 0x1F - -/* Misc defines. */ -#define TWA_SHUTDOWN_MESSAGE_CREDITS 0x001 -#define TWA_64BIT_SG_ADDRESSES 0x00000001 -#define TWA_EXTENDED_INIT_CONNECT 0x00000002 -#define TWA_BASE_MODE 1 -#define TWA_BASE_FW_SRL 24 -#define TWA_BASE_FW_BRANCH 0 -#define TWA_BASE_FW_BUILD 1 -#define TWA_CURRENT_FW_SRL 41 -#define TWA_CURRENT_FW_BRANCH_9K 4 -#define TWA_CURRENT_FW_BUILD_9K 8 -#define TWA_CURRENT_FW_BRANCH_9K_X 8 -#define TWA_CURRENT_FW_BUILD_9K_X 4 -#define TWA_MULTI_LUN_FW_SRL 28 -#define TWA_ARCH_ID_9K 0x5 /* 9000 PCI controllers */ -#define TWA_ARCH_ID_9K_X 0x6 /* 9000 PCI-X controllers */ -#define TWA_CTLR_FW_SAME_OR_NEWER 0x00000001 -#define TWA_CTLR_FW_COMPATIBLE 0x00000002 -#define TWA_SENSE_DATA_LENGTH 18 - -#define TWA_ARCH_ID(device_id) \ - (((device_id) == TW_CL_DEVICE_ID_9K) ? TWA_ARCH_ID_9K : \ - TWA_ARCH_ID_9K_X) -#define TWA_CURRENT_FW_BRANCH(arch_id) \ - (((arch_id) == TWA_ARCH_ID_9K) ? TWA_CURRENT_FW_BRANCH_9K : \ - TWA_CURRENT_FW_BRANCH_9K_X) -#define TWA_CURRENT_FW_BUILD(arch_id) \ - (((arch_id) == TWA_ARCH_ID_9K) ? TWA_CURRENT_FW_BUILD_9K : \ - TWA_CURRENT_FW_BUILD_9K_X) - -/* - * All SG addresses and DMA'able memory allocated by the OSL should be - * TWA_ALIGNMENT bytes aligned, and have a size that is a multiple of - * TWA_SG_ELEMENT_SIZE_FACTOR. - */ -#define TWA_ALIGNMENT(device_id) 0x4 -#define TWA_SG_ELEMENT_SIZE_FACTOR(device_id) \ - (((device_id) == TW_CL_DEVICE_ID_9K) ? 512 : 4) - -/* - * Some errors of interest (in cmd_hdr->status_block.error) when a command - * is completed by the firmware with a bad status. - */ -#define TWA_ERROR_LOGICAL_UNIT_NOT_SUPPORTED 0x010a -#define TWA_ERROR_UNIT_OFFLINE 0x0128 -#define TWA_ERROR_MORE_DATA 0x0231 - -/* AEN codes of interest. */ -#define TWA_AEN_QUEUE_EMPTY 0x00 -#define TWA_AEN_SOFT_RESET 0x01 -#define TWA_AEN_SYNC_TIME_WITH_HOST 0x31 *** 8284 LINES SKIPPED *** From nobody Thu Nov 25 07:46:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3DD7418A123D; Thu, 25 Nov 2021 07:47:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J091v0t4Dz4sMR; Thu, 25 Nov 2021 07:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A82201987C; Thu, 25 Nov 2021 07:46: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 1AP7kw2n050011; Thu, 25 Nov 2021 07:46:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP7kwTY050010; Thu, 25 Nov 2021 07:46:58 GMT (envelope-from git) Date: Thu, 25 Nov 2021 07:46:58 GMT Message-Id: <202111250746.1AP7kwTY050010@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: 37c03d4de3d2 - main - ObsoleteFiles: Remove old CAM driver man 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37c03d4de3d2104336adbb67a9aa2aa681b6d042 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637826420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IH2M+TsmBt8G6qfNgWxSQvtVgPNsDnaExNQ82Qm5uDc=; b=UVUFkLvnCz5dpWXnQgaZ0rrYS8A/uxdHHBTDPnur4jsX1aCQzywLOerOnHhc0d7/z2QRhe 3OyhdWmXmVvb1+LlYVg8GwES48htqaZKXeT3UXO7SFOHi14J8OBgZnrlSPFpupA45FlPeU aqNWFoxXn3P9OV0WmGT8+ENQZ36Ji5mo0D191/clWUt/v7qrZLdUZb71or21mBuvHyOTUj TsA9nd85Fj4brsnkah3lZ0Q3XNe1dN3NL8MxBl5CQZWpkrkurapg1SaA/lPXkmUIXqQhNZ qhrR1vD4homekGdZWVR/WnNHyJ+qHwWOXJwtozhlEeS0Xx8gLdhSEQ2bZEYsUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637826420; a=rsa-sha256; cv=none; b=d4Ls8qbIFdqfGLNTZSVqHl0H5WHG2lZl3V6lS4dbnUb4mXkywirJ3Fz9OIaUscPFGQVkGz OUFQufgRYGvv4Uh//yqqmN1q1wkK0II4v5KrgAltFbXzm8VOGv2jqinzI0NZ8oSFzuqZCf ZmA7QjrJDAWrVnotMOXETwUf/RMmDplsQ3WJvQfBSwEWjAGfGRizZHPf/V2Amx86kC4azP wfzB0sL9WfM3aqPb+FqV8ltc/cKefSIiNbXQiuAiqrbU4xID3CWNl23atKDqoDDRUvZn1g d/K8iIFbP+XERC7e/JvcNJ+A6d3Eh7x4DJ8EfDUcCnHeA/oNDwjaM2gDhYTeAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=37c03d4de3d2104336adbb67a9aa2aa681b6d042 commit 37c03d4de3d2104336adbb67a9aa2aa681b6d042 Author: Warner Losh AuthorDate: 2021-11-25 07:22:08 +0000 Commit: Warner Losh CommitDate: 2021-11-25 07:45:13 +0000 ObsoleteFiles: Remove old CAM driver man pages Add the old man pages to ObsoleteFiles for amr, esp iir, mly and twa that were slated to be removed before 13.0, but were overlooked. Sponsored by: Netflix --- ObsoleteFiles.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 9bfd496e334b..ac84263ab1b7 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -40,6 +40,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20211125 Old SCSI drivers removed +OLD_FILES+=usr/share/man/man4/amr.4.gz +OLD_FILES+=usr/share/man/man4/esp.4.gz +OLD_FILES+=usr/share/man/man4/iir.4.gz +OLD_FILES+=usr/share/man/man4/mly.4.gz +OLD_FILES+=usr/share/man/man4/twa.4.gz + # 20211120 OLD_FILES+=usr/share/man/man9/kernel_vmount.9.gz From nobody Thu Nov 25 08:55:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4D00118A4A76; Thu, 25 Nov 2021 08: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 4J0BXR72tXz3mny; Thu, 25 Nov 2021 08:55:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C56FA1AB2C; Thu, 25 Nov 2021 08:55: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 1AP8t3MF042266; Thu, 25 Nov 2021 08:55:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP8t3iG042265; Thu, 25 Nov 2021 08:55:03 GMT (envelope-from git) Date: Thu, 25 Nov 2021 08:55:03 GMT Message-Id: <202111250855.1AP8t3iG042265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 68cbe189fdd3 - main - pci: Don't try to read cfg registers of non-existing 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: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68cbe189fdd3c572476f8af9219a5d335f05b51a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637830504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sYHLBcpsRrU3skLqi2gFinHyaV5RaXhVly/F5GJ3yjk=; b=e+LMxA/MCyDzqdXsF+WaFOOuGRF11E62VScGZvLf5ukrOzQNC+bn6c/C+Dtb52ii/orFg9 hTIF2iPgZ0ZbKmEwC8zKpMALLdNPexrke1zZFI2I4wKnv6OulCqq9TliS5k8eGsb5/WLp3 5esMwo5auEQjak3FX5KXrxxxI66SeF+fk/T8UK3jNE1ejFrq4kWfCZ3cywpTAmTzJgeSMq RhcJs3xFvvtV6aK06ds/VLagSM8b930qlyW5NlO+7L7NE+h2rkqpoYG8lfA4JFX2wgoew8 XZyTPdFZi+xlYTAlDdr4AoQhwDFqY5qd+sp9LeTxkgxHp5uk0XVHSL2rdg4E+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637830504; a=rsa-sha256; cv=none; b=VuA6LbIgftD/wg8Uq9hKN28sEQ7XKCUa3pAQ9a4qFrXyiImpQZ3XAOPqENnLesxycNCw+d AgKv4U7ZenFJ1+npJZV5UvzgLIMqnA1f8GMpMrgtTCRniNQZOrG33zAJ+FIjnx/BSon+FK BtIFNOAbU7gsM4gQtMCPeEZITRbja9dQcqwE8B4/2fJJd/Niuvmd80lwXgZlL4xagx0SaW RQ9krQjcmWzJ25IPkOxRaJSqJZjgf50vl+u0d8ycOm7g18eNSU7ckC2WBkwVciPVVB5cvA Ptb9CIJFVZvHz0wtGU4WlhmwMNKNG4y5rW1LlMY6Rp+EcIFpbLfeoHSCdJIWAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=68cbe189fdd3c572476f8af9219a5d335f05b51a commit 68cbe189fdd3c572476f8af9219a5d335f05b51a Author: Kornel Duleba AuthorDate: 2021-11-23 08:13:56 +0000 Commit: Wojciech Macek CommitDate: 2021-11-25 08:53:40 +0000 pci: Don't try to read cfg registers of non-existing devices Instead of returning 0xffs some controllers, such as Layerscape generate an external exception when someone attempts to read any register of config space of a non-existing device other than PCIR_VENDOR. This causes a kernel panic. Fix it by bailing during device enumeration if a device vendor register returns invalid value. (0xffff) Use this opportunity to replace some hardcoded values with a macro. I believe that this change won't have any unintended side-effects since it is safe to assume that vendor == 0xffff -> hdr_type == 0xffff. Sponsored by: Alstom Obtained from: Semihalf Reviewed by: jhb MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D33059 --- sys/dev/pci/pci.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 7493ae1727fb..ecef65477137 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -683,11 +683,12 @@ pci_read_device(device_t pcib, device_t bus, int d, int b, int s, int f) uint16_t vid, did; vid = REG(PCIR_VENDOR, 2); + if (vid == PCIV_INVALID) + return (NULL); + did = REG(PCIR_DEVICE, 2); - if (vid != 0xffff) - return (pci_fill_devinfo(pcib, bus, d, b, s, f, vid, did)); - return (NULL); + return (pci_fill_devinfo(pcib, bus, d, b, s, f, vid, did)); } struct pci_devinfo * @@ -4141,6 +4142,10 @@ pci_add_children(device_t dev, int domain, int busno) pcifunchigh = 0; f = 0; DELAY(1); + + /* If function 0 is not present, skip to the next slot. */ + if (REG(PCIR_VENDOR, 2) == PCIV_INVALID) + continue; hdrtype = REG(PCIR_HDRTYPE, 1); if ((hdrtype & PCIM_HDRTYPE) > PCI_MAXHDRTYPE) continue; @@ -4182,7 +4187,7 @@ pci_rescan_method(device_t dev) for (s = 0; s <= maxslots; s++) { /* If function 0 is not present, skip to the next slot. */ f = 0; - if (REG(PCIR_VENDOR, 2) == 0xffff) + if (REG(PCIR_VENDOR, 2) == PCIV_INVALID) continue; pcifunchigh = 0; hdrtype = REG(PCIR_HDRTYPE, 1); @@ -4191,7 +4196,7 @@ pci_rescan_method(device_t dev) if (hdrtype & PCIM_MFDEV) pcifunchigh = PCIB_MAXFUNCS(pcib); for (f = 0; f <= pcifunchigh; f++) { - if (REG(PCIR_VENDOR, 2) == 0xffff) + if (REG(PCIR_VENDOR, 2) == PCIV_INVALID) continue; /* From nobody Thu Nov 25 08:58:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A385F18A55A3; Thu, 25 Nov 2021 08:58:15 +0000 (UTC) (envelope-from C.Koehne@beckhoff.com) Received: from netsrv01.beckhoff.com (netsrv01.beckhoff.com [62.159.14.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.beckhoff.com", Issuer "Thawte TLS RSA CA G1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0Bc65LdDz3nW6; Thu, 25 Nov 2021 08:58:14 +0000 (UTC) (envelope-from C.Koehne@beckhoff.com) Received: from 172.17.2.171 by netsrv01.beckhoff.com (Tls12, Aes256, Sha384, DiffieHellmanEllipticKey256); Thu, 25 Nov 2021 08:58:09 GMT Received: from ex04.beckhoff.com (172.17.5.170) by ex05.beckhoff.com (172.17.2.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.17; Thu, 25 Nov 2021 09:58:06 +0100 Received: from ex04.beckhoff.com ([fe80::e827:f858:3be0:ad6b]) by ex04.beckhoff.com ([fe80::e827:f858:3be0:ad6b%9]) with mapi id 15.01.2375.017; Thu, 25 Nov 2021 09:58:06 +0100 From: =?utf-8?B?Q29ydmluIEvDtmhuZQ==?= To: John Baldwin , Emmanuel Vadot , "src-committers@FreeBSD.org" , "dev-commits-src-all@FreeBSD.org" , "dev-commits-src-main@FreeBSD.org" Subject: RE: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync Thread-Topic: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync Thread-Index: AQHX4EhAtg1PhJfq9EuiAM/NMll7O6wQ1zVggABkTQCAAVQu4IAAOpEAgAEeOKA= Date: Thu, 25 Nov 2021 08:58:05 +0000 Message-ID: <4b164dfd2112482cba7625a0cb04ac1e@beckhoff.com> References: <202111221530.1AMFUUJn079855@gitrepo.freebsd.org> <428e410d-33c1-7ff8-9689-41943db3d9c3@FreeBSD.org> <084d5b5845554221901ce4902fb878d1@beckhoff.com> <0d0a6a77-b2d1-d0c2-f0de-e5c97307e140@FreeBSD.org> <80ac3d256ce94f809a39f5badc864588@beckhoff.com> <78d7b522-3de3-4011-c0cc-98e23779d577@FreeBSD.org> In-Reply-To: <78d7b522-3de3-4011-c0cc-98e23779d577@FreeBSD.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [94.134.94.39] x-olx-disclaimer: EX05.BECKHOFF.COM Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 X-Rspamd-Queue-Id: 4J0Bc65LdDz3nW6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N SGkgSm9obiwNCg0KPiBXaGlsZSBpdCdzIHRydWUgdGhhdCByZWFsIHN5c3RlbXMgZG8gdGhhdCBv biByZXNldCwgbW9zdCBmaXJtd2FyZSBzZXQgdGhvc2UgYml0cw0KPiB3aGlsZSBwb3B1bGF0aW5n IEJBUnMuICBCaHl2ZSBkb2Vzbid0IGFsd2F5cyBydW4gYm9vdCBmaXJtd2FyZSB0byBkbyB0aG9z ZSB0YXNrcw0KPiBhbmQgbmVlZHMgdG8gcHJvdmlkZSB3b3JraW5nIGRldmljZXMgb3V0IG9mIHRo ZSBib3guICBUaGlzIGlzIHNpbWlsYXIgdG8gaG93DQo+IGJoeXZlIHByZS1wb3B1bGF0ZXMgQkFS cyB3aXRoIHJlc291cmNlcyByYXRoZXIgdGhhbiByZWx5aW5nIG9uIGZpcm13YXJlIHRvDQo+IGFz c2lnbiByZXNvdXJjZXMgdG8gQkFScy4NCj4NCj4gLS0NCj4gSm9obiBCYWxkd2luDQoNClNyeSwg SSBmb3Jnb3QgaXQuIEknbSBhbHdheXMgcnVubmluZyBiaHl2ZSB3aXRoIE9WTUYuIFNvIEkgd29u J3Qgc2VlIHN1Y2ggaXNzdWVzLg0KRW5hYmxpbmcgYnVzIG1hc3RlcmluZyBzaG91bGRuJ3QgaHVy dC4gV2hldGhlciBiaHl2ZSBydW5zIGJvb3QgZmlybXdhcmUgb3Igbm90Lg0KU2hvdWxkIGJlIGEg Z29vZCBpZGVhIHRvIGFsd2F5cyBlbmFibGUgaXQgb24gc3RhcnQgdXAuDQpJJ20gdW5zdXJlIGlm IGl0IGNvdWxkIGNhdXNlIHRyb3VibGUgd2hlbiBlbmFibGluZyBJTlR4IGJ5IGRlZmF1bHQuIEkn bSBtaXNzaW5nIHNvbWUNCmluc2lnaHRzIGhvdyBiaHl2ZSdzIElOVHggc3VwcG9ydCB3b3Jrcy4g SWYgeW91IHNheSB0aGF0IHdlIHNob3VsZCBlbmFibGUgaXQgYnkNCmRlZmF1bHQsIEknbGwgdHJ1 c3QgeW91Lg0KDQpXaGF0J3MgeW91ciBwbGFuPyBEbyB5b3Ugd2FudCB0byB1cGRhdGUgeW91ciBw YXRjaCBvciBkbyB5b3Ugd2FudCB0byB3YWl0IHVudGlsDQpzb21lb25lIGlzIGZhY2luZyBzb21l IGlzc3VlcyBkdWUgdG8gZGlzYWJsZWQgYnVzIG1hc3RlcmluZyBvbiBzdGFydHVwPw0KSWYgeW91 IGxpa2UsIEkgY2FuIHVwZGF0ZSB5b3VyIHBhdGNoIHRvby4NCg0KDQpCZXN0IHJlZ2FyZHMNCkNv cnZpbg0KDQpCZWNraG9mZiBBdXRvbWF0aW9uIEdtYkggJiBDby4gS0cgfCBNYW5hZ2luZyBEaXJl Y3RvcjogRGlwbC4gUGh5cy4gSGFucyBCZWNraG9mZg0KUmVnaXN0ZXJlZCBvZmZpY2U6IFZlcmws IEdlcm1hbnkgfCBSZWdpc3RlciBjb3VydDogR3VldGVyc2xvaCBIUkEgNzA3NQ0KDQoNCg== From nobody Thu Nov 25 09:51:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D3869189F4D6; Thu, 25 Nov 2021 09:51: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 4J0CnD3WGyz4ZG5; Thu, 25 Nov 2021 09:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58AEB1B53F; Thu, 25 Nov 2021 09:51: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 1AP9pCCT018060; Thu, 25 Nov 2021 09:51:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP9pCOH018059; Thu, 25 Nov 2021 09:51:12 GMT (envelope-from git) Date: Thu, 25 Nov 2021 09:51:12 GMT Message-Id: <202111250951.1AP9pCOH018059@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: a2f30c5c1e83 - main - amr.4: Remove man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2f30c5c1e837b9379d5f3fc76ee458b6baf7376 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637833872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1wE3ypsxSh2WW08wVe+2NB1j6fVGAOx9o64XD6XrNug=; b=PcnvLJFEUESHZ4CTNl9PvNYBdjkXp+Ah43SMYruzP8H4DkGkTxzoIKdfwhyoBA6M+ScC0q 2JTha0/Af/Dul/9zjb+QYjbEqNifwUAncUYSjt19lhpRap0T960qySUbjrN5CMLJHD2F15 jkVLIL2hJp8OzDdgFJg1JJUynRkSlNO9ssR+PVavFzVdz1DKk3CiN7BZ7i30y6rHdyHRSv j5LThdieCHHO1or808juSlnS6NixMvGXrv+nx9tw6gpXpj7mh31LH6WzZtSLcXLZ8zoHCv rariME+VdZHedRRjiiSLPy6V/hInBphMa4ZvpMLGiLdTAfL9XZehLAeeut37qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637833872; a=rsa-sha256; cv=none; b=IfsaX/Kc0tumvWNwsOBBP/Gk2Vgkp4eIva3GO+T59SVpgbKZaJOQMIqweISgl6R/8Lxcua q8aS//qF4QUlNtWFG+MAL0YfU7CTX7GsUBZ/CQBVyXfvRoroy0Oh5pUlKf3bLIc8XTO0GS oi81RYWQ9Sb70RK7twOHk1U/Mq0o+v7DpKVkkOSXig/wfZQR9VzE67WMfN589kDOpvITLG nZpexvw8XhPvUXZqjaUQlMa6k0r5RuFazydwKdUe6d1o9N64cNDt+spsFqBI2lgIIkl4Gr wL1LKrbtlwCAv1ve/Mkg2TfbJxat2uc2g+TY0ntBCJkJwNTCdWkBEMU9Eow+GQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a2f30c5c1e837b9379d5f3fc76ee458b6baf7376 commit a2f30c5c1e837b9379d5f3fc76ee458b6baf7376 Author: Warner Losh AuthorDate: 2021-11-25 09:49:15 +0000 Commit: Warner Losh CommitDate: 2021-11-25 09:50:12 +0000 amr.4: Remove man page Sponsored by: Netflix --- share/man/man4/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 9504cde7626e..9685bf8bbe9c 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -46,7 +46,6 @@ MAN= aac.4 \ ${_amdsmn.4} \ ${_amdtemp.4} \ ${_bxe.4} \ - amr.4 \ ${_aout.4} \ ${_apic.4} \ arcmsr.4 \ From nobody Thu Nov 25 09:54:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A9087189FBF2 for ; Thu, 25 Nov 2021 09:54:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) (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 4J0Cs74BlGz4ZfX for ; Thu, 25 Nov 2021 09:54:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vk1-xa2a.google.com with SMTP id s17so3481432vka.5 for ; Thu, 25 Nov 2021 01:54:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wpXm1II1/CLWENn5Emh25zCoTBta8roNvZa7GDusZ6A=; b=5Wd57be7iLH0l3iFe9BMSFzhzJNCtRB9C1KzAmhmsvT9mEvfluGuUDiNDvQHoVg9sN L21A5Nv5Oz8Ir6MlqNdboeYq7H/Lh+YfDOb1FAICRnU/3IIi/ZOcKxemszT7x/9gdea0 nvTdVH4Az0Ir7i2r32lWKsxAVUg+YG7WXJuZ9nw1tWaMrPXWMeMwxy13qPkWMpBxota+ 3i5K+AqWsSZK22Cbis4CbzIB7ZC5Dk0PCc/rRY7fYPlfy/2mwKnW0J1IhG+kYWFXyDvT YtlB2b9VLR66Hxqz47/kEFRBIF+CLXmGgVXNbeiQ1abx8nLykDDpkJSxh5OVaFIVnE4s YMaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wpXm1II1/CLWENn5Emh25zCoTBta8roNvZa7GDusZ6A=; b=NByY69pkbSqHt6W/nhjQ6ZEs3s2I8Sz3SZgPp7jnqTcngZg6VugvPpM385K89ScaBn IIUEhBqqItCjaaZZlqhVHAduOL5M3qa63r4B6n7h1SCY4w9gJZFNUyXy1JxGFKSAup7i sOGzK4k1D30sYAqPd2npEiuZcu8k/pbccwJGVDjyP9UzCoivUJ0i6BQWt+eLBgAeboXM fOi4qkJLNRUR588t0L2Ek+eTDRcbfJkSBjD3tP+HitYaMC23vwstWi2TfK2AbZzsE/Xs 9F9rP66fGvInW5JaZdVVSe1uNpqmXYj0DGuNjx60LCRZdSc5Ox4ggETwf2bjEeKOBmcE eFtw== X-Gm-Message-State: AOAM532GcFLtAFfge5o0JvO4hfjL6WE3VvWqUvyE9lQRHq8P4T/Boj3z yQGQRG6Rr1pAPmdr0gaa5ZpLTC6xYi12dd7LrgjHSg== X-Google-Smtp-Source: ABdhPJxtmGIlv0Kw68m2Y9v0kQtTgI1SVTCo9cTZjhsaD+aL9DZMM15TsbHvBQaAactVElm+rT46yWmystUiWJDigUg= X-Received: by 2002:a1f:14c5:: with SMTP id 188mr692635vku.5.1637834074906; Thu, 25 Nov 2021 01:54:34 -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: <202111250855.1AP8t3iG042265@gitrepo.freebsd.org> In-Reply-To: <202111250855.1AP8t3iG042265@gitrepo.freebsd.org> From: Warner Losh Date: Thu, 25 Nov 2021 02:54:23 -0700 Message-ID: Subject: Re: git: 68cbe189fdd3 - main - pci: Don't try to read cfg registers of non-existing devices To: Wojciech Macek Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000003c75a805d199f686" X-Rspamd-Queue-Id: 4J0Cs74BlGz4ZfX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --0000000000003c75a805d199f686 Content-Type: text/plain; charset="UTF-8" On Thu, Nov 25, 2021 at 1:55 AM Wojciech Macek wrote: > The branch main has been updated by wma: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=68cbe189fdd3c572476f8af9219a5d335f05b51a > > commit 68cbe189fdd3c572476f8af9219a5d335f05b51a > Author: Kornel Duleba > AuthorDate: 2021-11-23 08:13:56 +0000 > Commit: Wojciech Macek > CommitDate: 2021-11-25 08:53:40 +0000 > > pci: Don't try to read cfg registers of non-existing devices > > Instead of returning 0xffs some controllers, such as Layerscape > generate > an external exception when someone attempts to read any register > of config space of a non-existing device other than PCIR_VENDOR. > This causes a kernel panic. > Fix it by bailing during device enumeration if a device vendor register > returns invalid value. (0xffff) > Use this opportunity to replace some hardcoded values with a macro. > > I believe that this change won't have any unintended side-effects since > it is safe to assume that vendor == 0xffff -> hdr_type == 0xffff. > We didn't use to bail out if function 0 was not present due to odd balls (I think on sparc64) which have long ago since become irrelevant, so this should be OK. Warner > Sponsored by: Alstom > Obtained from: Semihalf > Reviewed by: jhb > MFC after: 2 weeks > Differential revision: https://reviews.freebsd.org/D33059 > --- > sys/dev/pci/pci.c | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c > index 7493ae1727fb..ecef65477137 100644 > --- a/sys/dev/pci/pci.c > +++ b/sys/dev/pci/pci.c > @@ -683,11 +683,12 @@ pci_read_device(device_t pcib, device_t bus, int d, > int b, int s, int f) > uint16_t vid, did; > > vid = REG(PCIR_VENDOR, 2); > + if (vid == PCIV_INVALID) > + return (NULL); > + > did = REG(PCIR_DEVICE, 2); > - if (vid != 0xffff) > - return (pci_fill_devinfo(pcib, bus, d, b, s, f, vid, did)); > > - return (NULL); > + return (pci_fill_devinfo(pcib, bus, d, b, s, f, vid, did)); > } > > struct pci_devinfo * > @@ -4141,6 +4142,10 @@ pci_add_children(device_t dev, int domain, int > busno) > pcifunchigh = 0; > f = 0; > DELAY(1); > + > + /* If function 0 is not present, skip to the next slot. */ > + if (REG(PCIR_VENDOR, 2) == PCIV_INVALID) > + continue; > hdrtype = REG(PCIR_HDRTYPE, 1); > if ((hdrtype & PCIM_HDRTYPE) > PCI_MAXHDRTYPE) > continue; > @@ -4182,7 +4187,7 @@ pci_rescan_method(device_t dev) > for (s = 0; s <= maxslots; s++) { > /* If function 0 is not present, skip to the next slot. */ > f = 0; > - if (REG(PCIR_VENDOR, 2) == 0xffff) > + if (REG(PCIR_VENDOR, 2) == PCIV_INVALID) > continue; > pcifunchigh = 0; > hdrtype = REG(PCIR_HDRTYPE, 1); > @@ -4191,7 +4196,7 @@ pci_rescan_method(device_t dev) > if (hdrtype & PCIM_MFDEV) > pcifunchigh = PCIB_MAXFUNCS(pcib); > for (f = 0; f <= pcifunchigh; f++) { > - if (REG(PCIR_VENDOR, 2) == 0xffff) > + if (REG(PCIR_VENDOR, 2) == PCIV_INVALID) > continue; > > /* > --0000000000003c75a805d199f686-- From nobody Thu Nov 25 09:55:44 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7743318A0875; Thu, 25 Nov 2021 09:55:46 +0000 (UTC) (envelope-from bapt@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 4J0CtV04Tpz4b8x; Thu, 25 Nov 2021 09:55:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id AC9E09051; Thu, 25 Nov 2021 09:55:45 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 1F17150024; Thu, 25 Nov 2021 10:55:44 +0100 (CET) Date: Thu, 25 Nov 2021 10:55:44 +0100 From: Baptiste Daroussin To: Ed Maste Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 483a226238ed - main - Add ncurses/form to _prebuild_libs to fix build Message-ID: <20211125095544.k72mqnc4xzide6di@aniel.nours.eu> References: <202111241941.1AOJfpEu087099@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: <202111241941.1AOJfpEu087099@gitrepo.freebsd.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637834146; 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=tEdN5F5R1fK+umg2PErXQigARi4/bNmjOHM1cfVK45M=; b=tcNydUM0WpYqmkuhcA0Xd92Bwjle+VCBn2smoL+FsmGbzUzFhtrGtoWatOUQvKwEzplbqh coxOXRUdi1TiOXjD6ffE6yuV3qLBeD1frPUWNN+z0QawHRaavtnC9bWIJMBVitRgw4dAdS VaGJU2XqZjVEhblr9XQtxuVO2waFNrOLkKd7uPYmEF9GHApegtCPaVHk5b9WoFPTFdaVke ybd3JgcnuNuqiiZTxmSwRPBGOTjC+SUZmwfuPdReLyDEayQZtAfXKveG0G+5V2caWkO/+Y PeXaYUHjUY53x/JK/pzLz7r7H+K4CITQHhtoqhN4VjcNOyg5wR8cGaRCDRP/Ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637834146; a=rsa-sha256; cv=none; b=ooKHAX8WZiG4TGTqHZ15FYRdQlLmP9WRhYmgOOh6oL3Mm5wuYaglynDjVuGr40GMOwcE35 w6wYeKRF2ypLOVducQw+DGXqgdtKG+iX1zZ4xyuoFhaTbiZOWhgTSZAg9SvP7m13jJd0gY RUVMlZbal++UjWfZWuBwxjfKUZTPaq5eRn99D4xae0T3jPuoKB7xX5Ffgc4fL5Um48q4rx VEsVC1sL4oQar3R4ZK63D9hwYrDhNVnfoVncV6adkM7ItMV/Tc2zi3s1TikNIvCdQlVQ5G 8BK+X0rTcKc1WX3h8h0lE8vEojDPmky91aDhQGj0tHpkoU7xlllrPGN0xQRNvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Wed, Nov 24, 2021 at 07:41:51PM +0000, Ed Maste wrote: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=483a226238ed8949c6d280ae0757a0683962a74b > > commit 483a226238ed8949c6d280ae0757a0683962a74b > Author: Ed Maste > AuthorDate: 2021-11-24 18:56:38 +0000 > Commit: Ed Maste > CommitDate: 2021-11-24 19:39:37 +0000 > > Add ncurses/form to _prebuild_libs to fix build > > Reported by: bz Thank you and sorry for the breakage baptiste From nobody Thu Nov 25 10:17:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8CC5718AE710; Thu, 25 Nov 2021 10:18:00 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "vtr.rulingia.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0DN80589z4khk; Thu, 25 Nov 2021 10:17:59 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (2001-44b8-31fc-0d00-b5cd-709e-0e8b-19ef.static.ipv6.internode.on.net [IPv6:2001:44b8:31fc:d00:b5cd:709e:e8b:19ef]) by vtr.rulingia.com (8.16.1/8.16.1) with ESMTPS id 1APAHjKo073859 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Nov 2021 21:17:50 +1100 (AEDT) (envelope-from peter@rulingia.com) DKIM-Filter: OpenDKIM Filter v2.10.3 vtr.rulingia.com 1APAHjKo073859 X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.16.1/8.16.1) with ESMTPS id 1APAHd0o008101 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 25 Nov 2021 21:17:39 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.16.1/8.16.1/Submit) id 1APAHd0w008100; Thu, 25 Nov 2021 21:17:39 +1100 (AEDT) (envelope-from peter) Date: Thu, 25 Nov 2021 21:17:39 +1100 From: Peter Jeremy To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8ef0c11e7ce7 - main - nfsclient: upgrade vnode lock in VOP_OPEN()/VOP_CLOSE() if we need to flush buffers Message-ID: References: <202111161714.1AGHEtBA084291@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="N3wcggWsInNfpQts" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-Rspamd-Queue-Id: 4J0DN80589z4khk X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --N3wcggWsInNfpQts Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-Nov-24 13:30:25 +0200, Konstantin Belousov wr= ote: >Please try this, but it may require more work. In particular, watch out >for deadlock: the swapped out pages are busied before swap vnode is locked. >By itself it is fine, but if some other io happens to the swap vnode, it >might become problematic. I've built a few non-trivial ports and run a quick hack where several processes are making the system thrash for about 4 hours without problems. --=20 Peter Jeremy --N3wcggWsInNfpQts Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmGfYr1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzQcEg//QxHQ8YXNjsViLZyElmiWh+Mz0JTGAyvcA9oqDeonPg9dQjgqAuFYyIGG TK2iPRvcjlXxc0M2hM7LnxYhuf90HJ0wNqOMI3ZH1z9HryIvfinCcndBOKNEM8cg 5P03C00u6n0u+mWO1g50DrhXL/GIALH/nuj/uujz1Y/LJ4QtsVkcOzStgT9vNlWc 0yFS54gPXW+q1SNYtoIu+ZK7pbPl6wJH6gqfCSZl9W7YdrL+TMzVexho2dp+u1BH CFKF/SG3XIYnGL6imZxNPXqp3vMKaIxLUvolEEEULQ0WdAUzhFFHIqCoxZPt83E7 vCGv9Be9wlNqqDq11E1dmeuW33UT54/zhcyn5vDQHgEtA8RrvSlrCInj3+3kfJ2a IsqJhrdbk7SY+tfEQt2Akb+V07lv8+Tr5gnN8R0nciYr5pT4vc/NQwn7dKyMr/OA ZBZGzaF0fA+1IwqaH1GJ+lOTH299xPkXNwO1GM87fja+oziTSVMJ+UcI7kWH2wPu JNBpKzSqAoOkja/WB47COdvnsAdoiAhWQy+59T6Ie+CS/ad9k10O3FsYYjPEdWgM qCf9Sa6enHT9aw3IiOnDpYfrD3eJ+Y8yiOwnr2WKWNhwWK/03hoK66KVp0ieB75U onDmb01QdlQQh9CmCbtDvxpvL0Dp2Bt0YLLZh7lhHzD/b7kWAfo= =1UIU -----END PGP SIGNATURE----- --N3wcggWsInNfpQts-- From nobody Thu Nov 25 11:26:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EA5B118A7DA6; Thu, 25 Nov 2021 11:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0FvF4njKz3Mq5; Thu, 25 Nov 2021 11:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 845581C840; Thu, 25 Nov 2021 11:26: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 1APBQXkU042558; Thu, 25 Nov 2021 11:26:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APBQX5T042557; Thu, 25 Nov 2021 11:26:33 GMT (envelope-from git) Date: Thu, 25 Nov 2021 11:26:33 GMT Message-Id: <202111251126.1APBQX5T042557@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: b6f387fdb772 - main - fdc: plug set-but-not-used vars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b6f387fdb77216e9a89c77a985aec5f45d39fd90 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637839593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VEB7okNcrq0FnQlgHy1BjF1AbZy20d3xrZa2ue3ncEU=; b=s4WK09OpiZlmFUqfZ0yPOy2IrCBNt0RGYlPxK39XMgiQVGK8s35MbcQ8tDB4VDeZgFH6Cj L8a6koEk1A+3DDSD8tCzdo0+GavU4vfryLx3dy2JxqXjmMAdMjUji9Pj0ldd61lRhZp3Ym QgWVnP2b064KD6ZLoaNj1a0RTxyH27tNLHVbJfLcGvIvNSrojq9YHbzauwpNumdPWmI2E7 pIrVXDQKdwZyvScDhpy4kozJ0VVYRkOFYWRhDQmgafVzeAXF7iBldLayn2htCkidBLjPFx NWrdtCoeP8kej+AkBecCrsdmYmCPb8exreM4fctqz9ks1q4DJZEK1Ftp1vpn1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637839593; a=rsa-sha256; cv=none; b=uhh9baI+xSkOeRDQ7cREigVMV45lGol78/AYdNnu17DLjLWo5i3YMafFr6mGXbsNE6nziN eS+AeRn+Btc5m3usEIhyGMAM5Z4P62l51MmLc2uKInyYs9Afd25oAEPRZGcr8OHJGGZ0Mk /jpYca4+QA3QlPdpMcAjFmdaR/aG7o+JKABiPBE+J7tGQZweJXxBWx1+4c95bGwIEmjfMX 1Ljgh1nTtiVzOXTorVEDpU8phL4IoiCr1ormyPDopZRQEUQiwPymmw94makeXxxJe1OCs4 69evLnpPL5858ak+cXWGuRJhJeNoMW581ehB7er826aIKvN0Vdsy7O83gYsXIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b6f387fdb77216e9a89c77a985aec5f45d39fd90 commit b6f387fdb77216e9a89c77a985aec5f45d39fd90 Author: Mateusz Guzik AuthorDate: 2021-11-25 11:25:11 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-25 11:25:11 +0000 fdc: plug set-but-not-used vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/fdc/fdc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 6f035e9689f1..b427e919add1 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -1182,9 +1182,7 @@ static void fd_enqueue(struct fd_data *fd, struct bio *bp) { struct fdc_data *fdc; - int call; - call = 0; fdc = fd->fdc; mtx_lock(&fdc->fdc_mtx); /* If we go from idle, cancel motor turnoff */ @@ -1468,11 +1466,9 @@ fd_access(struct g_provider *pp, int r, int w, int e) static void fd_start(struct bio *bp) { - struct fdc_data * fdc; struct fd_data * fd; fd = bp->bio_to->geom->softc; - fdc = fd->fdc; bp->bio_driver1 = fd; if (bp->bio_cmd == BIO_GETATTR) { if (g_handleattr_int(bp, "GEOM::fwsectors", fd->ft->sectrac)) From nobody Thu Nov 25 11:32:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5E8B218AACD3; Thu, 25 Nov 2021 11:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0G226j2jz3PZJ; Thu, 25 Nov 2021 11:32:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEAA11C857; Thu, 25 Nov 2021 11:32: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 1APBWQPf055918; Thu, 25 Nov 2021 11:32:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APBWQAL055917; Thu, 25 Nov 2021 11:32:26 GMT (envelope-from git) Date: Thu, 25 Nov 2021 11:32:26 GMT Message-Id: <202111251132.1APBWQAL055917@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: b74fdaaf1cde - main - geom_multipath: plug set-but-not-used vars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b74fdaaf1cde6002b399ecfa99790e9368c8fc52 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637839947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6jahGy1P6zBjWCX+3fi2WvtUn7MOKBuC4QsNvZSxdOM=; b=TDWZNNs4in/uWLlk9ZIAsonbcrbH6Woj+hCTAQx+YE5/4BBSHLCUBbiD1ZwonANEY25wNx /hd1oDweOI1L5irK5hNoY+ELY750wJD0zT4e9CIrpbq6ABt28lSETKwcgmYcgD4ih8Ocu4 EkbuXt5+Z8rbzCfDy1P3/4K9QYSxUofLXt2YUZiTEDO85AkSkatBuigZRCe2O3IXrL01B8 Le1g+irStPcFOEGKJgNih1KRL0eeU/LTNnUUVa/RV40rQSyjy0EuUlyOz1tZBdbyag3R6E cCGpDx8xZystkSacP4/TTES2uy0gRyTrjo7M5e53a0Ay0RvrDj2wJpPwC14zCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637839947; a=rsa-sha256; cv=none; b=SWKE0QkS1NBwuxUwI8a6ZOivFJF3gUsMZ8WbntmKumH/VQhDzv5jsceQM2K5zmCUhqSRJk Hj1FeH70YUWCXbZVHnyWOgOTVfEqyLc9fNPIB0IhxJSf0LN8fiPcDgJ+VYjKVybKzLWKh1 qLs+B4ZDUyiXxA/I20MjJk7CnfAVvhUP8Nf1o5DHnDZ9rg0EFAg3kPresxvAdwwnxOTVFO F6Nn+sP4b3mVBQT09d9LhydRB52lX2r4HVqch0RcnMg0RhwWlARA6RZ4ItRmSjwf2LwZt9 dk2CzAQg7DLmzqYuI7Q3ZQOhTsPSxDWafrVVz2ItGQaPZ5H/+6lZ1w4mbStNFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b74fdaaf1cde6002b399ecfa99790e9368c8fc52 commit b74fdaaf1cde6002b399ecfa99790e9368c8fc52 Author: Mateusz Guzik AuthorDate: 2021-11-25 11:31:50 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-25 11:31:50 +0000 geom_multipath: plug set-but-not-used vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/geom/multipath/g_multipath.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/geom/multipath/g_multipath.c b/sys/geom/multipath/g_multipath.c index 120fced0a8f1..ee1db72f68f9 100644 --- a/sys/geom/multipath/g_multipath.c +++ b/sys/geom/multipath/g_multipath.c @@ -582,7 +582,7 @@ static int g_multipath_add_disk(struct g_geom *gp, struct g_provider *pp) { struct g_multipath_softc *sc; - struct g_consumer *cp, *nxtcp; + struct g_consumer *cp; int error, acr, acw, ace; g_topology_assert(); @@ -602,7 +602,6 @@ g_multipath_add_disk(struct g_geom *gp, struct g_provider *pp) pp->name, gp->name); return (EEXIST); } - nxtcp = LIST_FIRST(&gp->consumer); cp = g_new_consumer(gp); cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; cp->private = NULL; @@ -1082,7 +1081,6 @@ g_multipath_ctl_prefer(struct gctl_req *req, struct g_class *mp) static void g_multipath_ctl_add(struct gctl_req *req, struct g_class *mp) { - struct g_multipath_softc *sc; struct g_geom *gp; const char *mpname, *name; @@ -1096,7 +1094,6 @@ g_multipath_ctl_add(struct gctl_req *req, struct g_class *mp) gctl_error(req, "Device %s not found", mpname); return; } - sc = gp->softc; name = gctl_get_asciiparam(req, "arg1"); if (name == NULL) { From nobody Thu Nov 25 11:46:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AD40118B0C57; Thu, 25 Nov 2021 11:46: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 4J0GKj3hGZz3jwt; Thu, 25 Nov 2021 11:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 561B11CE5E; Thu, 25 Nov 2021 11:46: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 1APBk1XL069279; Thu, 25 Nov 2021 11:46:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APBk1jm069278; Thu, 25 Nov 2021 11:46:01 GMT (envelope-from git) Date: Thu, 25 Nov 2021 11:46:01 GMT Message-Id: <202111251146.1APBk1jm069278@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: 171e56c19a11 - main - stress2: Added an option to set the file size. Added missing error checks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 171e56c19a11d39942929ea219b71b6b7b0398ae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637840761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K04AdFh+V2CF28pEAAtr2U5ddQ9K83m06KGkWWoqHYY=; b=ubGrCPctOpElJQyjrnZNSgwVQpbnMFpz0f+eU7JnrgfjEYY7Zl9JTpgvNl3xa6ToLlO4lb cSHRhMVs45R1efnUcPTV/iD3xkQZ+KzNztWIe7cdfKUoNKBCFW/E1JojyuQh5+PdBt10Rp fIygVJZil8u0ryaJSS1Uvmhj/InxtFPbg7uPeuI9qjulrrCHLDZF6HQje4SdkOT4euKPi8 HzKkoT9mKzTr+bkB/rZtYOBlv7vHbleMPx2XAfu1RUEICGNo8eYCPd+nvsv5mhbxgPw6/I m2TxyEXUN9UK8Ux2JaAESZ9vhdIzm4Lsp01tfoQKcsPg/+TNjryi7YGCUH1tmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637840761; a=rsa-sha256; cv=none; b=EOJZiTEYr/JHEv+ESQKlIXXVN0Y2dTnknbD049b175Wj2FedGQOWx+lZ39dBNtoPiFIyMQ azCeWHXniUeNEYEXnviQ7QuCD0w0zImJX7SjP2KCIrurSsMkZwYbqTqPMoV+3ZVX2js5mB IMTs2vtpz4oZCh5kjSybyBjFR0GN+saSACyx6bge3gNpAHkyTRrNKEzY6f5Sr0Zj3JuQZ1 W4qWUd/iaZnkWPhs6Pc6Ld/SN9CB6piBXOU/nW2EJSEs1F/ZrdbGqE7l/XrlWRBC39P5uj nSpzzvK8sfHQLMZo+kLLje+J/jui1kEOOqGGz8FWRJVI29/zNjQEG4Hgv4FIqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=171e56c19a11d39942929ea219b71b6b7b0398ae commit 171e56c19a11d39942929ea219b71b6b7b0398ae Author: Peter Holm AuthorDate: 2021-11-25 11:44:59 +0000 Commit: Peter Holm CommitDate: 2021-11-25 11:44:59 +0000 stress2: Added an option to set the file size. Added missing error checks --- tools/test/stress2/tools/flip.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/tools/test/stress2/tools/flip.c b/tools/test/stress2/tools/flip.c index 816162947c45..8d01e9d78ea1 100644 --- a/tools/test/stress2/tools/flip.c +++ b/tools/test/stress2/tools/flip.c @@ -54,7 +54,7 @@ flip(void *ap, size_t len) { unsigned char *cp; int byte; - unsigned char bit, buf, mask, old; + unsigned char bit, buf, mask, old __unused; cp = (unsigned char *)ap; byte = random_long(0, len); @@ -75,15 +75,20 @@ main(int argc, char *argv[]) { struct stat st; off_t pos; + size_t size; int fd, i, times; char c; times = 1; - while ((c = getopt(argc, argv, "n:")) != -1) { + size = 0; + while ((c = getopt(argc, argv, "n:s:")) != -1) { switch (c) { case 'n': times = atoi(optarg); break; + case 's': + size = atol(optarg); + break; case '?': default: fprintf(stderr, @@ -103,18 +108,23 @@ main(int argc, char *argv[]) if ((fd = open(argv[0], O_RDWR)) == -1) err(1, "open(%s)", argv[0]); - if (fstat(fd, &st) == -1) - err(1, "stat %s", argv[0]); + if (size == 0) { + if (fstat(fd, &st) == -1) + err(1, "stat %s", argv[0]); + size = st.st_size; + } for (i = 0; i < times; i++) { - pos = arc4random() % st.st_size; + pos = arc4random() % size; if (lseek(fd, pos, SEEK_SET) == -1) err(1, "lseek()"); - read(fd, &c, 1); + if (read(fd, &c, 1) != 1) + err(1, "read()"); flip(&c, 1); if (lseek(fd, pos, SEEK_SET) == -1) err(1, "lseek()"); - write(fd, &c, 1); + if (write(fd, &c, 1) != 1) + err(1, "write()"); } return (0); From nobody Thu Nov 25 12:10:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 327D6189C181; Thu, 25 Nov 2021 12:10:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0GtF5xRnz3rJr; Thu, 25 Nov 2021 12:10:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACED31D229; Thu, 25 Nov 2021 12:10: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 1APCAjta005364; Thu, 25 Nov 2021 12:10:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APCAjZo005363; Thu, 25 Nov 2021 12:10:45 GMT (envelope-from git) Date: Thu, 25 Nov 2021 12:10:45 GMT Message-Id: <202111251210.1APCAjZo005363@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: 2ef1cfd2efc6 - main - mmc: plug set-but-not-used vars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2ef1cfd2efc62532bb31cbc710a470b38b2990ae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637842245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mPBNi0NbkNTsPV7BF0MsuQnyeDfzeYKfys0dDzu1yWU=; b=Mf7uVexHaGumgVmRRs7aqkdq3ylHMDfP52oo5kaGZZnH1ERH9WieIrD47pMp4eTXX/xDr9 lvgUDaqdFxWC4aQovrn9rIfhpj24DKBRtJU6M1/Jy+kr9pcNbIix6yqEDGedUM6b/fUXFt M9x7m78E68UiXqify6p8axehQUqMguGspjOTxyO6T+M6iospNaI0Cg6MAOnVADd05mSECl 5qu5CJMLdhw1ADhy0Sz82b71cTvdZWSxmylVUbcx4wUNw5DDMz5S9gjqFIoYAzU0q4Kabq y8nKydkN04Tymcsb6S9awT8uFDinYdXGZ17gW5cAVzhhQHNWQOMGfiXQ5iehSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637842245; a=rsa-sha256; cv=none; b=XVXtOrPbZwK5H/PCa6kIQ5ZGOaxqAWD41XYDJDzg3/k3BSFcIPZvBC1f4cJN8cmWxdpICC w4+jHX/IUxU5RxXn2Gp6RB+8h++4NSG47L0KpK53UT6bMYv7Blw2ug6rfToICb1Z+4LCfG jUrIDxUudlC+kBI+vQJRGkjHKUsv1hoLzzWfUIMD1BHTBcKeNC9xP+8uX8Q1YI3SXNn65H iGwrsidVHSTKPe2QxESWjWTTIghwv1kjWGXFf87Gy1lRFlUBUR1nS5MPLs2I7Vvgky7eU9 ECxmtIUahNvsTFaYk0mNICA2rzFCsDVBYH5VoF0xpMowUHIOD+rp2TBY1PKvww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2ef1cfd2efc62532bb31cbc710a470b38b2990ae commit 2ef1cfd2efc62532bb31cbc710a470b38b2990ae Author: Mateusz Guzik AuthorDate: 2021-11-25 12:10:27 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-25 12:10:27 +0000 mmc: plug set-but-not-used vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/mmc/mmc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index 071c238374df..1fc25e372f2b 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -2270,10 +2270,8 @@ mmc_switch_to_hs400(struct mmc_softc *sc, struct mmc_ivars *ivar, { device_t dev; int err; - uint16_t rca; dev = sc->dev; - rca = ivar->rca; /* * Both clock and timing must be set as appropriate for high speed @@ -2313,10 +2311,8 @@ mmc_switch_to_hs200(struct mmc_softc *sc, struct mmc_ivars *ivar, { device_t dev; int err; - uint16_t rca; dev = sc->dev; - rca = ivar->rca; /* * Both clock and timing must initially be set as appropriate for From nobody Thu Nov 25 13:29:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 17122189A733; Thu, 25 Nov 2021 13:29:15 +0000 (UTC) (envelope-from bz@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 4J0Jcp4xzkz4lB9; Thu, 25 Nov 2021 13:29:14 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 6BF1BA831; Thu, 25 Nov 2021 13:29:14 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id D8D578D4A129; Thu, 25 Nov 2021 13:29:12 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id B86E2E7084B; Thu, 25 Nov 2021 13:29:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id lOJS1czw2gGo; Thu, 25 Nov 2021 13:29:10 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 2F7F5E70814; Thu, 25 Nov 2021 13:29:10 +0000 (UTC) Date: Thu, 25 Nov 2021 13:29:09 +0000 (UTC) From: "Bjoern A. Zeeb" To: Ed Maste cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 483a226238ed - main - Add ncurses/form to _prebuild_libs to fix build In-Reply-To: <202111241941.1AOJfpEu087099@gitrepo.freebsd.org> Message-ID: References: <202111241941.1AOJfpEu087099@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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; format=flowed ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637846954; 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=lFRcUTJNKXlqJGTO8GphkbIaGlMNSxmsh98V3sBTIvI=; b=IxkLtJlB/8z+XTD+WLMIOzMvoVqcRsbtIO4equ4wgpIGY0sH6Rk/kad0RTiIQL+BB94fIt Hj5ew4rc/E7gjQBOBF8CWugwT069GuCKKj8/4IpP/E1VsxLC+3OTqdjv3JEtOB5lkydDcM WkjSDoMhvbcRl4Dju2LyeDzDctiqKAwZe+q5EuVHbqhfsRQk4qP6moVmpAxSm2wbGTcWYp srIE3h+ngJozfhaSnBnB0spfz1N4yuxA8oLtEcWWQsro9fHGqBOzK8WZppy/y6x1GW5ncp vpP/NliTdl44Xpj0mlWmdaXqCko1kj7jmCI9PwQImeCI7JIePR5OHyMqV7Krxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637846954; a=rsa-sha256; cv=none; b=Z2aTuQreLG/5VEEmmreacWw5N9Sd4UcjHabpdo6QyRlsF2vx3SkooVaPgwYXsjeQanSgsV zGbN/vcFkCsOVllsSZCHQ/SPgLOK6XIK7/IA2tbaCTGYy2RK16S7nWgwXUfYawfKry0nLq UH0K5/tlGWyfIjONgrav9bbKZw8S/xGwMUh16euXKfapM1rpTFF4IDNBKknx3ChHtiVbc6 U/eBs980ZZQlOQO1FROvTB22gFr/eBkqsrBIMtsofqvDIZRAJMJffwkCIvhx47xMYdwNvE ccuAdGEavLPAWbwJbcu1vNuie3zOKUyizBoJRxM7Gs3Le1hcq/FAifxoF2gveA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Wed, 24 Nov 2021, Ed Maste wrote: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=483a226238ed8949c6d280ae0757a0683962a74b > > commit 483a226238ed8949c6d280ae0757a0683962a74b > Author: Ed Maste > AuthorDate: 2021-11-24 18:56:38 +0000 > Commit: Ed Maste > CommitDate: 2021-11-24 19:39:37 +0000 > > Add ncurses/form to _prebuild_libs to fix build > > Reported by: bz Was this still needed after 5abafe4aa0b82a3ce96425b016641324c290a8b4 ? > --- > Makefile.inc1 | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Makefile.inc1 b/Makefile.inc1 > index d8f50cf77d4b..1ba3716a02db 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -2943,6 +2943,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ > ${_lib_casper} \ > lib/ncurses/tinfo \ > lib/ncurses/ncurses \ > + lib/ncurses/form \ > lib/libopie lib/libpam/libpam lib/libthr \ > ${_lib_libradius} lib/libsbuf lib/libtacplus \ > lib/libgeom \ > @@ -2982,6 +2983,7 @@ _lib_libradius= lib/libradius > .endif > > lib/ncurses/ncurses__L: lib/ncurses/tinfo__L > +lib/ncurses/form__L: lib/ncurses/ncurses__L > > .if ${MK_OFED} != "no" > _prebuild_libs+= \ > -- Bjoern A. Zeeb r15:7 From nobody Thu Nov 25 13:32:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 661EF189B0E2; Thu, 25 Nov 2021 13:32:41 +0000 (UTC) (envelope-from bapt@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 4J0Jhn1lYtz4lmG; Thu, 25 Nov 2021 13:32:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 07DC2AE81; Thu, 25 Nov 2021 13:32:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 5910C504BB; Thu, 25 Nov 2021 14:32:39 +0100 (CET) Date: Thu, 25 Nov 2021 14:32:39 +0100 From: Baptiste Daroussin To: "Bjoern A. Zeeb" Cc: Ed Maste , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 483a226238ed - main - Add ncurses/form to _prebuild_libs to fix build Message-ID: <20211125133239.ymga5gpbopfgujr3@aniel.nours.eu> References: <202111241941.1AOJfpEu087099@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: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637847161; 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=VxYUlcEDIDsbbJBCfCEXzJWCnps8RJOQZ82hN8cfqHA=; b=Px+dZnx4BF6bvRqTc1Q9zm7GnjagKvGi0GUMmWnbnXMkCrAwEsCAQkWCDyAIlw1yfyPVza u53CxWCIfeDwsNrWtCz8HVIP/7NCJi8vOprdJCh5Sicuv1izVrs+Fd0xe90RPtiMTigbEH ssK4U7UBF32+fiovffltLEcpmugEg9BuyTOkE2YRgTTqLvUqOfjv+86kJWllAhFTFskkeA uzqW7EG31VsDH/hBtLRH4qLlhUiZ4szNugNmEFL2iIISf6LUF5F+Qc4W13RQfiYENxSDWs 8klMPYpabiuZYVHQGYprLpuIt2HR4RoV0Y9vtb3QxJazHRD9uV8JQngatHluAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637847161; a=rsa-sha256; cv=none; b=gEXfCy64JJItCCwcWL+BgVhO7R1ncMFnyBiDORAp2QKFjOHARhNy80Jj5iuT/t3H4LF4JH h3h/kDCn0Pcumx1D5vddthRhGYHRUjEHyOv7pwdyhufj9QZuX4AWSifT6PjsL+68oL3DK5 iw3KWpjWV71Y9ApGf6G2CrgvyjzxF2qSvWusUhhUQ9wucgLMWwfKbWTDeuTG5kuswVi6/9 9tKS1nSXoktoLBcxh9LyJbp6yuZUYF+RcgK5CBKWxbUln8/o9a8pwAhFlFvro+sCBS+J+G R3QKghZ6IU/HUX0nYoc4Q8b/cChXwdK5GlGK4ODhTMkUdp7CwgHhq7qmf/SdaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 25, 2021 at 01:29:09PM +0000, Bjoern A. Zeeb wrote: > On Wed, 24 Nov 2021, Ed Maste wrote: > > > The branch main has been updated by emaste: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=483a226238ed8949c6d280ae0757a0683962a74b > > > > commit 483a226238ed8949c6d280ae0757a0683962a74b > > Author: Ed Maste > > AuthorDate: 2021-11-24 18:56:38 +0000 > > Commit: Ed Maste > > CommitDate: 2021-11-24 19:39:37 +0000 > > > > Add ncurses/form to _prebuild_libs to fix build > > > > Reported by: bz > > Was this still needed after 5abafe4aa0b82a3ce96425b016641324c290a8b4 ? Yes :( Bapt From nobody Thu Nov 25 13:40:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A468B18A039D; Thu, 25 Nov 2021 13:40:25 +0000 (UTC) (envelope-from leandro.lupori@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 4J0Jsj3nS8z4qPN; Thu, 25 Nov 2021 13:40:25 +0000 (UTC) (envelope-from leandro.lupori@gmail.com) Received: by mail-oi1-x230.google.com with SMTP id u74so12626000oie.8; Thu, 25 Nov 2021 05:40:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IXFOo5wxcbw/m9/k+jHxZGeSl4hkzyIfkhz4KJOqO78=; b=alqh7QWi/pysA1w7T+B97E/FgV7mb92QMBsbmmrEFZCATp6z2zU6pzTOglJDYIRXIm Hsl4YA6tKKEQnQakV/6l1g2J3rZDNME+k9/W9Guh072YSvU4bM8RBWa50jpo/IXnLfbT qKcKSDInfjIECYHTYkLLIup+/hH9UGhPpOx9h+VkO72DliopKcnBzlmN6yGmTnjOSNl5 WA0RmPyImYIVwLBHOvCkBJxs5VsQsOh26qU39gEwmh+FfhPH/F4W4yjKDsl63fbzHS3o Hm65dcNqJYNZ8KmZOT9xcBbnxXixzAwj5jZxi2y+jI3/MS/4lpKdwbVb4W13NSM+0gac heMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IXFOo5wxcbw/m9/k+jHxZGeSl4hkzyIfkhz4KJOqO78=; b=i3+8XNs8tY2xvmuLV08gE98hpV/AxwOaW1ME7NMiQINiMBttFXyOadUcWNZnQwrPhy cmqQr6bTjl2ZBnIV3kvOsjx5PFxGrYWOL57h+Thzg//hV1GMetalh0EH5hReD1XZ6Vhy PFyzKdSyVYomYB74vDTSgAP1MqAGuLfxMgDr8ILP8aKVRxYjW1TTtpThzpuxiwLYo7L6 ZpSPCWHfebbSDt/8+9Xfkp30bEEdxriSmK8iSTbwg+Qh+KldmXQdmT0tzvFLBEORL5Mf WXnNiyHESeSwmWPRfIlcE5ymnja3EYI3eUbrATAHZPpQq4ThMUfZtXJITSdVRi/SHCXG +Dkg== X-Gm-Message-State: AOAM5307P4zE5u3bVSF2uJNkfGsdjn0nMJx2TbkAxBX/VfSHsRL5RehH eetn6ZLerDKsOFWMnjbGRyRkqHbXWmH3M56bOygqeoMR X-Google-Smtp-Source: ABdhPJzvnEjdeV6lo8lOa7KQskKwQtmeH9DEYfpjQoXrmLDcNekXeWvQEROSGqeSGx1JZEj3DE5iJ5rz0s5DIj1ZmNk= X-Received: by 2002:a05:6808:347:: with SMTP id j7mr15640971oie.111.1637847624820; Thu, 25 Nov 2021 05:40:24 -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: <202111232227.1ANMRCYk070382@gitrepo.freebsd.org> <133897a3-6db4-9353-cccd-c1d82e23146e@FreeBSD.org> In-Reply-To: From: Leandro Lupori Date: Thu, 25 Nov 2021 10:40:13 -0300 Message-ID: Subject: Re: git: 3a60869237b8 - main - Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le To: Piotr Kubaj Cc: John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000dfa99a05d19d1dec" X-Rspamd-Queue-Id: 4J0Jsj3nS8z4qPN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N --000000000000dfa99a05d19d1dec Content-Type: text/plain; charset="UTF-8" On Wed, Nov 24, 2021 at 6:52 PM Piotr Kubaj wrote: > On 21-11-24 10:34:36, John Baldwin wrote: > > On 11/24/21 10:24 AM, Piotr Kubaj wrote: > > > OK, it looks like ossl uses fpu_kern functions and those are available > only an aarch64, amd64 and i386: > > > cc -O2 -pipe -fno-common -fno-strict-aliasing -Werror -D_KERNEL > -DKLD_MODULE -nostdinc -include > /usr/obj/usr/src/powerpc.powerpc64/sys/modules/ossl/opt_global.h -I. > -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fPIC > -mlongcall -fno-omit-frame-pointer > -fdebug-prefix-map=./machine=/usr/src/sys/powerpc/include -MD > -MF.depend.ossl.o -MTossl.o -mno-altivec -msoft-float -mabi=elfv2 > -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ > -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas > -Wno-error-tautological-compare -Wno-error-empty-body > -Wno-error-parentheses-equality -Wno-error-unused-function > -Wno-error-pointer-sign -Wno-error-shift-negative-value > -Wno-address-of-packed-member -Wno-format-zero-length -std=iso9899:1999 > -c /usr/src/sys/crypto/openssl/ossl.c -o ossl.o > > > /usr/src/sys/crypto/openssl/ossl.c:190:4: error: implicit declaration > of function 'fpu_kern_enter' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > > > fpu_kern_enter(curthread, NULL, > FPU_KERN_NOCTX); > > > ^ > > > /usr/src/sys/crypto/openssl/ossl.c:190:36: error: use of undeclared > identifier 'FPU_KERN_NOCTX' > > > fpu_kern_enter(curthread, NULL, > FPU_KERN_NOCTX); > > > ^ > > > /usr/src/sys/crypto/openssl/ossl.c:193:4: error: implicit declaration > of function 'fpu_kern_leave' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > > > fpu_kern_leave(curthread, NULL); > > > ^ > > > /usr/src/sys/crypto/openssl/ossl.c:193:4: note: did you mean > 'fpu_kern_enter'? > > > /usr/src/sys/crypto/openssl/ossl.c:190:4: note: 'fpu_kern_enter' > declared here > > > fpu_kern_enter(curthread, NULL, > FPU_KERN_NOCTX); > > > ^ > > > /usr/src/sys/crypto/openssl/ossl.c:214:6: error: implicit declaration > of function 'is_fpu_kern_thread' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > > > if (is_fpu_kern_thread(0)) { > > > ^ > > > /usr/src/sys/crypto/openssl/ossl.c:217:3: error: implicit declaration > of function 'fpu_kern_enter' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > > > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); > > > ^ > > > /usr/src/sys/crypto/openssl/ossl.c:217:35: error: use of undeclared > identifier 'FPU_KERN_NOCTX' > > > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); > > > ^ > > > /usr/src/sys/crypto/openssl/ossl.c:263:3: error: implicit declaration > of function 'fpu_kern_leave' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > > > fpu_kern_leave(curthread, NULL); > > > ^ > > > 7 errors generated. > > > > > > AFAIK porting those is not easy and it's certainly above my pay grade. > > > > Do the powerpc instructions use additional registers that are not part > of the normal > > GPRs saved/restored on a context switch? If so, then, yes, you will > need to implement > > something here (though the FPU_KERN_NOCTX variant is a bit simpler as it > disables > > context switches and it's sufficient just to init the registers and > permit accesses > > without raising a trap until fpu_kern_leave). If not, then you can make > the use of > > those functions conditional on architecture. > > I guess bdragon, jhibbits, luporl or adalava would be better source of > information. > > That said, after looking at > https://community.nxp.com/t5/MPC5xxx/Example-code-for-context-switch-for-MPC56XX-PowerPC/m-p/732248/highlight/true, > it seems like indeed registers other than GPRs are saved and restored. > > > I tried looking at > https://cgit.freebsd.org/src/diff/?id=6ed982a221e024d64dd0ab776e6197643fa1530e. > fpu_kern_enter() and fpu_kern_leave() are quite scary :) > > AFAIK, non-integer registers are also saved/restored on a context switch on PowerPC, but only if there is an underlying user process that has used any FPU/Altivec/VSX instruction. I guess it will need some adjustments if the kernel itself starts using those registers. > > > > > On 21-11-24 08:15:26, John Baldwin wrote: > > >> On 11/23/21 2:27 PM, Piotr Kubaj wrote: > > >>> The branch main has been updated by pkubaj (ports committer): > > >>> > > >>> URL: > https://cgit.FreeBSD.org/src/commit/?id=3a60869237b8b315fe66497cf5299ec08b688533 > > >>> > > >>> commit 3a60869237b8b315fe66497cf5299ec08b688533 > > >>> Author: Piotr Kubaj > > >>> AuthorDate: 2021-11-22 02:28:46 +0000 > > >>> Commit: Piotr Kubaj > > >>> CommitDate: 2021-11-23 22:26:53 +0000 > > >>> > > >>> Add assembly optimized code for OpenSSL on powerpc, powerpc64 > and powerpc64le > > >>> > > >>> Summary: > > >>> 1. > https://github.com/openssl/openssl/commit/34ab13b7d8e3e723adb60be8142e38b7c9cd382a > > >>> needs to be merged for ELFv2 support on big-endian. > > >>> 2. crypto/openssl/crypto/ppccap.c needs to be patched. > > >>> Same reason as in > https://github.com/openssl/openssl/pull/17082. > > >> > > >> Have you looked at adding powerpc support to ossl(4)? It should be > fairly simple > > >> (just adding the right asm files in Makefiles and the powerpc > equivalent of > > >> OSSL_cpuid). > > >> > > >> -- > > >> John Baldwin > > > > > > -- > > John Baldwin > > -- > --000000000000dfa99a05d19d1dec-- From nobody Thu Nov 25 13:57:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6E8E518AB4AC; Thu, 25 Nov 2021 13:57:46 +0000 (UTC) (envelope-from avg@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 4J0KFj5pdnz3DQn; Thu, 25 Nov 2021 13:57:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 98496A86A; Thu, 25 Nov 2021 13:57:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: Date: Thu, 25 Nov 2021 15:57:41 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.3.0 Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures Content-Language: en-US To: Baptiste Daroussin , =?UTF-8?Q?Fernando_Apestegu=c3=ada?= , Ed Maste Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> From: Andriy Gapon In-Reply-To: <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637848665; 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=OTceUmjN1UlD79jnEZYLGpeTMiEMYAXcoWicvCcNIaI=; b=D+NObNigAb7t27d+vwcBdEZafXK0m+Rkztl2OxBwh31apF4HuHVEdvZDnaoqQzdPjWyQ4D TQjsHYY38PhmUZmHiUnNv0IyMp0eAjTXgTukEi6EZGtcyHJ6yoWT6kfcUgFgIsxV5OavM1 D812QGHALb8iesGB7mAXfrsObcn6akXMnmBSAgqkMmB9KgDniORj8QZRmiIX9UVHmEpsRv CJBeseze2/LZffDs281pTdJF9L7qsCdWAwisSU1D4QJOOoZdTd9HZ22RxZHpB1k35uan9m ZZPLLWTe7nyxs0MrF8mn2GxDOurjfCno1jNfzf27v86iH56fShP/8MLyMHbyVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637848665; a=rsa-sha256; cv=none; b=nvj5y32oJogJ/BlhXOFsHu5oI+VNr/xIUa9CeeGyJidHjywq1DHSK1jJS82B0mIZxl9nem sS1r+ysGs0k3PDkfQmZvyLDIRzRpZyCfYxZV6mPtTOcR3bHX21TDy8Yuvx+4+6RrTA8wfM 2OPPSf2dfruhs4O1hCQqMMa6ULwEdde9X9CfwHqeFxvLb19dKPIozxbT0Ywef6DyUDp6pS qzZgVvH/GOkR2mfRNV1ZAziQisIAJXwSH3F5gaqAwhMQsZdbl+H9rrYq04lzQPLKjkU3cS lhSQwp/yxrdxscJ6JeVSgRQxJHbXN3qePpWCJo1z5AzkxN2GaGOoOe7IlEL49w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 06/07/2021 12:03, Baptiste Daroussin wrote: > On Wed, Jun 30, 2021 at 08:06:51AM +0000, Fernando Apesteguía wrote: >> The branch main has been updated by fernape (doc, ports committer): >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=0a0f7486413c147d56808b38055c40c64cff61f5 >> >> commit 0a0f7486413c147d56808b38055c40c64cff61f5 >> Author: Fernando Apesteguía >> AuthorDate: 2021-06-09 10:58:04 +0000 >> Commit: Fernando Apesteguía >> CommitDate: 2021-06-30 07:57:51 +0000 >> >> man: Build manpages for all architectures >> >> Building and installing architecture-specific man pages only raises a number of >> problems: >> >> * The https://www.freebsd.org/cgi/man.cgi is incomplete. As an >> example, it does not show results for pae(4). The reason for this is >> that the cgi interface runs on FreeBSD amd64. >> >> * In FreeBSD amd64 some manual pages have broken X-refs. See hptrr(4) >> for an example. >> >> * Also, we have broken links in our Release Notes. This is a >> consequence of the first point. See >> https://www.freebsd.org/releases/13.0R/hardware/#proc-i386. >> >> Make MAN_ARCH default to 'all' so we build all the man pages for all the >> architectures. The difference in disk space is negligible. Also link >> architecture-specific man pages to their own section while keeping their own >> namespace. >> >> PR: 212290 >> Reported by: mj@bsdops.com >> Approved by: ceri@, wosch@ >> MFC after: 4 weeks >> --- >> sbin/Makefile | 6 ++++++ >> share/man/man4/Makefile | 4 +--- >> share/man/man4/man4.aarch64/Makefile | 5 +++++ >> share/man/man4/man4.arm/Makefile | 5 +++++ >> share/man/man4/man4.i386/Makefile | 5 +++++ >> share/man/man4/man4.powerpc/Makefile | 5 +++++ >> share/man/man5/make.conf.5 | 2 +- >> usr.sbin/Makefile | 7 +++++++ >> usr.sbin/apm/Makefile | 4 ++++ >> 9 files changed, 39 insertions(+), 4 deletions(-) >> >> diff --git a/sbin/Makefile b/sbin/Makefile >> index 64840bae82bb..f53e2f037ebe 100644 >> --- a/sbin/Makefile >> +++ b/sbin/Makefile >> @@ -90,6 +90,12 @@ SUBDIR.${MK_ZFS}+= zfsbootcfg >> >> SUBDIR.${MK_TESTS}+= tests >> >> +# Add architecture-specific manpages >> +# to be included anyway >> +MAN= sconfig/sconfig.8 >> + >> +.include >> + >> .include >> >> SUBDIR_PARALLEL= >> diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile >> index 5051470edc71..9027fe7df841 100644 >> --- a/share/man/man4/Makefile >> +++ b/share/man/man4/Makefile >> @@ -895,9 +895,7 @@ _cgem.4= cgem.4 >> MLINKS+=cgem.4 if_cgem.4 >> .endif >> >> -.if empty(MAN_ARCH) >> -__arches= ${MACHINE} ${MACHINE_ARCH} ${MACHINE_CPUARCH} >> -.elif ${MAN_ARCH} == "all" >> +.if empty(MAN_ARCH) || ${MAN_ARCH} == "all" >> __arches= ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E} >> .else >> __arches= ${MAN_ARCH} >> diff --git a/share/man/man4/man4.aarch64/Makefile b/share/man/man4/man4.aarch64/Makefile >> index 6714a47011ef..ef5fcd84ccd4 100644 >> --- a/share/man/man4/man4.aarch64/Makefile >> +++ b/share/man/man4/man4.aarch64/Makefile >> @@ -17,6 +17,11 @@ MAN= \ >> rk_i2c.4 \ >> rk_pinctrl.4 \ >> >> +# Link files to the parent directory >> +.for _manpage in ${MAN} >> +MLINKS+=${_manpage} ../${_manpage} >> +.endfor > > This breaks make -DNO_ROOT in a subtle manner and so likely pkgbase. > > The right way to do it is to add something that uses INSTALL_RSYMLINK or alike. I looked a bit into this and I think that the change does nothing wrong, we just populate METALOG incorrectly. After all, for hardlinks the source and target are interchangeable, they are two names for the same file. Maybe we could fix the issue in the place where mtree entries are created for hardlinks? Baring that, one easy way to work around the issue of having .. in paths is to install architecture manpage links in the opposite order: first install a manpage to a main directory, then create a hardlink in an architecture sub-directory. As a proof of concept, I implemented that idea for man4.arm and man4.aarch: https://people.freebsd.org/~avg/man-arch-links.diff And here is a sample of entries from METALOG produced with the change: ./usr/share/man/man4/rk_gpio.4.gz type=file uname=root gname=wheel mode=0444 size=1075 tags=package=utilities ./usr/share/man/man4/aarch64/rk_gpio.4.gz type=file uname=root gname=wheel mode=0444 size=1075 tags=package=utilities ./usr/share/man/man4/aw_gpio.4.gz type=file uname=root gname=wheel mode=0444 size=1253 tags=package=utilities ./usr/share/man/man4/imx_wdog.4.gz type=file uname=root gname=wheel mode=0444 size=1867 tags=package=utilities ./usr/share/man/man4/imxwdt.4.gz type=file uname=root gname=wheel mode=0444 size=1867 tags=package=utilities ./usr/share/man/man4/arm/imxwdt.4.gz type=file uname=root gname=wheel mode=0444 size=1867 tags=package=utilities ./usr/share/man/man4/arm/aw_gpio.4.gz type=file uname=root gname=wheel mode=0444 size=1253 tags=package=utilities ./usr/share/man/man4/arm/imx_wdog.4.gz type=file uname=root gname=wheel mode=0444 size=1867 tags=package=utilities Looking at the output I got another thought: do we need architecture sub-dir links at all now that we install manpages to a main directory? Is there any benefit to having the same manpage in a directory (like man4) and its immediate subdirectory (like man4/arm) ? -- Andriy Gapon From nobody Thu Nov 25 14:23:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A577018B55D9; Thu, 25 Nov 2021 14:23:42 +0000 (UTC) (envelope-from bapt@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 4J0Kqd5BNYz3Lws; Thu, 25 Nov 2021 14:23:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 570B0B416; Thu, 25 Nov 2021 14:23:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 3D20A5064B; Thu, 25 Nov 2021 15:23:39 +0100 (CET) Date: Thu, 25 Nov 2021 15:23:39 +0100 From: Baptiste Daroussin To: Andriy Gapon Cc: Fernando =?utf-8?Q?Apestegu=C3=ADa?= , Ed Maste , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures Message-ID: <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> References: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637850221; 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=/hbw1hTKRzYyWPQ1dD/LmHcCKAOAEIslICKKtqXCv5A=; b=JO8v6Lks95DvuM++iF5hmb44/nFnjuQvNsykOuyCyOFrPrkVVyes85wKmdUsXXOhN3ZdVL ycniNvoj8KGzb9P+M6pnbh2Elexq45USRwzOi4q5Ov4PaAqWLp2/+nhs7MgKzbOZw+L1TD ChtUmnMdqQXNzaXcjlgqIehYkYzZ18ZqLAWZH4oc6LwspIA5E9dvMeWIbTyabhwkvUmfwv dJIDXrnMArJfjK6eA/dKQqTDJugV7QkF6EIRFTcVC4SdwH6ySppAGJnGBUcYQfPbnITwZh IZRF606x7Bqk0UA5/E0QRUwBGR6HueeSlzewBMN+SE2zTwVzieF1DRp5mhmG+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637850221; a=rsa-sha256; cv=none; b=NpbObUUmmHbEXf9CKHSYz1NBOkbjieMZfC6xtJz1AF9AxOpMyM9LCvYbqAcosWKrkfb3nr Q+WiofJvLxFOFTrs+KpPdGAfmlstSGzH1Obkc3IDoXVjlLfW3LyZZugMdm2gjmXGQOFthp VPor+bD2C1bj78dbJoKadFKh2vOBA9Hm1QT7RHAUNB4AHV86J2C8riS3eeGZw31aNyjBY/ ixSVUckR0CnPBwt45IMuxXh09nGBpWNYXnwSlWOChICcTJzSMK8+g5PKFeoiRoJay2PQzL FFp79FVSHHN1zzBygTxbR7oHmgdO2gWl0oUxoTyeF1pV76SRE1PPRhxCwQat+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: > On 06/07/2021 12:03, Baptiste Daroussin wrote: > > On Wed, Jun 30, 2021 at 08:06:51AM +0000, Fernando Apesteguía wrote: > > > The branch main has been updated by fernape (doc, ports committer): > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=0a0f7486413c147d56808b38055c40c64cff61f5 > > > > > > commit 0a0f7486413c147d56808b38055c40c64cff61f5 > > > Author: Fernando Apesteguía > > > AuthorDate: 2021-06-09 10:58:04 +0000 > > > Commit: Fernando Apesteguía > > > CommitDate: 2021-06-30 07:57:51 +0000 > > > > > > man: Build manpages for all architectures > > > Building and installing architecture-specific man pages only raises a number of > > > problems: > > > * The https://www.freebsd.org/cgi/man.cgi is incomplete. As an > > > example, it does not show results for pae(4). The reason for this is > > > that the cgi interface runs on FreeBSD amd64. > > > * In FreeBSD amd64 some manual pages have broken X-refs. See hptrr(4) > > > for an example. > > > * Also, we have broken links in our Release Notes. This is a > > > consequence of the first point. See > > > https://www.freebsd.org/releases/13.0R/hardware/#proc-i386. > > > Make MAN_ARCH default to 'all' so we build all the man pages for all the > > > architectures. The difference in disk space is negligible. Also link > > > architecture-specific man pages to their own section while keeping their own > > > namespace. > > > PR: 212290 > > > Reported by: mj@bsdops.com > > > Approved by: ceri@, wosch@ > > > MFC after: 4 weeks > > > --- > > > sbin/Makefile | 6 ++++++ > > > share/man/man4/Makefile | 4 +--- > > > share/man/man4/man4.aarch64/Makefile | 5 +++++ > > > share/man/man4/man4.arm/Makefile | 5 +++++ > > > share/man/man4/man4.i386/Makefile | 5 +++++ > > > share/man/man4/man4.powerpc/Makefile | 5 +++++ > > > share/man/man5/make.conf.5 | 2 +- > > > usr.sbin/Makefile | 7 +++++++ > > > usr.sbin/apm/Makefile | 4 ++++ > > > 9 files changed, 39 insertions(+), 4 deletions(-) > > > > > > diff --git a/sbin/Makefile b/sbin/Makefile > > > index 64840bae82bb..f53e2f037ebe 100644 > > > --- a/sbin/Makefile > > > +++ b/sbin/Makefile > > > @@ -90,6 +90,12 @@ SUBDIR.${MK_ZFS}+= zfsbootcfg > > > SUBDIR.${MK_TESTS}+= tests > > > +# Add architecture-specific manpages > > > +# to be included anyway > > > +MAN= sconfig/sconfig.8 > > > + > > > +.include > > > + > > > .include > > > SUBDIR_PARALLEL= > > > diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile > > > index 5051470edc71..9027fe7df841 100644 > > > --- a/share/man/man4/Makefile > > > +++ b/share/man/man4/Makefile > > > @@ -895,9 +895,7 @@ _cgem.4= cgem.4 > > > MLINKS+=cgem.4 if_cgem.4 > > > .endif > > > -.if empty(MAN_ARCH) > > > -__arches= ${MACHINE} ${MACHINE_ARCH} ${MACHINE_CPUARCH} > > > -.elif ${MAN_ARCH} == "all" > > > +.if empty(MAN_ARCH) || ${MAN_ARCH} == "all" > > > __arches= ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E} > > > .else > > > __arches= ${MAN_ARCH} > > > diff --git a/share/man/man4/man4.aarch64/Makefile b/share/man/man4/man4.aarch64/Makefile > > > index 6714a47011ef..ef5fcd84ccd4 100644 > > > --- a/share/man/man4/man4.aarch64/Makefile > > > +++ b/share/man/man4/man4.aarch64/Makefile > > > @@ -17,6 +17,11 @@ MAN= \ > > > rk_i2c.4 \ > > > rk_pinctrl.4 \ > > > +# Link files to the parent directory > > > +.for _manpage in ${MAN} > > > +MLINKS+=${_manpage} ../${_manpage} > > > +.endfor > > > > This breaks make -DNO_ROOT in a subtle manner and so likely pkgbase. > > > > The right way to do it is to add something that uses INSTALL_RSYMLINK or alike. > > I looked a bit into this and I think that the change does nothing wrong, we > just populate METALOG incorrectly. After all, for hardlinks the source and > target are interchangeable, they are two names for the same file. > > Maybe we could fix the issue in the place where mtree entries are created > for hardlinks? > > Baring that, one easy way to work around the issue of having .. in paths is > to install architecture manpage links in the opposite order: first install a > manpage to a main directory, then create a hardlink in an architecture > sub-directory. > > As a proof of concept, I implemented that idea for man4.arm and man4.aarch: > https://people.freebsd.org/~avg/man-arch-links.diff > > And here is a sample of entries from METALOG produced with the change: > ./usr/share/man/man4/rk_gpio.4.gz type=file uname=root gname=wheel mode=0444 > size=1075 tags=package=utilities > ./usr/share/man/man4/aarch64/rk_gpio.4.gz type=file uname=root gname=wheel > mode=0444 size=1075 tags=package=utilities > ./usr/share/man/man4/aw_gpio.4.gz type=file uname=root gname=wheel mode=0444 > size=1253 tags=package=utilities > ./usr/share/man/man4/imx_wdog.4.gz type=file uname=root gname=wheel > mode=0444 size=1867 tags=package=utilities > ./usr/share/man/man4/imxwdt.4.gz type=file uname=root gname=wheel mode=0444 > size=1867 tags=package=utilities > ./usr/share/man/man4/arm/imxwdt.4.gz type=file uname=root gname=wheel > mode=0444 size=1867 tags=package=utilities > ./usr/share/man/man4/arm/aw_gpio.4.gz type=file uname=root gname=wheel > mode=0444 size=1253 tags=package=utilities > ./usr/share/man/man4/arm/imx_wdog.4.gz type=file uname=root gname=wheel > mode=0444 size=1867 tags=package=utilities > > Looking at the output I got another thought: do we need architecture sub-dir > links at all now that we install manpages to a main directory? > Is there any benefit to having the same manpage in a directory (like man4) > and its immediate subdirectory (like man4/arm) ? > Hardlink not in the same directory is imho a fragile setup anyway, what if a user has different mount points here, the hardlink would be broken. while there is little chances someone is doing that, history told me people are doing weird things and if they haven't yet, they will soon. I continue to think this kind of links should be 1/ symlinks, 2/ relative symlinks if they are in a situation which can become a cross device issue. Best regards, Bapt From nobody Thu Nov 25 14:30:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 61A3918B89F2; Thu, 25 Nov 2021 14:30:39 +0000 (UTC) (envelope-from avg@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 4J0Kzg0lCRz3Nwq; Thu, 25 Nov 2021 14:30:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1F35EAED2; Thu, 25 Nov 2021 14:30:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> Date: Thu, 25 Nov 2021 16:30:35 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.3.0 From: Andriy Gapon Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures Content-Language: en-US To: Baptiste Daroussin Cc: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= , Ed Maste , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> In-Reply-To: <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637850639; 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=MxasM2M/MwRD3I5xtpAcdvFikueIiswaqeodwGmsWTs=; b=hK+UUDOjlNrCGSH3OUOKZ77BfoSi2A0xPAEd2l3ElSVGLa9s68YEcQjUV7xNOCWBd5EKYJ +ewIg9Ehh4zZlqHEG0fknEizBb961mrkrYxO/uBkV3axQUH+283PNKnI2qnz6q4fhdQh/u bUF29zPLXh6N/mrZl1SSN4IAXKidZJevr9g+CLKGpWbA4lzlGBud4jvPEgj6o3iXlv7Zu6 3e2FZhn+sArjs4BaJLu/MeOUk5syXHaM8mtiVOcXmg23aIFkYtn5+jzrV9JanqnQ3LAP6f rLlEnNaA31pl8KXoHr1se0r+RDQYLchQfis5IRHMwfyLt1IT8CvZ4r60/iWOdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637850639; a=rsa-sha256; cv=none; b=UTgh3iE8UsKKJZag+kd/y68KVtSe76rLRxNvbvstAWf7KWIlRitgoMonRi/ihlBi3K00tV H9WGqEZjo6G1/VXVKSVQXaQC+ZjwoC6s/bfYAvJmYpNa6wCJ8IGye1VNPkwF++OtKk464W 5okMZ0Lz1GHljKBkwIN3w6EYM2Vq/HAXcUZ4INdiECLXDRNzV5ephMnlLixTKSNOcHxpPa GWIjky/W0/Riy83FLsd4ZA14IXFbxTn5YVZGfLk8qkfccdwIcAUW/Gnhl+jn18FKqx2g74 eXn76DFCIIPP6RvD0Ze57JKitRMEz27wXH1bZHUMUuL8Kz28h5rfAyDB0yGPLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 25/11/2021 16:23, Baptiste Daroussin wrote: > On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: >> Looking at the output I got another thought: do we need architecture sub-dir >> links at all now that we install manpages to a main directory? >> Is there any benefit to having the same manpage in a directory (like man4) >> and its immediate subdirectory (like man4/arm) ? >> > Hardlink not in the same directory is imho a fragile setup anyway, what if a > user has different mount points here, the hardlink would be broken. while there > is little chances someone is doing that, history told me people are doing weird > things and if they haven't yet, they will soon. > > I continue to think this kind of links should be 1/ symlinks, 2/ relative > symlinks if they are in a situation which can become a cross device issue. Yeah... but are they needed at all? :-) I mean, whichever way we install manpages they are always installed into manX. I do not see a point / benefit of having another copy / link / whatever in manX/arch. P.S. Adding support for "MSYMLINKS" is not that hard. But I'd rather remove some stuff than add some new stuff. -- Andriy Gapon From nobody Thu Nov 25 14:31:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B770E18B9593; Thu, 25 Nov 2021 14:31: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 4J0L0B4cFfz3PlK; Thu, 25 Nov 2021 14:31:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55FF91F0AB; Thu, 25 Nov 2021 14:31: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 1APEV6gd091832; Thu, 25 Nov 2021 14:31:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APEV6JU091831; Thu, 25 Nov 2021 14:31:06 GMT (envelope-from git) Date: Thu, 25 Nov 2021 14:31:06 GMT Message-Id: <202111251431.1APEV6JU091831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 0229172a6576 - main - usb/u3g: Add support for Quectel EM05. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0229172a65765392f566ae1cdc730615ab504e15 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637850666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4rILC6x7vZHgFBxcUT7VQxaBBkIxFgm5VMcaswAI9zc=; b=lZ5sezn6Oa2frDHM6bk1/SYA4lBFad1QXjTr6pHxBtHGOTmar6maeeqVg/WTwFI2EJ/olk sJUj7mZXx9DC8h+157PIAjZdJ9wT1EquTNCcZM1B1DH2/YesRYpNqnyBh/rizb04qntmhb Rl80INgwiEMKZ4KXE5OqA0cOeCiybUDytHcCfD/cK0uz2cmi9Tm3jwLZAu2z0aEZgWfTIh fAsl8PL1fiUkcK6edZiz+uiNr/onHFRKV5x5qISPLtw3t0FLmvUNgalJGyl1iMybkqORIe Ib79i4EHTp48AE7rF9Qop0MtunybGK5MAXZVoZrQQVmtMQwlJZHAsKq86CjOEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637850666; a=rsa-sha256; cv=none; b=u1nHogMe2roEIMs/trbv5OGKjaC/L8Okc2Ogl97hC2WOASBeMLqkiZ1eAcadg8JVSM9cXq D1m4t4HPrKYsfy9vd8waJuXhkyFFd9tGNe6AN2U1iO1jNbo22PL/XihKtiec1usBPClWxy /IaprOEZluy3RiTPnyhpAWK9Fe0mQFapK0brMIxd3GcD/CcFIvrMB79UPaHzY4QOYgg0Rx acPgk010TnJIl4/PoKOYKe97hMYiU2+hn4ZJpEO1tHp/+eZPKrmF2Gz4JI8TYihtQx6ygb cggJEMyYPW1evoPPAWEIRg8DtdaQ251jN7qO90HxQ+2v4ujHOEtzfZaFFaMUFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=0229172a65765392f566ae1cdc730615ab504e15 commit 0229172a65765392f566ae1cdc730615ab504e15 Author: Hans Petter Selasky AuthorDate: 2021-11-25 14:27:50 +0000 Commit: Hans Petter Selasky CommitDate: 2021-11-25 14:29:47 +0000 usb/u3g: Add support for Quectel EM05. Pull Request: https://github.com/freebsd/freebsd-src/pull/565 MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index 22e4e8f6b2bb..664ea6c54d99 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -499,6 +499,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(QUANTA, Q101, 0), U3G_DEV(QUANTA, Q111, 0), U3G_DEV(QUECTEL, EC25, 0), + U3G_DEV(QUECTEL, EM05, 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 1183b4e283e4..7cf67ecf44bf 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -3948,6 +3948,7 @@ product QUANTA RW6815R 0xf003 HP iPAQ rw6815 RNDIS /* Quectel products */ product QUECTEL EC25 0x0125 LTE modem +product QUECTEL EM05 0x0127 LTE modem /* Quickshot products */ product QUICKSHOT STRIKEPAD 0x6238 USB StrikePad From nobody Thu Nov 25 14:31:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6CD8F18B9E52; Thu, 25 Nov 2021 14:31:47 +0000 (UTC) (envelope-from bapt@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 4J0L0y3XDzz3Q9g; Thu, 25 Nov 2021 14:31:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 2B415ACDD; Thu, 25 Nov 2021 14:31:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 3F1E650411; Thu, 25 Nov 2021 15:31:45 +0100 (CET) Date: Thu, 25 Nov 2021 15:31:45 +0100 From: Baptiste Daroussin To: Andriy Gapon Cc: Fernando =?utf-8?Q?Apestegu=C3=ADa?= , Ed Maste , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures Message-ID: <20211125143145.5jajvx52p5ma347c@aniel.nours.eu> References: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@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: <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637850706; 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=2tz7eazCAa0nq3wQ4PVOgSqsMAElGRmMKyiHwFSacx8=; b=n2e3GdBCZh1UaPB3Lo5m7s3XSc4CkJK/mSeIuZxrkBzXVjTvAgEzuM6idEQl+g0uDWU8OA 4OrQxC2cXXXx77Yt/Qw/wFaivDOkgl0BpsFxtN8wI7ltRA7O1I0Vy2RcrFjdOuDYwDfj58 Lqil4rfG88QZpwZDadIqqtxLc/DAI1odnRkVyylXyVa1XY5ghV3h9bq1/FZYIoVEBOHgpb DiadMB2OmZG5NUNMMvDnio937lXxDHYRcO9Jn0xDt4ucVOeFfXEGKvRrHCqibSkFaklliU TZme1b+gXq4yDFI0GxZiF2pvO6iT+pqTqyjMPAuS87fJPzU7JAJc7Gap5UB2+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637850706; a=rsa-sha256; cv=none; b=Pzui4XtJaBrBbl4OayAfy9lLUgb6pWTGSrTaQtlPoFRHz0z32qk/51vOeSaGQ8P8oAjzY3 9AFVFdLpgHK/TgryDOVT1ClaialcL/2tyHDzFyBdFwXIUEy6myNGoxeiZ/1g0ULU+S0uM8 AsNl/I8DRUMevvp9bEEiQKLlbhn4uJ9oVrTX2UMJcm5ogclubnllDPhDdFxSu+Xs2ODaea hIDMl4Z871pGfIgv8Amno0Q/CKFDeX70uW3iTt2DbiRSrEsx+MODN/yqg8yEFVxBlO5mKQ ubHg8V4+DMeDMIxrmIlnTZePuBMIjbYr/XAJIa+xPm4xN5B1tRZxD1x9Rx5eYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 25, 2021 at 04:30:35PM +0200, Andriy Gapon wrote: > On 25/11/2021 16:23, Baptiste Daroussin wrote: > > On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: > > > Looking at the output I got another thought: do we need architecture sub-dir > > > links at all now that we install manpages to a main directory? > > > Is there any benefit to having the same manpage in a directory (like man4) > > > and its immediate subdirectory (like man4/arm) ? > > > > > Hardlink not in the same directory is imho a fragile setup anyway, what if a > > user has different mount points here, the hardlink would be broken. while there > > is little chances someone is doing that, history told me people are doing weird > > things and if they haven't yet, they will soon. > > > > I continue to think this kind of links should be 1/ symlinks, 2/ relative > > symlinks if they are in a situation which can become a cross device issue. > > Yeah... but are they needed at all? :-) > > I mean, whichever way we install manpages they are always installed into > manX. I do not see a point / benefit of having another copy / link / > whatever in manX/arch. > > P.S. > Adding support for "MSYMLINKS" is not that hard. > But I'd rather remove some stuff than add some new stuff. > There I fully agree I don't see the point of the initial change in the first place :D Best regards, Bapt From nobody Thu Nov 25 14:37:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A81C818BC6D2; Thu, 25 Nov 2021 14:37:11 +0000 (UTC) (envelope-from avg@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 4J0L7C39MQz3j1w; Thu, 25 Nov 2021 14:37:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 74878B5E6; Thu, 25 Nov 2021 14:37:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: <4a53cb13-1a9c-22c3-c3ee-27790927f4e3@FreeBSD.org> Date: Thu, 25 Nov 2021 16:37:08 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.3.0 From: Andriy Gapon Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures Content-Language: en-US To: Baptiste Daroussin Cc: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= , Ed Maste , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> <20211125143145.5jajvx52p5ma347c@aniel.nours.eu> In-Reply-To: <20211125143145.5jajvx52p5ma347c@aniel.nours.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637851031; 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=kQ9pafv92FFkwTwh55U7xCrbb+CSGlffSlr27XsW71k=; b=VyWyO3/Q8VttQoOsPDv0DdZgCUg9MYyvlCTFu7MIUdhOd9SdLIwTx0+fT1xrzEJpp6XFie JbFWstxlM2EAaZQyvLPxx81EMVATIo3EFZtNCGpRgYFatn2JzJlO1iPX2lmTyApz24n41o N3WNTPu3N/D1IDbrcZcL2MqPDjd4XkEkZF1s/5ScptGIZhQVUTMa7Bf7xgsVoaHZXYio+3 OCEr3pAGiJTpAHilKa56mXywjYuzlpDXwTbH7I5yUjLsUYRH3sJM5z7fYfwFuGMoVJ01f0 Sh7XsvC+NQJk7FrbQdnbwlETR1OQsUVdOWVjvYWwv5nhZcFuAFn3EA2yRPyvPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637851031; a=rsa-sha256; cv=none; b=C/uEvN8pFcxtIWba0yIJPJUSwokcZPpBLNezJwzGJ0JXH2Fy9YlNsGdpdd3HFWxN8l0DhV sZrDO4skbbVkS49UOBNlpF02AdZaVUv1H+8icdra9yvQlrN6xxFFxgRHMVw/LKTQzbUl9l EdL278+1PdRD9YAn4xdRYwlgmjG12sSj2C+YwuJeWm2Ywf1+iz7SmsBwpQOpisIH5/brQp LGT6opF6M5xS3FSF55xW3G0L/MuDJ7bRk54WR/XCjq0VrXt5E9CMJS++MqiWr+tft41Ad4 uzSBCP2eOB1C32UTWWgHEzqaQv0oW4KjtLM4dgALhmYKhQaZla6/meLy8le9eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 25/11/2021 16:31, Baptiste Daroussin wrote: > On Thu, Nov 25, 2021 at 04:30:35PM +0200, Andriy Gapon wrote: >> On 25/11/2021 16:23, Baptiste Daroussin wrote: >>> On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: >>>> Looking at the output I got another thought: do we need architecture sub-dir >>>> links at all now that we install manpages to a main directory? >>>> Is there any benefit to having the same manpage in a directory (like man4) >>>> and its immediate subdirectory (like man4/arm) ? >>>> >>> Hardlink not in the same directory is imho a fragile setup anyway, what if a >>> user has different mount points here, the hardlink would be broken. while there >>> is little chances someone is doing that, history told me people are doing weird >>> things and if they haven't yet, they will soon. >>> >>> I continue to think this kind of links should be 1/ symlinks, 2/ relative >>> symlinks if they are in a situation which can become a cross device issue. >> >> Yeah... but are they needed at all? :-) >> >> I mean, whichever way we install manpages they are always installed into >> manX. I do not see a point / benefit of having another copy / link / >> whatever in manX/arch. >> >> P.S. >> Adding support for "MSYMLINKS" is not that hard. >> But I'd rather remove some stuff than add some new stuff. >> > > There I fully agree I don't see the point of the initial change in the first place :D Well, I do see the point of the change and I like it. But I don't understand why / how MANSUBDIR was / is useful. Perhaps people thought that hypothetically it would be a good idea if man foobar on amd64 and sparc64 had different content... But looks like it never happened and the idea (or strawman) is debatable too. -- Andriy Gapon From nobody Thu Nov 25 14:52:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 62F1C188BABC; Thu, 25 Nov 2021 14:53:16 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (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 4J0LTm1djVz3nxq; Thu, 25 Nov 2021 14:53:16 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by mail-qk1-f171.google.com with SMTP id i9so11948863qki.3; Thu, 25 Nov 2021 06:53:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EggQSsFUFQe14CEB7qZr45MFa5l+x9ypRMvNae9fK/Q=; b=zgmy8FVU1/a7BMFvUiFr2jvLq4SzU+mtuWNfmhgP3DRZCR0Fp/J04sBxzmapSbm09y EoYqzRminNDSEs2jqndRhZecnjGowzKXNrAQl9Drb1P9zvTUFRCNlsSXhrhZ6n1Ixgu/ mY9a4ru3g89AuAo68PWE1cLjbROlCsms3c5U28z3RAqX8aHSRn/q2Rjdp2G7nyGFz56N lssENs8w+vMDZX45ooxohGOdwuFJgzLMoix5rRE5QzYnMPvmmRZ3T4gqCkEZHiGTAXLk yBu4RR3CEZ/JQ4PIjNJp5Uc4zjjkrbtfFVMQC1v3RWx+HXK9DszYDrlm1Dn3Xwj0gA1B Dw8w== X-Gm-Message-State: AOAM5321v0YGrYphg0GWQOPi0BJ7t3v4JRVFEGL2Hl+wCT9lCHhoBuS7 3wMl9PmIfwDCfmhzjqeDmmK7JTi/E50QKw== X-Google-Smtp-Source: ABdhPJxulumAiY/6jD3rEd/bp3GRkscW9ELf6HaPRyxBXQ0NfEV3mOueBWLiEWq1yDq6S9GKVgC7dA== X-Received: by 2002:a05:620a:1587:: with SMTP id d7mr15922299qkk.126.1637851988716; Thu, 25 Nov 2021 06:53:08 -0800 (PST) Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com. [209.85.219.173]) by smtp.gmail.com with ESMTPSA id v1sm1691089qtw.65.2021.11.25.06.53.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Nov 2021 06:53:08 -0800 (PST) Received: by mail-yb1-f173.google.com with SMTP id f186so12479563ybg.2; Thu, 25 Nov 2021 06:53:08 -0800 (PST) X-Received: by 2002:a25:4c9:: with SMTP id 192mr7118446ybe.260.1637851988308; Thu, 25 Nov 2021 06:53:08 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> <20211125143145.5jajvx52p5ma347c@aniel.nours.eu> <4a53cb13-1a9c-22c3-c3ee-27790927f4e3@FreeBSD.org> In-Reply-To: <4a53cb13-1a9c-22c3-c3ee-27790927f4e3@FreeBSD.org> From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Date: Thu, 25 Nov 2021 15:52:03 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures To: Andriy Gapon Cc: Baptiste Daroussin , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4J0LTm1djVz3nxq X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 25, 2021 at 3:37 PM Andriy Gapon wrote: > > On 25/11/2021 16:31, Baptiste Daroussin wrote: > > On Thu, Nov 25, 2021 at 04:30:35PM +0200, Andriy Gapon wrote: > >> On 25/11/2021 16:23, Baptiste Daroussin wrote: > >>> On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: > >>>> Looking at the output I got another thought: do we need architecture sub-dir > >>>> links at all now that we install manpages to a main directory? > >>>> Is there any benefit to having the same manpage in a directory (like man4) > >>>> and its immediate subdirectory (like man4/arm) ? > >>>> > >>> Hardlink not in the same directory is imho a fragile setup anyway, what if a > >>> user has different mount points here, the hardlink would be broken. while there > >>> is little chances someone is doing that, history told me people are doing weird > >>> things and if they haven't yet, they will soon. > >>> > >>> I continue to think this kind of links should be 1/ symlinks, 2/ relative > >>> symlinks if they are in a situation which can become a cross device issue. > >> > >> Yeah... but are they needed at all? :-) > >> > >> I mean, whichever way we install manpages they are always installed into > >> manX. I do not see a point / benefit of having another copy / link / > >> whatever in manX/arch. > >> > >> P.S. > >> Adding support for "MSYMLINKS" is not that hard. > >> But I'd rather remove some stuff than add some new stuff. > >> > > > > There I fully agree I don't see the point of the initial change in the first place :D > > Well, I do see the point of the change and I like it. > But I don't understand why / how MANSUBDIR was / is useful. > > Perhaps people thought that hypothetically it would be a good idea if man foobar > on amd64 and sparc64 had different content... > But looks like it never happened and the idea (or strawman) is debatable too. How about removing the MLINKS in every man4.${arch}/Makefile and doing something like this in the parent man4/Makefile? diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index dfef254bff5..46097319b06 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -906,6 +906,9 @@ __arches= ${MAN_ARCH} .for __arch in ${__arches:O:u} .if exists(${.CURDIR}/man4.${__arch}) SUBDIR+= man4.${__arch} +.for __manpage in ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.${__arch}*.4"!:E} +MLINKS+= man4.${__arch}/${__manpage} ${__manpage} +.endfor .endif .endfor About keeping the arch-specific directories I don't have a strong opinion about it. It could be argued that it is a simple way to know which man pages are related to a certain architecture. In the case of the i386 most of the man pages have this information in the .Dt line: [fernape@vm-current /usr/src/share/man/man4/man4.i386]$ grep Dt *.4 CPU_ELAN.4:.Dt CPU_ELAN 4 i386 apm.4:.Dt APM 4 i386 ce.4:.Dt CE 4 i386 cp.4:.Dt CP 4 i386 glxiic.4:.Dt GLXIIC 4 i386 glxsb.4:.Dt GLXSB 4 i386 longrun.4:.Dt LONGRUN 4 i386 npx.4:.Dt NPX 4 i386 pae.4:.Dt PAE 4 i386 pbio.4:.Dt PBIO 4 i386 perfmon.4:.Dt PERFMON 4 i386 pnp.4:.Dt PNP 4 i386 pnpbios.4:.Dt PNPBIOS 4 i386 sbni.4:.Dt SBNI 4 i386 smapi.4:.Dt SMAPI 4 i386 vpd.4:.Dt VPD 4 i386 But it is not the case for other man pages: [fernape@vm-current /usr/src/share/man/man4/man4.powerpc]$ grep Dt *.4 abtn.4:.Dt ABTN 4 adb.4:.Dt ADB 4 akbd.4:.Dt AKBD 4 ams.4:.Dt AMS 4 cuda.4:.Dt CUDA 4 dtsec.4:.Dt DTSEC 4 llan.4:.Dt LLAN 4 ofw_console.4:.Dt OFW_CONSOLE 4 powerpc pmu.4:.Dt PMU 4 powermac_nvram.4:.Dt POWERMAC_NVRAM 4 powerpc smu.4:.Dt SMU 4 snd_ai2s.4:.Dt SND_AI2S 4 snd_davbus.4:.Dt SND_DAVBUS 4 tsec.4:.Dt TSEC 4 Cheers. > > > -- > Andriy Gapon From nobody Thu Nov 25 15:09:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 97FF9189E7FD; Thu, 25 Nov 2021 15:09:28 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from tor1-11.mx.scaleengine.net (tor1-11.mx.scaleengine.net [209.51.186.6]) (using TLSv1.3 with cipher TLS_AES_256_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 4J0LrS3rQMz3tMd; Thu, 25 Nov 2021 15:09:28 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.3] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by tor1-11.mx.scaleengine.net (Postfix) with ESMTPSA id AA2A03314F; Thu, 25 Nov 2021 15:09:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 tor1-11.mx.scaleengine.net AA2A03314F Message-ID: <1a76eb2e-b9f0-946e-c80b-e6bc9e258d59@freebsd.org> Date: Thu, 25 Nov 2021 10:09:25 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features Content-Language: en-US To: Helge Oldach Cc: manu@bidouilliste.com, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org References: <202111250738.1AP7cuCu042555@nuc.oldach.net> From: Allan Jude In-Reply-To: <202111250738.1AP7cuCu042555@nuc.oldach.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4J0LrS3rQMz3tMd X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 11/25/2021 2:38 AM, Helge Oldach wrote: > Hi, > > Allan Jude wrote on Wed, 24 Nov 2021 19:02:47 +0100 (CET): >> On 11/24/2021 3:30 AM, Emmanuel Vadot wrote: >>> On Tue, 23 Nov 2021 20:36:40 +0100 (CET) >>> freebsd@oldach.net (Helge Oldach) wrote: >>> >>>> Allan Jude wrote on Tue, 23 Nov 2021 20:14:53 +0100 (CET): >>>>> On 11/23/2021 5:00 AM, Helge Oldach wrote: >>>>>> Allan Jude wrote on Mon, 22 Nov 2021 19:14:13 +0100 (CET): >>>>>> Hmmm. On a RPi4/8G: >>>>>> >>>>>> Before (FreeBSD 13.0-STABLE (GENERIC) #366 stable/13-n248173-d16fbc488e6): >>>>>> | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes >>>>>> | aes-256-gcm 35791.98k 38533.57k 39986.77k 41397.59k 39840.43k 39638.36k >>>>>> >>>>>> After (FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621) >>>>>> >>>>>> | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes >>>>>> | aes-256-gcm 21277.62k 23226.64k 23613.90k 23687.51k 23892.93k 23947.95k >>>>>> >>>>>> It seems that AES throughput is actually cut by almost half? >>>>> >>>>> Do you know which of the CPU optimizations your RPi4 supports? >>>> >>>> Is this what you need? >>>> >>>> Instruction Set Attributes 0 = >>> >>> So there is no AES+PMULL instruction set on RPI4, I guess that openssl >>> uses them for aes-gcm. >>> >>> I wonder what it uses before that make it have this boost. >>> >>> On my rockpro64 I do see the improvement btw : >>> root@generic:~ # cpuset -l 4,5 openssl speed -evp aes-256-gcm >>> ... >>> aes-256-gcm 122861.59k 337938.39k 565408.44k 661223.09k 709175.19k 712327.25k >>> root@generic:~ # cpuset -l 4,5 env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm >>> ... >>> aes-256-gcm 34068.11k 38068.62k 39435.24k 39818.75k 39905.34k 39922.35k >>> >>> Running on the big cores at max freq. >>> >>>> Instruction Set Attributes 1 = <> >>>> Processor Features 0 = >>>> Processor Features 1 = <> >>>> Memory Model Features 0 = >>>> Memory Model Features 1 = <8bit VMID> >>>> Memory Model Features 2 = <32bit CCIDX,48bit VA> >>>> Debug Features 0 = >>>> Debug Features 1 = <> >>>> Auxiliary Features 0 = <> >>>> Auxiliary Features 1 = <> >>>> AArch32 Instruction Set Attributes 5 = >>>> AArch32 Media and VFP Features 0 = >>>> AArch32 Media and VFP Features 1 = >>>> >>>>> You can set the environment variable OPENSSL_armcap to override >>>>> OpenSSL's detection. >>>>> >>>>> Try: env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm >>>> >>>> On FreeBSD 13.0-STABLE (GENERIC) #367 stable/13-n248176-f085bb0e621 again (i.e. after this commit): >>>> >>>> hmo@p48 ~ $ env OPENSSL_armcap=0 openssl speed -evp aes-256-gcm >>>> Doing aes-256-gcm for 3s on 16 size blocks: 6445704 aes-256-gcm's in 3.08s >>>> Doing aes-256-gcm for 3s on 64 size blocks: 1861149 aes-256-gcm's in 3.00s >>>> Doing aes-256-gcm for 3s on 256 size blocks: 479664 aes-256-gcm's in 3.01s >>>> Doing aes-256-gcm for 3s on 1024 size blocks: 122853 aes-256-gcm's in 3.04s >>>> Doing aes-256-gcm for 3s on 8192 size blocks: 15181 aes-256-gcm's in 3.00s >>>> Doing aes-256-gcm for 3s on 16384 size blocks: 7796 aes-256-gcm's in 3.07s >>>> OpenSSL 1.1.1l-freebsd 24 Aug 2021 >>>> built on: reproducible build, date unspecified >>>> options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) >>>> compiler: clang >>>> The 'numbers' are in 1000s of bytes per second processed. >>>> type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes >>>> aes-256-gcm 33504.57k 39704.51k 40825.01k 41394.83k 41454.25k 41601.52k >>>> hmo@p48 ~ $ openssl speed -evp aes-256-gcm >>>> Doing aes-256-gcm for 3s on 16 size blocks: 4066201 aes-256-gcm's in 3.00s >>>> Doing aes-256-gcm for 3s on 64 size blocks: 1087387 aes-256-gcm's in 3.00s >>>> Doing aes-256-gcm for 3s on 256 size blocks: 280110 aes-256-gcm's in 3.03s >>>> Doing aes-256-gcm for 3s on 1024 size blocks: 70412 aes-256-gcm's in 3.04s >>>> Doing aes-256-gcm for 3s on 8192 size blocks: 8762 aes-256-gcm's in 3.00s >>>> Doing aes-256-gcm for 3s on 16384 size blocks: 4402 aes-256-gcm's in 3.02s >>>> OpenSSL 1.1.1l-freebsd 24 Aug 2021 >>>> built on: reproducible build, date unspecified >>>> options:bn(64,64) rc4(int) des(int) aes(partial) idea(int) blowfish(ptr) >>>> compiler: clang >>>> The 'numbers' are in 1000s of bytes per second processed. >>>> type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes >>>> aes-256-gcm 21686.41k 23197.59k 23656.30k 23725.04k 23926.10k 23916.23k >>>> hmo@p48 ~ $ >>>> >>>> Kind regards, >>>> Helge >>> >>> >> >> So based on results from Manu, and Mark Millard, it seems almost every >> ARM platform is faster when it takes advantage of the CPU features, >> except the RPi4(B). >> >> As Manu pointed out, it doesn't appear to have the AES+PMULL feature, >> which means it must be something else that is slowing it down. >> >> What might help, is to try each feature in turn, and figure out which >> one is causing slower results. >> >> #define HWCAP_FP 0x00000001 >> #define HWCAP_ASIMD 0x00000002 >> #define HWCAP_EVTSTRM 0x00000004 >> #define HWCAP_AES 0x00000008 >> #define HWCAP_PMULL 0x00000010 >> #define HWCAP_SHA1 0x00000020 >> #define HWCAP_SHA2 0x00000040 >> #define HWCAP_CRC32 0x00000080 >> >> So try: >> env OPENSSL_armcap=1 openssl speed -evp aes-256-gcm >> as well as with armcap=2, 3 (both FP and ASIMD), 8 (just AES) etc. > > hmo@p48 ~ $ for f in 0 1 2 3 8 16 32 64 128 ; do echo -n $f:; env OPENSSL_armcap=$f openssl speed -evp aes-256-gcm 2>&1 | tail -1 | cut -wf7; done > 0:42295.15k > 1:23891.19k > 2:42208.57k > 3:23970.56k > 8:42354.98k > 16:42199.06k > 32:size > Illegal instruction (core dumped) > 64:42322.42k > 128:42275.00k > hmo@p48 ~ $ > > So I guess HWCAP_FP is the culprit? Maybe related to hard/soft floating > point math which indeed is kind of special on the Pi? > >> For ones where the CPU lacks the feature, it will crash with 'Illegal >> instruction' >> >> Separately, it might also be interesting to see the results of `openssl >> speed -evp sha256` before/after/with the different OPENSSL_armcap values > > Please let me know in case you still require this. > > Kind regards > Helge > So yeah, the issue seems to be that floating point on the RPi4 is slower than not, but now openssl (properly) detects that the CPU advertises support for it. As seen elsewhere in the thread, most other ARM platforms get a very significant speed boost. -- Allan Jude From nobody Thu Nov 25 15:14:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6A2BD18A2370; Thu, 25 Nov 2021 15:15:22 +0000 (UTC) (envelope-from kevans91@ksu.edu) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2064.outbound.protection.outlook.com [40.107.102.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0LzF5y54z3w5m; Thu, 25 Nov 2021 15:15:21 +0000 (UTC) (envelope-from kevans91@ksu.edu) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IrCjTdnYsUag9yzRYE00cE9fIrNjFQ4NssE7cLnl0OhEVE0NcGiQ4usc036J3PPweoRAaPpJV3nr0N2JmnyOgvWT0Q/Ef4qcW3aY8h2Kfci4nTXANKD393myx8EYeiWjS7Verhu5T5QMDgOmPdp3pq5nP19da5kGAxHwumgTVIe0BIwV83Nn4028D1l1QnkrID9gh1ko910oYOFHsrHrKwMePDgBoOIhm2Y3nX0HOaWZJuipihuPInr640MS5xLEq28ttardNc/tLpvwvyUaCjOnR636/i6LGZsejzkR0CZvQQTwXqV2VKicCS2EQAWlpWLPtnuQczv2cy4Rso6Tmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Rhis6PbG1aAbaTQnKBLf6JCDHUIUgavPES4rzAroA/8=; b=d9KMYAnWnCPDAaWv98UD1hSCESdqUh0EzKuQpzCuIIxjbBL7J9IoUbsJNlVyapbx0ndcLuQjk2oy9pv5wBlemCV9OOxfG2FE7olJrZe42J0CMspznMn6W1FQVLFH+W2mLZUtJbZ9g44blD24+wWth+DRRYNBYF2IZQ7d7l1rOqj1Dkn9nis6JiRHdW0y2tPYjDxqRKwOv0FpDgxi8CmdR4Sn5kt4R61xqscoTE6m3Ny55EYnPNFby15gmF+g+1UFkxC1qDnLi96uL4dmeDmFgxYfvfBRH+fnqyHpWyDNE75iodYit3C7Md2pabuJI6CKehhNAM6RT4t32WypHYKKyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ksu.edu; dmarc=pass action=none header.from=ksu.edu; dkim=pass header.d=ksu.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ksu.edu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Rhis6PbG1aAbaTQnKBLf6JCDHUIUgavPES4rzAroA/8=; b=reluiOMMqNr8ODeh2434Z9jtMIKHLgrdhDD9qGj0stqYJrIh+YMrwg18mDzrtIZYSoN37/pxntnneh9TfK5/REAq3tPheF/n7EivUOXmsWYUKaNtvIHh4i6SssVnGy4XmcitPqdVCsVz7Yz3bxSzDhltLlg1wV4rjwhBwv+tOas= Received: from DM6PR05MB6953.namprd05.prod.outlook.com (2603:10b6:5:206::17) by DM5PR0501MB3832.namprd05.prod.outlook.com (2603:10b6:4:7b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.17; Thu, 25 Nov 2021 15:15:13 +0000 Received: from DM6PR05MB6953.namprd05.prod.outlook.com ([fe80::e8b3:ed98:faf7:8233]) by DM6PR05MB6953.namprd05.prod.outlook.com ([fe80::e8b3:ed98:faf7:8233%4]) with mapi id 15.20.4734.020; Thu, 25 Nov 2021 15:15:13 +0000 X-Gm-Message-State: AOAM530bBPettjGrAXcT9ftnpvcp2rJNH1Rt510jEhgIG/f0SIz8EPSB LaDtXg9QDtzf/HEuxgO/mjOt9tA9ZOXZW95rg7o= X-Google-Smtp-Source: ABdhPJyPmFjixCSc/t4ooJ+NnCM7my0ln/kZpsjU+k6ajcMS5VbhEvQmF+yMmiIw93dHXoGVftA6+84GS8u35C9fhZk= X-Received: by 2002:a05:620a:4404:: with SMTP id v4mr15816505qkp.350.1637853309268; Thu, 25 Nov 2021 07:15:09 -0800 (PST) References: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> In-Reply-To: <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> From: Kyle Evans Date: Thu, 25 Nov 2021 09:14:58 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures To: Andriy Gapon Cc: Baptiste Daroussin , =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-ClientProxiedBy: MN2PR02CA0015.namprd02.prod.outlook.com (2603:10b6:208:fc::28) To DM6PR05MB6953.namprd05.prod.outlook.com (2603:10b6:5:206::17) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: from mail-qk1-f171.google.com (209.85.222.171) by MN2PR02CA0015.namprd02.prod.outlook.com (2603:10b6:208:fc::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23 via Frontend Transport; Thu, 25 Nov 2021 15:15:12 +0000 Received: by mail-qk1-f171.google.com with SMTP id b67so11975898qkg.6; Thu, 25 Nov 2021 07:15:12 -0800 (PST) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 38360e8e-c1aa-41be-795e-08d9b02660bf X-MS-TrafficTypeDiagnostic: DM5PR0501MB3832: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q50pskQtkhj/ns5BGUkp3aCbcTT5Un2pgfDEsg7AcU73YE91mmDVxGQ7xZ2yQTajPfAqJbXcoucA8sSj7rvecjqb5I3hWY41SHIRrl6iPgecDZrcVZjkGipD2oKHmBSoR5lFg//o7UFUNuCLZJkT9d1P73ip+qTzFWpV5xeYvw8nwZOGFD967LSjfwdoH/bvDEja3Pk1PF4fpqkawFensS2aVf8yfcDfFMPYJTaug7pyleVX/OPcyio4kgvaSAybtfu1WwA8DRK+Nl3KDakqXVaexRmVTtjvC6NlrvxBdBXRuollX/WHKMhTGGuJmIRFemkS9jroqd4lmVJ86Dsc4x4MsxfTQPw9X9OQzicQYCMhzHCaM3gI5Hyjf79FcLiWuTUtdxNGX3ePEHRrD1T+O4Uc9s0gdki3ugzS+nQaPVrHoxlDvBFEAM8+p8qGe2Cn2XdxXJT7HjAx8CaU/B8ellFQLkjjQJAlh0vKQKO+QXydDSyMCUL+NC9uBZtQP35QKEF8qKvllBT/Zv1reodhIP3GUhr78RHcBlCFIntVhN9yG6USzBhoBLr19PMkLH2isX2U81zWoMLZbj2grLuGlamGXxExe7xV8gWFydB5BuPKBa3OpkwfsI6Tzf8o2TiEqY+xKFpusDb1szuPv/FI9F6gP+GQ33bO6yvKXZg146UzBFMF6pSVtWSCLKaJ8Q7iZNWpoqli1NSdFIYpdTUzaoznvo10wP99sPJT8Qu1yWOVEDY+5Ff6vXyY6+2pwQDR X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR05MB6953.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(450100002)(66476007)(66946007)(66556008)(6916009)(6666004)(2906002)(186003)(26005)(9686003)(86362001)(52116002)(42186006)(508600001)(53546011)(38100700002)(5660300002)(38350700002)(8936002)(75432002)(8676002)(4326008)(316002)(786003)(54906003)(55446002)(55236004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aHgzZVF3RGhUWHZpR3o4WXpxY0s2TW9mc1hQUVVlMnRBTGJSZjRXdzBhUWdh?= =?utf-8?B?WXpjenZ6b2Rrd09ZZ3VZMGNNNUk2YVpZKzRBR1A1NWJGdGh4aVZTdllPSm81?= =?utf-8?B?Ni9icjNFQXNlQ0ZZTGgwWjdsdFI0RkR3clZiL3RBa1BaZzlVNUdtUm1LM1BT?= =?utf-8?B?SWtRZlBmOUhiZTl1MDhXTXcybU5yMnh0ZTdFZytxNTJ2dXdlSnZtUlVGS1M4?= =?utf-8?B?YXgvNHNpWno2aTN6QnN3V1FTYXYwKytqL3k5RHpwL05aTGZqU0dPQUhFU0JN?= =?utf-8?B?NVdNWkMrLzdZTHFxNWdMNVN1Mmh4MnFtSWZIczZtV1pad0hyd2FMYlJkSGZ1?= =?utf-8?B?ODRDOWI4VjU2dm1jdWxWaHN2eFRvK2tmQWd5UG1MbFdpc2czNG5kRnJNcUVs?= =?utf-8?B?cHJEWVpHREpBakg2ejY1dlYxbUhmQXpMcllYdVpUbHRZc3FtUzhWVzBXUmEv?= =?utf-8?B?L1Q1WllyM1lkWTgyb0R5aXZSQi9hUTlIYk82L3FRRWxaSklFb250blh2YjYr?= =?utf-8?B?OXRGeXF1cCtSOVZCMUVUdE9VT1U1eHlESkJ5L05nQVZzN1Bld1U1ZFlFdGM2?= =?utf-8?B?bVArZHd0WVQzNTh3c2tsZjVLYUxvKzlTWkxnSC9uM3NwdFRVdE9ndTdiSVVR?= =?utf-8?B?MnQzeHlSVFgyS3R4QWFVc04zcFJZdktlaXlkRlpYU0NoKzZJeXlXK09vOTl0?= =?utf-8?B?YkZmbDRTY21mT25LdEQvaUFLalNxZG1jcHlyQTVFcEVyTDBPUSt2VVljbCtR?= =?utf-8?B?R3VQMmhGSkZvVUNENUtlT2EreXZKZUR2NjlEb3VYUnUxZ09VbnovMEphcGpS?= =?utf-8?B?MWJkQ2E2NW1mbTltSVRlSUlZUCtZZ1RhNkNWb3lkcnBhK1JHZzZEUjh3K1pm?= =?utf-8?B?b3NQaFhMZjZMNFBDbmt3cEozMUdsZjNpREVGYXJ4VVh5ZkhZa2NFUjREZEp2?= =?utf-8?B?L2psa3VtcEowNitISTFuZjI2TjNHM2NodWNiZ01vcHV1U284bFVlazIwOEZ3?= =?utf-8?B?RmxVZk40ZFVRT0hHeEdBa2I0YldtSWRhUGtVOWdueEEwdkFkMVRKRmh1Nnpx?= =?utf-8?B?QVJrRVgzMnpyNFlOcyt4c1NsQkRZMm1GUCtZTmJNYml2THlQU3hON2dIVGJ2?= =?utf-8?B?UlFxS1RiL1ZRVy8vajlCbnVsc3VBYzBhRko0eXZJL1BZaEl4ZCtBa21lb0Js?= =?utf-8?B?OUtTalp1Vi83MzBYSEdTSmZtMkNES0NUY2x2VDhsQ3U0UTNDK3UzTDlYMjBs?= =?utf-8?B?SU95RHRkczYra0J2UjVWZGY1WFhDbXZGOFhyc2NVYmtiSmhiNWJKVUNTYkxa?= =?utf-8?B?Vjk3akk0YWh1SkhyNW5aUmYwemRDMW5OMUh2R203a1cxa0ZxRWpFQUMrSFpn?= =?utf-8?B?eWpwdW5HbndjWVA2QS9ZaElsSHEvZ0VoRHpvcHR5aFhJRWRMamtoMEVMZk1r?= =?utf-8?B?RG9wV0U3b2VCU3JQN2NuOXhOdzQ1N2JhWWgxUmwyVjdKclBNaVQzYmRJTDFj?= =?utf-8?B?cDZOSjQ3VllCYVBLTlV6YkdkTXpDbUtVenM0alllNnZ0ZTVXU3g5Z0JoMkgw?= =?utf-8?B?dGNZQkZyeWFodGlHakprb1RkejBPUFdXV29mS1VmTlVJMkQvNzFLSTczK1ZJ?= =?utf-8?B?cVhQQWVsaFRpQlVFMDF3cGlYc2FVdldiSCtOTEJMMlNUMkNhRm1KWVBSdW04?= =?utf-8?B?Nk15ME5GQ3FTRzJZYXN0Y09wL09NV0dRZHJscE1LUEVhWkk2R0laelQwYWpm?= =?utf-8?B?Mk81V0E3WGpJZlpibnRWSHZhbU5zVXlQdDk4RlpOS2plWXpqMHJtV1ZZRVhE?= =?utf-8?B?TExuOTgwbDhkSWJUak0xZ25zU3M1TUFDandMcUVyejh4RUJSZFJXYlhJRk9y?= =?utf-8?B?Mmt3eisxMk4rc3pKRjhXdDJzbWE1TnkzcklYalVwc2dYb243T092cFoxQTRt?= =?utf-8?B?Smp2N1VCbGg4VXRtdGxlTDVqaUIwbFRvcWUreGg5QjBXS1JjS3lLQkJ4ZEd5?= =?utf-8?B?cEtkbmxZQnRDZlB6RDlGS1hQOVFIemNIMG8ybm9GaStuYjVmQ1dCMldsV0Rx?= =?utf-8?B?c01qcG14TkJ0SmVmaFJsTWVPZHpyRDZ2Snd5N2Zod3NlUUhjcWVxVlByTEs3?= =?utf-8?B?eUo0eVNkMUQwR2NXSVNhNXZXRTZQaWtYR29XbmRPN0NpMU5UblE0L09WZGI3?= =?utf-8?Q?6lqLT7R9O2CL07lsYfm117k=3D?= X-OriginatorOrg: ksu.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 38360e8e-c1aa-41be-795e-08d9b02660bf X-MS-Exchange-CrossTenant-AuthSource: DM6PR05MB6953.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2021 15:15:13.0591 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d9a2fa71-d67d-4cb6-b541-06ccaa8013fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a0Pf1wgIGXhQFe8drSfR3plH0J88A5ujjz6iB1oYoqqVhRoFHTFpitaQ23Uw33EKawzU76uN6X7FXHPwc/3Bbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR0501MB3832 X-Rspamd-Queue-Id: 4J0LzF5y54z3w5m X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 25, 2021 at 8:30 AM Andriy Gapon wrote: > > On 25/11/2021 16:23, Baptiste Daroussin wrote: > > On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: > >> Looking at the output I got another thought: do we need architecture sub-dir > >> links at all now that we install manpages to a main directory? > >> Is there any benefit to having the same manpage in a directory (like man4) > >> and its immediate subdirectory (like man4/arm) ? > >> > > Hardlink not in the same directory is imho a fragile setup anyway, what if a > > user has different mount points here, the hardlink would be broken. while there > > is little chances someone is doing that, history told me people are doing weird > > things and if they haven't yet, they will soon. > > > > I continue to think this kind of links should be 1/ symlinks, 2/ relative > > symlinks if they are in a situation which can become a cross device issue. > > Yeah... but are they needed at all? :-) > It's handy in the sense that it'd be nice to install all arch manpages on some machines, e.g., I develop arm stuff on amd64 and there are some drivers that simply aren't applicable to amd64, I'd like to be able to find those. I think the implementation is a bit odd, though, leading into: > I mean, whichever way we install manpages they are always installed into manX. > I do not see a point / benefit of having another copy / link / whatever in > manX/arch. > I guess I haven't read the context much here, but I don't see why either. /usr/bin/man's built-in search behavior checks $mandir/$machine and $mandir/$machine_arch before $mandir, it seems like we should be leaving them there and letting man do its thing. If you need a non-native arch then you can hopefully just poke around the arch subdirs (presumably mostly section 4 pages) to figure it out. There's a reason they're arch subdirs, and trying to install links or arch-specific pages into the main $mandir is asking for trouble when we actually have conflicting pages for whatever reason between archs. Thanks, Kyle Evans From nobody Thu Nov 25 15:16:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 405C718A2DDD; Thu, 25 Nov 2021 15:16:33 +0000 (UTC) (envelope-from kevans@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 4J0M0d02wMz3wVT; Thu, 25 Nov 2021 15:16:33 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id D05A4B794; Thu, 25 Nov 2021 15:16:32 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f178.google.com with SMTP id 8so6408538qtx.5; Thu, 25 Nov 2021 07:16:32 -0800 (PST) X-Gm-Message-State: AOAM530SrQLNmG9tuLxyRImnHOOhlVWe2V1JXbsfAxKEWp6/ESpEgcuP E9o/5nYyKifNhApbl6RFcqnPQyrwgKs8jetWby0= X-Google-Smtp-Source: ABdhPJx6knF1NU0d2d7DeCsy4xSnCTSbEEhfPkTywOPeS5zcRqzy7hWgBgipA+ZY3Hk+yrLV7EvAPDA6b5xM4Nkjm9A= X-Received: by 2002:a05:622a:291:: with SMTP id z17mr18431706qtw.138.1637853392312; Thu, 25 Nov 2021 07:16:32 -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: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> <20211125143145.5jajvx52p5ma347c@aniel.nours.eu> <4a53cb13-1a9c-22c3-c3ee-27790927f4e3@FreeBSD.org> In-Reply-To: From: Kyle Evans Date: Thu, 25 Nov 2021 09:16:20 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures To: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Cc: Andriy Gapon , Baptiste Daroussin , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637853393; 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=mozvqk7UxAX/Oun8YjvlIlyNg1VBx+Y4YHQcqhFhbj4=; b=lpK3nN53bYAKXIwcn74QZHVHLJNIhZvF8tI7MWmVRXLHWs8Y43PsPe4BO5guyXyiVjjXz6 mEsT1apQGac4z43RAyOJCzV1xBeYC7TsUAfu97+MnzTlrY3kYOp4MSTaf2tg7FmbAtay1n tB+rUVPXv1EtrNvBjiGs32gwyNBN3o1LuHwX4GJ91wpbjbX2fptJsbe9RdRKlFRzXPjp9u FWTOezwRRclpEQubqiU9l9MYAjtTla/UQ6oTlVNcpDOD52Ts8gFnvT4Nkm39aEgv2Wojqk aT1YZKMsaEjzhOpNvED5yZloi0PlZV2nJBn424XuDfIQ1AxZp7iPSBTknhc0pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637853393; a=rsa-sha256; cv=none; b=DSAD4AT2KI6qlYAbotJxCV5M6ZDRnfAYiXoyjGwgU7xqVM4LGv8trNKDmJOAbUkZR+lToR h6mDug3y1llsTJO9Qo1IoBRvrAeG9y1D2vironOxLlay/XSkU2o5fF3vRDLVblqtAWuacb H/MpeMk+43WlUMRgd7NCDMbZxE17CAiHV1UhOM3WhMcZc3B3iWBnKZ+Bh2YYDwvlDoFGgi C66HSNhNjEtZ9gNkqPfaEW/wd0kKdmcKSSOJ52+90/S1FxxWNxd9NPT4cb5zwltajDjHaB zLGZth9tJkY4gn4ATx7u/VakKYkReFx1NWnMiPhwqVGDfu69Wy38DwHNE1eqoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N (Resend from correct address, sorry) On Thu, Nov 25, 2021 at 8:30 AM Andriy Gapon wrote: > > On 25/11/2021 16:23, Baptiste Daroussin wrote: > > On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: > >> Looking at the output I got another thought: do we need architecture sub-dir > >> links at all now that we install manpages to a main directory? > >> Is there any benefit to having the same manpage in a directory (like man4) > >> and its immediate subdirectory (like man4/arm) ? > >> > > Hardlink not in the same directory is imho a fragile setup anyway, what if a > > user has different mount points here, the hardlink would be broken. while there > > is little chances someone is doing that, history told me people are doing weird > > things and if they haven't yet, they will soon. > > > > I continue to think this kind of links should be 1/ symlinks, 2/ relative > > symlinks if they are in a situation which can become a cross device issue. > > Yeah... but are they needed at all? :-) > It's handy in the sense that it'd be nice to install all arch manpages on some machines, e.g., I develop arm stuff on amd64 and there are some drivers that simply aren't applicable to amd64, I'd like to be able to find those. I think the implementation is a bit odd, though, leading into: > I mean, whichever way we install manpages they are always installed into manX. > I do not see a point / benefit of having another copy / link / whatever in > manX/arch. > I guess I haven't read the context much here, but I don't see why either. /usr/bin/man's built-in search behavior checks $mandir/$machine and $mandir/$machine_arch before $mandir, it seems like we should be leaving them there and letting man do its thing. If you need a non-native arch then you can hopefully just poke around the arch subdirs (presumably mostly section 4 pages) to figure it out. There's a reason they're arch subdirs, and trying to install links or arch-specific pages into the main $mandir is asking for trouble when we actually have conflicting pages for whatever reason between archs. Thanks, Kyle Evans From nobody Thu Nov 25 15:27:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 810C218A8030; Thu, 25 Nov 2021 15:28:12 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.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 4J0MG42fh1z4T8S; Thu, 25 Nov 2021 15:28:12 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by mail-qk1-f182.google.com with SMTP id g28so12033284qkk.9; Thu, 25 Nov 2021 07:28:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mO9bvwHR1Ult8OBXyXi++fcLrTKQhJl8euwBbSWUgHw=; b=GAhJhsisuRS3Y+d+Wur+AxGLwe/vpprMwqiw24khDb+ULBd+qVYlb0VsXbre5Y/UBX 6B7vH+L/WdsuM06ltm1A4CAmB644oW2JiH9XefSr8Cbt9fxE2S9Er/gkDQM29Ud5oAL+ hbOiKURkhCnfBjPllDgu0L3F3mDoS09HBsx+pTCA0Ts/7vAcO/Etw5MfLIs+gNTdJZz8 UgCa+K85pfSc9Fwq/FG/axGeIdQQPxp9SCYDiMsdd7R+Ed4uBqJ8xzQnNPkLEwmqp0kl sZzryI2k2fAVWc4KfAexiE2bgIma0KJ6PIl5ZUEiUCoj4FMIp5iz1ouc6Hi43JcJZl6Y QIxg== X-Gm-Message-State: AOAM5321w0QkEzVioSVn0BQd+31iz5V8dJD3Sl8czlxFbUE0gtviDo7U ZoZi2WI9LmFuaKuS2uWkB/h3BlnbwLS+vg== X-Google-Smtp-Source: ABdhPJw8ayzrX/E265uGhoGHV3RKbJptsAr6O5rJtDPEdb5TOgIwUKoBRFZVauOaMi94nUlCTTEq+Q== X-Received: by 2002:a05:620a:15c8:: with SMTP id o8mr16629358qkm.385.1637854086208; Thu, 25 Nov 2021 07:28:06 -0800 (PST) Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com. [209.85.219.180]) by smtp.gmail.com with ESMTPSA id o126sm1583005qke.11.2021.11.25.07.28.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Nov 2021 07:28:06 -0800 (PST) Received: by mail-yb1-f180.google.com with SMTP id g17so12637038ybe.13; Thu, 25 Nov 2021 07:28:05 -0800 (PST) X-Received: by 2002:a25:38cf:: with SMTP id f198mr6864774yba.438.1637854085657; Thu, 25 Nov 2021 07:28: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: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> In-Reply-To: From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Date: Thu, 25 Nov 2021 16:27:01 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures To: Kyle Evans Cc: Andriy Gapon , Baptiste Daroussin , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4J0MG42fh1z4T8S X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 25, 2021 at 4:15 PM Kyle Evans wrote: > > On Thu, Nov 25, 2021 at 8:30 AM Andriy Gapon wrote: > > > > On 25/11/2021 16:23, Baptiste Daroussin wrote: > > > On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: > > >> Looking at the output I got another thought: do we need architecture sub-dir > > >> links at all now that we install manpages to a main directory? > > >> Is there any benefit to having the same manpage in a directory (like man4) > > >> and its immediate subdirectory (like man4/arm) ? > > >> > > > Hardlink not in the same directory is imho a fragile setup anyway, what if a > > > user has different mount points here, the hardlink would be broken. while there > > > is little chances someone is doing that, history told me people are doing weird > > > things and if they haven't yet, they will soon. > > > > > > I continue to think this kind of links should be 1/ symlinks, 2/ relative > > > symlinks if they are in a situation which can become a cross device issue. > > > > Yeah... but are they needed at all? :-) > > > > It's handy in the sense that it'd be nice to install all arch manpages Not also handy. From the original commit: ---------- Building and installing architecture-specific man pages only raises a number of problems: * The https://www.freebsd.org/cgi/man.cgi is incomplete. As an example, it does not show results for pae(4). The reason for this is that the cgi interface runs on FreeBSD amd64. * In FreeBSD amd64 some manual pages have broken X-refs. See hptrr(4) for an example. * Also, we have broken links in our Release Notes. This is a consequence of the first point. See https://www.freebsd.org/releases/13.0R/hardware/#proc-i386. ---------- Would anyone try this patch https://people.freebsd.org/~fernape/fix-dnoroot.patch? It seems to work(around) the problem, at least with: makefs -D -B little -o label=FreeBSD_root -o version=2 ufs.part METALOG and tar -c -f archive.tbz @METALOG Cheers. > on some machines, e.g., I develop arm stuff on amd64 and there are > some drivers that simply aren't applicable to amd64, I'd like to be > able to find those. I think the implementation is a bit odd, though, > leading into: > > > I mean, whichever way we install manpages they are always installed into manX. > > I do not see a point / benefit of having another copy / link / whatever in > > manX/arch. > > > > I guess I haven't read the context much here, but I don't see why > either. /usr/bin/man's built-in search behavior checks > $mandir/$machine and $mandir/$machine_arch before $mandir, it seems > like we should be leaving them there and letting man do its thing. If > you need a non-native arch then you can hopefully just poke around the > arch subdirs (presumably mostly section 4 pages) to figure it out. > There's a reason they're arch subdirs, and trying to install links or > arch-specific pages into the main $mandir is asking for trouble when > we actually have conflicting pages for whatever reason between archs. > > Thanks, > > Kyle Evans From nobody Thu Nov 25 15:31:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 91D4918A9EF0; Thu, 25 Nov 2021 15:31:17 +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 4J0MKb5x5fz4VWL; Thu, 25 Nov 2021 15:31:15 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.17.1/8.17.1/hmo17dec20) with ESMTPS id 1APFVB3K039511 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 25 Nov 2021 16:31:11 +0100 (CET) (envelope-from freebsd@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.17.1/8.17.1/Submit) id 1APFVBK9039510; Thu, 25 Nov 2021 16:31:11 +0100 (CET) (envelope-from freebsd@oldach.net) Message-Id: <202111251531.1APFVBK9039510@nuc.oldach.net> Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features In-Reply-To: <1a76eb2e-b9f0-946e-c80b-e6bc9e258d59@freebsd.org> from Allan Jude at "25 Nov 2021 10:09:25" To: allanjude@freebsd.org (Allan Jude) Date: Thu, 25 Nov 2021 16:31:10 +0100 (CET) Cc: manu@bidouilliste.com, 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]); Thu, 25 Nov 2021 16:31:11 +0100 (CET) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:freebsd@oldach.net RCPT: X-Rspamd-Queue-Id: 4J0MKb5x5fz4VWL X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=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 X-Spamd-Result: default: False [-3.30 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[oldach.net]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.997]; FROM_NO_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N Allan Jude wrote on Thu, 25 Nov 2021 16:09:25 +0100 (CET): > On 11/25/2021 2:38 AM, Helge Oldach wrote: > > hmo@p48 ~ $ for f in 0 1 2 3 8 16 32 64 128 ; do echo -n $f:; env OPENSSL_armcap=$f openssl speed -evp aes-256-gcm 2>&1 | tail -1 | cut -wf7; done > > 0:42295.15k > > 1:23891.19k > > 2:42208.57k > > 3:23970.56k > > 8:42354.98k > > 16:42199.06k > > 32:size > > Illegal instruction (core dumped) > > 64:42322.42k > > 128:42275.00k > > hmo@p48 ~ $ > > > > So I guess HWCAP_FP is the culprit? Maybe related to hard/soft floating > > point math which indeed is kind of special on the Pi? > > So yeah, the issue seems to be that floating point on the RPi4 is slower > than not, but now openssl (properly) detects that the CPU advertises > support for it. > > As seen elsewhere in the thread, most other ARM platforms get a very > significant speed boost. So can we disable FP within OpenSSL for the RPi by default? This commit basically introduced a regression for this platform and I think that should be fixed. Or it the root cause a suboptimal FP implementation that is not adequate for the RPi? Kind regards Helge From nobody Thu Nov 25 15:34:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6D71118AA73B; Thu, 25 Nov 2021 15:34:08 +0000 (UTC) (envelope-from avg@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 4J0MNw1gz6z4W1N; Thu, 25 Nov 2021 15:34:08 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 36F98BCEA; Thu, 25 Nov 2021 15:34:07 +0000 (UTC) (envelope-from avg@freebsd.org) Message-ID: Date: Thu, 25 Nov 2021 17:34:02 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.3.0 From: Andriy Gapon Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures Content-Language: en-US To: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Cc: Baptiste Daroussin , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> <20211125143145.5jajvx52p5ma347c@aniel.nours.eu> <4a53cb13-1a9c-22c3-c3ee-27790927f4e3@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637854448; 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=kxg8o0XN4vK6jyMUn8RGY5W0a1CcjKx2eXSicbHCYR8=; b=gIW2gBe6mM4jaATuG5i637yb5U0hf4GDD7BQAezxf1yMc2PTlDJf+CyyWv7NBW7iKfU9Zp /royAtEnPxJvvNU3e7kbolcgee7u3sbC2T8juRy371d45ZghTD/zlbif1IWafwAcuBQV27 NSndAeLmyHKG5SB/rvEkU38BX8b4XJlpcgaf8tAx7j68oSUerduwD8nZtp12moARqn4nh8 RXZ1yoiNxU74nxPOsJr0GLp2m9SOysRLrnNiMmXHKQ4W59/H8pQvHvNs2HhqwD01+HkGBk cBrtmXhZJ0QAxBw/w0EG1UDd4nOLXiLuZRNTP4sPyHmX64zPK4F5yuZADMBLeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637854448; a=rsa-sha256; cv=none; b=S+IvyKZHw1lRUHtXUKnTzLfBobxE6Dv29H3lYUZDElOM+Oxil4UYD7dz2SiHsZwwlAYClF krBRy4gA8yH723bJiivhIagjd5dRTGTJbYEsw40CwSh6rQckoWNzAPu44IwGj+RDmEB/3X 1ZjNKtlDQeXFEUE0ltDbsj2S7OPfSLM/1tcG3kW+WvOeq8NaEbJ8NhA+j81ucMPb5MTqlO C+xTN/h2+MqC5wKyRr2sLl+gLhWiiyHuKfaVBQTbnmBR8xIawGa35WvbgruG7p6gxcHWO2 DhpDbY/K5CFKgs0oBv2cCx2Xg7kOHb8eSy+DZoLmuoP2w7kBik2jYLgTJ5b4Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 25/11/2021 16:52, Fernando Apesteguía wrote: > On Thu, Nov 25, 2021 at 3:37 PM Andriy Gapon wrote: >> >> On 25/11/2021 16:31, Baptiste Daroussin wrote: >>> On Thu, Nov 25, 2021 at 04:30:35PM +0200, Andriy Gapon wrote: >>>> On 25/11/2021 16:23, Baptiste Daroussin wrote: >>>>> On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: >>>>>> Looking at the output I got another thought: do we need architecture sub-dir >>>>>> links at all now that we install manpages to a main directory? >>>>>> Is there any benefit to having the same manpage in a directory (like man4) >>>>>> and its immediate subdirectory (like man4/arm) ? >>>>>> >>>>> Hardlink not in the same directory is imho a fragile setup anyway, what if a >>>>> user has different mount points here, the hardlink would be broken. while there >>>>> is little chances someone is doing that, history told me people are doing weird >>>>> things and if they haven't yet, they will soon. >>>>> >>>>> I continue to think this kind of links should be 1/ symlinks, 2/ relative >>>>> symlinks if they are in a situation which can become a cross device issue. >>>> >>>> Yeah... but are they needed at all? :-) >>>> >>>> I mean, whichever way we install manpages they are always installed into >>>> manX. I do not see a point / benefit of having another copy / link / >>>> whatever in manX/arch. >>>> >>>> P.S. >>>> Adding support for "MSYMLINKS" is not that hard. >>>> But I'd rather remove some stuff than add some new stuff. >>>> >>> >>> There I fully agree I don't see the point of the initial change in the first place :D >> >> Well, I do see the point of the change and I like it. >> But I don't understand why / how MANSUBDIR was / is useful. >> >> Perhaps people thought that hypothetically it would be a good idea if man foobar >> on amd64 and sparc64 had different content... >> But looks like it never happened and the idea (or strawman) is debatable too. > > How about removing the MLINKS in every man4.${arch}/Makefile and doing > something like this in the parent man4/Makefile? > > diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile > index dfef254bff5..46097319b06 100644 > --- a/share/man/man4/Makefile > +++ b/share/man/man4/Makefile > @@ -906,6 +906,9 @@ __arches= ${MAN_ARCH} > .for __arch in ${__arches:O:u} > .if exists(${.CURDIR}/man4.${__arch}) > SUBDIR+= man4.${__arch} > +.for __manpage in ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.${__arch}*.4"!:E} > +MLINKS+= man4.${__arch}/${__manpage} ${__manpage} > +.endfor > .endif > .endfor I think that this should work. > About keeping the arch-specific directories I don't have a strong > opinion about it. It could be argued that it is a simple way to know > which man pages are related to a certain architecture. I am not sure if this is such an important thing. There is a number of other ways to figure that out. But it really should be documented in manpages themselves. > In the case of > the i386 most of the man pages have this information in the .Dt line: > > [fernape@vm-current /usr/src/share/man/man4/man4.i386]$ grep Dt *.4 > CPU_ELAN.4:.Dt CPU_ELAN 4 i386 > apm.4:.Dt APM 4 i386 > ce.4:.Dt CE 4 i386 > cp.4:.Dt CP 4 i386 > glxiic.4:.Dt GLXIIC 4 i386 > glxsb.4:.Dt GLXSB 4 i386 > longrun.4:.Dt LONGRUN 4 i386 > npx.4:.Dt NPX 4 i386 > pae.4:.Dt PAE 4 i386 > pbio.4:.Dt PBIO 4 i386 > perfmon.4:.Dt PERFMON 4 i386 > pnp.4:.Dt PNP 4 i386 > pnpbios.4:.Dt PNPBIOS 4 i386 > sbni.4:.Dt SBNI 4 i386 > smapi.4:.Dt SMAPI 4 i386 > vpd.4:.Dt VPD 4 i386 > > But it is not the case for other man pages: > > [fernape@vm-current /usr/src/share/man/man4/man4.powerpc]$ grep Dt *.4 > abtn.4:.Dt ABTN 4 > adb.4:.Dt ADB 4 > akbd.4:.Dt AKBD 4 > ams.4:.Dt AMS 4 > cuda.4:.Dt CUDA 4 > dtsec.4:.Dt DTSEC 4 > llan.4:.Dt LLAN 4 > ofw_console.4:.Dt OFW_CONSOLE 4 powerpc > pmu.4:.Dt PMU 4 > powermac_nvram.4:.Dt POWERMAC_NVRAM 4 powerpc > smu.4:.Dt SMU 4 > snd_ai2s.4:.Dt SND_AI2S 4 > snd_davbus.4:.Dt SND_DAVBUS 4 > tsec.4:.Dt TSEC 4 -- Andriy Gapon From nobody Thu Nov 25 15:56:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0D2B918A0716; Thu, 25 Nov 2021 15:57:07 +0000 (UTC) (envelope-from kevans@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 4J0MvQ48PHz4dxP; Thu, 25 Nov 2021 15:57:06 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 68779B7C1; Thu, 25 Nov 2021 15:57:06 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f181.google.com with SMTP id q14so6479887qtx.10; Thu, 25 Nov 2021 07:57:06 -0800 (PST) X-Gm-Message-State: AOAM532MYmkI4c6AEB/cvMZNFSAmcy0J1lbMSeMq8mYXX8tgLF5Q9Rpu x7R+zlxUUnoe/2Lxdt38seNd1TRzsWC07fpsdco= X-Google-Smtp-Source: ABdhPJybEty2dwUVhQBOSlSPnwI2i1mPTUngfN65o2wLHh4mvgmM4TPG2hbfqR4mYiiBop3iBsc6lh6/ORuRoIu1zlg= X-Received: by 2002:a05:622a:2d6:: with SMTP id a22mr18162151qtx.29.1637855825812; Thu, 25 Nov 2021 07:57: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: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> In-Reply-To: From: Kyle Evans Date: Thu, 25 Nov 2021 09:56:54 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures To: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Cc: Andriy Gapon , Baptiste Daroussin , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637855826; 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=wchdglK720o6GAzLJEOeJvTFXx4K6IsMRJhq1GQaAXE=; b=Dw0U+ejmIMS5YbkvK5Pw43BpFeFVnXYpjKYFTfas9Ew6lGJGcqIJprNPvBGNHEiNgr5Mxt LggO1bzDRfyCUrNEc7FF0DLNXg3UPm+5OYTkhKl3d8nmEt/f12F9mdZQSQf7uPvsvs1zw9 bMIzOUsuvnh9EQnEcl4qb5CzlfLni8dK79/dmhuzLB9x9BsCtTP1l0G5XN5cc7EZq4DXyz Ch6Uoh0r/Ke/arNDX2zChXygZrumoCjj+r8O6nI/lYeA/KKq4oCe0n8FMKFD2qwNQpeJcX DcaO4uC0E0JmmRWITRQrbzv1aiirP60Mj6QsH/1sS9DRYZCTNHo5hjQHtzdt7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637855826; a=rsa-sha256; cv=none; b=TUPPvGmAH6Igs44qLbP2OUVFdGij/4m/t5mNOoBEF/WgITSZo3u+/1/pxrUa+P2Tm4mTiD KsDcqEDMS3+VDibR9e2Rw1L3RlUbuOWvUrRirS8PqQgdRj0EmHC072IhGTWCjGOHqWXqVU clh//E2700f5XkleTG+TNIeRujhvpm08ruApqbHcUZhxVvOIN70rESO6Xl+KzuM5u/42np KDoQobQbd/0ruhCGs6K9G4MDOikmHEfD3lOpFC8aIBqbmC0FeYrPaPHZhOi1kEe2Xm5fGE OHZSey45nc64yrvrbOtCU8QvBBWUoZokPigmxCwVE6SNho7AxB5ccBP0QhG5Lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 25, 2021 at 9:28 AM Fernando Apestegu=C3=ADa wrote: > > On Thu, Nov 25, 2021 at 4:15 PM Kyle Evans wrote: > > > > On Thu, Nov 25, 2021 at 8:30 AM Andriy Gapon wrote: > > > > > > On 25/11/2021 16:23, Baptiste Daroussin wrote: > > > > On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: > > > >> Looking at the output I got another thought: do we need architectu= re sub-dir > > > >> links at all now that we install manpages to a main directory? > > > >> Is there any benefit to having the same manpage in a directory (li= ke man4) > > > >> and its immediate subdirectory (like man4/arm) ? > > > >> > > > > Hardlink not in the same directory is imho a fragile setup anyway, = what if a > > > > user has different mount points here, the hardlink would be broken.= while there > > > > is little chances someone is doing that, history told me people are= doing weird > > > > things and if they haven't yet, they will soon. > > > > > > > > I continue to think this kind of links should be 1/ symlinks, 2/ re= lative > > > > symlinks if they are in a situation which can become a cross device= issue. > > > > > > Yeah... but are they needed at all? :-) > > > > > > > It's handy in the sense that it'd be nice to install all arch manpages > > Not also handy. From the original commit: > ---------- > Building and installing architecture-specific man pages only > raises a number of > problems: > > * The https://www.freebsd.org/cgi/man.cgi is incomplete. As an > example, it does not show results for pae(4). The reason for this= is > that the cgi interface runs on FreeBSD amd64. > > * In FreeBSD amd64 some manual pages have broken X-refs. See hptrr(= 4) > for an example. > > * Also, we have broken links in our Release Notes. This is a > consequence of the first point. See > https://www.freebsd.org/releases/13.0R/hardware/#proc-i386. #1 and #3 are a broken man.cgi, and we should fix it or replace it. #2 is arguably not a real problem, the xref makes it clear it's an i386 concept and we reference, e.g., ports manpages that are inherently broken with some frequency anyways; see: `find *bin | xargs mandoc -Tlint | grep Xr`, a subset of those are ports, although I haven't counted. > > Would anyone try this patch > https://people.freebsd.org/~fernape/fix-dnoroot.patch? > > It seems to work(around) the problem, at least with: > > makefs -D -B little -o label=3DFreeBSD_root -o version=3D2 ufs.part METAL= OG > and > tar -c -f archive.tbz @METALOG > > Cheers. > > on some machines, e.g., I develop arm stuff on amd64 and there are > > some drivers that simply aren't applicable to amd64, I'd like to be > > able to find those. I think the implementation is a bit odd, though, > > leading into: > > > > > I mean, whichever way we install manpages they are always installed i= nto manX. > > > I do not see a point / benefit of having another copy / link / whatev= er in > > > manX/arch. > > > > > > > I guess I haven't read the context much here, but I don't see why > > either. /usr/bin/man's built-in search behavior checks > > $mandir/$machine and $mandir/$machine_arch before $mandir, it seems > > like we should be leaving them there and letting man do its thing. If > > you need a non-native arch then you can hopefully just poke around the > > arch subdirs (presumably mostly section 4 pages) to figure it out. > > There's a reason they're arch subdirs, and trying to install links or > > arch-specific pages into the main $mandir is asking for trouble when > > we actually have conflicting pages for whatever reason between archs. > > > > Thanks, > > > > Kyle Evans From nobody Thu Nov 25 16:21:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8A5F118AB283; Thu, 25 Nov 2021 16:21:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0NS31gBrz4lKs; Thu, 25 Nov 2021 16:21:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1930920932; Thu, 25 Nov 2021 16:21: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 1APGLtPE039829; Thu, 25 Nov 2021 16:21:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APGLrGR039827; Thu, 25 Nov 2021 16:21:53 GMT (envelope-from git) Date: Thu, 25 Nov 2021 16:21:53 GMT Message-Id: <202111251621.1APGLrGR039827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 52d973f52c07 - main - libpmc: Update some x86 event definitions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52d973f52c07b94909a6487be373c269988dc151 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637857315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/46rKXpkfrHW8VuEGM0PbZaM3W/sN2CXZKMidWBuZB0=; b=o5vNT/AMvBoY2bm/mc6Yptukt8eV67ePIlJWkkv/81cEXJuxdVoc9s4ubU3SuxV9QlcTqU oV3t74QYsb6cKxYEK4QeyP50ONtBQ1fGbvhCeOQtnl/5kKbAbC4i+C3mW4EEvy78pRukQK IMIACUwPVLk9tl1qifk9kqYeXnN116GlYlR+Q62lgpF+K9MKEHWPAAL5JCNhWwaECSgFux W1VzIG5THPpXU7toYJ5zRNaveNyi5urG1vlH/np5o+6f9BDZvSzdZG+c2NqD1Qc+e6J0AB D16rEp6rGP2631yO3rtaRiwaUkidXtP1nhxnFzy4AtCReI4ByysN034X2hY8oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637857315; a=rsa-sha256; cv=none; b=ZFB8btUiDxTQeLMEKcThVS8W44p4/LIQ8KRQ3ZW2xcY/3t0cdXA7nkXBh6dVhJU8hzdgWO tiYgb4SwcLK3HwnHi/SCDz6c3d6OL8VftiP6HKrrmlodm881zjFesiioAf0FIqtsgOxBHp IC+IJNJSWP6RNVzgdPPbLI0TH4xFA6YaipjYJvZi4hSbbJbpOKGsxBCs8/GeqMjmYZ7ovy PLKq8wgWe4RmB2YFWz760IWsLsxjGhGToXfxTqnygzbCjN3HjpcuB6/XEaySI5eFvxhmx9 7EmXygoCDE6AIbXtqcW2jUsgbTKTOVHFDKyXos//ZAS5W2TZJ7OlbbkKbL3tHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=52d973f52c07b94909a6487be373c269988dc151 commit 52d973f52c07b94909a6487be373c269988dc151 Author: Alexander Motin AuthorDate: 2021-11-25 16:19:26 +0000 Commit: Alexander Motin CommitDate: 2021-11-25 16:19:26 +0000 libpmc: Update some x86 event definitions. MFC after: 1 month --- lib/libpmc/pmu-events/arch/x86/amdzen1/branch.json | 5 + lib/libpmc/pmu-events/arch/x86/amdzen1/cache.json | 83 +- lib/libpmc/pmu-events/arch/x86/amdzen1/core.json | 14 +- .../pmu-events/arch/x86/amdzen1/data-fabric.json | 2766 +--------- .../arch/x86/amdzen1/floating-point.json | 42 +- .../pmu-events/arch/x86/amdzen1/l3cache.json | 5411 ------------------- lib/libpmc/pmu-events/arch/x86/amdzen1/memory.json | 42 +- lib/libpmc/pmu-events/arch/x86/amdzen1/other.json | 12 +- .../pmu-events/arch/x86/amdzen1/recommended.json | 178 + lib/libpmc/pmu-events/arch/x86/amdzen2/branch.json | 8 +- lib/libpmc/pmu-events/arch/x86/amdzen2/cache.json | 79 +- lib/libpmc/pmu-events/arch/x86/amdzen2/core.json | 14 +- .../pmu-events/arch/x86/amdzen2/data-fabric.json | 98 + .../arch/x86/amdzen2/floating-point.json | 42 +- lib/libpmc/pmu-events/arch/x86/amdzen2/memory.json | 86 +- lib/libpmc/pmu-events/arch/x86/amdzen2/other.json | 20 +- .../pmu-events/arch/x86/amdzen2/recommended.json | 178 + .../pmu-events/arch/x86/broadwell/bdw-metrics.json | 2 +- .../arch/x86/broadwellde/bdwde-metrics.json | 2 +- .../arch/x86/broadwellx/bdx-metrics.json | 2 +- .../pmu-events/arch/x86/cascadelakex/cache.json | 5468 ++++++++++---------- .../arch/x86/cascadelakex/clx-metrics.json | 322 +- .../arch/x86/cascadelakex/floating-point.json | 48 +- .../pmu-events/arch/x86/cascadelakex/frontend.json | 566 +- .../pmu-events/arch/x86/cascadelakex/memory.json | 5452 +++++++++---------- .../pmu-events/arch/x86/cascadelakex/other.json | 4160 +++++++-------- .../pmu-events/arch/x86/cascadelakex/pipeline.json | 1062 ++-- .../arch/x86/cascadelakex/uncore-memory.json | 9 - .../arch/x86/cascadelakex/uncore-other.json | 180 +- .../arch/x86/cascadelakex/virtual-memory.json | 256 +- .../pmu-events/arch/x86/elkhartlake/cache.json | 226 + .../arch/x86/elkhartlake/ehl-metrics.json | 57 + .../arch/x86/elkhartlake/floating-point.json | 24 + .../pmu-events/arch/x86/elkhartlake/frontend.json | 93 + .../pmu-events/arch/x86/elkhartlake/memory.json | 86 + .../pmu-events/arch/x86/elkhartlake/other.json | 424 ++ .../pmu-events/arch/x86/elkhartlake/pipeline.json | 278 + .../arch/x86/elkhartlake/virtual-memory.json | 273 + .../pmu-events/arch/x86/haswell/hsw-metrics.json | 2 +- .../pmu-events/arch/x86/haswellx/hsx-metrics.json | 2 +- lib/libpmc/pmu-events/arch/x86/icelake/cache.json | 724 +-- .../arch/x86/icelake/floating-point.json | 101 +- .../pmu-events/arch/x86/icelake/frontend.json | 610 ++- .../pmu-events/arch/x86/icelake/icl-metrics.json | 273 + lib/libpmc/pmu-events/arch/x86/icelake/memory.json | 654 ++- lib/libpmc/pmu-events/arch/x86/icelake/other.json | 1089 +++- .../pmu-events/arch/x86/icelake/pipeline.json | 1169 +++-- .../arch/x86/icelake/virtual-memory.json | 251 +- lib/libpmc/pmu-events/arch/x86/icelakex/cache.json | 706 +++ .../arch/x86/icelakex/floating-point.json | 95 + .../pmu-events/arch/x86/icelakex/frontend.json | 469 ++ .../pmu-events/arch/x86/icelakex/icx-metrics.json | 315 ++ .../pmu-events/arch/x86/icelakex/memory.json | 291 ++ lib/libpmc/pmu-events/arch/x86/icelakex/other.json | 181 + .../pmu-events/arch/x86/icelakex/pipeline.json | 972 ++++ .../arch/x86/icelakex/uncore-memory.json | 333 ++ .../pmu-events/arch/x86/icelakex/uncore-other.json | 2476 +++++++++ .../pmu-events/arch/x86/icelakex/uncore-power.json | 10 + .../arch/x86/icelakex/virtual-memory.json | 245 + .../pmu-events/arch/x86/ivybridge/ivb-metrics.json | 2 +- .../pmu-events/arch/x86/ivytown/ivt-metrics.json | 2 +- .../pmu-events/arch/x86/jaketown/jkt-metrics.json | 2 +- lib/libpmc/pmu-events/arch/x86/mapfile.csv | 6 + .../arch/x86/sandybridge/snb-metrics.json | 2 +- lib/libpmc/pmu-events/arch/x86/skylake/cache.json | 4100 ++++++++------- .../arch/x86/skylake/floating-point.json | 76 +- .../pmu-events/arch/x86/skylake/frontend.json | 644 +-- lib/libpmc/pmu-events/arch/x86/skylake/memory.json | 2279 ++++---- lib/libpmc/pmu-events/arch/x86/skylake/other.json | 60 +- .../pmu-events/arch/x86/skylake/pipeline.json | 1266 ++--- .../pmu-events/arch/x86/skylake/skl-metrics.json | 273 +- .../arch/x86/skylake/virtual-memory.json | 374 +- lib/libpmc/pmu-events/arch/x86/skylakex/cache.json | 2282 ++++---- .../arch/x86/skylakex/floating-point.json | 88 +- .../pmu-events/arch/x86/skylakex/frontend.json | 732 +-- .../pmu-events/arch/x86/skylakex/memory.json | 1977 +++---- lib/libpmc/pmu-events/arch/x86/skylakex/other.json | 154 +- .../pmu-events/arch/x86/skylakex/pipeline.json | 1290 ++--- .../pmu-events/arch/x86/skylakex/skx-metrics.json | 304 +- .../arch/x86/skylakex/uncore-memory.json | 35 +- .../pmu-events/arch/x86/skylakex/uncore-other.json | 1007 +++- .../arch/x86/skylakex/virtual-memory.json | 314 +- .../pmu-events/arch/x86/tigerlake/cache.json | 595 +++ .../arch/x86/tigerlake/floating-point.json | 94 + .../pmu-events/arch/x86/tigerlake/frontend.json | 463 ++ .../pmu-events/arch/x86/tigerlake/memory.json | 295 ++ .../pmu-events/arch/x86/tigerlake/other.json | 189 + .../pmu-events/arch/x86/tigerlake/pipeline.json | 982 ++++ .../pmu-events/arch/x86/tigerlake/tgl-metrics.json | 231 + .../arch/x86/tigerlake/virtual-memory.json | 225 + 90 files changed, 32542 insertions(+), 26837 deletions(-) diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen1/branch.json b/lib/libpmc/pmu-events/arch/x86/amdzen1/branch.json index a9943eeb8d6b..4ceb67a0db21 100644 --- a/lib/libpmc/pmu-events/arch/x86/amdzen1/branch.json +++ b/lib/libpmc/pmu-events/arch/x86/amdzen1/branch.json @@ -19,5 +19,10 @@ "EventName": "bp_de_redirect", "EventCode": "0x91", "BriefDescription": "Decoder Overrides Existing Branch Prediction (speculative)." + }, + { + "EventName": "bp_l1_tlb_fetch_hit", + "EventCode": "0x94", + "BriefDescription": "The number of instruction fetches that hit in the L1 ITLB." } ] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen1/cache.json b/lib/libpmc/pmu-events/arch/x86/amdzen1/cache.json index 404d4c569c01..0d46cb82bd52 100644 --- a/lib/libpmc/pmu-events/arch/x86/amdzen1/cache.json +++ b/lib/libpmc/pmu-events/arch/x86/amdzen1/cache.json @@ -38,31 +38,31 @@ "EventName": "ic_fetch_stall.ic_stall_any", "EventCode": "0x87", "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle for any reason (nothing valid in pipe ICM1).", - "UMask": "0x4" + "UMask": "0x04" }, { "EventName": "ic_fetch_stall.ic_stall_dq_empty", "EventCode": "0x87", "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle (including IC to OC fetches) due to DQ empty.", - "UMask": "0x2" + "UMask": "0x02" }, { "EventName": "ic_fetch_stall.ic_stall_back_pressure", "EventCode": "0x87", "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle (including IC to OC fetches) due to back-pressure.", - "UMask": "0x1" + "UMask": "0x01" }, { "EventName": "ic_cache_inval.l2_invalidating_probe", "EventCode": "0x8c", "BriefDescription": "IC line invalidated due to L2 invalidating probe (external or LS). The number of instruction cache lines invalidated. A non-SMC event is CMC (cross modifying code), either from the other thread of the core or another core.", - "UMask": "0x2" + "UMask": "0x02" }, { "EventName": "ic_cache_inval.fill_invalidated", "EventCode": "0x8c", "BriefDescription": "IC line invalidated due to overwriting fill response. The number of instruction cache lines invalidated. A non-SMC event is CMC (cross modifying code), either from the other thread of the core or another core.", - "UMask": "0x1" + "UMask": "0x01" }, { "EventName": "bp_tlb_rel", @@ -97,25 +97,30 @@ "EventName": "l2_request_g1.change_to_x", "EventCode": "0x60", "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache state change requests. Request change to writable, check L2 for current state.", - "UMask": "0x8" + "UMask": "0x08" }, { "EventName": "l2_request_g1.prefetch_l2_cmd", "EventCode": "0x60", "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). PrefetchL2Cmd.", - "UMask": "0x4" + "UMask": "0x04" }, { "EventName": "l2_request_g1.l2_hw_pf", "EventCode": "0x60", "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). L2 Prefetcher. All prefetches accepted by L2 pipeline, hit or miss. Types of PF and L2 hit/miss broken out in a separate perfmon event.", - "UMask": "0x2" + "UMask": "0x02" }, { "EventName": "l2_request_g1.group2", "EventCode": "0x60", "BriefDescription": "Miscellaneous events covered in more detail by l2_request_g2 (PMCx061).", - "UMask": "0x1" + "UMask": "0x01" + }, + { + "EventName": "l2_request_g1.all_no_prefetch", + "EventCode": "0x60", + "UMask": "0xf9" }, { "EventName": "l2_request_g2.group1", @@ -145,31 +150,31 @@ "EventName": "l2_request_g2.ic_rd_sized_nc", "EventCode": "0x61", "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Instruction cache read sized non-cacheable.", - "UMask": "0x8" + "UMask": "0x08" }, { "EventName": "l2_request_g2.smc_inval", "EventCode": "0x61", "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Self-modifying code invalidates.", - "UMask": "0x4" + "UMask": "0x04" }, { "EventName": "l2_request_g2.bus_locks_originator", "EventCode": "0x61", "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Bus locks.", - "UMask": "0x2" + "UMask": "0x02" }, { "EventName": "l2_request_g2.bus_locks_responses", "EventCode": "0x61", "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Bus lock response.", - "UMask": "0x1" + "UMask": "0x01" }, { "EventName": "l2_latency.l2_cycles_waiting_on_fills", "EventCode": "0x62", "BriefDescription": "Total cycles spent waiting for L2 fills to complete from L3 or memory, divided by four. Event counts are for both threads. To calculate average latency, the number of fills from both threads must be used.", - "UMask": "0x1" + "UMask": "0x01" }, { "EventName": "l2_wcb_req.wcb_write", @@ -187,13 +192,13 @@ "EventName": "l2_wcb_req.zero_byte_store", "EventCode": "0x63", "BriefDescription": "LS to L2 WCB zero byte store requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) zero byte store requests.", - "UMask": "0x4" + "UMask": "0x04" }, { "EventName": "l2_wcb_req.cl_zero", "EventCode": "0x63", "BriefDescription": "LS to L2 WCB cache line zeroing requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) cache line zeroing requests.", - "UMask": "0x1" + "UMask": "0x01" }, { "EventName": "l2_cache_req_stat.ls_rd_blk_cs", @@ -223,31 +228,67 @@ "EventName": "l2_cache_req_stat.ls_rd_blk_c", "EventCode": "0x64", "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache request miss in L2 (all types).", - "UMask": "0x8" + "UMask": "0x08" }, { "EventName": "l2_cache_req_stat.ic_fill_hit_x", "EventCode": "0x64", "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache hit modifiable line in L2.", - "UMask": "0x4" + "UMask": "0x04" }, { "EventName": "l2_cache_req_stat.ic_fill_hit_s", "EventCode": "0x64", "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache hit clean line in L2.", - "UMask": "0x2" + "UMask": "0x02" }, { "EventName": "l2_cache_req_stat.ic_fill_miss", "EventCode": "0x64", "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache request miss in L2.", - "UMask": "0x1" + "UMask": "0x01" + }, + { + "EventName": "l2_cache_req_stat.ic_access_in_l2", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache requests in L2.", + "UMask": "0x07" + }, + { + "EventName": "l2_cache_req_stat.ic_dc_miss_in_l2", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache request miss in L2 and Data cache request miss in L2 (all types).", + "UMask": "0x09" + }, + { + "EventName": "l2_cache_req_stat.ic_dc_hit_in_l2", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache request hit in L2 and Data cache request hit in L2 (all types).", + "UMask": "0xf6" }, { "EventName": "l2_fill_pending.l2_fill_busy", "EventCode": "0x6d", "BriefDescription": "Cycles with fill pending from L2. Total cycles spent with one or more fill requests in flight from L2.", - "UMask": "0x1" + "UMask": "0x01" + }, + { + "EventName": "l2_pf_hit_l2", + "EventCode": "0x70", + "BriefDescription": "L2 prefetch hit in L2. Use l2_cache_hits_from_l2_hwpf instead.", + "UMask": "0xff" + }, + { + "EventName": "l2_pf_miss_l2_hit_l3", + "EventCode": "0x71", + "BriefDescription": "L2 prefetcher hits in L3. Counts all L2 prefetches accepted by the L2 pipeline which miss the L2 cache and hit the L3.", + "UMask": "0xff" + }, + { + "EventName": "l2_pf_miss_l2_l3", + "EventCode": "0x72", + "BriefDescription": "L2 prefetcher misses in L3. All L2 prefetches accepted by the L2 pipeline which miss the L2 and the L3 caches.", + "UMask": "0xff" }, { "EventName": "l3_request_g1.caching_l3_cache_accesses", diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen1/core.json b/lib/libpmc/pmu-events/arch/x86/amdzen1/core.json index 7e1aa8273935..4dceeabc4a9f 100644 --- a/lib/libpmc/pmu-events/arch/x86/amdzen1/core.json +++ b/lib/libpmc/pmu-events/arch/x86/amdzen1/core.json @@ -61,28 +61,28 @@ { "EventName": "ex_ret_brn_ind_misp", "EventCode": "0xca", - "BriefDescription": "Retired Indirect Branch Instructions Mispredicted.", + "BriefDescription": "Retired Indirect Branch Instructions Mispredicted." }, { "EventName": "ex_ret_mmx_fp_instr.sse_instr", "EventCode": "0xcb", "BriefDescription": "SSE instructions (SSE, SSE2, SSE3, SSSE3, SSE4A, SSE41, SSE42, AVX).", "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. SSE instructions (SSE, SSE2, SSE3, SSSE3, SSE4A, SSE41, SSE42, AVX).", - "UMask": "0x4" + "UMask": "0x04" }, { "EventName": "ex_ret_mmx_fp_instr.mmx_instr", "EventCode": "0xcb", "BriefDescription": "MMX instructions.", "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. MMX instructions.", - "UMask": "0x2" + "UMask": "0x02" }, { "EventName": "ex_ret_mmx_fp_instr.x87_instr", "EventCode": "0xcb", "BriefDescription": "x87 instructions.", "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. x87 instructions.", - "UMask": "0x1" + "UMask": "0x01" }, { "EventName": "ex_ret_cond", @@ -103,19 +103,19 @@ "EventName": "ex_tagged_ibs_ops.ibs_count_rollover", "EventCode": "0x1cf", "BriefDescription": "Tagged IBS Ops. Number of times an op could not be tagged by IBS because of a previous tagged op that has not retired.", - "UMask": "0x4" + "UMask": "0x04" }, { "EventName": "ex_tagged_ibs_ops.ibs_tagged_ops_ret", "EventCode": "0x1cf", "BriefDescription": "Tagged IBS Ops. Number of Ops tagged by IBS that retired.", - "UMask": "0x2" + "UMask": "0x02" }, { "EventName": "ex_tagged_ibs_ops.ibs_tagged_ops", "EventCode": "0x1cf", "BriefDescription": "Tagged IBS Ops. Number of Ops tagged by IBS.", - "UMask": "0x1" + "UMask": "0x01" }, { "EventName": "ex_ret_fus_brnch_inst", diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen1/data-fabric.json b/lib/libpmc/pmu-events/arch/x86/amdzen1/data-fabric.json index 6f138730df4f..40271df40015 100644 --- a/lib/libpmc/pmu-events/arch/x86/amdzen1/data-fabric.json +++ b/lib/libpmc/pmu-events/arch/x86/amdzen1/data-fabric.json @@ -1,2668 +1,98 @@ -[ - { - "EventName": "df_ccm_reqa.Node0.anydram", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", - "UMask": "0x0F" - }, - { - "EventName": "df_ccm_reqa.Node1.anydram", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", - "UMask": "0x2F" - }, - { - "EventName": "df_ccm_reqa.Node2.anydram", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", - "UMask": "0x4F" - }, - { - "EventName": "df_ccm_reqa.Node3.anydram", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", - "UMask": "0x6F" - }, - { - "EventName": "df_ccm_reqa.Node4.anydram", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", - "UMask": "0x8F" - }, - { - "EventName": "df_ccm_reqa.Node5.anydram", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", - "UMask": "0xAF" - }, - { - "EventName": "df_ccm_reqa.Node6.anydram", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", - "UMask": "0xCF" - }, - { - "EventName": "df_ccm_reqa.Node7.anydram", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", - "UMask": "0xEF" - }, - { - "EventName": "df_ccm_reqa.Node0.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", - "UMask": "0x0E" - }, - { - "EventName": "df_ccm_reqa.Node1.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", - "UMask": "0x2E" - }, - { - "EventName": "df_ccm_reqa.Node2.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", - "UMask": "0x4E" - }, - { - "EventName": "df_ccm_reqa.Node3.wrsizedfullzero", - "EventCode": "0x8E", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", - "UMask": "0x6E" - }, - { - "EventName": "df_ccm_reqa.Node4.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", - "UMask": "0x8E" - }, - { - "EventName": "df_ccm_reqa.Node5.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", - "UMask": "0xAE" - }, - { - "EventName": "df_ccm_reqa.Node6.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", - "UMask": "0xCE" - }, - { - "EventName": "df_ccm_reqa.Node7.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", - "UMask": "0xEE" - }, - { - "EventName": "df_ccm_reqa.Node0.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0x0D" - }, - { - "EventName": "df_ccm_reqa.Node1.wrsizedfullnc", - "EventCode": "0x8A", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0x2D" - }, - { - "EventName": "df_ccm_reqa.Node2.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0x4D" - }, - { - "EventName": "df_ccm_reqa.Node3.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0x6D" - }, - { - "EventName": "df_ccm_reqa.Node4.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0x8D" - }, - { - "EventName": "df_ccm_reqa.Node5.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0xAD" - }, - { - "EventName": "df_ccm_reqa.Node6.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0xCD" - }, - { - "EventName": "df_ccm_reqa.Node7.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0xED" - }, - { - "EventName": "df_ccm_reqa.Node0.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0x0C" - }, - { - "EventName": "df_ccm_reqa.Node1.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0x2C" - }, - { - "EventName": "df_ccm_reqa.Node2.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0x4C" - }, - { - "EventName": "df_ccm_reqa.Node3.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0x6C" - }, - { - "EventName": "df_ccm_reqa.Node4.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0x8C" - }, - { - "EventName": "df_ccm_reqa.Node5.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0xAC" - }, - { - "EventName": "df_ccm_reqa.Node6.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0xCC" - }, - { - "EventName": "df_ccm_reqa.Node7.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0xEC" - }, - { - "EventName": "df_ccm_reqa.Node0.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", - "UMask": "0x0B" - }, - { - "EventName": "df_ccm_reqa.Node1.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", - "UMask": "0x2B" - }, - { - "EventName": "df_ccm_reqa.Node2.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", - "UMask": "0x4B" - }, - { - "EventName": "df_ccm_reqa.Node3.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", - "UMask": "0x6B" - }, - { - "EventName": "df_ccm_reqa.Node4.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", - "UMask": "0x8B" - }, - { - "EventName": "df_ccm_reqa.Node5.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", - "UMask": "0xAB" - }, - { - "EventName": "df_ccm_reqa.Node6.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", - "UMask": "0xCB" - }, - { - "EventName": "df_ccm_reqa.Node7.wrsizedfullzero", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", - "UMask": "0xEB" - }, - { - "EventName": "df_ccm_reqa.Node0.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0x0A" - }, - { - "EventName": "df_ccm_reqa.Node1.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0x2A" - }, - { - "EventName": "df_ccm_reqa.Node2.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0x4A" - }, - { - "EventName": "df_ccm_reqa.Node3.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0x6A" - }, - { - "EventName": "df_ccm_reqa.Node4.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0x8A" - }, - { - "EventName": "df_ccm_reqa.Node5.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0xAA" - }, - { - "EventName": "df_ccm_reqa.Node6.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0xCA" - }, - { - "EventName": "df_ccm_reqa.Node7.wrsizedfullnc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", - "UMask": "0xEA" - }, - { - "EventName": "df_ccm_reqa.Node0.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0x09" - }, - { - "EventName": "df_ccm_reqa.Node1.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0x29" - }, - { - "EventName": "df_ccm_reqa.Node2.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0x49" - }, - { - "EventName": "df_ccm_reqa.Node3.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0x69" - }, - { - "EventName": "df_ccm_reqa.Node4.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0x89" - }, - { - "EventName": "df_ccm_reqa.Node5.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0xA9" - }, - { - "EventName": "df_ccm_reqa.Node6.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0xC9" - }, - { - "EventName": "df_ccm_reqa.Node7.wrsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", - "UMask": "0xE9" - }, - { - "EventName": "df_ccm_reqa.Node0.rdsizednc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", - "UMask": "0x08" - }, - { - "EventName": "df_ccm_reqa.Node1.rdsizednc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", - "UMask": "0x28" - }, - { - "EventName": "df_ccm_reqa.Node2.rdsizednc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", - "UMask": "0x48" - }, - { - "EventName": "df_ccm_reqa.Node3.rdsizednc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", - "UMask": "0x68" - }, - { - "EventName": "df_ccm_reqa.Node4.rdsizednc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", - "UMask": "0x88" - }, - { - "EventName": "df_ccm_reqa.Node5.rdsizednc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", - "UMask": "0xA8" - }, - { - "EventName": "df_ccm_reqa.Node6.rdsizednc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", - "UMask": "0xC8" - }, - { - "EventName": "df_ccm_reqa.Node7.rdsizednc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", - "UMask": "0xE8" - }, - { - "EventName": "df_ccm_reqa.Node0.rdsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", - "UMask": "0x07" - }, - { - "EventName": "df_ccm_reqa.Node1.rdsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", - "UMask": "0x27" - }, - { - "EventName": "df_ccm_reqa.Node2.rdsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", - "UMask": "0x47" - }, - { - "EventName": "df_ccm_reqa.Node3.rdsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", - "UMask": "0x67" - }, - { - "EventName": "df_ccm_reqa.Node4.rdsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", - "UMask": "0x87" - }, - { - "EventName": "df_ccm_reqa.Node5.rdsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", - "UMask": "0xA7" - }, - { - "EventName": "df_ccm_reqa.Node6.rdsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", - "UMask": "0xC7" - }, - { - "EventName": "df_ccm_reqa.Node7.rdsized", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", - "UMask": "0xE7" - }, - { - "EventName": "df_ccm_reqa.Node0.specdramrd", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", - "UMask": "0x06" - }, - { - "EventName": "df_ccm_reqa.Node1.specdramrd", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", - "UMask": "0x26" - }, - { - "EventName": "df_ccm_reqa.Node2.specdramrd", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", - "UMask": "0x46" - }, - { - "EventName": "df_ccm_reqa.Node3.specdramrd", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", - "UMask": "0x66" - }, - { - "EventName": "df_ccm_reqa.Node4.specdramrd", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", - "UMask": "0x86" - }, - { - "EventName": "df_ccm_reqa.Node5.specdramrd", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", - "UMask": "0xA6" - }, - { - "EventName": "df_ccm_reqa.Node6.specdramrd", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", - "UMask": "0xC6" - }, - { - "EventName": "df_ccm_reqa.Node7.specdramrd", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", - "UMask": "0xE6" - }, - { - "EventName": "df_ccm_reqa.Node0.anyrdblk", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", - "UMask": "0x05" - }, - { - "EventName": "df_ccm_reqa.Node1.anyrdblk", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", - "UMask": "0x25" - }, - { - "EventName": "df_ccm_reqa.Node2.anyrdblk", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", - "UMask": "0x45" - }, - { - "EventName": "df_ccm_reqa.Node3.anyrdblk", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", - "UMask": "0x65" - }, - { - "EventName": "df_ccm_reqa.Node4.anyrdblk", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", - "UMask": "0x85" - }, - { - "EventName": "df_ccm_reqa.Node5.anyrdblk", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", - "UMask": "0xA5" - }, - { - "EventName": "df_ccm_reqa.Node6.anyrdblk", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", - "UMask": "0xC5" - }, - { - "EventName": "df_ccm_reqa.Node7.anyrdblk", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", - "UMask": "0xE5" - }, - { - "EventName": "df_ccm_reqa.Node0.rdvlkc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", - "UMask": "0x04" - }, - { - "EventName": "df_ccm_reqa.Node1.rdvlkc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", - "UMask": "0x24" - }, - { - "EventName": "df_ccm_reqa.Node2.rdvlkc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", - "UMask": "0x44" - }, - { - "EventName": "df_ccm_reqa.Node3.rdvlkc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", - "UMask": "0x64" - }, - { - "EventName": "df_ccm_reqa.Node4.rdvlkc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", - "UMask": "0x84" - }, - { - "EventName": "df_ccm_reqa.Node5.rdvlkc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", - "UMask": "0xA4" - }, - { - "EventName": "df_ccm_reqa.Node6.rdvlkc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", - "UMask": "0xC4" - }, - { - "EventName": "df_ccm_reqa.Node7.rdvlkc", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", - "UMask": "0xE4" - }, - { - "EventName": "df_ccm_reqa.Node0.rdvlkx", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", - "UMask": "0x03" - }, - { - "EventName": "df_ccm_reqa.Node1.rdvlkx", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", - "UMask": "0x23" - }, - { - "EventName": "df_ccm_reqa.Node2.rdvlkx", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", - "UMask": "0x43" - }, - { - "EventName": "df_ccm_reqa.Node3.rdvlkx", - "EventCode": "0x8B", - "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", *** 87681 LINES SKIPPED *** From nobody Thu Nov 25 16:37:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1725718B3BFB; Thu, 25 Nov 2021 16:37: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 4J0Nnl51Hyz4ql0; Thu, 25 Nov 2021 16:37:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87B6E20773; Thu, 25 Nov 2021 16:37: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 1APGbFJ1054935; Thu, 25 Nov 2021 16:37:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APGbFnY054934; Thu, 25 Nov 2021 16:37:15 GMT (envelope-from git) Date: Thu, 25 Nov 2021 16:37:15 GMT Message-Id: <202111251637.1APGbFnY054934@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: 437ea82ce7fc - main - agp: Handle multiple devices more gracefully List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 437ea82ce7fc3e664447b9e7d08f5c135a7e2f31 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637858235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ok/y0LKAQ5/iNH9DuEgKIlEkEIV6YifwwgX0UkHhzwE=; b=pLIklKB7SZvmeoH81ED8l+k9tIZ4EZhO4KMxWjWcdo/piaso6dCSbDcQacYrKEt9oi3T9+ qO9BHptcvNHhiElzBL12IvFZtoMkduGBaJbgeokN3ACj6BJXawpP9JoeyIGIboxhdpi+H+ p1P+6BAUFKEYdIhZEHEXeasM5HcvIg1RFe2HHgyarBt2EtmbbNPg6khHTqQDq9CNP4K9lg Zs/r/GTFuWddHPomxRSEFnWRYH1kFlMNZpo3ibUjiQ3/h9ikPknWu6g427AbRpa87sgklX nNaiTeyMumqLW1jjvM3XJiu3n7W/CoaSHbavIDQUOf5jporb/hWTyuLbMzsgcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637858235; a=rsa-sha256; cv=none; b=O86sihKDfliAYDKdyw0VKKndFp28gBKFk640z4iSzHlgSS+hRgi7pABbU2Ixi23XYsEIQE AU4bh/AJ4D0PWYZEozlK1RJNKp/F1h9TUmrjelXxiVxj9g5E4u2P8CNXoTj4pknvm0nv7B npHNUihBeq8seRHR0pkPs3XOqDBzi2ki0WOKA8nG97RCl9pguM5heFKfWyxuBYT6s2KvTT JqBEC7v12+HyR1wjR5LkGUP3K69D9h+ZhmqTfk+ROu2jotr1vMG97Wup+syCYS270Xy0Lb OPicxTpJvfeqGTFkB9eH7VzQnSt7FjCnp0VpAfzmYaTZK1Az3J/t9AWXP/x3fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=437ea82ce7fc3e664447b9e7d08f5c135a7e2f31 commit 437ea82ce7fc3e664447b9e7d08f5c135a7e2f31 Author: Mark Johnston AuthorDate: 2021-11-25 16:27:49 +0000 Commit: Mark Johnston CommitDate: 2021-11-25 16:36:33 +0000 agp: Handle multiple devices more gracefully Currently agp(4) effectively assumes that only one driver instance exists, as the generic attach routine attempts to create /dev/agpgart and triggers a panic if it already exists. Instead, handle this situation by creating /dev/agpgart and making /dev/agpgart an alias of /dev/agpgart0 for compatibility. PR: 187015 Reviewed by: imp, kib Tested by: Yoshihiro Ota (earlier version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33068 --- sys/dev/agp/agp.c | 33 ++++++++++++++++++++++++++++----- sys/dev/agp/agppriv.h | 1 + 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index aaae2176f85a..39e9d5dd64e7 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -205,8 +205,9 @@ agp_set_aperture_resource(device_t dev, int rid) int agp_generic_attach(device_t dev) { + struct make_dev_args mdargs; struct agp_softc *sc = device_get_softc(dev); - int i; + int error, i, unit; u_int memsize; /* @@ -250,11 +251,31 @@ agp_generic_attach(device_t dev) TAILQ_INIT(&sc->as_memory); sc->as_nextid = 1; - sc->as_devnode = make_dev(&agp_cdevsw, - 0, UID_ROOT, GID_WHEEL, 0600, "agpgart"); - sc->as_devnode->si_drv1 = dev; + sc->as_devalias = NULL; - return 0; + make_dev_args_init(&mdargs); + mdargs.mda_devsw = &agp_cdevsw; + mdargs.mda_uid = UID_ROOT; + mdargs.mda_gid = GID_WHEEL; + mdargs.mda_mode = 0600; + mdargs.mda_si_drv1 = sc; + mdargs.mda_si_drv2 = NULL; + + unit = device_get_unit(dev); + error = make_dev_s(&mdargs, &sc->as_devnode, "agpgart%d", unit); + if (error == 0) { + /* + * Create an alias for the first device that shows up. + */ + if (unit == 0) { + (void)make_dev_alias_p(MAKEDEV_CHECKNAME, + &sc->as_devalias, sc->as_devnode, "agpgart"); + } + } else { + agp_free_res(dev); + } + + return error; } void @@ -263,6 +284,8 @@ agp_free_cdev(device_t dev) struct agp_softc *sc = device_get_softc(dev); destroy_dev(sc->as_devnode); + if (sc->as_devalias != NULL) + destroy_dev(sc->as_devalias); } void diff --git a/sys/dev/agp/agppriv.h b/sys/dev/agp/agppriv.h index f6fa3c5526bd..525f4bced245 100644 --- a/sys/dev/agp/agppriv.h +++ b/sys/dev/agp/agppriv.h @@ -76,6 +76,7 @@ struct agp_softc { int as_nextid; /* next memory block id */ int as_isopen; /* user device is open */ struct cdev *as_devnode; /* from make_dev */ + struct cdev *as_devalias; struct mtx as_lock; /* lock for access to GATT */ }; From nobody Thu Nov 25 16:37:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 43CB918B4083; Thu, 25 Nov 2021 16:37: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 4J0Nnm64VCz4qy6; Thu, 25 Nov 2021 16:37:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7CDF20D4E; Thu, 25 Nov 2021 16:37: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 1APGbGeD054962; Thu, 25 Nov 2021 16:37:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APGbGjX054961; Thu, 25 Nov 2021 16:37:16 GMT (envelope-from git) Date: Thu, 25 Nov 2021 16:37:16 GMT Message-Id: <202111251637.1APGbGjX054961@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: cc7decfcf93b - main - make_dev.9: Fix a typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc7decfcf93be2a9e78923cc9782fd913f70b78e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637858236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kHnPheYch7XeVfTLTS0pY/ZGkexJc49cOnyhKI28GCw=; b=A6w6fwfONTB1lqS0+EwnrCHSEvtew/qbt9xzS0AkKxqQp/DdFe9pnjPRzQnjCEzrAu3Wkd PDWU/MTmbec24KwdT4aceLs+6oNWG2jLDNjIOh8P901gTZViwjZawAjp+tqzZ+LVh20PC7 300b556Uzw8o4EAxuZT0p7uaAH0+33PDgbG+ihVhlezLoAEN66G8k0xA9Jr+W4PGjns9xi J8eGc+qWchJ7vI32fKJ2QzxN50VMTKDPwKdSBFGqQIWGwot1keccst6bJStI6mVh8kd776 Lnuzx532gmb0/nv+NnvvNt/kjD3rVHYFTre0/Bc7+SRLd8x0O1sgxqngotWltg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637858236; a=rsa-sha256; cv=none; b=ExVNXcyLx5yDbNimcc3+zbBS6Scqrl7wT8YxYzN5iXEaiKFF4XZFsJI6eD4Dcz8phxN6OM LUOey4d5b/h7G4qHMO/2c8PMszksS29e09QBnxJySh6PfSyNmEUFl1+kjmxBCETmBYz8/F FbkbCLDCIbMvBEvDDJx5CAE4hrwn5KQPaT7RFbRd5EI4lGJ78PHP281LxeAvXwJ4G31v1t 1kZiHmtRWkgTlT5ajTfzvITXrZsIWo59cqYh7QscZ7vFtW5xDXq+fWYeN5eh6WjOExNiIk 5+gY4GcyJDOmmLmJ16I1twN5aU9Mj45tdMjJmIeDjz9lBEN8n6MBv5W9YqZr3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cc7decfcf93be2a9e78923cc9782fd913f70b78e commit cc7decfcf93be2a9e78923cc9782fd913f70b78e Author: Mark Johnston AuthorDate: 2021-11-25 16:32:30 +0000 Commit: Mark Johnston CommitDate: 2021-11-25 16:36:33 +0000 make_dev.9: Fix a typo MFC after: 1 week --- share/man/man9/make_dev.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/make_dev.9 b/share/man/man9/make_dev.9 index fa186e649bd3..cd038a703616 100644 --- a/share/man/man9/make_dev.9 +++ b/share/man/man9/make_dev.9 @@ -292,7 +292,7 @@ prior to calling The .Fn make_dev_alias function is similar to -.Fn make_dev_alias +.Fn make_dev_alias_p but it returns the resulting aliasing .Ft *cdev and may not return an error. From nobody Thu Nov 25 16:54:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CECD918BAF60; Thu, 25 Nov 2021 16:54:14 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from tor1-11.mx.scaleengine.net (tor1-11.mx.scaleengine.net [IPv6:2001:470:1:474::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0P9L5MPyz3CBC; Thu, 25 Nov 2021 16:54:14 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.3] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by tor1-11.mx.scaleengine.net (Postfix) with ESMTPSA id 16B893366D; Thu, 25 Nov 2021 16:54:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 tor1-11.mx.scaleengine.net 16B893366D Message-ID: <9bf8a967-de50-9072-40cb-08d2798594dc@freebsd.org> Date: Thu, 25 Nov 2021 11:54:06 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features Content-Language: en-US To: Helge Oldach Cc: manu@bidouilliste.com, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org References: <202111251531.1APFVBK9039510@nuc.oldach.net> From: Allan Jude In-Reply-To: <202111251531.1APFVBK9039510@nuc.oldach.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4J0P9L5MPyz3CBC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 11/25/2021 10:31 AM, Helge Oldach wrote: > Allan Jude wrote on Thu, 25 Nov 2021 16:09:25 +0100 (CET): >> On 11/25/2021 2:38 AM, Helge Oldach wrote: >>> hmo@p48 ~ $ for f in 0 1 2 3 8 16 32 64 128 ; do echo -n $f:; env OPENSSL_armcap=$f openssl speed -evp aes-256-gcm 2>&1 | tail -1 | cut -wf7; done >>> 0:42295.15k >>> 1:23891.19k >>> 2:42208.57k >>> 3:23970.56k >>> 8:42354.98k >>> 16:42199.06k >>> 32:size >>> Illegal instruction (core dumped) >>> 64:42322.42k >>> 128:42275.00k >>> hmo@p48 ~ $ >>> >>> So I guess HWCAP_FP is the culprit? Maybe related to hard/soft floating >>> point math which indeed is kind of special on the Pi? >> >> So yeah, the issue seems to be that floating point on the RPi4 is slower >> than not, but now openssl (properly) detects that the CPU advertises >> support for it. >> >> As seen elsewhere in the thread, most other ARM platforms get a very >> significant speed boost. > > So can we disable FP within OpenSSL for the RPi by default? This commit > basically introduced a regression for this platform and I think that > should be fixed. > > Or it the root cause a suboptimal FP implementation that is not adequate > for the RPi? > > Kind regards > Helge > The root cause is that the RPi4 advertises support for FP, but its FP is slow. I don't know that there is an easy way to detect the RPi4 specifically. You might be able to just disable the FP bit by setting OPENSSL_armcap=~1 globally, or maybe via openssl.conf? -- Allan Jude From nobody Thu Nov 25 16:54:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4AFEA18BB544; Thu, 25 Nov 2021 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 4J0P9v01d5z3CTJ; Thu, 25 Nov 2021 16:54:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5D7F211B5; Thu, 25 Nov 2021 16:54: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 1APGsgQA080733; Thu, 25 Nov 2021 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 1APGsgIe080732; Thu, 25 Nov 2021 16:54:42 GMT (envelope-from git) Date: Thu, 25 Nov 2021 16:54:42 GMT Message-Id: <202111251654.1APGsgIe080732@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: ab3f1b678dde - stable/13 - cloudabi: add deprecation notice in stable branches List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ab3f1b678dde27cbdb0aec175e65401202db6dad Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637859283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HGB5mCRc7RDaNYJYZlO6jAzgrJQiEgP1ocBVnLsEEto=; b=yV27iS5+k/PsXBiZDQ2tjilYsJYrw6Fd/i3SAE6qBn40rgfIWoP+2kFMTA9BHiG3D9T/vz Cuuf/KMHMexHVd9yWy7ua6HmmlKoUBt56BwjxJI6eMCKHL8XC8DbK8NJWCrGwEG+CQdYRz uBRfKAk4ZI3NtVfJ/4g0QcqWBxnHeNU97VT+GsA0ySLKag9o44wIYmbD2nsJiBVv8qBx8h SRzy+a0Wjod0nKKF4Tl1PKFTDa6hLp321fcd1ScrEd+rpwO65n8nVg9Azbug8TpxaqP2Vi RFWWWWCW1IJB9aBFHc6rBY59wlX1bRok2zk6+VjsU/yCtawq8ERuNMCIa7G49Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637859283; a=rsa-sha256; cv=none; b=dsohRKHO9Gn51WH3KNBbSyzJIWz3v7XMTF+OvqqFX6cTwEjDmlX4N0z9K5KJwnhqgLjcUN D0Lc+ImvcxgnOMTr1rZjPxFaU5i+WJWKr38Ft7EjQyRyachNJvgThyS3W/v5BTepqp7aI3 QUqzxHq5ZwnVY0OhoCuqSYbWuVb9+Wvo4wkVjSkbT8uTNQ0r5voIkz4dSN3aBjSXqTNiMM RW4u66LJNpPliYABMrkOptW0Yb7aIjbBYfTeqEpEveY31EFTt2EexhROXp4MKufyOHfWQW zpgBgWwuo1q6Lxpa67BWDX/0MPXnTta6PjoMYVL7OErBguRfKUjQCw5Yu+/MLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ab3f1b678dde27cbdb0aec175e65401202db6dad commit ab3f1b678dde27cbdb0aec175e65401202db6dad Author: Ed Maste AuthorDate: 2021-11-25 16:45:59 +0000 Commit: Ed Maste CommitDate: 2021-11-25 16:54:11 +0000 cloudabi: add deprecation notice in stable branches It has been removed from main before 14.0. Sponsored by: The FreeBSD Foundation --- share/man/man4/cloudabi.4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/man/man4/cloudabi.4 b/share/man/man4/cloudabi.4 index 3e3f988da4d0..0c87d933a6c5 100644 --- a/share/man/man4/cloudabi.4 +++ b/share/man/man4/cloudabi.4 @@ -51,6 +51,10 @@ cloudabi_load="YES" cloudabi32_load="YES" cloudabi64_load="YES" .Ed +.Sh DEPRECATION NOTICE +.Nm +support is not present in +.Fx 14.0 . .Sh DESCRIPTION CloudABI is a POSIX-like pure capability-based runtime environment, similar to From nobody Thu Nov 25 16:54:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BCCD218BB16E; Thu, 25 Nov 2021 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 4J0P9w3KMZz3CTP; Thu, 25 Nov 2021 16:54:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 127F42109F; Thu, 25 Nov 2021 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 1APGsh0X080760; Thu, 25 Nov 2021 16:54:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APGshIj080759; Thu, 25 Nov 2021 16:54:43 GMT (envelope-from git) Date: Thu, 25 Nov 2021 16:54:43 GMT Message-Id: <202111251654.1APGshIj080759@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: c433c96d865e - stable/13 - Update deprecation version for drivers removed in main List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c433c96d865e49db8bba63f27ee692ce0e752546 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637859284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wdLGzbADdS/tLNQ5DAOKPWmvUAZU0LLgj1oAwX2uQTg=; b=BnCHbmboT92Lx3qFS6wAIgDTu3iRUmXnG1yUgES8edgqYRVoGeDFAvnPo3NPiHGljyYgvt cA54fSOMvgVoL9ARWxJTH+Sriy3vagn80UxpT34PmRR2ja0Ecrs5wznYeR0WXbrsUTvijA V/7HHk5Bxe/CHqrr/1VcAwruXf0loNhui5awH6Y1LEgTQiGfM2w3Xr2BTw4ucndslq2Xxa 8IxIYelmliJoV2IyyP/hv96LinaOksnk/zpX6qW+iPep5a0dLlrg2UniDQ+1tFBOL2/CRo nu3vgNHXASjasDqUBzfv01/HUyyeV/+TEjVWHUGL8ynHVO/Ym6LGReL0Mq9K9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637859285; a=rsa-sha256; cv=none; b=fLd22SWcIZ4+2vvckWS03ZHBN0n9EtaJB/9U+ct3Epz1aZpzCRYoQ0PFs7ygJqjwL7ezKs 6r8baGxdGhxyRqJ1CQ0OorpM0T2XMYP0a1U25DhfOSWnHg1NKWNXzgOVwfQuUfl1/eNgl3 rncUfMtBOYECPQWtyyOxcTtu/OP8JH0KxHNujUEquGUYItJrKGnRe6YcFUTj5cCZ96dTLR Z2BeoILZAj1sms/5JV2GCNeCztRqxmT275/L0Q4b9B5NvXAxjy3KVw43yYZx4o54GmKLnc gkiN47aA/TuPne9MY/0RvdhOSjpvaCdZLFBlMOG+s6cVu59Nek114C8jqxlucw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c433c96d865e49db8bba63f27ee692ce0e752546 commit c433c96d865e49db8bba63f27ee692ce0e752546 Author: Ed Maste AuthorDate: 2021-11-25 16:47:03 +0000 Commit: Ed Maste CommitDate: 2021-11-25 16:54:12 +0000 Update deprecation version for drivers removed in main Removal of the amr, esp, iir, mly and twa drivers was planned before FreeBSD 13, but did not happen before the branch. Update the depreciation notices to indicate that they are gone in FreeBSD 14. Sponsored by: The FreeBSD Foundation --- share/man/man4/amr.4 | 2 +- share/man/man4/esp.4 | 2 +- share/man/man4/iir.4 | 2 +- share/man/man4/mly.4 | 2 +- share/man/man4/twa.4 | 2 +- sys/dev/amr/amr_pci.c | 2 +- sys/dev/esp/ncr53c9x.c | 2 +- sys/dev/iir/iir_pci.c | 2 +- sys/dev/mly/mly.c | 2 +- sys/dev/twa/tw_osl_freebsd.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/share/man/man4/amr.4 b/share/man/man4/amr.4 index 8ef14dfd1d9b..145ab0251e8a 100644 --- a/share/man/man4/amr.4 +++ b/share/man/man4/amr.4 @@ -49,7 +49,7 @@ amr_load="YES" The .Nm driver is not present in -.Fx 13.0 . +.Fx 14.0 . .Sh DESCRIPTION The .Nm diff --git a/share/man/man4/esp.4 b/share/man/man4/esp.4 index 7fb426a02573..9f9f59faa093 100644 --- a/share/man/man4/esp.4 +++ b/share/man/man4/esp.4 @@ -49,7 +49,7 @@ if_esp_load="YES" The .Nm driver is not present in -.Fx 13.0 . +.Fx 14.0 . .Sh DESCRIPTION The .Nm diff --git a/share/man/man4/iir.4 b/share/man/man4/iir.4 index fa742965eb90..eba9b88eb50c 100644 --- a/share/man/man4/iir.4 +++ b/share/man/man4/iir.4 @@ -12,7 +12,7 @@ The .Nm driver is not present in -.Fx 13.0 . +.Fx 14.0 . .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your diff --git a/share/man/man4/mly.4 b/share/man/man4/mly.4 index 1a59903dfb2c..f96844113542 100644 --- a/share/man/man4/mly.4 +++ b/share/man/man4/mly.4 @@ -51,7 +51,7 @@ mly_load="YES" The .Nm driver is not present in -.Fx 13.0 . +.Fx 14.0 . .Sh DESCRIPTION The .Nm diff --git a/share/man/man4/twa.4 b/share/man/man4/twa.4 index 64e3e37f7da0..bdc3935d8079 100644 --- a/share/man/man4/twa.4 +++ b/share/man/man4/twa.4 @@ -35,7 +35,7 @@ The .Nm driver is not present in -.Fx 13.0 . +.Fx 14.0 . .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c index dd7128e372ef..c57262a8ccc2 100644 --- a/sys/dev/amr/amr_pci.c +++ b/sys/dev/amr/amr_pci.c @@ -340,7 +340,7 @@ out: if (error) amr_pci_free(sc); else - gone_in_dev(dev, 13, "amr(4) driver"); + gone_in_dev(dev, 14, "amr(4) driver"); return(error); } diff --git a/sys/dev/esp/ncr53c9x.c b/sys/dev/esp/ncr53c9x.c index 35ce9a4dbf2c..6068497ce76b 100644 --- a/sys/dev/esp/ncr53c9x.c +++ b/sys/dev/esp/ncr53c9x.c @@ -402,7 +402,7 @@ ncr53c9x_attach(struct ncr53c9x_softc *sc) NCR_UNLOCK(sc); - gone_in_dev(sc->sc_dev, 13, "esp(4) driver"); + gone_in_dev(sc->sc_dev, 14, "esp(4) driver"); return (0); fail_async: diff --git a/sys/dev/iir/iir_pci.c b/sys/dev/iir/iir_pci.c index 1dcdb7397e97..51ed27584a93 100644 --- a/sys/dev/iir/iir_pci.c +++ b/sys/dev/iir/iir_pci.c @@ -336,7 +336,7 @@ iir_pci_attach(device_t dev) } gdt_pci_enable_intr(gdt); - gone_in_dev(dev, 13, "iir(4) removed"); + gone_in_dev(dev, 14, "iir(4) removed"); return (0); err: diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c index 1bdcdbb87443..194a14e257e4 100644 --- a/sys/dev/mly/mly.c +++ b/sys/dev/mly/mly.c @@ -336,7 +336,7 @@ mly_attach(device_t dev) if (error != 0) mly_free(sc); else - gone_in_dev(dev, 13, "mly(4) removed"); + gone_in_dev(dev, 14, "mly(4) removed"); return(error); } diff --git a/sys/dev/twa/tw_osl_freebsd.c b/sys/dev/twa/tw_osl_freebsd.c index 6b76f424650a..ce79982bd95e 100644 --- a/sys/dev/twa/tw_osl_freebsd.c +++ b/sys/dev/twa/tw_osl_freebsd.c @@ -413,7 +413,7 @@ twa_attach(device_t dev) callout_init(&(sc->watchdog_callout[0]), 1); callout_init(&(sc->watchdog_callout[1]), 1); callout_reset(&(sc->watchdog_callout[0]), 5*hz, twa_watchdog, &sc->ctlr_handle); - gone_in_dev(dev, 13, "twa(4) removed"); + gone_in_dev(dev, 14, "twa(4) removed"); return(0); } From nobody Thu Nov 25 17:14:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5692718A5955; Thu, 25 Nov 2021 17:14:41 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 4J0Pcw0kVpz3KNg; Thu, 25 Nov 2021 17:14:40 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by mail-qt1-f171.google.com with SMTP id n15so6771729qta.0; Thu, 25 Nov 2021 09:14:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=yJYvEcejCdF4Wi9yu3ypDDLEIq9XD5JzT4RFzMRKaBY=; b=WAJDTjuTeIhr7DvQzrXWJV4PkrKcRRmi4SkVB+XtLO7cRaeZj90GQTwjO556yxqLJe D2sDrRoMVzW2vFy63AKZ1xlcPD3N1or+VwOBc1jQuCUmui+QykeLHHveaSvoavYYiAfO qrCVDLipYhlzOQAn2jSCE6JWPmPy9R+mjUVSMWcTIqNZThKuDp1h/QVaL8RkNX0e6jil GJn7ukIMSS6yZEkcn8Dbtsbq1xjoi0AuJZRSvB3AmyJ8EbuKFdu5LKWwyB/qTT9RLnPd 02IS51s2uVD6O7MZ4cgkzZ3u390ZR9KDK4sU8F8m99BTU8w4gym9n3HIKSlndkAx6xCJ 1z/g== X-Gm-Message-State: AOAM532VzYMJIJx19+u+t4w2GpxBrGFxnNz1LO8TIHRhgHj0PMo4vEOV vnXugaQjSl2kCpS7htOW51f4J+NNwfgxUw== X-Google-Smtp-Source: ABdhPJzz8zqEL61CZnl36Pg0bmPldkW0cmoyeCIWut6GrXaE3joqsO5GbtB1y1U1MbrYtTN+bMdAww== X-Received: by 2002:a05:622a:350:: with SMTP id r16mr19633608qtw.389.1637860472469; Thu, 25 Nov 2021 09:14:32 -0800 (PST) Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com. [209.85.219.176]) by smtp.gmail.com with ESMTPSA id h5sm1795685qkn.62.2021.11.25.09.14.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Nov 2021 09:14:32 -0800 (PST) Received: by mail-yb1-f176.google.com with SMTP id v138so13487475ybb.8; Thu, 25 Nov 2021 09:14:32 -0800 (PST) X-Received: by 2002:a5b:d41:: with SMTP id f1mr7853795ybr.447.1637860471746; Thu, 25 Nov 2021 09:14:31 -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: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> In-Reply-To: From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Date: Thu, 25 Nov 2021 18:14:17 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures To: Kyle Evans Cc: Andriy Gapon , Baptiste Daroussin , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4J0Pcw0kVpz3KNg X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 25, 2021 at 4:57 PM Kyle Evans wrote: > > On Thu, Nov 25, 2021 at 9:28 AM Fernando Apestegu=C3=ADa wrote: > > > > On Thu, Nov 25, 2021 at 4:15 PM Kyle Evans wrote: > > > > > > On Thu, Nov 25, 2021 at 8:30 AM Andriy Gapon wrote: > > > > > > > > On 25/11/2021 16:23, Baptiste Daroussin wrote: > > > > > On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: > > > > >> Looking at the output I got another thought: do we need architec= ture sub-dir > > > > >> links at all now that we install manpages to a main directory? > > > > >> Is there any benefit to having the same manpage in a directory (= like man4) > > > > >> and its immediate subdirectory (like man4/arm) ? > > > > >> > > > > > Hardlink not in the same directory is imho a fragile setup anyway= , what if a > > > > > user has different mount points here, the hardlink would be broke= n. while there > > > > > is little chances someone is doing that, history told me people a= re doing weird > > > > > things and if they haven't yet, they will soon. > > > > > > > > > > I continue to think this kind of links should be 1/ symlinks, 2/ = relative > > > > > symlinks if they are in a situation which can become a cross devi= ce issue. > > > > > > > > Yeah... but are they needed at all? :-) > > > > > > > > > > It's handy in the sense that it'd be nice to install all arch manpage= s > > > > Not also handy. From the original commit: > > ---------- > > Building and installing architecture-specific man pages only > > raises a number of > > problems: > > > > * The https://www.freebsd.org/cgi/man.cgi is incomplete. As an > > example, it does not show results for pae(4). The reason for th= is is > > that the cgi interface runs on FreeBSD amd64. > > > > * In FreeBSD amd64 some manual pages have broken X-refs. See hptr= r(4) > > for an example. > > > > * Also, we have broken links in our Release Notes. This is a > > consequence of the first point. See > > https://www.freebsd.org/releases/13.0R/hardware/#proc-i386. > > #1 and #3 are a broken man.cgi, and we should fix it or replace it. #2 I think man.cgi is perfectly able to deal with this. The impression I got the first time I asked about this[1] was the problem is that we do not ship all the man pages in the released packages. man.cgi can not show manpages that are not installed. [1] https://lists.freebsd.org/pipermail/freebsd-doc/2021-March/035449.html > is arguably not a real problem, the xref makes it clear it's an i386 I'm sorry, I don't know what you mean here. Do you mean from hptrr(4) x-ref it is clear that PAE is a i386 thing? > concept and we reference, e.g., ports manpages that are inherently > broken with some frequency anyways; see: `find *bin | xargs mandoc > -Tlint | grep Xr`, a subset of those are ports, although I haven't > counted. > > > > > Would anyone try this patch > > https://people.freebsd.org/~fernape/fix-dnoroot.patch? > > > > It seems to work(around) the problem, at least with: > > > > makefs -D -B little -o label=3DFreeBSD_root -o version=3D2 ufs.part MET= ALOG > > and > > tar -c -f archive.tbz @METALOG > > > > Cheers. > > > on some machines, e.g., I develop arm stuff on amd64 and there are > > > some drivers that simply aren't applicable to amd64, I'd like to be > > > able to find those. I think the implementation is a bit odd, though, > > > leading into: > > > > > > > I mean, whichever way we install manpages they are always installed= into manX. > > > > I do not see a point / benefit of having another copy / link / what= ever in > > > > manX/arch. > > > > > > > > > > I guess I haven't read the context much here, but I don't see why > > > either. /usr/bin/man's built-in search behavior checks > > > $mandir/$machine and $mandir/$machine_arch before $mandir, it seems > > > like we should be leaving them there and letting man do its thing. If > > > you need a non-native arch then you can hopefully just poke around th= e > > > arch subdirs (presumably mostly section 4 pages) to figure it out. > > > There's a reason they're arch subdirs, and trying to install links or > > > arch-specific pages into the main $mandir is asking for trouble when > > > we actually have conflicting pages for whatever reason between archs. > > > > > > Thanks, > > > > > > Kyle Evans From nobody Thu Nov 25 17:16:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9B82818A6B19; Thu, 25 Nov 2021 17:16:59 +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 4J0PgZ5hdSz3Lnr; Thu, 25 Nov 2021 17:16:58 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.17.1/8.17.1/hmo17dec20) with ESMTPS id 1APHGsmT018510 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 25 Nov 2021 18:16:54 +0100 (CET) (envelope-from freebsd@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.17.1/8.17.1/Submit) id 1APHGsC7018508; Thu, 25 Nov 2021 18:16:54 +0100 (CET) (envelope-from freebsd@oldach.net) Message-Id: <202111251716.1APHGsC7018508@nuc.oldach.net> Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features In-Reply-To: <9bf8a967-de50-9072-40cb-08d2798594dc@freebsd.org> from Allan Jude at "25 Nov 2021 11:54:06" To: allanjude@freebsd.org (Allan Jude) Date: Thu, 25 Nov 2021 18:16:54 +0100 (CET) Cc: manu@bidouilliste.com, 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]); Thu, 25 Nov 2021 18:16:54 +0100 (CET) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:freebsd@oldach.net RCPT: X-Rspamd-Queue-Id: 4J0PgZ5hdSz3Lnr X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=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 X-Spamd-Result: default: False [-3.30 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[oldach.net]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_NO_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N Allan Jude wrote on Thu, 25 Nov 2021 17:54:06 +0100 (CET): > On 11/25/2021 10:31 AM, Helge Oldach wrote: > > Allan Jude wrote on Thu, 25 Nov 2021 16:09:25 +0100 (CET): > >> On 11/25/2021 2:38 AM, Helge Oldach wrote: > >>> hmo@p48 ~ $ for f in 0 1 2 3 8 16 32 64 128 ; do echo -n $f:; env OPENSSL_armcap=$f openssl speed -evp aes-256-gcm 2>&1 | tail -1 | cut -wf7; done > >>> 0:42295.15k > >>> 1:23891.19k > >>> 2:42208.57k > >>> 3:23970.56k > >>> 8:42354.98k > >>> 16:42199.06k > >>> 32:size > >>> Illegal instruction (core dumped) > >>> 64:42322.42k > >>> 128:42275.00k > >>> hmo@p48 ~ $ > >>> > >>> So I guess HWCAP_FP is the culprit? Maybe related to hard/soft floating > >>> point math which indeed is kind of special on the Pi? > >> > >> So yeah, the issue seems to be that floating point on the RPi4 is slower > >> than not, but now openssl (properly) detects that the CPU advertises > >> support for it. > >> > >> As seen elsewhere in the thread, most other ARM platforms get a very > >> significant speed boost. > > > > So can we disable FP within OpenSSL for the RPi by default? This commit > > basically introduced a regression for this platform and I think that > > should be fixed. > > > > Or it the root cause a suboptimal FP implementation that is not adequate > > for the RPi? > > > > Kind regards > > Helge > > > > The root cause is that the RPi4 advertises support for FP, but its FP is > slow. > > I don't know that there is an easy way to detect the RPi4 specifically. > You might be able to just disable the FP bit by setting > OPENSSL_armcap=~1 globally, or maybe via openssl.conf? Sure can do that locally - but again: This commit is basically a regression which IMHO should be fixed in a way not requiring users to tweak things? Kind regards Helge From nobody Thu Nov 25 17:20:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7B36018AA222; Thu, 25 Nov 2021 17:21:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0Pmd1Ltyz3NFb; Thu, 25 Nov 2021 17:21:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1APHKwPY028856 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 25 Nov 2021 19:21:01 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1APHKwPY028856 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1APHKvPg028855; Thu, 25 Nov 2021 19:20:57 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 25 Nov 2021 19:20:57 +0200 From: Konstantin Belousov To: Leandro Lupori Cc: Piotr Kubaj , John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3a60869237b8 - main - Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le Message-ID: References: <202111232227.1ANMRCYk070382@gitrepo.freebsd.org> <133897a3-6db4-9353-cccd-c1d82e23146e@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4J0Pmd1Ltyz3NFb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 25, 2021 at 10:40:13AM -0300, Leandro Lupori wrote: > On Wed, Nov 24, 2021 at 6:52 PM Piotr Kubaj wrote: > > > On 21-11-24 10:34:36, John Baldwin wrote: > > > On 11/24/21 10:24 AM, Piotr Kubaj wrote: > > > > OK, it looks like ossl uses fpu_kern functions and those are available > > only an aarch64, amd64 and i386: > > > > cc -O2 -pipe -fno-common -fno-strict-aliasing -Werror -D_KERNEL > > -DKLD_MODULE -nostdinc -include > > /usr/obj/usr/src/powerpc.powerpc64/sys/modules/ossl/opt_global.h -I. > > -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fPIC > > -mlongcall -fno-omit-frame-pointer > > -fdebug-prefix-map=./machine=/usr/src/sys/powerpc/include -MD > > -MF.depend.ossl.o -MTossl.o -mno-altivec -msoft-float -mabi=elfv2 > > -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls > > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > > -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ > > -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas > > -Wno-error-tautological-compare -Wno-error-empty-body > > -Wno-error-parentheses-equality -Wno-error-unused-function > > -Wno-error-pointer-sign -Wno-error-shift-negative-value > > -Wno-address-of-packed-member -Wno-format-zero-length -std=iso9899:1999 > > -c /usr/src/sys/crypto/openssl/ossl.c -o ossl.o > > > > /usr/src/sys/crypto/openssl/ossl.c:190:4: error: implicit declaration > > of function 'fpu_kern_enter' is invalid in C99 > > [-Werror,-Wimplicit-function-declaration] > > > > fpu_kern_enter(curthread, NULL, > > FPU_KERN_NOCTX); > > > > ^ > > > > /usr/src/sys/crypto/openssl/ossl.c:190:36: error: use of undeclared > > identifier 'FPU_KERN_NOCTX' > > > > fpu_kern_enter(curthread, NULL, > > FPU_KERN_NOCTX); > > > > ^ > > > > /usr/src/sys/crypto/openssl/ossl.c:193:4: error: implicit declaration > > of function 'fpu_kern_leave' is invalid in C99 > > [-Werror,-Wimplicit-function-declaration] > > > > fpu_kern_leave(curthread, NULL); > > > > ^ > > > > /usr/src/sys/crypto/openssl/ossl.c:193:4: note: did you mean > > 'fpu_kern_enter'? > > > > /usr/src/sys/crypto/openssl/ossl.c:190:4: note: 'fpu_kern_enter' > > declared here > > > > fpu_kern_enter(curthread, NULL, > > FPU_KERN_NOCTX); > > > > ^ > > > > /usr/src/sys/crypto/openssl/ossl.c:214:6: error: implicit declaration > > of function 'is_fpu_kern_thread' is invalid in C99 > > [-Werror,-Wimplicit-function-declaration] > > > > if (is_fpu_kern_thread(0)) { > > > > ^ > > > > /usr/src/sys/crypto/openssl/ossl.c:217:3: error: implicit declaration > > of function 'fpu_kern_enter' is invalid in C99 > > [-Werror,-Wimplicit-function-declaration] > > > > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); > > > > ^ > > > > /usr/src/sys/crypto/openssl/ossl.c:217:35: error: use of undeclared > > identifier 'FPU_KERN_NOCTX' > > > > fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); > > > > ^ > > > > /usr/src/sys/crypto/openssl/ossl.c:263:3: error: implicit declaration > > of function 'fpu_kern_leave' is invalid in C99 > > [-Werror,-Wimplicit-function-declaration] > > > > fpu_kern_leave(curthread, NULL); > > > > ^ > > > > 7 errors generated. > > > > > > > > AFAIK porting those is not easy and it's certainly above my pay grade. > > > > > > Do the powerpc instructions use additional registers that are not part > > of the normal > > > GPRs saved/restored on a context switch? If so, then, yes, you will > > need to implement > > > something here (though the FPU_KERN_NOCTX variant is a bit simpler as it > > disables > > > context switches and it's sufficient just to init the registers and > > permit accesses > > > without raising a trap until fpu_kern_leave). If not, then you can make > > the use of > > > those functions conditional on architecture. > > > > I guess bdragon, jhibbits, luporl or adalava would be better source of > > information. > > > > That said, after looking at > > https://community.nxp.com/t5/MPC5xxx/Example-code-for-context-switch-for-MPC56XX-PowerPC/m-p/732248/highlight/true, > > it seems like indeed registers other than GPRs are saved and restored. > > > > > > I tried looking at > > https://cgit.freebsd.org/src/diff/?id=6ed982a221e024d64dd0ab776e6197643fa1530e. > > fpu_kern_enter() and fpu_kern_leave() are quite scary :) > > > > > AFAIK, non-integer registers are also saved/restored on a context switch on > PowerPC, but only if there is an underlying user process that has used any > FPU/Altivec/VSX instruction. > I guess it will need some adjustments if the kernel itself starts using > those registers. Context switches are not the issue there. Problem is that you need to save e.g. user content of the FPU registers file if kernel is going to use it, while user content is not yet spilled into the save area. This is why the calls to fpu_kern_enter()/leave() are required around regions in kernel that would use FPU. Of course, this save/restore operations need to coordinate with context switches, which is why John pointed out FPU_KERN_NOCTX as simplest variant, because it disables preemption around the FPU region. AFAIR FPU on PPC is somewhat a mess, more like x86. There is FPU registers file (FPR). Then there was altivec (older vector extension), and now there is VSX, each with additional registers over the basic FPU, and VSX is an extension over altivec. Then there seems to be something completely incompatible on BookE, which is the reason for our powerpcspe. From nobody Thu Nov 25 17:41:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 61A5C18B3ECB; Thu, 25 Nov 2021 17:41: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 4J0QCV0kg2z3l5C; Thu, 25 Nov 2021 17:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED2D121928; Thu, 25 Nov 2021 17:41: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 1APHf9Eo043743; Thu, 25 Nov 2021 17:41:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APHf9Zs043742; Thu, 25 Nov 2021 17:41:09 GMT (envelope-from git) Date: Thu, 25 Nov 2021 17:41:09 GMT Message-Id: <202111251741.1APHf9Zs043742@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: fb91340341cd - stable/12 - cloudabi: add deprecation notice in stable branches List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: fb91340341cdb1679a74226d9f074fb8b7b0fe72 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637862070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fU3SCnQAhMyD668xAchW1KDzrc1ly4BR/hA5tRrctUo=; b=I1lHL9fBV3YDKBHrunFekS4HVXwzlUHe8Z7dZMF7fWQdCBaympVdHQEPMye1+Mqm+D9Ohp 42x31IFajnLr94wrBxc8KSl9XK7M7EaEpELnjxuHvH+usv2zLIMrRtKV3G17KENdahkIVP ZM/Y6LO935W9YkR4MRq7h4So9KlTBv3I01SrAzn1BmktPjUup3QHGdA9nSupj7HK7eETJf tjbSN4q3vHHfkV5A/DLBTl73fhMnC0fo86547eH+yhARLK6JW6vhM4VwYz3Wbv0iA1EeMD dUrUsi/QpqrPSyTt+F5B4Hz4OzKCmGmaRsK7j/nSqs0lNyt9e6TA/GtDAQaNvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637862070; a=rsa-sha256; cv=none; b=aKYVkjYJPyH+FWcIKw9k2u71KuO/YrmIs9ZqMGrnRRXgHRjg3cXoPqNToIOIBspwUzR4rO 8cJI+btzGpV5DJQ3jNZ2Zn06syjtAOHe/zXLE8JphI/DHXxRv9DgJJaaKzmNeniYixzCuj qxYXkv8rgOxpl4WA2y4wo46utM/myKtou+rA/Qt9H0b1Svul7FJ/T02tfH8D4b8L8nCjyK ZqZAmtAKm4WpLNGwNE6zoezAmKAMR1CsKkhBr1BfN5IYGcOPDvoVHVrRsp1e871+x+xgfR ioLhoPpLwmhy9Venkiw2lzpoCdhcWQ3dyfIyTnB7rkH+8K7YlHu7PCdQPw+B3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fb91340341cdb1679a74226d9f074fb8b7b0fe72 commit fb91340341cdb1679a74226d9f074fb8b7b0fe72 Author: Ed Maste AuthorDate: 2021-11-25 16:45:59 +0000 Commit: Ed Maste CommitDate: 2021-11-25 17:03:24 +0000 cloudabi: add deprecation notice in stable branches It has been removed from main before 14.0. Sponsored by: The FreeBSD Foundation (cherry picked from commit ab3f1b678dde27cbdb0aec175e65401202db6dad) --- share/man/man4/cloudabi.4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/man/man4/cloudabi.4 b/share/man/man4/cloudabi.4 index 3e3f988da4d0..0c87d933a6c5 100644 --- a/share/man/man4/cloudabi.4 +++ b/share/man/man4/cloudabi.4 @@ -51,6 +51,10 @@ cloudabi_load="YES" cloudabi32_load="YES" cloudabi64_load="YES" .Ed +.Sh DEPRECATION NOTICE +.Nm +support is not present in +.Fx 14.0 . .Sh DESCRIPTION CloudABI is a POSIX-like pure capability-based runtime environment, similar to From nobody Thu Nov 25 17:41:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A45FB18B3ED1; Thu, 25 Nov 2021 17:41: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 4J0QCW1vx2z3l0X; Thu, 25 Nov 2021 17:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 230DD21B10; Thu, 25 Nov 2021 17:41: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 1APHfBao043773; Thu, 25 Nov 2021 17:41:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APHfBw8043772; Thu, 25 Nov 2021 17:41:11 GMT (envelope-from git) Date: Thu, 25 Nov 2021 17:41:11 GMT Message-Id: <202111251741.1APHfBw8043772@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: dbdbbc6ec6b6 - stable/12 - Add/update deprecation version for drivers removed in main List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: dbdbbc6ec6b671c3e83e209cad14f4ec8c58f653 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637862071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VU7cfXp0TQnu0XZ7eRPE5zJGQDqsJsFuvSWsvGgoMkE=; b=CWgAwczPPZPv8qPfywWz2atRtbc0+f/7h6jSBwD+wDKmpQOJij3ol1sUa4VgrezDHpw9Xi 64j/HlzPHzrqkfv5EzqkSqknihWG388qFPFvWlT4XyXAN2V/uT46VSFLlb12CMDu2fIO+4 VdGr9PWzsidV0wkRft12iFcEW2C0Ubcfv0i4o3BeLJHWkzo4MiYfZc40qKtO8rlxMX9xkt aH33D6/6mvCDmBLI9p9UB2JiWXuzmZeqqKNIOI0kVGifbwEvGMIOzax7fdswMak9ll/wjQ X4Ld64WL2Mn5oMj4IojcSwqhSSCxHNSVQM84D/q2+JhHwX1G1otfc96kv0L6rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637862071; a=rsa-sha256; cv=none; b=EtcJkKHJBpFJuG5Q6vpP9yLmIwiKHQeXWvcSTSlnwZQegGrtyBLgLojtPHXs4bbl4CklVm 2Y9BFpnsZsjw23ncISGV7PQOgiAVdnbUA2T/dQ/qKeLa268aL+EJOi2I0QL6DWexcllvuD /Ume1i1YJHwCOS7tp9ZTMgdGiQa8VfFkiy/euJZcXAUqY0puASLdvIGZ51PtpB/8CNgXZg pXBHGTaWbLsF0EpEUgy+fPqJHiNLGb19X9lNMuj4bHCgo6ptunN0nPznmI85J8rQqT+rpQ 3qonzL8gPy9/fWVYJ7C0vfCeV+x4UOthuVqcHsC9R/pydkCD5ZBrVI8GZ4z4Kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dbdbbc6ec6b671c3e83e209cad14f4ec8c58f653 commit dbdbbc6ec6b671c3e83e209cad14f4ec8c58f653 Author: Warner Losh AuthorDate: 2020-04-18 02:52:59 +0000 Commit: Ed Maste CommitDate: 2021-11-25 17:03:25 +0000 Add/update deprecation version for drivers removed in main Add deprecation notices indicating that the amr, esp, iir, mly and twa drivers happened before FreeBSD 14. Sponsored by: The FreeBSD Foundation (cherry picked from commit dd6382d1c454ab329405b64155dcdf334369a016) (cherry picked from commit 5b18755735f964e02e22e0a223dfe935f7e06f4b) (cherry picked from commit 6ccdbb521a65e2a0c82920eda9499ccf76896592) (cherry picked from commit a32311eccd93bcb0f6fb3f53a426e6918fec3c5b) (cherry picked from commit 5c68be59c8f5dbbddabc4c1144be8be6bfd30464) (cherry picked from commit c433c96d865e49db8bba63f27ee692ce0e752546) --- share/man/man4/amr.4 | 5 +++++ share/man/man4/esp.4 | 7 ++++++- share/man/man4/iir.4 | 5 +++++ share/man/man4/mly.4 | 5 +++++ share/man/man4/twa.4 | 5 +++++ sys/dev/amr/amr_pci.c | 2 ++ sys/dev/esp/ncr53c9x.c | 1 + sys/dev/iir/iir_pci.c | 1 + sys/dev/mly/mly.c | 2 ++ sys/dev/twa/tw_osl_freebsd.c | 1 + 10 files changed, 33 insertions(+), 1 deletion(-) diff --git a/share/man/man4/amr.4 b/share/man/man4/amr.4 index 1a38ee98cad8..145ab0251e8a 100644 --- a/share/man/man4/amr.4 +++ b/share/man/man4/amr.4 @@ -45,6 +45,11 @@ module at boot time, place the following line in .Bd -literal -offset indent amr_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 14.0 . .Sh DESCRIPTION The .Nm diff --git a/share/man/man4/esp.4 b/share/man/man4/esp.4 index 74676f8f03f9..2bbc12c31329 100644 --- a/share/man/man4/esp.4 +++ b/share/man/man4/esp.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 1, 2011 +.Dd March 10, 2020 .Dt ESP 4 .Os .Sh NAME @@ -45,6 +45,11 @@ following line in .Bd -literal -offset indent if_esp_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 14.0 . .Sh DESCRIPTION The .Nm diff --git a/share/man/man4/iir.4 b/share/man/man4/iir.4 index d9e4309771cd..eba9b88eb50c 100644 --- a/share/man/man4/iir.4 +++ b/share/man/man4/iir.4 @@ -8,6 +8,11 @@ .Sh NAME .Nm iir .Nd Intel Integrated RAID controller and ICP Vortex driver +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 14.0 . .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your diff --git a/share/man/man4/mly.4 b/share/man/man4/mly.4 index 0a701762d415..f96844113542 100644 --- a/share/man/man4/mly.4 +++ b/share/man/man4/mly.4 @@ -47,6 +47,11 @@ module at boot time, place the following line in .Bd -literal -offset indent mly_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 14.0 . .Sh DESCRIPTION The .Nm diff --git a/share/man/man4/twa.4 b/share/man/man4/twa.4 index dbafe91885cc..bdc3935d8079 100644 --- a/share/man/man4/twa.4 +++ b/share/man/man4/twa.4 @@ -31,6 +31,11 @@ .Sh NAME .Nm twa .Nd 3ware 9000/9500/9550/9650 series SATA RAID controllers driver +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 14.0 . .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c index 25b37eda3895..11941768d879 100644 --- a/sys/dev/amr/amr_pci.c +++ b/sys/dev/amr/amr_pci.c @@ -341,6 +341,8 @@ amr_pci_attach(device_t dev) out: if (error) amr_pci_free(sc); + else + gone_in_dev(dev, 14, "amr(4) driver"); return(error); } diff --git a/sys/dev/esp/ncr53c9x.c b/sys/dev/esp/ncr53c9x.c index 98d40ce70697..6068497ce76b 100644 --- a/sys/dev/esp/ncr53c9x.c +++ b/sys/dev/esp/ncr53c9x.c @@ -402,6 +402,7 @@ ncr53c9x_attach(struct ncr53c9x_softc *sc) NCR_UNLOCK(sc); + gone_in_dev(sc->sc_dev, 14, "esp(4) driver"); return (0); fail_async: diff --git a/sys/dev/iir/iir_pci.c b/sys/dev/iir/iir_pci.c index bd7f15b57c4a..51ed27584a93 100644 --- a/sys/dev/iir/iir_pci.c +++ b/sys/dev/iir/iir_pci.c @@ -336,6 +336,7 @@ iir_pci_attach(device_t dev) } gdt_pci_enable_intr(gdt); + gone_in_dev(dev, 14, "iir(4) removed"); return (0); err: diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c index 359692840f5f..7f2ef792006c 100644 --- a/sys/dev/mly/mly.c +++ b/sys/dev/mly/mly.c @@ -336,6 +336,8 @@ mly_attach(device_t dev) out: if (error != 0) mly_free(sc); + else + gone_in_dev(dev, 14, "mly(4) removed"); return(error); } diff --git a/sys/dev/twa/tw_osl_freebsd.c b/sys/dev/twa/tw_osl_freebsd.c index 0b3e7933a90a..4f4fb7b06de4 100644 --- a/sys/dev/twa/tw_osl_freebsd.c +++ b/sys/dev/twa/tw_osl_freebsd.c @@ -428,6 +428,7 @@ twa_attach(device_t dev) callout_init(&(sc->watchdog_callout[0]), 1); callout_init(&(sc->watchdog_callout[1]), 1); callout_reset(&(sc->watchdog_callout[0]), 5*hz, twa_watchdog, &sc->ctlr_handle); + gone_in_dev(dev, 14, "twa(4) removed"); return(0); } From nobody Thu Nov 25 17:55:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CB63418BAC6B; Thu, 25 Nov 2021 17: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 4J0QXQ3jlkz3r1H; Thu, 25 Nov 2021 17:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50D3821E4E; Thu, 25 Nov 2021 17: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 1APHtoV6061015; Thu, 25 Nov 2021 17: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 1APHtoD1061014; Thu, 25 Nov 2021 17:55:50 GMT (envelope-from git) Date: Thu, 25 Nov 2021 17:55:50 GMT Message-Id: <202111251755.1APHtoD1061014@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: 9c943f7a0396 - main - arch.7: move discontinued CPU archs to own table List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c943f7a0396850e3c66760b8807b6da0c19104a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637862950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4VbsuVbQMPXmC9rJYnIFGrM/Vwae3OTZlcIErJCPgDY=; b=YOGtl7ctIwzHWk6UV377ovZZhVNV653g5buubhUkfy5ui+EpfqPLCelNopQuHcHdx/4HFP jmVE5f8Mz7VWjYo26yC4tm5tHIZTAwVKMWW+o5vl5g0IEOX4xdR2WsZqRsl7FF7CEFTPU/ hzjovwYIhvq8IstnsmmV5RK7UYFH5JPgdLAoQmrXTZ3hbFqPBrWELqYpbgZP9eUgNlquXA xHEEDGX4R049otLSX8WnrAP9D8wf3aDLqI8MiGhMXsngbUb7uoPJJ3lWLaLJ//YZ2oE9E9 rRjLmrrYrEI1GR5xYN3wHZx0/rjkO+JLZJ1nuTUNzAwvA24fO2QgpjQ9nrfwJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637862950; a=rsa-sha256; cv=none; b=Gyarf39BCfOBsM2GDSgNwLkwiS/Av+KsuGka/YU1zmTqCV+rkTo4kSS1RnZeYw13GxF378 Nxld8yXdmJ+uSpbWp5x6y9Uk4LUpIH13Vjb4UQkLqn3pNoR/B2azKGjl7WF3sdvjZSGuv+ Sz5ME2my62/PTYpK6m9+5V70Snc8DMPoUC6CbZv6AEfDv1M0H6cqmn+3S/lOgUeX6ff1u4 QvGU1V3m6dCjjlCZ9JJD8pnDVAtvH6sHMBsuz0fVH7o5kpT7w+Meq62T+VxFpX9Jhb3zGt DRg2Pr58MPJE9fJKU0sxy761oaKI241vLhrgXPDmSVOoZiOuy0sP5ate77H9fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9c943f7a0396850e3c66760b8807b6da0c19104a commit 9c943f7a0396850e3c66760b8807b6da0c19104a Author: Ed Maste AuthorDate: 2021-11-25 02:13:04 +0000 Commit: Ed Maste CommitDate: 2021-11-25 17:54:06 +0000 arch.7: move discontinued CPU archs to own table With MIPS' retirement we now have more discontinued architectures than supported ones, making the table somewhat unclear. Split the table in two. Reviewed by: allanjude Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33110 --- share/man/man7/arch.7 | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 97f64a9d0da3..1d4a27975123 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -82,37 +82,41 @@ the highest user address and grows down. .Pp .Fx architecture support varies by release. -This table shows the first +This table shows currently supported CPU architectures along with the first .Fx -release to support each architecture, and, for discontinued -architectures, the final release. -.Bl -column -offset indent "Architecture" "Initial Release" "Final Release" -.It Sy Architecture Ta Sy Initial Release Ta Sy Final Release +release to support each architecture. +.Bl -column -offset indent "Architecture" "Initial Release" +.It Sy Architecture Ta Sy Initial Release .It aarch64 Ta 11.0 -.It alpha Ta 3.2 Ta 6.4 .It amd64 Ta 5.1 -.It arm Ta 6.0 Ta 12.x -.It armeb Ta 8.0 Ta 11.4 .It armv6 Ta 10.0 .It armv7 Ta 12.0 -.It ia64 Ta 5.0 Ta 10.4 .It i386 Ta 1.0 -.It mips Ta 8.0 Ta 13.x -.It mipsel Ta 9.0 Ta 13.x -.It mipselhf Ta 12.0 Ta 13.x -.It mipshf Ta 12.0 Ta 13.x -.It mipsn32 Ta 9.0 Ta 13.x -.It mips64 Ta 9.0 Ta 13.x -.It mips64el Ta 9.0 Ta 13.x -.It mips64elhf Ta 12.0 Ta 13.x -.It mips64hf Ta 12.0 Ta 13.x -.It pc98 Ta 2.2 Ta 11.4 .It powerpc Ta 6.0 .It powerpcspe Ta 12.0 .It powerpc64 Ta 9.0 .It powerpc64le Ta 13.0 .It riscv64 Ta 12.0 .It riscv64sf Ta 12.0 +.El +.Pp +Discontinued architectures are shown in the following table. +.Bl -column -offset indent "Architecture" "Initial Release" "Final Release" +.It Sy Architecture Ta Sy Initial Release Ta Sy Final Release +.It alpha Ta 3.2 Ta 6.4 +.It arm Ta 6.0 Ta 12.x +.It armeb Ta 8.0 Ta 11.4 +.It ia64 Ta 5.0 Ta 10.4 +.It mips Ta 8.0 Ta 13.x +.It mipsel Ta 9.0 Ta 13.x +.It mipselhf Ta 12.0 Ta 13.x +.It mipshf Ta 12.0 Ta 13.x +.It mipsn32 Ta 9.0 Ta 13.x +.It mips64 Ta 9.0 Ta 13.x +.It mips64el Ta 9.0 Ta 13.x +.It mips64elhf Ta 12.0 Ta 13.x +.It mips64hf Ta 12.0 Ta 13.x +.It pc98 Ta 2.2 Ta 11.4 .It sparc64 Ta 5.0 Ta 12.x .El .Ss Type sizes From nobody Thu Nov 25 17:59:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2ADB218BD19C; Thu, 25 Nov 2021 17:59:21 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from tor1-11.mx.scaleengine.net (tor1-11.mx.scaleengine.net [209.51.186.6]) (using TLSv1.3 with cipher TLS_AES_256_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 4J0QcT0V7tz3sVr; Thu, 25 Nov 2021 17:59:21 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.3] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by tor1-11.mx.scaleengine.net (Postfix) with ESMTPSA id 206BE33F43; Thu, 25 Nov 2021 17:59:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 tor1-11.mx.scaleengine.net 206BE33F43 Message-ID: <9284fa68-0ff1-ebae-3fdf-82049b1fee61@freebsd.org> Date: Thu, 25 Nov 2021 12:59:18 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: git: 32a2fed6e71f - stable/13 - openssl: Fix detection of ARMv7 and ARM64 CPU features Content-Language: en-US To: Helge Oldach Cc: manu@bidouilliste.com, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org References: <202111251716.1APHGsC7018508@nuc.oldach.net> From: Allan Jude In-Reply-To: <202111251716.1APHGsC7018508@nuc.oldach.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4J0QcT0V7tz3sVr X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 11/25/2021 12:16 PM, Helge Oldach wrote: > Allan Jude wrote on Thu, 25 Nov 2021 17:54:06 +0100 (CET): >> On 11/25/2021 10:31 AM, Helge Oldach wrote: >>> Allan Jude wrote on Thu, 25 Nov 2021 16:09:25 +0100 (CET): >>>> On 11/25/2021 2:38 AM, Helge Oldach wrote: >>>>> hmo@p48 ~ $ for f in 0 1 2 3 8 16 32 64 128 ; do echo -n $f:; env OPENSSL_armcap=$f openssl speed -evp aes-256-gcm 2>&1 | tail -1 | cut -wf7; done >>>>> 0:42295.15k >>>>> 1:23891.19k >>>>> 2:42208.57k >>>>> 3:23970.56k >>>>> 8:42354.98k >>>>> 16:42199.06k >>>>> 32:size >>>>> Illegal instruction (core dumped) >>>>> 64:42322.42k >>>>> 128:42275.00k >>>>> hmo@p48 ~ $ >>>>> >>>>> So I guess HWCAP_FP is the culprit? Maybe related to hard/soft floating >>>>> point math which indeed is kind of special on the Pi? >>>> >>>> So yeah, the issue seems to be that floating point on the RPi4 is slower >>>> than not, but now openssl (properly) detects that the CPU advertises >>>> support for it. >>>> >>>> As seen elsewhere in the thread, most other ARM platforms get a very >>>> significant speed boost. >>> >>> So can we disable FP within OpenSSL for the RPi by default? This commit >>> basically introduced a regression for this platform and I think that >>> should be fixed. >>> >>> Or it the root cause a suboptimal FP implementation that is not adequate >>> for the RPi? >>> >>> Kind regards >>> Helge >>> >> >> The root cause is that the RPi4 advertises support for FP, but its FP is >> slow. >> >> I don't know that there is an easy way to detect the RPi4 specifically. >> You might be able to just disable the FP bit by setting >> OPENSSL_armcap=~1 globally, or maybe via openssl.conf? > > Sure can do that locally - but again: This commit is basically a > regression which IMHO should be fixed in a way not requiring users to > tweak things? > > Kind regards > Helge > It is only a regression to RPi4's, but a massive improvement to every other bit of ARM hardware that has been tested. The error that made OpenSSL disable FP before, was an error (it was calling AT_CANARY instead of AT_HWCAP). So, your issue with openssl being slow on the RPi4 will need to be taken up with OpenSSL. -- Allan Jude From nobody Thu Nov 25 18:13:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 027BB183C98A; Thu, 25 Nov 2021 18:13:35 +0000 (UTC) (envelope-from kevans@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 4J0Qwt444hz4Rdg; Thu, 25 Nov 2021 18:13:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 6B035CFC5; Thu, 25 Nov 2021 18:13:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f171.google.com with SMTP id p19so6803721qtw.12; Thu, 25 Nov 2021 10:13:34 -0800 (PST) X-Gm-Message-State: AOAM53244Ee0SdCn4IRo3/IyinF2HPEHwomYBgQbd8A8TfTN5tXi8bMG P9MqdQ3e6cE39Z0OQAGSQSQfSmp/xG+0xLJ1+Fk= X-Google-Smtp-Source: ABdhPJyJVBiBWLFQ2oSDDEggiC5uluQPE367lFgnA3ZUJoIamk1jNF83LAEyDz0PUJoayGTgW2Gm0A3Udcv77jXuxgw= X-Received: by 2002:a05:622a:291:: with SMTP id z17mr19880545qtw.138.1637864014056; Thu, 25 Nov 2021 10:13:34 -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: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> In-Reply-To: From: Kyle Evans Date: Thu, 25 Nov 2021 12:13:21 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures To: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Cc: Andriy Gapon , Baptiste Daroussin , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637864014; 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=8jazAQq3ixe7aORGcwLQ9i+uha8TKBsDcHHRaqAj8Aw=; b=mkyy1FapWbOGGUP1XYXnchC2tj1B50pAM2yICP693LoRJkm4wCAWmLI12GR2cuUfaJmixc z+Ys3sX3967Te4lG/lAZO/V6Am15t7LRyCcb/uArWWaSLxzzYCxivoh2mFMlYxvUYLz7d0 wuopw/6+yd14BNxn06XwBdmDDzLSDLeevabVmcRLZmmlz9xCINbo6QfdrpdWR/r23IjdSi sY1Orete1ijh1oo5pWBhzhbgez5dCAS22cenVyQN6Tk1+A1rtIuuY5jxp9Nupxo1g+rRtj k1FXDGpVaEJmKxxAp+rCs16xCiK5svYV3gTqmeX4apzYVQg/nkXeur39+wnEPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637864014; a=rsa-sha256; cv=none; b=K6wIm1AdzfurNKmbOqvS4n4qPDmT75EzCOkhUlR5tjymA2gR4Uh5XXfXtzRqnMyIXoyVXy XYYlqlmno+DbWvwmY8JvmxDfj0gYiPIainwnhYouB+OcyjplkwEKXd5l4PqrzWdS2O3TVh KjJ4J9wEtAtfkezK9FcgBES7TjTVgaBAz7xGoNTh8S1XVyg0pNvPOVrr/xrKSUnFVPpRtl YvdqCNkQ+M7qdSHqsCFWPgpIZhM2afZkusqrQ87vJfNmar9oKcKwWzN5lKKSFtSS10NyXN fvC82GqaEr0w76DXATgDuZCo3rG/aJZ6CkyJiy1Y6pfJGgD9fX2ki1hhMhnUEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 25, 2021 at 11:14 AM Fernando Apestegu=C3=ADa wrote: > > On Thu, Nov 25, 2021 at 4:57 PM Kyle Evans wrote: > > > > On Thu, Nov 25, 2021 at 9:28 AM Fernando Apestegu=C3=ADa wrote: > > > > > > On Thu, Nov 25, 2021 at 4:15 PM Kyle Evans wrote: > > > > > > > > On Thu, Nov 25, 2021 at 8:30 AM Andriy Gapon wrot= e: > > > > > > > > > > On 25/11/2021 16:23, Baptiste Daroussin wrote: > > > > > > On Thu, Nov 25, 2021 at 03:57:41PM +0200, Andriy Gapon wrote: > > > > > >> Looking at the output I got another thought: do we need archit= ecture sub-dir > > > > > >> links at all now that we install manpages to a main directory? > > > > > >> Is there any benefit to having the same manpage in a directory= (like man4) > > > > > >> and its immediate subdirectory (like man4/arm) ? > > > > > >> > > > > > > Hardlink not in the same directory is imho a fragile setup anyw= ay, what if a > > > > > > user has different mount points here, the hardlink would be bro= ken. while there > > > > > > is little chances someone is doing that, history told me people= are doing weird > > > > > > things and if they haven't yet, they will soon. > > > > > > > > > > > > I continue to think this kind of links should be 1/ symlinks, 2= / relative > > > > > > symlinks if they are in a situation which can become a cross de= vice issue. > > > > > > > > > > Yeah... but are they needed at all? :-) > > > > > > > > > > > > > It's handy in the sense that it'd be nice to install all arch manpa= ges > > > > > > Not also handy. From the original commit: > > > ---------- > > > Building and installing architecture-specific man pages only > > > raises a number of > > > problems: > > > > > > * The https://www.freebsd.org/cgi/man.cgi is incomplete. As an > > > example, it does not show results for pae(4). The reason for = this is > > > that the cgi interface runs on FreeBSD amd64. > > > > > > * In FreeBSD amd64 some manual pages have broken X-refs. See hp= trr(4) > > > for an example. > > > > > > * Also, we have broken links in our Release Notes. This is a > > > consequence of the first point. See > > > https://www.freebsd.org/releases/13.0R/hardware/#proc-i386. > > > > #1 and #3 are a broken man.cgi, and we should fix it or replace it. #2 > > I think man.cgi is perfectly able to deal with this. The impression I > got the first time I asked about this[1] was the problem is that we do > not ship all the man pages in the released packages. man.cgi can not > show manpages that are not installed. > > [1] https://lists.freebsd.org/pipermail/freebsd-doc/2021-March/035449.htm= l > Ok, cool, so your patch basically does the right thing except we don't need the links. If man.cgi needs the links *and* that they're installed, then yes, man.cgi is still wrong re: discovering these. > > is arguably not a real problem, the xref makes it clear it's an i386 > > I'm sorry, I don't know what you mean here. Do you mean from hptrr(4) > x-ref it is clear that PAE is a i386 thing? > Right, from the context: The hptrr driver only works on the i386 and amd64 platforms as it requires a binary blob object from the manufacturer which they only supply for these platforms. The hptrr driver does not work on i386 wi= th pae(4) enabled. Thanks, Kyle Evans From nobody Thu Nov 25 19:35:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5BE9518A4C55; Thu, 25 Nov 2021 19:35: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 4J0Sl00ZnQz3C2B; Thu, 25 Nov 2021 19:35:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8A8F23480; Thu, 25 Nov 2021 19:35: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 1APJZ78Z094678; Thu, 25 Nov 2021 19:35:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APJZ73e094677; Thu, 25 Nov 2021 19:35:07 GMT (envelope-from git) Date: Thu, 25 Nov 2021 19:35:07 GMT Message-Id: <202111251935.1APJZ73e094677@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: a6d04f34a4db - main - swap pager: lock vnode around VOP_CLOSE() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a6d04f34a4db6ff3fd5431ae10d4b877337fc138 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637868908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hMrXfy2Ux95Kmsos0qnBGyWk+zHFZAI3Z3xKcSm7nKQ=; b=dA8ixE0UIX7w5hPkQXaqJnKLT6Jr51hRv6ip4W71odYitfGkC6EHBXWYw0idPUFSfZVgkA JNX8bsQ2svkyuMFPPlPRd7sGNeEubRGt9L3JtDfR+zQdmW/yTykDo4bbMmoUHxmaCjWxzr culUhjxazN287rpCeubMs23vEoJVnzN6uixT/X20e3+VJX5VOlXuqOw6RTTfPbyeFcRlF4 xvp70luXlJ1GCYuxF8O/E4MF8lxnmt/V1kiIwOq1QbNwW2hOMgUSp34X4F6cWTQ8XFeQ9M fCLnp+gF6YQVvqNPYo3nDYE4UoFZNRNiwp8VxiT8gWFdigzGCNCP7uD4JUwNWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637868908; a=rsa-sha256; cv=none; b=pZWmIY5vO5nsbE4bpM2dVbjmnDn1mlaPSRrvvbAqzpp0i6jcOE35Cbweoq1Z7sAvZHapbH o9hXwHGEYNnjZzUZL99kYiZHjYid7RA8lG7mYXqEBIhbmYdUU8BCMtN7/zD0XuwNvz8AzF JD12KZmomutI/tZxcJGa5wJosyOYOMVpDU8fOQXGLgNLgxCU7fjTLG7Pq6z0tp0dm+lX4u N60EgxNn/lHKAwgq9y+bkzc0XFOol6Hu0G/nFpa2ckkk66pUApkZL5xd/q6ZtvRGXcF2EY vOKRk0tK01HfidSHkAy9iIGgk6MJ9sI8K1QHQ06EcHQRjPnhSsRnslozGiz0EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a6d04f34a4db6ff3fd5431ae10d4b877337fc138 commit a6d04f34a4db6ff3fd5431ae10d4b877337fc138 Author: Konstantin Belousov AuthorDate: 2021-11-23 09:16:53 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-25 19:34:39 +0000 swap pager: lock vnode around VOP_CLOSE() Reported and tested by: peterj Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33119 --- sys/vm/swap_pager.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 9bc506c9b6b8..1a44d699bc05 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -3057,9 +3057,12 @@ swapdev_strategy(struct buf *bp, struct swdevt *sp) static void swapdev_close(struct thread *td, struct swdevt *sp) { + struct vnode *vp; - VOP_CLOSE(sp->sw_vp, FREAD | FWRITE, td->td_ucred, td); - vrele(sp->sw_vp); + vp = sp->sw_vp; + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + VOP_CLOSE(vp, FREAD | FWRITE, td->td_ucred, td); + vput(vp); } static int From nobody Thu Nov 25 19:35:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BB04818A4E18; Thu, 25 Nov 2021 19:35: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 4J0Sl12rKJz3Bp3; Thu, 25 Nov 2021 19:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 17C5723481; Thu, 25 Nov 2021 19:35: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 1APJZ8VS094702; Thu, 25 Nov 2021 19:35:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APJZ84i094701; Thu, 25 Nov 2021 19:35:08 GMT (envelope-from git) Date: Thu, 25 Nov 2021 19:35:08 GMT Message-Id: <202111251935.1APJZ84i094701@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: 6ddf41faa6f5 - main - swapon: extend the region where the swap vnode is locked List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 6ddf41faa6f54738db9b3f313086974b6403d680 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637868909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t9Y3kr5G2zrG/2yjfHGp/wBKxBR9zTw0O/0Mje5U5TI=; b=GF0ArNVakDIch3MZ0azvOO7W4CqjOEr5gWqeYmW5m01SG2DjYWigXC149Q5GaDyOth4Zx6 AJzbR8wP1QMDOdL+zy/TweoV0Dxxrb4vHS+h3g85bjQ2ExpzgIYpZsM5ButFjgRpgOjKmp rGyp6wOdidjM27pdLO/tKOBb3u3LXy7ajRcDYzkWBX8EgVR/kXmLxVU1uoEOetYAvfFFVc cToEyPAVBv4x18DLT0WOxgCvbWNa7ybhk104s4pp7/qg+BOnp89JgMcYrEyHAzge58WHi8 ytli+uPyuPajm7MzvSGM4UFEr6OTBXQusSCa62h+qfeD6118HwFlfwLCIYtDaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637868909; a=rsa-sha256; cv=none; b=jG3uRv6klaYmz2LkHI5Fse82nQhKD+kXmKHFuqH7vyqaA5GRYwghhB/G1V6ZBqtoWrdnM9 v6Blt5YPObqrx71itZOku5wikkrk9l4jzeOWqz6ux+RRegjTxsci5qHs3CmqvBsUI7uGQo E+p1mR302I+InqyAUWXdye6aaCzW15ea2Dv8ev7xxRuN/AaYxQyWg6IblnMsRP0IqwIJHF SH21vk143aQgfMIHf8s6x/rxuXrtjMCX23hKt6Wz1stRur/MpDddfERz9GtpR+mM3SiWTM Vpo3HQK07rolsqtWriVAZQkbvDEW0Lhge9QawDUWRWkZdtM7fM1gZyVidAU8jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6ddf41faa6f54738db9b3f313086974b6403d680 commit 6ddf41faa6f54738db9b3f313086974b6403d680 Author: Konstantin Belousov AuthorDate: 2021-11-24 03:06:02 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-25 19:34:44 +0000 swapon: extend the region where the swap vnode is locked to cover VOP_GETATTR() call in sys_swapon(). Move locking from inside swapongeom() and swaponvp() into sys_swapon(). Reported by and tested by: peterj Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33119 --- sys/vm/swap_pager.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 1a44d699bc05..880e2a1894df 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2366,8 +2366,8 @@ sys_swapon(struct thread *td, struct swapon_args *uap) goto done; } - NDINIT(&nd, LOOKUP, ISOPEN | FOLLOW | AUDITVNODE1, UIO_USERSPACE, - uap->name, td); + NDINIT(&nd, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, + UIO_USERSPACE, uap->name, td); error = namei(&nd); if (error) goto done; @@ -2387,8 +2387,10 @@ sys_swapon(struct thread *td, struct swapon_args *uap) error = swaponvp(td, vp, attr.va_size / DEV_BSIZE); } - if (error) - vrele(vp); + if (error != 0) + vput(vp); + else + VOP_UNLOCK(vp); done: sx_xunlock(&swdev_syscall_lock); return (error); @@ -3012,7 +3014,7 @@ swapongeom(struct vnode *vp) { int error; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + ASSERT_VOP_ELOCKED(vp, "swapongeom"); if (vp->v_type != VCHR || VN_IS_DOOMED(vp)) { error = ENOENT; } else { @@ -3020,7 +3022,6 @@ swapongeom(struct vnode *vp) error = swapongeom_locked(vp->v_rdev, vp); g_topology_unlock(); } - VOP_UNLOCK(vp); return (error); } @@ -3071,6 +3072,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) struct swdevt *sp; int error; + ASSERT_VOP_ELOCKED(vp, "swaponvp"); if (nblks == 0) return (ENXIO); mtx_lock(&sw_dev_mtx); @@ -3082,14 +3084,12 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) } mtx_unlock(&sw_dev_mtx); - (void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC error = mac_system_check_swapon(td->td_ucred, vp); if (error == 0) #endif error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td, NULL); - (void) VOP_UNLOCK(vp); - if (error) + if (error != 0) return (error); swaponsomething(vp, vp, nblks, swapdev_strategy, swapdev_close, From nobody Thu Nov 25 19:35:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 487C018A4D66; Thu, 25 Nov 2021 19:35:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0Sl2433cz3CGb; Thu, 25 Nov 2021 19:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44A972339A; Thu, 25 Nov 2021 19:35: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 1APJZAsK094732; Thu, 25 Nov 2021 19:35:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APJZA1e094731; Thu, 25 Nov 2021 19:35:10 GMT (envelope-from git) Date: Thu, 25 Nov 2021 19:35:10 GMT Message-Id: <202111251935.1APJZA1e094731@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: b19740f4ce7a - main - swap_pager: lock vnode in swapdev_strategy() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b19740f4ce7a542783f87de2fee48476a7801d86 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637868910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=preGt6uDiiBfBmsJlH93L343Rj3ybds5elpLMuTEh10=; b=LO1kTfIS2xuio8jSUxCpMpaTEYTSergIvOh7qVv9ZurvZrUFLntfhS/pG+NA5h7if0miqA 1ibKMDJB0V33OsW7OHGFeQ7uFy9BYxRuy2rOtK8JIsCXw8lRZ+VpjeQ6Rqif7c6Lsq5aXN dJzDZnryy+M9446iTDa97QIDUFahaDoIz6A4BkqnwbetMDXPZ4d/VveNMQHGyg+i3L9mcr dLaq+5eANUPxazBs96QQPEGQ11F1bUmEtiwmWQ3IHYD/76rSfnv89aBbRG9vFgvh1x72uo VlmvkRcvFcqx6GohakpPk+FZ1c+Q3XMxvqzScUPRU5A5+sDq6RLopWFrnRl32w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637868910; a=rsa-sha256; cv=none; b=eLER3KtzhtHMzxeppe6OnPAU3YRB3WYDQpSYJBbHKRpQlgT+illzxxwPMBifDYwPhE9jm8 sUGEkASXabyS3htK+UBrRJGpsb0TdBxNHJgF1xu203MEsj+GYSsf1sPoNUeEiv4FpxGKPO cr8hpfEhHNjZ3eR9GbAD0/my45Ky9QpoCS520KodfSrgtLRWp2inZjYDphCAimUqTDV3M5 xy9WZsYhdS0utq3lSCjayh1tNpZm7hsTZFUyyMYYnWgfrR7JJ56aI/WM7Ctf58SACdmT9R 5XAbCoMqFYH3K/gosZgJB1ffYmOeqGaeFFB5sAQY7QHv78D7Mml3vU9EVVB70A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b19740f4ce7a542783f87de2fee48476a7801d86 commit b19740f4ce7a542783f87de2fee48476a7801d86 Author: Konstantin Belousov AuthorDate: 2021-11-24 11:26:46 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-25 19:34:50 +0000 swap_pager: lock vnode in swapdev_strategy() VOP_STRATEGY() requires locked vnode. Note that we lock the swap vnode while pages are busy, but this would only cause real LoR if pages belong to the swap vnode, which must not be the case for correct use. Reported and tested by: peterj Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33119 --- sys/vm/swap_pager.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 880e2a1894df..6daedd02649d 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -3043,16 +3043,19 @@ swapdev_strategy(struct buf *bp, struct swdevt *sp) vp2 = sp->sw_id; vhold(vp2); if (bp->b_iocmd == BIO_WRITE) { + vn_lock(vp2, LK_EXCLUSIVE | LK_RETRY); if (bp->b_bufobj) bufobj_wdrop(bp->b_bufobj); bufobj_wref(&vp2->v_bufobj); + } else { + vn_lock(vp2, LK_SHARED | LK_RETRY); } if (bp->b_bufobj != &vp2->v_bufobj) bp->b_bufobj = &vp2->v_bufobj; bp->b_vp = vp2; bp->b_iooffset = dbtob(bp->b_blkno); bstrategy(bp); - return; + VOP_UNLOCK(vp2); } static void From nobody Thu Nov 25 19:40:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CECD818A8B70; Thu, 25 Nov 2021 19:40: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 4J0Srr0d1dz3FMY; Thu, 25 Nov 2021 19:40:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E929622B67; Thu, 25 Nov 2021 19:40: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 1APJeBpV098870; Thu, 25 Nov 2021 19:40:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APJeB8n098862; Thu, 25 Nov 2021 19:40:11 GMT (envelope-from git) Date: Thu, 25 Nov 2021 19:40:11 GMT Message-Id: <202111251940.1APJeB8n098862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Leandro Lupori Subject: git: b9f3b63ab21e - main - vt: export RGB offsets with FBIO_GETRGBOFFS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: luporl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9f3b63ab21ed5d1288de1acff511eb733201139 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637869212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0UF8wRd4VZA5RVx+DFR4TIEN5XJ6b/WKXscXYVFz3Cw=; b=yA+jsVVBdAMbQNDnkhvtCrlI8l7YESpmPCiQp0M6LQdSI5ruFW689ua1oqEy40vZddyp+u AC6tXxvezoGM6C8Yd4ar8duPWBYJQWg21lZpzR78xeWVKTUM3u4yxk25pXbQLSmcCgbhg5 +Mqk5idXk+27b6ljVRFTMuPrxxEV9vsDDISEk83kgaiJrgkj9gk9QnMTajGBgwTdc7xNql PHZWn7Grumf1NrV2yncwCg9sKxhpAeJ3RWTbY0IPo/tqQhfqcuOf4SeRLza78n/5Zm5lW1 f7Yb9CTdw+QRScDHtV7n4FJI/M+QYtzkJnOKlCG2EyrCjwEaJWjTlVpVX7BAiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637869212; a=rsa-sha256; cv=none; b=ZJkj0qdv6GB1utBfK28/k8QYCw8GOIBqpzL0F0HD0mACaVXJTJ0aQYv5ZaChjbNWEUTl+J G8BZrg5lveiPrATWzYSmp1ERLpQjN9Fve+xG9EucvLybtKQhuj/GdgpbhLYFfbNWuboHEW NK3FM8QBrncAd3qdHrPl+f+LM3CEGwBjRKom0FBHX3gGPmRzBEWSWhmDOZf/LGQ0V6DQXV q2/oiBlHMdX5EjIvCHizxRWhkVkqCKUIgb7DV7czt7RKc3jLD/ergESX9SezblwnmmJPUs q7nmLh7mHjAXRKG4+gG7LPSt54V28oUpBHrfPa2muK/Ql0IU5ae8s0bKe0cpJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by luporl: URL: https://cgit.FreeBSD.org/src/commit/?id=b9f3b63ab21ed5d1288de1acff511eb733201139 commit b9f3b63ab21ed5d1288de1acff511eb733201139 Author: Leandro Lupori AuthorDate: 2021-11-25 18:54:11 +0000 Commit: Leandro Lupori CommitDate: 2021-11-25 19:39:25 +0000 vt: export RGB offsets with FBIO_GETRGBOFFS Add a new ioctl to vt to make it possible to export RGB offsets set by vt drivers. This is needed to fix colors on X and Mesa on some machines, especially on modern PowerPC64 BE ones. With the appropriate changes in SCFB, to use this ioctl to find out the correct RGB offsets, this fixes wrong colors on Talos II and Blackbird, when used with their built-in video cards. Reviewed by: alfredo Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D29000 --- sys/arm/broadcom/bcm2835/bcm2835_fbd.c | 4 ++-- sys/arm/freescale/imx/imx51_ipuv3_fbd.c | 14 +++++++------- sys/dev/vt/colors/vt_termcolors.c | 18 +++++++++++++++++- sys/dev/vt/colors/vt_termcolors.h | 6 ++++-- sys/dev/vt/hw/efifb/efifb.c | 2 +- sys/dev/vt/hw/fb/vt_early_fb.c | 10 +++++----- sys/dev/vt/hw/fb/vt_fb.c | 22 +++++++++++++++------- sys/dev/vt/hw/ofwfb/ofwfb.c | 18 ++++++++---------- sys/dev/vt/hw/vbefb/vbefb.c | 2 +- sys/dev/vt/vt_core.c | 1 + sys/powerpc/ps3/ps3_syscons.c | 2 +- sys/sys/fbio.h | 14 ++++++++++++++ 12 files changed, 76 insertions(+), 37 deletions(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_fbd.c b/sys/arm/broadcom/bcm2835/bcm2835_fbd.c index 93849b3551d9..c148235e5c33 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_fbd.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_fbd.c @@ -137,12 +137,12 @@ bcm_fb_setup_fbd(struct bcmsc_softc *sc) if (sc->fbswap) { switch (sc->info.fb_bpp) { case 24: - vt_generate_cons_palette(sc->info.fb_cmap, + vt_config_cons_colors(&sc->info, COLOR_FORMAT_RGB, 0xff, 0, 0xff, 8, 0xff, 16); sc->info.fb_cmsize = 16; break; case 32: - vt_generate_cons_palette(sc->info.fb_cmap, + vt_config_cons_colors(&sc->info, COLOR_FORMAT_RGB, 0xff, 16, 0xff, 8, 0xff, 0); sc->info.fb_cmsize = 16; break; diff --git a/sys/arm/freescale/imx/imx51_ipuv3_fbd.c b/sys/arm/freescale/imx/imx51_ipuv3_fbd.c index 644664fa8aa3..be1526228bf4 100644 --- a/sys/arm/freescale/imx/imx51_ipuv3_fbd.c +++ b/sys/arm/freescale/imx/imx51_ipuv3_fbd.c @@ -156,22 +156,22 @@ ipu3_fb_init(struct ipu3sc_softc *sc) /* Use own color map, because of different RGB offset. */ static int -ipu3_fb_init_cmap(uint32_t *cmap, int bytespp) +ipu3_fb_init_colors(struct fb_info *info) { - switch (bytespp) { + switch (info->fb_depth) { case 8: - return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, + return (vt_config_cons_colors(info, COLOR_FORMAT_RGB, 0x7, 5, 0x7, 2, 0x3, 0)); case 15: - return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, + return (vt_config_cons_colors(info, COLOR_FORMAT_RGB, 0x1f, 10, 0x1f, 5, 0x1f, 0)); case 16: - return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, + return (vt_config_cons_colors(info, COLOR_FORMAT_RGB, 0x1f, 11, 0x3f, 5, 0x1f, 0)); case 24: case 32: /* Ignore alpha. */ - return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, + return (vt_config_cons_colors(info, COLOR_FORMAT_RGB, 0xff, 0, 0xff, 8, 0xff, 16)); default: return (1); @@ -303,7 +303,7 @@ ipu3_fb_attach(device_t dev) sc->sc_info.fb_name = device_get_nameunit(dev); - ipu3_fb_init_cmap(sc->sc_info.fb_cmap, sc->sc_info.fb_depth); + ipu3_fb_init_colors(&sc->sc_info); sc->sc_info.fb_cmsize = 16; /* Ask newbus to attach framebuffer device to me. */ diff --git a/sys/dev/vt/colors/vt_termcolors.c b/sys/dev/vt/colors/vt_termcolors.c index dff276a86100..fe340eeae518 100644 --- a/sys/dev/vt/colors/vt_termcolors.c +++ b/sys/dev/vt/colors/vt_termcolors.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -152,7 +153,7 @@ vt_palette_init(void) } } -int +static int vt_generate_cons_palette(uint32_t *palette, int format, uint32_t rmax, int roffset, uint32_t gmax, int goffset, uint32_t bmax, int boffset) { @@ -176,3 +177,18 @@ vt_generate_cons_palette(uint32_t *palette, int format, uint32_t rmax, return (0); } + +int +vt_config_cons_colors(struct fb_info *info, int format, uint32_t rmax, + int roffset, uint32_t gmax, int goffset, uint32_t bmax, int boffset) +{ + if (format == COLOR_FORMAT_RGB) { + info->fb_rgboffs.red = roffset; + info->fb_rgboffs.green = goffset; + info->fb_rgboffs.blue = boffset; + } else + memset(&info->fb_rgboffs, 0, sizeof(info->fb_rgboffs)); + + return (vt_generate_cons_palette(info->fb_cmap, format, rmax, + roffset, gmax, goffset, bmax, boffset)); +} diff --git a/sys/dev/vt/colors/vt_termcolors.h b/sys/dev/vt/colors/vt_termcolors.h index 3fc99ee9743f..32521eebaf31 100644 --- a/sys/dev/vt/colors/vt_termcolors.h +++ b/sys/dev/vt/colors/vt_termcolors.h @@ -30,6 +30,8 @@ * $FreeBSD$ */ +struct fb_info; + enum vt_color_format { COLOR_FORMAT_BW = 0, COLOR_FORMAT_GRAY, @@ -57,6 +59,6 @@ static const int cons_to_vga_colors[NCOLORS] = { 8, 12, 10, 14, 9, 13, 11, 15 }; -/* Helper to fill color map used by driver */ -int vt_generate_cons_palette(uint32_t *palette, int format, uint32_t rmax, +/* Helper to fill color map and set RGB offsets used by driver */ +int vt_config_cons_colors(struct fb_info *info, int format, uint32_t rmax, int roffset, uint32_t gmax, int goffset, uint32_t bmax, int boffset); diff --git a/sys/dev/vt/hw/efifb/efifb.c b/sys/dev/vt/hw/efifb/efifb.c index e4deb1b9d9e5..de361ea45b97 100644 --- a/sys/dev/vt/hw/efifb/efifb.c +++ b/sys/dev/vt/hw/efifb/efifb.c @@ -131,7 +131,7 @@ vt_efifb_init(struct vt_device *vd) roff = ffs(efifb->fb_mask_red) - 1; goff = ffs(efifb->fb_mask_green) - 1; boff = ffs(efifb->fb_mask_blue) - 1; - vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, + vt_config_cons_colors(info, COLOR_FORMAT_RGB, efifb->fb_mask_red >> roff, roff, efifb->fb_mask_green >> goff, goff, efifb->fb_mask_blue >> boff, boff); diff --git a/sys/dev/vt/hw/fb/vt_early_fb.c b/sys/dev/vt/hw/fb/vt_early_fb.c index 9d9635835202..e3dace2d5092 100644 --- a/sys/dev/vt/hw/fb/vt_early_fb.c +++ b/sys/dev/vt/hw/fb/vt_early_fb.c @@ -93,24 +93,24 @@ vt_efb_initialize(struct fb_info *info) */ switch (info->fb_depth) { case 8: - vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, + vt_config_cons_colors(info, COLOR_FORMAT_RGB, 0x7, 5, 0x7, 2, 0x3, 0); break; case 15: - vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, + vt_config_cons_colors(info, COLOR_FORMAT_RGB, 0x1f, 10, 0x1f, 5, 0x1f, 0); break; case 16: - vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, + vt_config_cons_colors(info, COLOR_FORMAT_RGB, 0x1f, 11, 0x3f, 5, 0x1f, 0); break; case 24: case 32: #if BYTE_ORDER == BIG_ENDIAN - vt_generate_cons_palette(info->fb_cmap, + vt_config_cons_colors(info, COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); #else - vt_generate_cons_palette(info->fb_cmap, + vt_config_cons_colors(info, COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); #endif #ifdef FDT diff --git a/sys/dev/vt/hw/fb/vt_fb.c b/sys/dev/vt/hw/fb/vt_fb.c index 2f6c4c3939d5..093bf35ac6ba 100644 --- a/sys/dev/vt/hw/fb/vt_fb.c +++ b/sys/dev/vt/hw/fb/vt_fb.c @@ -120,6 +120,14 @@ vt_fb_ioctl(struct vt_device *vd, u_long cmd, caddr_t data, struct thread *td) vd->vd_driver->vd_blank(vd, TC_BLACK); break; + case FBIO_GETRGBOFFS: /* get RGB offsets */ + if (info->fb_rgboffs.red == 0 && info->fb_rgboffs.green == 0 && + info->fb_rgboffs.blue == 0) + return (ENOTTY); + memcpy((struct fb_rgboffs *)data, &info->fb_rgboffs, + sizeof(struct fb_rgboffs)); + break; + default: error = ENOIOCTL; break; @@ -432,22 +440,22 @@ vt_fb_postswitch(struct vt_device *vd) } static int -vt_fb_init_cmap(uint32_t *cmap, int depth) +vt_fb_init_colors(struct fb_info *info) { - switch (depth) { + switch (FBTYPE_GET_BPP(info)) { case 8: - return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, + return (vt_config_cons_colors(info, COLOR_FORMAT_RGB, 0x7, 5, 0x7, 2, 0x3, 0)); case 15: - return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, + return (vt_config_cons_colors(info, COLOR_FORMAT_RGB, 0x1f, 10, 0x1f, 5, 0x1f, 0)); case 16: - return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, + return (vt_config_cons_colors(info, COLOR_FORMAT_RGB, 0x1f, 11, 0x3f, 5, 0x1f, 0)); case 24: case 32: /* Ignore alpha. */ - return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, + return (vt_config_cons_colors(info, COLOR_FORMAT_RGB, 0xff, 16, 0xff, 8, 0xff, 0)); default: return (1); @@ -478,7 +486,7 @@ vt_fb_init(struct vt_device *vd) info->fb_flags |= FB_FLAG_NOMMAP; if (info->fb_cmsize <= 0) { - err = vt_fb_init_cmap(info->fb_cmap, FBTYPE_GET_BPP(info)); + err = vt_fb_init_colors(info); if (err) return (CN_DEAD); info->fb_cmsize = 16; diff --git a/sys/dev/vt/hw/ofwfb/ofwfb.c b/sys/dev/vt/hw/ofwfb/ofwfb.c index e388356450d6..4f24c471be1b 100644 --- a/sys/dev/vt/hw/ofwfb/ofwfb.c +++ b/sys/dev/vt/hw/ofwfb/ofwfb.c @@ -400,7 +400,7 @@ static void ofwfb_initialize(struct vt_device *vd) { struct ofwfb_softc *sc = vd->vd_softc; - int i, err; + int i, err, r, g, b; cell_t retval; sc->fb.fb_cmsize = 16; @@ -419,7 +419,7 @@ ofwfb_initialize(struct vt_device *vd) * No color format issues here, since we are passing the RGB * components separately to Open Firmware. */ - vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, 255, + vt_config_cons_colors(&sc->fb, COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); for (i = 0; i < 16; i++) { @@ -457,19 +457,17 @@ ofwfb_initialize(struct vt_device *vd) TUNABLE_INT_FETCH("hw.ofwfb.argb32_pixel", &sc->argb); if (sc->endian_flip) { if (sc->argb) - vt_generate_cons_palette(sc->fb.fb_cmap, - COLOR_FORMAT_RGB, 255, 8, 255, 16, 255, 24); + r = 8, g = 16, b = 24; else - vt_generate_cons_palette(sc->fb.fb_cmap, - COLOR_FORMAT_RGB, 255, 24, 255, 16, 255, 8); + r = 24, g = 16, b = 8; } else { if (sc->argb) - vt_generate_cons_palette(sc->fb.fb_cmap, - COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); + r = 16, g = 8, b = 0; else - vt_generate_cons_palette(sc->fb.fb_cmap, - COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); + r = 0, g = 8, b = 16; } + vt_config_cons_colors(&sc->fb, + COLOR_FORMAT_RGB, 255, r, 255, g, 255, b); break; default: diff --git a/sys/dev/vt/hw/vbefb/vbefb.c b/sys/dev/vt/hw/vbefb/vbefb.c index 2e8fe8330e56..569a40eb7d95 100644 --- a/sys/dev/vt/hw/vbefb/vbefb.c +++ b/sys/dev/vt/hw/vbefb/vbefb.c @@ -135,7 +135,7 @@ vt_vbefb_init(struct vt_device *vd) roff = ffs(vbefb->fb_mask_red) - 1; goff = ffs(vbefb->fb_mask_green) - 1; boff = ffs(vbefb->fb_mask_blue) - 1; - vt_generate_cons_palette(info->fb_cmap, format, + vt_config_cons_colors(info, format, vbefb->fb_mask_red >> roff, roff, vbefb->fb_mask_green >> goff, goff, vbefb->fb_mask_blue >> boff, boff); diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 0fab05ff4096..4ce3a48be288 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -2559,6 +2559,7 @@ skip_thunk: case FBIO_GETDISPSTART: /* get display start address */ case FBIO_GETLINEWIDTH: /* get scan line width in bytes */ case FBIO_BLANK: /* blank display */ + case FBIO_GETRGBOFFS: /* get RGB offsets */ if (vd->vd_driver->vd_fb_ioctl) return (vd->vd_driver->vd_fb_ioctl(vd, cmd, data, td)); break; diff --git a/sys/powerpc/ps3/ps3_syscons.c b/sys/powerpc/ps3/ps3_syscons.c index ed339f199746..30b6ff9bc8a2 100644 --- a/sys/powerpc/ps3/ps3_syscons.c +++ b/sys/powerpc/ps3/ps3_syscons.c @@ -228,7 +228,7 @@ ps3fb_init(struct vt_device *vd) sc->fb_info.fb_cmsize = 16; /* 32-bit VGA palette */ - vt_generate_cons_palette(sc->fb_info.fb_cmap, COLOR_FORMAT_RGB, + vt_config_cons_colors(&sc->fb_info, COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); /* Set correct graphics context */ diff --git a/sys/sys/fbio.h b/sys/sys/fbio.h index 3b47b11345cf..c44774a766a0 100644 --- a/sys/sys/fbio.h +++ b/sys/sys/fbio.h @@ -110,6 +110,15 @@ struct fbtype { #define FBTYPE_GET_BPP(_fb) ((_fb)->fb_bpp) #define FBTYPE_GET_BYTESPP(_fb) ((_fb)->fb_bpp / 8) +/* + * RGB offsets as returned by FBIO_GETRGBOFFS. + */ +struct fb_rgboffs { + int red; + int green; + int blue; +}; + #ifdef _KERNEL struct fb_info; @@ -148,6 +157,8 @@ struct fb_info { int fb_stride; int fb_bpp; /* bits per pixel */ uint32_t fb_cmap[16]; + + struct fb_rgboffs fb_rgboffs; /* RGB offsets */ }; int fbd_list(void); @@ -619,4 +630,7 @@ typedef struct video_color_palette video_color_palette_t; #define FBIO_BLANK _IOW('F', 115, int) +/* get RGB offsets */ +#define FBIO_GETRGBOFFS _IOR('F', 116, struct fb_rgboffs) + #endif /* !_SYS_FBIO_H_ */ From nobody Thu Nov 25 19:44:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5DD9118AAEEE; Thu, 25 Nov 2021 19:44: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 4J0SxZ00Lcz3H2c; Thu, 25 Nov 2021 19:44:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF69F233CC; Thu, 25 Nov 2021 19:44: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 1APJiHcN008052; Thu, 25 Nov 2021 19:44:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APJiHrf008051; Thu, 25 Nov 2021 19:44:17 GMT (envelope-from git) Date: Thu, 25 Nov 2021 19:44:17 GMT Message-Id: <202111251944.1APJiHrf008051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Leandro Lupori Subject: git: e141b62d2088 - main - powerpc64le: fix boot when using QEMU PowerNV List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: luporl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e141b62d208867fc5bdb5803d05f5496260722ac Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637869458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wvy21LgeJ4vtioCBny/g6ukTPi0JNEEScpNTNRS5lgc=; b=rrc4/BlPNotmIS+hc/M5dcHTCm8XoYGryaPuw0r7gu4+nzu/iG7/3nuMuiF29RcGNIocRs jp9UqnQzVlIEhLefGQVUFdHIP87HZnYgjxP0Ha/A1Ey+Qphr7lXub+iiF7fXwOrcHLnbzd 9iJKAeLVPIgUTEDhy6ArrPeNZkLXiwKfslKAw1Ry5y/5E+6KWv0c0ZMH2FcjT3wqjBeqnd k/NCWdcjmkOilauWGyD0y89PuBQUngF0oGkQO7NwEqnzwstTr0HJo7WuTugyyndr0+sVqg 7z4cntslSDjYDLy/c0pilf++Paevur9pJLmuk0a65oKQztpzDGpRxngaGFQIlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637869458; a=rsa-sha256; cv=none; b=Zui1o3/hk/e8J8csoEIzo5LEjvCqDpkl3hHEMLuLfv393qnu1IuDQfpB7r/zBYYPMfBzPs EsGfvwlQ6kHZM1nqUrhV/wyh9AVIoNsbE68JPz6nRdgIiHrgK4YZ7CzDsyqK0u80Z/CHcL KMXfTscArqTXB7jzE+bEhpwRroBngZvo1e9fG8EldP8DHkJOFQHawCQJqvjVgZn39/Z01p Y7EnaRNgGLc+sD5VCmgM6/mcL1JwiaEVa9Bat5nJZrAMYryYCeBdbceeY9OemJGZcU72Ay 7zFnr4isWgIZ2RQToS5UMQlCIJJNy69gk6hMwRhtEER7zfO5IJ06zpfBVHTnvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by luporl: URL: https://cgit.FreeBSD.org/src/commit/?id=e141b62d208867fc5bdb5803d05f5496260722ac commit e141b62d208867fc5bdb5803d05f5496260722ac Author: Leandro Lupori AuthorDate: 2021-11-25 19:41:46 +0000 Commit: Leandro Lupori CommitDate: 2021-11-25 19:41:46 +0000 powerpc64le: fix boot when using QEMU PowerNV When using QEMU PowerNV with latest op-build release (v2.7), its kexec transfers control to FreeBSD kernel in BE mode, causing an instant exception on LE kernels. Make kboot able to detect and swap endian to fix this. Reviewed by: imp Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D33104 --- sys/powerpc/aim/locore64.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/powerpc/aim/locore64.S b/sys/powerpc/aim/locore64.S index f0a183c4b331..3eb6e546399c 100644 --- a/sys/powerpc/aim/locore64.S +++ b/sys/powerpc/aim/locore64.S @@ -82,6 +82,9 @@ TOC_ENTRY(trapstk) */ .section ".text.kboot", "x", @progbits kbootentry: +#ifdef __LITTLE_ENDIAN__ + RETURN_TO_NATIVE_ENDIAN +#endif b __start . = kbootentry + 0x40 /* Magic address used in platform layer */ .global smp_spin_sem From nobody Thu Nov 25 21:10:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 963B618B638E; Thu, 25 Nov 2021 21:10: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 4J0Vrk1gZ4z4XYk; Thu, 25 Nov 2021 21:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19A4824616; Thu, 25 Nov 2021 21:10: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 1APLAEaL020731; Thu, 25 Nov 2021 21:10:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APLAEj3020725; Thu, 25 Nov 2021 21:10:14 GMT (envelope-from git) Date: Thu, 25 Nov 2021 21:10:14 GMT Message-Id: <202111252110.1APLAEj3020725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: b6644f529ca4 - main - powerpc64: make autoboot possible on powernv machines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6644f529ca4c13975727c5625415fcc30c60af6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637874614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mCutRcKvCuq3vQABTYVp4rjLiVFvQLecfnnYuXQSquY=; b=VkLFqStp1pjB0TjIXxerIRrAsijqTqmXYvpNcpYKz5rMxxpx0BLFnnmgoAnHRh494ADL8j qKYBWE54I01bG0FWjG+8vO404f9hVXCiHrgwr2JmYQ3Ufr0nzuBTsp4z7F2J2FF7s9y7vB Fxk6DHz5JyVoaDRqNVVzP+6mjckwTRQHLWs9pwgLeq0jt+azGFWrucc6xxIjOsx8eqGfXC CzyOKqkq96WOShfbXI+JC3AnSzBQsmxh2fF38US0qgDwzCWbLXBTTeKRLTZJxQw6WEW7qD VjgYPVg3SdPS8gOIC6uUiY9qF9/fvmQvie8fXC2HQmQVKvLxtB/kJMuaogWGug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637874614; a=rsa-sha256; cv=none; b=uHKA1faKQ3c8DOQGKdbG6ziewZp7yRZaa3652O/N5lgGnHjj7H4Q9EmLKqQBH1dYv0IDF+ 9fVlU69d5HAjB+tKfy0g8rkpryUlzbEdkblcpQhcV1IwyM70p6peVhWj67IJPwviLNAMCy GztKcwY4eQzXqhn+7yjrkBBeeLghYdGwr4Ez4gHTptkEwIJDrKsgLIjEdljR0QIwun8B8j zGYc+rIj/QR0kb4AeMeemU7pDHYwKTB73elcxnRu6eIiZ9N1/XnT8DXvg4pbneeguSgyBB zV6smKm93KUWI20WxXtAbKz5asawEIb5pGPw/k+E09bA8ougvnCrEcX6YGfqWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=b6644f529ca4c13975727c5625415fcc30c60af6 commit b6644f529ca4c13975727c5625415fcc30c60af6 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-11-26 00:02:53 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-11-26 00:02:53 +0000 powerpc64: make autoboot possible on powernv machines It's required to specify a default boot option in order to make petitboot's autoboot feature work. Tested on Raptor Blackbird Reviewed by: imp, luporl MFC after: 2 days Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D32838 --- usr.sbin/bsdinstall/scripts/bootconfig | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index c0a0ff4f77ee..c5218b10a271 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -27,6 +27,9 @@ # # $FreeBSD$ + +FREEBSD_BOOTLABEL="FreeBSD" + BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 @@ -41,8 +44,10 @@ if [ `uname -m` == powerpc ]; then platform=`sysctl -n hw.platform` if [ "$platform" == ps3 -o "$platform" == powernv ]; then rootpart=$(awk '{ if($2 == "/") printf("%s:%s\n", $3, $1); }' $PATH_FSTAB) + kboot_conf=$BSDINSTALL_CHROOT/boot/etc/kboot.conf mkdir -p $BSDINSTALL_CHROOT/boot/etc/ - echo FreeBSD=\'/kernel/kernel kernelname=/boot/kernel/kernel vfs.root.mountfrom=${rootpart}\' > $BSDINSTALL_CHROOT/boot/etc/kboot.conf + echo default=$FREEBSD_BOOTLABEL > $kboot_conf + echo $FREEBSD_BOOTLABEL=\'/kernel/kernel kernelname=/boot/kernel/kernel vfs.root.mountfrom=${rootpart}\' >> $kboot_conf fi fi @@ -81,11 +86,9 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${BOOTNAME}" fi - bootlabel="FreeBSD" - if [ "$BSDINSTALL_CONFIGCURRENT" ]; then f_dprintf "Creating UEFI boot entry" - efibootmgr --create --activate --label "$bootlabel" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null fi f_dprintf "Finished configuring ESP" From nobody Thu Nov 25 21:29:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9BD1818BF438; Thu, 25 Nov 2021 21: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 4J0WGb2M15z4f74; Thu, 25 Nov 2021 21:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30B8A249AF; Thu, 25 Nov 2021 21: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 1APLTBxS042674; Thu, 25 Nov 2021 21:29:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APLTBPV042673; Thu, 25 Nov 2021 21:29:11 GMT (envelope-from git) Date: Thu, 25 Nov 2021 21:29:11 GMT Message-Id: <202111252129.1APLTBPV042673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 8c12ee5021e2 - main - rk_spi: declare support for rk3328 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c12ee5021e293c992a7b54215fda1edfbebaa25 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637875751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KFoRqKYwJ6nBtBcIy+7xEdACii04e0VHrtZqr1JwX/0=; b=buEUPiXuDl2sO8zv1JUzGDT6JRO2hU9WQF/7JGFY+O1aqhcmxnC+4I3S2jQJu97k8Antel 0u1cKz3gDxh/ifXbi3sIHMqqZPOF817+bvhTF/PqS+9gyH4K7XwUwaKIjSPTdSWxf7veDN GyzkzH143Kq+MYkKMTxYfx9GG4Kpie9L4fqInMyjli4fjNVV5zlcqmJRdiEfILpzXtJAE8 y/eAlBr8ti1jVOr3fsyuvhCyZO8fMPacykKbhZMbtGxM05+hX20qsmwqm1k3NXRh8NhMl4 udjYEoPV8TUVA5SdrzlmOPnipD2J+4X0Oql5hwbGS7kOanteMHQSLa2qpvARzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637875751; a=rsa-sha256; cv=none; b=onI7SJH+tEO88vDxvnMz64bGOVi/WRuTIlmD7liFWc9gqg/rUyo0RgDnFI0MRE63Exkkh9 JZJCc3d7q1uQ/nn9GOqOcP/ZqQ2VXWEyzDDftaOwd3TLOEvRylVM/KjbeO6I9Prgk+95wO WpwYripdnRrPLjW5MCKNAfqWc53b89geJ6zypyfwkkEwE53QO9nsFYJupgA3DH/OaKRnLK eYZMQ9964p6dRpU/9c07ixer/G22J6WcKyfc+Cy69YLGDaAat2Ur4UyuH6OQCw0OjkxxZy urkZEKidYQX/NTdJH/q86P+slBxNZl4eAX1Mj/QRujvRXQV8HraGmTlFmXLQmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=8c12ee5021e293c992a7b54215fda1edfbebaa25 commit 8c12ee5021e293c992a7b54215fda1edfbebaa25 Author: Andriy Gapon AuthorDate: 2021-11-25 21:12:11 +0000 Commit: Andriy Gapon CommitDate: 2021-11-25 21:28:58 +0000 rk_spi: declare support for rk3328 Tested on Rock64 using the onboard SPI flash. MFC after: 1 week --- sys/arm64/rockchip/rk_spi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm64/rockchip/rk_spi.c b/sys/arm64/rockchip/rk_spi.c index 13e3abb80085..4df1208f40aa 100644 --- a/sys/arm64/rockchip/rk_spi.c +++ b/sys/arm64/rockchip/rk_spi.c @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #define CS_MAX 1 static struct ofw_compat_data compat_data[] = { + { "rockchip,rk3328-spi", 1 }, { "rockchip,rk3399-spi", 1 }, { NULL, 0 } }; From nobody Thu Nov 25 21:53:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 124E318A24AA; Thu, 25 Nov 2021 21:53:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0Wpx5KT7z4nZh; Thu, 25 Nov 2021 21:53:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9055624A78; Thu, 25 Nov 2021 21:53: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 1APLrjUY082515; Thu, 25 Nov 2021 21:53:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APLrjYg082514; Thu, 25 Nov 2021 21:53:45 GMT (envelope-from git) Date: Thu, 25 Nov 2021 21:53:45 GMT Message-Id: <202111252153.1APLrjYg082514@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: b11e6fd75b1b - main - link_elf_obj: Process global ifunc relocs after other global relocs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b11e6fd75b1bb9d337b0edab14d160ff65b11aae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637877225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0YerwoiloFDxbiZUW4ufVSjEFatrw7eitlGGcWfy29s=; b=W0JhvzhN+rhT/XmK2W5lE6mbHi+xgxV4fZlJXpfNsW+kPw9OMNMsFXN62dp/vP7rB05BaA rt7SHiyZfP8nfZ7gPyqqjc+TythDVceNQ7ryyrk+WBzTW+e0BeO+txbv3ONVlm32JBwGRS m9APLTeMA9pYoU18HHI++dQMI0s6K9ETRRcB6+Rt+xrQxt4UwDj0yoT09v0rG8B5Xm4ALB Rh3H+RchFgJ+pAIeAtSlaoUlcyMUQmB3kc33EuVYm1ZOPClPdjAJl8YE0gSp9ppfkvcIX7 qpKhTeVrk8D8SlRortXAeqOWjY3FPSGkna0jNrbAe++IQYwplt6yVDU1vBwa1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637877225; a=rsa-sha256; cv=none; b=Us4FbrHqLDae48RHSty62ydpOGfOLypoEEpmBa7myDg9sF3RgWlL0o/AztOiiZAnIzQbHt yw8xoLtPibRYzOor1Rpz6T8mnw8BZ/yU4qmTwBWPNrScJJbxL/5aKzahpoFNG/LVR6WbA9 CkxrLLwHeDCY/YdJgMhcYR7tukoemRNFci6gWrLfYZZdgRT4l9UslmGGHbWgoVXtaqF3B4 gkqdR2535WtzrcqrLyJrlvAJl3Mr3l4YeJB2iJq8/RYmd55a5jwpYlmTamKTWdO9xfSNCf pkrgIZVMPpiIcNdSEtYkFmwSNlbDw8CnTXDq86f5Rtvo2DmzPCOnoxDmn1OLJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b11e6fd75b1bb9d337b0edab14d160ff65b11aae commit b11e6fd75b1bb9d337b0edab14d160ff65b11aae Author: Mark Johnston AuthorDate: 2021-11-25 21:52:17 +0000 Commit: Mark Johnston CommitDate: 2021-11-25 21:53:27 +0000 link_elf_obj: Process global ifunc relocs after other global relocs This is needed to ensure that resolvers that reference global symbols return correct results. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33120 --- sys/kern/link_elf_obj.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 5c6db11e1937..bafbd9f4c616 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -1321,7 +1321,7 @@ findbase(elf_file_t ef, int sec) } static int -relocate_file(elf_file_t ef) +relocate_file1(elf_file_t ef, bool ifuncs) { const Elf_Rel *rellim; const Elf_Rel *rel; @@ -1354,6 +1354,9 @@ relocate_file(elf_file_t ef) /* Local relocs are already done */ if (ELF_ST_BIND(sym->st_info) == STB_LOCAL) continue; + if ((ELF_ST_TYPE(sym->st_info) == STT_GNU_IFUNC || + elf_is_ifunc_reloc(rel->r_info)) != ifuncs) + continue; if (elf_reloc(&ef->lf, base, rel, ELF_RELOC_REL, elf_obj_lookup)) { symname = symbol_name(ef, rel->r_info); @@ -1386,6 +1389,9 @@ relocate_file(elf_file_t ef) /* Local relocs are already done */ if (ELF_ST_BIND(sym->st_info) == STB_LOCAL) continue; + if ((ELF_ST_TYPE(sym->st_info) == STT_GNU_IFUNC || + elf_is_ifunc_reloc(rela->r_info)) != ifuncs) + continue; if (elf_reloc(&ef->lf, base, rela, ELF_RELOC_RELA, elf_obj_lookup)) { symname = symbol_name(ef, rela->r_info); @@ -1406,6 +1412,17 @@ relocate_file(elf_file_t ef) return (0); } +static int +relocate_file(elf_file_t ef) +{ + int error; + + error = relocate_file1(ef, false); + if (error == 0) + error = relocate_file1(ef, true); + return (error); +} + static int link_elf_lookup_symbol(linker_file_t lf, const char *name, c_linker_sym_t *sym) { From nobody Thu Nov 25 22:50:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0ADF518BE6CA; Thu, 25 Nov 2021 22:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0Y4m46pZz3NfJ; Thu, 25 Nov 2021 22:50:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68FE32567F; Thu, 25 Nov 2021 22:50: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 1APMomco060880; Thu, 25 Nov 2021 22:50:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APMom45060879; Thu, 25 Nov 2021 22:50:48 GMT (envelope-from git) Date: Thu, 25 Nov 2021 22:50:48 GMT Message-Id: <202111252250.1APMom45060879@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: af4051d25055 - main - linux: remove the always curthread argument from lconvpath List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: af4051d25055fee086c0f78421e68fec20640f17 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637880648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tqh6NtLSRp+xxtjlPgfaQjXyvyUTpWtT7QSpVtCx31E=; b=GVUQuxLDCa0V7YxQkHUI/auPcmHUnR3UucbfUBRsaOV5kwf7oB2uxiJR21HNmUEtUB1Dla C+Q8b1vEqXkY2nn0Oad4XwicvsfWNRmEz3Y6vvgMLyOYjlZ4vWvT7da6K2bl0wk0W9By0T ooD56jXC2euy5DHgdgM+sYAp84TpXQV6CoMPASN9pUGd8Zg0ssG3VOFJ25ecpNfH+EDgw0 P38Zxb2KYH5Hd/U00TbhMhyqhuxG4z3ZGs2oQqkaOVmnltpDD6GCS0tYiffQ1NYYqTT0Gs DiTsF9w6iepELBtY/FfHXkAhVoqYsvFpvCcYGb1vjz0mE1PyluN5m4IhaVicig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637880648; a=rsa-sha256; cv=none; b=rMPI+Jh070bMn6OpgOXb9+1xiad2ApLiUDHru6VKwO6xPNcr8RyTcf9oOyWGFx+CD6bVHj 2D5eSFKE9j8+KUIDwfbs/dBb6+qiIAKE0rzJL5zGvhugMh/B6hADpbPgqOzEtSPLgoG5ww c6NfEyaD1xOVwtO+nx+YSbgnknQFvQQLuRPzcCpLu0z3ZBpgL5Bm+KpnbUxS1Zzv+HLUL+ gNWtJdaWyiGfXgvo+HTb92dbqY3rT60mcQ8GrX4Obm3uYfU/mo4IjMEw/f105JkzophIwo MmaB/LM7GCIHAcrPwCAiHnFwp4OrWm/S0u3qULg4l5mTkiJ7tOKXo4e3TqyeOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=af4051d25055fee086c0f78421e68fec20640f17 commit af4051d25055fee086c0f78421e68fec20640f17 Author: Mateusz Guzik AuthorDate: 2021-11-25 21:42:13 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-25 22:50:42 +0000 linux: remove the always curthread argument from lconvpath --- sys/amd64/linux/linux_machdep.c | 2 +- sys/amd64/linux32/linux32_machdep.c | 2 +- sys/arm64/linux/linux_machdep.c | 2 +- sys/compat/linux/linux_emul.c | 5 ++- sys/compat/linux/linux_file.c | 70 ++++++++++++++++++------------------- sys/compat/linux/linux_misc.c | 14 ++++---- sys/compat/linux/linux_stats.c | 22 ++++++------ sys/compat/linux/linux_uid16.c | 4 +-- sys/compat/linux/linux_util.c | 4 +-- sys/compat/linux/linux_util.h | 18 +++++----- sys/i386/linux/linux_machdep.c | 2 +- 11 files changed, 72 insertions(+), 73 deletions(-) diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index 67429a1c049f..18be62dab9ae 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -111,7 +111,7 @@ linux_execve(struct thread *td, struct linux_execve_args *args) error = exec_copyin_args(&eargs, args->path, UIO_USERSPACE, args->argp, args->envp); } else { - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = exec_copyin_args(&eargs, path, UIO_SYSSPACE, args->argp, args->envp); LFREEPATH(path); diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index 86f7bdc918d8..9dd988452a1c 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -134,7 +134,7 @@ linux_execve(struct thread *td, struct linux_execve_args *args) char *path; int error; - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = freebsd32_exec_copyin_args(&eargs, path, UIO_SYSSPACE, args->argp, args->envp); diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c index 89b7099dc752..749e097730f7 100644 --- a/sys/arm64/linux/linux_machdep.c +++ b/sys/arm64/linux/linux_machdep.c @@ -74,7 +74,7 @@ linux_execve(struct thread *td, struct linux_execve_args *uap) error = exec_copyin_args(&eargs, uap->path, UIO_USERSPACE, uap->argp, uap->envp); } else { - LCONVPATHEXIST(td, uap->path, &path); + LCONVPATHEXIST(uap->path, &path); error = exec_copyin_args(&eargs, path, UIO_SYSSPACE, uap->argp, uap->envp); LFREEPATH(path); diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c index 83c82fc84fee..f99f31fb668b 100644 --- a/sys/compat/linux/linux_emul.c +++ b/sys/compat/linux/linux_emul.c @@ -238,9 +238,8 @@ linux_exec_imgact_try(struct image_params *imgp) * alternate path is found, use our stringspace to store it. */ if ((error = exec_shell_imgact(imgp)) == 0) { - linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), - imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0, - AT_FDCWD); + linux_emul_convpath(imgp->interpreter_name, UIO_SYSSPACE, + &rpath, 0, AT_FDCWD); if (rpath != NULL) imgp->args->fname_buf = imgp->interpreter_name = rpath; diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index bda843286b26..285faaf8927b 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -115,7 +115,7 @@ linux_creat(struct thread *td, struct linux_creat_args *args) return (kern_openat(td, AT_FDCWD, args->path, UIO_USERSPACE, O_WRONLY | O_CREAT | O_TRUNC, args->mode)); } - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, O_WRONLY | O_CREAT | O_TRUNC, args->mode); LFREEPATH(path); @@ -234,9 +234,9 @@ linux_openat(struct thread *td, struct linux_openat_args *args) args->mode, UIO_USERSPACE)); } if (args->flags & LINUX_O_CREAT) - LCONVPATH_AT(td, args->filename, &path, 1, dfd); + LCONVPATH_AT(args->filename, &path, 1, dfd); else - LCONVPATH_AT(td, args->filename, &path, 0, dfd); + LCONVPATH_AT(args->filename, &path, 0, dfd); error = linux_common_open(td, dfd, path, args->flags, args->mode, UIO_SYSSPACE); @@ -256,9 +256,9 @@ linux_open(struct thread *td, struct linux_open_args *args) args->mode, UIO_USERSPACE)); } if (args->flags & LINUX_O_CREAT) - LCONVPATHCREAT(td, args->path, &path); + LCONVPATHCREAT(args->path, &path); else - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = linux_common_open(td, AT_FDCWD, path, args->flags, args->mode, UIO_SYSSPACE); @@ -299,7 +299,7 @@ linux_name_to_handle_at(struct thread *td, } else { char *path; - LCONVPATH_AT(td, args->name, &path, 0, fd); + LCONVPATH_AT(args->name, &path, 0, fd); error = kern_getfhat(td, bsd_flags, fd, path, UIO_SYSSPACE, &fh, UIO_SYSSPACE); LFREEPATH(path); @@ -665,7 +665,7 @@ linux_access(struct thread *td, struct linux_access_args *args) error = kern_accessat(td, AT_FDCWD, args->path, UIO_USERSPACE, 0, args->amode); } else { - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = kern_accessat(td, AT_FDCWD, path, UIO_SYSSPACE, 0, args->amode); LFREEPATH(path); @@ -690,7 +690,7 @@ linux_do_accessat(struct thread *td, int ldfd, const char *filename, if (!LUSECONVPATH(td)) { error = kern_accessat(td, dfd, filename, UIO_USERSPACE, flags, amode); } else { - LCONVPATHEXIST_AT(td, filename, &path, dfd); + LCONVPATHEXIST_AT(filename, &path, dfd); error = kern_accessat(td, dfd, path, UIO_SYSSPACE, flags, amode); LFREEPATH(path); } @@ -747,7 +747,7 @@ linux_unlink(struct thread *td, struct linux_unlink_args *args) } } } else { - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = kern_funlinkat(td, AT_FDCWD, path, FD_NONE, UIO_SYSSPACE, 0, 0); if (error == EPERM) { /* Introduce POSIX noncompliant behaviour of Linux */ @@ -797,7 +797,7 @@ linux_unlinkat(struct thread *td, struct linux_unlinkat_args *args) return (linux_unlinkat_impl(td, UIO_USERSPACE, args->pathname, dfd, args)); } - LCONVPATHEXIST_AT(td, args->pathname, &path, dfd); + LCONVPATHEXIST_AT(args->pathname, &path, dfd); error = linux_unlinkat_impl(td, UIO_SYSSPACE, path, dfd, args); LFREEPATH(path); return (error); @@ -811,7 +811,7 @@ linux_chdir(struct thread *td, struct linux_chdir_args *args) if (!LUSECONVPATH(td)) { return (kern_chdir(td, args->path, UIO_USERSPACE)); } - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = kern_chdir(td, path, UIO_SYSSPACE); LFREEPATH(path); return (error); @@ -828,7 +828,7 @@ linux_chmod(struct thread *td, struct linux_chmod_args *args) return (kern_fchmodat(td, AT_FDCWD, args->path, UIO_USERSPACE, args->mode, 0)); } - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = kern_fchmodat(td, AT_FDCWD, path, UIO_SYSSPACE, args->mode, 0); LFREEPATH(path); return (error); @@ -846,7 +846,7 @@ linux_fchmodat(struct thread *td, struct linux_fchmodat_args *args) return (kern_fchmodat(td, dfd, args->filename, UIO_USERSPACE, args->mode, 0)); } - LCONVPATHEXIST_AT(td, args->filename, &path, dfd); + LCONVPATHEXIST_AT(args->filename, &path, dfd); error = kern_fchmodat(td, dfd, path, UIO_SYSSPACE, args->mode, 0); LFREEPATH(path); return (error); @@ -862,7 +862,7 @@ linux_mkdir(struct thread *td, struct linux_mkdir_args *args) if (!LUSECONVPATH(td)) { return (kern_mkdirat(td, AT_FDCWD, args->path, UIO_USERSPACE, args->mode)); } - LCONVPATHCREAT(td, args->path, &path); + LCONVPATHCREAT(args->path, &path); error = kern_mkdirat(td, AT_FDCWD, path, UIO_SYSSPACE, args->mode); LFREEPATH(path); return (error); @@ -879,7 +879,7 @@ linux_mkdirat(struct thread *td, struct linux_mkdirat_args *args) if (!LUSECONVPATH(td)) { return (kern_mkdirat(td, dfd, args->pathname, UIO_USERSPACE, args->mode)); } - LCONVPATHCREAT_AT(td, args->pathname, &path, dfd); + LCONVPATHCREAT_AT(args->pathname, &path, dfd); error = kern_mkdirat(td, dfd, path, UIO_SYSSPACE, args->mode); LFREEPATH(path); return (error); @@ -896,7 +896,7 @@ linux_rmdir(struct thread *td, struct linux_rmdir_args *args) return (kern_frmdirat(td, AT_FDCWD, args->path, FD_NONE, UIO_USERSPACE, 0)); } - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = kern_frmdirat(td, AT_FDCWD, path, FD_NONE, UIO_SYSSPACE, 0); LFREEPATH(path); return (error); @@ -912,9 +912,9 @@ linux_rename(struct thread *td, struct linux_rename_args *args) return (kern_renameat(td, AT_FDCWD, args->from, AT_FDCWD, args->to, UIO_USERSPACE)); } - LCONVPATHEXIST(td, args->from, &from); + LCONVPATHEXIST(args->from, &from); /* Expand LCONVPATHCREATE so that `from' can be freed on errors */ - error = linux_emul_convpath(td, args->to, UIO_USERSPACE, &to, 1, AT_FDCWD); + error = linux_emul_convpath(args->to, UIO_USERSPACE, &to, 1, AT_FDCWD); if (to == NULL) { LFREEPATH(from); return (error); @@ -973,9 +973,9 @@ linux_renameat2(struct thread *td, struct linux_renameat2_args *args) return (kern_renameat(td, olddfd, args->oldname, newdfd, args->newname, UIO_USERSPACE)); } - LCONVPATHEXIST_AT(td, args->oldname, &from, olddfd); + LCONVPATHEXIST_AT(args->oldname, &from, olddfd); /* Expand LCONVPATHCREATE so that `from' can be freed on errors */ - error = linux_emul_convpath(td, args->newname, UIO_USERSPACE, &to, 1, newdfd); + error = linux_emul_convpath(args->newname, UIO_USERSPACE, &to, 1, newdfd); if (to == NULL) { LFREEPATH(from); return (error); @@ -997,9 +997,9 @@ linux_symlink(struct thread *td, struct linux_symlink_args *args) return (kern_symlinkat(td, args->path, AT_FDCWD, args->to, UIO_USERSPACE)); } - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ - error = linux_emul_convpath(td, args->to, UIO_USERSPACE, &to, 1, AT_FDCWD); + error = linux_emul_convpath(args->to, UIO_USERSPACE, &to, 1, AT_FDCWD); if (to == NULL) { LFREEPATH(path); return (error); @@ -1022,9 +1022,9 @@ linux_symlinkat(struct thread *td, struct linux_symlinkat_args *args) return (kern_symlinkat(td, args->oldname, dfd, args->newname, UIO_USERSPACE)); } - LCONVPATHEXIST(td, args->oldname, &path); + LCONVPATHEXIST(args->oldname, &path); /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ - error = linux_emul_convpath(td, args->newname, UIO_USERSPACE, &to, 1, dfd); + error = linux_emul_convpath(args->newname, UIO_USERSPACE, &to, 1, dfd); if (to == NULL) { LFREEPATH(path); return (error); @@ -1046,7 +1046,7 @@ linux_readlink(struct thread *td, struct linux_readlink_args *args) return (kern_readlinkat(td, AT_FDCWD, args->name, UIO_USERSPACE, args->buf, UIO_USERSPACE, args->count)); } - LCONVPATHEXIST(td, args->name, &name); + LCONVPATHEXIST(args->name, &name); error = kern_readlinkat(td, AT_FDCWD, name, UIO_SYSSPACE, args->buf, UIO_USERSPACE, args->count); LFREEPATH(name); @@ -1065,7 +1065,7 @@ linux_readlinkat(struct thread *td, struct linux_readlinkat_args *args) return (kern_readlinkat(td, dfd, args->path, UIO_USERSPACE, args->buf, UIO_USERSPACE, args->bufsiz)); } - LCONVPATHEXIST_AT(td, args->path, &name, dfd); + LCONVPATHEXIST_AT(args->path, &name, dfd); error = kern_readlinkat(td, dfd, name, UIO_SYSSPACE, args->buf, UIO_USERSPACE, args->bufsiz); LFREEPATH(name); @@ -1081,7 +1081,7 @@ linux_truncate(struct thread *td, struct linux_truncate_args *args) if (!LUSECONVPATH(td)) { return (kern_truncate(td, args->path, UIO_USERSPACE, args->length)); } - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = kern_truncate(td, path, UIO_SYSSPACE, args->length); LFREEPATH(path); return (error); @@ -1104,7 +1104,7 @@ linux_truncate64(struct thread *td, struct linux_truncate64_args *args) if (!LUSECONVPATH(td)) { return (kern_truncate(td, args->path, UIO_USERSPACE, length)); } - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = kern_truncate(td, path, UIO_SYSSPACE, length); LFREEPATH(path); return (error); @@ -1145,9 +1145,9 @@ linux_link(struct thread *td, struct linux_link_args *args) return (kern_linkat(td, AT_FDCWD, AT_FDCWD, args->path, args->to, UIO_USERSPACE, AT_SYMLINK_FOLLOW)); } - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ - error = linux_emul_convpath(td, args->to, UIO_USERSPACE, &to, 1, AT_FDCWD); + error = linux_emul_convpath(args->to, UIO_USERSPACE, &to, 1, AT_FDCWD); if (to == NULL) { LFREEPATH(path); return (error); @@ -1179,9 +1179,9 @@ linux_linkat(struct thread *td, struct linux_linkat_args *args) return (kern_linkat(td, olddfd, newdfd, args->oldname, args->newname, UIO_USERSPACE, flag)); } - LCONVPATHEXIST_AT(td, args->oldname, &path, olddfd); + LCONVPATHEXIST_AT(args->oldname, &path, olddfd); /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ - error = linux_emul_convpath(td, args->newname, UIO_USERSPACE, &to, 1, newdfd); + error = linux_emul_convpath(args->newname, UIO_USERSPACE, &to, 1, newdfd); if (to == NULL) { LFREEPATH(path); return (error); @@ -1775,7 +1775,7 @@ linux_chown(struct thread *td, struct linux_chown_args *args) return (kern_fchownat(td, AT_FDCWD, args->path, UIO_USERSPACE, args->uid, args->gid, 0)); } - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, args->uid, args->gid, 0); LFREEPATH(path); @@ -1805,7 +1805,7 @@ linux_fchownat(struct thread *td, struct linux_fchownat_args *args) return (kern_fchownat(td, dfd, args->filename, UIO_USERSPACE, args->uid, args->gid, flag)); } - LCONVPATHEXIST_AT(td, args->filename, &path, dfd); + LCONVPATHEXIST_AT(args->filename, &path, dfd); error = kern_fchownat(td, dfd, path, UIO_SYSSPACE, args->uid, args->gid, flag); LFREEPATH(path); @@ -1823,7 +1823,7 @@ linux_lchown(struct thread *td, struct linux_lchown_args *args) return (kern_fchownat(td, AT_FDCWD, args->path, UIO_USERSPACE, args->uid, args->gid, AT_SYMLINK_NOFOLLOW)); } - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, args->uid, args->gid, AT_SYMLINK_NOFOLLOW); LFREEPATH(path); diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 589ad911266f..7960f8b80fa1 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -279,7 +279,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) UIO_USERSPACE, args->library, td); error = namei(&ni); } else { - LCONVPATHEXIST(td, args->library, &library); + LCONVPATHEXIST(args->library, &library); NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_SYSSPACE, library, td); error = namei(&ni); @@ -759,7 +759,7 @@ linux_utime(struct thread *td, struct linux_utime_args *args) error = kern_utimesat(td, AT_FDCWD, args->fname, UIO_USERSPACE, tvp, UIO_SYSSPACE); } else { - LCONVPATHEXIST(td, args->fname, &fname); + LCONVPATHEXIST(args->fname, &fname); error = kern_utimesat(td, AT_FDCWD, fname, UIO_SYSSPACE, tvp, UIO_SYSSPACE); LFREEPATH(fname); @@ -791,7 +791,7 @@ linux_utimes(struct thread *td, struct linux_utimes_args *args) error = kern_utimesat(td, AT_FDCWD, args->fname, UIO_USERSPACE, tvp, UIO_SYSSPACE); } else { - LCONVPATHEXIST(td, args->fname, &fname); + LCONVPATHEXIST(args->fname, &fname); error = kern_utimesat(td, AT_FDCWD, fname, UIO_SYSSPACE, tvp, UIO_SYSSPACE); LFREEPATH(fname); @@ -859,7 +859,7 @@ linux_common_utimensat(struct thread *td, int ldfd, const char *pathname, } if (pathname != NULL) - LCONVPATHEXIST_AT(td, pathname, &path, dfd); + LCONVPATHEXIST_AT(pathname, &path, dfd); else if (lflags != 0) return (EINVAL); @@ -978,7 +978,7 @@ linux_futimesat(struct thread *td, struct linux_futimesat_args *args) error = kern_utimesat(td, dfd, args->filename, UIO_USERSPACE, tvp, UIO_SYSSPACE); } else { - LCONVPATHEXIST_AT(td, args->filename, &fname, dfd); + LCONVPATHEXIST_AT(args->filename, &fname, dfd); error = kern_utimesat(td, dfd, fname, UIO_SYSSPACE, tvp, UIO_SYSSPACE); LFREEPATH(fname); @@ -1152,7 +1152,7 @@ linux_mknod(struct thread *td, struct linux_mknod_args *args) path = args->path; seg = UIO_USERSPACE; } else { - LCONVPATHCREAT(td, args->path, &path); + LCONVPATHCREAT(args->path, &path); seg = UIO_SYSSPACE; } @@ -1208,7 +1208,7 @@ linux_mknodat(struct thread *td, struct linux_mknodat_args *args) path = __DECONST(char *, args->filename); seg = UIO_USERSPACE; } else { - LCONVPATHCREAT_AT(td, args->filename, &path, dfd); + LCONVPATHCREAT_AT(args->filename, &path, dfd); seg = UIO_SYSSPACE; } diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 97bace941943..9dc7686cb963 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -241,7 +241,7 @@ linux_newstat(struct thread *td, struct linux_newstat_args *args) if (!LUSECONVPATH(td)) { error = linux_kern_stat(td, args->path, UIO_USERSPACE, &buf); } else { - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = linux_kern_stat(td, path, UIO_SYSSPACE, &buf); LFREEPATH(path); } @@ -260,7 +260,7 @@ linux_newlstat(struct thread *td, struct linux_newlstat_args *args) if (!LUSECONVPATH(td)) { error = linux_kern_lstat(td, args->path, UIO_USERSPACE, &sb); } else { - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = linux_kern_lstat(td, path, UIO_SYSSPACE, &sb); LFREEPATH(path); } @@ -323,7 +323,7 @@ linux_stat(struct thread *td, struct linux_stat_args *args) if (!LUSECONVPATH(td)) { error = linux_kern_stat(td, args->path, UIO_USERSPACE, &buf); } else { - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = linux_kern_stat(td, path, UIO_SYSSPACE, &buf); LFREEPATH(path); } @@ -343,7 +343,7 @@ linux_lstat(struct thread *td, struct linux_lstat_args *args) if (!LUSECONVPATH(td)) { error = linux_kern_lstat(td, args->path, UIO_USERSPACE, &buf); } else { - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); error = linux_kern_lstat(td, path, UIO_SYSSPACE, &buf); LFREEPATH(path); } @@ -455,7 +455,7 @@ linux_statfs(struct thread *td, struct linux_statfs_args *args) bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); error = kern_statfs(td, args->path, UIO_USERSPACE, bsd_statfs); } else { - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); error = kern_statfs(td, path, UIO_SYSSPACE, bsd_statfs); LFREEPATH(path); @@ -503,7 +503,7 @@ linux_statfs64(struct thread *td, struct linux_statfs64_args *args) bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); error = kern_statfs(td, args->path, UIO_USERSPACE, bsd_statfs); } else { - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); error = kern_statfs(td, path, UIO_SYSSPACE, bsd_statfs); LFREEPATH(path); @@ -617,7 +617,7 @@ linux_stat64(struct thread *td, struct linux_stat64_args *args) if (!LUSECONVPATH(td)) { error = linux_kern_stat(td, args->filename, UIO_USERSPACE, &buf); } else { - LCONVPATHEXIST(td, args->filename, &filename); + LCONVPATHEXIST(args->filename, &filename); error = linux_kern_stat(td, filename, UIO_SYSSPACE, &buf); LFREEPATH(filename); } @@ -636,7 +636,7 @@ linux_lstat64(struct thread *td, struct linux_lstat64_args *args) if (!LUSECONVPATH(td)) { error = linux_kern_lstat(td, args->filename, UIO_USERSPACE, &sb); } else { - LCONVPATHEXIST(td, args->filename, &filename); + LCONVPATHEXIST(args->filename, &filename); error = linux_kern_lstat(td, filename, UIO_SYSSPACE, &sb); LFREEPATH(filename); } @@ -681,7 +681,7 @@ linux_fstatat64(struct thread *td, struct linux_fstatat64_args *args) error = linux_kern_statat(td, flag, dfd, args->pathname, UIO_USERSPACE, &buf); } else { - LCONVPATHEXIST_AT(td, args->pathname, &path, dfd); + LCONVPATHEXIST_AT(args->pathname, &path, dfd); error = linux_kern_statat(td, flag, dfd, path, UIO_SYSSPACE, &buf); LFREEPATH(path); } @@ -716,7 +716,7 @@ linux_newfstatat(struct thread *td, struct linux_newfstatat_args *args) error = linux_kern_statat(td, flag, dfd, args->pathname, UIO_USERSPACE, &buf); } else { - LCONVPATHEXIST_AT(td, args->pathname, &path, dfd); + LCONVPATHEXIST_AT(args->pathname, &path, dfd); error = linux_kern_statat(td, flag, dfd, path, UIO_SYSSPACE, &buf); LFREEPATH(path); } @@ -790,7 +790,7 @@ linux_statx(struct thread *td, struct linux_statx_args *args) error = linux_kern_statat(td, flags, dirfd, args->pathname, UIO_USERSPACE, &buf); } else { - LCONVPATHEXIST_AT(td, args->pathname, &path, dirfd); + LCONVPATHEXIST_AT(args->pathname, &path, dirfd); error = linux_kern_statat(td, flags, dirfd, path, UIO_SYSSPACE, &buf); LFREEPATH(path); } diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index 5d0bfdde083c..4dd4129cfa0b 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -84,7 +84,7 @@ linux_chown16(struct thread *td, struct linux_chown16_args *args) error = kern_fchownat(td, AT_FDCWD, args->path, UIO_USERSPACE, CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), 0); } else { - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); /* * The DTrace probes have to be after the LCONVPATHEXIST, as * LCONVPATHEXIST may return on its own and we do not want to @@ -109,7 +109,7 @@ linux_lchown16(struct thread *td, struct linux_lchown16_args *args) error = kern_fchownat(td, AT_FDCWD, args->path, UIO_USERSPACE, CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), AT_SYMLINK_NOFOLLOW); } else { - LCONVPATHEXIST(td, args->path, &path); + LCONVPATHEXIST(args->path, &path); /* * The DTrace probes have to be after the LCONVPATHEXIST, as diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index eddfd4f28868..800a55be33df 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -90,12 +90,12 @@ SYSCTL_STRING(_compat_linux, OID_AUTO, emul_path, CTLFLAG_RWTUN, * named file, i.e. we check if the directory it should be in exists. */ int -linux_emul_convpath(struct thread *td, const char *path, enum uio_seg pathseg, +linux_emul_convpath(const char *path, enum uio_seg pathseg, char **pbuf, int cflag, int dfd) { int retval; - retval = kern_alternate_path(td, linux_emul_path, path, pathseg, pbuf, + retval = kern_alternate_path(curthread, linux_emul_path, path, pathseg, pbuf, cflag, dfd); return (retval); diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index 994efa88100f..621b99afbff3 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -51,27 +51,27 @@ MALLOC_DECLARE(M_EPOLL); extern char linux_emul_path[]; extern int linux_use_emul_path; -int linux_emul_convpath(struct thread *, const char *, enum uio_seg, char **, int, int); +int linux_emul_convpath(const char *, enum uio_seg, char **, int, int); #define LUSECONVPATH(td) atomic_load_int(&linux_use_emul_path) -#define LCONVPATH_AT(td, upath, pathp, i, dfd) \ +#define LCONVPATH_AT(upath, pathp, i, dfd) \ do { \ int _error; \ \ - _error = linux_emul_convpath(td, upath, UIO_USERSPACE, \ + _error = linux_emul_convpath(upath, UIO_USERSPACE, \ pathp, i, dfd); \ if (*(pathp) == NULL) \ return (_error); \ } while (0) -#define LCONVPATH(td, upath, pathp, i) \ - LCONVPATH_AT(td, upath, pathp, i, AT_FDCWD) +#define LCONVPATH(upath, pathp, i) \ + LCONVPATH_AT(upath, pathp, i, AT_FDCWD) -#define LCONVPATHEXIST(td, upath, pathp) LCONVPATH(td, upath, pathp, 0) -#define LCONVPATHEXIST_AT(td, upath, pathp, dfd) LCONVPATH_AT(td, upath, pathp, 0, dfd) -#define LCONVPATHCREAT(td, upath, pathp) LCONVPATH(td, upath, pathp, 1) -#define LCONVPATHCREAT_AT(td, upath, pathp, dfd) LCONVPATH_AT(td, upath, pathp, 1, dfd) +#define LCONVPATHEXIST(upath, pathp) LCONVPATH(upath, pathp, 0) +#define LCONVPATHEXIST_AT(upath, pathp, dfd) LCONVPATH_AT(upath, pathp, 0, dfd) +#define LCONVPATHCREAT(upath, pathp) LCONVPATH(upath, pathp, 1) +#define LCONVPATHCREAT_AT(upath, pathp, dfd) LCONVPATH_AT(upath, pathp, 1, dfd) #define LFREEPATH(path) free(path, M_TEMP) #define DUMMY(s) \ diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index c81bf1b4e2e5..dde11f22d4fe 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -108,7 +108,7 @@ linux_execve(struct thread *td, struct linux_execve_args *args) error = exec_copyin_args(&eargs, args->path, UIO_USERSPACE, args->argp, args->envp); } else { - LCONVPATHEXIST(td, args->path, &newpath); + LCONVPATHEXIST(args->path, &newpath); error = exec_copyin_args(&eargs, newpath, UIO_SYSSPACE, args->argp, args->envp); LFREEPATH(newpath); From nobody Thu Nov 25 22:50:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2260E18BE6DF; Thu, 25 Nov 2021 22:50: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 4J0Y4n5jDqz3Ncl; Thu, 25 Nov 2021 22:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C6EA25C84; Thu, 25 Nov 2021 22:50: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 1APMonAB060906; Thu, 25 Nov 2021 22:50:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APMonmd060905; Thu, 25 Nov 2021 22:50:49 GMT (envelope-from git) Date: Thu, 25 Nov 2021 22:50:49 GMT Message-Id: <202111252250.1APMonmd060905@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: c40fee6f7d26 - main - vfs: drop the always curthread argument from kern_alternate_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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c40fee6f7d26862260f0accc1dfeaa7b1328f5fd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637880649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PkrQU0n93dZxXgZMD/Kie4oaWbKFfRa+SSWS6eVeQD8=; b=bVLbfqhQPwb/BHUjILfKRyJZ3rV+UXlxBLK92IUrxyPWN0YjL3n98MmBKoWvw30IBtv0GY DheOgf0+6ZVoXQZd1JeZDFl18e8BJ9EbPVW6QewoNOTU8ghgf6OmRx4AotRtXPf7TIG3aP tWi/bc4Qcj8mTps0NJ+tx3BsDv+lrmEbKQNVlyfgWG7zmmnQQK4Itx1EtcxaG2/nh23qWk iNWRb8730ArwYvthGZiGJVByuZlysbW69H/Ym4JfZAPQSci9Wom4IqkKuV0YdLzH+FJA/N Vt5qk8uR7/afY6eLLfwYP4DEfd6Wq/PGhz6CwNoUzPfQaMDfce3QWQP0ryAdGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637880649; a=rsa-sha256; cv=none; b=NIuFtM3lXkmM+taMXcwiEX9N4fo7aawBFOQZsE9d9iX0jWcoQQ5EB//GvkW2d3cZJHjiCy BYzt7f9Ygh0I34RMXP+0saR+TystOuZQOLJKvvsjrLxWH0p+/DCfSPuPSltnjaqmA1UK+m 7rSpB7cwgm59+GJQMWlBaLXCUDwaWEq7PWhYweXCphFoMhW2wlKDbPihe0lIimoyL0zUBW f4dAs9gf62bZPfV4RRYs3W5w86laA+SPy12zmZeW7qBS1vVTjuvR1ZdDl3yFL+6f7Bd23n BaFhcigqsmA/2454yaLRTqkVr9A7T5QQnVI4s7GJB5QKzSGTK7RzOh7il0DGkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=c40fee6f7d26862260f0accc1dfeaa7b1328f5fd commit c40fee6f7d26862260f0accc1dfeaa7b1328f5fd Author: Mateusz Guzik AuthorDate: 2021-11-25 21:42:42 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-25 22:50:42 +0000 vfs: drop the always curthread argument from kern_alternate_path --- sys/compat/linux/linux_util.c | 2 +- sys/kern/vfs_lookup.c | 6 ++++-- sys/sys/syscallsubr.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index 800a55be33df..35376db6063d 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -95,7 +95,7 @@ linux_emul_convpath(const char *path, enum uio_seg pathseg, { int retval; - retval = kern_alternate_path(curthread, linux_emul_path, path, pathseg, pbuf, + retval = kern_alternate_path(linux_emul_path, path, pathseg, pbuf, cflag, dfd); return (retval); diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 8cccd93152ef..6ca8ac6de6fc 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1673,14 +1673,16 @@ out_mismatch: * the M_TEMP bucket if one is returned. */ int -kern_alternate_path(struct thread *td, const char *prefix, const char *path, - enum uio_seg pathseg, char **pathbuf, int create, int dirfd) +kern_alternate_path(const char *prefix, const char *path, enum uio_seg pathseg, + char **pathbuf, int create, int dirfd) { + struct thread *td; struct nameidata nd, ndroot; char *ptr, *buf, *cp; size_t len, sz; int error; + td = curthread; buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK); *pathbuf = buf; diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 24d2a199a272..62dde37c0c1f 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -91,7 +91,7 @@ int kern_accessat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flags, int mode); int kern_adjtime(struct thread *td, struct timeval *delta, struct timeval *olddelta); -int kern_alternate_path(struct thread *td, const char *prefix, const char *path, +int kern_alternate_path(const char *prefix, const char *path, enum uio_seg pathseg, char **pathbuf, int create, int dirfd); int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); int kern_break(struct thread *td, uintptr_t *addr); From nobody Thu Nov 25 22:50:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1585918BE925; Thu, 25 Nov 2021 22:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0Y4q3Cb5z3NTs; Thu, 25 Nov 2021 22:50:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B985625AA4; Thu, 25 Nov 2021 22:50: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 1APMoo93060934; Thu, 25 Nov 2021 22:50:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APMooqB060933; Thu, 25 Nov 2021 22:50:50 GMT (envelope-from git) Date: Thu, 25 Nov 2021 22:50:50 GMT Message-Id: <202111252250.1APMooqB060933@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: 7e1d3eefd410 - main - vfs: remove the unused thread argument from NDINIT* List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7e1d3eefd410ca0fbae5a217422821244c3eeee4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637880651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rFVSVHnI49MF/5ETbqkpxWkvzEeibK3DXxnnireDRSo=; b=RO4RAtbwFqJuq2wPOGoEdWSFClUQtpjLy4iU37ZWvJe+ZE+TpqaCvuWupu6ziLFJZ55Ai/ f1ABhhm5UBfFLEarzDty7c6ojErERBQUPAxsy0ciTHXlQNYdjMcpcD/8YJtccc0bp2g/zZ 2U+yhJ9jx3x8BcRBAb8djEh9l3WFLAFM1sp4Fkg5EnSCQG8Y20JJaUh/EEb+IayojsTctT QC+Il4d3wsJl2yraxduiNMNfhNzzITbn+BMbp6WbM1rZKBImG/a7MWAjLaGv3RWCWVsLoN NfRKkWJ/uOG8dDLfCzsbcrq8XoIoEIihYws+qTa0LkQ+Kh/7Y0z3qo1vwVnBYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637880651; a=rsa-sha256; cv=none; b=mSA9aRn9iH2eiGCtwIP9DzbYN5gYYpfBnRVQI0EeU9eDmN6ZW/Va1WkyRyCG5uiGD83OZI guWfaAAYLHLj6q7vkRqi6IVqcUdIH+dq/ruE99Gff901M2PUVBGT6TWQGN4eCzsHObOHZZ DMBfmxLXPp7D4+KvBYC5jFH2ycw64zVZfRpfQpAJuqsylLW3ZNLq+SS/ENCGaiQyyG+I1I 9qLkwwyLKHTvIxSBEhLAT9AO1s0gQcrfO33TARjHTsq4g98AZKNGDwbUGH1oM6AN54Rf1U nkwqEvjCq38lSko0eAJ77RJpD7yZA0q211iafU3+22dkEuXvsxIWcuyO930dmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=7e1d3eefd410ca0fbae5a217422821244c3eeee4 commit 7e1d3eefd410ca0fbae5a217422821244c3eeee4 Author: Mateusz Guzik AuthorDate: 2021-11-25 21:43:06 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-25 22:50:42 +0000 vfs: remove the unused thread argument from NDINIT* See b4a58fbf640409a1 ("vfs: remove cn_thread") Bump __FreeBSD_version to 1400043. --- sys/cam/ctl/ctl_backend_block.c | 2 +- sys/compat/linprocfs/linprocfs.c | 4 +- sys/compat/linux/linux_misc.c | 4 +- .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 9 ++-- sys/dev/beri/virtio/virtio_block.c | 3 +- sys/dev/md/md.c | 2 +- sys/dev/veriexec/verified_exec.c | 3 +- sys/dev/xen/blkback/blkback.c | 2 +- sys/fs/cd9660/cd9660_vfsops.c | 2 +- sys/fs/ext2fs/ext2_vfsops.c | 2 +- sys/fs/fuse/fuse_vfsops.c | 2 +- sys/fs/msdosfs/msdosfs_vfsops.c | 2 +- sys/fs/nfs/nfs_commonport.c | 5 +- sys/fs/nfsserver/nfs_nfsdport.c | 3 +- sys/fs/nfsserver/nfs_nfsdstate.c | 12 ++--- sys/fs/nullfs/null_vfsops.c | 2 +- sys/fs/udf/udf_vfsops.c | 2 +- sys/fs/unionfs/union_vfsops.c | 2 +- sys/kern/imgact_elf.c | 2 +- sys/kern/kern_acct.c | 4 +- sys/kern/kern_alq.c | 4 +- sys/kern/kern_ctf.c | 2 +- sys/kern/kern_exec.c | 2 +- sys/kern/kern_jail.c | 3 +- sys/kern/kern_ktrace.c | 2 +- sys/kern/kern_linker.c | 4 +- sys/kern/kern_proc.c | 3 +- sys/kern/kern_sig.c | 4 +- sys/kern/link_elf.c | 2 +- sys/kern/link_elf_obj.c | 2 +- sys/kern/uipc_usrreq.c | 6 +-- sys/kern/vfs_acl.c | 8 +-- sys/kern/vfs_cache.c | 5 +- sys/kern/vfs_default.c | 2 +- sys/kern/vfs_extattr.c | 16 +++--- sys/kern/vfs_lookup.c | 7 ++- sys/kern/vfs_mount.c | 6 +-- sys/kern/vfs_mountroot.c | 11 ++-- sys/kern/vfs_subr.c | 2 +- sys/kern/vfs_syscalls.c | 63 +++++++++++----------- sys/security/audit/audit_syscalls.c | 4 +- sys/security/mac/mac_syscalls.c | 4 +- sys/security/mac_veriexec/mac_veriexec.c | 2 +- sys/sys/namei.h | 18 +++---- sys/sys/param.h | 2 +- sys/ufs/ffs/ffs_snapshot.c | 2 +- sys/ufs/ffs/ffs_vfsops.c | 2 +- sys/ufs/ufs/ufs_quota.c | 2 +- sys/vm/swap_pager.c | 5 +- 49 files changed, 123 insertions(+), 141 deletions(-) diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index 8c126d8be229..ae558e496514 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -2232,7 +2232,7 @@ ctl_be_block_open(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) flags |= FWRITE; again: - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, be_lun->dev_path, curthread); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, be_lun->dev_path); error = vn_open(&nd, &flags, 0, NULL); if ((error == EROFS || error == EACCES) && (flags & FWRITE)) { flags &= ~FWRITE; diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 16755402bb7b..09144350a8ee 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -482,7 +482,7 @@ linprocfs_domtab(PFS_FILL_ARGS) * Ideally, this would use the current chroot rather than some * hardcoded path. */ - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path); flep = NULL; error = namei(&nd); lep = linux_emul_path; @@ -539,7 +539,7 @@ linprocfs_doprocmountinfo(PFS_FILL_ARGS) * Ideally, this would use the current chroot rather than some * hardcoded path. */ - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path); flep = NULL; error = namei(&nd); lep = linux_emul_path; diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 7960f8b80fa1..a7502465efbf 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -276,12 +276,12 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) if (!LUSECONVPATH(td)) { NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, - UIO_USERSPACE, args->library, td); + UIO_USERSPACE, args->library); error = namei(&ni); } else { LCONVPATHEXIST(args->library, &library); NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, - UIO_SYSSPACE, library, td); + UIO_SYSSPACE, library); error = namei(&ni); LFREEPATH(library); } diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index 2886eef0a2c5..11bbda5452a1 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -5345,8 +5345,7 @@ zfs_getextattr_dir(struct vop_getextattr_args *ap, const char *attrname) return (error); flags = FREAD; - NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, - xvp, td); + NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp); error = vn_open_cred(&nd, &flags, 0, VN_OPEN_INVFS, ap->a_cred, NULL); vp = nd.ni_vp; NDFREE(&nd, NDF_ONLY_PNBUF); @@ -5460,7 +5459,7 @@ zfs_deleteextattr_dir(struct vop_deleteextattr_args *ap, const char *attrname) return (error); NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF, - UIO_SYSSPACE, attrname, xvp, ap->a_td); + UIO_SYSSPACE, attrname, xvp); error = namei(&nd); vp = nd.ni_vp; if (error != 0) { @@ -5588,7 +5587,7 @@ zfs_setextattr_dir(struct vop_setextattr_args *ap, const char *attrname) return (error); flags = FFLAGS(O_WRONLY | O_CREAT); - NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp, td); + NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp); error = vn_open_cred(&nd, &flags, 0600, VN_OPEN_INVFS, ap->a_cred, NULL); vp = nd.ni_vp; @@ -5744,7 +5743,7 @@ zfs_listextattr_dir(struct vop_listextattr_args *ap, const char *attrprefix) } NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED, - UIO_SYSSPACE, ".", xvp, td); + UIO_SYSSPACE, ".", xvp); error = namei(&nd); vp = nd.ni_vp; NDFREE(&nd, NDF_ONLY_PNBUF); diff --git a/sys/dev/beri/virtio/virtio_block.c b/sys/dev/beri/virtio/virtio_block.c index ca11e46e9268..45c086f0e0bf 100644 --- a/sys/dev/beri/virtio/virtio_block.c +++ b/sys/dev/beri/virtio/virtio_block.c @@ -241,8 +241,7 @@ open_file(struct beri_vtblk_softc *sc, struct thread *td) int flags; flags = (FREAD | FWRITE); - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, - sc->mdio->md_file, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, sc->mdio->md_file); error = vn_open(&nd, &flags, 0, NULL); if (error != 0) return (error); diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 92d93f0f0f1d..f88b82aacb78 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1428,7 +1428,7 @@ mdcreate_vnode(struct md_s *sc, struct md_req *mdr, struct thread *td) */ flags = FREAD | ((mdr->md_options & MD_READONLY) ? 0 : FWRITE) \ | ((mdr->md_options & MD_VERIFY) ? O_VERIFY : 0); - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, sc->file, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, sc->file); error = vn_open(&nd, &flags, 0, NULL); if (error != 0) return (error); diff --git a/sys/dev/veriexec/verified_exec.c b/sys/dev/veriexec/verified_exec.c index d6fabf825212..1cb3cd75dbbe 100644 --- a/sys/dev/veriexec/verified_exec.c +++ b/sys/dev/veriexec/verified_exec.c @@ -196,8 +196,7 @@ verifiedexecioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, /* * FreeBSD seems to copy the args to kernel space */ - NDINIT(&nid, LOOKUP, FOLLOW, UIO_SYSSPACE, - params->file, td); + NDINIT(&nid, LOOKUP, FOLLOW, UIO_SYSSPACE, params->file); if ((error = vn_open(&nid, &flags, 0, NULL)) != 0) return (error); diff --git a/sys/dev/xen/blkback/blkback.c b/sys/dev/xen/blkback/blkback.c index 010e737740b8..6a4e8007f6b9 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -2683,7 +2683,7 @@ xbb_open_backend(struct xbb_softc *xbb) pwd_ensure_dirs(); again: - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, xbb->dev_name, curthread); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, xbb->dev_name); error = vn_open(&nd, &flags, 0, NULL); if (error) { /* diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 5d475bec93b8..606938c6faf5 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -159,7 +159,7 @@ cd9660_mount(struct mount *mp) * Not an update, or updating the name: look up the name * and verify that it refers to a sensible block device. */ - NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspec, td); + NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspec); if ((error = namei(&ndp))) return (error); NDFREE(&ndp, NDF_ONLY_PNBUF); diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index b39d04649d17..65f429949f55 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -240,7 +240,7 @@ ext2_mount(struct mount *mp) */ if (fspec == NULL) return (EINVAL); - NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspec, td); + NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspec); if ((error = namei(ndp)) != 0) return (error); NDFREE(ndp, NDF_ONLY_PNBUF); diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index 3d5e168bcde2..7405f477fea4 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -149,7 +149,7 @@ fuse_getdevice(const char *fspec, struct thread *td, struct cdev **fdevp) * and verify that it refers to a sensible disk device. */ - NDINIT(ndp, LOOKUP, FOLLOW, UIO_SYSSPACE, fspec, td); + NDINIT(ndp, LOOKUP, FOLLOW, UIO_SYSSPACE, fspec); if ((err = namei(ndp)) != 0) return err; NDFREE(ndp, NDF_ONLY_PNBUF); diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 0f6d41b3c77c..32cc81c52ffd 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -344,7 +344,7 @@ msdosfs_mount(struct mount *mp) */ if (vfs_getopt(mp->mnt_optnew, "from", (void **)&from, NULL)) return (EINVAL); - NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, from, td); + NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, from); error = namei(&ndp); if (error) return (error); diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index 8a100749fc32..cd44698343d7 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -239,12 +239,11 @@ nfsrv_object_create(struct vnode *vp, struct thread *td) * Look up a file name. Basically just initialize stuff and call namei(). */ int -nfsrv_lookupfilename(struct nameidata *ndp, char *fname, NFSPROC_T *p) +nfsrv_lookupfilename(struct nameidata *ndp, char *fname, NFSPROC_T *p __unused) { int error; - NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, fname, - p); + NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, fname); error = namei(ndp); if (!error) { NDFREE(ndp, NDF_ONLY_PNBUF); diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index add13aca1d90..78151309896c 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -3468,8 +3468,7 @@ nfsrv_v4rootexport(void *argp, struct ucred *cred, struct thread *p) /* * If fspec != NULL, this is the v4root path. */ - NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, - nfsexargp->fspec, p); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, nfsexargp->fspec); if ((error = namei(&nd)) != 0) goto out; error = nfsvno_getfh(nd.ni_vp, &fh, p); diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index e9acacb27cbd..360bc00b8df3 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -7644,7 +7644,7 @@ nfsrv_setdsserver(char *dspathp, char *mdspathp, NFSPROC_T *p, NFSD_DEBUG(4, "setdssrv path=%s\n", dspathp); *dsp = NULL; NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, UIO_SYSSPACE, - dspathp, p); + dspathp); error = namei(&nd); NFSD_DEBUG(4, "lookup=%d\n", error); if (error != 0) @@ -7680,7 +7680,7 @@ nfsrv_setdsserver(char *dspathp, char *mdspathp, NFSPROC_T *p, for (i = 0; i < nfsrv_dsdirsize; i++) { snprintf(dsdirpath, dsdirsize, "%s/ds%d", dspathp, i); NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, - UIO_SYSSPACE, dsdirpath, p); + UIO_SYSSPACE, dsdirpath); error = namei(&nd); NFSD_DEBUG(4, "dsdirpath=%s lookup=%d\n", dsdirpath, error); if (error != 0) @@ -7708,7 +7708,7 @@ nfsrv_setdsserver(char *dspathp, char *mdspathp, NFSPROC_T *p, * system. */ NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, - UIO_SYSSPACE, mdspathp, p); + UIO_SYSSPACE, mdspathp); error = namei(&nd); NFSD_DEBUG(4, "mds lookup=%d\n", error); if (error != 0) @@ -8567,7 +8567,7 @@ nfsrv_mdscopymr(char *mdspathp, char *dspathp, char *curdspathp, char *buf, */ NFSD_DEBUG(4, "mdsopen path=%s\n", mdspathp); NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, UIO_SYSSPACE, - mdspathp, p); + mdspathp); error = namei(&nd); NFSD_DEBUG(4, "lookup=%d\n", error); if (error != 0) @@ -8586,7 +8586,7 @@ nfsrv_mdscopymr(char *mdspathp, char *dspathp, char *curdspathp, char *buf, */ NFSD_DEBUG(4, "curmdsdev path=%s\n", curdspathp); NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, - UIO_SYSSPACE, curdspathp, p); + UIO_SYSSPACE, curdspathp); error = namei(&nd); NFSD_DEBUG(4, "ds lookup=%d\n", error); if (error != 0) { @@ -8626,7 +8626,7 @@ nfsrv_mdscopymr(char *mdspathp, char *dspathp, char *curdspathp, char *buf, /* Look up the nfsdev path and find the nfsdev structure. */ NFSD_DEBUG(4, "mdsdev path=%s\n", dspathp); NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, - UIO_SYSSPACE, dspathp, p); + UIO_SYSSPACE, dspathp); error = namei(&nd); NFSD_DEBUG(4, "ds lookup=%d\n", error); if (error != 0) { diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 73301c9275d2..1dba5f51d619 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -125,7 +125,7 @@ nullfs_mount(struct mount *mp) * Find lower node */ ndp = &nd; - NDINIT(ndp, LOOKUP, FOLLOW|LOCKLEAF, UIO_SYSSPACE, target, curthread); + NDINIT(ndp, LOOKUP, FOLLOW|LOCKLEAF, UIO_SYSSPACE, target); error = namei(ndp); /* diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index 132f4e7703d7..37554582ef1b 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -227,7 +227,7 @@ udf_mount(struct mount *mp) /* Check that the mount device exists */ if (fspec == NULL) return (EINVAL); - NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspec, td); + NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspec); if ((error = namei(ndp))) return (error); NDFREE(ndp, NDF_ONLY_PNBUF); diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index 5096d46bea58..da9b3cce46f3 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -234,7 +234,7 @@ unionfs_domount(struct mount *mp) /* * Find upper node */ - NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, target, td); + NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, target); if ((error = namei(ndp))) return (error); diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index c7c131da184c..7e970c0215b6 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -800,7 +800,7 @@ __elfN(load_file)(struct proc *p, const char *file, u_long *addr, imgp->attr = attr; NDINIT(nd, LOOKUP, ISOPEN | FOLLOW | LOCKSHARED | LOCKLEAF, - UIO_SYSSPACE, file, curthread); + UIO_SYSSPACE, file); if ((error = namei(nd)) != 0) { nd->ni_vp = NULL; goto fail; diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index ad272676083e..7a3ff1700b66 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -216,8 +216,8 @@ sys_acct(struct thread *td, struct acct_args *uap) * appending and make sure it's a 'normal'. */ if (uap->path != NULL) { - NDINIT(&nd, LOOKUP, NOFOLLOW | AUDITVNODE1, - UIO_USERSPACE, uap->path, td); + NDINIT(&nd, LOOKUP, NOFOLLOW | AUDITVNODE1, UIO_USERSPACE, + uap->path); flags = FWRITE | O_APPEND; error = vn_open(&nd, &flags, 0, NULL); if (error) diff --git a/sys/kern/kern_alq.c b/sys/kern/kern_alq.c index 4b30e519d335..4285ddb03b78 100644 --- a/sys/kern/kern_alq.c +++ b/sys/kern/kern_alq.c @@ -431,7 +431,6 @@ int alq_open_flags(struct alq **alqp, const char *file, struct ucred *cred, int cmode, int size, int flags) { - struct thread *td __unused; struct nameidata nd; struct alq *alq; int oflags; @@ -440,9 +439,8 @@ alq_open_flags(struct alq **alqp, const char *file, struct ucred *cred, int cmod KASSERT((size > 0), ("%s: size <= 0", __func__)); *alqp = NULL; - td = curthread; - NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, file, td); + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, file); oflags = FWRITE | O_NOFOLLOW | O_CREAT; error = vn_open_cred(&nd, &oflags, cmode, 0, cred, NULL); diff --git a/sys/kern/kern_ctf.c b/sys/kern/kern_ctf.c index ee7576ab6fb9..bd2186693f0b 100644 --- a/sys/kern/kern_ctf.c +++ b/sys/kern/kern_ctf.c @@ -100,7 +100,7 @@ link_elf_ctf_get(linker_file_t lf, linker_ctf_t *lc) */ ef->ctfcnt = -1; - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, lf->pathname, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, lf->pathname); flags = FREAD; error = vn_open(&nd, &flags, 0, NULL); if (error) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 575771346fd1..b9684833fa0e 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -499,7 +499,7 @@ interpret: */ NDINIT(&nd, LOOKUP, ISOPEN | LOCKLEAF | LOCKSHARED | FOLLOW | SAVENAME | AUDITVNODE1 | WANTPARENT, UIO_SYSSPACE, - args->fname, td); + args->fname); error = namei(&nd); if (error) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index e9019eda4d6c..377539f1d1bd 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -962,8 +962,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) error = EINVAL; goto done_free; } - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, - path, td); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, path); error = namei(&nd); if (error) goto done_free; diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index be0ccfd344fa..5371f73672a0 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1023,7 +1023,7 @@ sys_ktrace(struct thread *td, struct ktrace_args *uap) /* * an operation which requires a file argument. */ - NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, uap->fname, td); + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, uap->fname); flags = FREAD | FWRITE | O_NOFOLLOW; error = vn_open(&nd, &flags, 0, NULL); if (error) diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index c0005f2f5cf6..bcdbb467e84e 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -1854,7 +1854,7 @@ linker_lookup_file(const char *path, int pathlen, const char *name, * Attempt to open the file, and return the path if * we succeed and it's a regular file. */ - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, result, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, result); flags = FREAD; error = vn_open(&nd, &flags, 0, NULL); if (error == 0) { @@ -1904,7 +1904,7 @@ linker_hints_lookup(const char *path, int pathlen, const char *modname, snprintf(pathbuf, reclen, "%.*s%s%s", pathlen, path, sep, linker_hintfile); - NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, pathbuf, td); + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, pathbuf); flags = FREAD; error = vn_open(&nd, &flags, 0, NULL); if (error) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 21af09265dd2..2f029e261427 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2275,8 +2275,7 @@ proc_get_binpath(struct proc *p, char *binname, char **retbuf, * might have been renamed or replaced, in * which case we should not report old name. */ - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, *retbuf, - curthread); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, *retbuf); error = namei(&nd); if (error == 0) { if (nd.ni_vp == vp) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 15d509eca52d..4b036395f133 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -3658,7 +3658,7 @@ corefile_open_last(struct thread *td, char *name, int indexpos, i); name[indexpos + indexlen] = ch; - NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td); + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name); error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, NULL); if (error != 0) @@ -3833,7 +3833,7 @@ corefile_open(const char *comm, uid_t uid, pid_t pid, struct thread *td, if ((td->td_proc->p_flag & P_SUGID) != 0) flags |= O_EXCL; - NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td); + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name); error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, NULL); if (error == 0) { diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index 4114bd46f0c0..075238b91d95 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -972,7 +972,7 @@ link_elf_load_file(linker_class_t cls, const char* filename, lf = NULL; shstrs = NULL; - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, filename, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, filename); flags = FREAD; error = vn_open(&nd, &flags, 0, NULL); if (error != 0) diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index bafbd9f4c616..bb2b7628a60e 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -698,7 +698,7 @@ link_elf_load_file(linker_class_t cls, const char *filename, hdr = NULL; nd = malloc(sizeof(struct nameidata), M_TEMP, M_WAITOK); - NDINIT(nd, LOOKUP, FOLLOW, UIO_SYSSPACE, filename, td); + NDINIT(nd, LOOKUP, FOLLOW, UIO_SYSSPACE, filename); flags = FREAD; error = vn_open(nd, &flags, 0, NULL); if (error) { diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index fe018aa65d85..0ec1ba677173 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -637,8 +637,7 @@ uipc_bindat(int fd, struct socket *so, struct sockaddr *nam, struct thread *td) restart: NDINIT_ATRIGHTS(&nd, CREATE, NOFOLLOW | LOCKPARENT | SAVENAME | NOCACHE, - UIO_SYSSPACE, buf, fd, cap_rights_init_one(&rights, CAP_BINDAT), - td); + UIO_SYSSPACE, buf, fd, cap_rights_init_one(&rights, CAP_BINDAT)); /* SHOULD BE ABLE TO ADOPT EXISTING AND wakeup() ALA FIFO's */ error = namei(&nd); if (error) @@ -1570,8 +1569,7 @@ unp_connectat(int fd, struct socket *so, struct sockaddr *nam, else sa = NULL; NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, - UIO_SYSSPACE, buf, fd, cap_rights_init_one(&rights, CAP_CONNECTAT), - td); + UIO_SYSSPACE, buf, fd, cap_rights_init_one(&rights, CAP_CONNECTAT)); error = namei(&nd); if (error) vp = NULL; diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c index 6bae01bd9d85..ba4c217ae6b9 100644 --- a/sys/kern/vfs_acl.c +++ b/sys/kern/vfs_acl.c @@ -377,7 +377,7 @@ kern___acl_get_path(struct thread *td, const char *path, acl_type_t type, struct nameidata nd; int error; - NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path, td); + NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path); error = namei(&nd); if (error == 0) { error = vacl_get_acl(td, nd.ni_vp, type, aclp); @@ -415,7 +415,7 @@ kern___acl_set_path(struct thread *td, const char *path, struct nameidata nd; int error; - NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path, td); + NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path); error = namei(&nd); if (error == 0) { error = vacl_set_acl(td, nd.ni_vp, type, aclp); @@ -491,7 +491,7 @@ kern___acl_delete_path(struct thread *td, const char *path, struct nameidata nd; int error; - NDINIT(&nd, LOOKUP, follow, UIO_USERSPACE, path, td); + NDINIT(&nd, LOOKUP, follow, UIO_USERSPACE, path); error = namei(&nd); if (error == 0) { error = vacl_delete(td, nd.ni_vp, type); @@ -548,7 +548,7 @@ kern___acl_aclcheck_path(struct thread *td, const char *path, acl_type_t type, struct nameidata nd; int error; - NDINIT(&nd, LOOKUP, follow, UIO_USERSPACE, path, td); + NDINIT(&nd, LOOKUP, follow, UIO_USERSPACE, path); error = namei(&nd); if (error == 0) { error = vacl_aclcheck(td, nd.ni_vp, type, aclp); diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 4c76244901bb..a34e0dad74a8 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3127,7 +3127,7 @@ kern___realpathat(struct thread *td, int fd, const char *path, char *buf, if (flags != 0) return (EINVAL); NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | SAVENAME | WANTPARENT | AUDITVNODE1, - pathseg, path, fd, &cap_fstat_rights, td); + pathseg, path, fd, &cap_fstat_rights); if ((error = namei(&nd)) != 0) return (error); error = vn_fullpath_hardlink(nd.ni_vp, nd.ni_dvp, nd.ni_cnd.cn_nameptr, @@ -3772,8 +3772,7 @@ vn_path_to_global_path(struct thread *td, struct vnode *vp, char *path, * As a side effect, the vnode is relocked. * If vnode was renamed, return ENOENT. */ - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, - UIO_SYSSPACE, path, td); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_SYSSPACE, path); error = namei(&nd); if (error != 0) { vrele(vp); diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 02fae41e3404..763e9a943f7d 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -846,7 +846,7 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap) locked = VOP_ISLOCKED(vp); VOP_UNLOCK(vp); NDINIT_ATVP(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, UIO_SYSSPACE, - "..", vp, td); + "..", vp); flags = FREAD; error = vn_open_cred(&nd, &flags, 0, VN_OPEN_NOAUDIT, cred, NULL); if (error) { diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 43b000c78110..d520e1655cf5 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -102,8 +102,8 @@ sys_extattrctl(struct thread *td, struct extattrctl_args *uap) mp = NULL; filename_vp = NULL; if (uap->filename != NULL) { - NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNODE2, - UIO_USERSPACE, uap->filename, td); + NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNODE2, UIO_USERSPACE, + uap->filename); error = namei(&nd); if (error) return (error); @@ -112,8 +112,8 @@ sys_extattrctl(struct thread *td, struct extattrctl_args *uap) } /* uap->path is always defined. */ - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, - UIO_USERSPACE, uap->path, td); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_USERSPACE, + uap->path); error = namei(&nd); if (error) goto out; @@ -302,7 +302,7 @@ kern_extattr_set_path(struct thread *td, const char *path, int attrnamespace, return (error); AUDIT_ARG_TEXT(attrname); - NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path, td); + NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path); error = namei(&nd); if (error) return (error); @@ -467,7 +467,7 @@ kern_extattr_get_path(struct thread *td, const char *path, int attrnamespace, return (error); AUDIT_ARG_TEXT(attrname); - NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path, td); + NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path); error = namei(&nd); if (error) return (error); @@ -599,7 +599,7 @@ kern_extattr_delete_path(struct thread *td, const char *path, int attrnamespace, return(error); AUDIT_ARG_TEXT(attrname); - NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path, td); + NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path); error = namei(&nd); if (error) return(error); @@ -742,7 +742,7 @@ kern_extattr_list_path(struct thread *td, const char *path, int attrnamespace, int error; AUDIT_ARG_VALUE(attrnamespace); - NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path, td); + NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path); error = namei(&nd); if (error) return (error); diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 6ca8ac6de6fc..d5960dd9e920 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1735,13 +1735,13 @@ kern_alternate_path(const char *prefix, const char *path, enum uio_seg pathseg, for (cp = &ptr[len] - 1; *cp != '/'; cp--); *cp = '\0'; - NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, buf, td); + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, buf); error = namei(&nd); *cp = '/'; if (error != 0) goto keeporig; } else { - NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, buf, td); + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, buf); error = namei(&nd); if (error != 0) @@ -1755,8 +1755,7 @@ kern_alternate_path(const char *prefix, const char *path, enum uio_seg pathseg, * root directory and never finding it, because "/" resolves * to the emulation root directory. This is expensive :-( */ - NDINIT(&ndroot, LOOKUP, FOLLOW, UIO_SYSSPACE, prefix, - td); + NDINIT(&ndroot, LOOKUP, FOLLOW, UIO_SYSSPACE, prefix); /* We shouldn't ever get an error from this namei(). */ error = namei(&ndroot); diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 07076bc2f4f7..ee163a5e8137 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1538,8 +1538,8 @@ vfs_domount( /* * Get vnode to be covered or mount point's vnode in case of MNT_UPDATE. */ - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, - UIO_SYSSPACE, fspath, td); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_SYSSPACE, + fspath); error = namei(&nd); if (error != 0) return (error); @@ -1633,7 +1633,7 @@ kern_unmount(struct thread *td, const char *path, int flags) * Try to find global path for path argument. */ NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, - UIO_SYSSPACE, pathbuf, td); + UIO_SYSSPACE, pathbuf); if (namei(&nd) == 0) { NDFREE(&nd, NDF_ONLY_PNBUF); error = vn_path_to_global_path(td, nd.ni_vp, pathbuf, diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c index 54d5a442c9ee..9f3959f06b86 100644 --- a/sys/kern/vfs_mountroot.c +++ b/sys/kern/vfs_mountroot.c @@ -350,14 +350,13 @@ vfs_mountroot_shuffle(struct thread *td, struct mount *mpdevfs) if (mporoot != mpdevfs) { /* Remount old root under /.mount or /mnt */ fspath = "/.mount"; - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, - fspath, td); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspath); error = namei(&nd); if (error) { NDFREE(&nd, NDF_ONLY_PNBUF); fspath = "/mnt"; NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, - fspath, td); + fspath); error = namei(&nd); } if (!error) { @@ -386,7 +385,7 @@ vfs_mountroot_shuffle(struct thread *td, struct mount *mpdevfs) } /* Remount devfs under /dev */ - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, "/dev", td); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, "/dev"); error = namei(&nd); if (!error) { vp = nd.ni_vp; @@ -726,7 +725,7 @@ parse_mount_dev_present(const char *dev) struct nameidata nd; int error; - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, dev, curthread); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, dev); error = namei(&nd); if (!error) vput(nd.ni_vp); @@ -949,7 +948,7 @@ vfs_mountroot_readconf(struct thread *td, struct sbuf *sb) ssize_t resid; int error, flags, len; - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, "/.mount.conf", td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, "/.mount.conf"); flags = FREAD; error = vn_open(&nd, &flags, 0, NULL); if (error) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index cd784cd67961..65a9ebf304fe 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -394,7 +394,7 @@ sysctl_try_reclaim_vnode(SYSCTL_HANDLER_ARGS) buf[req->newlen] = '\0'; ndflags = LOCKLEAF | NOFOLLOW | AUDITVNODE1 | SAVENAME; - NDINIT(&nd, LOOKUP, ndflags, UIO_SYSSPACE, buf, curthread); + NDINIT(&nd, LOOKUP, ndflags, UIO_SYSSPACE, buf); if ((error = namei(&nd)) != 0) goto out; vp = nd.ni_vp; diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 4391853337bd..00da4e7c1b07 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -203,7 +203,7 @@ sys_quotactl(struct thread *td, struct quotactl_args *uap) if (!prison_allow(td->td_ucred, PR_ALLOW_QUOTAS)) return (EPERM); NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_USERSPACE, - uap->path, td); + uap->path); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -335,7 +335,7 @@ kern_statfs(struct thread *td, const char *path, enum uio_seg pathseg, struct nameidata nd; int error; - NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNODE1, pathseg, path, td); + NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNODE1, pathseg, path); error = namei(&nd); if (error != 0) return (error); @@ -953,7 +953,7 @@ kern_chdir(struct thread *td, const char *path, enum uio_seg pathseg) int error; NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1, - pathseg, path, td); + pathseg, path); if ((error = namei(&nd)) != 0) return (error); if ((error = change_dir(nd.ni_vp, td)) != 0) { @@ -998,7 +998,7 @@ sys_chroot(struct thread *td, struct chroot_args *uap) PROC_UNLOCK(p); } NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1, - UIO_USERSPACE, uap->path, td); + UIO_USERSPACE, uap->path); error = namei(&nd); if (error != 0) goto error; @@ -1165,7 +1165,7 @@ kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, fp->f_flag = flags & FMASK; cmode = ((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT; NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | AUDITVNODE1, pathseg, path, fd, - &rights, td); + &rights); td->td_dupfd = -1; /* XXX check for fdopen */ error = vn_open(&nd, &flags, cmode, fp); if (error != 0) { @@ -1357,8 +1357,7 @@ kern_mknodat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE1 | - NOCACHE, pathseg, path, fd, &cap_mknodat_rights, - td); + NOCACHE, pathseg, path, fd, &cap_mknodat_rights); if ((error = namei(&nd)) != 0) return (error); vp = nd.ni_vp; @@ -1466,8 +1465,7 @@ kern_mkfifoat(struct thread *td, int fd, const char *path, restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE1 | - NOCACHE, pathseg, path, fd, &cap_mkfifoat_rights, - td); + NOCACHE, pathseg, path, fd, &cap_mkfifoat_rights); if ((error = namei(&nd)) != 0) return (error); if (nd.ni_vp != NULL) { @@ -1596,7 +1594,7 @@ kern_linkat(struct thread *td, int fd1, int fd2, const char *path1, bwillwrite(); NDINIT_ATRIGHTS(&nd, LOOKUP, AUDITVNODE1 | at2cnpflags(flag, AT_SYMLINK_FOLLOW | AT_RESOLVE_BENEATH | AT_EMPTY_PATH), - segflag, path1, fd1, &cap_linkat_source_rights, td); + segflag, path1, fd1, &cap_linkat_source_rights); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -1626,7 +1624,7 @@ kern_linkat_vp(struct thread *td, struct vnode *vp, int fd, const char *path, } NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE2 | NOCACHE, segflag, path, fd, - &cap_linkat_target_rights, td); + &cap_linkat_target_rights); if ((error = namei(&nd)) == 0) { if (nd.ni_vp != NULL) { NDFREE(&nd, NDF_ONLY_PNBUF); @@ -1744,8 +1742,7 @@ kern_symlinkat(struct thread *td, const char *path1, int fd, const char *path2, restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE1 | - NOCACHE, segflg, path2, fd, &cap_symlinkat_rights, - td); + NOCACHE, segflg, path2, fd, &cap_symlinkat_rights); if ((error = namei(&nd)) != 0) goto out; if (nd.ni_vp) { @@ -1809,7 +1806,7 @@ sys_undelete(struct thread *td, struct undelete_args *uap) restart: bwillwrite(); NDINIT(&nd, DELETE, LOCKPARENT | DOWHITEOUT | AUDITVNODE1, - UIO_USERSPACE, uap->path, td); + UIO_USERSPACE, uap->path); error = namei(&nd); if (error != 0) return (error); @@ -1924,7 +1921,7 @@ restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, DELETE, LOCKPARENT | LOCKLEAF | AUDITVNODE1 | at2cnpflags(flag, AT_RESOLVE_BENEATH), - pathseg, path, dfd, &cap_unlinkat_rights, td); + pathseg, path, dfd, &cap_unlinkat_rights); if ((error = namei(&nd)) != 0) { if (error == EINVAL) error = EPERM; @@ -2150,7 +2147,7 @@ kern_accessat(struct thread *td, int fd, const char *path, AUDIT_ARG_VALUE(amode); NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1 | at2cnpflags(flag, AT_RESOLVE_BENEATH | - AT_EMPTY_PATH), pathseg, path, fd, &cap_fstat_rights, td); + AT_EMPTY_PATH), pathseg, path, fd, &cap_fstat_rights); if ((error = namei(&nd)) != 0) goto out; vp = nd.ni_vp; *** 314 LINES SKIPPED *** From nobody Fri Nov 26 00:26:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4E4A018A50AA; Fri, 26 Nov 2021 00:26: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 4J0bBn6zLDz4gK3; Fri, 26 Nov 2021 00:26:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF6CF270A8; Fri, 26 Nov 2021 00:26: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 1AQ0Q9VY082808; Fri, 26 Nov 2021 00:26:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQ0Q96M082807; Fri, 26 Nov 2021 00:26:09 GMT (envelope-from git) Date: Fri, 26 Nov 2021 00:26:09 GMT Message-Id: <202111260026.1AQ0Q96M082807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 913c07a04998 - main - hwpmc: Add IDs for Intel Comet/Ice/Tiger/Rocketlake 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 913c07a04998b8cd11dc428f5d00fae7dd392244 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637886370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=39Padcu3EeLrEO0IOiODfBvWxHAQ+jCdn7CTTzq2MRM=; b=yqU+fRN6KFOWBW9bZh8+dLC+NcfYRi3D/+hjc3eCOaYY84Em/N39iDSUr4XHQxJctQyuBb WG+HZS8CSzNtiAbSw6PaOz0TepKJ59lNoLSh4yUgU5iAlgvV03gfn6B7w4dqXahUiXSgw3 gOo0xJSmdGL640ZB0WhIMftrydJes98qfT9J+Sg9tsNPyG8S2C4bZ5xK7EuT1BzBomSeGL 5NEZALjpSopIPuFJJfhgzn/uPk1U958E07GT2dKsj0zgRYx+2kR7gmfPtfCeyYl05deega dlnApKdMBCVYfhx1qcigbuw8FqJ5TgJDugky8n9uFkx0hf84sut3Z6D5sEKJug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637886370; a=rsa-sha256; cv=none; b=DIBEMYR2bJ9eQYtJ2Hs0GUF9LluTdZ/kZqHDDtS4GGM3ROiUfV9dk3b4SoxCCFF20xAgxO DBmeLioBr3xRRP1biAWXkJjUR9H00B0XloC1ODyl/QAic8K4L5+aciIRYAZx+kl7GuxZ/l y7TZJ680ymg8A0f8Pdm9PktJ4dBvUtvmOzX4/B4cJMdx84Icyv34YOB4eupN76FdZ2rCrB b+gB/sCBJL++wasktvlNX1cQx02EzoDQgAZv4D31L/Ic4rHLlQPJ7DnzTw4quheVQeCeUO vd/9oHisKsUGpOLhkgY6qbhw92xla4W8j/UoChK6NolP0wBPMLdsCASjSPKM5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=913c07a04998b8cd11dc428f5d00fae7dd392244 commit 913c07a04998b8cd11dc428f5d00fae7dd392244 Author: Alexander Motin AuthorDate: 2021-11-26 00:17:58 +0000 Commit: Alexander Motin CommitDate: 2021-11-26 00:26:04 +0000 hwpmc: Add IDs for Intel Comet/Ice/Tiger/Rocketlake CPUs. MFC after: 1 month --- sys/dev/hwpmc/hwpmc_core.c | 4 +++- sys/dev/hwpmc/hwpmc_intel.c | 23 +++++++++++++++++++++++ sys/sys/pmc.h | 2 ++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index 84967e8a6248..fadbbfae27d7 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -761,6 +761,8 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm, break; case PMC_CPU_INTEL_SKYLAKE: case PMC_CPU_INTEL_SKYLAKE_XEON: + case PMC_CPU_INTEL_ICELAKE: + case PMC_CPU_INTEL_ICELAKE_XEON: case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_BROADWELL_XEON: case PMC_CPU_INTEL_SANDYBRIDGE: @@ -1263,7 +1265,7 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu, int version_override) PMCDBG3(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d", core_cputype, maxcpu, ipa_version); - if (ipa_version < 1 || ipa_version > 4 || + if (ipa_version < 1 || ipa_version > 5 || (core_cputype != PMC_CPU_INTEL_CORE && ipa_version == 1)) { /* Unknown PMC architecture. */ printf("hwpc_core: unknown PMC architecture: %d\n", diff --git a/sys/dev/hwpmc/hwpmc_intel.c b/sys/dev/hwpmc/hwpmc_intel.c index 6cc6ae3b50d6..2d8377e1a838 100644 --- a/sys/dev/hwpmc/hwpmc_intel.c +++ b/sys/dev/hwpmc/hwpmc_intel.c @@ -169,6 +169,9 @@ pmc_intel_initialize(void) /* Kabylake */ case 0x8E: /* Per Intel document 325462-063US July 2017. */ case 0x9E: /* Per Intel document 325462-063US July 2017. */ + /* Cometlake */ + case 0xA5: + case 0xA6: cputype = PMC_CPU_INTEL_SKYLAKE; nclasses = 3; break; @@ -176,6 +179,22 @@ pmc_intel_initialize(void) cputype = PMC_CPU_INTEL_SKYLAKE_XEON; nclasses = 3; break; + /* Icelake */ + case 0x7D: + case 0x7E: + /* Tigerlake */ + case 0x8C: + case 0x8D: + /* Rocketlake */ + case 0xA7: + cputype = PMC_CPU_INTEL_ICELAKE; + nclasses = 3; + break; + case 0x6A: + case 0x6C: + cputype = PMC_CPU_INTEL_ICELAKE_XEON; + nclasses = 3; + break; case 0x3D: case 0x47: cputype = PMC_CPU_INTEL_BROADWELL; @@ -242,6 +261,8 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_BROADWELL_XEON: case PMC_CPU_INTEL_SKYLAKE_XEON: case PMC_CPU_INTEL_SKYLAKE: + case PMC_CPU_INTEL_ICELAKE: + case PMC_CPU_INTEL_ICELAKE_XEON: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: @@ -325,6 +346,8 @@ pmc_intel_finalize(struct pmc_mdep *md) case PMC_CPU_INTEL_BROADWELL_XEON: case PMC_CPU_INTEL_SKYLAKE_XEON: case PMC_CPU_INTEL_SKYLAKE: + case PMC_CPU_INTEL_ICELAKE: + case PMC_CPU_INTEL_ICELAKE_XEON: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index 7491a43023f3..b54bc8d8e9f0 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -111,6 +111,8 @@ extern char pmc_cpuid[PMC_CPUID_LEN]; __PMC_CPU(INTEL_SKYLAKE, 0x98, "Intel Skylake") \ __PMC_CPU(INTEL_SKYLAKE_XEON, 0x99, "Intel Skylake Xeon") \ __PMC_CPU(INTEL_ATOM_GOLDMONT, 0x9A, "Intel Atom Goldmont") \ + __PMC_CPU(INTEL_ICELAKE, 0x9B, "Intel Icelake") \ + __PMC_CPU(INTEL_ICELAKE_XEON, 0x9C, "Intel Icelake Xeon") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ From nobody Fri Nov 26 01:09:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D70E418B848D; Fri, 26 Nov 2021 01:09: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 4J0c8S40fFz4sG1; Fri, 26 Nov 2021 01:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6969A27846; Fri, 26 Nov 2021 01:09: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 1AQ19ChD036653; Fri, 26 Nov 2021 01:09:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQ19CnT036652; Fri, 26 Nov 2021 01:09:12 GMT (envelope-from git) Date: Fri, 26 Nov 2021 01:09:12 GMT Message-Id: <202111260109.1AQ19CnT036652@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: 9c983ad791c3 - main - arch.7: update applicable FreeBSD versions to 12.0 and later List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9c983ad791c3ca8213cae949f9ad381d1309ad8e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637888952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oFLdbxjiCrZvYRbdIh8TwUAlVviQi/mlj2tFVsxOP4I=; b=lT5JvGWcdJLh9pFd99GlDVcFMVJ4fMhVnL+Zc/nZ5FPUpyIoyfHKMUOAsKb+l1dTdAjW9R aV3DY6vQsDB3HUzI8JoJFjuaDNJHTucNQVuykC+0dfazV2wsV+3cirEfrK1dHzqERQbczk X1Xm5p+wStZWlRCNf4T9d57h8PkaOnleLEAcKm+C+o4XGPwJtT+N65+QvPdiyvBA9Cdnen QTeC4OQ+/1AN9PkMGM7a/K8R8LALtY1y1OFnEwlK0GzjbFWU9+mhxFnU2NzTnWG4BO/+b3 IuvAkfnW4uw8w8p5Yg8Wx4bnZ0DBAO0vdrVQrJ8kLdAzMkGFGanet6YQlpXRRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637888952; a=rsa-sha256; cv=none; b=S85g6v0tqAnildjRubyBkTGz21J3u90xQdol0YtOpxBsMAq3AcmGSc98HJB/ns8PRDfZ1J mTwdwovuwpMofjeHf5KaaBVrUX/2WdOqMvJ3MmRU5oyKlqbfZOvwa7avkGEIi+1XkKqlnh 0jcDD7im6nKbwpauk6UeLn3WJerp7pWvF6NxC/WD83M6XpLyq8XkKFIMNtCMUrcNeLOKpA 9RyMlRywTNWdhD3yiXSrMqDHk1bK53zgWnH4+ukefq3Xwxon3MMpFGqqB4b3ZyeMenDkvk Dr7eLJ0NYE5iu/OtRBEUtB80vbtu0QSSLVlB10SLw+JHtMRkJmlAy5abe0gazg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9c983ad791c3ca8213cae949f9ad381d1309ad8e commit 9c983ad791c3ca8213cae949f9ad381d1309ad8e Author: Ed Maste AuthorDate: 2021-11-25 18:50:03 +0000 Commit: Ed Maste CommitDate: 2021-11-26 01:08:21 +0000 arch.7: update applicable FreeBSD versions to 12.0 and later Information in this document is unchanged between 11.x and 12.x, but this is intended to be a quick reference for supported architectures. Also bump .Dd to cover recent changes including MIPS deprecation. Sponsored by: The FreeBSD Foundation --- share/man/man7/arch.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 1d4a27975123..476d46218bee 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 10, 2021 +.Dd November 25, 2021 .Dt ARCH 7 .Os .Sh NAME @@ -44,7 +44,7 @@ documentation. .Pp If not explicitly mentioned, sizes are in bytes. The architecture details in this document apply to -.Fx 11.0 +.Fx 12.0 and later, unless otherwise noted. .Pp .Fx From nobody Fri Nov 26 03:10:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7D16818AB10F; Fri, 26 Nov 2021 03:10: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 4J0frH3F0Qz4V4f; Fri, 26 Nov 2021 03:10:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 449322933E; Fri, 26 Nov 2021 03:10: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 1AQ3AN0g005005; Fri, 26 Nov 2021 03:10:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQ3ANFe005004; Fri, 26 Nov 2021 03:10:23 GMT (envelope-from git) Date: Fri, 26 Nov 2021 03:10:23 GMT Message-Id: <202111260310.1AQ3ANFe005004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: e29711da2352 - main - etc/defaults/rc.conf: Add -i flag to rtsol/rtsold List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e29711da2352dae50c575ab884399a6147e9444d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637896223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oMS3f1lrYaPBSkGi81solK/lX1ED9LGBuqA2rSzUsmc=; b=ThvlcUpjy+cDhHOhOlzpxN5SxqlUfTEXNbHYiaafdct8qK0BR0Rmlrt2zWIVa9XlbolXRg vfDG0U3jeYma07yTRcvBayHGsAcWWN0s7/8uZtfb6lXQEqRTWxysK4G67VV+Xl+Hz/ZG3r AAlBe1pxYkiOSP5WSmVu0s8yQ3WI/Apv25msSjl3kNU68mhxRPxGYoC+IFt+Zv7A7vOob1 sPFswgsNRaWPdpzdFHiyWuVoko9fFit+jcvWV0wmqA03f+aVHGKUTbsLykTQa1VpBuPi4w E3rCzM61Usu0jlmGCUO2xjnbzJiUhAoTMdXTXQevb7QjBtSn4ieWVLeFV1mIMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637896223; a=rsa-sha256; cv=none; b=kb71jnTGUnwHfF3E5P4TAP/DIKRfokd7/yT/KwvwTxFvO0NaAMQe1WnL1GUNV2m/JAj4aa krGMFUYHrV1y/L+4pdVrj1nFeQCuwlGIJffdk4pR0SDRkxEuDa+yDjlKF1RTCR319CZYKB wX1uE6y5ZK4KgmLJ6PLcOzQKH6q60WQlvORd2EoONSRce5HnXcr7vN64v4bt3DK48X09rd hImix50fjsUeO0rdBsbdrsCmnK3CVpX0e7J9EqJ9Xk0jdM2Mh7WHi9Q1wHhT5R0w87bHuk lKTxIK9Z5BXEas2tMDydVgMlrd2a6bs1VueIDerGTHQhs9d4LMcAM5SId9sWKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e29711da2352dae50c575ab884399a6147e9444d commit e29711da2352dae50c575ab884399a6147e9444d Author: Colin Percival AuthorDate: 2021-11-22 21:51:43 +0000 Commit: Colin Percival CommitDate: 2021-11-26 03:08:15 +0000 etc/defaults/rc.conf: Add -i flag to rtsol/rtsold This disables the random (between zero and one seconds) delay before rtsol and rtsold send a a Router Solicitation packet. This delay is specified as a SHOULD by RFC 4861 for avoidance of network congestion, but network speeds have increased enough in the 25 years since this first appeared (in RFC 1970) that it seems unnecessary as a default at this point. This speeds up the FreeBSD boot process by an average of 500 ms. Reviewed by: kp MFC after: 1 week Relnotes: yes Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D33089 --- libexec/rc/rc.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index b27e1154a5e7..c6f1218ed98d 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -521,10 +521,10 @@ route6d_flags="" # Flags to IPv6 routing daemon. ipv6_default_interface="NO" # Default output interface for scoped addrs. # This works only with # ipv6_gateway_enable="NO". -rtsol_flags="" # Flags to IPv6 router solicitation. +rtsol_flags="-i" # Flags to IPv6 router solicitation. rtsold_enable="NO" # Set to YES to enable an IPv6 router # solicitation daemon. -rtsold_flags="-a" # Flags to an IPv6 router solicitation +rtsold_flags="-a -i" # Flags to an IPv6 router solicitation # daemon. rtadvd_enable="NO" # Set to YES to enable an IPv6 router # advertisement daemon. If set to YES, From nobody Fri Nov 26 03:10:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 06D3418AB0C9; Fri, 26 Nov 2021 03: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 4J0frJ4HK6z4TwK; Fri, 26 Nov 2021 03:10:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72C4E2933F; Fri, 26 Nov 2021 03:10: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 1AQ3AO8q005029; Fri, 26 Nov 2021 03:10:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQ3AOXs005028; Fri, 26 Nov 2021 03:10:24 GMT (envelope-from git) Date: Fri, 26 Nov 2021 03:10:24 GMT Message-Id: <202111260310.1AQ3AOXs005028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 81075203a057 - main - EC2: Turn off IPv6 DAD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81075203a057c9ba3467a7f90ea1e9469d7f7723 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637896224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yX3q5FkbWAuFlyMSW3Gcn9j+tq/ILDGD4OOINN57A3w=; b=reRIN6fqefS4SVA/kYImaF+PnHb7Sf1rcmc5iui6mAOmdupphnR/2IZn2A//Xk60oLUuF6 ow2tMJ38uLEQ7vecLn+12jBdJ+8oh96zV9kQ0MEqY12kDWagygvHf8gKbf5437hk6YRD76 i7fuFldswleQ9m0USVtY2SlsM0fXKosvZHFEBy3zVsUkFe9zvATmIRqSKQbGnoBXRC0lza LSNyFlH2OZojmMMwKeCmH6vr64C1JhQF/AoJbbYCIMPP21cCwRsWV0C5Uc0rT/+dGe5lrn Q6uYwZnENTfqDgAOKfbws1tn+k9X+PG3mmy5/47P5HREN8PfDraHBo6ayeb2BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637896224; a=rsa-sha256; cv=none; b=a081U4QE+q75gh24B/IvST6JmTXKMpfrtKABNP2212XINz35dab50K7uAUwEVOoRwgnP0I V96EvgSwLqiU9pGX+VkkdnK+sPyrfToIDxT87Zk/mrtrPH5/g7m1jI2YDkl87pxs3orL7b dulQdhjpGYBmy8vtRwtFR/KtoJeuC+U/7daaR7mxabCqL+UaKjZ6vr4s1ceP9K2K0sFT4P ufRlMx7Akpp8RN3xU6zo7uZDmt++iO+2ydfDGjHHNxuhi+VULGnya7o2t0S57hMl49U/P6 COMzvq/ZFwfbVioi+sIYmPzL0xZf0IlEI2wxJ63FpK1j3rt2zM9G8dKxdIOa3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=81075203a057c9ba3467a7f90ea1e9469d7f7723 commit 81075203a057c9ba3467a7f90ea1e9469d7f7723 Author: Colin Percival AuthorDate: 2021-11-23 04:16:34 +0000 Commit: Colin Percival CommitDate: 2021-11-26 03:08:48 +0000 EC2: Turn off IPv6 DAD Disable Duplicate Address Detection in EC2 instances. The networking configuration in EC2, with IPv6 addresses assigned by DHCPv6 and host egress filtering, makes "duplicate addresses" impossible. This speeds up the boot process in EC2 by 2 seconds. Reviewed by: kp, imp, bz MFC after: 2 weeks Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D33091 --- release/tools/ec2.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index 2bf47b01077d..f0665646088b 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -70,6 +70,10 @@ vm_extra_pre_umount() { echo 'rtsold_enable="YES"' >> ${DESTDIR}/etc/rc.conf echo 'rtsold_flags="-M /usr/local/libexec/rtsold-M -a"' >> ${DESTDIR}/etc/rc.conf + # Turn off IPv6 Duplicate Address Detection; the EC2 networking + # configuration makes it unnecessary. + echo 'net.inet6.ip6.dad_count=0' >> ${DESTDIR}/etc/sysctl.conf + # Provide a script which rtsold can use to launch DHCPv6 mkdir -p ${DESTDIR}/usr/local/libexec cat > ${DESTDIR}/usr/local/libexec/rtsold-M <<'EOF' From nobody Fri Nov 26 07:52:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 717A318A0341; Fri, 26 Nov 2021 07:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0n6C6tczz4cpw; Fri, 26 Nov 2021 07:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB4942CDE4; Fri, 26 Nov 2021 07:52: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 1AQ7qp27080900; Fri, 26 Nov 2021 07:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQ7qpa3080899; Fri, 26 Nov 2021 07:52:51 GMT (envelope-from git) Date: Fri, 26 Nov 2021 07:52:51 GMT Message-Id: <202111260752.1AQ7qpa3080899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: ecff38de76de - main - pci_vendors: update to 2021-11-24 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ecff38de76ded358558aacc62c1081da4451c8fb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637913172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hg7J4DaYpZJWvfHl6WoXpJkQElKEd0RE9g0ImgPr758=; b=dU7LRDq62cMwKqLy+nxN3hunAbQ79z5nUf19WBPKAuLpPqey+iUoGImDF5wf2U30F7y4mG SVvHrrPHmOIpD9MH/yNaKfNwDNBw2ZlBHr+PHHYHulsG30WZ4TILlUvQLJSSJdMqb4RzVD NvF/80id7v0fgChMbFzKUNLPGxPJ0QWYfYO0mxMXAasJwWEAccBKAZ5xDMdY5QeriXRMuF ULqUB1bkY90Qu3PiMOiwJADQdCneCS+5nTzZNqe/ynlybWWrl5KSwMFmWdMk016pzE50Fv Bg/YAxjXO4DU6MuiWyKjxrn9ddKok+tUb+w6VqJLKSVyngUBHzFKA/l+nwOxMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637913172; a=rsa-sha256; cv=none; b=EDG+KyB5nbkBRKa+sot1qFhlDDehgSY+giwAyW9WvIW6XxxWUhbF3KvnNrkkBPEEtfwsxj 4L+QZiIsPB6seDxrSKPPdbPm6xiIxAT2TRqGRlswRjky3Rc2845zFxR0rn0RVA/d+wv9Ve bY/aE4qfth0bhI3HSKS9n1vhR60Ff/f/MYuf+3PLNtg09W402xaSG0Bt+qDmA//kbciqix K0NyTcMUmWsAH8fMbr5rvuUfRWs3yx27o19ezlAb4z7riD6TLwimoF0PNNRHUtYXYNhloR Q6L+06bmJxiVH7l+3LZmz5QsfFcB3D5T5p2xBtkUMYRmouxcwWQzkosVZKHtxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=ecff38de76ded358558aacc62c1081da4451c8fb commit ecff38de76ded358558aacc62c1081da4451c8fb Author: Baptiste Daroussin AuthorDate: 2021-11-26 07:52:20 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-26 07:52:46 +0000 pci_vendors: update to 2021-11-24 --- share/misc/pci_vendors | 192 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 169 insertions(+), 23 deletions(-) diff --git a/share/misc/pci_vendors b/share/misc/pci_vendors index 79866ff1cd29..135e9fb45441 100644 --- a/share/misc/pci_vendors +++ b/share/misc/pci_vendors @@ -1,8 +1,8 @@ # # List of PCI ID's # -# Version: 2021.09.19 -# Date: 2021-09-19 03:15:02 +# Version: 2021.11.24 +# Date: 2021-11-24 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -1017,7 +1017,7 @@ 1551 Arlene 1552 Pooky 1561 Anubis - 15d8 Picasso + 15d8 Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] 103c 8615 Pavilion Laptop 15-cw1xxx 17aa 3181 ThinkCentre M75n IoT 17aa 5124 ThinkPad E595 @@ -2035,6 +2035,8 @@ 6658 Bonaire XTX [Radeon R7 260X/360] 1043 048f R7260X-DC2OC-2GD5 1043 04d3 AMD Radeon R7 260X +# GV-R726XOC-1GD + 1458 227b Radeon R7 260X 148c 0907 Radeon R7 360 1682 0907 Radeon R7 360 1682 7360 Radeon R7 360 @@ -2082,7 +2084,7 @@ 6667 Jet ULT [Radeon R5 M230] 666f Sun LE [Radeon HD 8550M / R5 M230] 66a0 Vega 20 [Radeon Instinct] - 66a1 Vega 20 WKS GL-XE [Radeon Pro VII] + 66a1 Vega 20 [Radeon Pro VII/Radeon Instinct MI50 32GB] 66a2 Vega 20 66a3 Vega 20 [Radeon Pro Vega II/Radeon Pro Vega II Duo] 66a7 Vega 20 [Radeon Pro Vega 20] @@ -2695,6 +2697,7 @@ 67cc Ellesmere [Polaris10] 67cf Ellesmere [Polaris10] 67d0 Ellesmere [Radeon Pro V7300X / V7350x2] + 67d4 Ellesmere [Radeon Pro WX 7100 / Barco MXRT-8700] 67d7 Ellesmere [Radeon Pro WX 5100 / Barco MXRT-6700] 67df Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] 1002 0b37 Radeon RX 480 @@ -3704,6 +3707,7 @@ 1458 2313 Radeon RX 5700 XT Gaming OC 1682 5701 RX 5700 XT RAW II 1849 5120 Radeon RX 5600 XT + 1da2 e409 Sapphire Technology Limited Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] 1da2 e411 Radeon RX 5600 XT 7340 Navi 14 [Radeon RX 5500/5500M / Pro 5500M] 7341 Navi 14 [Radeon Pro W5500] @@ -3712,8 +3716,8 @@ 7360 Navi 12 [Radeon Pro 5600M / V520] 7362 Navi 12 [Radeon Pro V520] 7388 Arcturus GL-XL - 738c Arcturus GL-XL [AMD Instinct MI100] - 738e Arcturus GL-XL + 738c Arcturus GL-XL [Instinct MI100] + 738e Arcturus GL-XL [Instinct MI100] 73a2 Navi 21 Pro-XTA [Radeon Pro W6900X] 73a3 Navi 21 GL-XL [Radeon PRO W6800] 73a4 Navi 21 USB @@ -4526,6 +4530,8 @@ 021b GXT6500P Graphics Adapter 021c GXT4500P Graphics Adapter 0233 GXT135P Graphics Adapter +# Internal debugging card for CELL based systems + 025a Drone card 028c Citrine chipset SCSI controller 1014 028d Dual Channel PCI-X DDR SAS RAID Adapter (572E) 1014 02be Dual Channel PCI-X DDR U320 SCSI RAID Adapter (571B) @@ -4735,14 +4741,14 @@ 1439 Family 16h Processor Functions 5:1 143a Kingston/Clayton/Gladius/Montego Root Complex 143b Kingston/Clayton/Gladius/Montego P2P Bridge for UMI Link - 1440 Matisse Device 24: Function 0 - 1441 Matisse Device 24: Function 1 - 1442 Matisse Device 24: Function 2 - 1443 Matisse Device 24: Function 3 - 1444 Matisse Device 24: Function 4 - 1445 Matisse Device 24: Function 5 - 1446 Matisse Device 24: Function 6 - 1447 Matisse Device 24: Function 7 + 1440 Matisse/Vermeer Data Fabric: Device 18h; Function 0 + 1441 Matisse/Vermeer Data Fabric: Device 18h; Function 1 + 1442 Matisse/Vermeer Data Fabric: Device 18h; Function 2 + 1443 Matisse/Vermeer Data Fabric: Device 18h; Function 3 + 1444 Matisse/Vermeer Data Fabric: Device 18h; Function 4 + 1445 Matisse/Vermeer Data Fabric: Device 18h; Function 5 + 1446 Matisse/Vermeer Data Fabric: Device 18h; Function 6 + 1447 Matisse/Vermeer Data Fabric: Device 18h; Function 7 1448 Renoir Device 24: Function 0 1449 Renoir Device 24: Function 1 144a Renoir Device 24: Function 2 @@ -4779,6 +4785,7 @@ 1471 Vega 10 PCIe Bridge 1480 Starship/Matisse Root Complex 1462 7c37 X570-A PRO motherboard + 15d9 1b95 H12SSL-i 1481 Starship/Matisse IOMMU 1482 Starship/Matisse PCIe Dummy Host Bridge 1483 Starship/Matisse GPP Bridge @@ -4792,6 +4799,7 @@ 148a Starship/Matisse PCIe Dummy Function 148b Starship/Matisse Non-Transparent Bridge 148c Starship USB 3.0 Host Controller + 15d9 145c H12SSL-i 148d Starship/Matisse Switch Upstream (PCIE SW.US) 148e Starship/Matisse Switch Downstream (PCIE SW.DS) 148f Starship Reserved SSP @@ -5009,6 +5017,23 @@ 1644 Renoir I2S 1648 VanGogh Root Complex 1649 VanGogh PSP/CCP + 164f Milan IOMMU + 1650 Milan Data Fabric; Function 0 + 1651 Milan Data Fabric; Function 1 + 1652 Milan Data Fabric; Function 2 + 1653 Milan Data Fabric; Function 3 + 1654 Milan Data Fabric; Function 4 + 1655 Milan Data Fabric; Function 5 + 1656 Milan Data Fabric; Function 6 + 1657 Milan Data Fabric; Function 7 + 166a Cezanne Data Fabric; Function 0 + 166b Cezanne Data Fabric; Function 1 + 166c Cezanne Data Fabric; Function 2 + 166d Cezanne Data Fabric; Function 3 + 166e Cezanne Data Fabric; Function 4 + 166f Cezanne Data Fabric; Function 5 + 1670 Cezanne Data Fabric; Function 6 + 1671 Cezanne Data Fabric; Function 7 1700 Family 12h/14h Processor Function 0 1701 Family 12h/14h Processor Function 1 1702 Family 12h/14h Processor Function 2 @@ -5212,6 +5237,7 @@ 103c 8615 Pavilion Laptop 15-cw1xxx 1043 876b PRIME Motherboard 1462 7c37 X570-A PRO motherboard + 15d9 7901 H12SSL-i ea50 ce19 mCOM10-L1900 7902 FCH SATA Controller [RAID mode] 7903 FCH SATA Controller [RAID mode] @@ -5222,12 +5248,14 @@ 103c 8615 Pavilion Laptop 15-cw1xxx 1043 876b PRIME Motherboard 1462 7c37 X570-A PRO motherboard + 15d9 790b H12SSL-i 17aa 5124 ThinkPad E595 ea50 ce19 mCOM10-L1900 790e FCH LPC Bridge 103c 8615 Pavilion Laptop 15-cw1xxx 1043 876b PRIME B450M-A Motherboard 1462 7c37 X570-A PRO motherboard + 15d9 790e H12SSL-i 17aa 5124 ThinkPad E595 ea50 ce19 mCOM10-L1900 790f FCH PCI Bridge @@ -10970,6 +10998,7 @@ 1043 8334 EN210 SILENT 1458 36a9 GV-N210D3-1GI (rev. 6.0/6.1) 1462 8094 N210 [Geforce 210] PCIe graphics adapter + 19da 7222 GeForce 210 1GB [Synergy Edition] 0a66 GT218 [GeForce 310] 0a67 GT218 [GeForce 315] 0a68 GT218M [GeForce G 105M] @@ -12340,6 +12369,7 @@ 21d1 TU116BM [GeForce GTX 1660 Ti Mobile] 2200 GA102 2204 GA102 [GeForce RTX 3090] + 147d 10de NVIDIA Geforce RTX 3090 Founders Edition 2205 GA102 [GeForce RTX 3080 Ti 20GB] 2206 GA102 [GeForce RTX 3080] 10de 1467 GA102 [GeForce RTX 3080] @@ -12352,6 +12382,7 @@ 222f GA102 [GeForce RTX 3080 11GB / 12GB Engineering Sample] 2230 GA102GL [RTX A6000] 2231 GA102GL [RTX A5000] + 2232 GA102GL [RTX A4500] 2235 GA102GL [A40] 2236 GA102GL [A10] 2237 GA102GL [A10G] @@ -12360,6 +12391,7 @@ 2296 Tegra PCIe Endpoint Virtual Network 2302 GA103 2321 GA103 + 2420 GA103M [GeForce RTX 3080 Ti Mobile] 2482 GA104 [GeForce RTX 3070 Ti] 2483 GA104 2484 GA104 [GeForce RTX 3070] @@ -12373,6 +12405,7 @@ 249c GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB] 249d GA104M [GeForce RTX 3070 Mobile / Max-Q] 249f GA104M + 24a0 GA104 [Geforce RTX 3070 Ti Laptop GPU] 24ac GA104 [GeForce RTX 30x0 Engineering Sample] 24ad GA104 [GeForce RTX 3060 Engineering Sample] 24af GA104 [GeForce RTX 3070 Engineering Sample] @@ -15222,6 +15255,7 @@ 2b38 88W8897 [AVASTAR] 802.11ac Wireless 2b40 88W8964 [Avastar] 802.11ac Wireless 4101 OLPC Cafe Controller Secure Digital Controller + 4146 GT-64111 System Controller 4320 88E8001 Gigabit Ethernet Controller 1019 0f38 Marvell 88E8001 Gigabit Ethernet Controller (ECS) 1019 8001 Marvell 88E8001 Gigabit Ethernet Controller (ECS) @@ -18738,6 +18772,7 @@ a804 NVMe SSD Controller SM961/PM961/SM963 144d a801 SM963 2.5" NVMe PCIe SSD a808 NVMe SSD Controller SM981/PM981/PM983 + 144d a801 SSD 970 EVO Plus 1TB 1d49 403b Thinksystem U.2 PM983 NVMe SSD a809 NVMe SSD Controller 980 a80a NVMe SSD Controller PM9A1/PM9A3/980PRO @@ -19300,6 +19335,7 @@ 103c 2133 NC332i Adapter 103c 22e8 NC332i Adapter 103c 22eb NC332i Adapter + 15d9 165f H12SSL-i 1662 NetXtreme II BCM57712 10 Gigabit Ethernet 1663 NetXtreme II BCM57712 10 Gigabit Ethernet Multi Function 1665 NetXtreme BCM5717 Gigabit Ethernet PCIe @@ -20083,6 +20119,7 @@ 2f30 SoftV92 SpeakerPhone SoftRing Modem with SmartSP 14f1 2014 Devolo MikroLink 56K Modem PCI 2f50 Conexant SoftK56 Data/Fax Modem + 510f Conexant CX 20751/20752 5b7a CX23418 Single-Chip MPEG-2 Encoder with Integrated Analog Video/Broadcast Audio Decoder 0070 7444 WinTV HVR-1600 107d 6f34 WinFast DVR3100 H @@ -20610,9 +20647,11 @@ 0262 MT27710 [ConnectX-4 Lx Programmable] EN 0263 MT27710 [ConnectX-4 Lx Programmable Virtual Function] EN 0264 Innova-2 Flex Burn image + 0270 Spectrum-4L, Flash recovery mode + 0271 Spectrum-4L, RMA + 0274 Spectrum-4C, Flash recovery mode + 0275 Spectrum-4C RMA 0281 NPS-600 Flash Recovery - 0357 Abir GearBox in Flash Recovery Mode - 0358 Abir GearBox in RMA 1002 MT25400 Family [ConnectX-2 Virtual Function] 1003 MT27500 Family [ConnectX-3] 1014 04b5 PCIe3 40GbE RoCE Converged Host Bus Adapter for Power @@ -20796,6 +20835,8 @@ cf6c MT53100 [Spectrum-2] cf70 Spectrum-3 cf80 Spectrum-4 + cf82 Spectrum-4L + cf84 Spectrum-4C d2f0 Quantum HDR (200Gbps) switch d2f2 Quantum-2 NDR (400Gbps) switch 15b4 CCI/TRIAD @@ -20830,7 +20871,8 @@ 500b PC SN530 NVMe SSD 1414 500b Xbox Series X 500d WD Ultrastar DC SN340 NVMe SSD - 5011 WD Black SN850 + 5011 WD PC SN810 / Black SN850 NVMe SSD + 501a WD Blue SN570 NVMe SSD 15b8 ADDI-DATA GmbH 1001 APCI1516 SP controller (16 digi outputs) 1003 APCI1032 SP controller (32 digi inputs w/ opto coupler) @@ -22945,6 +22987,7 @@ 1150 AST1150 PCI-to-PCI Bridge 2000 ASPEED Graphics Family 15d9 0832 X10SRL-F + 15d9 1b95 H12SSL-i 1a05 deltaww 1a07 Kvaser AB 0006 CAN interface PC104+ HS/HS @@ -23334,6 +23377,8 @@ 1028 1fdf BOSS-S1 Modular 1028 1fe2 BOSS-S1 Adapter 1028 2010 BOSS-S2 Adapter +# RS0200L6R2iM2 + 1bd4 0073 RS0200L6R2iM2 1d49 0300 ThinkSystem M.2 with Mirroring Enablement Kit 1d49 0301 ThinkSystem SR630 x16 PCIE with 4 SATA ports Riser 1d49 0302 ThinkSystem SE350 M.2 SATA 4-Bay Data RAID Mirroring Enablement Kit @@ -23591,6 +23636,7 @@ 1339 BC511 1504 SC300 512GB M.2 2280 SATA Solid State Drive 1527 PC401 NVMe Solid State Drive 256GB + 174a Gold P31 SSD 243b PE6110 NVMe Solid State Drive 1c5c 0100 PE6110 NVMe Solid State Drive 2839 PE8000 Series NVMe Solid State Drive @@ -23627,10 +23673,11 @@ 0001 Hunter PCI Express 1c8c Mobiveil, Inc. 1cb0 Shannon Systems - 8266 Andalusia Series SSD - 1cb0 2021 Andalusia Series OCS U.2 SSD - 1cb0 2121 Andalusia Series ZNS U.2 SSD - 1cb0 2f21 Andalusia Series NVMe U.2 SSD + 8266 SP4 Series SSD + 1cb0 2021 SP4 Series OCS U.2 SSD + 1cb0 2121 SP4 Series ZNS U.2 SSD + 1cb0 2f21 SP4E Series NVMe U.2 SSD(1920/3840/7680GB) + 1cb0 2f22 SP4X Series NVMe U.2 SSD(1600/3200/6400GB) d000 Venice NVMe SSD 1cb0 2010 Venice-E Series OCS U.2 1cb0 2011 Venice Series OCS U.2 @@ -23777,6 +23824,12 @@ f410 ZX-100/ZX-D/ZX-E PCI Com Port 1d18 RME 0001 Fireface UFX+ +# acquired by Intel +1d1c Barefoot Networks, Inc. + 0001 Tofino 1 + 0010 Tofino 1 + 0100 Tofino 2 + 0110 Tofino 2 1d1d CNEX Labs 1f1f QEMU NVM Express LightNVM Controller 2807 8800 series NVMe SSD @@ -24031,6 +24084,12 @@ 1dd8 4014 DSC-100 40/100G 2-port 8G RAM 16G eMMC G1 Services Card 1dd8 5001 DSC2-200 50/100/200G 2-port 32G RAM 64G eMMC G2 Services Card 1dd8 5003 DSC2-200 50/100/200G 2-port 32G RAM 64G eMMC G2 Services Card + 1005 DSC NVMe Controller + 1dd8 5001 DSC2-200 50/100/200G 2-port 32G RAM 64G eMMC G2 Services Card + 1dd8 5003 DSC2-200 50/100/200G 2-port 32G RAM 64G eMMC G2 Services Card + 1006 DSC NVMe Controller VF + 1dd8 5001 DSC2-200 50/100/200G 2-port 32G RAM 64G eMMC G2 Services Card + 1dd8 5003 DSC2-200 50/100/200G 2-port 32G RAM 64G eMMC G2 Services Card 1007 DSC Storage Accelerator 1dd8 4000 Naples 100Gb 2-port QSFP28 x16 8GB 1dd8 4001 Naples 100Gb 2-port QSFP28 x16 4GB @@ -24183,6 +24242,7 @@ 0022 T20(64GB) [CloudBlazer] 0023 T21(32GB) [CloudBlazer] 0024 T21(64GB) [CloudBlazer] + 8001 I20 [CloudBlazer] 8011 I10 [CloudBlazer] 8012 I10L [CloudBlazer] # nee Thinci, Inc @@ -24244,6 +24304,7 @@ 0001 MinION Mk1C 1e60 Hailo Technologies Ltd. 2864 Hailo-8 AI Processor +1e68 Jiangsu Xinsheng Intelligent Technology Co., Ltd 1e6b Axiado Corp. 1e7b Dataland 1e7c Brainchip Inc @@ -24266,8 +24327,12 @@ # aka SED Systems 1e94 Calian SED 1e95 Solid State Storage Technology Corporation + 1002 NVMe Datacenter LJ1 SSD [3DNAND, Rainier Controller] + 1ea0 5636 TP1500 Series U.2 NVMe Datacenter SSD +1e9f Lynxi Technologies Co., Ltd. 1ea0 Tencent Technology (Shenzhen) Company Limited 2a16 Cloud Intelligent Inference Controller + 2a18 Video Transcode Controller 1ea7 Intelliprop, Inc 223a Typhon+ PCIe to Gen-Z Bridge 224a IPA-PE224A CXL to Gen-Z Bridge [Sphinx] @@ -24279,12 +24344,16 @@ 1001 Video Accelerator 1ebd EMERGETECH Company Ltd. 0101 Seirios 2063 Video Codec +1ed2 FuriosaAI, Inc. + 0000 Warboy 1ed3 Yeston 1ed8 Digiteq Automotive 0101 FG4 PCIe Frame Grabber 1ed9 Myrtle.ai 1ee9 SUSE LLC 1eec Viscore Technologies Ltd + 0102 VSE250231S Dual-port 10Gb/25Gb Ethernet PCIe + 1eec VSE250231S Dual-port 10Gb/25Gb Ethernet PCIe 1efb Flexxon Pte Ltd 1f02 Beijing Dayu Technology 1f03 Shenzhen Shichuangyi Electronics Co., Ltd @@ -24296,6 +24365,7 @@ 5236 IG5236-Based NVMe SSD 5636 IG5636-Based NVMe SSD 1fab Unifabrix Ltd. + 0000 Nexus Alpha IVPU # nee Tumsan Oy 1fc0 Ascom (Finland) Oy 0300 E2200 Dual E1/Rawpipe Card @@ -24369,6 +24439,7 @@ 2048 Beijing SpaceControl Technology Co.Ltd 20f4 TRENDnet 2116 ZyDAS Technology Corp. +21b4 Hunan Goke Microelectronics Co., Ltd 21c3 21st Century Computer Corp. 22b8 Flex-Logix Technologies 22a0 Flex Logix InferX X1 Inference Accelerator @@ -24382,12 +24453,14 @@ 2263 A2000 NVMe SSD 5008 U-SNS8154P3 NVMe SSD 500d OM3PDP3 NVMe SSD + 500e SNVS2000G [NV1 NVMe PCIe SSD 2TB] 270b Xantel Corporation 270f Chaintech Computer Co. Ltd 2711 AVID Technology Inc. 2955 Connectix Virtual PC 6e61 OHCI USB 1.1 controller 2a15 3D Vision(???) +2a18 Video Transcode Controller 2bd8 ROPEX Industrie-Elektronik GmbH 3000 Hansol Electronics Inc. 3112 Satelco Ingenieria S.A. @@ -24428,6 +24501,7 @@ 1783 AS-i 3.0 cPCI Master 1922 AS-i 3.0 PCI Master 3475 Arista Networks, Inc. +34ba Ice Lake-LP PCI Express Root Port #3 3513 ARCOM Control Systems Ltd 37d9 ITD Firm ltd. 1138 SCHD-PH-8 Phase detector @@ -24536,6 +24610,7 @@ 416c Aladdin Knowledge Systems 0100 AladdinCARD 0200 CPC +4242 Universall Answer Generators 4254 DVBSky 4321 Tata Power Strategic Electronics Division 4348 WCH.CN @@ -24547,7 +24622,6 @@ 7073 CH356 PCI Quad Serial and Parallel Ports Controller 7173 CH355 PCI Quad Serial Port Controller 434e Cornelis Networks -43bc Tiger Lake-H PCIe Root Port #5 4444 Internext Compression Inc 0016 iTVC16 (CX23416) Video Decoder 0070 0003 WinTV PVR 250 @@ -25206,7 +25280,7 @@ 015d Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port 1043 844d P8 series motherboard 015e Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller - 0162 Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller + 0162 IvyBridge GT2 [HD Graphics 4000] 1043 84ca P8 series motherboard 1849 0162 Motherboard 0166 3rd Gen Core processor Graphics Controller @@ -25339,6 +25413,7 @@ 8086 01f7 SCRU32 # uninitialized SRCU32 RAID Controller 061f 80303 I/O Processor + 0687 Q470 Chipset LPC/eSPI Controller 068d Comet Lake LPC Controller 06a3 Comet Lake PCH SMBus Controller 06a4 Comet Lake PCH SPI Controller @@ -25352,6 +25427,8 @@ 06c0 Comet Lake PCI Express Root Port #17 06c8 Comet Lake PCH cAVS 06d2 Comet Lake SATA AHCI Controller + 06d6 Comet Lake PCH-H RAID + 06d7 Comet Lake PCH-H RAID 06e0 Comet Lake HECI Controller 06e3 Comet Lake Keyboard and Text (KT) Redirection 06e8 Comet Lake PCH Serial IO I2C Controller #0 @@ -25856,7 +25933,9 @@ 8086 8008 NVMe Datacenter SSD [3DNAND] SE 2.5" U.2 (P5510) 8086 8d08 NVMe Datacenter SSD [3DNAND] VE 2.5" U.2 (P5316) 8086 8d1d NVMe Datacenter SSD [3DNAND] VE E1.L 9.5/18mm (P5316) + 8086 c008 NVMe Datacenter SSD [3DNAND] SE U.2 15mm (P5530) 0bd0 Ponte Vecchio 2T + 0bd5 Ponte Vecchio 1T 0be0 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 0be1 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 105b 0d7c D270S/D250S Motherboard @@ -25958,6 +26037,9 @@ 8086 0000 Ethernet Controller XXV710 Intel(R) FPGA Programmable Acceleration Card N3000 for Networking 8086 0001 Ethernet Controller XXV710 Intel(R) FPGA Programmable Acceleration Card N3000 for Networking 0d9f Ethernet Controller (2) I225-IT + 0dd2 Ethernet Network Adapter I710 + 8086 000d Ethernet Network Adapter I710-T4L + 8086 0010 Ethernet Network Adapter I710-T4L for OCP 3.0 0e00 Xeon E7 v2/Xeon E5 v2/Core i7 DMI2 1028 04f7 Xeon E5 v2 on PowerEdge R320 server 15d9 066b X9SRL-F @@ -27053,6 +27135,7 @@ 1530 X540 Virtual Function 1531 I210 Gigabit Unprogrammed 1533 I210 Gigabit Network Connection + 1028 0b35 I210 Gigabit Network Connection 103c 0003 Ethernet I210-T1 GbE NIC 1059 0180 RD10019 1GbE interface 1093 7706 Compact Vision System Ethernet Adapter @@ -27323,6 +27406,8 @@ 1137 02be E810XXVDA2 2x25/10 GbE SFP28 PCIe NIC 1bd4 0057 Ethernet Network Adapter E810-XXVAM2 1bd4 0058 Ethernet Network Adapter E810-XXVAM2 for OCP 3.0 + 1bd4 006e Ethernet Network Adapter E810-XXVAM2 for BD + 1eec 0102 VSE250241E Dual-port 10Gb/25Gb Ethernet PCIe 8086 0001 Ethernet 25G 2P E810-XXV OCP 8086 0002 Ethernet 25G 2P E810-XXV Adapter 8086 0003 Ethernet Network Adapter E810-XXV-2 @@ -27443,6 +27528,10 @@ 8086 000b Ethernet Network Adapter X710-T2L for OCP 3.0 8086 000c Ethernet Network Adapter X710-T2L for OCP 3.0 8086 000f Ethernet Network Adapter X710-T2L for OCP 3.0 + 8086 4009 Ethernet Network Adapter X710-T2L + 8086 4012 Ethernet Network Adapter X710-T4L for OCP 3.0 + 8086 4018 Ethernet Network Adapter X710-T2L for OCP 3.0 + 8086 4019 Ethernet Network Adapter X710-T4L 1600 Broadwell-U Host Bridge -OPI 1601 Broadwell-U PCI Express x16 Controller 1602 Broadwell-U Integrated Graphics @@ -31029,6 +31118,7 @@ 34ab Ice Lake-LP Serial IO SPI Controller #1 34b0 Ice Lake-LP PCI Express Root Port #9 34b7 Ice Lake-LP PCI Express Root Port #16 + 34ba Ice Lake-LP PCI Express Root Port #3 34bc Ice Lake-LP PCI Express Root Port #5 34c5 Ice Lake-LP Serial IO I2c Controller #4 34c6 Ice Lake-LP Serial IO I2c Controller #5 @@ -31825,16 +31915,25 @@ 8086 0264 Wireless-AC 9461 8086 02a4 Wireless-AC 9462 444e Turbo Memory Controller + 460d 12th Gen Core Processor PCI Express x16 Controller #1 461e Alder Lake-P Thunderbolt 4 USB Controller 461f Alder Lake-P Thunderbolt 4 PCI Express Root Port #3 + 4629 12th Gen Core Processor Host Bridge/DRAM Registers 462f Alder Lake-P Thunderbolt 4 PCI Express Root Port #2 + 463d 12th Gen Core Processor PCI Express x4 Controller #2 463e Alder Lake-P Thunderbolt 4 NHI #0 463f Alder Lake-P Thunderbolt 4 PCI Express Root Port #1 + 4641 12th Gen Core Processor Host Bridge/DRAM Registers + 464d 12th Gen Core Processor PCI Express x4 Controller #0 + 464f 12th Gen Core Processor Gaussian & Neural Accelerator 466d Alder Lake-P Thunderbolt 4 NHI #1 466e Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 + 467d Platform Monitoring Technology 467f Volume Management Device NVMe RAID Controller 4680 AlderLake-S GT1 46a0 AlderLake-P GT2 + 46a1 UHD Graphics + 46a3 Alder Lake-P GT1 [UHD Graphics] 46c0 AlderLake-M GT1 4905 DG1 [Iris Xe MAX Graphics] 4906 DG1 [Iris Xe Pod] @@ -31907,6 +32006,26 @@ 504a EP80579 Reserved 504b EP80579 Reserved 504c EP80579 Integrated Processor with QuickAssist TDM + 5181 Alder Lake PCH-P LPC/eSPI Controller + 51a3 Alder Lake PCH-P SMBus Host Controller + 51a4 Alder Lake-P PCH SPI Controller + 51bf Alder Lake PCH-P PCI Express Root Port #9 + 51c5 Alder Lake-P Serial IO I2C Controller #0 + 51c6 Alder Lake-P Serial IO I2C Controller #1 + 51c8 Alder Lake PCH-P High Definition Audio Controller + 51d3 Alder Lake-P SATA AHCI Controller + 51e0 Alder Lake PCH HECI Controller + 51e8 Alder Lake PCH Serial IO I2C Controller #0 + 51e9 Alder Lake PCH Serial IO I2C Controller #1 + 51ea Alder Lake PCH Serial IO I2C Controller #2 + 51eb Alder Lake PCH Serial IO I2C Controller #3 + 51ed Alder Lake PCH USB 3.2 xHCI Host Controller + 51ef Alder Lake PCH Shared SRAM + 51f0 Alder Lake-P PCH CNVi WiFi + 8086 0034 Wireless-AC 9560 160MHz + 8086 0070 Wi-Fi 6 AX201 160MHz + 8086 0074 Wi-Fi 6 AX201 160MHz + 8086 4070 Wi-Fi 6 AX201 160MHz 5200 EtherExpress PRO/100 Intelligent Server PCI Bridge 5201 EtherExpress PRO/100 Intelligent Server Fast Ethernet Controller 8086 0001 EtherExpress PRO/100 Server Ethernet Adapter @@ -33200,6 +33319,7 @@ a2f0 200 Series PCH HD Audio 1462 7a72 H270 PC MATE 1462 fa72 H270 PC MATE + a303 H310 Chipset LPC/eSPI Controller a304 H370 Chipset LPC/eSPI Controller 1028 0869 Vostro 3470 a305 Z390 Chipset LPC/eSPI Controller @@ -33260,10 +33380,16 @@ a379 Cannon Lake PCH Thermal Controller 1028 0869 Vostro 3470 a382 400 Series Chipset Family SATA AHCI Controller + a394 Comet Lake PCI Express Root Port #05 + a397 Comet Lake PCI Express Root Port #08 a3a1 Memory controller a3a3 Comet Lake PCH-V SMBus Host Controller a3af Comet Lake PCH-V USB Controller a3b1 Comet Lake PCH-V Thermal Subsystem + a3ba Comet Lake PCH-V HECI Controller + a3c8 B460 Chipset LPC/eSPI Controller + a3eb Comet Lake PCI Express Root Port #21 + a3f0 Comet Lake PCH-V cAVS a620 6400/6402 Advanced Memory Buffer (AMB) abc0 Omni-Path Fabric Switch Silicon 100 Series b152 21152 PCI-to-PCI Bridge @@ -33309,6 +33435,7 @@ 8086 390b SSD Pro 7600p/760p/E 6100p Series [NVM Express] f1a8 SSD 660P Series 8088 Beijing Wangxun Technology Co., Ltd. + 0100 WX1860AL-W Gigabit Ethernet Controller 0101 WX1860A2 Gigabit Ethernet Controller 8088 0201 Dual-Port Ethernet Network Adaptor SF200T 8088 4201 Dual-Port Ethernet Network Adaptor SF200T (WOL) @@ -33738,6 +33865,20 @@ 1bd4 004b RAID PM8204-2GB 1bd4 004c RAID PM8204-4GB 1bd4 004f PM8222-HBA + 1bd4 006b RS0800M5H24I + 1bd4 006c RS0800M5E8i + 1bd4 006d RS0800M5H8i + 1bd4 006f RS0804M5R16i + 1bd4 0070 RS0800M5E24i + 1bd4 0071 RS0800M5H16i + 1bd4 0072 RS0800M5E16i + 1d49 0220 ThinkSystem 4350-8i SAS/SATA 12Gb HBA + 1d49 0221 ThinkSystem 4350-16i SAS/SATA 12Gb HBA + 1d49 0520 ThinkSystem RAID 5350-8i PCIe 12Gb Adapter + 1d49 0620 ThinkSystem RAID 9350-8i 2GB Flash PCIe 12Gb Adapter + 1d49 0621 ThinkSystem RAID 9350-8i 2GB Flash PCIe 12Gb Internal Adapter + 1d49 0622 ThinkSystem RAID 9350-16i 4GB Flash PCIe 12Gb Adapter + 1d49 0623 ThinkSystem RAID 9350-16i 4GB Flash PCIe 12Gb Internal Adapter 9005 0608 SmartRAID 3162-8i /e 9005 0800 SmartRAID 3154-8i 9005 0801 SmartRAID 3152-8i @@ -34354,6 +34495,10 @@ C 04 Multimedia controller C 05 Memory controller 00 RAM memory 01 FLASH memory + 02 CXL + 00 CXL Memory Device - vendor specific +# Devices compliant to CXL spec + 10 CXL Memory Device (CXL 2.x) 80 Memory controller C 06 Bridge 00 Host bridge @@ -34468,6 +34613,7 @@ C 0c Serial bus controller 02 BT (Block Transfer) 08 SERCOS interface 09 CANBUS + 80 Serial bus controller C 0d Wireless controller 00 IRDA controller 01 Consumer IR controller From nobody Fri Nov 26 10:53:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8D0B518B56C5; Fri, 26 Nov 2021 10:53:09 +0000 (UTC) (envelope-from peterj@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 4J0s6F1Ycwz4Vph; Fri, 26 Nov 2021 10:53:09 +0000 (UTC) (envelope-from peterj@freebsd.org) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 9B1FA254F9; Fri, 26 Nov 2021 10:53:07 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Fri, 26 Nov 2021 21:53:03 +1100 From: Peter Jeremy To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b19740f4ce7a - main - swap_pager: lock vnode in swapdev_strategy() Message-ID: References: <202111251935.1APJZA1e094731@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: <202111251935.1APJZA1e094731@gitrepo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637923989; 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=Ypeel5Wd138v2d5FU19Xb8DzIFbQIw/zNjTZZBembfo=; b=KM8STz21htv4qAI48oqjITpdSNW+8LCCJgCDdQtX4r4L/n29tVrwN9wjCmmn+V0IJ5sZCM deUONtcgriuuIeqkcsRzjSQnJdjOZD+wkEwAdCk3xn9FH/OshjgF1YbxUr5ZpeG8mg0onS wYEbyWPH7viZ2OiYlR//CJpayjtSh0d1MyKj3uk7vIgNJjlQt1EI/8cqtogssb5X+c3THW PsgAUhvXM5GyNG5jytrof8cbXj/DAlxQZfoDN8H4coUhNxNtb9fkxZbfOOi2RqAztweBGN zKoZprLrRErke20yK533RpieYG2M49kYSTpUyv7YttmvvqJZkrh1htk8Yz1g+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637923989; a=rsa-sha256; cv=none; b=tGGqmnXWLBN0lgquLU5b5QvwNwsZ4P3jDXlvXMWaivhnR98/O0v29mTgWbGK7aVSgr+IjV Dt8ZUFlXbYNLoUSbGbdjMKszWMN/q6qn7RVKjEEO4VTJgL94tQU3xuu9YTCbZzjPqb1bnZ 9u48CMnED5m2/6q7jkKj6v2sb6Jc23Lm5faXHDO/fQ2731FePfEukyKonLGB8TauRogrDm dSSob81xxFBs18VLp+8jOjsyogKzbOmTpUg53w5kOUU3jxn0SbKwPzOdGT+zHkBlHb0QRv sEmTISnjITQP06M6s1333x7CFGAdJtiavfAQCfn+ghlMQ8cjvR9rPe49jeQXYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 2021-Nov-25 19:35:10 +0000, Konstantin Belousov wrote: > swap_pager: lock vnode in swapdev_strategy() > > VOP_STRATEGY() requires locked vnode. Note that we lock the swap vnode > while pages are busy, but this would only cause real LoR if pages belong > to the swap vnode, which must not be the case for correct use. > > Reported and tested by: peterj Thanks for those fixes. Unfortunately, I've bumped into another edge case: The system can panic during shutdown because it tries to swap in data after the network is shutdown. For reasons I haven't tracked down, a "swapoff" can fail even though there should be more than enough RAM. As an example: Stopping cron. Waiting for PIDS: 1024. swapoff: /usr/obj/swapfile: Cannot allocate memory Stopping ntpd. Waiting for PIDS: 1012. Stopping tincd for: vpn Waiting for PIDS: 758. Stopping rtsold. Waiting for PIDS: 351. Stopping devd. Waiting for PIDS: 754. Writing entropy file: . Writing early boot entropy file: . . Terminated Nov 26 03:18:44 rock64 syslogd: exiting on signal 15 Waiting (max 60 seconds) for system process `vnlru' to stop... done Waiting (max 60 seconds) for system process `syncer' to stop... Syncing disks, vnodes remaining... 0 0 0 done Waiting (max 60 seconds) for system thread `bufdaemon' to stop... done Waiting (max 60 seconds) for system thread `bufspacedaemon-0' to stop... done All buffers synced. No strategy for buffer at 0xffff0000c0cd3000 vnode 0xffffa00006475e00: type VBAD usecount 3, writecount 0, refcount 974016 seqc users 1 hold count flags () flags (VIRF_DOOMED|VV_VMSIZEVNLOCK) lock type nfs: SHARED (count 1) swap_pager: I/O error - pagein failed; blkno 184,size 4096, error 45 panic: VOP_STRATEGY failed bp=0xffff0000c0cd3000 vp=0 cpuid = 0 time = 1637857131 KDB: stack backtrace: db_trace_self() at db_trace_self db_trace_self_wrapper() at db_trace_self_wrapper+0x30 vpanic() at vpanic+0x178 panic() at panic+0x44 bufstrategy() at bufstrategy+0x80 swapdev_strategy() at swapdev_strategy+0xcc swap_pager_getpages_locked() at swap_pager_getpages_locked+0x460 swapoff_one() at swapoff_one+0x3dc swapoff_all() at swapoff_all+0x98 bufshutdown() at bufshutdown+0x2ac kern_reboot() at kern_reboot+0x240 sys_reboot() at sys_reboot+0x358 do_el0_sync() at do_el0_sync+0x4a4 handle_el0_sync() at handle_el0_sync+0x90 --- exception, esr 0x56000000 KDB: enter: panic [ thread pid 1 tid 100002 ] Stopped at kdb_enter+0x48: undefined f900c11f db> -- Peter Jeremy From nobody Fri Nov 26 11:31:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E137E18C653A; Fri, 26 Nov 2021 11:31: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 4J0sy80lybz4hSn; Fri, 26 Nov 2021 11:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE2BD2F84B; Fri, 26 Nov 2021 11:31: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 1AQBVB5h074017; Fri, 26 Nov 2021 11:31:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQBVBYs074016; Fri, 26 Nov 2021 11:31:11 GMT (envelope-from git) Date: Fri, 26 Nov 2021 11:31:11 GMT Message-Id: <202111261131.1AQBVBYs074016@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 090636264654 - main - sctp: add some asserts, no functional changes intended List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0906362646546843f371bebccb51d5578a99cc7c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637926272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YeutvtBc8RcHsSBGJL50cKchw6UXVTZOxIx43JdpVMs=; b=RcfoErTHHF/+JOt6DULd9h0G/5UWq4y+whV0tJUk5Jmkgw7pP9odkWQLWCemVqU5u5oOcW tn6npuoH1SdkqIVdEBspXM2ZrMgwP/HTdkpP/sCgdYWmabvp9/qckEfiyeGlcZPz+7Ih3t I5HJlcdc33rWXcb/SNttvIrA7rk1qUsd3iFKgEKhEbxy/xZm6Fq+J5GBszRXEDwc8m9xeQ 5z+5kv1/nkhdM+ZJYOz6WkbUWsbjqVQjp2ljZAbwKgpsRRe3GBC++fn0qH+poTw9p2RQ/6 LUn7LxFHgFMODBHfk4U90iIZLz+JMTM0GpBbPC9i5ZumDAInR1kPDmnWrFuADw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637926272; a=rsa-sha256; cv=none; b=EBBjDvhBZZRZQNfk8Hr2BaRXkRK9uEjZeaQEDjKDDylSEBUri68PvFPeto6e57xPXvqber VoCLle7Aw53YK3aHUdGJ3Xhb/EHsPF8UdTkq9pe/QUQ9xrbQsxJ5yfCqE1RAL9Q6FsIEtC sMi9tG6jqDM+i7oC0yfnEtI9ClT+N/ZOyDC6HyHohT9/0QGm7Sfty/sygrtOy5b6jYIknm t/HdA+1hTn23D6uHrUylRK+oqjzpLb9KdxVmDVzPymoV7xabMt6VsWK6uoYjepgqCQBHlB qlZzPpSZnmGtfZC1aApU+7lr5oDdJ/RYg6AN+KDItZu9cAKyCbDhP07NgL4hog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=0906362646546843f371bebccb51d5578a99cc7c commit 0906362646546843f371bebccb51d5578a99cc7c Author: Michael Tuexen AuthorDate: 2021-11-26 11:19:33 +0000 Commit: Michael Tuexen CommitDate: 2021-11-26 11:19:33 +0000 sctp: add some asserts, no functional changes intended This might help in narrowing down https://syzkaller.appspot.com/bug?id=fbd79abaec55f5aede63937182f4247006ea883b --- sys/netinet/sctputil.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 9283b1288dae..738f68af7799 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -1519,7 +1519,7 @@ select_a_new_ep: SCTP_INP_RUNLOCK(it->inp); goto no_stcb; } - while (it->stcb) { + while (it->stcb != NULL) { SCTP_TCB_LOCK(it->stcb); if (it->asoc_state && ((it->stcb->asoc.state & it->asoc_state) != it->asoc_state)) { /* not in the right state... keep looking */ @@ -1566,16 +1566,23 @@ select_a_new_ep: KASSERT(it->inp == it->stcb->sctp_ep, ("%s: stcb %p does not belong to inp %p, but inp %p", __func__, it->stcb, it->inp, it->stcb->sctp_ep)); + SCTP_INP_RLOCK_ASSERT(it->inp); + SCTP_TCB_LOCK_ASSERT(it->stcb); /* run function on this one */ (*it->function_assoc) (it->inp, it->stcb, it->pointer, it->val); + SCTP_INP_RLOCK_ASSERT(it->inp); + SCTP_TCB_LOCK_ASSERT(it->stcb); /* * we lie here, it really needs to have its own type but * first I must verify that this won't effect things :-0 */ - if (it->no_chunk_output == 0) + if (it->no_chunk_output == 0) { sctp_chunk_output(it->inp, it->stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED); + SCTP_INP_RLOCK_ASSERT(it->inp); + SCTP_TCB_LOCK_ASSERT(it->stcb); + } SCTP_TCB_UNLOCK(it->stcb); next_assoc: From nobody Fri Nov 26 11:33:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EF9F718C6F81; Fri, 26 Nov 2021 11:33:14 +0000 (UTC) (envelope-from avg@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 4J0t0V4Cq1z4jMv; Fri, 26 Nov 2021 11:33:14 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 74B8A24A72; Fri, 26 Nov 2021 11:33:13 +0000 (UTC) (envelope-from avg@freebsd.org) Message-ID: <5d919f33-649b-8d96-188a-c653194afab1@FreeBSD.org> Date: Fri, 26 Nov 2021 13:33:09 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.3.0 From: Andriy Gapon Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures Content-Language: en-US To: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= , Kyle Evans Cc: Baptiste Daroussin , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637926394; 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=qLMIbQBZ1emrFEmUiw/mlmXfVoFMw5JUP8frYjzgsyU=; b=lw4Hi/nTW1ffUU/lMEkWJEiuPVihWKGLQ+fAwaZd9vlpuy4BGD8RJj86WDr/Ar4wpEy9RY xnsTM8vp1Nxn+mQ6T0sEIsGR6YSyr/KgNGJh8ex2iDHZpbmJOROkqz8SU0/MV07sePN6qI YBMiCT4/zf8ov69myk4TsjDNxOmBeKv1YxcypfTpwiZn9VWmbfwUVdsgHoTQaAgIQgp7H4 NOCPGfwGz3QbX8Vg2QjJfAQG/s7sUf1r/9UaQbP+53V7NkZdaSvhFtLlZ6OayV5QAExgMc cTlqeCtFKizbAL6aWVpzSAJuQWo7yZRBbNczGGuquzYqfWdXtZ8LT0MXiY15/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637926394; a=rsa-sha256; cv=none; b=vuN1xGsYUH6f7LhSfm3Qhpa+FhAYGxHe28p+oTy8M2DGDEDWEceKg8tLZYKmnBuvW+ELZJ ubzaTAfdlmZLmIewCo7tvFR3ky6yHPvXV3tWwHaLG7o3kFARSPNDgKpZ1kAgdfbQ1+9Nr7 K8yf8CipfMcSG8S4jUKo87O8dPTs/WTUUBMNs7J5adcAR3n+cZLpfNhYTZVUtQrMEybrWy /3AThtakWeyqeMlGUoGc2/b0zgx29xXMiynW1v+KTSVkAGQwaJkcTPa1kPwa6OPMXR8Nok pkNJbTEjANQEidkWf+uBwKEce8Il/7QMJm2CdR0CKgrY0anj2Wx7NkpfeToTAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 25/11/2021 17:27, Fernando Apesteguía wrote: > Would anyone try this patch > https://people.freebsd.org/~fernape/fix-dnoroot.patch? > > It seems to work(around) the problem, at least with: > > makefs -D -B little -o label=FreeBSD_root -o version=2 ufs.part METALOG > and > tar -c -f archive.tbz @METALOG I tested the change and it definitely improves the situation and fixes the problem at hand. Please commit. -- Andriy Gapon From nobody Fri Nov 26 11:43:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 89FB718A5A30; Fri, 26 Nov 2021 11:44:13 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0tF92vbZz4m75; Fri, 26 Nov 2021 11:44:13 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by mail-qt1-f177.google.com with SMTP id j17so8738899qtx.2; Fri, 26 Nov 2021 03:44:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hYS4ui4wktz6mp42xt2m2c0r7DsxlllGZZ53ZpRTReg=; b=JPRA3vevdTQePqipsCCFo72O5z/P/N72Nav7jXmQmHP7JW/CYE/dWmCFSNBx4XDr5n H6qYpoKc6I3sq5dJtocsX6C+CYwiDQgrSUCl1+SXrwrL0krMfgrO4pE2XB9/ou0TADdG rZaXdtckzcOM6AdjcqYdCUTuOHe5e9afp1cZynWxrZ57ri6D+MbNzW4hQRXDRGt/S7CC +DqfVPtdUghBPHmgsykmRIMqutrrOAOSzy/LxWJBeWLaY5wNrsXOzj4ESwnRfmeZjztP 9xh7652jkOB0sOk0xB+ihSmynvVZooBQVAo+eHGcEulcMMSZtw7MhIUFBR2CqxsMXDtK Z6+g== X-Gm-Message-State: AOAM5332Qhx3nolw01tnYQaDEJe6M2KQ55dJTsJYZNaoHh9v+ZxRBEIJ P/F+YfUME8b9Ho4vg51V5CyvRt0RP2w5JQ== X-Google-Smtp-Source: ABdhPJxyoJr2uIb0qjL/Fi/kUve9cDkUIJUBvl84pdLOdrwBGXviUbKV0V6idYbtv2KrGPRuFYcSUg== X-Received: by 2002:a05:622a:ca:: with SMTP id p10mr23400228qtw.302.1637927046760; Fri, 26 Nov 2021 03:44:06 -0800 (PST) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com. [209.85.219.177]) by smtp.gmail.com with ESMTPSA id bj1sm3047916qkb.75.2021.11.26.03.44.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Nov 2021 03:44:06 -0800 (PST) Received: by mail-yb1-f177.google.com with SMTP id 131so19503358ybc.7; Fri, 26 Nov 2021 03:44:06 -0800 (PST) X-Received: by 2002:a25:6642:: with SMTP id z2mr13578552ybm.151.1637927046167; Fri, 26 Nov 2021 03:44:06 -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: <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu> <20211125142339.zxkjpbohkxk4hete@aniel.nours.eu> <9226a616-d279-9702-f13f-cee7299afc7a@FreeBSD.org> <5d919f33-649b-8d96-188a-c653194afab1@FreeBSD.org> In-Reply-To: <5d919f33-649b-8d96-188a-c653194afab1@FreeBSD.org> From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Date: Fri, 26 Nov 2021 12:43:01 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0a0f7486413c - main - man: Build manpages for all architectures To: Andriy Gapon Cc: Kyle Evans , Baptiste Daroussin , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4J0tF92vbZz4m75 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N On Fri, Nov 26, 2021 at 12:33 PM Andriy Gapon wrote: > > On 25/11/2021 17:27, Fernando Apestegu=C3=ADa wrote: > > Would anyone try this patch > > https://people.freebsd.org/~fernape/fix-dnoroot.patch? > > > > It seems to work(around) the problem, at least with: > > > > makefs -D -B little -o label=3DFreeBSD_root -o version=3D2 ufs.part MET= ALOG > > and > > tar -c -f archive.tbz @METALOG > > I tested the change and it definitely improves the situation and fixes th= e > problem at hand. We had a race with your mail and the review: https://reviews.freebsd.org/D3= 3126 I expanded your patch to the other arch-specific directories. > > Please commit. > > -- > Andriy Gapon From nobody Fri Nov 26 11:52:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BAA8F18A93D0; Fri, 26 Nov 2021 11:52: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 4J0tQc3GsGz4prJ; Fri, 26 Nov 2021 11:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4682939E; Fri, 26 Nov 2021 11:52: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 1AQBqOVc001186; Fri, 26 Nov 2021 11:52:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQBqO2l001185; Fri, 26 Nov 2021 11:52:24 GMT (envelope-from git) Date: Fri, 26 Nov 2021 11:52:24 GMT Message-Id: <202111261152.1AQBqO2l001185@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 Apestegu=C3=ADa?= Subject: git: df90aeac24c9 - main - Fix build with -DNO_ROOT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df90aeac24c9d3621f294e6638a31499b56f4f6b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637927544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xeDbXzF99c5rC0PvMK0PMQzVv6+nszfoTqUYk3JfjGw=; b=jPYX0h/jX+d/aaz6GueC7nvMxRvnekT62Y+7fhb7AE3e9lsMhD9bCg641upETIlrYGP0++ fOslnx45eufeJJ61V9Ijpc2BoLfmSQb/BO2vyLDpouMBcPBjoDhF7NLO8AU/UjINqmesDU 9lH69QDSPhN6WT0D5c2lSGkLQSi+7iZYh9Wab/eyjBR6yG51PrcmaLEmyvGEX7Ddz756/L 0nt2RwGPg5fHe8ENkC9twRA5aczbHwVXC2RTrYrRNliVN7T7yajg85THhjx9JUPLyXri7y kUGgP044N8/rXVc8eDGo9Px07AlTcGdOOk9OgwRYIvw6OkKJBTxgIeurWnFYDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637927544; a=rsa-sha256; cv=none; b=S2CAh78CGenXispz5IfjBDc8h0x5ws8SjldOoPCdOJi/8z0+o0s4VxMEHcMH5PH/9eECQA UiBe9XZN7zC4Xmm7+V9Fq5xkLsHJx2FrA19NFnDtgQKycUOHtNMGkVucviLK2xaxwd8/42 Qb3GeU5tjzISKY66RB/+s8u1rq+3h7WXoSu9iRQGBPD8exG2tglqHXjIvSsp+YO5aI8SFW ThzpXhrlcAUQ6BI734Do+mRS7bIYGSReU+/I2wvg9V6unVtIg9pa3F5YUdNkB+NLqZRR4V +l1IBTVgVsY+W9WD2Vcz0s4lHmXNJBPK3QQmzPhaVFKovuiSFIpiQM3qNDNxcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=df90aeac24c9d3621f294e6638a31499b56f4f6b commit df90aeac24c9d3621f294e6638a31499b56f4f6b Author: Fernando Apesteguía AuthorDate: 2021-11-26 10:55:50 +0000 Commit: Fernando Apesteguía CommitDate: 2021-11-26 11:51:08 +0000 Fix build with -DNO_ROOT The inclusion of 0a0f7486413c broke the build with the -DNO_ROOT option. Specifically, that commit adds some relative paths (with `..`) to METALOG that make other tools using that log, fail afterwards (tar, makefs...). It's been argued[1] if this is really something mtree(8) should handle more graciously. In the meantime, fix the breakage but changing the order in which the links are created: first in the parent directory, then in the architecture-specific one. We keep the architecture-specific directories an the links to the parent directories. This is something that we might want to change in the future. This commit is based on a concept patch by avg@. [1] https://lists.freebsd.org/archives/dev-commits-src-all/2021-November/index.html Reported by: bapt@, emaste@ Approved by: avg@ Fixes: 0a0f7486413c Differential Revision: https://reviews.freebsd.org/D33126 --- share/man/man4/man4.aarch64/Makefile | 26 ++++++++++++++++---------- share/man/man4/man4.arm/Makefile | 10 ++++++---- share/man/man4/man4.i386/Makefile | 10 ++++++---- share/man/man4/man4.powerpc/Makefile | 10 ++++++---- usr.sbin/Makefile.amd64 | 5 +++++ usr.sbin/apm/Makefile | 4 ---- 6 files changed, 39 insertions(+), 26 deletions(-) diff --git a/share/man/man4/man4.aarch64/Makefile b/share/man/man4/man4.aarch64/Makefile index 6d0e427e6b28..d1fbced3b0a8 100644 --- a/share/man/man4/man4.aarch64/Makefile +++ b/share/man/man4/man4.aarch64/Makefile @@ -4,6 +4,17 @@ MAN= \ armv8crypto.4 \ + enetc.4 \ + felix.4 \ + rk_gpio.4 \ + rk_grf.4 \ + rk_i2c.4 \ + rk_pinctrl.4 \ + +# Install manpages shared with arm only if not installing manpages +# for all architectures, otherwise arm takes care of installing them. +.if !empty(MAN_ARCH) && ${MAN_ARCH} != "all" +MAN+= \ aw_gpio.4 \ aw_mmc.4 \ aw_rtc.4 \ @@ -11,18 +22,13 @@ MAN= \ aw_spi.4 \ aw_syscon.4 \ bcm283x_pwm.4 \ - enetc.4 \ - felix.4 \ - rk_gpio.4 \ - rk_grf.4 \ - rk_i2c.4 \ - rk_pinctrl.4 \ -# Link files to the parent directory +.endif + +# Link files to the architecture directory. +_ARCH_SUBDIR=aarch64 .for _manpage in ${MAN} -MLINKS+=${_manpage} ../${_manpage} +MLINKS+=${_manpage} ${_ARCH_SUBDIR}/${_manpage} .endfor -MANSUBDIR=/aarch64 - .include diff --git a/share/man/man4/man4.arm/Makefile b/share/man/man4/man4.arm/Makefile index 2ac8dbb5fd81..76146f4ebdb7 100644 --- a/share/man/man4/man4.arm/Makefile +++ b/share/man/man4/man4.arm/Makefile @@ -18,11 +18,13 @@ MAN= \ MLINKS= imx_wdog.4 imxwdt.4 MLINKS+= mge.4 if_mge.4 -# Link files to the parent directory +# Link files to the architecture directory +_ARCH_SUBDIR=arm +.for _manpage _link in ${MLINKS} +MLINKS+=${_link} ${_ARCH_SUBDIR}/${_link} +.endfor .for _manpage in ${MAN} -MLINKS+=${_manpage} ../${_manpage} +MLINKS+=${_manpage} ${_ARCH_SUBDIR}/${_manpage} .endfor -MANSUBDIR=/arm - .include diff --git a/share/man/man4/man4.i386/Makefile b/share/man/man4/man4.i386/Makefile index e3d2e66ca78d..3dfc5f151f9f 100644 --- a/share/man/man4/man4.i386/Makefile +++ b/share/man/man4/man4.i386/Makefile @@ -21,11 +21,13 @@ MLINKS= CPU_ELAN.4 CPU_SOEKRIS.4 MLINKS+=pae.4 PAE.4 MLINKS+=sbni.4 if_sbni.4 -# Link files to the parent directory +# Link files to the architecture directory +_ARCH_SUBDIR=i386 +.for _manpage _link in ${MLINKS} +MLINKS+=${_link} ${_ARCH_SUBDIR}/${_link} +.endfor .for _manpage in ${MAN} -MLINKS+=${_manpage} ../${_manpage} +MLINKS+=${_manpage} ${_ARCH_SUBDIR}/${_manpage} .endfor -MANSUBDIR=/i386 - .include diff --git a/share/man/man4/man4.powerpc/Makefile b/share/man/man4/man4.powerpc/Makefile index aa0e137fcedd..e6ade9778db3 100644 --- a/share/man/man4/man4.powerpc/Makefile +++ b/share/man/man4/man4.powerpc/Makefile @@ -15,11 +15,13 @@ MAN= adb.4 \ snd_davbus.4 \ tsec.4 -# Link files to the parent directory +# Link files to the architecture directory +_ARCH_SUBDIR=powerpc +.for _manpage _link in ${MLINKS} +MLINKS+=${_link} ${_ARCH_SUBDIR}/${_link} +.endfor .for _manpage in ${MAN} -MLINKS+=${_manpage} ../${_manpage} +MLINKS+=${_manpage} ${_ARCH_SUBDIR}/${_manpage} .endfor -MANSUBDIR=/powerpc - .include diff --git a/usr.sbin/Makefile.amd64 b/usr.sbin/Makefile.amd64 index d4d185414f41..1f15259eb1ac 100644 --- a/usr.sbin/Makefile.amd64 +++ b/usr.sbin/Makefile.amd64 @@ -2,11 +2,16 @@ # mptable: broken (not 64 bit clean) # pnpinfo: crashes (not really useful anyway) +_ARCH_SUBDIR=amd64 .if ${MK_ACPI} != "no" SUBDIR+= acpi .endif .if ${MK_APM} != "no" SUBDIR+= apm +# Link files to the architecture directory +.for _manpage in ${:!/bin/sh -c "/bin/ls ${_ARCH_SUBDIR}/.8"!:E} +MLINKS+=${_manpage} ${_ARCH_SUBDIR}/${_manpage} +.endfor .endif .if ${MK_BHYVE} != "no" SUBDIR+= bhyve diff --git a/usr.sbin/apm/Makefile b/usr.sbin/apm/Makefile index 27fa0c37d5cf..f52453c62522 100644 --- a/usr.sbin/apm/Makefile +++ b/usr.sbin/apm/Makefile @@ -5,10 +5,6 @@ MAN= apm.8 MLINKS= apm.8 apmconf.8 MANSUBDIR= /${MACHINE_CPUARCH} -# Link files to the parent directory -MLINKS+= apm.8 ../apm.8 -MLINKS+= apmconf.8 ../apmconf.8 - PACKAGE=apm .include From nobody Fri Nov 26 12:07:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D770D18B12A2; Fri, 26 Nov 2021 12:07: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 4J0tlg2F65z4tlf; Fri, 26 Nov 2021 12:07:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C641600; Fri, 26 Nov 2021 12:07: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 1AQC7B2P015946; Fri, 26 Nov 2021 12:07:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQC7BjR015945; Fri, 26 Nov 2021 12:07:11 GMT (envelope-from git) Date: Fri, 26 Nov 2021 12:07:11 GMT Message-Id: <202111261207.1AQC7BjR015945@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: 3ffcfa599e29 - main - vfs: add vop_stdadd_writecount_nomsync List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3ffcfa599e29686cf2b3c1a6087408c37acaed78 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637928431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HvNCMKNeit+aQ38pyeSO66SsPH+Q7sddB7rKj2j4848=; b=rR0XvjDwL+Bo2kVIAe7JN+qKGJKT1LmrRhnOtyZaDfwQOkrJ5FeJuZWb91x9A/tlbNF2Ys GofXsaLVh29aclaV/6aZUlTHb2Cp1ioPrAUd+Jf5vtAyl2x7eBnfrbYEnLJ7h/Dfe5EUL8 Q4eL2ZtOGlPnYYxcTwQR9Li10I9J9g8OcBtn+PpNOo6GwnkGMvgWzZmBLRjgnwKN8fpNkT yuYL/oa18s0uTUYgPfvV3O4UQ9yrzlz53bA6I2RNEMsHpHqQR0z5uMWlMNQV98WCSDJGmJ sauGTMzJy8vqsb/vo8jG4lmJSEDs0kgDJY0FNUZGaLPLeryJ25aAP6XBMQ1tuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637928431; a=rsa-sha256; cv=none; b=BnTFv4npxf0JuPEYz/LHlepcPQr6cAuir3Q4A3+HCw3ExZsgfrcNJtPHWvicTMwvg3mdrO 7/UvbyuHH+w+7ld7A7jParNwHBkvX/47G+iwXtE2/+t4EJvo8gC8zBp/rNKQcIYWMUYteQ Mp/G5F3OgaPqH69ZzMqK1ARj/9SEFgaPq+jJObbAdxFxXB4xrpu58Nfs2IJ7TuGZEpYsDG 5dZsaJfY2ngYgoUVlFQPTRpgos8Q94F+hfZ1UI4VJWO9QBjryDVpYJXLcXiLfqmm9vr5eR F1Tnw2sdYJm3lMMXlLDib/IfXWDcHzCQQYEjIhA0K9vSQHoHo07Qn4l850RS5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3ffcfa599e29686cf2b3c1a6087408c37acaed78 commit 3ffcfa599e29686cf2b3c1a6087408c37acaed78 Author: Mateusz Guzik AuthorDate: 2021-11-26 09:02:19 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-26 12:06:08 +0000 vfs: add vop_stdadd_writecount_nomsync This avoids needing to inspect the mount point every time. Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D33125 --- .../openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 3 ++ .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 3 ++ sys/fs/devfs/devfs_vnops.c | 2 ++ sys/fs/pseudofs/pseudofs_vnops.c | 1 + sys/fs/tmpfs/tmpfs_vnops.c | 1 + sys/kern/vfs_default.c | 40 +++++++++++++++++----- sys/sys/vnode.h | 1 + 7 files changed, 43 insertions(+), 8 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c index 3b405e9d68eb..28d98e788263 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c @@ -815,6 +815,7 @@ static struct vop_vector zfsctl_ops_root = { .vop_vptocnp = zfsctl_root_vptocnp, .vop_pathconf = zfsctl_common_pathconf, .vop_getacl = zfsctl_common_getacl, + .vop_add_writecount = vop_stdadd_writecount_nomsync, }; VFS_VOP_VECTOR_REGISTER(zfsctl_ops_root); @@ -1134,6 +1135,7 @@ static struct vop_vector zfsctl_ops_snapdir = { .vop_print = zfsctl_common_print, .vop_pathconf = zfsctl_common_pathconf, .vop_getacl = zfsctl_common_getacl, + .vop_add_writecount = vop_stdadd_writecount_nomsync, }; VFS_VOP_VECTOR_REGISTER(zfsctl_ops_snapdir); @@ -1238,6 +1240,7 @@ static struct vop_vector zfsctl_ops_snapshot = { .vop_islocked = vop_stdislocked, .vop_advlockpurge = vop_stdadvlockpurge, /* called by vgone */ .vop_print = zfsctl_common_print, + .vop_add_writecount = vop_stdadd_writecount_nomsync, }; VFS_VOP_VECTOR_REGISTER(zfsctl_ops_snapshot); diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index 11bbda5452a1..2f7019b92498 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -6172,6 +6172,7 @@ struct vop_vector zfs_vnodeops = { .vop_unlock = vop_unlock, .vop_islocked = vop_islocked, #endif + .vop_add_writecount = vop_stdadd_writecount_nomsync, }; VFS_VOP_VECTOR_REGISTER(zfs_vnodeops); @@ -6196,6 +6197,7 @@ struct vop_vector zfs_fifoops = { .vop_getacl = zfs_freebsd_getacl, .vop_setacl = zfs_freebsd_setacl, .vop_aclcheck = zfs_freebsd_aclcheck, + .vop_add_writecount = vop_stdadd_writecount_nomsync, }; VFS_VOP_VECTOR_REGISTER(zfs_fifoops); @@ -6215,5 +6217,6 @@ struct vop_vector zfs_shareops = { .vop_reclaim = zfs_freebsd_reclaim, .vop_fid = zfs_freebsd_fid, .vop_pathconf = zfs_freebsd_pathconf, + .vop_add_writecount = vop_stdadd_writecount_nomsync, }; VFS_VOP_VECTOR_REGISTER(zfs_shareops); diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 964d288324b4..594dc087aab3 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -2064,6 +2064,7 @@ static struct vop_vector devfs_vnodeops = { .vop_lock1 = vop_lock, .vop_unlock = vop_unlock, .vop_islocked = vop_islocked, + .vop_add_writecount = vop_stdadd_writecount_nomsync, }; VFS_VOP_VECTOR_REGISTER(devfs_vnodeops); @@ -2105,6 +2106,7 @@ static struct vop_vector devfs_specops = { .vop_lock1 = vop_lock, .vop_unlock = vop_unlock, .vop_islocked = vop_islocked, + .vop_add_writecount = vop_stdadd_writecount_nomsync, }; VFS_VOP_VECTOR_REGISTER(devfs_specops); diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c index 29bb1544e7ad..eae4c1c71ab9 100644 --- a/sys/fs/pseudofs/pseudofs_vnops.c +++ b/sys/fs/pseudofs/pseudofs_vnops.c @@ -1167,6 +1167,7 @@ struct vop_vector pfs_vnodeops = { .vop_symlink = VOP_EOPNOTSUPP, .vop_vptocnp = pfs_vptocnp, .vop_write = pfs_write, + .vop_add_writecount = vop_stdadd_writecount_nomsync, /* XXX I've probably forgotten a few that need VOP_EOPNOTSUPP */ }; VFS_VOP_VECTOR_REGISTER(pfs_vnodeops); diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 3b498bf27a79..a59a522d85ab 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -1868,6 +1868,7 @@ struct vop_vector tmpfs_vnodeop_entries = { .vop_lock1 = vop_lock, .vop_unlock = vop_unlock, .vop_islocked = vop_islocked, + .vop_add_writecount = vop_stdadd_writecount_nomsync, }; VFS_VOP_VECTOR_REGISTER(tmpfs_vnodeop_entries); diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 763e9a943f7d..50829ad3044e 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -1382,24 +1382,34 @@ vop_stdunset_text(struct vop_unset_text_args *ap) return (error); } -static int -vop_stdadd_writecount(struct vop_add_writecount_args *ap) +static int __always_inline +vop_stdadd_writecount_impl(struct vop_add_writecount_args *ap, bool handle_msync) { struct vnode *vp; - struct mount *mp; + struct mount *mp __diagused; int error; vp = ap->a_vp; + +#ifdef INVARIANTS + mp = vp->v_mount; + if (mp != NULL) { + if (handle_msync) { + VNPASS((mp->mnt_kern_flag & MNTK_NOMSYNC) == 0, vp); + } else { + VNPASS((mp->mnt_kern_flag & MNTK_NOMSYNC) != 0, vp); + } + } +#endif + VI_LOCK_FLAGS(vp, MTX_DUPOK); - if (vp->v_writecount < 0) { + if (__predict_false(vp->v_writecount < 0)) { error = ETXTBSY; } else { VNASSERT(vp->v_writecount + ap->a_inc >= 0, vp, ("neg writecount increment %d", ap->a_inc)); - if (vp->v_writecount == 0) { - mp = vp->v_mount; - if (mp != NULL && (mp->mnt_kern_flag & MNTK_NOMSYNC) == 0) - vlazy(vp); + if (handle_msync && vp->v_writecount == 0) { + vlazy(vp); } vp->v_writecount += ap->a_inc; error = 0; @@ -1408,6 +1418,20 @@ vop_stdadd_writecount(struct vop_add_writecount_args *ap) return (error); } +int +vop_stdadd_writecount(struct vop_add_writecount_args *ap) +{ + + return (vop_stdadd_writecount_impl(ap, true)); +} + +int +vop_stdadd_writecount_nomsync(struct vop_add_writecount_args *ap) +{ + + return (vop_stdadd_writecount_impl(ap, false)); +} + int vop_stdneed_inactive(struct vop_need_inactive_args *ap) { diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 3d04b6f68784..c84d015b011c 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -879,6 +879,7 @@ int vop_stdvptofh(struct vop_vptofh_args *ap); int vop_stdunp_bind(struct vop_unp_bind_args *ap); int vop_stdunp_connect(struct vop_unp_connect_args *ap); int vop_stdunp_detach(struct vop_unp_detach_args *ap); +int vop_stdadd_writecount_nomsync(struct vop_add_writecount_args *ap); int vop_eopnotsupp(struct vop_generic_args *ap); int vop_ebadf(struct vop_generic_args *ap); int vop_einval(struct vop_generic_args *ap); From nobody Fri Nov 26 12:23:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 384FA18B988E; Fri, 26 Nov 2021 12:23: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 4J0v646Gv4z3Gvb; Fri, 26 Nov 2021 12:23:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3D8FB06; Fri, 26 Nov 2021 12:23: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 1AQCN8bI041841; Fri, 26 Nov 2021 12:23:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQCN8Us041840; Fri, 26 Nov 2021 12:23:08 GMT (envelope-from git) Date: Fri, 26 Nov 2021 12:23:08 GMT Message-Id: <202111261223.1AQCN8Us041840@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: 054f5815c511 - main - vfs: plug a set-but-not-used var in kern_alternate_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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 054f5815c5117f54eb8a161bf78ace3656805768 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637929388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZiYzEOUXGQ/xYzoMgK4lQQe4SkRyWIEfxKpjozhY8Sc=; b=hxHZxIiws+Czjndq1W4d1S3bx4UhtR2v4/eTW722vZ8TqUMrSEkr/49rm6fqRVULkNuERK Df0IWa4z0hfSvMa0YbmNQE/HJEjTcvflYn6h0PlW/0C9BkPHU5TLsdpoAzAwFKplixkKmk CGEPQVSJXHpbrXFYELeNGhRe422RqW9RhQuGeah78fonRmq2EmlVpJt5b3HZ+cbrVsdIHm WY2j1KAOM74IhnMNFVPaFZCW+ztdaTMQS+JSH3yZJ9qoDqK4TCVbC3f9Jo3/i7yy2z5ByW Y2INGuIwlndfEWoyL5RxNBPkB3+RtyPPnlfmuEhLmc8IlqNbrmgANtrPI3aTCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637929388; a=rsa-sha256; cv=none; b=B+UbrVvhxUQ7/NKGqDebyTTt3sQI1myiabpG4vaUv6AanEx3GChKz4usxizg6mpUkZ2ZL3 DVfKq75mzryNPNsCYAtk9hlYO3mccIrmcCq4U1leLXsOMC2BdSVSTAMIkk3EsAEng0Brot IkI/PfG4NZTii1lIpkxjH+L+grdmj7D1sI/Kn6idyje0o9/gDamYfS21gjYs4/asbSUrXP a7iliOEyvwsHhvGEu6FRD3WtNvkqJQy8BNbgospnHj5jiWTevt4EfhV/AgiApM0KZKwOqC ACewmNUrxUDy4cKCL7KXtBS01dMkXR6amWSZuwkvRuX8er7K5M4QdM0v2y/vaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=054f5815c5117f54eb8a161bf78ace3656805768 commit 054f5815c5117f54eb8a161bf78ace3656805768 Author: Mateusz Guzik AuthorDate: 2021-11-26 12:22:09 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-26 12:22:09 +0000 vfs: plug a set-but-not-used var in kern_alternate_path Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/vfs_lookup.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index d5960dd9e920..d05e1658a004 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1676,13 +1676,11 @@ int kern_alternate_path(const char *prefix, const char *path, enum uio_seg pathseg, char **pathbuf, int create, int dirfd) { - struct thread *td; struct nameidata nd, ndroot; char *ptr, *buf, *cp; size_t len, sz; int error; - td = curthread; buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK); *pathbuf = buf; From nobody Fri Nov 26 12:49:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E7DEB18A63EC; Fri, 26 Nov 2021 12:49: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 4J0vhk49zlz3PnH; Fri, 26 Nov 2021 12:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 70393B62; Fri, 26 Nov 2021 12:49: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 1AQCngXB069146; Fri, 26 Nov 2021 12:49:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQCngIW069145; Fri, 26 Nov 2021 12:49:42 GMT (envelope-from git) Date: Fri, 26 Nov 2021 12:49:42 GMT Message-Id: <202111261249.1AQCngIW069145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 3c1ba6f394d2 - main - sctp: improve consistency, no functional change intended List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c1ba6f394d2711beabc961f0bda10e1212b7ca6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637930982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qb2WRqar/ZHaL3Qx5I6XvdF4ycddpBUB904/Oj41Qnk=; b=FHuGxcFku8hGy5q9CRJ07h7lWuspF7DA1dRCCEAnjlKkGaZNToMBJyjYAQ4UzlHSfJDbp2 CGovV3zD/efkdTx7NLG2U/659LqTnVFfSH351zHu/JzZCjRnsBHGkPO4pCTPH1tWmRp4iG Fy/tSrU0IDsi3Im6fx3/+t9FMrGSP2ru8CqGIcgWbXwQRJcfm0YKxzY/wQBw577Elj+po+ MOulVfuEqoV4mzvoQ5WeNGrybw0HvsHCmeIpvhWWBdMEvHoKlmG+g08kL+LqQkJb0I9ZCR Xas1gVXV3ik5YFir2/ehYk6DNzhSJzU/ftoDfD/yLa0IHTHOWdRUMO+HUHDqpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637930982; a=rsa-sha256; cv=none; b=WmvUfBNEb3nNyFV+EebIyaMYvuZNh67/WDriWxUE18zil4hVdcq7sayjKWrzXAJyIP5Yuz 2/dtFPa5b7y2g8tFLU7sHmcPWer2L5BdAyvZ3/vGZcmkq6foQjNObbCUit8ZEYrSaCXTyp TNAKd3S1YryXeQJj81sgdYWXXAPGD8V6hRwibrJQSrB1sfyUnpoNxrIfpmyxmUULxHSF/E Lv2XdJRSxztLeFV43poALUIJl2zAzqzpoH6S2I83WdVNba2f5EfLNgsV0HNQ08jfyF5nMc EvWsUUNzjD58xEKOO1VhIBiiwAl2d1M1SFv8dHeYTbG71HKgHz44j38cxdtG6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=3c1ba6f394d2711beabc961f0bda10e1212b7ca6 commit 3c1ba6f394d2711beabc961f0bda10e1212b7ca6 Author: Michael Tuexen AuthorDate: 2021-11-26 11:53:12 +0000 Commit: Michael Tuexen CommitDate: 2021-11-26 11:53:43 +0000 sctp: improve consistency, no functional change intended --- sys/netinet/sctp_input.c | 2 +- sys/netinet/sctp_output.c | 12 ++++++------ sys/netinet/sctp_pcb.c | 8 ++++---- sys/netinet/sctputil.c | 14 +++++++------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 03305b539ad2..bdb126cbb50f 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -1806,7 +1806,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, SCTP_INP_INFO_WLOCK(); SCTP_INP_WLOCK(stcb->sctp_ep); SCTP_TCB_LOCK(stcb); - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); /* send up all the data */ SCTP_TCB_SEND_LOCK(stcb); diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index cb8b8030b6ea..9b4c9093512a 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -5832,7 +5832,7 @@ do_a_abort: itsn = sctp_select_initial_TSN(&inp->sctp_ep); initack->init.initial_tsn = htonl(itsn); SCTP_TCB_LOCK(stcb); - atomic_add_int(&asoc->refcnt, -1); + atomic_subtract_int(&asoc->refcnt, 1); } else { SCTP_INP_INCR_REF(inp); SCTP_INP_RUNLOCK(inp); @@ -6648,7 +6648,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, * relock.. to unlock in the iterator timer :-0 */ SCTP_TCB_LOCK(stcb); - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); goto no_chunk_output; } else { if (m) { @@ -6720,7 +6720,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, atomic_add_int(&stcb->asoc.refcnt, 1); sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, false, SCTP_SO_NOT_LOCKED); - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); goto no_chunk_output; } sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, @@ -12980,7 +12980,7 @@ sctp_lower_sosend(struct socket *so, if (hold_tcblock == 0) { SCTP_TCB_LOCK(stcb); } - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); free_cnt_applied = 0; /* release this lock, otherwise we hang on ourselves */ NET_EPOCH_ENTER(et); @@ -13552,7 +13552,7 @@ dataless_eof: abort_anyway: if (free_cnt_applied) { - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); free_cnt_applied = 0; } SCTP_SNPRINTF(msg, sizeof(msg), @@ -13693,7 +13693,7 @@ out_unlocked: SCTP_TCB_UNLOCK(stcb); } if (stcb && free_cnt_applied) { - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); } #ifdef INVARIANTS if (stcb) { diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 563a167b782f..0b26ea8c1944 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -4872,7 +4872,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre */ /* re-increment the lock */ if (from_inpcbfree == SCTP_NORMAL_PROC) { - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); } if (stcb->asoc.refcnt) { SCTP_CLEAR_SUBSTATE(stcb, SCTP_STATE_IN_ACCEPT_QUEUE); @@ -6060,7 +6060,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, inp = stcb->sctp_ep; atomic_add_int(&stcb->asoc.refcnt, 1); stcb_tmp = sctp_findassociation_ep_addr(&inp, sa, &net_tmp, dst, stcb); - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); if ((stcb_tmp == NULL && inp == stcb->sctp_ep) || inp == NULL) { /* we must add the source address */ @@ -6144,7 +6144,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, atomic_add_int(&stcb->asoc.refcnt, 1); stcb_tmp = sctp_findassociation_ep_addr(&inp, sa, &net, dst, stcb); - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); if ((stcb_tmp == NULL && inp == stcb->sctp_ep) || inp == NULL) { @@ -6243,7 +6243,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, atomic_add_int(&stcb->asoc.refcnt, 1); stcb_tmp = sctp_findassociation_ep_addr(&inp, sa, &net, dst, stcb); - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); if (stcb_tmp == NULL && (inp == stcb->sctp_ep || inp == NULL)) { /* diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 738f68af7799..8322603438c3 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -1541,7 +1541,7 @@ select_a_new_ep: if (sctp_it_ctl.iterator_flags) { /* We won't be staying here */ SCTP_INP_DECR_REF(it->inp); - atomic_add_int(&it->stcb->asoc.refcnt, -1); + atomic_subtract_int(&it->stcb->asoc.refcnt, 1); if (sctp_it_ctl.iterator_flags & SCTP_ITERATOR_STOP_CUR_IT) { sctp_it_ctl.iterator_flags &= ~SCTP_ITERATOR_STOP_CUR_IT; @@ -1560,7 +1560,7 @@ select_a_new_ep: SCTP_INP_RLOCK(it->inp); SCTP_INP_DECR_REF(it->inp); SCTP_TCB_LOCK(it->stcb); - atomic_add_int(&it->stcb->asoc.refcnt, -1); + atomic_subtract_int(&it->stcb->asoc.refcnt, 1); iteration_count = 0; } KASSERT(it->inp == it->stcb->sctp_ep, @@ -1780,7 +1780,7 @@ sctp_timeout_handler(void *t) * necessary below. This is safe now that we have acquired * the lock. */ - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); released_asoc_reference = true; if ((type != SCTP_TIMER_TYPE_ASOCKILL) && ((stcb->asoc.state == SCTP_STATE_EMPTY) || @@ -2116,7 +2116,7 @@ out_decr: SCTP_INP_DECR_REF(inp); } if ((stcb != NULL) && !released_asoc_reference) { - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); } if (net != NULL) { sctp_free_remote_addr(net); @@ -2873,7 +2873,7 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, tmr->ep = NULL; } if (tmr->tcb != NULL) { - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); tmr->tcb = NULL; } if (tmr->net != NULL) { @@ -5501,7 +5501,7 @@ out: SCTP_INP_DECR_REF(stcb->sctp_ep); no_lock: - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); return; } @@ -6446,7 +6446,7 @@ out: } /* Save the value back for next time */ stcb->freed_by_sorcv_sincelast = freed_so_far; - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_RECV_RWND_LOGGING_ENABLE) { if (stcb) { From nobody Fri Nov 26 14:23:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9B25C18A2720; Fri, 26 Nov 2021 14: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 4J0xnP1ptzz4cD7; Fri, 26 Nov 2021 14:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D8432326; Fri, 26 Nov 2021 14: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 1AQENrUf002266; Fri, 26 Nov 2021 14: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 1AQENrrA002265; Fri, 26 Nov 2021 14:23:53 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:23:53 GMT Message-Id: <202111261423.1AQENrrA002265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 26559dd1770b - main - twsi: sort headers, remove unneeded List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26559dd1770bb49c68f58a5fbcea3b4c96534c94 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bSCJF+dJKT+ThZgMqCgIRzrkt4qRMO25u0vV+tZKJvA=; b=Zdxss8qUhPgP3Rcs4sS7/RKy/NOhBxB3bgmN1I4Wc99lL87Aim+J/noOhsyReKCzx4P5LF yRACUDC7Hl5QBRmzECzo4P7nAN/uYcHdf41jEMzIY1FmE4vIugi19Fufcu6L3fF5xKxana jdjnzR/CapJGlP5UFD3X+LMOIfq2EMh0YTbFwjLfu1K79rfk6uIj4267O6GNiCiNuxDjNu PTDdrfVn3IqUSlJuxQxpAKglR6y2y2KU/L44nwKDmWychptXX+4BRpvGRn7jhIGFxnALGt FStPYZoDZ+nuI4V4yKTUtnH8J+SELbIRsmyVsOZU8goTEnWWkfma+gSmpG0UOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936633; a=rsa-sha256; cv=none; b=jcSEqzCqYXIWTw6scVi+h1CJWkEPHEBPDwKMC2B++BE1oX5lQzV1rf4LRC8TDuAR4F8SCr fazFas977XjT/3UMRa62A3oXTLpvdO9BYvokkU2t7SzM8j2tCjnpH5nobLrUCvG6q2AUsU 2BATM2ZbSKH4Rjwq8OPsF+RnDRVhv4YMJj3b+f0p77iRe8troT5RxvF4U3FxfWqRBaPzbB w2+Yv0tNIUr5JU10UGsLFR10449e4Bb/jDWWP78y84JkmsHqH2FSe4iygQqGJoXY0sHV/+ AoT7pBPUy9AXkb02d108UC3j9nRejNHnEu15FbX5WdM49UepPLBPym9HzFtv2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=26559dd1770bb49c68f58a5fbcea3b4c96534c94 commit 26559dd1770bb49c68f58a5fbcea3b4c96534c94 Author: Andriy Gapon AuthorDate: 2021-11-26 06:28:41 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:03:38 +0000 twsi: sort headers, remove unneeded MFC after: 1 week --- sys/dev/iicbus/twsi/twsi.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index a606c2aefd36..aa5de857c1d9 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -44,22 +44,18 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include +#include #include #include #include -#include - -#include -#include - #include #include -#include -#include #include From nobody Fri Nov 26 14:23:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 091A318A2725; Fri, 26 Nov 2021 14:23: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 4J0xnQ2rTdz4cDB; Fri, 26 Nov 2021 14:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40A502327; Fri, 26 Nov 2021 14: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 1AQENsGT002290; Fri, 26 Nov 2021 14: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 1AQENsXP002289; Fri, 26 Nov 2021 14:23:54 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:23:54 GMT Message-Id: <202111261423.1AQENsXP002289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: de86f339cdda - main - twsi: add more of status definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de86f339cdda0a10130033ff1771fb13cfacd9d0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0CM28bHTu70Rs9Q5ZXEHkXn8j1sbJdx7Or9RIQ29yeY=; b=bVbUQxK7JndaaXgIzg5mH/x3cdAQ4YjYxcuXlzhbtEBwq1qzhxksPhV/wuqUEwzQ2MsSwb /6voBBNFG/zfJBlFHiYLFD0uXT8wKhLLqt0jzAv7dQFS3j4RKoIEi6vZUagYcrEFnlAvYJ 1LoXrEonJyz+Do0fjd+GeWoYhkCj+w6LwYjoBPwP8ZaqUzAKgc4NNzpLy6oJSzDlhbACu+ 6CBYNzQ7BJKEzMwqQFF4iqnySp6hTjujjN8QklniW+hry3u8oJeNIXqk0sQg5gI5HDdxI0 D6DMoybcyIF88MuG9WWAreuSBGMxOVk+bnv49fa+6QtN+8aJFHWL9kCCxcJt2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936634; a=rsa-sha256; cv=none; b=RVFRdYG1RP0hwQ6/kS9upuCvHwfTqlrzLvUOctPmX5UDGHhtRotXW9O3LX5gz9Zt2po53F Rq+2RkeInNJUvdpKQ8AVhYjB7g8H7WdU6z/8zU+5T/LtN4qLz3dGSZoQT5MfYAZ3sDMIdj OPIO84h2z8ngEdt5b2yVahMIfhuCm4yo82G1ge2a86lo2jNiQBfyGA0WL1WamcMqPYbyAN fpLusi4Jyp9CZrPaC5hXIeG3TzpCxv6iOzb3N9nxMNi0tua9eldyMyC2fLf9Sfgz4qRCSV X2NRNFU0LTJg67WsiBjAPNhgEjCFwAqNIAPP5U+CUHa7kCm6nbHJyMNm2wgsCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=de86f339cdda0a10130033ff1771fb13cfacd9d0 commit de86f339cdda0a10130033ff1771fb13cfacd9d0 Author: Andriy Gapon AuthorDate: 2021-11-26 06:30:22 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:03:38 +0000 twsi: add more of status definitions For completeness and for future use. MFC after: 1 week --- sys/dev/iicbus/twsi/twsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index aa5de857c1d9..84bf0223fba7 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -68,16 +68,19 @@ __FBSDID("$FreeBSD$"); #define TWSI_CONTROL_TWSIEN (1 << 6) #define TWSI_CONTROL_INTEN (1 << 7) +#define TWSI_STATUS_BUS_ERROR 0x00 #define TWSI_STATUS_START 0x08 #define TWSI_STATUS_RPTD_START 0x10 #define TWSI_STATUS_ADDR_W_ACK 0x18 #define TWSI_STATUS_ADDR_W_NACK 0x20 #define TWSI_STATUS_DATA_WR_ACK 0x28 #define TWSI_STATUS_DATA_WR_NACK 0x30 +#define TWSI_STATUS_ARBITRATION_LOST 0x38 #define TWSI_STATUS_ADDR_R_ACK 0x40 #define TWSI_STATUS_ADDR_R_NACK 0x48 #define TWSI_STATUS_DATA_RD_ACK 0x50 #define TWSI_STATUS_DATA_RD_NOACK 0x58 +#define TWSI_STATUS_IDLE 0xf8 #define TWSI_DEBUG #undef TWSI_DEBUG From nobody Fri Nov 26 14:23:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8B81218A2730; Fri, 26 Nov 2021 14:23: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 4J0xnR5ClWz4c61; Fri, 26 Nov 2021 14:23:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E5852053; Fri, 26 Nov 2021 14:23: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 1AQENttk002318; Fri, 26 Nov 2021 14:23:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQENtfo002317; Fri, 26 Nov 2021 14:23:55 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:23:55 GMT Message-Id: <202111261423.1AQENtfo002317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: f00bc54f62c4 - main - twsi: remove write-only softc 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: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f00bc54f62c455c7ed44afee736c3c64873a305a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mc8ncfeeX2iBz3Ravdn8hh+Js9TCsbLVKZcinNWOnrY=; b=SA4Dzfv0kTwohg55IuiQqBX3Xv54OaEC8fUZkA9YV24Yfphuzu0hVuQOb2MVQLUckfGX+u bLJ7FxeuQGR1racPjGAKkqEUzwkDUPqhyxwrPDfOF4TVc7n0TLB3xWrEUuai6i8JCS0CkS +/v9a4rkL4kGu+eVL95ObuDhl0trFJAITsZq27zI9ZWeMYHb4XIYL9QlkdqK2etP6cYnlI c2ciu/uT58QXyVFd2GTADlsIqpcdYMrfzlH1Oa90G5PAv/e/2nxfURXixllWFryNdRbEXQ jWseL6u+R3vTwEFoAXLyoG9jtTsDoFXW6/ByHb7yyZDDlaD81M2A8Tx0rgRFvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936635; a=rsa-sha256; cv=none; b=hnOX3gc4LJB5hIsypXbEmqcdCi57Cdi+eB8S1l1vHZ4j1x1BwKIoodVTJBjimIcYxs1mqC 0CGsyMyMK1VVQQNQd94v6WF1T8kX/XjXQJUbD9zOcdG7i4Qoy8PjAwCoqFWunUEdEUbpAV hTsKa7bTM2lodJcxRw2+IyK5OY3+3+qN+9YQqeiJlJQK9rxRQK/iHwjA0VYWfFLLvK14ui ruD2/+xaLzY8FPccJnOBLuHp9CNPm/l2eXORjrBdDRiVbiRl/4MFoFGHViGHlLIP7Dp5x2 8cCGq/XDmTcrYNCwvtobx2Be9cg/lscEoBUOE2WZntKArptdXSVPisLBxO143w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=f00bc54f62c455c7ed44afee736c3c64873a305a commit f00bc54f62c455c7ed44afee736c3c64873a305a Author: Andriy Gapon AuthorDate: 2021-11-26 06:45:12 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:04:14 +0000 twsi: remove write-only softc field MFC after: 1 week --- sys/dev/iicbus/twsi/a10_twsi.c | 2 -- sys/dev/iicbus/twsi/twsi.h | 1 - 2 files changed, 3 deletions(-) diff --git a/sys/dev/iicbus/twsi/a10_twsi.c b/sys/dev/iicbus/twsi/a10_twsi.c index 17f551f27234..7554db0fbc94 100644 --- a/sys/dev/iicbus/twsi/a10_twsi.c +++ b/sys/dev/iicbus/twsi/a10_twsi.c @@ -121,8 +121,6 @@ a10_twsi_attach(device_t dev) sc->reg_baud_rate = TWI_CCR; sc->reg_soft_reset = TWI_SRST; - sc->need_ack = true; - if (ofw_bus_is_compatible(dev, "allwinner,sun6i-a31-i2c") || ofw_bus_is_compatible(dev, "allwinner,sun6i-a83t-i2c")) sc->iflag_w1c = true; diff --git a/sys/dev/iicbus/twsi/twsi.h b/sys/dev/iicbus/twsi/twsi.h index 631486fb3f0c..b10ce45be6f4 100644 --- a/sys/dev/iicbus/twsi/twsi.h +++ b/sys/dev/iicbus/twsi/twsi.h @@ -65,7 +65,6 @@ struct twsi_softc { int transfer; int error; uint32_t control_val; - bool need_ack; bool iflag_w1c; bus_size_t reg_data; From nobody Fri Nov 26 14:23:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BFDD918A256C; Fri, 26 Nov 2021 14:23: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 4J0xnS5pqWz4c0X; Fri, 26 Nov 2021 14:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DE6D2401; Fri, 26 Nov 2021 14:23: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 1AQENupC002345; Fri, 26 Nov 2021 14:23:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQENujw002344; Fri, 26 Nov 2021 14:23:56 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:23:56 GMT Message-Id: <202111261423.1AQENujw002344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: a2793d618225 - main - twsi: compile in support for debug messages, disabled 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: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2793d6182256b8edf647c11c642ad3c7c83809e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jcbylDpP50XfjFZWPTyyXrrduHfLPJZa3Zsjky9F9XE=; b=RSez1KA9j2f6K5ji/z1nEOalTMYWF3D+8hVVqpYCrej51Z5oJRFxVr7LDXnCLkoVoqXHkG Euqm6+cEldFcXnE1c/wc2KGvIooHVvg0baRpsKA14cUHc/GKmQM+Sgah27YFwfYLdBqaWY cZlOuPy3vyConBOiQvAGcNUJg8RxTM3M4lqU8RzHdOHaxu/mtOuqcahW25rC1A1t3zOgru ZK2rg2py+lntxrC81ALSP4Wx0UQN6yM2z3AM2s/e0eqdQjIJJ2GHZ3aXrDS97/nNr5Mmfb fHmuMQIvIaz0XzXrQ5qWc8SpaZGIhTlNx3n9NZ/VN1AHU1NthsHR6DvHmO4dhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936636; a=rsa-sha256; cv=none; b=RJyrJyMexin1/oo78GCPhceuz9hosdsmi1v2n6QgHocmaCPZ6Lhp/61qZPkhwR0oZNtPUe cx9DUCmTgFccRE9c/k6j8eb+YaCVYH4Ae2drvD8ZN11urhcMN1HTtxUdJI6Anz5sJpOLu7 zAYvu3/S9hx1mMGjemooqrbGDhDlYfmlG6vHbnfb/tLgN0N1uvKpmXMb7ZWYmo3AugpIrD nQHxqwPtFVzAi2O6/bEzGIztnsWC8N7A24ohsTQ/mL3fr8UkKBoS2rMkOQncYlAQWPiQWX 7RV9b7WSqowc8IYDfdPoB3XB7PW5PIqcHi5J2Kw9/UcJKdo564+MM/rlAcYAVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=a2793d6182256b8edf647c11c642ad3c7c83809e commit a2793d6182256b8edf647c11c642ad3c7c83809e Author: Andriy Gapon AuthorDate: 2021-11-26 06:52:56 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:04:23 +0000 twsi: compile in support for debug messages, disabled by default Debug messages can now be enabled per driver instance via a new sysctl. Also, debug messages in TWSI_READ and TWSI_WRITE require debug level greater than 1 as they are mostly redundant because callers of those functions already log most interesting results. NB: the twsi drivers call their device iichb, so the new sysctl will appear under dev.iichb.N. MFC after: 1 week --- sys/dev/iicbus/twsi/twsi.c | 136 ++++++++++++++++++++++++--------------------- sys/dev/iicbus/twsi/twsi.h | 1 + 2 files changed, 75 insertions(+), 62 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 84bf0223fba7..49fe608473b2 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -85,11 +86,8 @@ __FBSDID("$FreeBSD$"); #define TWSI_DEBUG #undef TWSI_DEBUG -#ifdef TWSI_DEBUG -#define debugf(dev, fmt, args...) device_printf(dev, "%s: " fmt, __func__, ##args) -#else -#define debugf(dev, fmt, args...) -#endif +#define debugf(sc, fmt, args...) if ((sc)->debug) \ + device_printf((sc)->dev, "%s: " fmt, __func__, ##args) static struct resource_spec res_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, @@ -103,7 +101,8 @@ TWSI_READ(struct twsi_softc *sc, bus_size_t off) uint32_t val; val = bus_read_4(sc->res[0], off); - debugf(sc->dev, "read %x from %lx\n", val, off); + if (sc->debug > 1) + debugf(sc, "read %x from %lx\n", val, off); return (val); } @@ -111,7 +110,8 @@ static __inline void TWSI_WRITE(struct twsi_softc *sc, bus_size_t off, uint32_t val) { - debugf(sc->dev, "Writing %x to %lx\n", val, off); + if (sc->debug > 1) + debugf(sc, "Writing %x to %lx\n", val, off); bus_write_4(sc->res[0], off, val); } @@ -121,10 +121,10 @@ twsi_control_clear(struct twsi_softc *sc, uint32_t mask) uint32_t val; val = TWSI_READ(sc, sc->reg_control); - debugf(sc->dev, "read val=%x\n", val); + debugf(sc, "read val=%x\n", val); val &= ~(TWSI_CONTROL_STOP | TWSI_CONTROL_START); val &= ~mask; - debugf(sc->dev, "write val=%x\n", val); + debugf(sc, "write val=%x\n", val); TWSI_WRITE(sc, sc->reg_control, val); } @@ -134,10 +134,10 @@ twsi_control_set(struct twsi_softc *sc, uint32_t mask) uint32_t val; val = TWSI_READ(sc, sc->reg_control); - debugf(sc->dev, "read val=%x\n", val); + debugf(sc, "read val=%x\n", val); val &= ~(TWSI_CONTROL_STOP | TWSI_CONTROL_START); val |= mask; - debugf(sc->dev, "write val=%x\n", val); + debugf(sc, "write val=%x\n", val); TWSI_WRITE(sc, sc->reg_control, val); } @@ -166,13 +166,13 @@ twsi_poll_ctrl(struct twsi_softc *sc, int timeout, uint32_t mask) { timeout /= 10; - debugf(sc->dev, "Waiting for ctrl reg to match mask %x\n", mask); + debugf(sc, "Waiting for ctrl reg to match mask %x\n", mask); while (!(TWSI_READ(sc, sc->reg_control) & mask)) { DELAY(10); if (--timeout < 0) return (timeout); } - debugf(sc->dev, "done\n"); + debugf(sc, "done\n"); return (0); } @@ -196,11 +196,11 @@ twsi_locked_start(device_t dev, struct twsi_softc *sc, int32_t mask, /* read IFLG to know if it should be cleared later; from NBSD */ iflg_set = TWSI_READ(sc, sc->reg_control) & TWSI_CONTROL_IFLG; - debugf(dev, "send start\n"); + debugf(sc, "send start\n"); twsi_control_set(sc, TWSI_CONTROL_START); if (mask == TWSI_STATUS_RPTD_START && iflg_set) { - debugf(dev, "IFLG set, clearing (mask=%x)\n", mask); + debugf(sc, "IFLG set, clearing (mask=%x)\n", mask); twsi_clear_iflg(sc); } @@ -211,16 +211,16 @@ twsi_locked_start(device_t dev, struct twsi_softc *sc, int32_t mask, DELAY(1000); if (twsi_poll_ctrl(sc, timeout, TWSI_CONTROL_IFLG)) { - debugf(dev, "timeout sending %sSTART condition\n", + debugf(sc, "timeout sending %sSTART condition\n", mask == TWSI_STATUS_START ? "" : "repeated "); return (IIC_ETIMEOUT); } status = TWSI_READ(sc, sc->reg_status); - debugf(dev, "status=%x\n", status); + debugf(sc, "status=%x\n", status); if (status != mask) { - debugf(dev, "wrong status (%02x) after sending %sSTART condition\n", + debugf(sc, "wrong status (%02x) after sending %sSTART condition\n", status, mask == TWSI_STATUS_START ? "" : "repeated "); return (IIC_ESTATUS); } @@ -230,7 +230,7 @@ twsi_locked_start(device_t dev, struct twsi_softc *sc, int32_t mask, DELAY(1000); if (twsi_poll_ctrl(sc, timeout, TWSI_CONTROL_IFLG)) { - debugf(dev, "timeout sending slave address (timeout=%d)\n", timeout); + debugf(sc, "timeout sending slave address (timeout=%d)\n", timeout); return (IIC_ETIMEOUT); } @@ -238,7 +238,7 @@ twsi_locked_start(device_t dev, struct twsi_softc *sc, int32_t mask, status = TWSI_READ(sc, sc->reg_status); if (status != (read_access ? TWSI_STATUS_ADDR_R_ACK : TWSI_STATUS_ADDR_W_ACK)) { - debugf(dev, "no ACK (status: %02x) after sending slave address\n", + debugf(sc, "no ACK (status: %02x) after sending slave address\n", status); return (IIC_ENOACK); } @@ -264,7 +264,7 @@ twsi_calc_baud_rate(struct twsi_softc *sc, const u_int target, if (clk_get_freq(sc->clk_core, &clk) < 0) return (-1); - debugf(sc->dev, "Bus clock is at %ju\n", clk); + debugf(sc, "Bus clock is at %ju\n", clk); for (n = 0; n < 8; n++) { for (m = 0; m < 16; m++) { @@ -306,23 +306,23 @@ twsi_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) case IIC_SLOW: case IIC_FAST: param = sc->baud_rate[speed].param; - debugf(dev, "Using IIC_FAST mode with speed param=%x\n", param); + debugf(sc, "Using IIC_FAST mode with speed param=%x\n", param); break; case IIC_FASTEST: case IIC_UNKNOWN: default: param = sc->baud_rate[IIC_FAST].param; - debugf(dev, "Using IIC_FASTEST/UNKNOWN mode with speed param=%x\n", param); + debugf(sc, "Using IIC_FASTEST/UNKNOWN mode with speed param=%x\n", param); break; } #ifdef EXT_RESOURCES } #endif - debugf(dev, "Using clock param=%x\n", param); + debugf(sc, "Using clock param=%x\n", param); mtx_lock(&sc->mutex); - TWSI_WRITE(sc, sc->reg_soft_reset, 0x0); + TWSI_WRITE(sc, sc->reg_soft_reset, 0x1); TWSI_WRITE(sc, sc->reg_baud_rate, param); TWSI_WRITE(sc, sc->reg_control, TWSI_CONTROL_TWSIEN); DELAY(1000); @@ -338,7 +338,7 @@ twsi_stop(device_t dev) sc = device_get_softc(dev); - debugf(dev, "%s\n", __func__); + debugf(sc, "%s\n", __func__); mtx_lock(&sc->mutex); twsi_control_clear(sc, TWSI_CONTROL_ACK); twsi_control_set(sc, TWSI_CONTROL_STOP); @@ -360,7 +360,7 @@ twsi_repeated_start(device_t dev, u_char slave, int timeout) sc = device_get_softc(dev); - debugf(dev, "%s: slave=%x\n", __func__, slave); + debugf(sc, "%s: slave=%x\n", __func__, slave); mtx_lock(&sc->mutex); rv = twsi_locked_start(dev, sc, TWSI_STATUS_RPTD_START, slave, timeout); @@ -384,7 +384,7 @@ twsi_start(device_t dev, u_char slave, int timeout) sc = device_get_softc(dev); - debugf(dev, "%s: slave=%x\n", __func__, slave); + debugf(sc, "%s: slave=%x\n", __func__, slave); mtx_lock(&sc->mutex); rv = twsi_locked_start(dev, sc, TWSI_STATUS_START, slave, timeout); mtx_unlock(&sc->mutex); @@ -422,7 +422,7 @@ twsi_read(device_t dev, char *buf, int len, int *read, int last, int delay) DELAY(1000); if (twsi_poll_ctrl(sc, delay, TWSI_CONTROL_IFLG)) { - debugf(dev, "timeout reading data (delay=%d)\n", delay); + debugf(sc, "timeout reading data (delay=%d)\n", delay); rv = IIC_ETIMEOUT; goto out; } @@ -430,7 +430,7 @@ twsi_read(device_t dev, char *buf, int len, int *read, int last, int delay) status = TWSI_READ(sc, sc->reg_status); if (status != (last_byte ? TWSI_STATUS_DATA_RD_NOACK : TWSI_STATUS_DATA_RD_ACK)) { - debugf(dev, "wrong status (%02x) while reading\n", status); + debugf(sc, "wrong status (%02x) while reading\n", status); rv = IIC_ESTATUS; goto out; } @@ -461,14 +461,14 @@ twsi_write(device_t dev, const char *buf, int len, int *sent, int timeout) twsi_clear_iflg(sc); DELAY(1000); if (twsi_poll_ctrl(sc, timeout, TWSI_CONTROL_IFLG)) { - debugf(dev, "timeout writing data (timeout=%d)\n", timeout); + debugf(sc, "timeout writing data (timeout=%d)\n", timeout); rv = IIC_ETIMEOUT; goto out; } status = TWSI_READ(sc, sc->reg_status); if (status != TWSI_STATUS_DATA_WR_ACK) { - debugf(dev, "wrong status (%02x) while writing\n", status); + debugf(sc, "wrong status (%02x) while writing\n", status); rv = IIC_ESTATUS; goto out; } @@ -495,8 +495,8 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) sc->control_val = TWSI_CONTROL_TWSIEN | TWSI_CONTROL_INTEN | TWSI_CONTROL_ACK; TWSI_WRITE(sc, sc->reg_control, sc->control_val); - debugf(dev, "transmitting %d messages\n", nmsgs); - debugf(sc->dev, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + debugf(sc, "transmitting %d messages\n", nmsgs); + debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); sc->nmsgs = nmsgs; sc->msgs = msgs; sc->msg_idx = 0; @@ -504,7 +504,7 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) #ifdef TWSI_DEBUG for (int i = 0; i < nmsgs; i++) - debugf(sc->dev, "msg %d is %d bytes long\n", i, msgs[i].len); + debugf(sc, "msg %d is %d bytes long\n", i, msgs[i].len); #endif /* Send start and re-enable interrupts */ sc->control_val = TWSI_CONTROL_TWSIEN | @@ -515,17 +515,17 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) while (sc->error == 0 && sc->transfer != 0) { tsleep_sbt(sc, 0, "twsi", SBT_1MS * 30, SBT_1MS, 0); } - debugf(sc->dev, "pause finish\n"); + debugf(sc, "pause finish\n"); if (sc->error) { - debugf(sc->dev, "Error, aborting (%d)\n", sc->error); + debugf(sc, "Error, aborting (%d)\n", sc->error); TWSI_WRITE(sc, sc->reg_control, 0); } /* Disable module and interrupts */ - debugf(sc->dev, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); TWSI_WRITE(sc, sc->reg_control, 0); - debugf(sc->dev, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); return (sc->error); } @@ -539,16 +539,16 @@ twsi_intr(void *arg) sc = arg; - debugf(sc->dev, "Got interrupt Current msg=%x\n", sc->msg_idx); + debugf(sc, "Got interrupt Current msg=%x\n", sc->msg_idx); status = TWSI_READ(sc, sc->reg_status); - debugf(sc->dev, "reg control=%x\n", TWSI_READ(sc, sc->reg_control)); + debugf(sc, "reg control=%x\n", TWSI_READ(sc, sc->reg_control)); switch (status) { case TWSI_STATUS_START: case TWSI_STATUS_RPTD_START: /* Transmit the address */ - debugf(sc->dev, "Send the address (%x)", sc->msgs[sc->msg_idx].slave); + debugf(sc, "Send the address (%x)", sc->msgs[sc->msg_idx].slave); if (sc->msgs[sc->msg_idx].flags & IIC_M_RD) TWSI_WRITE(sc, sc->reg_data, @@ -560,10 +560,10 @@ twsi_intr(void *arg) break; case TWSI_STATUS_ADDR_W_ACK: - debugf(sc->dev, "Ack received after transmitting the address (write)\n"); + debugf(sc, "Ack received after transmitting the address (write)\n"); /* Directly send the first byte */ sc->sent_bytes = 1; - debugf(sc->dev, "Sending byte 0 (of %d) = %x\n", + debugf(sc, "Sending byte 0 (of %d) = %x\n", sc->msgs[sc->msg_idx].len, sc->msgs[sc->msg_idx].buf[0]); TWSI_WRITE(sc, sc->reg_data, sc->msgs[sc->msg_idx].buf[0]); @@ -572,7 +572,7 @@ twsi_intr(void *arg) break; case TWSI_STATUS_ADDR_R_ACK: - debugf(sc->dev, "Ack received after transmitting the address (read)\n"); + debugf(sc, "Ack received after transmitting the address (read)\n"); sc->recv_bytes = 0; TWSI_WRITE(sc, sc->reg_control, sc->control_val); @@ -580,7 +580,7 @@ twsi_intr(void *arg) case TWSI_STATUS_ADDR_W_NACK: case TWSI_STATUS_ADDR_R_NACK: - debugf(sc->dev, "No ack received after transmitting the address\n"); + debugf(sc, "No ack received after transmitting the address\n"); sc->transfer = 0; sc->error = IIC_ENOACK; sc->control_val = 0; @@ -588,29 +588,29 @@ twsi_intr(void *arg) break; case TWSI_STATUS_DATA_WR_ACK: - debugf(sc->dev, "Ack received after transmitting data\n"); + debugf(sc, "Ack received after transmitting data\n"); if (sc->sent_bytes == sc->msgs[sc->msg_idx].len) { - debugf(sc->dev, "Done sending all the bytes for msg %d\n", sc->msg_idx); + debugf(sc, "Done sending all the bytes for msg %d\n", sc->msg_idx); /* Send stop, no interrupts on stop */ if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) { - debugf(sc->dev, "Done TX data, send stop\n"); + debugf(sc, "Done TX data, send stop\n"); TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_STOP); } else { - debugf(sc->dev, "Done TX data with NO_STOP\n"); + debugf(sc, "Done TX data with NO_STOP\n"); TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); } sc->msg_idx++; if (sc->msg_idx == sc->nmsgs) { - debugf(sc->dev, "transfer_done=1\n"); + debugf(sc, "transfer_done=1\n"); transfer_done = 1; sc->error = 0; } else { - debugf(sc->dev, "Send repeated start\n"); + debugf(sc, "Send repeated start\n"); TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); } } else { - debugf(sc->dev, "Sending byte %d (of %d) = %x\n", + debugf(sc, "Sending byte %d (of %d) = %x\n", sc->sent_bytes, sc->msgs[sc->msg_idx].len, sc->msgs[sc->msg_idx].buf[sc->sent_bytes]); @@ -623,18 +623,18 @@ twsi_intr(void *arg) break; case TWSI_STATUS_DATA_RD_ACK: - debugf(sc->dev, "Ack received after receiving data\n"); + debugf(sc, "Ack received after receiving data\n"); sc->msgs[sc->msg_idx].buf[sc->recv_bytes++] = TWSI_READ(sc, sc->reg_data); - debugf(sc->dev, "msg_len=%d recv_bytes=%d\n", sc->msgs[sc->msg_idx].len, sc->recv_bytes); + debugf(sc, "msg_len=%d recv_bytes=%d\n", sc->msgs[sc->msg_idx].len, sc->recv_bytes); /* If we only have one byte left, disable ACK */ if (sc->msgs[sc->msg_idx].len - sc->recv_bytes == 1) sc->control_val &= ~TWSI_CONTROL_ACK; if (sc->msgs[sc->msg_idx].len == sc->recv_bytes) { - debugf(sc->dev, "Done with msg %d\n", sc->msg_idx); + debugf(sc, "Done with msg %d\n", sc->msg_idx); sc->msg_idx++; if (sc->msg_idx == sc->nmsgs - 1) { - debugf(sc->dev, "No more msgs\n"); + debugf(sc, "No more msgs\n"); transfer_done = 1; sc->error = 0; } @@ -645,12 +645,12 @@ twsi_intr(void *arg) case TWSI_STATUS_DATA_RD_NOACK: if (sc->msgs[sc->msg_idx].len - sc->recv_bytes == 1) { sc->msgs[sc->msg_idx].buf[sc->recv_bytes++] = TWSI_READ(sc, sc->reg_data); - debugf(sc->dev, "Done RX data, send stop (2)\n"); + debugf(sc, "Done RX data, send stop (2)\n"); if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_STOP); } else { - debugf(sc->dev, "No ack when receiving data, sending stop anyway\n"); + debugf(sc, "No ack when receiving data, sending stop anyway\n"); if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_STOP); @@ -661,14 +661,14 @@ twsi_intr(void *arg) break; default: - debugf(sc->dev, "status=%x hot handled\n", status); + debugf(sc, "status=%x hot handled\n", status); sc->transfer = 0; sc->error = IIC_EBUSERR; sc->control_val = 0; wakeup(sc); break; } - debugf(sc->dev, "Refresh reg_control\n"); + debugf(sc, "Refresh reg_control\n"); /* * Newer Allwinner chips clear IFLG after writing 1 to it. @@ -676,7 +676,7 @@ twsi_intr(void *arg) TWSI_WRITE(sc, sc->reg_control, sc->control_val | (sc->iflag_w1c ? TWSI_CONTROL_IFLG : 0)); - debugf(sc->dev, "Done with interrupts\n\n"); + debugf(sc, "Done with interrupts\n\n"); if (transfer_done == 1) { sc->transfer = 0; wakeup(sc); @@ -701,6 +701,9 @@ int twsi_attach(device_t dev) { struct twsi_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree_node; + struct sysctl_oid_list *tree; sc = device_get_softc(dev); sc->dev = dev; @@ -713,6 +716,15 @@ twsi_attach(device_t dev) return (ENXIO); } +#ifdef TWSI_DEBUG + sc->debug = 1; +#endif + ctx = device_get_sysctl_ctx(dev); + tree_node = device_get_sysctl_tree(dev); + tree = SYSCTL_CHILDREN(tree_node); + SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "debug", CTLFLAG_RWTUN, + &sc->debug, 0, "Set debug level (zero to disable)"); + /* Attach the iicbus. */ if ((sc->iicbus = device_add_child(dev, "iicbus", -1)) == NULL) { device_printf(dev, "could not allocate iicbus instance\n"); diff --git a/sys/dev/iicbus/twsi/twsi.h b/sys/dev/iicbus/twsi/twsi.h index b10ce45be6f4..ed0ea72ab819 100644 --- a/sys/dev/iicbus/twsi/twsi.h +++ b/sys/dev/iicbus/twsi/twsi.h @@ -64,6 +64,7 @@ struct twsi_softc { uint16_t recv_bytes; int transfer; int error; + int debug; uint32_t control_val; bool iflag_w1c; From nobody Fri Nov 26 14:23:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F09E418A275E; Fri, 26 Nov 2021 14:23: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 4J0xnW0XHbz4cMG; Fri, 26 Nov 2021 14:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C57162328; Fri, 26 Nov 2021 14:23: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 1AQENwDG002393; Fri, 26 Nov 2021 14:23:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQENwox002392; Fri, 26 Nov 2021 14:23:58 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:23:58 GMT Message-Id: <202111261423.1AQENwox002392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: bc02583c4dd6 - main - twsi: remove redundant enabling of the controller List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc02583c4dd65275da89838a723bd3514cb316cf Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rIJw4zHZdjY1V8t8QbEV7LCl/BVBWFjy3iF8xC19DF8=; b=PIYnS7vdheDyCyOQOU8gMZZdYfDiXlg44TDy/aR1KG5bnEixR83EX5QGdMOUGPWJUUvNx+ fZMvqh1AbKMcazuCq8EU70/G+JcBENGKdeZXrPCi9xdd9vmI99PFwTsccefjuC1ycVSLfQ m6Au74qGJ6dcplMf386X06j6FTVPaQiqUwiKXY/IwJRENXspg+LUOG5OF38EdZTAUq9E8o mYA6gXxzR/GmAaYG5XKhzDxy95NjWZcx6D1/iaiFVHsJs9TEUFW4XyBuS9D5CqqFH+Y34P o4eMMnw/08XXeQPLPcKGzaNnysDT5UQxKE2cnHFZ2gboH9a3LLciSqM2EUGoYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936639; a=rsa-sha256; cv=none; b=Zkztvta2Mfk7f8KgM6ohA2eY+O+UaNuxYbNaYGE/Y6lYrTztVBeKtv0JnyFQpKljvfeOkl 6j5xPpJKccceZEg3yOgIJe0K124vpT237oH9kkbwbugexx6Ee/bhLLJ3GShNnEiwrGlyuh Qw6bA4PE5JSurA5U6lpAliGPdGwe2hIvH/NYIt2iE4eUAmD2v8c68cUowhRRrkFG9Sa2bR fu1T+b8WtuXVgi3nXcx/o3BfPfdPnTq/SzFnVnHutycT7KU0Ccceo9ZdZGZ1WdpXmPrLsJ EfF31ksR6Cat28mAiIeQbq++PwhsSusFizme9U7t14LiEryxtoJX36MWPsjcDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=bc02583c4dd65275da89838a723bd3514cb316cf commit bc02583c4dd65275da89838a723bd3514cb316cf Author: Andriy Gapon AuthorDate: 2021-11-26 07:28:18 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:15:21 +0000 twsi: remove redundant enabling of the controller MFC after: 2 weeks --- sys/dev/iicbus/twsi/twsi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 552787874833..05f67786cad0 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -495,9 +495,6 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) KASSERT(sc->transfer == 0, ("starting a transfer while another is active")); - sc->control_val = TWSI_CONTROL_TWSIEN | - TWSI_CONTROL_INTEN | TWSI_CONTROL_ACK; - TWSI_WRITE(sc, sc->reg_control, sc->control_val); debugf(sc, "transmitting %d messages\n", nmsgs); debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); sc->nmsgs = nmsgs; From nobody Fri Nov 26 14:23:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8C15418A26C1; Fri, 26 Nov 2021 14:23: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 4J0xnT6Dw7z4cRr; Fri, 26 Nov 2021 14:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADAEF2054; Fri, 26 Nov 2021 14:23: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 1AQENvv3002369; Fri, 26 Nov 2021 14:23:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQENvF8002368; Fri, 26 Nov 2021 14:23:57 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:23:57 GMT Message-Id: <202111261423.1AQENvF8002368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 69cfa60ddd4d - main - twsi: protect interaction between twsi_transfer and twsi_intr List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69cfa60ddd4df814b507699f9bb7253ece054f40 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HF7mwsCorUaU0/hCB3khvUSNPtMtcouiSpkDWDyFEv0=; b=htm43gJjHVxJ2VXfyWceKhRZoQvvElJ+DnV14FZ2NPGylh0MKy4y84J3YjBWQyFKkOcXwj E5pDssNFH176gaw94HetL+iuYl8FtG9RtBD79AAyAzvRcIj5WM35VSsZhQmEwvIdmNXH8K GGxEt7GQi6jzQPNAo8Bml+rf2iUtGvVVTpJc08GT1kWoEURC3XB2bfmHIO+aroTzduq3b3 sTYldgG0ZWAMeUqy7akfdOzSbR/mHP4vqx10TEQjcedNWlCyhVeq+LPiYpxmkrSUvuwbMO /Va514xVkJc4Sh2ILNfESfChMVJ/Vt4qnx74m5GcHq9QVA8VdIB6tiqKHI5TBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936638; a=rsa-sha256; cv=none; b=bkifp5RPdFeGW9S13Tfbv2D0erNiWNTlrpwpuBMOIzyYjwXeaWm3h3/PBmYUR7W67qDTwj Ilt/EItVUmqiCnJcrgmesSXlzy9/A9OC0FnPFSym5Lgqmd5QOj+gCHVSVJOOZvQob0i8Mk lhIkUQbZJi2rzRb0y9dZLXABiC6sBPSbLcTnem8m1FKtqD/3jJyBBU1UTK+aaWCCVEda1G iYk6tsWOCfy+5lM3DQQqzQl2oI0N1V8aZc46FLy3iO39Ne6vwWoE5YO5LeSQdvd/cI2LHf /+s2sa5AQu7jAbQ8XIObMLhJo1I9w6h9ZbHzZO/uh9CHanBkFnsh+6rgx6708A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=69cfa60ddd4df814b507699f9bb7253ece054f40 commit 69cfa60ddd4df814b507699f9bb7253ece054f40 Author: Andriy Gapon AuthorDate: 2021-11-26 07:25:01 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:14:28 +0000 twsi: protect interaction between twsi_transfer and twsi_intr All accesses to softc are now done under a mutex to prevent data races between the open context and the interrupt handler. Additionally, the wait time in twsi_transfer is bounded now. Previously we could get stuck there forever if an interrupt got lost. MFC after: 2 weeks --- sys/dev/iicbus/twsi/twsi.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 49fe608473b2..552787874833 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -484,13 +484,16 @@ static int twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) { struct twsi_softc *sc; + int error; sc = device_get_softc(dev); if (!sc->have_intr) return (iicbus_transfer_gen(dev, msgs, nmsgs)); - sc->error = 0; + mtx_lock(&sc->mutex); + KASSERT(sc->transfer == 0, + ("starting a transfer while another is active")); sc->control_val = TWSI_CONTROL_TWSIEN | TWSI_CONTROL_INTEN | TWSI_CONTROL_ACK; @@ -501,6 +504,7 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) sc->msgs = msgs; sc->msg_idx = 0; sc->transfer = 1; + sc->error = 0; #ifdef TWSI_DEBUG for (int i = 0; i < nmsgs; i++) @@ -512,22 +516,25 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) if (sc->msgs[0].len == 1) sc->control_val &= ~TWSI_CONTROL_ACK; TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); - while (sc->error == 0 && sc->transfer != 0) { - tsleep_sbt(sc, 0, "twsi", SBT_1MS * 30, SBT_1MS, 0); - } + msleep_sbt(sc, &sc->mutex, 0, "twsi", 3000 * SBT_1MS, SBT_1MS, 0); debugf(sc, "pause finish\n"); - - if (sc->error) { - debugf(sc, "Error, aborting (%d)\n", sc->error); - TWSI_WRITE(sc, sc->reg_control, 0); + if (sc->error == 0 && sc->transfer != 0) { + device_printf(sc->dev, "transfer timeout\n"); + sc->error = IIC_ETIMEOUT; + sc->transfer = 0; } + if (sc->error != 0) + debugf(sc, "Error: %d\n", sc->error); + /* Disable module and interrupts */ debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); TWSI_WRITE(sc, sc->reg_control, 0); debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + error = sc->error; + mtx_unlock(&sc->mutex); - return (sc->error); + return (error); } static void @@ -539,11 +546,20 @@ twsi_intr(void *arg) sc = arg; + mtx_lock(&sc->mutex); debugf(sc, "Got interrupt Current msg=%x\n", sc->msg_idx); status = TWSI_READ(sc, sc->reg_status); debugf(sc, "reg control=%x\n", TWSI_READ(sc, sc->reg_control)); + if (sc->transfer == 0) { + device_printf(sc->dev, "interrupt without active transfer, " + "status = 0x%x\n", status); + TWSI_WRITE(sc, sc->reg_control, sc->control_val | + TWSI_CONTROL_STOP); + goto end; + } + switch (status) { case TWSI_STATUS_START: case TWSI_STATUS_RPTD_START: @@ -670,6 +686,7 @@ twsi_intr(void *arg) } debugf(sc, "Refresh reg_control\n"); +end: /* * Newer Allwinner chips clear IFLG after writing 1 to it. */ @@ -681,6 +698,7 @@ twsi_intr(void *arg) sc->transfer = 0; wakeup(sc); } + mtx_unlock(&sc->mutex); } static void From nobody Fri Nov 26 14:23:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 13EF918A2993; Fri, 26 Nov 2021 14:24: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 4J0xnX25C1z4cMR; Fri, 26 Nov 2021 14:24:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF5CF2402; Fri, 26 Nov 2021 14:23: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 1AQENx6N002417; Fri, 26 Nov 2021 14:23:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQENxG6002416; Fri, 26 Nov 2021 14:23:59 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:23:59 GMT Message-Id: <202111261423.1AQENxG6002416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: cb167e1ae954 - main - twsi: do not attempt transfer if bus is not idle List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb167e1ae95473d836393a07456d8dbcfbb7f758 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5A+49B9KLqge4YjaS5HuCC1zQNk1ZZnSaILeZvctvBQ=; b=sZilwFRs2YBKuXxw/2WrVUdlFU7S6G0kGrSGOPwwewWx/ZYtVf+sG1tmdLUNrv1w5NWTa3 00gLt7wDj+HspDBeyFPQZL3PRCcWdeMLRXzsCYdLwoiLuys0sLPEAfo5Z7ByzkJWzvAEyZ UDjuGLJt+ax0UZS53H0bRwn20xb81HUdDVWFNvg/L4Ojg8Oo5mmJOi+lGPRnj3btVEA8lY r6W3KJpXnTz6Qf1bhVkLhaQBNm5iCPP2S3PqDfUzCvnPlpRM4KCQhT7jpInN7NWH/i9ewL 8b3bdpPakAWNjrapd7biK2IiRqHv2fqOU2jEf1V4d/yrXmLtafIsd01aK0zGSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936640; a=rsa-sha256; cv=none; b=plHaR5S7PBcN2XScgosyNZ3TxJGGsTTX01HHYOHCy7mJ/l9leEj8DmYndtQ3gk0z24rBig A9ewNPVVBcvdeG+u7w5AeC0CZXOKZDlYqXy5IxFcI8paVik9ZNJd15jLTs8taoXsT1gsxT H6O94HfYNnwGhZvbn/5fl4bQUvYBN9MeQHUNifZirpOtou0bpSK58oLAbBtxQRW/osqU94 Oz2UxLLUhqiZS+ml6rd5QebMD0JG2afMz2D4q7qIzkStTZGwENy2+Evyk2aXsrNzaukoX4 J8TglVUM+/QLMDHPCs7DFefAsi6vD4JgLg2WkgnUo3ulIL6dxVbvPVv7nRIf5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=cb167e1ae95473d836393a07456d8dbcfbb7f758 commit cb167e1ae95473d836393a07456d8dbcfbb7f758 Author: Andriy Gapon AuthorDate: 2021-11-26 07:30:38 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:15:43 +0000 twsi: do not attempt transfer if bus is not idle MFC after: 2 weeks --- sys/dev/iicbus/twsi/twsi.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 05f67786cad0..5e899313ac45 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -484,6 +484,7 @@ static int twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) { struct twsi_softc *sc; + uint32_t status; int error; sc = device_get_softc(dev); @@ -496,7 +497,15 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) ("starting a transfer while another is active")); debugf(sc, "transmitting %d messages\n", nmsgs); - debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + status = TWSI_READ(sc, sc->reg_status); + debugf(sc, "status=0x%x\n", status); + if (status != TWSI_STATUS_IDLE) { + debugf(sc, "Bad status at start of transfer\n"); + TWSI_WRITE(sc, sc->reg_control, TWSI_CONTROL_STOP); + mtx_unlock(&sc->mutex); + return (IIC_ESTATUS); + } + sc->nmsgs = nmsgs; sc->msgs = msgs; sc->msg_idx = 0; From nobody Fri Nov 26 14:24:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 65BC218A2B80; Fri, 26 Nov 2021 14:24: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 4J0xnY3t8jz4c8M; Fri, 26 Nov 2021 14:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 182CB2274; Fri, 26 Nov 2021 14:24: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 1AQEO0jK002441; Fri, 26 Nov 2021 14:24:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQEO0Sa002440; Fri, 26 Nov 2021 14:24:00 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:24:00 GMT Message-Id: <202111261424.1AQEO0Sa002440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 578707ed4efd - main - twsi: improve a handful of debug 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: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 578707ed4efda4ec1c91ab1a8f1bace6b1eb714a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XZ50NqMVLZ+yfgp0cRiGHBSyMajg7iubLTqvHWeOx3k=; b=JcdoOoXqgWeiCBmz7c4qeb9+cqh6n+0ohVb11+3C0MvXPquldFXQdjmLghHl/iBxZ7MLiW 2vRXgymHZrMYhhEg8dDME/4YvGF6B0Mbl/YbcU0xnvcZEaOc2/rZDwVKSf+7wOdHDRpcAY +DLVrlwa3ioQ2/M+anj2rtDwDYTP195hLiHHVWMccTfzosU+delIfMoGM4rc6XPlBDdObA n4q6J7OrE9uT0Y+1JEvmn1XvFXDu5Jy9C1AIFoafDWbjkokxACDk5rxzGoYqx2NjRsk0GE w4iUf5pjj9/DvOCNdrv5Go8oOxGuSRBxovgcOt5pXlVRh0rKF7Yg6Dg6IXbf0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936641; a=rsa-sha256; cv=none; b=tC6CodSSNwa3T4S9NVLmShJia1pN9w9kkhmoh3WsHogWaBoRONDYvObI7OcwIjtcKYIivO YEiVTcuPmzOiYy/O64KSgPIdjKBsmPAsydIZ5KdIJL9PG40HpxkJ0mdWn7yH0AVJ+Z2Dsg QSmKghvwLubFINPy71NKwEc1moxb5ncuxKssyR9ewIPb+U9YKj1b7HpLev5/2ogfCIslk2 XQK75yh1jko3KNuruu5p82sVOQzKsqg4EqFgyVQXXgb7N2ojXzIu8sfTSuwLpPUiwI+Pfv +9rRdipL3243d/Iit1x7+CFd4qAduhVa3cO7MBm58sQltO4OtKTxluWqZB7+9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=578707ed4efda4ec1c91ab1a8f1bace6b1eb714a commit 578707ed4efda4ec1c91ab1a8f1bace6b1eb714a Author: Andriy Gapon AuthorDate: 2021-11-26 07:34:28 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:16:01 +0000 twsi: improve a handful of debug messages - use 0x prefix for hex values - print indexes and counts as decimals - break too long lines MFC after: 2 weeks --- sys/dev/iicbus/twsi/twsi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 5e899313ac45..384e19e120b9 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -534,9 +534,9 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) debugf(sc, "Error: %d\n", sc->error); /* Disable module and interrupts */ - debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + debugf(sc, "status=0x%x\n", TWSI_READ(sc, sc->reg_status)); TWSI_WRITE(sc, sc->reg_control, 0); - debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + debugf(sc, "status=0x%x\n", TWSI_READ(sc, sc->reg_status)); error = sc->error; mtx_unlock(&sc->mutex); @@ -553,10 +553,11 @@ twsi_intr(void *arg) sc = arg; mtx_lock(&sc->mutex); - debugf(sc, "Got interrupt Current msg=%x\n", sc->msg_idx); + debugf(sc, "Got interrupt, current msg=%u\n", sc->msg_idx); status = TWSI_READ(sc, sc->reg_status); - debugf(sc, "reg control=%x\n", TWSI_READ(sc, sc->reg_control)); + debugf(sc, "reg control = 0x%x, status = 0x%x\n", + TWSI_READ(sc, sc->reg_control), status); if (sc->transfer == 0) { device_printf(sc->dev, "interrupt without active transfer, " @@ -570,7 +571,8 @@ twsi_intr(void *arg) case TWSI_STATUS_START: case TWSI_STATUS_RPTD_START: /* Transmit the address */ - debugf(sc, "Send the address (%x)", sc->msgs[sc->msg_idx].slave); + debugf(sc, "Send address 0x%x\n", + sc->msgs[sc->msg_idx].slave); if (sc->msgs[sc->msg_idx].flags & IIC_M_RD) TWSI_WRITE(sc, sc->reg_data, From nobody Fri Nov 26 14:24:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DCC0218A2AF5; Fri, 26 Nov 2021 14:24: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 4J0xnb5F2sz4cKD; Fri, 26 Nov 2021 14:24:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30E242055; Fri, 26 Nov 2021 14:24: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 1AQEO2dj002471; Fri, 26 Nov 2021 14:24:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQEO20X002470; Fri, 26 Nov 2021 14:24:02 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:24:02 GMT Message-Id: <202111261424.1AQEO20X002470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: a4fe8922085d - main - twsi: unify error handling, explicitly handle more conditions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4fe8922085dfc1e5e6a6bac73ccc738e373165f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ww5aJgvTxk336ToykBYXtP92dmEJEl702YvQj4OUywo=; b=U0BZovkCj3p07FJOZ9Yo9fWzVeLfNJppUyllpnbQ9flxLb2NFpaCqYgkINv5eH3vCnMAyH CTwzPzF/qK7MM1oPWbL3iElUd+wvt6JIty2QM5HW/UfBUZf18ya+dso4hCgx9rCL26Z/+b gcMx87TL/j9eRyf0l6C1NZnqzX6VXIIG8acM6BhMF41bnUI9rTZijxV7H8JmZkysid02n/ uWXFHmbMwRTQTvhvHnb7PIZaFkpBcVd4aH6/VFOayFeEHIXw5GMfaoeQ8T4dY2ONBRCJof CI0LaloT6X/cYB7C7sPaaxFjGSWGWfIMvAq54HHauI9MYULTlytbh3ATRotH0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936644; a=rsa-sha256; cv=none; b=rKHS1+WZ+9JdpQfoS8lQ3kLsQxBIevwq9lPO2Oi+9aK6I3XpVeLPEOlcHdWciG8rxiVK41 6fEDPUyPH4c8mYLkaS7+5OtGwYn5uWS5Zh/IUnAf9aZmpXheHerb8kDn69j73OqotDHok6 JPOCHl7nQqiZBWjE7YW741qd+oe9ZSRl3Q8tYdFX6WyxfQo1sxs038Dg06D/6djzhGTBcC 7F+xhsQ4MlaULlueRFou3/u8+a2iT/JCR3LyFKjASNZh3xT7bJHbRe2o14/M0Y+7pGkY8Y 9BK11YqYf7GCXTtDZoQknaG6Q7PQqfIsyvx0Fp7KlkDfR1ffMEWN1zR/X8NdSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=a4fe8922085dfc1e5e6a6bac73ccc738e373165f commit a4fe8922085dfc1e5e6a6bac73ccc738e373165f Author: Andriy Gapon AuthorDate: 2021-11-26 07:44:30 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:16:21 +0000 twsi: unify error handling, explicitly handle more conditions twsi_error() is a new function that stops the current transfer and sets up softc when an error condition is detected. TWSI_STATUS_DATA_WR_NACK, TWSI_STATUS_BUS_ERROR and TWSI_STATUS_ARBITRATION_LOST are now handled explicitly rather than via the catch-all unknown status. Also, twsi_intr() now calls wakeup() in a single place when the transfer is finished. MFC after: 2 weeks --- sys/dev/iicbus/twsi/twsi.c | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 384e19e120b9..ecadfade04d9 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -543,6 +543,19 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) return (error); } +static void +twsi_error(struct twsi_softc *sc, int err) +{ + /* + * Must send stop condition to abort the current transfer. + */ + debugf(sc, "Sending STOP condition for error %d\n", err); + sc->transfer = 0; + sc->error = err; + sc->control_val = 0; + TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_STOP); +} + static void twsi_intr(void *arg) { @@ -604,13 +617,13 @@ twsi_intr(void *arg) case TWSI_STATUS_ADDR_W_NACK: case TWSI_STATUS_ADDR_R_NACK: - debugf(sc, "No ack received after transmitting the address\n"); - sc->transfer = 0; - sc->error = IIC_ENOACK; - sc->control_val = 0; - wakeup(sc); + debugf(sc, "Address NACK-ed\n"); + twsi_error(sc, IIC_ENOACK); + break; + case TWSI_STATUS_DATA_WR_NACK: + debugf(sc, "Data byte NACK-ed\n"); + twsi_error(sc, IIC_ENOACK); break; - case TWSI_STATUS_DATA_WR_ACK: debugf(sc, "Ack received after transmitting data\n"); if (sc->sent_bytes == sc->msgs[sc->msg_idx].len) { @@ -684,12 +697,17 @@ twsi_intr(void *arg) sc->error = 0; break; + case TWSI_STATUS_BUS_ERROR: + debugf(sc, "Bus error\n"); + twsi_error(sc, IIC_EBUSERR); + break; + case TWSI_STATUS_ARBITRATION_LOST: + debugf(sc, "Arbitration lost\n"); + twsi_error(sc, IIC_EBUSBSY); + break; default: - debugf(sc, "status=%x hot handled\n", status); - sc->transfer = 0; - sc->error = IIC_EBUSERR; - sc->control_val = 0; - wakeup(sc); + debugf(sc, "unexpected status 0x%x\n", status); + twsi_error(sc, IIC_ESTATUS); break; } debugf(sc, "Refresh reg_control\n"); @@ -701,11 +719,11 @@ end: TWSI_WRITE(sc, sc->reg_control, sc->control_val | (sc->iflag_w1c ? TWSI_CONTROL_IFLG : 0)); - debugf(sc, "Done with interrupts\n\n"); - if (transfer_done == 1) { + if (transfer_done == 1) sc->transfer = 0; + debugf(sc, "Done with interrupt, transfer = %d\n", sc->transfer); + if (sc->transfer == 0) wakeup(sc); - } mtx_unlock(&sc->mutex); } From nobody Fri Nov 26 14:24:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3B05D18A2C9E; Fri, 26 Nov 2021 14:24: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 4J0xnd2ZfQz4cKK; Fri, 26 Nov 2021 14:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 860C22275; Fri, 26 Nov 2021 14:24: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 1AQEO4Lp002519; Fri, 26 Nov 2021 14:24:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQEO4b8002518; Fri, 26 Nov 2021 14:24:04 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:24:04 GMT Message-Id: <202111261424.1AQEO4b8002518@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: aeacf172fd29 - main - twsi: remove redundant write of control register List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aeacf172fd29b16b3661ff057c9abb238baba813 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n0Bh76MSFGKfE2a9lr0vk5u7kVu3pY/hDIUWDUMkcWQ=; b=H3sr38mc0Jv1ju7RX9anFqCREAaDZMwadVPvE80O7dOZjuVrjLRRkvDAga/jNY5DGdC75v lHDGsJX9rHxlgmfwMXxYyVWqG9QxUYUCn/Mb4XX8tnIbe3D28iCFBw0tZEsuQjtACPguti f0Xth5bfoeBIRn8+uhUYUGW1fY9McNnPbaKj4LaijVQKYs+upny7lSu6V8QlEEN7oQS5zZ FHGZ0/nmxaesH9XGBPYWCgW4+96QgTC/eSmATB3wJ7ppEo7Wguc1FY4k4JS7T5vozUmNq+ TCw+7lbOXkk+fpUURLQvSJ9qzTcrVAa+6j/I7JKsonBtNkBHSyhKRJ0Yc1LZag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936646; a=rsa-sha256; cv=none; b=VV71qbQksrAS7yOMq68GWTOGvxXVVtcSD2Y5YtZK9iDTqcJfVd56ozCBUS3F0uDy+otqBJ bWduOUFhFo+9Pc3Vk2d7xKpPtbyKBDlFlYMDHmAVLJoOlh23Oiz8zpHsoPk5XZR+FHTQWC di3rqIBO54RVGuz42yM5Bp1wo96xVgyR1S1CA6xDnJU03nkeSXNPp8oEwrQ5cmTRRRcN/r 0pUxc+jTdPRty7+hB+FewmQVN+0h1IGlUSrLnWreRxYtdhpAVSJquRabQV7HG016o+FX77 yH4dhA6u/ChEbv8UxqAlZt2jiz1zE8nNaT+aylQei50HTzB8deyclFmHHeqtkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=aeacf172fd29b16b3661ff057c9abb238baba813 commit aeacf172fd29b16b3661ff057c9abb238baba813 Author: Andriy Gapon AuthorDate: 2021-11-26 08:09:59 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:18:30 +0000 twsi: remove redundant write of control register The write at the end of twsi_intr() already handles all cases, no need to have another write for TWSI_STATUS_START / TWSI_STATUS_RPTD_START. MFC after: 3 weeks --- sys/dev/iicbus/twsi/twsi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 4a20d7ea35b6..b94396883be5 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -591,7 +591,6 @@ twsi_intr(void *arg) else TWSI_WRITE(sc, sc->reg_data, sc->msgs[sc->msg_idx].slave & ~LSB); - TWSI_WRITE(sc, sc->reg_control, sc->control_val); break; case TWSI_STATUS_ADDR_W_ACK: From nobody Fri Nov 26 14:24:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8456E18A2D06; Fri, 26 Nov 2021 14:24: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 4J0xnc2sdhz4cV7; Fri, 26 Nov 2021 14:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 593002056; Fri, 26 Nov 2021 14:24: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 1AQEO3WW002495; Fri, 26 Nov 2021 14:24:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQEO3dV002494; Fri, 26 Nov 2021 14:24:03 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:24:03 GMT Message-Id: <202111261424.1AQEO3dV002494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 04622a7f2115 - main - twsi: move handling of TWSI_CONTROL_ACK into the state machine List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04622a7f21157827fe75276a4520a52d3a571a86 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mqTnaffWmokw4JcGp4dw5pWHTuJXnrRzvNIeB8TavD0=; b=Q9m6azwkkMwG9+v9QIXMJO0T0eeNJ6zFswz+2uTMxClb2YntNDC09pixmsfzZg42EEyLhm vSnJTHQqEASZYglOOzidv05oWscRIErC91XF1EiA5zBtdFVVGBlIFdal2gfrjkCUqb/Sj1 AhzrFy+qUQZZZsDK0B09zcNAeO3CogMmbBvgRQDoZKG9ik0rABtmRps7nwbKtGfSoSQ4Rq Ue1h5cqFrxqZvRHIQjDZA57MuyWkktDXaJmbeiC7HjK4F4njhQGybYWSEOd1eC0VTuUfln kol9PQ+eNidWjXO27ERbr9qHr4yt5uaFnTIRAb9pKMqlaDMxnK1Ti84nQlL1cQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936645; a=rsa-sha256; cv=none; b=Q9eTDUfLQCwpncxo58NKmMd/llNuWWB08oQ2jc9gfDUD9h++HJMbMlebJ/61yib9bFVb+o YlMEq1pJD4Lnnr7qbxaONYnyYMWwT6oHjXdUbdDkKiRhknMZy7/R9dKhtQsi8+E2A7ia15 RHkWQ6bi6wiVSGQ97UKCb9bgiflZVG5c8CGTjQYYJFcORTrv/oO65esOtyeeZLfjiZynX+ 6pBQgZx8q388n57i684zRuvwJJKrJ8Oa18YpCIwd80UT0WJURgxxPfxEs8IiurNJsjGKYy M4+xBNGv6O51nqgx5RTqLEgYoH7X+RIojTQihaewGfPCdpNsQGogKLIlSr6OPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=04622a7f21157827fe75276a4520a52d3a571a86 commit 04622a7f21157827fe75276a4520a52d3a571a86 Author: Andriy Gapon AuthorDate: 2021-11-26 08:07:27 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:17:24 +0000 twsi: move handling of TWSI_CONTROL_ACK into the state machine Previously the code set TWSI_CONTROL_ACK in twsi_transfer() based on whether the first message had a length of one. That was done regardless of whether the message was a read or write and what kind of messages followed it. Now the bit is set or cleared while handling TWSI_STATUS_ADDR_R_ACK state transition based on the current (read) message. The old code did not correctly work in a scenario where a single byte was read from an EEPROM device with two byte addressing. For example: i2c -m tr -a 0x50 -d r -w 16 -o 0 -c 1 -v The reason is that the first message (a write) has two bytes, so TWSI_CONTROL_ACK was set and never cleared. Since the controller did not send NACK the EEPROM sent more data resulting in a buffer overrun. While working on TWSI_STATUS_ADDR_R_ACK I also added support for the zero-length read access and then I did the same for zero-length write access. While rare, those types of I2C transactions are completely valid and are used by some devices. PR: 258994 MFC after: 3 weeks --- sys/dev/iicbus/twsi/twsi.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index ecadfade04d9..4a20d7ea35b6 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -516,11 +516,9 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) for (int i = 0; i < nmsgs; i++) debugf(sc, "msg %d is %d bytes long\n", i, msgs[i].len); #endif + /* Send start and re-enable interrupts */ - sc->control_val = TWSI_CONTROL_TWSIEN | - TWSI_CONTROL_INTEN | TWSI_CONTROL_ACK; - if (sc->msgs[0].len == 1) - sc->control_val &= ~TWSI_CONTROL_ACK; + sc->control_val = TWSI_CONTROL_TWSIEN | TWSI_CONTROL_INTEN; TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); msleep_sbt(sc, &sc->mutex, 0, "twsi", 3000 * SBT_1MS, SBT_1MS, 0); debugf(sc, "pause finish\n"); @@ -597,22 +595,36 @@ twsi_intr(void *arg) break; case TWSI_STATUS_ADDR_W_ACK: - debugf(sc, "Ack received after transmitting the address (write)\n"); - /* Directly send the first byte */ - sc->sent_bytes = 1; - debugf(sc, "Sending byte 0 (of %d) = %x\n", - sc->msgs[sc->msg_idx].len, - sc->msgs[sc->msg_idx].buf[0]); - TWSI_WRITE(sc, sc->reg_data, sc->msgs[sc->msg_idx].buf[0]); + debugf(sc, "Address ACK-ed (write)\n"); - TWSI_WRITE(sc, sc->reg_control, sc->control_val); + if (sc->msgs[sc->msg_idx].len > 0) { + /* Directly send the first byte */ + sc->sent_bytes = 1; + debugf(sc, "Sending byte 0 (of %d) = %x\n", + sc->msgs[sc->msg_idx].len, + sc->msgs[sc->msg_idx].buf[0]); + TWSI_WRITE(sc, sc->reg_data, + sc->msgs[sc->msg_idx].buf[0]); + } else { + debugf(sc, "Zero-length write, sending STOP\n"); + TWSI_WRITE(sc, sc->reg_control, + sc->control_val | TWSI_CONTROL_STOP); + } break; case TWSI_STATUS_ADDR_R_ACK: - debugf(sc, "Ack received after transmitting the address (read)\n"); + debugf(sc, "Address ACK-ed (read)\n"); sc->recv_bytes = 0; - TWSI_WRITE(sc, sc->reg_control, sc->control_val); + if (sc->msgs[sc->msg_idx].len == 0) { + debugf(sc, "Zero-length read, sending STOP\n"); + TWSI_WRITE(sc, sc->reg_control, + sc->control_val | TWSI_CONTROL_STOP); + } else if (sc->msgs[sc->msg_idx].len == 1) { + sc->control_val &= ~TWSI_CONTROL_ACK; + } else { + sc->control_val |= TWSI_CONTROL_ACK; + } break; case TWSI_STATUS_ADDR_W_NACK: From nobody Fri Nov 26 14:24:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0A82B18A29FC; Fri, 26 Nov 2021 14:24: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 4J0xnf3yslz4cHH; Fri, 26 Nov 2021 14:24:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B26042403; Fri, 26 Nov 2021 14:24: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 1AQEO5H3002543; Fri, 26 Nov 2021 14:24:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQEO5hI002542; Fri, 26 Nov 2021 14:24:05 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:24:05 GMT Message-Id: <202111261424.1AQEO5hI002542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 00c07d9559c6 - main - twsi: make data receiving code safer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00c07d9559c6197957b00811a0b29876a5c8b573 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3QSzBAepEFnOcgj+algV0VWAg5OCdDKV7iF/af+M0iQ=; b=vwjGnZBcjx/zhb76ka3gbmj6Yi8ycq0Hj0QxsA0Cv/WSHPM6qf1ejFEOKg1+kvuRTwhHst 2TwQ9sqRed5zLO2wr73yIkI+ZKbOi409ScrPQl7AsVgH4BSgqaSEPBv5imbnVIY1ekALbf Hnf+id/mIAC3b+hrMYBLzYA7/oVAdvRvPH1KvedEYYb87Dcx8PlmW4OiLlR+1pzcOfSMBt KR3aBRzxGUhhCFmbIlrdnl7rBPkERE/N7xTgsC2LJqWARkgRSXrrdrT1p/w59V62MJeYnQ 5e5wsSmgJTNAn2aDKvrzkjeza6xrZWZ6Dekt0ZQkMo6k1c08/0GxGrpxVxo3Fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936646; a=rsa-sha256; cv=none; b=tabNJBuMj5T88w/p1hr4g94At6o0BtZjqGYAqa8A79zWLEoN7DCmhpayjCTNf/hySrw1m6 sA2tlMwhM07L2D50ntr2ypR4epWTXWe3TPNi0VMc18asDWUYTcBZZLLZsGnzFkw0JNG+O8 hYQScKVRhhIdXtUC/Sb5+Z+s6x0TIqJpbImjAF8vP/a2sZ/rEwEPcEgajRi30iA0sacwHs 8YNbrEv/F67QHNl5BHDsv6RRXZnr7AObn6gSkCSlbIT376KbQkOgXykxvTq4ablakV7ESC ZEy4rSkbAYA2uCBy0mmpv4yecoAQQe5matif6AWXiBtxNCrTge9ry0Qto3npfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=00c07d9559c6197957b00811a0b29876a5c8b573 commit 00c07d9559c6197957b00811a0b29876a5c8b573 Author: Andriy Gapon AuthorDate: 2021-11-26 08:34:42 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:18:51 +0000 twsi: make data receiving code safer Assert that we are not receiving data beyond the requested length. Assert that we have not NACK-ed incoming data prematurely. Abort the current transfer if the incoming data is NACK-ed or not NACK-ed unexpectedly. Add debug logging of received data to complement logging of sent data. MFC after: 3 weeks --- sys/dev/iicbus/twsi/twsi.c | 62 ++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index b94396883be5..2f77e2dc69c3 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -671,37 +671,57 @@ twsi_intr(void *arg) break; case TWSI_STATUS_DATA_RD_ACK: - debugf(sc, "Ack received after receiving data\n"); - sc->msgs[sc->msg_idx].buf[sc->recv_bytes++] = TWSI_READ(sc, sc->reg_data); - debugf(sc, "msg_len=%d recv_bytes=%d\n", sc->msgs[sc->msg_idx].len, sc->recv_bytes); + debugf(sc, "Received and ACK-ed data\n"); + KASSERT(sc->recv_bytes < sc->msgs[sc->msg_idx].len, + ("receiving beyond the end of buffer")); + + sc->msgs[sc->msg_idx].buf[sc->recv_bytes] = + TWSI_READ(sc, sc->reg_data); + debugf(sc, "Received byte %d (of %d) = 0x%x\n", + sc->recv_bytes, + sc->msgs[sc->msg_idx].len, + sc->msgs[sc->msg_idx].buf[sc->recv_bytes]); + sc->recv_bytes++; /* If we only have one byte left, disable ACK */ - if (sc->msgs[sc->msg_idx].len - sc->recv_bytes == 1) + if (sc->msgs[sc->msg_idx].len - sc->recv_bytes == 1) { sc->control_val &= ~TWSI_CONTROL_ACK; - if (sc->msgs[sc->msg_idx].len == sc->recv_bytes) { - debugf(sc, "Done with msg %d\n", sc->msg_idx); - sc->msg_idx++; - if (sc->msg_idx == sc->nmsgs - 1) { - debugf(sc, "No more msgs\n"); - transfer_done = 1; - sc->error = 0; - } + } else if (sc->msgs[sc->msg_idx].len == sc->recv_bytes) { + /* + * We should not have ACK-ed the last byte. + * The protocol state machine is in invalid state. + */ + debugf(sc, "RX all but asked for more?\n"); + twsi_error(sc, IIC_ESTATUS); } - TWSI_WRITE(sc, sc->reg_control, sc->control_val); break; case TWSI_STATUS_DATA_RD_NOACK: - if (sc->msgs[sc->msg_idx].len - sc->recv_bytes == 1) { - sc->msgs[sc->msg_idx].buf[sc->recv_bytes++] = TWSI_READ(sc, sc->reg_data); - debugf(sc, "Done RX data, send stop (2)\n"); - if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) + debugf(sc, "Received and NACK-ed data\n"); + KASSERT(sc->recv_bytes == sc->msgs[sc->msg_idx].len - 1, + ("sent NACK before receiving all requested data")); + sc->msgs[sc->msg_idx].buf[sc->recv_bytes] = + TWSI_READ(sc, sc->reg_data); + debugf(sc, "Received byte %d (of %d) = 0x%x\n", + sc->recv_bytes, + sc->msgs[sc->msg_idx].len, + sc->msgs[sc->msg_idx].buf[sc->recv_bytes]); + sc->recv_bytes++; + + if (sc->msgs[sc->msg_idx].len == sc->recv_bytes) { + debugf(sc, "Done RX data\n"); + if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) { + debugf(sc, "Send STOP\n"); TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_STOP); + } } else { - debugf(sc, "No ack when receiving data, sending stop anyway\n"); - if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) - TWSI_WRITE(sc, sc->reg_control, - sc->control_val | TWSI_CONTROL_STOP); + /* + * We should not have NACK-ed yet. + * The protocol state machine is in invalid state. + */ + debugf(sc, "NACK-ed before receving all bytes?\n"); + twsi_error(sc, IIC_ESTATUS); } sc->transfer = 0; transfer_done = 1; From nobody Fri Nov 26 14:24:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6F3FE18A2E97; Fri, 26 Nov 2021 14:24: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 4J0xnh2Bpfz4cHQ; Fri, 26 Nov 2021 14:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D28DD2329; Fri, 26 Nov 2021 14:24: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 1AQEO6UE002567; Fri, 26 Nov 2021 14:24:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQEO6de002566; Fri, 26 Nov 2021 14:24:06 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:24:06 GMT Message-Id: <202111261424.1AQEO6de002566@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: ff1e8581806f - main - twsi: support more message combinations in transfers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff1e8581806f70e54fecddf8a6a23488dc7b968a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4hgeMz7mA283YljpwC2zfX9v6MtOmWgF18YlrbhUw0=; b=Ja32riCIKyM0sj/eDcm8rYEEl5F4C5r92jkZuxuCQG2zU6qAA8X+cERrd5ZVVb4WxM512U 3inbQl2UySd4hjz9pWoLFZvEn0psCQB8cZPbAlioOseerUJVpA5ezn9NyoiFe5VJv2sdwL DB2Ub7fGwZp772C2Cc1O7uoK7raB7GzXrMrpUz2/Q6MFLY880kp9E5rKNdk/Fe9DQERe3y i/d4MCinGLLi/ObYPF3JaXWOaqTaqPiJBrn4K9vLWS5Yvu9Ie1lPeztkxnmNskY0HV+vq1 w5kvDZ37FWq8+QgwKND/3JRBMciRhhNo01hMfXKxgLv23XsD1IRWL9h/sGaCvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936648; a=rsa-sha256; cv=none; b=SQHUlFv0RLWlbGk94RnyzNRKfyhv+srtcBIGUwGU6HQRrW59gCW54aZpdDKnBKgBxIiUEc 6nxb7EJqI9TsYFxh6cbY+n8RsKYcR93UZV6rAw4MOm/iG6HLtvR6t+rMeKRWFcwSc52n5F iHOfh0RTt2CzlmFKPojgMIt+R30lpaxFeWGDHh5pKmKAQj5LfzQqefNnc4AHNCLZmRqptQ M9dNXnv+EvTvv0V19tSl7VpfSVkRkl8FCRqHGsbnDKePKb4wH7iH2/gtBz8dPuQNhLYqVr 33gOa80lw5ugy/zKssjUptAT/3BVTNTH0dAsFvrr6SMD1DW1ZDPQCy8PMV9/Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=ff1e8581806f70e54fecddf8a6a23488dc7b968a commit ff1e8581806f70e54fecddf8a6a23488dc7b968a Author: Andriy Gapon AuthorDate: 2021-11-26 09:48:21 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:20:27 +0000 twsi: support more message combinations in transfers Most prominently, add support for a transfer where a write with no-stop flag is followed by a write with no-start flag. Logically, it's a single larger write, but consumers may want to split it like that because one part can be a register ID and the other part can be data to be written to (or starting at) that register. Such a transfer can be created by i2c tool and iic(4) driver, e.g., for an EEPROM write at specific offset: i2c -m tr -a 0x50 -d w -w 16 -o 0 -c 8 -v < /dev/random This should be fixed by new code that handles the end of data transfer for both reads and writes. It handles two existing conditions and one new. Namely: - the last message has been completed -- end of transfer; - a message has been completed and the next one requires the start condition; - a message has been completed and the next one should be sent without the start condition. In the last case we simply switch to the next message and start sending its data. Reads without the start condition are not supported yet, though. That's because we NACK the last byte of the previous message, so the device stops sending data. To fix this we will need to add a look-ahead at the next message when handling the penultimate byte of the current one. This change also fixed a bug where msg_idx was not incremented after a read message. Apparently, typically a read message is a last message in a transfer, so the bug did not cause much trouble. PR: 258994 MFC after: 3 weeks --- sys/dev/iicbus/twsi/twsi.c | 85 +++++++++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 32 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 2f77e2dc69c3..ab0bb3f26961 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -559,9 +559,12 @@ twsi_intr(void *arg) { struct twsi_softc *sc; uint32_t status; - int transfer_done = 0; + bool message_done; + bool send_start; sc = arg; + message_done = false; + send_start = false; mtx_lock(&sc->mutex); debugf(sc, "Got interrupt, current msg=%u\n", sc->msg_idx); @@ -578,6 +581,7 @@ twsi_intr(void *arg) goto end; } +restart: switch (status) { case TWSI_STATUS_START: case TWSI_STATUS_RPTD_START: @@ -636,38 +640,30 @@ twsi_intr(void *arg) twsi_error(sc, IIC_ENOACK); break; case TWSI_STATUS_DATA_WR_ACK: - debugf(sc, "Ack received after transmitting data\n"); + KASSERT(sc->sent_bytes <= sc->msgs[sc->msg_idx].len, + ("sent_bytes beyond message length")); + debugf(sc, "ACK received after transmitting data\n"); if (sc->sent_bytes == sc->msgs[sc->msg_idx].len) { - debugf(sc, "Done sending all the bytes for msg %d\n", sc->msg_idx); + debugf(sc, "Done TX data\n"); + /* Send stop, no interrupts on stop */ if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) { - debugf(sc, "Done TX data, send stop\n"); TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_STOP); } else { - debugf(sc, "Done TX data with NO_STOP\n"); - TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); - } - sc->msg_idx++; - if (sc->msg_idx == sc->nmsgs) { - debugf(sc, "transfer_done=1\n"); - transfer_done = 1; - sc->error = 0; - } else { - debugf(sc, "Send repeated start\n"); - TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); + debugf(sc, "NOSTOP flag\n"); } - } else { - debugf(sc, "Sending byte %d (of %d) = %x\n", - sc->sent_bytes, - sc->msgs[sc->msg_idx].len, - sc->msgs[sc->msg_idx].buf[sc->sent_bytes]); - TWSI_WRITE(sc, sc->reg_data, - sc->msgs[sc->msg_idx].buf[sc->sent_bytes]); - TWSI_WRITE(sc, sc->reg_control, - sc->control_val); - sc->sent_bytes++; + message_done = true; + break; } + + debugf(sc, "Sending byte %d (of %d) = 0x%x\n", + sc->sent_bytes, + sc->msgs[sc->msg_idx].len, + sc->msgs[sc->msg_idx].buf[sc->sent_bytes]); + TWSI_WRITE(sc, sc->reg_data, + sc->msgs[sc->msg_idx].buf[sc->sent_bytes]); + sc->sent_bytes++; break; case TWSI_STATUS_DATA_RD_ACK: @@ -715,6 +711,7 @@ twsi_intr(void *arg) TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_STOP); } + message_done = true; } else { /* * We should not have NACK-ed yet. @@ -723,9 +720,6 @@ twsi_intr(void *arg) debugf(sc, "NACK-ed before receving all bytes?\n"); twsi_error(sc, IIC_ESTATUS); } - sc->transfer = 0; - transfer_done = 1; - sc->error = 0; break; case TWSI_STATUS_BUS_ERROR: @@ -741,17 +735,44 @@ twsi_intr(void *arg) twsi_error(sc, IIC_ESTATUS); break; } - debugf(sc, "Refresh reg_control\n"); + if (message_done) { + sc->msg_idx++; + if (sc->msg_idx == sc->nmsgs) { + debugf(sc, "All messages transmitted\n"); + sc->transfer = 0; + sc->error = 0; + } else if ((sc->msgs[sc->msg_idx].flags & IIC_M_NOSTART) == 0) { + debugf(sc, "Send (repeated) start\n"); + send_start = true; + } else { + /* Just keep transmitting data. */ + KASSERT((sc->msgs[sc->msg_idx - 1].flags & IIC_M_NOSTOP) != 0, + ("NOSTART message after STOP")); + KASSERT((sc->msgs[sc->msg_idx].flags & IIC_M_RD) == + (sc->msgs[sc->msg_idx - 1].flags & IIC_M_RD), + ("change of transfer direction without a START")); + debugf(sc, "NOSTART message after NOSTOP\n"); + sc->sent_bytes = 0; + sc->recv_bytes = 0; + if ((sc->msgs[sc->msg_idx].flags & IIC_M_RD) == 0) { + status = TWSI_STATUS_ADDR_W_ACK; + goto restart; + } else { + debugf(sc, "Read+NOSTART unsupported\n"); + twsi_error(sc, IIC_ESTATUS); + } + } + } end: /* * Newer Allwinner chips clear IFLG after writing 1 to it. */ + debugf(sc, "Refresh reg_control\n"); TWSI_WRITE(sc, sc->reg_control, sc->control_val | - (sc->iflag_w1c ? TWSI_CONTROL_IFLG : 0)); + (sc->iflag_w1c ? TWSI_CONTROL_IFLG : 0) | + (send_start ? TWSI_CONTROL_START : 0)); - if (transfer_done == 1) - sc->transfer = 0; debugf(sc, "Done with interrupt, transfer = %d\n", sc->transfer); if (sc->transfer == 0) wakeup(sc); From nobody Fri Nov 26 14:39:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4C55E18AD708; Fri, 26 Nov 2021 14:39: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 4J0y7L6hxdz4n5w; Fri, 26 Nov 2021 14:39:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C59FD22C5; Fri, 26 Nov 2021 14:39: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 1AQEdQLO016340; Fri, 26 Nov 2021 14:39:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQEdQDm016339; Fri, 26 Nov 2021 14:39:26 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:39:26 GMT Message-Id: <202111261439.1AQEdQDm016339@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: 7b3642da21cb - main - Hoist cddl prebuild lib dependency definitions out of a MK_ZFS block List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7b3642da21cb4b1c301d8c6b6ce0847d19d8a473 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637937567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YhJUaT9fi1cSuXIM2+VeSEF7fF+9lBbNDmZFGkWq14Y=; b=iUiTex0yjLjHSF4IHvQj8mWvYHLBOwbgjJ5a8i8vbU0FA62nE0EVqTYSjdYPeDgcwp1HSV 29K3f0RyV1dajJDmH7zeB2VHyrBqsc1dQJxwgacIsEdl9xbkrHe1TXcgWqAECRnLLT5b0Y QEjhBY9mAEDX/bYUICizh/fuvmGx2hEGPkvEcmdwu8KAedl2XQyl7jJBcsXV9hSSOwSCX0 bWaTw0tMap4kInvMT6bJLaICIJCd1QzaRV8Ml7arPjMSbUfA6lMc4giDca+kmT11x6q+fO TNzHzywBfzdlpWdziYDJqP9k07luRqITrjXymY+FyfRD0DuYGyplGbJ9s5yClw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637937567; a=rsa-sha256; cv=none; b=ambTw6I17/Qd5KyuOND5Ij9mqkjBWhAFHbLdhNEIo30eghZev04V8rCfeEGHzJCFucwHFp +1zQVsyGPgJwCKuq6sFeVo+BqZ3+c7lyLZSpOQFhGeyjRh0avWyAyJO1bGOdApQv0z3Apn m+FwFzNYyKL9t30dFP9SSzBrjQfEbZOOAmUqE3PXeQAw9239XjLG6I6bo4Ol7By3dOVaKk ybTTxKrkyFIfzkXKsxzgbUY7sWyOqumRbIGzp3j1lFzHH37O/OAF4kVdyD3n+5KQEjfFHT pekPh1JCf096U5vKRCwkdOVL3bds60JXxcBWJZfvqqPEj/1LWXkAzPPb9yyrLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7b3642da21cb4b1c301d8c6b6ce0847d19d8a473 commit 7b3642da21cb4b1c301d8c6b6ce0847d19d8a473 Author: Mark Johnston AuthorDate: 2021-11-26 14:27:19 +0000 Commit: Mark Johnston CommitDate: 2021-11-26 14:39:09 +0000 Hoist cddl prebuild lib dependency definitions out of a MK_ZFS block The compilation of several libraries under cddl/lib is not conditional on MK_ZFS = "yes", so their dependency on libspl is not conditional either. Unbreak buildworld when WITHOUT_ZFS is set. Reported by: bz Fixes: 9e9c651caceb ("cddl: fix missing ZFS library dependencies") MFC after: 1 week --- Makefile.inc1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 1ba3716a02db..e3b46b3e40bc 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3026,6 +3026,8 @@ _cddl_lib_libavl= cddl/lib/libavl _cddl_lib_libuutil= cddl/lib/libuutil _cddl_lib_libspl= cddl/lib/libspl +cddl/lib/libavl__L: cddl/lib/libspl__L +cddl/lib/libnvpair__L: cddl/lib/libspl__L cddl/lib/libuutil__L: cddl/lib/libavl__L cddl/lib/libspl__L .if ${MK_ZFS} != "no" @@ -3037,10 +3039,6 @@ _cddl_lib_libzfs_core= cddl/lib/libzfs_core _cddl_lib_libzfs= cddl/lib/libzfs _cddl_lib_libzfsbootenv= cddl/lib/libzfsbootenv -cddl/lib/libavl__L: cddl/lib/libspl__L - -cddl/lib/libnvpair__L: cddl/lib/libspl__L - cddl/lib/libtpool__L: cddl/lib/libspl__L cddl/lib/libzutil__L: cddl/lib/libavl__L lib/libgeom__L lib/msun__L cddl/lib/libtpool__L From nobody Fri Nov 26 14:51:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6DC1518B2018; Fri, 26 Nov 2021 14:51: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 4J0yP408tYz4qyZ; Fri, 26 Nov 2021 14:51:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3AB02658; Fri, 26 Nov 2021 14:51: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 1AQEpJ3Z040923; Fri, 26 Nov 2021 14:51:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQEpJ7Y040922; Fri, 26 Nov 2021 14:51:19 GMT (envelope-from git) Date: Fri, 26 Nov 2021 14:51:19 GMT Message-Id: <202111261451.1AQEpJ7Y040922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: ae92ace05fd4 - main - Per-thread stack canary on arm64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae92ace05fd4fcf64e3bb787951578f655b1fa5f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637938280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=twx11EOdgRM7yxrh3T6Xua/m0L8UqVwufDeirYsoqYo=; b=tgC+Nmij6Il77GcdB2gUV2JmQGFHv/qAiV0gAB1ob+6MWSsGU7tGOFeIQ6bZLDKn3v9TKs XPNO1w3kX+9FLJmUPUU2suZD0EuCGqB0HUPDZG87OfC2nnZRKARFzSFItV33D48Du4h88h P9BbYFidgtVbZzCtTRnyYfFShAAh7NySCM4VGw2uhl8BJzH0+50OyryZ8O0ApEoMSHNJPF xuQhc1UF/okVZCgcBrb1GIScJ2k1GTJ4ZMnKcBjjzl3qYtH+FxGR/ULg9Pl7XvdSuU7udo Gf5EK6jqVigPYNYK/qFrTNe8O14eP2+0ldI7qMFzZHggV24Egi0GXtcmUhNftw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637938280; a=rsa-sha256; cv=none; b=jJrWI3Xxsuk1gkU8yiqfyfo83ISkuH6vIDJnr5GeXldd2l50wFt5MzKh2dB4IhfHnYIHsz i/ACUpu/mC3p1x9NsyUXElJglDHQ+EQIQNBhEvIkSrW3j/oOUnTeA8LzdkycDlhO3O/8rx i1IacJDifuQqLgLCnEkZ25Ehk2R0lSZsZM/o2P9iU4WrMInrMR/dfDa32eKUh2odC8RAzs uVnbQJLaidStFUv8slK9y9E9E/ojGn3sp3Ym7owL1rWaPcCwc9F/6m0kmkbDyUtmGOkdg0 KRJMhdoEX+QQczjzG5k56JqbZl+3x4AfhAVeIYMysDDSZO8Tafo0F/UnJCFBhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=ae92ace05fd4fcf64e3bb787951578f655b1fa5f commit ae92ace05fd4fcf64e3bb787951578f655b1fa5f Author: Andrew Turner AuthorDate: 2021-11-22 15:20:51 +0000 Commit: Andrew Turner CommitDate: 2021-11-26 14:44:00 +0000 Per-thread stack canary on arm64 With the update to llvm 13 we are able to tell the compiler it can find the SSP canary relative to the register that holds the userspace stack pointer. As this is unused in most of the kernel it can be used here to point to a per-thread SSP canary. As the kernel could be built with an old toolchain, e.g. when upgrading from 13, add a warning that the options was enabled but the compiler doesn't support it to both the build and kernel boot. Discussed with: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33079 --- sys/arm64/arm64/exception.S | 7 +++++++ sys/arm64/arm64/genassym.c | 1 + sys/arm64/arm64/locore.S | 14 ++++++++++++++ sys/arm64/arm64/machdep.c | 22 ++++++++++++++++++++++ sys/arm64/arm64/pmap.c | 4 ++++ sys/arm64/arm64/vm_machdep.c | 10 ++++++++++ sys/arm64/conf/std.arm64 | 1 + sys/arm64/include/proc.h | 1 + sys/conf/Makefile.arm64 | 14 ++++++++++++++ sys/conf/options.arm64 | 4 ++++ 10 files changed, 78 insertions(+) diff --git a/sys/arm64/arm64/exception.S b/sys/arm64/arm64/exception.S index 22f6b7ce6145..d81bbce0efc7 100644 --- a/sys/arm64/arm64/exception.S +++ b/sys/arm64/arm64/exception.S @@ -66,6 +66,13 @@ __FBSDID("$FreeBSD$"); mrs x18, tpidr_el1 add x29, sp, #(TF_SIZE) .if \el == 0 +#if defined(PERTHREAD_SSP) + /* Load the SSP canary to sp_el0 */ + ldr x1, [x18, #(PC_CURTHREAD)] + add x1, x1, #(TD_MD_CANARY) + msr sp_el0, x1 +#endif + /* Apply the SSBD (CVE-2018-3639) workaround if needed */ ldr x1, [x18, #PC_SSBD] cbz x1, 1f diff --git a/sys/arm64/arm64/genassym.c b/sys/arm64/arm64/genassym.c index 1575a0158dec..8e3ddc48317b 100644 --- a/sys/arm64/arm64/genassym.c +++ b/sys/arm64/arm64/genassym.c @@ -73,6 +73,7 @@ ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); +ASSYM(TD_MD_CANARY, offsetof(struct thread, td_md.md_canary)); ASSYM(TF_SIZE, sizeof(struct trapframe)); ASSYM(TF_SP, offsetof(struct trapframe, tf_sp)); diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 92415aab1555..bc9a7271e93a 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -116,6 +116,13 @@ virtdone: cmp x15, x14 b.lo 1b +#if defined(PERTHREAD_SSP) + /* Set sp_el0 to the boot canary for early per-thread SSP to work */ + adrp x15, boot_canary + add x15, x15, :lo12:boot_canary + msr sp_el0, x15 +#endif + /* Backup the module pointer */ mov x1, x0 @@ -200,6 +207,13 @@ mp_virtdone: ldr x4, [x4] mov sp, x4 +#if defined(PERTHREAD_SSP) + /* Set sp_el0 to the boot canary for early per-thread SSP to work */ + adrp x15, boot_canary + add x15, x15, :lo12:boot_canary + msr sp_el0, x15 +#endif + /* Load the kernel ttbr0 pagetable */ msr ttbr0_el1, x27 isb diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 59a634f4d30c..821d9ba19022 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -109,6 +109,14 @@ enum arm64_bus arm64_bus_method = ARM64_BUS_NONE; */ struct pcpu pcpu0; +#if defined(PERTHREAD_SSP) +/* + * The boot SSP canary. Will be replaced with a per-thread canary when + * scheduling has started. + */ +uintptr_t boot_canary = 0x49a2d892bc05a0b1ul; +#endif + static struct trapframe proc0_tf; int early_boot = 1; @@ -136,6 +144,16 @@ void (*pagezero)(void *p) = pagezero_simple; int (*apei_nmi)(void); +#if defined(PERTHREAD_SSP_WARNING) +static void +print_ssp_warning(void *data __unused) +{ + printf("WARNING: Per-thread SSP is enabled but the compiler is too old to support it\n"); +} +SYSINIT(ssp_warn, SI_SUB_COPYRIGHT, SI_ORDER_ANY, print_ssp_warning, NULL); +SYSINIT(ssp_warn2, SI_SUB_LAST, SI_ORDER_ANY, print_ssp_warning, NULL); +#endif + static void pan_setup(void) { @@ -347,6 +365,9 @@ init_proc0(vm_offset_t kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; thread0.td_kstack_pages = KSTACK_PAGES; +#if defined(PERTHREAD_SSP) + thread0.td_md.md_canary = boot_canary; +#endif thread0.td_pcb = (struct pcb *)(thread0.td_kstack + thread0.td_kstack_pages * PAGE_SIZE) - 1; thread0.td_pcb->pcb_fpflags = 0; @@ -781,6 +802,7 @@ initarm(struct arm64_bootparams *abp) "mov x18, %0 \n" "msr tpidr_el1, %0" :: "r"(pcpup)); + /* locore.S sets sp_el0 to &thread0 so no need to set it here. */ PCPU_SET(curthread, &thread0); PCPU_SET(midr, get_midr()); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index cd499e026036..ef5a42c849dd 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -6619,6 +6619,10 @@ pmap_switch(struct thread *old __unused, struct thread *new) /* Store the new curthread */ PCPU_SET(curthread, new); +#if defined(PERTHREAD_SSP) + /* Set the new threads SSP canary */ + __asm("msr sp_el0, %0" :: "r"(&new->td_md.md_canary)); +#endif /* And the new pcb */ pcb = new->td_pcb; diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index dfc2f8cb267f..2db20427c977 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -113,6 +113,11 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) /* Setup to release spin count in fork_exit(). */ td2->td_md.md_spinlock_count = 1; td2->td_md.md_saved_daif = PSR_DAIF_DEFAULT; + +#if defined(PERTHREAD_SSP) + /* Set the new canary */ + arc4random_buf(&td2->td_md.md_canary, sizeof(td2->td_md.md_canary)); +#endif } void @@ -187,6 +192,11 @@ cpu_copy_thread(struct thread *td, struct thread *td0) /* Setup to release spin count in fork_exit(). */ td->td_md.md_spinlock_count = 1; td->td_md.md_saved_daif = PSR_DAIF_DEFAULT; + +#if defined(PERTHREAD_SSP) + /* Set the new canary */ + arc4random_buf(&td->td_md.md_canary, sizeof(td->td_md.md_canary)); +#endif } /* diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64 index e5ed1d7db996..553e961dc0a2 100644 --- a/sys/arm64/conf/std.arm64 +++ b/sys/arm64/conf/std.arm64 @@ -67,6 +67,7 @@ options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default options RCTL # Resource limits options INTRNG options LINUX_BOOT_ABI # Boot using booti command from U-Boot +options PERTHREAD_SSP # Per-thread SSP canary # Debugging support. Always need this: options KDB # Enable kernel debugger support. diff --git a/sys/arm64/include/proc.h b/sys/arm64/include/proc.h index 3800798d79b7..43200fd115fc 100644 --- a/sys/arm64/include/proc.h +++ b/sys/arm64/include/proc.h @@ -37,6 +37,7 @@ struct mdthread { int md_spinlock_count; /* (k) */ register_t md_saved_daif; /* (k) */ + uintptr_t md_canary; }; struct mdproc { diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index 2e404664708c..e75062115121 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -30,6 +30,20 @@ INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include LINUX_DTS_VERSION!= awk '/freebsd,dts-version/ { sub(/;$$/,"", $$NF); print $$NF }' $S/dts/freebsd-compatible.dts CFLAGS += -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\" +PERTHREAD_SSP_ENABLED!= grep PERTHREAD_SSP opt_global.h || true ; echo +.if !empty(PERTHREAD_SSP_ENABLED) +. if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000 +ARM64_SSP_CFLAGS = -mstack-protector-guard=sysreg +ARM64_SSP_CFLAGS += -mstack-protector-guard-reg=sp_el0 +ARM64_SSP_CFLAGS += -mstack-protector-guard-offset=0 +. else +ARM64_SSP_CFLAGS += -DPERTHREAD_SSP_WARNING +. warning "Compiler is too old to support PERTHREAD_SSP" +. endif +CFLAGS += ${ARM64_SSP_CFLAGS} +ARCH_FLAGS += ${ARM64_SSP_CFLAGS} +.endif + # Use a custom SYSTEM_LD command to generate the elf kernel, so we can # set the text segment start address, and also strip the "arm mapping # symbols" which have names like $a.0 and $d.2; see the document diff --git a/sys/conf/options.arm64 b/sys/conf/options.arm64 index 5185a301e55e..ff2db5caf082 100644 --- a/sys/conf/options.arm64 +++ b/sys/conf/options.arm64 @@ -8,6 +8,10 @@ VFP opt_global.h LINUX_BOOT_ABI opt_global.h LSE_ATOMICS opt_global.h +# Per-thread stack smashing protection support +# Needs clang >= 13 +PERTHREAD_SSP opt_global.h + # Binary compatibility COMPAT_FREEBSD32 opt_global.h From nobody Fri Nov 26 19:24:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 29B4E18BD343; Fri, 26 Nov 2021 19:24: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 4J14S967Y5z4h9G; Fri, 26 Nov 2021 19:24:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B26F1652A; Fri, 26 Nov 2021 19:24: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 1AQJOP3p003254; Fri, 26 Nov 2021 19:24:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQJOPg5003253; Fri, 26 Nov 2021 19:24:25 GMT (envelope-from git) Date: Fri, 26 Nov 2021 19:24:25 GMT Message-Id: <202111261924.1AQJOPg5003253@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: 4318dc9d13c6 - main - MK_NAND: this option was retired some time ago List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4318dc9d13c6ae7da6a39be984050e409b8e73d3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637954665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=innhsKODka0Rxfzjhz7f4F55VTegOsldkMs2GPNeSMs=; b=a0OqOEnyY1AqEp6pVfqox+S/3Qq3iqMJM1/BFM9Jvu3cmBD+skd6j1zwQ/MzxM/o7TNxre uaB5b3zbojaLoXJsZkDrKQS6e5kF9eBLiYb+fn5AUeBqTxHEh82x6kNZnQY5E3+Ezr0/d6 O5hGbx8Mv00FHbEKuCxQ7zqGhkVdc2BfAn7oq1yiYgcTyIejgkj8EkN96sFA4q+9IY6VCI 9EZ8z8+aMB2s9iX45KIHcCzB2r31g4IAy1xjlFLjo3/NA2mM8V2Gjunh9ytkLiEU1IyNeg mCmsWPjLqsNKQ++08as7Zb6ZmAZTwlY2YaNmA79tmwH/rU5+pnQVKuGxflR4ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637954665; a=rsa-sha256; cv=none; b=KBHUAMTYRFe3stnAF7Ehb2sn1oLdBCSzpgCAV+eIALyqgLvPMcnDwbzwELQJXxSFgD+iVL EDoRqLzqQzeZeBBuaU4rvnLSSRhhpPooHLpUSDTFS7drD5WjY6t872EmzpV0YTLTcvLz02 7pcD3c/30ZaH+VvzYqS2LGtbUtokxGAJ2pnR9fD2B7jZBod1qIIlUcsdHUAjvhyJR2vixW 767Lb5fyiyEPm0FckL7oj/WGUpXAQ3KZy+GtrW/TdyC/A3NgSH9GViubwOrIthRpRzvElm H2M6zm11If5TV6R2qQN9dx/cj1NM4ZcCbPYvcdCeL9sknHrfZqe1lwjET7+TQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4318dc9d13c6ae7da6a39be984050e409b8e73d3 commit 4318dc9d13c6ae7da6a39be984050e409b8e73d3 Author: Warner Losh AuthorDate: 2021-11-26 19:16:03 +0000 Commit: Warner Losh CommitDate: 2021-11-26 19:22:56 +0000 MK_NAND: this option was retired some time ago Remove the now-bogus WITH_NAND and WITHOUT_NAND flags. Sponsored by: Netflix --- tools/build/options/WITHOUT_NAND | 2 -- tools/build/options/WITH_NAND | 2 -- 2 files changed, 4 deletions(-) diff --git a/tools/build/options/WITHOUT_NAND b/tools/build/options/WITHOUT_NAND deleted file mode 100644 index a11d1901b261..000000000000 --- a/tools/build/options/WITHOUT_NAND +++ /dev/null @@ -1,2 +0,0 @@ -.\" $FreeBSD$ -Do not build the NAND Flash components. diff --git a/tools/build/options/WITH_NAND b/tools/build/options/WITH_NAND deleted file mode 100644 index 390167fca341..000000000000 --- a/tools/build/options/WITH_NAND +++ /dev/null @@ -1,2 +0,0 @@ -.\" $FreeBSD$ -Build the NAND Flash components. From nobody Fri Nov 26 19:24:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 68AE418BD4AA; Fri, 26 Nov 2021 19:24: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 4J14SC01Y8z4hRG; Fri, 26 Nov 2021 19:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4BC4625F; Fri, 26 Nov 2021 19:24: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 1AQJOQo5003278; Fri, 26 Nov 2021 19:24:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQJOQ35003277; Fri, 26 Nov 2021 19:24:26 GMT (envelope-from git) Date: Fri, 26 Nov 2021 19:24:26 GMT Message-Id: <202111261924.1AQJOQ35003277@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: f89842a71a59 - main - src.conf: regenerate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f89842a71a599b6d4463662c282d3daff0a34cb0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637954667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T9LDXpctvBxzxVhtpuwU9RGbeDoz1cFojb0fPWK0oQw=; b=lL4aHLyN9F5ebQN/mgKx/cQLu/NjXDuWfMEmf818AtlwY22bmvTSzhGDsBoOOs6mzec8ab 3/5leLlMFtksmWv4M9geACTH/U3YpRoa2Pupgny5v+2VZ5rrc4r6SASsIX5iwKiL3+Rsg2 0Sai6KVIg9GnVpZbDFH1JgiDWliEW5wQNfzY5dVUKASP8X5aak2XvhiFqaMVlLTQn+OU1d 7zdF/MbHF9g+yyGnGERNHWlomIOSF1E9VsJ7oLJxRyQb3PfRrnwVPJfwgJZdp9vbFDwkRr 6bBVKIFZeVOG9wlV1nh4TKaVjAEaatertAmdoFpiU7VeBYLiXK5OA3mTe8r/1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637954667; a=rsa-sha256; cv=none; b=NoTTZcC8DyKlZtHxCJvj7Jg0Heu8QneOIff/rQ3kGBTM2H5dzA4JJqo3/hesv2hkJYjk5B dteBsaVuUYsQ57XthuVl6eLQVkEXl2drVCZK6XcKhE66hXs+CF4ix7nSk68MPrwrj9G/j4 ujoytWPBTH/0Zjel5+YqnEzzjnuw0o+XTREehR7va2HSam8yz/DGQafI8ueUB0x38BU3uQ w6X6rL/EiO7LUZTpjq8bewulD96hVYjvF+cEJrlCtNHXLqVQNuvvLvT11wGWKHeHmfByXh F1hfMoDLYJxen5KXr8B3r74pIbJsndc9xNhWKaaMsZpWj+cnXmix9hB9Wop8ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f89842a71a599b6d4463662c282d3daff0a34cb0 commit f89842a71a599b6d4463662c282d3daff0a34cb0 Author: Warner Losh AuthorDate: 2021-11-26 19:22:48 +0000 Commit: Warner Losh CommitDate: 2021-11-26 19:22:56 +0000 src.conf: regenerate --- share/man/man5/src.conf.5 | 47 ++++++++++++++--------------------------------- 1 file changed, 14 insertions(+), 33 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 61629e32f225..44d57a3035d5 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd November 1, 2021 +.Dd November 26, 2021 .Dt SRC.CONF 5 .Os .Sh NAME @@ -463,7 +463,7 @@ Do not build .Xr cxgbetool 8 .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_CXGBETOOL Build .Xr cxgbetool 8 @@ -636,7 +636,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -mips/mips, mips/mips64, powerpc/powerpc and powerpc/powerpc64. +powerpc/powerpc and powerpc/powerpc64. .It Va WITH_EFI Build .Xr efivar 3 @@ -709,17 +709,6 @@ Neither build nor install .Lb libgmock , .Lb libgtest , and dependent tests. -.Pp -This is a default setting on -mips/mips and mips/mips64. -.It Va WITH_GOOGLETEST -Build and install -.Lb libgmock , -.Lb libgtest , -and dependent tests. -.Pp -This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_GPIO Do not build .Xr gpioctl 8 @@ -738,7 +727,7 @@ Do not build HTML docs. Do not build or install HyperV utilities. .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, mips/mips, mips/mips64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, arm64/aarch64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_HYPERV Build or install HyperV utilities. .Pp @@ -898,7 +887,7 @@ On 64-bit platforms, do not build 32-bit library set and a runtime linker. .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_LIBSOFT On armv6 only, enable soft float ABI compatibility libraries. This option is for transitioning to the new hard float ABI. @@ -908,7 +897,7 @@ Do not build LLVM's lld linker. Do not build the LLDB debugger. .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_LLDB Build the LLDB debugger. .Pp @@ -1014,7 +1003,7 @@ powerpc/powerpc and powerpc/powerpc64. Build GELI bootloader support. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, mips/mips64, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_LOADER_LUA Do not build LUA bindings for the boot loader. .Pp @@ -1024,12 +1013,12 @@ powerpc/powerpc and powerpc/powerpc64. Build LUA bindings for the boot loader. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, mips/mips64, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_LOADER_OFW Disable building of openfirmware bootloader components. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, mips/mips64, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_LOADER_OFW Build openfirmware bootloader components. .Pp @@ -1044,7 +1033,7 @@ amd64/amd64, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. Build ubldr. .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc and powerpc/powerpc64. +arm/armv6, arm/armv7, powerpc/powerpc and powerpc/powerpc64. .It Va WITH_LOADER_VERBOSE Build with extra verbose debugging in the loader. May explode already nearly too large loader over the limit. @@ -1211,7 +1200,7 @@ Do not build .Xr mlx5tool 8 .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_MLX5TOOL Build .Xr mlx5tool 8 @@ -1279,7 +1268,7 @@ and related programs. Do not build nvme related tools and kernel modules. .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_NVME Build nvme related tools and kernel modules. .Pp @@ -1308,7 +1297,7 @@ Enable building LDAP support for kerberos using an openldap client from ports. Do not build LLVM's OpenMP runtime. .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mips, mips/mips64 and powerpc/powerpc. +arm/armv6, arm/armv7 and powerpc/powerpc. .It Va WITH_OPENMP Build LLVM's OpenMP runtime. .Pp @@ -1355,7 +1344,7 @@ is set explicitly) Do not include kernel TLS support in OpenSSL. .Pp This is a default setting on -arm/armv6, arm/armv7, i386/i386, mips/mips, mips/mips64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, i386/i386, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_OPENSSL_KTLS Include kernel TLS support in OpenSSL. .Pp @@ -1493,14 +1482,6 @@ Do not build kernel modules that include sourceless native code for host CPU. Do not build kernel modules that include sourceless microcode. .It Va WITHOUT_SSP Do not build world with propolice stack smashing protection. -.Pp -This is a default setting on -mips/mips and mips/mips64. -.It Va WITH_SSP -Build world with propolice stack smashing protection. -.Pp -This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_STAGING Enable staging of files to a stage tree. This can be best thought of as auto-install to From nobody Fri Nov 26 19:32:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1D6DA18C2E0F; Fri, 26 Nov 2021 19:32: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 4J14dy50Nlz4mpK; Fri, 26 Nov 2021 19:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BA9866BB; Fri, 26 Nov 2021 19:32: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 1AQJWs6j016256; Fri, 26 Nov 2021 19:32:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQJWsFu016255; Fri, 26 Nov 2021 19:32:54 GMT (envelope-from git) Date: Fri, 26 Nov 2021 19:32:54 GMT Message-Id: <202111261932.1AQJWsFu016255@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: 1879021942f5 - main - tmpfs: add vop_stdadd_writecount_nomsync to fifo vnode 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1879021942f56c8b264f4aeb1966b3733908ef62 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637955174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AUFjYFqN8dqHdHlOXdVZ2ljKr656yc2nuh+BKSX5igg=; b=udFqF5NjaLVuqA5pFz9Ra+M6cQJ/PzvmdtccQjUHGs8K9MHLroQvjQ91w+JK7RnjEd83yl 1JEFhHauo6WgPGhkkkHUgIIjh6+qdurFrqHZ0iveYWjaKNu9g4nVOAlJMPDBg3KN+Ntze8 1OSd0iBxqW4qaQ5PbP+1Obif1lgSSsgkuSbvH8C960YbFF3jFzim6ytz7jMNzy790FNu46 8+xZl/nmxf0L/LYaHACPew00wMQCqXfL2PyUf41Hfjeyxx+6x+8JwzogvPVHlmcTHSKxvB SawtQ0ZMP9Jtmqx+RABHEYCvW0OIhN4HJE59srUny+cbgtNfdGpzptsZ1Wj4iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637955174; a=rsa-sha256; cv=none; b=qzr30RLfzn3tX6fTzAcsAU1Hi53MVeeciZRlx5dwzmCcMwgwO5i52oAFwwQCx+a8RjM0/r gBVwpibr3IMp9XxAjPht//2i9PLzQxYzAzrzd/LhMFiwQ3PJurfOElqZ3x92m5FRK1ZBmF dZU9yv2dWHzGaPYV4KQ9Y4eKbBCfAWngT8kcck+nmWHUNDLjtOmtdxGqoQ6yVkAHobS9Qf D/b/tiR9RK+jbDtq/rnyHq7L9NjxmjZvWXycRmlhzkOaxcXrRpA6rQmpzUOsH1+KEY3OiI WGAcTmwWrG+mOWJEi5PJbemegjJ+qQ6QaitSD4zdhePmnXlWEL8Qu6bLVR7VQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1879021942f56c8b264f4aeb1966b3733908ef62 commit 1879021942f56c8b264f4aeb1966b3733908ef62 Author: Mateusz Guzik AuthorDate: 2021-11-26 19:29:49 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-26 19:32:35 +0000 tmpfs: add vop_stdadd_writecount_nomsync to fifo vnode ops Reported by: yasu Fixes: 3ffcfa599e29686c ("vfs: add vop_stdadd_writecount_nomsync") --- sys/fs/tmpfs/tmpfs_fifoops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/fs/tmpfs/tmpfs_fifoops.c b/sys/fs/tmpfs/tmpfs_fifoops.c index 9b66f26fa14a..ac8b0738c4c7 100644 --- a/sys/fs/tmpfs/tmpfs_fifoops.c +++ b/sys/fs/tmpfs/tmpfs_fifoops.c @@ -73,5 +73,6 @@ struct vop_vector tmpfs_fifoop_entries = { .vop_setattr = tmpfs_setattr, .vop_pathconf = tmpfs_pathconf, .vop_print = tmpfs_print, + .vop_add_writecount = vop_stdadd_writecount_nomsync, }; VFS_VOP_VECTOR_REGISTER(tmpfs_fifoop_entries); From nobody Fri Nov 26 19:40:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9938218C6A93; Fri, 26 Nov 2021 19:40: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 4J14pL2LVGz4q6n; Fri, 26 Nov 2021 19:40:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C4A963BD; Fri, 26 Nov 2021 19:40: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 1AQJeAba020032; Fri, 26 Nov 2021 19:40:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQJeAuY020027; Fri, 26 Nov 2021 19:40:10 GMT (envelope-from git) Date: Fri, 26 Nov 2021 19:40:10 GMT Message-Id: <202111261940.1AQJeAuY020027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: cfe9b890d574 - stable/13 - pf: Introduce ridentifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cfe9b890d574a92e8b04eb662e9ac2010d243193 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637955610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZid3wRohUGCtCXiIELU7gZHWp2CmfMZ73hTLvCac3M=; b=LfPdvUduOrw9t1o7cZAcxdpktdrEPyTrtwMhvvdZARIVaWir7W+DDa1OkIUjplImjKl0GM Tpo34769Kh8UCQA7Qu6/GwE7d/LZjzndOtBsV5iQBF81OkLLJ3aqn9rFy+zI+ddO8B6DU5 9Px+2bIFoaU998Hde+xj04fMTVp28yyiAwVc6z9QeEgn5bEjPzxwbw/XNrRQciOXroIdNW UH9G78TXDYq/9r+g0qBf4uSXZdozOq+y8+o/3bZFEj9SUjgrADGCEc8nzkq6T1Oh19OhW+ /UMwokRePE5Ku0mB8BhnkZn2Nib9Wlra3y0qhQakrlm79E3JNDIrTz2YWv2fQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637955610; a=rsa-sha256; cv=none; b=qOPXanpD1YlBLIBfRBuhUc5AUVUiiCs3ZoKUF6zd8vvPtvMrvDBN+MqL3UDq70qhQWsmKX Wwr5S6o+zVAlQZ8dPb8OQCxQ9GXn9hFLFdtijsqfDdcb3Ql84V4ZZSKzYLywitvFyXllXg ZS7xx+RCfJ3ajrK5FKN/JJJpMomBhTLt7R5CfJVp3RVHoVuPXlOcznkYMiRwMual0l632t FWYheIvYX8MWS9twanu67wH9t1pX63ui3lmqzHP0TbBCdc4wGS+QzOnNeQX0jkBLZaZR5M X3EjMzo4IvL4HNNk3ibdXEXhR/79R5LK+QwwlMc2CXT6AADWG6jAIP6TF93diw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=cfe9b890d574a92e8b04eb662e9ac2010d243193 commit cfe9b890d574a92e8b04eb662e9ac2010d243193 Author: Kristof Provost AuthorDate: 2021-10-29 15:40:53 +0000 Commit: Kristof Provost CommitDate: 2021-11-26 03:39:05 +0000 pf: Introduce ridentifier Allow users to set a number on rules which will be exposed as part of the pflog header. The intent behind this is to allow users to correlate rules across updates (remember that pf rules continue to exist and match existing states, even if they're removed from the active ruleset) and pflog. Obtained from: pfSense MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32750 (cherry picked from commit 76c5eecc3490d89a9a3492ed2354802b69d69602) --- contrib/tcpdump/print-pflog.c | 7 ++++++- lib/libpfctl/libpfctl.c | 2 ++ lib/libpfctl/libpfctl.h | 1 + sbin/pfctl/parse.y | 14 ++++++++++++++ sbin/pfctl/pfctl_parser.c | 2 ++ share/man/man4/pflog.4 | 3 ++- share/man/man5/pf.conf.5 | 7 ++++++- sys/net/if_pflog.h | 1 + sys/net/pfvar.h | 1 + sys/netpfil/ipfw/nat64/nat64clat.c | 2 +- sys/netpfil/ipfw/nat64/nat64lsn.c | 2 +- sys/netpfil/ipfw/nat64/nat64stl.c | 2 +- sys/netpfil/pf/if_pflog.c | 3 ++- sys/netpfil/pf/pf_nv.c | 2 ++ 14 files changed, 42 insertions(+), 7 deletions(-) diff --git a/contrib/tcpdump/print-pflog.c b/contrib/tcpdump/print-pflog.c index 38201c55ee3f..49994507e728 100644 --- a/contrib/tcpdump/print-pflog.c +++ b/contrib/tcpdump/print-pflog.c @@ -88,10 +88,12 @@ static const struct tok pf_directions[] = { static void pflog_print(netdissect_options *ndo, const struct pfloghdr *hdr) { - uint32_t rulenr, subrulenr; + uint32_t rulenr, subrulenr, ridentifier; rulenr = EXTRACT_32BITS(&hdr->rulenr); subrulenr = EXTRACT_32BITS(&hdr->subrulenr); + ridentifier = EXTRACT_32BITS(&hdr->ridentifier); + if (subrulenr == (uint32_t)-1) ND_PRINT((ndo, "rule %u/", rulenr)); else @@ -102,6 +104,9 @@ pflog_print(netdissect_options *ndo, const struct pfloghdr *hdr) if (hdr->uid != UID_MAX) ND_PRINT((ndo, " [uid %u]", (unsigned)hdr->uid)); + if (ridentifier != 0) + ND_PRINT((ndo, " [ridentifier %u]", ridentifier)); + ND_PRINT((ndo, ": %s %s on %s: ", tok2str(pf_actions, "unkn(%u)", hdr->action), tok2str(pf_directions, "unkn(%u)", hdr->dir), diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index c2d57d8136ca..e41f970e7696 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -455,6 +455,7 @@ pf_nvrule_to_rule(const nvlist_t *nvl, struct pfctl_rule *rule) assert(labelcount <= PF_RULE_MAX_LABEL_COUNT); for (size_t i = 0; i < labelcount; i++) strlcpy(rule->label[i], labels[i], PF_RULE_LABEL_SIZE); + rule->ridentifier = nvlist_get_number(nvl, "ridentifier"); strlcpy(rule->ifname, nvlist_get_string(nvl, "ifname"), IFNAMSIZ); strlcpy(rule->qname, nvlist_get_string(nvl, "qname"), PF_QNAME_SIZE); strlcpy(rule->pqname, nvlist_get_string(nvl, "pqname"), PF_QNAME_SIZE); @@ -566,6 +567,7 @@ pfctl_add_rule(int dev, const struct pfctl_rule *r, const char *anchor, r->label[labelcount]); labelcount++; } + nvlist_add_number(nvlr, "ridentifier", r->ridentifier); nvlist_add_string(nvlr, "ifname", r->ifname); nvlist_add_string(nvlr, "qname", r->qname); diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index 70c144772c02..ac239d7cdcb1 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -81,6 +81,7 @@ struct pfctl_rule { struct pf_rule_addr dst; union pf_rule_ptr skip[PF_SKIP_COUNT]; char label[PF_RULE_MAX_LABEL_COUNT][PF_RULE_LABEL_SIZE]; + u_int32_t ridentifier; char ifname[IFNAMSIZ]; char qname[PF_QNAME_SIZE]; char pqname[PF_QNAME_SIZE]; diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index c8a310688ca7..c075a0d4607c 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -236,6 +236,7 @@ static struct filter_opts { struct node_icmp *icmpspec; u_int32_t tos; u_int32_t prob; + u_int32_t ridentifier; struct { int action; struct node_state_opt *options; @@ -260,6 +261,7 @@ static struct filter_opts { static struct antispoof_opts { char *label[PF_RULE_MAX_LABEL_COUNT]; int labelcount; + u_int32_t ridentifier; u_int rtableid; } antispoof_opts; @@ -468,6 +470,7 @@ int parseport(char *, struct range *r, int); %token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY MAPEPORTSET %token ALTQ CBQ CODEL PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME %token UPPERLIMIT QUEUE PRIORITY QLIMIT HOGS BUCKETS RTABLE TARGET INTERVAL +%token RIDENTIFIER %token LOAD RULESET_OPTIMIZATION PRIO %token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE %token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY @@ -923,6 +926,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto r.af = $6; r.prob = $9.prob; r.rtableid = $9.rtableid; + r.ridentifier = $9.ridentifier; if ($9.tag) if (strlcpy(r.tagname, $9.tag, @@ -1322,6 +1326,7 @@ antispoof : ANTISPOOF logquick antispoof_ifspc af antispoof_opts { r.logif = $2.logif; r.quick = $2.quick; r.af = $4; + r.ridentifier = $5.ridentifier; if (rule_label(&r, $5.label)) YYERROR; r.rtableid = $5.rtableid; @@ -1374,6 +1379,7 @@ antispoof : ANTISPOOF logquick antispoof_ifspc af antispoof_opts { r.logif = $2.logif; r.quick = $2.quick; r.af = $4; + r.ridentifier = $5.ridentifier; if (rule_label(&r, $5.label)) YYERROR; r.rtableid = $5.rtableid; @@ -1436,6 +1442,9 @@ antispoof_opt : label { } antispoof_opts.label[antispoof_opts.labelcount++] = $1; } + | RIDENTIFIER number { + antispoof_opts.ridentifier = $2; + } | RTABLE NUMBER { if ($2 < 0 || $2 > rt_tableid_max()) { yyerror("invalid rtable id"); @@ -2151,6 +2160,7 @@ pfrule : action dir logquick interface route af proto fromto YYERROR; for (int i = 0; i < PF_RULE_MAX_LABEL_COUNT; i++) free($9.label[i]); + r.ridentifier = $9.ridentifier; r.flags = $9.flags.b1; r.flagset = $9.flags.b2; if (($9.flags.b1 & $9.flags.b2) != $9.flags.b1) { @@ -2581,6 +2591,9 @@ filter_opt : USER uids { filter_opts.keep.action = $1.action; filter_opts.keep.options = $1.options; } + | RIDENTIFIER number { + filter_opts.ridentifier = $2; + } | FRAGMENT { filter_opts.fragment = 1; } @@ -5695,6 +5708,7 @@ lookup(char *s) { "return-icmp", RETURNICMP}, { "return-icmp6", RETURNICMP6}, { "return-rst", RETURNRST}, + { "ridentifier", RIDENTIFIER}, { "round-robin", ROUNDROBIN}, { "route", ROUTE}, { "route-to", ROUTETO}, diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 8d39b45eb9a5..8dde3c916009 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1019,6 +1019,8 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer i = 0; while (r->label[i][0]) printf(" label \"%s\"", r->label[i++]); + if (r->ridentifier) + printf(" ridentifier %u", r->ridentifier); if (r->qname[0] && r->pqname[0]) printf(" queue(%s, %s)", r->qname, r->pqname); else if (r->qname[0]) diff --git a/share/man/man4/pflog.4 b/share/man/man4/pflog.4 index 300092a9532b..19eb7012bca3 100644 --- a/share/man/man4/pflog.4 +++ b/share/man/man4/pflog.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 18, 2019 +.Dd October 29, 2021 .Dt PFLOG 4 .Os .Sh NAME @@ -84,6 +84,7 @@ struct pfloghdr { pid_t rule_pid; u_int8_t dir; u_int8_t pad[3]; + u_int32_t ridentifier; }; .Ed .Sh EXAMPLES diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index 32f51bc00e47..cc1b902e0006 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -1867,6 +1867,9 @@ pass in inet proto tcp from any to 1.2.3.5 \e The macro expansion for the .Ar label directive occurs only at configuration file parse time, not during runtime. +.It Ar ridentifier Aq Ar number +Add an identifier (number) to the rule, which can be used to correlate the rule +to pflog entries, even after ruleset updates. .It Xo Ar queue Aq Ar queue .No \*(Ba ( Aq Ar queue , .Aq Ar queue ) @@ -2969,7 +2972,8 @@ filteropt = user | group | flags | icmp-type | icmp6-type | "tos" tos | "label" string | "tag" string | [ ! ] "tagged" string | "set prio" ( number | "(" number [ [ "," ] number ] ")" ) | "queue" ( string | "(" string [ [ "," ] string ] ")" ) | - "rtable" number | "probability" number"%" | "prio" number + "rtable" number | "probability" number"%" | "prio" number | + "ridentifier" number nat-rule = [ "no" ] "nat" [ "pass" [ "log" [ "(" logopts ")" ] ] ] [ "on" ifspec ] [ af ] @@ -2993,6 +2997,7 @@ rdr-rule = [ "no" ] "rdr" [ "pass" [ "log" [ "(" logopts ")" ] ] ] antispoof-rule = "antispoof" [ "log" ] [ "quick" ] "for" ifspec [ af ] [ "label" string ] + [ "ridentifier" number ] table-rule = "table" "\*(Lt" string "\*(Gt" [ tableopts-list ] tableopts-list = tableopts-list tableopts | tableopts diff --git a/sys/net/if_pflog.h b/sys/net/if_pflog.h index 5ed341a85d86..c77d8da1440a 100644 --- a/sys/net/if_pflog.h +++ b/sys/net/if_pflog.h @@ -50,6 +50,7 @@ struct pfloghdr { pid_t rule_pid; u_int8_t dir; u_int8_t pad[3]; + u_int32_t ridentifier; }; #define PFLOG_HDRLEN sizeof(struct pfloghdr) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 9fb231e95a2c..f9071546cbce 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -572,6 +572,7 @@ struct pf_krule { struct pf_rule_addr dst; union pf_krule_ptr skip[PF_SKIP_COUNT]; char label[PF_RULE_MAX_LABEL_COUNT][PF_RULE_LABEL_SIZE]; + uint32_t ridentifier; char ifname[IFNAMSIZ]; char qname[PF_QNAME_SIZE]; char pqname[PF_QNAME_SIZE]; diff --git a/sys/netpfil/ipfw/nat64/nat64clat.c b/sys/netpfil/ipfw/nat64/nat64clat.c index fcc922726d02..c48c68183e08 100644 --- a/sys/netpfil/ipfw/nat64/nat64clat.c +++ b/sys/netpfil/ipfw/nat64/nat64clat.c @@ -71,7 +71,7 @@ nat64clat_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, static uint32_t pktid = 0; memset(plog, 0, sizeof(*plog)); - plog->length = PFLOG_REAL_HDRLEN; + plog->length = PFLOG_HDRLEN; plog->af = family; plog->action = PF_NAT; plog->dir = PF_IN; diff --git a/sys/netpfil/ipfw/nat64/nat64lsn.c b/sys/netpfil/ipfw/nat64/nat64lsn.c index bde42eeb18d6..90c27cabdf29 100644 --- a/sys/netpfil/ipfw/nat64/nat64lsn.c +++ b/sys/netpfil/ipfw/nat64/nat64lsn.c @@ -181,7 +181,7 @@ nat64lsn_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, { memset(plog, 0, sizeof(*plog)); - plog->length = PFLOG_REAL_HDRLEN; + plog->length = PFLOG_HDRLEN; plog->af = family; plog->action = PF_NAT; plog->dir = PF_IN; diff --git a/sys/netpfil/ipfw/nat64/nat64stl.c b/sys/netpfil/ipfw/nat64/nat64stl.c index 286876e553e3..a3451a107579 100644 --- a/sys/netpfil/ipfw/nat64/nat64stl.c +++ b/sys/netpfil/ipfw/nat64/nat64stl.c @@ -70,7 +70,7 @@ nat64stl_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, static uint32_t pktid = 0; memset(plog, 0, sizeof(*plog)); - plog->length = PFLOG_REAL_HDRLEN; + plog->length = PFLOG_HDRLEN; plog->af = family; plog->action = PF_NAT; plog->dir = PF_IN; diff --git a/sys/netpfil/pf/if_pflog.c b/sys/netpfil/pf/if_pflog.c index 9eb168b9a74f..4853c1301d6f 100644 --- a/sys/netpfil/pf/if_pflog.c +++ b/sys/netpfil/pf/if_pflog.c @@ -215,7 +215,7 @@ pflog_packet(struct pfi_kkif *kif, struct mbuf *m, sa_family_t af, u_int8_t dir, return (0); bzero(&hdr, sizeof(hdr)); - hdr.length = PFLOG_REAL_HDRLEN; + hdr.length = PFLOG_HDRLEN; hdr.af = af; hdr.action = rm->action; hdr.reason = reason; @@ -231,6 +231,7 @@ pflog_packet(struct pfi_kkif *kif, struct mbuf *m, sa_family_t af, u_int8_t dir, strlcpy(hdr.ruleset, ruleset->anchor->name, sizeof(hdr.ruleset)); } + hdr.ridentifier = htonl(rm->ridentifier); /* * XXXGL: we avoid pf_socket_lookup() when we are holding * state lock, since this leads to unsafe LOR. diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c index d53c6fe4b84e..b6676be645d7 100644 --- a/sys/netpfil/pf/pf_nv.c +++ b/sys/netpfil/pf/pf_nv.c @@ -531,6 +531,7 @@ pf_nvrule_to_krule(const nvlist_t *nvl, struct pf_krule *rule) } } + PFNV_CHK(pf_nvuint32_opt(nvl, "ridentifier", &rule->ridentifier, 0)); PFNV_CHK(pf_nvstring(nvl, "ifname", rule->ifname, sizeof(rule->ifname))); PFNV_CHK(pf_nvstring(nvl, "qname", rule->qname, sizeof(rule->qname))); @@ -693,6 +694,7 @@ pf_krule_to_nvrule(struct pf_krule *rule) nvlist_append_string_array(nvl, "labels", rule->label[i]); } nvlist_add_string(nvl, "label", rule->label[0]); + nvlist_add_number(nvl, "ridentifier", rule->ridentifier); nvlist_add_string(nvl, "ifname", rule->ifname); nvlist_add_string(nvl, "qname", rule->qname); nvlist_add_string(nvl, "pqname", rule->pqname); From nobody Fri Nov 26 19:40:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D793818C684B; Fri, 26 Nov 2021 19:40: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 4J14pM2q5vz4qNl; Fri, 26 Nov 2021 19:40:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C87E63BE; Fri, 26 Nov 2021 19:40: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 1AQJeBwd020247; Fri, 26 Nov 2021 19:40:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQJeBgB020246; Fri, 26 Nov 2021 19:40:11 GMT (envelope-from git) Date: Fri, 26 Nov 2021 19:40:11 GMT Message-Id: <202111261940.1AQJeBgB020246@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 07b8f5dca17b - stable/13 - pf tests: basic test for ridentifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 07b8f5dca17bb45257e6ded2de7cf831b0c27716 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637955611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7mncLERuDD4Kfn3x97Toc3IZ7KWy7bmRb6LQvdK8YUY=; b=eQHRzQP8AlpxbS/aXCTd98/Lb0uUy4Ynai1jGBPNLLdOurEyFG2u/5b4s87oJ/wtTppb8H 1nxwBat6ieR2gSBG+DuFnz3GGkg4b4hhkrREmp9m5euqHn8P+fTylBUzq2TtsEM1HERz0L /W9ybHn/SQtp5R3q3b0Wn7eJzcUNgFs1V0sca81TzsjDGtXe4gUmplX9aBK5ASOMULt9Oe 2K43M9634OAquX1livkmfExK4LvC1UumZyl5A3NIkq9ysiKjnrr9M2suQkM+SWScIUsLSF bPXMgADWljco08XC7GceSHH2r8IMHPfZpKSnEO2DWPx2mlH9cXjlVE7Wb8iuxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637955611; a=rsa-sha256; cv=none; b=NWfqOs4qjb8uk9/GVTJV5CmXI6gG/D+6QG94iSyrJ2MC5Fp6Qq46gTA1thw6F8e+BSlC5n WFvK4hnxAM9JL4yRqfG2WXbqYmYMH7NIqDY49+Fgj0vpjSLKCWy8H+mAUdJXlEyAjh1dnv Qc+owImPbAIv34yymPyokf2wo2Q+fCcbujiOBt3DYZ0bbdHCONqzUNW8PYAoRFY5ZHAL0M GFvzJLR0MvK+K79ls5Vl67TIHcsg16a9/PDyNo7GNNM8Fw08WkAfcxiCZRm3d2QVAcKLMG wGLwgGEtpgcIBJ98ZvgvBSfFzYgk1e0AZ+uzudzlynRu1mAEpbifJx9Lq2P3gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=07b8f5dca17bb45257e6ded2de7cf831b0c27716 commit 07b8f5dca17bb45257e6ded2de7cf831b0c27716 Author: Kristof Provost AuthorDate: 2021-10-29 15:52:59 +0000 Commit: Kristof Provost CommitDate: 2021-11-26 03:39:33 +0000 pf tests: basic test for ridentifier MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32751 (cherry picked from commit 508161111dc23cee0a41fa70de865743c694502f) --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/ridentifier.sh | 108 ++++++++++++++++++++++++++++++++++++ tests/sys/netpfil/pf/utils.subr | 7 +++ 3 files changed, 116 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 246c267e7d2b..e62f3485d26d 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -22,6 +22,7 @@ ATF_TESTS_SH+= altq \ pfsync \ proxy \ rdr \ + ridentifier \ route_to \ rules_counter \ set_skip \ diff --git a/tests/sys/netpfil/pf/ridentifier.sh b/tests/sys/netpfil/pf/ridentifier.sh new file mode 100644 index 000000000000..da2f40c7ae98 --- /dev/null +++ b/tests/sys/netpfil/pf/ridentifier.sh @@ -0,0 +1,108 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "basic" "cleanup" +basic_head() +{ + atf_set descr 'Test ridentifier keyword' + atf_set require.user root +} + +basic_body() +{ + pft_init + pflog_init + + epair=$(vnet_mkepair) + + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig lo0 up + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + jexec alcatraz /usr/sbin/inetd -p inetd-alcatraz.pid $(atf_get_srcdir)/echo_inetd.conf + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 + + jexec alcatraz pfctl -e + jexec alcatraz ifconfig pflog0 up + pft_set_rules alcatraz \ + "pass in log" \ + "pass in log proto tcp ridentifier 1234" + + jexec alcatraz tcpdump --immediate-mode -n -e -i pflog0 > tcpdump.log & + sleep 1 + + echo "test" | nc -N 192.0.2.2 7 + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 + + sleep 1 + jexec alcatraz killall tcpdump + + # Make sure we spotted the ridentifier + atf_check -s exit:0 -o ignore \ + grep 'rule 1/0.*ridentifier 1234' tcpdump.log + # But not on the !TCP traffic + atf_check -s exit:1 -o ignore \ + grep 'rule 0/0.*ridentifier' tcpdump.log + + # Now try with antispoof rules + pft_set_rules alcatraz \ + "pass in log" \ + "antispoof log for ${epair}b ridentifier 4321" + + jexec alcatraz tcpdump --immediate-mode -n -e -i pflog0 > tcpdump.log & + sleep 1 + + # Without explicit rules for lo0 we're going to drop packets to ourself + atf_check -s exit:2 -o ignore -e ignore \ + jexec alcatraz ping -c 1 -t 1 192.0.2.2 + + sleep 1 + jexec alcatraz killall tcpdump + + cat tcpdump.log + + # Make sure we spotted the ridentifier + atf_check -s exit:0 -o ignore \ + grep 'rule 2/0.*ridentifier 4321' tcpdump.log +} + +basic_cleanup() +{ + pft_cleanup + rm -f inetd-alcatraz.pid + rm -f tcpdump.log +} + +atf_init_test_cases() +{ + atf_add_test_case "basic" +} diff --git a/tests/sys/netpfil/pf/utils.subr b/tests/sys/netpfil/pf/utils.subr index d7df2a6747da..c9a404c8012e 100644 --- a/tests/sys/netpfil/pf/utils.subr +++ b/tests/sys/netpfil/pf/utils.subr @@ -46,6 +46,13 @@ pfsynct_init() fi } +pflog_init() +{ + if ! kldstat -q -m pflog; then + atf_skip "This test requires pflog" + fi +} + pft_set_rules() { jname=$1 From nobody Fri Nov 26 19:40:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5950818C6955; Fri, 26 Nov 2021 19:40:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J14pN49r8z4qWK; Fri, 26 Nov 2021 19:40:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 52A3663BF; Fri, 26 Nov 2021 19:40: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 1AQJeCL2020717; Fri, 26 Nov 2021 19:40:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQJeCFw020714; Fri, 26 Nov 2021 19:40:12 GMT (envelope-from git) Date: Fri, 26 Nov 2021 19:40:12 GMT Message-Id: <202111261940.1AQJeCFw020714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 029aed928131 - stable/13 - lagg: fix unused-but-set-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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 029aed928131427bab6274f2a1343d5aecd0ff31 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637955612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HAlQOMxreN5yaWRogAFB+VK5JEHghhsdUcXryjKai1M=; b=mYwzApOC1xvGhfSDv1QxlfIRv0atocuOPzyP8HIapxSc275S2qI6l1LC04vh/aQwvyLMtg W/A2UQPjQX2jNtpVCUPyhEAPFecnMelwn7qeghULb6rcyoIe/OEepJ8ajexs+8MFYPiJ2J uoXFuDHZTrxP8jQ0qCZQ2V/opvUoFcbo24yoswf5asA9BttXJhaWAXp10q0Zsn9fDisiAe 2HJbReCYgFNxhI8el8gjuVBdVmZba50vDlPTdy0q8H5wc6v0IM/OSjL5bz5KGmtNZ6MOPB ip/JNccsm781u89w6O/72JU8uJ1E/x6YbXMhbNwW5g6OfvZSpRTzGjS0e9B4OQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637955612; a=rsa-sha256; cv=none; b=ltg27vWQ0j49+0XdqaU2mqe5CclMP7ksnvf5JO2AV+rVApRjp1SUGX8B65CwCM6BzSaxuj KxpPb2a+W5TvXUkf2GEQt091O6p2VFrsj1UH/SvZ66ONwsi8dbPDuSTcwalHFjVieCSIPN WILqAM3Kl/CpsYgG8lbxrTSXpn5oi2dSSg7vlFBNUD47/kVDsVNimdiIQ/1HThoX9oaZ3S YEVqNACKSSrwjsdtZTmokiCr7QqShf1LbAR5GHtnk3bDntUbfd2ZxiDGWQBHEh+EF7HPrj gLj8xcmKxMfcd0TjgMmINjzneCJ1DY+Ewtlj845gdUCORUetIhbYRuU7eIRMFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=029aed928131427bab6274f2a1343d5aecd0ff31 commit 029aed928131427bab6274f2a1343d5aecd0ff31 Author: Kristof Provost AuthorDate: 2021-11-19 16:22:48 +0000 Commit: Kristof Provost CommitDate: 2021-11-26 03:40:56 +0000 lagg: fix unused-but-set-variable MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 3142d4f622d2f95da5c7c52f60ce840411a07b0a) --- sys/net/if_lagg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index c53e5b283b76..55aae2795644 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1797,13 +1797,10 @@ lagg_snd_tag_alloc(struct ifnet *ifp, { struct epoch_tracker et; struct lagg_snd_tag *lst; - struct lagg_softc *sc; struct lagg_port *lp; struct ifnet *lp_ifp; int error; - sc = ifp->if_softc; - NET_EPOCH_ENTER(et); lp = lookup_snd_tag_port(ifp, params->hdr.flowid, params->hdr.flowtype, params->hdr.numa_domain); From nobody Fri Nov 26 19:40:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 66C5F18C6856; Fri, 26 Nov 2021 19:40:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J14pQ0pRrz4qGD; Fri, 26 Nov 2021 19:40:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61D1B655F; Fri, 26 Nov 2021 19:40: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 1AQJeDeW021221; Fri, 26 Nov 2021 19:40:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQJeDDF021218; Fri, 26 Nov 2021 19:40:13 GMT (envelope-from git) Date: Fri, 26 Nov 2021 19:40:13 GMT Message-Id: <202111261940.1AQJeDDF021218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 9aa63a8d13c6 - stable/13 - libpfct: be consistent with u_int vs. uint List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9aa63a8d13c6aa873cecca6858f52d1c381ecfd5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637955614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PyHcMMGiTqjXxS+K7eHmWEyiRbG+6e01x56IRded/Es=; b=YqCag2fdsnj7IbU9D6JXXE5fYHsUk5P0kvihKF4qywp1oLLhxJUdDxyEz3m5Um1Ncc+5Qx SjsnDfKhLOLChwwomU5aRbNlgen2/JeLcguIYmO7RNWavfVj3bFhPwwAREr9vldKZRZvNi kGR08+cnkHpQ2fPXlu561olkr2MEUQdmQh35HmGX1LmY3lGkkH2P/+g1nSxPa5T848fXGW GjnLJ/EmqmNFSNxaQObHgR9gBe1FvzLU7Ao1on8A9ZDiEImVXMUdRbbLsV3n7Ad4DMhrsb yqv9EfOMnS1wwYwx5Rv07Zjo/xgEmlkP4i8kXzikGmhUAso/K31cDzkeec5gdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637955614; a=rsa-sha256; cv=none; b=UvnExHh5qD5HltLjD9+xXiB+L9/QvgkvaI5ypJfIGIcLGom0LD+w/XdfYcIHSGwMzE83qt TK9KBbsoBremb3o9y4eFnJzeHkDgRY4m3Ap7SBw4Ihzv8N2Ik+qQKRuTcRrJXFu4twviEd w2fyWQ1/OHM1QwNuojRwxIP7Ff8By/oeLiz6qL0orlvhkYITCv2mirl8exI7luigClLCwX D/cbfMbXvOPi/EAxQgBIQLuVR6nJxjxCKgvNkcya6/D6Tuysv/N2FXqD+YzDh+k2t8okMC htalVTZTPmWXrR2os5rHlaHxgSlY6cquYI5gsLfaG8PznlTR4PdVW3IQEG/8Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9aa63a8d13c6aa873cecca6858f52d1c381ecfd5 commit 9aa63a8d13c6aa873cecca6858f52d1c381ecfd5 Author: Kristof Provost AuthorDate: 2021-11-05 08:37:56 +0000 Commit: Kristof Provost CommitDate: 2021-11-26 03:42:04 +0000 libpfct: be consistent with u_int vs. uint Always use uint64_t over u_int64_t, for the sake of consistency. No functional change. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 7bb3c927f7d9c48b356b4d20907b813f9b83273b) --- lib/libpfctl/libpfctl.c | 34 +++++++------- lib/libpfctl/libpfctl.h | 122 ++++++++++++++++++++++++------------------------ 2 files changed, 78 insertions(+), 78 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index e41f970e7696..96f5ea620f4d 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -61,7 +61,7 @@ static int _pfctl_clear_states(int , const struct pfctl_kill *, static void pf_nvuint_8_array(const nvlist_t *nvl, const char *name, size_t maxelems, - u_int8_t *numbers, size_t *nelems) + uint8_t *numbers, size_t *nelems) { const uint64_t *tmp; size_t elems; @@ -78,7 +78,7 @@ pf_nvuint_8_array(const nvlist_t *nvl, const char *name, size_t maxelems, static void pf_nvuint_16_array(const nvlist_t *nvl, const char *name, size_t maxelems, - u_int16_t *numbers, size_t *nelems) + uint16_t *numbers, size_t *nelems) { const uint64_t *tmp; size_t elems; @@ -95,7 +95,7 @@ pf_nvuint_16_array(const nvlist_t *nvl, const char *name, size_t maxelems, static void pf_nvuint_32_array(const nvlist_t *nvl, const char *name, size_t maxelems, - u_int32_t *numbers, size_t *nelems) + uint32_t *numbers, size_t *nelems) { const uint64_t *tmp; size_t elems; @@ -112,7 +112,7 @@ pf_nvuint_32_array(const nvlist_t *nvl, const char *name, size_t maxelems, static void pf_nvuint_64_array(const nvlist_t *nvl, const char *name, size_t maxelems, - u_int64_t *numbers, size_t *nelems) + uint64_t *numbers, size_t *nelems) { const uint64_t *tmp; size_t elems; @@ -304,7 +304,7 @@ static void pfctl_nv_add_rule_addr(nvlist_t *nvparent, const char *name, const struct pf_rule_addr *addr) { - u_int64_t ports[2]; + uint64_t ports[2]; nvlist_t *nvl = nvlist_create(0); pfctl_nv_add_addr_wrap(nvl, "addr", &addr->addr); @@ -345,7 +345,7 @@ static void pfctl_nv_add_pool(nvlist_t *nvparent, const char *name, const struct pfctl_pool *pool) { - u_int64_t ports[2]; + uint64_t ports[2]; nvlist_t *nvl = nvlist_create(0); nvlist_add_binary(nvl, "key", &pool->key, sizeof(pool->key)); @@ -394,7 +394,7 @@ static void pfctl_nv_add_uid(nvlist_t *nvparent, const char *name, const struct pf_rule_uid *uid) { - u_int64_t uids[2]; + uint64_t uids[2]; nvlist_t *nvl = nvlist_create(0); uids[0] = uid->uid[0]; @@ -539,11 +539,11 @@ pf_nvrule_to_rule(const nvlist_t *nvl, struct pfctl_rule *rule) int pfctl_add_rule(int dev, const struct pfctl_rule *r, const char *anchor, - const char *anchor_call, u_int32_t ticket, u_int32_t pool_ticket) + const char *anchor_call, uint32_t ticket, uint32_t pool_ticket) { struct pfioc_nv nv; - u_int64_t timeouts[PFTM_MAX]; - u_int64_t set_prio[2]; + uint64_t timeouts[PFTM_MAX]; + uint64_t set_prio[2]; nvlist_t *nvl, *nvlr; size_t labelcount; int ret; @@ -656,15 +656,15 @@ pfctl_add_rule(int dev, const struct pfctl_rule *r, const char *anchor, } int -pfctl_get_rule(int dev, u_int32_t nr, u_int32_t ticket, const char *anchor, - u_int32_t ruleset, struct pfctl_rule *rule, char *anchor_call) +pfctl_get_rule(int dev, uint32_t nr, uint32_t ticket, const char *anchor, + uint32_t ruleset, struct pfctl_rule *rule, char *anchor_call) { return (pfctl_get_clear_rule(dev, nr, ticket, anchor, ruleset, rule, anchor_call, false)); } -int pfctl_get_clear_rule(int dev, u_int32_t nr, u_int32_t ticket, - const char *anchor, u_int32_t ruleset, struct pfctl_rule *rule, +int pfctl_get_clear_rule(int dev, uint32_t nr, uint32_t ticket, + const char *anchor, uint32_t ruleset, struct pfctl_rule *rule, char *anchor_call, bool clear) { struct pfioc_nv nv; @@ -941,7 +941,7 @@ pfctl_kill_states(int dev, const struct pfctl_kill *kill, unsigned int *killed) } static int -pfctl_get_limit(int dev, const int index, u_int *limit) +pfctl_get_limit(int dev, const int index, uint *limit) { struct pfioc_limit pl; @@ -962,7 +962,7 @@ pfctl_set_syncookies(int dev, const struct pfctl_syncookies *s) struct pfioc_nv nv; nvlist_t *nvl; int ret; - u_int state_limit; + uint state_limit; ret = pfctl_get_limit(dev, PF_LIMIT_STATES, &state_limit); if (ret != 0) @@ -992,7 +992,7 @@ pfctl_get_syncookies(int dev, struct pfctl_syncookies *s) struct pfioc_nv nv; nvlist_t *nvl; int ret; - u_int state_limit; + uint state_limit; bool enabled, adaptive; ret = pfctl_get_limit(dev, PF_LIMIT_STATES, &state_limit); diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index ac239d7cdcb1..a9bd14527126 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -72,8 +72,8 @@ struct pfctl_pool { struct pf_addr counter; struct pf_mape_portset mape; int tblidx; - u_int16_t proxy_port[2]; - u_int8_t opts; + uint16_t proxy_port[2]; + uint8_t opts; }; struct pfctl_rule { @@ -81,7 +81,7 @@ struct pfctl_rule { struct pf_rule_addr dst; union pf_rule_ptr skip[PF_SKIP_COUNT]; char label[PF_RULE_MAX_LABEL_COUNT][PF_RULE_LABEL_SIZE]; - u_int32_t ridentifier; + uint32_t ridentifier; char ifname[IFNAMSIZ]; char qname[PF_QNAME_SIZE]; char pqname[PF_QNAME_SIZE]; @@ -93,9 +93,9 @@ struct pfctl_rule { TAILQ_ENTRY(pfctl_rule) entries; struct pfctl_pool rpool; - u_int64_t evaluations; - u_int64_t packets[2]; - u_int64_t bytes[2]; + uint64_t evaluations; + uint64_t packets[2]; + uint64_t bytes[2]; struct pfi_kif *kif; struct pfctl_anchor *anchor; @@ -104,19 +104,19 @@ struct pfctl_rule { pf_osfp_t os_fingerprint; int rtableid; - u_int32_t timeout[PFTM_MAX]; - u_int32_t max_states; - u_int32_t max_src_nodes; - u_int32_t max_src_states; - u_int32_t max_src_conn; + uint32_t timeout[PFTM_MAX]; + uint32_t max_states; + uint32_t max_src_nodes; + uint32_t max_src_states; + uint32_t max_src_conn; struct { - u_int32_t limit; - u_int32_t seconds; + uint32_t limit; + uint32_t seconds; } max_src_conn_rate; - u_int32_t qid; - u_int32_t pqid; - u_int32_t nr; - u_int32_t prob; + uint32_t qid; + uint32_t pqid; + uint32_t nr; + uint32_t prob; uid_t cuid; pid_t cpid; @@ -124,49 +124,49 @@ struct pfctl_rule { uint64_t states_tot; uint64_t src_nodes; - u_int16_t return_icmp; - u_int16_t return_icmp6; - u_int16_t max_mss; - u_int16_t tag; - u_int16_t match_tag; - u_int16_t scrub_flags; + uint16_t return_icmp; + uint16_t return_icmp6; + uint16_t max_mss; + uint16_t tag; + uint16_t match_tag; + uint16_t scrub_flags; struct pf_rule_uid uid; struct pf_rule_gid gid; - u_int32_t rule_flag; - u_int8_t action; - u_int8_t direction; - u_int8_t log; - u_int8_t logif; - u_int8_t quick; - u_int8_t ifnot; - u_int8_t match_tag_not; - u_int8_t natpass; - - u_int8_t keep_state; + uint32_t rule_flag; + uint8_t action; + uint8_t direction; + uint8_t log; + uint8_t logif; + uint8_t quick; + uint8_t ifnot; + uint8_t match_tag_not; + uint8_t natpass; + + uint8_t keep_state; sa_family_t af; - u_int8_t proto; - u_int8_t type; - u_int8_t code; - u_int8_t flags; - u_int8_t flagset; - u_int8_t min_ttl; - u_int8_t allow_opts; - u_int8_t rt; - u_int8_t return_ttl; - u_int8_t tos; - u_int8_t set_tos; - u_int8_t anchor_relative; - u_int8_t anchor_wildcard; - - u_int8_t flush; - u_int8_t prio; - u_int8_t set_prio[2]; + uint8_t proto; + uint8_t type; + uint8_t code; + uint8_t flags; + uint8_t flagset; + uint8_t min_ttl; + uint8_t allow_opts; + uint8_t rt; + uint8_t return_ttl; + uint8_t tos; + uint8_t set_tos; + uint8_t anchor_relative; + uint8_t anchor_wildcard; + + uint8_t flush; + uint8_t prio; + uint8_t set_prio[2]; struct { struct pf_addr addr; - u_int16_t port; + uint16_t port; } divert; }; @@ -178,13 +178,13 @@ struct pfctl_ruleset { struct { struct pfctl_rulequeue *ptr; struct pfctl_rule **ptr_array; - u_int32_t rcount; - u_int32_t ticket; + uint32_t rcount; + uint32_t ticket; int open; } active, inactive; } rules[PF_RULESET_MAX]; struct pfctl_anchor *anchor; - u_int32_t tticket; + uint32_t tticket; int tables; int topen; }; @@ -288,15 +288,15 @@ struct pfctl_syncookies { struct pfctl_status* pfctl_get_status(int dev); void pfctl_free_status(struct pfctl_status *status); -int pfctl_get_rule(int dev, u_int32_t nr, u_int32_t ticket, - const char *anchor, u_int32_t ruleset, struct pfctl_rule *rule, +int pfctl_get_rule(int dev, uint32_t nr, uint32_t ticket, + const char *anchor, uint32_t ruleset, struct pfctl_rule *rule, char *anchor_call); -int pfctl_get_clear_rule(int dev, u_int32_t nr, u_int32_t ticket, - const char *anchor, u_int32_t ruleset, struct pfctl_rule *rule, +int pfctl_get_clear_rule(int dev, uint32_t nr, uint32_t ticket, + const char *anchor, uint32_t ruleset, struct pfctl_rule *rule, char *anchor_call, bool clear); int pfctl_add_rule(int dev, const struct pfctl_rule *r, - const char *anchor, const char *anchor_call, u_int32_t ticket, - u_int32_t pool_ticket); + const char *anchor, const char *anchor_call, uint32_t ticket, + uint32_t pool_ticket); int pfctl_set_keepcounters(int dev, bool keep); int pfctl_get_states(int dev, struct pfctl_states *states); void pfctl_free_states(struct pfctl_states *states); From nobody Fri Nov 26 19:40:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 955CE18C6C13; Fri, 26 Nov 2021 19:40: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 4J14pT1WyWz4qWd; Fri, 26 Nov 2021 19:40:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B825065CE; Fri, 26 Nov 2021 19:40: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 1AQJeGKY022807; Fri, 26 Nov 2021 19:40:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQJeGLZ022802; Fri, 26 Nov 2021 19:40:16 GMT (envelope-from git) Date: Fri, 26 Nov 2021 19:40:16 GMT Message-Id: <202111261940.1AQJeGLZ022802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 7f944794868f - stable/12 - pf: Introduce ridentifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7f944794868f49c59449086a3755d72e7f747e41 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637955617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PNJXHXPA3UHzC2Y1xQiCykI2/7eJ2V7E5EegjBuuBeo=; b=UOIkOh0rzaNvhSpuiAx+L7L6kkGEDixO3Eb2QPxMwgdTjTdnn6Pj/dHzs1lDXD53KNfsBz alixFgzdhk8tdlN6eqYne81hlWMvFjZRYFVbw5zNYOnIQ1DDO3QNP37lpWJCULP9HNYqWa 3olnJDAI+y1wKdizfwBMoNBQhAZpZdBLfKRR/2zaSoeNv+PglUz61YKJqNewfTC5WXp7Z4 e365Yj5PB3XyvN1cxh+auGjIa7MGw107DOOFdXJJka62+h1TBpaYyPnNM4ZxTooA1N849x AbZooZLqHjGNIwbNdz3xiVwU6c+/uevJhH/bGhBrT+ImzqBekc+HkGHcl4MF5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637955617; a=rsa-sha256; cv=none; b=q6xJ5HX6S7ksaTz4Od5rsU3Zxb2gRxn8SVK5MEm+/4lGzA35YiygFlFYlbWz8SlyAiGKJP CAcZhq1sRTA6BJ2/fei9pJRuAcQ4MqRbdKBFCIUaft/Z1fMajvFOtzlknxlWgIYsyQENe7 50DPU+iy6MxDXmZFpeuGxikoI5rgvqoq4jxVespmXDTDWoRlRR1Lqrf2cnVV8QMvoeY879 y6xTvxf+k11ynR7k4CVjLJlKfT/+zLZxwAZ0ejx7LlSoVzhUAr//CatY//EbbLKD9G4yKr 2bTio0sjQeUIraqiaQozS3EQmm36Vm7gKD1gNaROb3ZQiOARtS0W6VsigumIjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7f944794868f49c59449086a3755d72e7f747e41 commit 7f944794868f49c59449086a3755d72e7f747e41 Author: Kristof Provost AuthorDate: 2021-10-29 15:40:53 +0000 Commit: Kristof Provost CommitDate: 2021-11-26 03:49:02 +0000 pf: Introduce ridentifier Allow users to set a number on rules which will be exposed as part of the pflog header. The intent behind this is to allow users to correlate rules across updates (remember that pf rules continue to exist and match existing states, even if they're removed from the active ruleset) and pflog. Obtained from: pfSense MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32750 (cherry picked from commit 76c5eecc3490d89a9a3492ed2354802b69d69602) --- contrib/tcpdump/print-pflog.c | 7 ++++++- lib/libpfctl/libpfctl.c | 2 ++ lib/libpfctl/libpfctl.h | 1 + sbin/pfctl/parse.y | 14 ++++++++++++++ sbin/pfctl/pfctl_parser.c | 2 ++ share/man/man4/pflog.4 | 3 ++- share/man/man5/pf.conf.5 | 7 ++++++- sys/net/if_pflog.h | 1 + sys/net/pfvar.h | 1 + sys/netpfil/ipfw/nat64/nat64clat.c | 2 +- sys/netpfil/ipfw/nat64/nat64lsn.c | 2 +- sys/netpfil/ipfw/nat64/nat64stl.c | 2 +- sys/netpfil/pf/if_pflog.c | 3 ++- sys/netpfil/pf/pf_nv.c | 2 ++ 14 files changed, 42 insertions(+), 7 deletions(-) diff --git a/contrib/tcpdump/print-pflog.c b/contrib/tcpdump/print-pflog.c index 38201c55ee3f..49994507e728 100644 --- a/contrib/tcpdump/print-pflog.c +++ b/contrib/tcpdump/print-pflog.c @@ -88,10 +88,12 @@ static const struct tok pf_directions[] = { static void pflog_print(netdissect_options *ndo, const struct pfloghdr *hdr) { - uint32_t rulenr, subrulenr; + uint32_t rulenr, subrulenr, ridentifier; rulenr = EXTRACT_32BITS(&hdr->rulenr); subrulenr = EXTRACT_32BITS(&hdr->subrulenr); + ridentifier = EXTRACT_32BITS(&hdr->ridentifier); + if (subrulenr == (uint32_t)-1) ND_PRINT((ndo, "rule %u/", rulenr)); else @@ -102,6 +104,9 @@ pflog_print(netdissect_options *ndo, const struct pfloghdr *hdr) if (hdr->uid != UID_MAX) ND_PRINT((ndo, " [uid %u]", (unsigned)hdr->uid)); + if (ridentifier != 0) + ND_PRINT((ndo, " [ridentifier %u]", ridentifier)); + ND_PRINT((ndo, ": %s %s on %s: ", tok2str(pf_actions, "unkn(%u)", hdr->action), tok2str(pf_directions, "unkn(%u)", hdr->dir), diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index c2d57d8136ca..e41f970e7696 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -455,6 +455,7 @@ pf_nvrule_to_rule(const nvlist_t *nvl, struct pfctl_rule *rule) assert(labelcount <= PF_RULE_MAX_LABEL_COUNT); for (size_t i = 0; i < labelcount; i++) strlcpy(rule->label[i], labels[i], PF_RULE_LABEL_SIZE); + rule->ridentifier = nvlist_get_number(nvl, "ridentifier"); strlcpy(rule->ifname, nvlist_get_string(nvl, "ifname"), IFNAMSIZ); strlcpy(rule->qname, nvlist_get_string(nvl, "qname"), PF_QNAME_SIZE); strlcpy(rule->pqname, nvlist_get_string(nvl, "pqname"), PF_QNAME_SIZE); @@ -566,6 +567,7 @@ pfctl_add_rule(int dev, const struct pfctl_rule *r, const char *anchor, r->label[labelcount]); labelcount++; } + nvlist_add_number(nvlr, "ridentifier", r->ridentifier); nvlist_add_string(nvlr, "ifname", r->ifname); nvlist_add_string(nvlr, "qname", r->qname); diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index 70c144772c02..ac239d7cdcb1 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -81,6 +81,7 @@ struct pfctl_rule { struct pf_rule_addr dst; union pf_rule_ptr skip[PF_SKIP_COUNT]; char label[PF_RULE_MAX_LABEL_COUNT][PF_RULE_LABEL_SIZE]; + u_int32_t ridentifier; char ifname[IFNAMSIZ]; char qname[PF_QNAME_SIZE]; char pqname[PF_QNAME_SIZE]; diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 2dd0e6b6ff43..f06462bda864 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -236,6 +236,7 @@ static struct filter_opts { struct node_icmp *icmpspec; u_int32_t tos; u_int32_t prob; + u_int32_t ridentifier; struct { int action; struct node_state_opt *options; @@ -260,6 +261,7 @@ static struct filter_opts { static struct antispoof_opts { char *label[PF_RULE_MAX_LABEL_COUNT]; int labelcount; + u_int32_t ridentifier; u_int rtableid; } antispoof_opts; @@ -468,6 +470,7 @@ int parseport(char *, struct range *r, int); %token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY MAPEPORTSET %token ALTQ CBQ CODEL PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME %token UPPERLIMIT QUEUE PRIORITY QLIMIT HOGS BUCKETS RTABLE TARGET INTERVAL +%token RIDENTIFIER %token LOAD RULESET_OPTIMIZATION PRIO %token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE %token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY @@ -915,6 +918,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto r.af = $6; r.prob = $9.prob; r.rtableid = $9.rtableid; + r.ridentifier = $9.ridentifier; if ($9.tag) if (strlcpy(r.tagname, $9.tag, @@ -1314,6 +1318,7 @@ antispoof : ANTISPOOF logquick antispoof_ifspc af antispoof_opts { r.logif = $2.logif; r.quick = $2.quick; r.af = $4; + r.ridentifier = $5.ridentifier; if (rule_label(&r, $5.label)) YYERROR; r.rtableid = $5.rtableid; @@ -1366,6 +1371,7 @@ antispoof : ANTISPOOF logquick antispoof_ifspc af antispoof_opts { r.logif = $2.logif; r.quick = $2.quick; r.af = $4; + r.ridentifier = $5.ridentifier; if (rule_label(&r, $5.label)) YYERROR; r.rtableid = $5.rtableid; @@ -1428,6 +1434,9 @@ antispoof_opt : label { } antispoof_opts.label[antispoof_opts.labelcount++] = $1; } + | RIDENTIFIER number { + antispoof_opts.ridentifier = $2; + } | RTABLE NUMBER { if ($2 < 0 || $2 > rt_tableid_max()) { yyerror("invalid rtable id"); @@ -2143,6 +2152,7 @@ pfrule : action dir logquick interface route af proto fromto YYERROR; for (int i = 0; i < PF_RULE_MAX_LABEL_COUNT; i++) free($9.label[i]); + r.ridentifier = $9.ridentifier; r.flags = $9.flags.b1; r.flagset = $9.flags.b2; if (($9.flags.b1 & $9.flags.b2) != $9.flags.b1) { @@ -2573,6 +2583,9 @@ filter_opt : USER uids { filter_opts.keep.action = $1.action; filter_opts.keep.options = $1.options; } + | RIDENTIFIER number { + filter_opts.ridentifier = $2; + } | FRAGMENT { filter_opts.fragment = 1; } @@ -5687,6 +5700,7 @@ lookup(char *s) { "return-icmp", RETURNICMP}, { "return-icmp6", RETURNICMP6}, { "return-rst", RETURNRST}, + { "ridentifier", RIDENTIFIER}, { "round-robin", ROUNDROBIN}, { "route", ROUTE}, { "route-to", ROUTETO}, diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index dc4a2254d733..adf9255f0c84 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1019,6 +1019,8 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer i = 0; while (r->label[i][0]) printf(" label \"%s\"", r->label[i++]); + if (r->ridentifier) + printf(" ridentifier %u", r->ridentifier); if (r->qname[0] && r->pqname[0]) printf(" queue(%s, %s)", r->qname, r->pqname); else if (r->qname[0]) diff --git a/share/man/man4/pflog.4 b/share/man/man4/pflog.4 index 428bb5bd7f26..6269644bc312 100644 --- a/share/man/man4/pflog.4 +++ b/share/man/man4/pflog.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31, 2007 +.Dd October 29, 2021 .Dt PFLOG 4 .Os .Sh NAME @@ -79,6 +79,7 @@ struct pfloghdr { pid_t rule_pid; u_int8_t dir; u_int8_t pad[3]; + u_int32_t ridentifier; }; .Ed .Sh EXAMPLES diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index f75edb6fcc17..e9ec3467da54 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -1868,6 +1868,9 @@ pass in inet proto tcp from any to 1.2.3.5 \e The macro expansion for the .Ar label directive occurs only at configuration file parse time, not during runtime. +.It Ar ridentifier Aq Ar number +Add an identifier (number) to the rule, which can be used to correlate the rule +to pflog entries, even after ruleset updates. .It Xo Ar queue Aq Ar queue .No \*(Ba ( Aq Ar queue , .Aq Ar queue ) @@ -2970,7 +2973,8 @@ filteropt = user | group | flags | icmp-type | icmp6-type | "tos" tos | "label" string | "tag" string | [ ! ] "tagged" string | "set prio" ( number | "(" number [ [ "," ] number ] ")" ) | "queue" ( string | "(" string [ [ "," ] string ] ")" ) | - "rtable" number | "probability" number"%" | "prio" number + "rtable" number | "probability" number"%" | "prio" number | + "ridentifier" number nat-rule = [ "no" ] "nat" [ "pass" [ "log" [ "(" logopts ")" ] ] ] [ "on" ifspec ] [ af ] @@ -2994,6 +2998,7 @@ rdr-rule = [ "no" ] "rdr" [ "pass" [ "log" [ "(" logopts ")" ] ] ] antispoof-rule = "antispoof" [ "log" ] [ "quick" ] "for" ifspec [ af ] [ "label" string ] + [ "ridentifier" number ] table-rule = "table" "\*(Lt" string "\*(Gt" [ tableopts-list ] tableopts-list = tableopts-list tableopts | tableopts diff --git a/sys/net/if_pflog.h b/sys/net/if_pflog.h index 5ed341a85d86..c77d8da1440a 100644 --- a/sys/net/if_pflog.h +++ b/sys/net/if_pflog.h @@ -50,6 +50,7 @@ struct pfloghdr { pid_t rule_pid; u_int8_t dir; u_int8_t pad[3]; + u_int32_t ridentifier; }; #define PFLOG_HDRLEN sizeof(struct pfloghdr) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 6f8d79b27133..4c4fc7c65015 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -572,6 +572,7 @@ struct pf_krule { struct pf_rule_addr dst; union pf_krule_ptr skip[PF_SKIP_COUNT]; char label[PF_RULE_MAX_LABEL_COUNT][PF_RULE_LABEL_SIZE]; + uint32_t ridentifier; char ifname[IFNAMSIZ]; char qname[PF_QNAME_SIZE]; char pqname[PF_QNAME_SIZE]; diff --git a/sys/netpfil/ipfw/nat64/nat64clat.c b/sys/netpfil/ipfw/nat64/nat64clat.c index fcc922726d02..c48c68183e08 100644 --- a/sys/netpfil/ipfw/nat64/nat64clat.c +++ b/sys/netpfil/ipfw/nat64/nat64clat.c @@ -71,7 +71,7 @@ nat64clat_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, static uint32_t pktid = 0; memset(plog, 0, sizeof(*plog)); - plog->length = PFLOG_REAL_HDRLEN; + plog->length = PFLOG_HDRLEN; plog->af = family; plog->action = PF_NAT; plog->dir = PF_IN; diff --git a/sys/netpfil/ipfw/nat64/nat64lsn.c b/sys/netpfil/ipfw/nat64/nat64lsn.c index ad1b62b07a92..ab77a071bcdb 100644 --- a/sys/netpfil/ipfw/nat64/nat64lsn.c +++ b/sys/netpfil/ipfw/nat64/nat64lsn.c @@ -181,7 +181,7 @@ nat64lsn_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, { memset(plog, 0, sizeof(*plog)); - plog->length = PFLOG_REAL_HDRLEN; + plog->length = PFLOG_HDRLEN; plog->af = family; plog->action = PF_NAT; plog->dir = PF_IN; diff --git a/sys/netpfil/ipfw/nat64/nat64stl.c b/sys/netpfil/ipfw/nat64/nat64stl.c index a150322d1a44..fa7afee44be7 100644 --- a/sys/netpfil/ipfw/nat64/nat64stl.c +++ b/sys/netpfil/ipfw/nat64/nat64stl.c @@ -70,7 +70,7 @@ nat64stl_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, static uint32_t pktid = 0; memset(plog, 0, sizeof(*plog)); - plog->length = PFLOG_REAL_HDRLEN; + plog->length = PFLOG_HDRLEN; plog->af = family; plog->action = PF_NAT; plog->dir = PF_IN; diff --git a/sys/netpfil/pf/if_pflog.c b/sys/netpfil/pf/if_pflog.c index 9eb168b9a74f..4853c1301d6f 100644 --- a/sys/netpfil/pf/if_pflog.c +++ b/sys/netpfil/pf/if_pflog.c @@ -215,7 +215,7 @@ pflog_packet(struct pfi_kkif *kif, struct mbuf *m, sa_family_t af, u_int8_t dir, return (0); bzero(&hdr, sizeof(hdr)); - hdr.length = PFLOG_REAL_HDRLEN; + hdr.length = PFLOG_HDRLEN; hdr.af = af; hdr.action = rm->action; hdr.reason = reason; @@ -231,6 +231,7 @@ pflog_packet(struct pfi_kkif *kif, struct mbuf *m, sa_family_t af, u_int8_t dir, strlcpy(hdr.ruleset, ruleset->anchor->name, sizeof(hdr.ruleset)); } + hdr.ridentifier = htonl(rm->ridentifier); /* * XXXGL: we avoid pf_socket_lookup() when we are holding * state lock, since this leads to unsafe LOR. diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c index d53c6fe4b84e..b6676be645d7 100644 --- a/sys/netpfil/pf/pf_nv.c +++ b/sys/netpfil/pf/pf_nv.c @@ -531,6 +531,7 @@ pf_nvrule_to_krule(const nvlist_t *nvl, struct pf_krule *rule) } } + PFNV_CHK(pf_nvuint32_opt(nvl, "ridentifier", &rule->ridentifier, 0)); PFNV_CHK(pf_nvstring(nvl, "ifname", rule->ifname, sizeof(rule->ifname))); PFNV_CHK(pf_nvstring(nvl, "qname", rule->qname, sizeof(rule->qname))); @@ -693,6 +694,7 @@ pf_krule_to_nvrule(struct pf_krule *rule) nvlist_append_string_array(nvl, "labels", rule->label[i]); } nvlist_add_string(nvl, "label", rule->label[0]); + nvlist_add_number(nvl, "ridentifier", rule->ridentifier); nvlist_add_string(nvl, "ifname", rule->ifname); nvlist_add_string(nvl, "qname", rule->qname); nvlist_add_string(nvl, "pqname", rule->pqname); From nobody Fri Nov 26 19:40:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2A5FD18C6AC7; Fri, 26 Nov 2021 19:40: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 4J14pV2XQtz4qZ2; Fri, 26 Nov 2021 19:40:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC0586278; Fri, 26 Nov 2021 19:40: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 1AQJeHCG023324; Fri, 26 Nov 2021 19:40:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQJeHla023321; Fri, 26 Nov 2021 19:40:17 GMT (envelope-from git) Date: Fri, 26 Nov 2021 19:40:17 GMT Message-Id: <202111261940.1AQJeHla023321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 6aa808b2ada7 - stable/12 - pf tests: basic test for ridentifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6aa808b2ada75db1caa3ef52c463edb1717ccddb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637955619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nwpFZwUWgsU+zH5em8LGeogUjmzt40ILnTjY5/Ya7jY=; b=uajcQfSjHwJkAmyxcyBNMZYgBTAWvo8bCIoNlvbUoQbL9R+NsoJNTI1x34MO+wOtCAxB4j Mne/O8siV7ki2MU4z5/1gCCS86IRJvy2D2Vx3C4//JrP6WZzRYWVxxo+Qcs/ksH+nJWbLV iNk6uLsmdXbpou8uOfs+hQmic3iNqVoV3Un+xTAEVa9+mu8kYGHkcjiADq20OnaLH1FpAj cr/oTvxsnfm59uiHG7nsRl3AnZfLmscD7UKNePN/3E5D+3u0TOJ9XiAVNR2Oh4Rw7/p6bK j7d8c7momwejaMBinz38iW56wIOpIqFbgxxLDeIC2eG6K/EkwcIXOtYle2hKcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637955619; a=rsa-sha256; cv=none; b=kGfx49Yv31PIJObyzTpUlr34pnXx7EMGmNzVcbFD8v3JqyS0IG+sIPgkPbYbmaUiZIIDAj B1ksl4IbwZpGNnJ4geKVhcKkKu8mT0kH+Q0wxChXzj60ONEgy5uxPBGtXbXg8mUmAx0pdc NbmL3W+vAsSAE0nhdl50kOsoEfFcKMFpJMmo2PuoH37b73xOchy63+2wwEvluFpbR8lGRF kXR2/HXagH51JsX1X/woY9tDm65dwFiSDRO4Y3/3AKiWw2CISj937jC9P7pJdwW1txyjeF VJrUPt5PZ3mBkqBorCj20axzz5EBvsmi8cijFmOW+CTIELicz1JO9Si1A6ujzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6aa808b2ada75db1caa3ef52c463edb1717ccddb commit 6aa808b2ada75db1caa3ef52c463edb1717ccddb Author: Kristof Provost AuthorDate: 2021-10-29 15:52:59 +0000 Commit: Kristof Provost CommitDate: 2021-11-26 03:50:23 +0000 pf tests: basic test for ridentifier MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32751 (cherry picked from commit 508161111dc23cee0a41fa70de865743c694502f) --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/ridentifier.sh | 108 ++++++++++++++++++++++++++++++++++++ tests/sys/netpfil/pf/utils.subr | 7 +++ 3 files changed, 116 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 5a8b5fe8de70..ebeec7f85650 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -22,6 +22,7 @@ ATF_TESTS_SH+= altq \ set_tos \ src_track \ rdr \ + ridentifier \ route_to \ syncookie \ synproxy \ diff --git a/tests/sys/netpfil/pf/ridentifier.sh b/tests/sys/netpfil/pf/ridentifier.sh new file mode 100644 index 000000000000..da2f40c7ae98 --- /dev/null +++ b/tests/sys/netpfil/pf/ridentifier.sh @@ -0,0 +1,108 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "basic" "cleanup" +basic_head() +{ + atf_set descr 'Test ridentifier keyword' + atf_set require.user root +} + +basic_body() +{ + pft_init + pflog_init + + epair=$(vnet_mkepair) + + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig lo0 up + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + jexec alcatraz /usr/sbin/inetd -p inetd-alcatraz.pid $(atf_get_srcdir)/echo_inetd.conf + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 + + jexec alcatraz pfctl -e + jexec alcatraz ifconfig pflog0 up + pft_set_rules alcatraz \ + "pass in log" \ + "pass in log proto tcp ridentifier 1234" + + jexec alcatraz tcpdump --immediate-mode -n -e -i pflog0 > tcpdump.log & + sleep 1 + + echo "test" | nc -N 192.0.2.2 7 + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 + + sleep 1 + jexec alcatraz killall tcpdump + + # Make sure we spotted the ridentifier + atf_check -s exit:0 -o ignore \ + grep 'rule 1/0.*ridentifier 1234' tcpdump.log + # But not on the !TCP traffic + atf_check -s exit:1 -o ignore \ + grep 'rule 0/0.*ridentifier' tcpdump.log + + # Now try with antispoof rules + pft_set_rules alcatraz \ + "pass in log" \ + "antispoof log for ${epair}b ridentifier 4321" + + jexec alcatraz tcpdump --immediate-mode -n -e -i pflog0 > tcpdump.log & + sleep 1 + + # Without explicit rules for lo0 we're going to drop packets to ourself + atf_check -s exit:2 -o ignore -e ignore \ + jexec alcatraz ping -c 1 -t 1 192.0.2.2 + + sleep 1 + jexec alcatraz killall tcpdump + + cat tcpdump.log + + # Make sure we spotted the ridentifier + atf_check -s exit:0 -o ignore \ + grep 'rule 2/0.*ridentifier 4321' tcpdump.log +} + +basic_cleanup() +{ + pft_cleanup + rm -f inetd-alcatraz.pid + rm -f tcpdump.log +} + +atf_init_test_cases() +{ + atf_add_test_case "basic" +} diff --git a/tests/sys/netpfil/pf/utils.subr b/tests/sys/netpfil/pf/utils.subr index d7df2a6747da..c9a404c8012e 100644 --- a/tests/sys/netpfil/pf/utils.subr +++ b/tests/sys/netpfil/pf/utils.subr @@ -46,6 +46,13 @@ pfsynct_init() fi } +pflog_init() +{ + if ! kldstat -q -m pflog; then + atf_skip "This test requires pflog" + fi +} + pft_set_rules() { jname=$1 From nobody Fri Nov 26 19:40:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 069E018C6A72; Fri, 26 Nov 2021 19:40: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 4J14pW52gSz4qD1; Fri, 26 Nov 2021 19:40:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3D9665CF; Fri, 26 Nov 2021 19: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 1AQJeImv023858; Fri, 26 Nov 2021 19: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 1AQJeIhH023855; Fri, 26 Nov 2021 19:40:18 GMT (envelope-from git) Date: Fri, 26 Nov 2021 19:40:18 GMT Message-Id: <202111261940.1AQJeIhH023855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 9e2ae7bcd59c - stable/12 - libpfct: be consistent with u_int vs. uint List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 9e2ae7bcd59ce9b95224a1221a9df6efbdb21a88 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637955619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kPG0e3bhTOr3PaETTsUl0GCX7Q57ffvzCJo04z3sXG8=; b=N4RTXW0MA8Bl06mV00JDl1vmc22M28gQ2ZPCX2pFMLqV7RDVV4k0MtNBi9oAoS9u0HT8rO i3YcJ5iHx4ygZo+i63sPZIeyP/ulz+U4vuh2RO10jG9jvLMqC9rRKzVstcACFYDs8XwpQ/ BY+ISchRzc6W1bZ1NcqZe2OzNQACCtAOgFqmb45WIHQyabSzCIHES/p58nVx/RGXtO0f/3 FpPq5XtSTWXc0/QBLbfiqZQLhbvv+BDedBAO6K2/nvsirGnPFi0EVjaa/aRu7vSDiryN/j P1D2Gf3TySeQRgfpfhtxl7/XpnMQCfRVZPfaqZp7xLV60iqzdKCx5Sfyi8j+TQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637955619; a=rsa-sha256; cv=none; b=JHlPelV1vrFRE92zo0ZjglgxH49yrKScH1Jz/YtUFmHI4yQtNWEN3M1H5JkCvuDu22hoT4 A84w7bfr+zN1PYaNlyVomSZm1XnDnriWTCGXBSqpvoqsOMMgwnVAQm7VU3Dx2XOT+53MQB R+5oXzwn7SvQWzgEtHOGGtQGSSUTMM5O2y3juA4VZgldBLYUrR6CfiRh1MlTp6+VJAu8qC WcCPMHF+SwYkfSR/dacCa6uqMbgvQpDQPy1ipOSUt+iezAHeukXd/4nSFTjj1XLe3MNqZB hXG06Q+0LJigI+j8y7A7RF1JGNnE2OGEY5SbT8c9Kl5SEuMIROLBYClQHzaXhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9e2ae7bcd59ce9b95224a1221a9df6efbdb21a88 commit 9e2ae7bcd59ce9b95224a1221a9df6efbdb21a88 Author: Kristof Provost AuthorDate: 2021-11-05 08:37:56 +0000 Commit: Kristof Provost CommitDate: 2021-11-26 03:53:05 +0000 libpfct: be consistent with u_int vs. uint Always use uint64_t over u_int64_t, for the sake of consistency. No functional change. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 7bb3c927f7d9c48b356b4d20907b813f9b83273b) --- lib/libpfctl/libpfctl.c | 34 +++++++------- lib/libpfctl/libpfctl.h | 122 ++++++++++++++++++++++++------------------------ 2 files changed, 78 insertions(+), 78 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index e41f970e7696..96f5ea620f4d 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -61,7 +61,7 @@ static int _pfctl_clear_states(int , const struct pfctl_kill *, static void pf_nvuint_8_array(const nvlist_t *nvl, const char *name, size_t maxelems, - u_int8_t *numbers, size_t *nelems) + uint8_t *numbers, size_t *nelems) { const uint64_t *tmp; size_t elems; @@ -78,7 +78,7 @@ pf_nvuint_8_array(const nvlist_t *nvl, const char *name, size_t maxelems, static void pf_nvuint_16_array(const nvlist_t *nvl, const char *name, size_t maxelems, - u_int16_t *numbers, size_t *nelems) + uint16_t *numbers, size_t *nelems) { const uint64_t *tmp; size_t elems; @@ -95,7 +95,7 @@ pf_nvuint_16_array(const nvlist_t *nvl, const char *name, size_t maxelems, static void pf_nvuint_32_array(const nvlist_t *nvl, const char *name, size_t maxelems, - u_int32_t *numbers, size_t *nelems) + uint32_t *numbers, size_t *nelems) { const uint64_t *tmp; size_t elems; @@ -112,7 +112,7 @@ pf_nvuint_32_array(const nvlist_t *nvl, const char *name, size_t maxelems, static void pf_nvuint_64_array(const nvlist_t *nvl, const char *name, size_t maxelems, - u_int64_t *numbers, size_t *nelems) + uint64_t *numbers, size_t *nelems) { const uint64_t *tmp; size_t elems; @@ -304,7 +304,7 @@ static void pfctl_nv_add_rule_addr(nvlist_t *nvparent, const char *name, const struct pf_rule_addr *addr) { - u_int64_t ports[2]; + uint64_t ports[2]; nvlist_t *nvl = nvlist_create(0); pfctl_nv_add_addr_wrap(nvl, "addr", &addr->addr); @@ -345,7 +345,7 @@ static void pfctl_nv_add_pool(nvlist_t *nvparent, const char *name, const struct pfctl_pool *pool) { - u_int64_t ports[2]; + uint64_t ports[2]; nvlist_t *nvl = nvlist_create(0); nvlist_add_binary(nvl, "key", &pool->key, sizeof(pool->key)); @@ -394,7 +394,7 @@ static void pfctl_nv_add_uid(nvlist_t *nvparent, const char *name, const struct pf_rule_uid *uid) { - u_int64_t uids[2]; + uint64_t uids[2]; nvlist_t *nvl = nvlist_create(0); uids[0] = uid->uid[0]; @@ -539,11 +539,11 @@ pf_nvrule_to_rule(const nvlist_t *nvl, struct pfctl_rule *rule) int pfctl_add_rule(int dev, const struct pfctl_rule *r, const char *anchor, - const char *anchor_call, u_int32_t ticket, u_int32_t pool_ticket) + const char *anchor_call, uint32_t ticket, uint32_t pool_ticket) { struct pfioc_nv nv; - u_int64_t timeouts[PFTM_MAX]; - u_int64_t set_prio[2]; + uint64_t timeouts[PFTM_MAX]; + uint64_t set_prio[2]; nvlist_t *nvl, *nvlr; size_t labelcount; int ret; @@ -656,15 +656,15 @@ pfctl_add_rule(int dev, const struct pfctl_rule *r, const char *anchor, } int -pfctl_get_rule(int dev, u_int32_t nr, u_int32_t ticket, const char *anchor, - u_int32_t ruleset, struct pfctl_rule *rule, char *anchor_call) +pfctl_get_rule(int dev, uint32_t nr, uint32_t ticket, const char *anchor, + uint32_t ruleset, struct pfctl_rule *rule, char *anchor_call) { return (pfctl_get_clear_rule(dev, nr, ticket, anchor, ruleset, rule, anchor_call, false)); } -int pfctl_get_clear_rule(int dev, u_int32_t nr, u_int32_t ticket, - const char *anchor, u_int32_t ruleset, struct pfctl_rule *rule, +int pfctl_get_clear_rule(int dev, uint32_t nr, uint32_t ticket, + const char *anchor, uint32_t ruleset, struct pfctl_rule *rule, char *anchor_call, bool clear) { struct pfioc_nv nv; @@ -941,7 +941,7 @@ pfctl_kill_states(int dev, const struct pfctl_kill *kill, unsigned int *killed) } static int -pfctl_get_limit(int dev, const int index, u_int *limit) +pfctl_get_limit(int dev, const int index, uint *limit) { struct pfioc_limit pl; @@ -962,7 +962,7 @@ pfctl_set_syncookies(int dev, const struct pfctl_syncookies *s) struct pfioc_nv nv; nvlist_t *nvl; int ret; - u_int state_limit; + uint state_limit; ret = pfctl_get_limit(dev, PF_LIMIT_STATES, &state_limit); if (ret != 0) @@ -992,7 +992,7 @@ pfctl_get_syncookies(int dev, struct pfctl_syncookies *s) struct pfioc_nv nv; nvlist_t *nvl; int ret; - u_int state_limit; + uint state_limit; bool enabled, adaptive; ret = pfctl_get_limit(dev, PF_LIMIT_STATES, &state_limit); diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index ac239d7cdcb1..a9bd14527126 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -72,8 +72,8 @@ struct pfctl_pool { struct pf_addr counter; struct pf_mape_portset mape; int tblidx; - u_int16_t proxy_port[2]; - u_int8_t opts; + uint16_t proxy_port[2]; + uint8_t opts; }; struct pfctl_rule { @@ -81,7 +81,7 @@ struct pfctl_rule { struct pf_rule_addr dst; union pf_rule_ptr skip[PF_SKIP_COUNT]; char label[PF_RULE_MAX_LABEL_COUNT][PF_RULE_LABEL_SIZE]; - u_int32_t ridentifier; + uint32_t ridentifier; char ifname[IFNAMSIZ]; char qname[PF_QNAME_SIZE]; char pqname[PF_QNAME_SIZE]; @@ -93,9 +93,9 @@ struct pfctl_rule { TAILQ_ENTRY(pfctl_rule) entries; struct pfctl_pool rpool; - u_int64_t evaluations; - u_int64_t packets[2]; - u_int64_t bytes[2]; + uint64_t evaluations; + uint64_t packets[2]; + uint64_t bytes[2]; struct pfi_kif *kif; struct pfctl_anchor *anchor; @@ -104,19 +104,19 @@ struct pfctl_rule { pf_osfp_t os_fingerprint; int rtableid; - u_int32_t timeout[PFTM_MAX]; - u_int32_t max_states; - u_int32_t max_src_nodes; - u_int32_t max_src_states; - u_int32_t max_src_conn; + uint32_t timeout[PFTM_MAX]; + uint32_t max_states; + uint32_t max_src_nodes; + uint32_t max_src_states; + uint32_t max_src_conn; struct { - u_int32_t limit; - u_int32_t seconds; + uint32_t limit; + uint32_t seconds; } max_src_conn_rate; - u_int32_t qid; - u_int32_t pqid; - u_int32_t nr; - u_int32_t prob; + uint32_t qid; + uint32_t pqid; + uint32_t nr; + uint32_t prob; uid_t cuid; pid_t cpid; @@ -124,49 +124,49 @@ struct pfctl_rule { uint64_t states_tot; uint64_t src_nodes; - u_int16_t return_icmp; - u_int16_t return_icmp6; - u_int16_t max_mss; - u_int16_t tag; - u_int16_t match_tag; - u_int16_t scrub_flags; + uint16_t return_icmp; + uint16_t return_icmp6; + uint16_t max_mss; + uint16_t tag; + uint16_t match_tag; + uint16_t scrub_flags; struct pf_rule_uid uid; struct pf_rule_gid gid; - u_int32_t rule_flag; - u_int8_t action; - u_int8_t direction; - u_int8_t log; - u_int8_t logif; - u_int8_t quick; - u_int8_t ifnot; - u_int8_t match_tag_not; - u_int8_t natpass; - - u_int8_t keep_state; + uint32_t rule_flag; + uint8_t action; + uint8_t direction; + uint8_t log; + uint8_t logif; + uint8_t quick; + uint8_t ifnot; + uint8_t match_tag_not; + uint8_t natpass; + + uint8_t keep_state; sa_family_t af; - u_int8_t proto; - u_int8_t type; - u_int8_t code; - u_int8_t flags; - u_int8_t flagset; - u_int8_t min_ttl; - u_int8_t allow_opts; - u_int8_t rt; - u_int8_t return_ttl; - u_int8_t tos; - u_int8_t set_tos; - u_int8_t anchor_relative; - u_int8_t anchor_wildcard; - - u_int8_t flush; - u_int8_t prio; - u_int8_t set_prio[2]; + uint8_t proto; + uint8_t type; + uint8_t code; + uint8_t flags; + uint8_t flagset; + uint8_t min_ttl; + uint8_t allow_opts; + uint8_t rt; + uint8_t return_ttl; + uint8_t tos; + uint8_t set_tos; + uint8_t anchor_relative; + uint8_t anchor_wildcard; + + uint8_t flush; + uint8_t prio; + uint8_t set_prio[2]; struct { struct pf_addr addr; - u_int16_t port; + uint16_t port; } divert; }; @@ -178,13 +178,13 @@ struct pfctl_ruleset { struct { struct pfctl_rulequeue *ptr; struct pfctl_rule **ptr_array; - u_int32_t rcount; - u_int32_t ticket; + uint32_t rcount; + uint32_t ticket; int open; } active, inactive; } rules[PF_RULESET_MAX]; struct pfctl_anchor *anchor; - u_int32_t tticket; + uint32_t tticket; int tables; int topen; }; @@ -288,15 +288,15 @@ struct pfctl_syncookies { struct pfctl_status* pfctl_get_status(int dev); void pfctl_free_status(struct pfctl_status *status); -int pfctl_get_rule(int dev, u_int32_t nr, u_int32_t ticket, - const char *anchor, u_int32_t ruleset, struct pfctl_rule *rule, +int pfctl_get_rule(int dev, uint32_t nr, uint32_t ticket, + const char *anchor, uint32_t ruleset, struct pfctl_rule *rule, char *anchor_call); -int pfctl_get_clear_rule(int dev, u_int32_t nr, u_int32_t ticket, - const char *anchor, u_int32_t ruleset, struct pfctl_rule *rule, +int pfctl_get_clear_rule(int dev, uint32_t nr, uint32_t ticket, + const char *anchor, uint32_t ruleset, struct pfctl_rule *rule, char *anchor_call, bool clear); int pfctl_add_rule(int dev, const struct pfctl_rule *r, - const char *anchor, const char *anchor_call, u_int32_t ticket, - u_int32_t pool_ticket); + const char *anchor, const char *anchor_call, uint32_t ticket, + uint32_t pool_ticket); int pfctl_set_keepcounters(int dev, bool keep); int pfctl_get_states(int dev, struct pfctl_states *states); void pfctl_free_states(struct pfctl_states *states); From nobody Fri Nov 26 20:50:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 17B9C18A3F24; Fri, 26 Nov 2021 20:50: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 4J16Mh4kBPz3pN0; Fri, 26 Nov 2021 20:50:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82A9F6FF6; Fri, 26 Nov 2021 20:50: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 1AQKoeK9018475; Fri, 26 Nov 2021 20:50:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQKoePn018473; Fri, 26 Nov 2021 20:50:40 GMT (envelope-from git) Date: Fri, 26 Nov 2021 20:50:40 GMT Message-Id: <202111262050.1AQKoePn018473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: c41d129485e0 - stable/13 - ofwfb: fix vga/hdmi console with ASMEDIA during boot on powerpc64(le) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c41d129485e0c2519397ff7e740e9401f948a74c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637959840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1YmG/cJ+wAlsHPaZwWr+YwtJ5itD7qsDL+syliECGEE=; b=CerdLU4iqep58tY7p12tCOWajS1JJ966fwTYpvas0/VXY5f9FrMhUy1AEYajioG0kWpL+M ZzAHnooUNsO+F9ohK5tIEjx8ltwcpjpwdwUkxGEz+XLIoPRLqk75FAI3RHbA/6UViRE7JE ugmbRDnDFOi6zN71NrsjySfs7AwdA4kCQ3LlfQLKQtY2A67MBgmZMt//6FA/PILZRsfhiM BTFrPH8TSLFnvUF8v+0FVuCKryurtaqJOY+Ed2koWfQFbJ8YjnnNFiN3HpcWA4fwpSmnzd Stj5m7zN83M1SXQFGPGr62vPVNeaXcn5Ge5u8sJpSCkQpayvBqZKJ4/lAtyR9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637959840; a=rsa-sha256; cv=none; b=PeQnF0iZVm7NXzxlNOjFp7FohFVQevyQBtXLcb17vQRdFHiVenEnx3fi0fYR66DpXw80+J YfbcH+mA6ucfe2Hc+xfgsdvw9RqO7WQs5yqlXu9E06HigmzJsc1QEI8W2oWGWItgT2IFRp Y6qNR+47izdQpru4NHh5/WoZLimh+BgYytPxRG8a0ukj7RirMdHxXtIj77/XeqP3dQ9NWk 1ftEt4SJcBzkUFUYiLKLdLS3+/7sF2zLjQF/GZbU9/UgoL0k/ggR+kNSgPG6Wk0BGqEu+X wvRppmGdyu/23lbIShppiEz0yZVLIcNIGzhwE2DchL0HXLOzHdpfMcSoZtdjcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=c41d129485e0c2519397ff7e740e9401f948a74c commit c41d129485e0c2519397ff7e740e9401f948a74c Author: Alfredo Dal'Ava Junior AuthorDate: 2021-11-03 16:42:28 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-11-26 23:50:55 +0000 ofwfb: fix vga/hdmi console with ASMEDIA during boot on powerpc64(le) On recent OpenBMC firmware, the onboard ASMEDIA video card framebuffer address was removed from device tree for security purposes (value is set to zero to avoid leaking the address). This patch works around the problem by taking framebuffer base address from the "ranges" property of a parent node. Reviewed by: luporl, jhibbits (on IRC) MFC after: 2 weeks Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D30626 (cherry picked from commit b042d10cdc71ddd6ef3449261d712b05c648746e) --- sys/dev/vt/hw/ofwfb/ofwfb.c | 116 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 110 insertions(+), 6 deletions(-) diff --git a/sys/dev/vt/hw/ofwfb/ofwfb.c b/sys/dev/vt/hw/ofwfb/ofwfb.c index 9dc674c0ebf9..e388356450d6 100644 --- a/sys/dev/vt/hw/ofwfb/ofwfb.c +++ b/sys/dev/vt/hw/ofwfb/ofwfb.c @@ -61,7 +61,8 @@ struct ofwfb_softc { uint32_t vendor_id; }; -#define PCI_VENDOR_ID_NVIDIA 0x10de +#define PCI_VID_NVIDIA 0x10de /* NVIDIA Corporation */ +#define PCI_VID_ASPEED 0x1a03 /* ASPEED Technology, Inc. */ static void ofwfb_initialize(struct vt_device *vd); static vd_probe_t ofwfb_probe; @@ -297,6 +298,104 @@ ofwfb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, #endif } + +/* + * Decode OpenFirmware/IEEE 1275-1994 "ranges" property + * + * XXX: this is similar to ofw_pcib_fill_ranges but cannot use it here because + * it's not possible to allocate memory at the moment this is funcion is + * used. Since there are other similar functions dealing with "ranges" + * property, a proper refactoring is suggested. + */ +static uint64_t +decode_pci_ranges_host_addr(phandle_t pcinode) +{ + struct simplebus_range { + uint64_t bus; + uint64_t host; + uint64_t size; + }; + + struct simplebus_range ranges[4]; + int nranges, host_address_cells; + pcell_t acells, scells; + cell_t base_ranges[64]; + + ssize_t nbase_ranges; + int i, j, k; + + if (!OF_hasprop(pcinode, "ranges")) + return (0); + + if (OF_getencprop(pcinode, "#address-cells", &acells, sizeof(acells)) != + sizeof(acells)) + return (0); + + if (OF_getencprop(pcinode, "#size-cells", &scells, sizeof(scells)) != + sizeof(scells)) + return (0); + + if (OF_searchencprop(OF_parent(pcinode), "#address-cells", + &host_address_cells, sizeof(host_address_cells)) != + sizeof(host_address_cells)) + return (0); + + nbase_ranges = OF_getproplen(pcinode, "ranges"); + nranges = nbase_ranges / sizeof(cell_t) / (acells + host_address_cells + scells); + + /* prevent buffer overflow during iteration */ + if (nranges > sizeof(ranges) / sizeof(ranges[0])) + nranges = sizeof(ranges) / sizeof(ranges[0]); + + /* decode range value and return the first valid address */ + OF_getencprop(pcinode, "ranges", base_ranges, nbase_ranges); + for (i = 0, j = 0; i < nranges; i++) { + ranges[i].bus = 0; + for (k = 0; k < acells; k++) { + ranges[i].bus <<= 32; + ranges[i].bus |= base_ranges[j++]; + } + + ranges[i].host = 0; + for (k = 0; k < host_address_cells; k++) { + ranges[i].host <<= 32; + ranges[i].host |= base_ranges[j++]; + } + ranges[i].size = 0; + for (k = 0; k < scells; k++) { + ranges[i].size <<= 32; + ranges[i].size |= base_ranges[j++]; + } + + if (ranges[i].host != 0) + return (ranges[i].host); + } + + return (0); +} + +static bus_addr_t +find_pci_host_address(phandle_t node) +{ + uint64_t addr; + + /* + * According to IEEE STD 1275, if property "ranges" exists but has a + * zero-length property value, the child address space is identical + * to the parent address space. + */ + while (node) { + if (OF_hasprop(node, "ranges")) { + addr = decode_pci_ranges_host_addr(node); + if (addr != 0) + return ((bus_addr_t)addr); + } + node = OF_parent(node); + } + + return (0); +} + static void ofwfb_initialize(struct vt_device *vd) { @@ -350,7 +449,7 @@ ofwfb_initialize(struct vt_device *vd) * There is no good way to determine the correct option, as this * is independent of endian swapping. */ - if (sc->vendor_id == PCI_VENDOR_ID_NVIDIA) + if (sc->vendor_id == PCI_VID_NVIDIA) sc->argb = 0; else sc->argb = 1; @@ -430,7 +529,6 @@ ofwfb_init(struct vt_device *vd) sizeof(vendor_id)) == sizeof(vendor_id)) sc->vendor_id = vendor_id; - /* Keep track of the OF node */ sc->sc_node = node; @@ -497,12 +595,18 @@ ofwfb_init(struct vt_device *vd) * Grab the physical address of the framebuffer, and then map it * into our memory space. If the MMU is not yet up, it will be * remapped for us when relocation turns on. + * + * The ASPEED driver on recent petitboot versions doesn't expose the + * physical address of framebuffer anymore for security. So it should + * retrieve the address from PCI device properties. */ user_phys = 0; TUNABLE_UINT64_FETCH("hw.ofwfb.physaddr", &user_phys); - fb_phys = (bus_addr_t)user_phys; - if (fb_phys) - sc->fb.fb_pbase = (vm_paddr_t)fb_phys; + + if (user_phys) + sc->fb.fb_pbase = (vm_paddr_t)user_phys; + else if (sc->vendor_id == PCI_VID_ASPEED) + sc->fb.fb_pbase = find_pci_host_address(node); else if (OF_hasprop(node, "address")) { switch (OF_getproplen(node, "address")) { From nobody Fri Nov 26 23:26:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A357B18A8B2D; Fri, 26 Nov 2021 23:26:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4J19qZ2THSz3Pln; Fri, 26 Nov 2021 23:26:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1AQNQICr075647 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 27 Nov 2021 01:26:21 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1AQNQICr075647 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1AQNQHih075646; Sat, 27 Nov 2021 01:26:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 27 Nov 2021 01:26:17 +0200 From: Konstantin Belousov To: Peter Jeremy Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b19740f4ce7a - main - swap_pager: lock vnode in swapdev_strategy() Message-ID: References: <202111251935.1APJZA1e094731@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4J19qZ2THSz3Pln X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Fri, Nov 26, 2021 at 09:53:03PM +1100, Peter Jeremy wrote: > On 2021-Nov-25 19:35:10 +0000, Konstantin Belousov wrote: > > swap_pager: lock vnode in swapdev_strategy() > > > > VOP_STRATEGY() requires locked vnode. Note that we lock the swap vnode > > while pages are busy, but this would only cause real LoR if pages belong > > to the swap vnode, which must not be the case for correct use. > > > > Reported and tested by: peterj > > Thanks for those fixes. Unfortunately, I've bumped into another edge > case: The system can panic during shutdown because it tries to swap > in data after the network is shutdown. For reasons I haven't tracked > down, a "swapoff" can fail even though there should be more than > enough RAM. As an example: > > Stopping cron. > Waiting for PIDS: 1024. > swapoff: /usr/obj/swapfile: Cannot allocate memory > Stopping ntpd. > Waiting for PIDS: 1012. > Stopping tincd for: vpn > Waiting for PIDS: 758. > Stopping rtsold. > Waiting for PIDS: 351. > Stopping devd. > Waiting for PIDS: 754. > Writing entropy file: . > Writing early boot entropy file: . > . > Terminated > Nov 26 03:18:44 rock64 syslogd: exiting on signal 15 > Waiting (max 60 seconds) for system process `vnlru' to stop... done > Waiting (max 60 seconds) for system process `syncer' to stop... > Syncing disks, vnodes remaining... 0 0 0 done > Waiting (max 60 seconds) for system thread `bufdaemon' to stop... done > Waiting (max 60 seconds) for system thread `bufspacedaemon-0' to stop... done > All buffers synced. > No strategy for buffer at 0xffff0000c0cd3000 > vnode 0xffffa00006475e00: type VBAD > usecount 3, writecount 0, refcount 974016 seqc users 1 > hold count flags () > flags (VIRF_DOOMED|VV_VMSIZEVNLOCK) > lock type nfs: SHARED (count 1) > swap_pager: I/O error - pagein failed; blkno 184,size 4096, error 45 > panic: VOP_STRATEGY failed bp=0xffff0000c0cd3000 vp=0 > cpuid = 0 > time = 1637857131 > KDB: stack backtrace: > db_trace_self() at db_trace_self > db_trace_self_wrapper() at db_trace_self_wrapper+0x30 > vpanic() at vpanic+0x178 > panic() at panic+0x44 > bufstrategy() at bufstrategy+0x80 > swapdev_strategy() at swapdev_strategy+0xcc > swap_pager_getpages_locked() at swap_pager_getpages_locked+0x460 > swapoff_one() at swapoff_one+0x3dc > swapoff_all() at swapoff_all+0x98 > bufshutdown() at bufshutdown+0x2ac > kern_reboot() at kern_reboot+0x240 > sys_reboot() at sys_reboot+0x358 > do_el0_sync() at do_el0_sync+0x4a4 > handle_el0_sync() at handle_el0_sync+0x90 > --- exception, esr 0x56000000 > KDB: enter: panic > [ thread pid 1 tid 100002 ] > Stopped at kdb_enter+0x48: undefined f900c11f > db> Try this. commit 9c62295373f728459c19138f5aa03d9cb8422554 Author: Konstantin Belousov Date: Sat Nov 27 01:22:27 2021 +0200 swapoff_one(): only check free pages count manually turning swap off When swap is turned off due to system shutdown or reboot, ignore the check. Problem is that the check is not accurate by any means, free page count can legitimately be low while system still able to page in everything from the swap. Then, we turn swap off if swapping on real file or some non-standard geom provider, and typically panic when system appears to actually need to unavailable page. For syscall, it is better to be safe than sorry. Reported by: peterj Sponsored by: The FreeBSD Foundation MFC after: 1 week diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 4cfdb3fd2cc8..981a71b2c4b1 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -469,7 +469,8 @@ static bool swp_pager_swblk_empty(struct swblk *sb, int start, int limit); static void swp_pager_free_empty_swblk(vm_object_t, struct swblk *sb); static int swapongeom(struct vnode *); static int swaponvp(struct thread *, struct vnode *, u_long); -static int swapoff_one(struct swdevt *sp, struct ucred *cred); +static int swapoff_one(struct swdevt *sp, struct ucred *cred, + bool swapoff_syscall); /* * Swap bitmap functions @@ -2523,14 +2524,14 @@ sys_swapoff(struct thread *td, struct swapoff_args *uap) error = EINVAL; goto done; } - error = swapoff_one(sp, td->td_ucred); + error = swapoff_one(sp, td->td_ucred, true); done: sx_xunlock(&swdev_syscall_lock); return (error); } static int -swapoff_one(struct swdevt *sp, struct ucred *cred) +swapoff_one(struct swdevt *sp, struct ucred *cred, bool swapoff_syscall) { u_long nblks; #ifdef MAC @@ -2552,8 +2553,16 @@ swapoff_one(struct swdevt *sp, struct ucred *cred) * available virtual memory in the system will fit the amount * of data we will have to page back in, plus an epsilon so * the system doesn't become critically low on swap space. + * The vm_free_count() part does not account e.g. for clean + * pages that can be immediately reclaimed without paging, so + * this is very rough estimation. + * + * On the other hand, not turning swap off on swapoff_all() + * means that we loose swap data when filesystems go away, + * which is arguably worse. */ - if (vm_free_count() + swap_pager_avail < nblks + nswap_lowat) + if (swapoff_syscall && + vm_free_count() + swap_pager_avail < nblks + nswap_lowat) return (ENOMEM); /* @@ -2603,7 +2612,7 @@ swapoff_all(void) devname = devtoname(sp->sw_vp->v_rdev); else devname = "[file]"; - error = swapoff_one(sp, thread0.td_ucred); + error = swapoff_one(sp, thread0.td_ucred, false); if (error != 0) { printf("Cannot remove swap device %s (error=%d), " "skipping.\n", devname, error); From nobody Fri Nov 26 23:32:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 11AD718AC38E; Fri, 26 Nov 2021 23:32: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 4J19xz5k5bz3hqN; Fri, 26 Nov 2021 23:32:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A44661193B; Fri, 26 Nov 2021 23:32: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 1AQNW7Zd036039; Fri, 26 Nov 2021 23:32:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQNW7kL036038; Fri, 26 Nov 2021 23:32:07 GMT (envelope-from git) Date: Fri, 26 Nov 2021 23:32:07 GMT Message-Id: <202111262332.1AQNW7kL036038@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: 22f7bcb523e7 - main - nfscl: Sanity check irdcnt in nfsrpc_createsession List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 22f7bcb523e7138248832fb304559c8f23276e08 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637969527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=60eVjEps9jbjj8SiH2i8IWLZcVSgckrnVZi/IYFOaC4=; b=Jgqt34h/oNTuafXZrMOO08bvM8W4+LgUS6PfaeWMb6DUZrMfsj9CbirLlc/CHGBd5SAwO5 RQYAtWCNAbCaCCRrR77KZY/Kpywast3RWwwu684weo+VVxqtOiNc0vvfXowCDanCv24ZIw b2flLCKX3gtp6O/h96aD88YiQOU8A4zxXkXI38weqcQO+RhKvfp93n6avRuBXy5gdDKAFy TuoCTbQpLThmxh0n9Xa/NkWXVCHqNczPl+DuYW7gq5FEyOM5wehDZtU43hnQTPv8TDXRyy dUR1J+DPr6kArpFxA2RyKp4ZIdQHQ2h45eO6+AUi0R/K/ynM1wjrtPwNVdSe9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637969527; a=rsa-sha256; cv=none; b=HrsSrjtZafHaYcsWQu3ZZUVJ7v7tvWdIkT9uo0C2IJvQMd8R+0FUMaTEVA0wkFCMnIz1AE M0q1ti0SuT/9Sgk7W6bl0UcSkKvyQbyqI8prjKDCKu0JKjnxMohz1WgO9zsX0bjcYNEI3c F3XOLUB0jh3IFM9/i3QaZseI2hQpIaJj18Rk1ySYZuIloDZwvtcxKM7ytqp4Sz9h1vD5zR Jl/Jz22g5pKuEJ3q7+a7twiIYX3OGdEnIkG/iK3EvvKQtoiw5My78ZMtgd4bIBhbgUUVIB lUs3eKFwrKXqnzOYHhyaLPOAixIEC+hWSll90I1rYstP1poB2cbGR+sr6MtIpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=22f7bcb523e7138248832fb304559c8f23276e08 commit 22f7bcb523e7138248832fb304559c8f23276e08 Author: Rick Macklem AuthorDate: 2021-11-26 23:28:40 +0000 Commit: Rick Macklem CommitDate: 2021-11-26 23:28:40 +0000 nfscl: Sanity check irdcnt in nfsrpc_createsession Reported by: rtm@lcs.mit.edu Tested by: rtm@lcs.mit.edu PR: 259996 MFC after: 2 weeks --- sys/fs/nfsclient/nfs_clrpcops.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index f520743e8c32..7646c1b404da 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -5233,6 +5233,10 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsclsession *sep, sep->nfsess_foreslots = fxdr_unsigned(uint16_t, *tl++); NFSCL_DEBUG(4, "fore slots=%d\n", (int)sep->nfsess_foreslots); irdcnt = fxdr_unsigned(int, *tl); + if (irdcnt < 0 || irdcnt > 1) { + error = NFSERR_BADXDR; + goto nfsmout; + } if (irdcnt > 0) NFSM_DISSECT(tl, uint32_t *, irdcnt * NFSX_UNSIGNED); From nobody Fri Nov 26 23:46:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D364F18B2C14; Fri, 26 Nov 2021 23:46: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 4J1BG52S2dz3mff; Fri, 26 Nov 2021 23:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 313CC11E8E; Fri, 26 Nov 2021 23:46: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 1AQNk5gl050894; Fri, 26 Nov 2021 23:46:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQNk55P050893; Fri, 26 Nov 2021 23:46:05 GMT (envelope-from git) Date: Fri, 26 Nov 2021 23:46:05 GMT Message-Id: <202111262346.1AQNk55P050893@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: bdd57cbb1bda - main - nfsd: Add checks for layout errors in LayoutReturn List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: bdd57cbb1bdafcf2ebffa73c52f0fffc9410ea7b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637970365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y9wkHgxOOUy4F8tDRpUxHUZULorROmYOluLXt24DqGM=; b=aAVuTs91CJIHgTOkDieXynK2oiCAflCX0AYjNLaRZCycDoRQsQ0/CyABqVvykX9oLCvFUN YaZXGEKxmKiXkriLZknqlTvYo1z+NHH22XIc3tlghwzq2lhkDrfJqjLaLtT7vN396fO/Ec e5eVDotrHmfjbQgwRts2OurGgMGKSe4KiRhClmsOpq/yKWq0+K+Fq5RqjdCiu2V64u7ZVp S242bpN1EKMoOdT1wjwQoHQ2YyvKVV3UhoTKyV5tblLqk6zuFXxr4kEF4KF0KSfFRj4gLd Uiq6aY8lPfKg6u8tbBn8HG/VErLKnu3j6v1IZddaVcRoLRSXFPccc3IxDlIuqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637970365; a=rsa-sha256; cv=none; b=b+mR3DdXzSklrCAOLrmE9rlDyRpngge8pJuEmN6J9TWyVrqwB9zmcrQ2z8B4FIspM+41g3 M+O7mm9wmNwFtszdJfXkGZX6r0FPdl2Or8eEp98RM58uVeFcVIO+PO+7u+44MkS/VukywI 5IMxBe5yT2Kgz1Iip5OqAhBHMeMZdyA8K7Rwa3knaG17L1P6Mr/FEP8/kOpE7FU+CaJYsS /GX+UDw4Yi0IGhHj4CwFl1M8Ltua97g8lZkyWsna4iGp2DCDA9JxEAdVG9ad0PhO4PsXDk hGjuWwmja3+TZ2DlTSNYK0Pfe8Sr+lyTPthTFXA9kjtSM96YO27pbsrPtdUwKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=bdd57cbb1bdafcf2ebffa73c52f0fffc9410ea7b commit bdd57cbb1bdafcf2ebffa73c52f0fffc9410ea7b Author: Rick Macklem AuthorDate: 2021-11-26 23:42:32 +0000 Commit: Rick Macklem CommitDate: 2021-11-26 23:42:32 +0000 nfsd: Add checks for layout errors in LayoutReturn For a LayoutReturn when using the Flexible File Layout, error reports may be provided in the request. Sanity check the size of these error reports and check that they exist before calling nfsrv_flexlayouterr(). Reported by: rtm@lcs.mit.edu Tested by: rtm@lcs.mit.edu PR: 260012 MFC after: 2 weeks --- sys/fs/nfsserver/nfs_nfsdserv.c | 6 ++++++ sys/fs/nfsserver/nfs_nfsdstate.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index a590c599518f..80c492251ce8 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -4959,6 +4959,12 @@ nfsrvd_layoutreturn(struct nfsrv_descript *nd, __unused int isdgram, } maxcnt = fxdr_unsigned(int, *tl); + /* + * There is no fixed upper bound defined in the RFCs, + * but 128Kbytes should be more than sufficient. + */ + if (maxcnt < 0 || maxcnt > 131072) + maxcnt = 0; if (maxcnt > 0) { layp = malloc(maxcnt + 1, M_TEMP, M_WAITOK); error = nfsrv_mtostr(nd, (char *)layp, maxcnt); diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 360bc00b8df3..4cfac532f063 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -7301,7 +7301,7 @@ nfsrv_layoutreturn(struct nfsrv_descript *nd, vnode_t vp, } NFSDRECALLUNLOCK(); } - if (layouttype == NFSLAYOUT_FLEXFILE) + if (layouttype == NFSLAYOUT_FLEXFILE && layp != NULL) nfsrv_flexlayouterr(nd, layp, maxcnt, p); } else if (kind == NFSV4LAYOUTRET_FSID) nfsrv_freelayouts(&nd->nd_clientid, From nobody Sat Nov 27 00:00:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D8F3718B8D9E; Sat, 27 Nov 2021 00:00: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 4J1BZB4Dm8z3qsN; Sat, 27 Nov 2021 00:00:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71D3B1210E; Sat, 27 Nov 2021 00:00: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 1AR002Pr066855; Sat, 27 Nov 2021 00:00:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AR0024X066852; Sat, 27 Nov 2021 00:00:02 GMT (envelope-from git) Date: Sat, 27 Nov 2021 00:00:02 GMT Message-Id: <202111270000.1AR0024X066852@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: 5b430a132330 - main - nfsd: Sanity check the len argument for ListXattr List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5b430a132330bd4a4ea37780807947f3800d009e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637971202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cLFaU3UG9KXih0+RNcJ7R5sL1XZ3UY/5PCcBa0UeFtM=; b=WKOF9OMj12bq3FvvK/dAd0dIlnylYQNGsw9897IiRFK7BwyGOAPHiNYP1C+BkbA/PdbaVj xPaPA3JZngZMzkx+mFKCL90nlHpaTtf/aWA7lREk1CRrOMN6vLIQ94oMP2slwVevP+SPJA 0FSIL5+zQLBpGY/0NfR+gCe0+khJbCM/7gX6llih0L3wi+oLvh9et50xYnxGLcSnGXpTy6 +GZna6+Xz7xoN2f9pkMcmDoa69+7W6TKoLOhq6xmdNEiKLYa+25ag1kxWRIhig7jSWcJzt h6rgFXfJwRaqq4ZzUmW8Mo5LRosbeHniBmVDyscD/a+N9Rg8a69KXJc3UVPs/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637971202; a=rsa-sha256; cv=none; b=RfItwkU3fh+AnrIOrjDMCDEVFNw/T7uokzUtk4pwFmW9Af18+0ZCN0jcqo+iJIaL7NA2qX rvPo2gQ72FSw1R5hj4K1prgFxgK0Ssr3xBuzWxx+BfF1DMhjzB848nnFt09Kh1imPg65sM wugu+v8s2MfaNr3ygVn2Lsj0n+iYxbYouZzkgjPEQkNyCdhh/vSUOoykCvdl9DM56BQzJx VVBLYb3Cu/ZWzdjItzEzLGq9fYjfuxYSyqYz7xrnXUq4LI+Oysndqd/blZC2Q9sCrWpSjy e3EA89zZkrKBK6uIp4tdiEpvl7r0Mq3jLVg1CgUci92J1JGUCaMPNGm458SqZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=5b430a132330bd4a4ea37780807947f3800d009e commit 5b430a132330bd4a4ea37780807947f3800d009e Author: Rick Macklem AuthorDate: 2021-11-26 23:56:29 +0000 Commit: Rick Macklem CommitDate: 2021-11-26 23:56:29 +0000 nfsd: Sanity check the len argument for ListXattr The check for the original len being >= retlen needs to be done before the "if (nd->nd_repstat == 0)" code, so that it can be reported as too small. Reported by: rtm@lcs.mit.edu Tested by: rtm@lcs.mit.edu PR: 260046 MFC after: 2 weeks --- sys/fs/nfsserver/nfs_nfsdserv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 80c492251ce8..4c5dade2c278 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -6095,10 +6095,12 @@ nfsrvd_listxattr(struct nfsrv_descript *nd, __unused int isdgram, if (cookie2 < cookie) nd->nd_repstat = NFSERR_BADXDR; } + retlen = NFSX_HYPER + 2 * NFSX_UNSIGNED; + if (nd->nd_repstat == 0 && len2 < retlen) + nd->nd_repstat = NFSERR_TOOSMALL; if (nd->nd_repstat == 0) { /* Now copy the entries out. */ - retlen = NFSX_HYPER + 2 * NFSX_UNSIGNED; - if (len == 0 && retlen <= len2) { + if (len == 0) { /* The cookie was at eof. */ NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 2 * NFSX_UNSIGNED); From nobody Sat Nov 27 01:35:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E844218BE3F1; Sat, 27 Nov 2021 01:35:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J1Dhm475Lz4qxn; Sat, 27 Nov 2021 01:35:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DBC0135CC; Sat, 27 Nov 2021 01:35: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 1AR1ZqD8097322; Sat, 27 Nov 2021 01:35:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AR1ZqIU097321; Sat, 27 Nov 2021 01:35:52 GMT (envelope-from git) Date: Sat, 27 Nov 2021 01:35:52 GMT Message-Id: <202111270135.1AR1ZqIU097321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 83d7b2f335b4 - main - xhci: Add PCI IDs from recent Intel 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83d7b2f335b4e21e6b63a86864ac5e76f4c8efd3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637976952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vir9r66g8yo2x+8Ry9eEMVQ0rlkRKnVBd6C3eoC2zFs=; b=PIl0RsSM7/oeVM0+oA0Cn8I+dJPHX5iPmtoEsXnk+CWdJqWJsJwnLj9ys2qAh2DOKPBQe2 phqLOEuEcxezLh5IM+XHEvFAt8YkkZKSUpSTkuZSH2WSurhqshfQc+rrYDoFsB3cIetJsd Z4+T3qADPwJohG7CMOjC9zWr3ORlxqfAJpsoqVwVQjVLURIayK5RzMhcJ94qWDpFeKv6xE NnnkK1FH1no4GQmumTehpusyXLT1itw2HOfi7GDWMC3ABhFYhdQCEp+k8EnIVKTvY1RyU4 hCOV2RlnSkgzqINjc1SmqICHjuFDY5nPhKKq9lg2WYbh80XfF+ily3agkBTtbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637976952; a=rsa-sha256; cv=none; b=ayAM6OU/iAqEUd8H7iCtC05+G9B2c1cG5A1LaboWWvJJv9tmtHKqm+YpEQHCNFvVUWK8eG BhPO4EaLDGOfjz0vnckDzdsGfNxiubCWhCQ1nI0pCIV/g71lMlq7ssz2hzBP5KoawUNnrI TkxoKx8cLJGPxZ2dnen0rCPmRKWSAHb/BeG0FriM8PyZYURlT2jrgLiPQj8QnoPuvqwdOz tLbYBz7YrVk3bj0S+FnFWifLoHXag7aEitNVXLrI+a/QaKG0uoO62732rj52CpRkO/UWl9 4LrjBf0pI/5qRkvoB6KgothFlVdst/C0QeN2kg/XVQUdVcSpTp5zHENnh84WOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=83d7b2f335b4e21e6b63a86864ac5e76f4c8efd3 commit 83d7b2f335b4e21e6b63a86864ac5e76f4c8efd3 Author: Alexander Motin AuthorDate: 2021-11-27 01:35:12 +0000 Commit: Alexander Motin CommitDate: 2021-11-27 01:35:12 +0000 xhci: Add PCI IDs from recent Intel CPUs. MFC after: 2 weeks --- sys/dev/usb/controller/xhci_pci.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c index 7ed0420b7664..dc59869dd527 100644 --- a/sys/dev/usb/controller/xhci_pci.c +++ b/sys/dev/usb/controller/xhci_pci.c @@ -132,20 +132,36 @@ xhci_pci_match(device_t self) return ("Intel Braswell USB 3.0 controller"); case 0x31a88086: return ("Intel Gemini Lake USB 3.0 controller"); + case 0x34ed8086: + return ("Intel Ice Lake-LP USB 3.1 controller"); + case 0x43ed8086: + return ("Intel Tiger Lake-H USB 3.2 controller"); + case 0x461e8086: + return ("Intel Alder Lake-P Thunderbolt 4 USB controller"); + case 0x51ed8086: + return ("Intel Alder Lake USB 3.2 controller"); case 0x5aa88086: return ("Intel Apollo Lake USB 3.0 controller"); case 0x7ae08086: return ("Intel Alder Lake USB 3.2 controller"); + case 0x8a138086: + return ("Intel Ice Lake Thunderbolt 3 USB controller"); case 0x8c318086: return ("Intel Lynx Point USB 3.0 controller"); case 0x8cb18086: return ("Intel Wildcat Point USB 3.0 controller"); case 0x8d318086: return ("Intel Wellsburg USB 3.0 controller"); + case 0x9a138086: + return ("Intel Tiger Lake-LP Thunderbolt 4 USB controller"); + case 0x9a178086: + return ("Intel Tiger Lake-H Thunderbolt 4 USB controller"); case 0x9cb18086: return ("Broadwell Integrated PCH-LP chipset USB 3.0 controller"); case 0x9d2f8086: return ("Intel Sunrise Point-LP USB 3.0 controller"); + case 0xa0ed8086: + return ("Intel Tiger Lake-LP USB 3.2 controller"); case 0xa12f8086: return ("Intel Sunrise Point USB 3.0 controller"); case 0xa1af8086: From nobody Sat Nov 27 02:23:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E741818B5780; Sat, 27 Nov 2021 02:23: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 4J1Flk4DxKz3LCT; Sat, 27 Nov 2021 02:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7126413FA1; Sat, 27 Nov 2021 02:23: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 1AR2NUn2063490; Sat, 27 Nov 2021 02:23:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AR2NUtk063489; Sat, 27 Nov 2021 02:23:30 GMT (envelope-from git) Date: Sat, 27 Nov 2021 02:23:30 GMT Message-Id: <202111270223.1AR2NUtk063489@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 0aa59ac82786 - stable/13 - pNFS: Add nfsstats counters for number of Layouts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0aa59ac827864628b545e5fb993cb67033df907e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637979810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X1rZJgJ+9kvD/EuRkpWr+Dt/3GDuXQ0rLMMMWYrLL8I=; b=qfiH5SH/ImGcAbztpdzvOhvBjkOopUu5oM1e3hxTcAG/pVWBdH304EAa7XVoNyhexY/OJm vPV6su/fX0ObWDrISbqby7RBa+fR2cjL4uGmCuGywvP+6pAt5b26qwotLE/XvQbtn1rUEL JmF4g8YVz/j80f+QfRgk2pB1Ex7IKdWKNzh/dz+csWHlQmyhhvbnh+7zOkdw3YbTN7oT3W Rap6N1R0QIP+Cl5qyunnabLqWsIYSKUGEnFCD+2gSE1Ol/KelrWpGNIdOB2jNvH8lVV3yB oqz5gVij0W4Fm+xTW9VBLLcGtMRArbQWRcLRGhRMU5+5wFnLEsRzwEPn1EXDhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637979810; a=rsa-sha256; cv=none; b=ny9cCdhvpb+3lA3uZjNLIUQnWYybdp8z7GRjPLkCuMYDzljQUuZJ6DTqFPmnHwvR2Fmq2A 8GxXWbr488IYF1k7EkOcLeghDHJkf0s4z3M83672ZjbItIAMwxSkbNO3Q9L//7FPfrnDMe T+95GxyiK1zDGfvSifapoUxuG7zMQT3qy/ZSTjvlgellUmLFJ6ksYTpvJ988/SLRo4cr0P ZeBPP6AjkWglRNqircss48+C4qZhzl4E/EMLgHwPO8wZn1Coa5mBSdkhTgo+z6gzb8jhQN SsMofLemW34ptxTYUlxuH87NJP9R2fPeTTpYBNGGwBUMALgFP9q3u5peHHr4Ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=0aa59ac827864628b545e5fb993cb67033df907e commit 0aa59ac827864628b545e5fb993cb67033df907e Author: Rick Macklem AuthorDate: 2021-11-13 01:32:55 +0000 Commit: Rick Macklem CommitDate: 2021-11-27 02:20:16 +0000 pNFS: Add nfsstats counters for number of Layouts For pNFS, Layouts are issued by the server to indicate where a file's data resides on the DS(s). This patch adds counters for how many layouts are allocated to the nfsstatsv1 structure, using two reserved fields. (cherry picked from commit ce9676de86f267986f61979151101e3d8a6d61bc) --- sys/fs/nfs/nfsport.h | 4 ++-- sys/fs/nfsclient/nfs_clstate.c | 2 ++ sys/fs/nfsserver/nfs_nfsdstate.c | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h index 5dcce15f7f64..e099cf6e46f0 100644 --- a/sys/fs/nfs/nfsport.h +++ b/sys/fs/nfs/nfsport.h @@ -459,8 +459,8 @@ struct nfsstatsv1 { uint64_t rpccnt[NFSV42_NPROCS + 11]; uint64_t rpcretries; uint64_t srvrpccnt[NFSV42_NOPS + NFSV4OP_FAKENOPS + 15]; - uint64_t reserved_0; - uint64_t reserved_1; + uint64_t srvlayouts; + uint64_t cllayouts; uint64_t rpcrequests; uint64_t rpctimeouts; uint64_t rpcunexpected; diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 1e2feef19d63..08eada1e1c3e 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -5214,6 +5214,7 @@ nfscl_layout(struct nfsmount *nmp, vnode_t vp, u_int8_t *fhp, int fhlen, nfsly_hash); lyp->nfsly_timestamp = NFSD_MONOSEC + 120; nfscl_layoutcnt++; + nfsstatsv1.cllayouts++; } else { if (retonclose != 0) lyp->nfsly_flags |= NFSLY_RETONCLOSE; @@ -5588,6 +5589,7 @@ nfscl_freelayout(struct nfscllayout *layp) free(rp, M_NFSLAYRECALL); } nfscl_layoutcnt--; + nfsstatsv1.cllayouts--; free(layp, M_NFSLAYOUT); } diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index e6a919093738..e9acacb27cbd 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -7400,6 +7400,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.srvlayouts++; NFSBCOPY(lyp->lay_xdr, layp, lyp->lay_layoutlen); *layoutlenp = lyp->lay_layoutlen; TAILQ_INSERT_HEAD(&lhyp->list, lyp, lay_list); @@ -7492,6 +7493,7 @@ nfsrv_freelayout(struct nfslayouthead *lhp, struct nfslayout *lyp) NFSD_DEBUG(4, "Freelayout=%p\n", lyp); atomic_add_int(&nfsrv_layoutcnt, -1); + nfsstatsv1.srvlayouts--; TAILQ_REMOVE(lhp, lyp, lay_list); free(lyp, M_NFSDSTATE); } From nobody Sat Nov 27 06:55:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C361418A1B58; Sat, 27 Nov 2021 06: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 4J1Mp23NRRz3LKf; Sat, 27 Nov 2021 06:55:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 502B217AC2; Sat, 27 Nov 2021 06: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 1AR6tsLf023869; Sat, 27 Nov 2021 06: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 1AR6tslh023868; Sat, 27 Nov 2021 06:55:54 GMT (envelope-from git) Date: Sat, 27 Nov 2021 06:55:54 GMT Message-Id: <202111270655.1AR6tslh023868@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wei Hu Subject: git: 75412a521f60 - main - Hyper-V: vPCI: Prepopulate device bars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75412a521f60d4b0393c730ffb284e7c6ff9d2de Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637996154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0D4vEjO5Be7K3MHUUh+BdfzlBIMtYTyau3II2Rrcs4Q=; b=IOW5ro0kNEjk5VEbcF/+29dDPK/6gAaciRf3fmxqQXsJGge3YXjU1AGdoSWRreFzMja9ld 4l69ga0+Iva+6dJ1Wb0RenHJY3UytIqQNO6qWeUZ1GZzOnIBrTlIaX99HACRO1U6rpk8OI Q69hoTYkIItIT3Y/vLn5F7NBO+THs43B/EoArv49dRJoGxozT0CTVp520cRwFIhdbRtWY5 sZz6e28HMBfUjVERzsDpYWnE0X5mkm4bAjw54U/c0DLD6SwzVReg70l/7cfrCvvPofaosr gTtuECk9iSrMt6kj/ZmiycZRqgDlmmPWzZ88MZJRmDEfRc6kC5gLqV0hI+BujQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637996154; a=rsa-sha256; cv=none; b=PmEqm/bBJt2PYuGnUX3dtG2N7+NEn2CUPGAuOmLqFeH4bOasoINb/B98uthaDJzwMs64C8 C1x6K9Smh5D66nc09KgW1swaViUyLBIH2MBHaF6jmUBTy54ssvrGQIPqAw8elyC2sccZCS a1LYO57WgU6EXlEI6dbf2qU/sJnVB5j0493J91R3SEYtUHAKoNP5JP0ouJQCZWQnUiwLYg rhUZw/TlnBqyXHNow1+px6T73v8S3FWROEy/oBdQLcBzRRbDKmWGk+Qnk4h1IPk/89zj1Z ifUHtSskfRc16upNjjMJL6p/OM+xuAS4pA99amIUUy55+hS3O3dYl2mKnMmGYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=75412a521f60d4b0393c730ffb284e7c6ff9d2de commit 75412a521f60d4b0393c730ffb284e7c6ff9d2de Author: Wei Hu AuthorDate: 2021-11-27 06:42:34 +0000 Commit: Wei Hu CommitDate: 2021-11-27 06:42:34 +0000 Hyper-V: vPCI: Prepopulate device bars In recent Hyper-V releases on Windows Server 2022, vPCI code does not initialize the last 4 bit of device bar registers. This behavior change could result weird problems cuasing PCI code failure when configuring bars. Just write all 1's to those bars whose probed values are not the same as current read ones. This seems to make Hyper-V vPCI and pci_write_bar() to cooperate correctly on these releases. Reported by: khng@freebsd.org Tested by: khng@freebsd.org MFC after: 2 weeks Sponsored by: Microsoft --- sys/dev/hyperv/pcib/vmbus_pcib.c | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index 72e430c946db..c7df32044678 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -1356,6 +1356,47 @@ _hv_pcifront_write_config(struct hv_pci_dev *hpdev, int where, int size, } } +/* + * The vPCI in some Hyper-V releases do not initialize the last 4 + * bit of BAR registers. This could result weird problems causing PCI + * code fail to configure BAR correctly. + * + * Just write all 1's to those BARs whose probed values are not zero. + * This seems to make the Hyper-V vPCI and pci_write_bar() to cooperate + * correctly. + */ + +static void +vmbus_pcib_prepopulate_bars(struct hv_pcibus *hbus) +{ + struct hv_pci_dev *hpdev; + int i; + + mtx_lock(&hbus->device_list_lock); + TAILQ_FOREACH(hpdev, &hbus->children, link) { + for (i = 0; i < 6; i++) { + /* Ignore empty bar */ + if (hpdev->probed_bar[i] == 0) + continue; + + uint32_t bar_val = 0; + + _hv_pcifront_read_config(hpdev, PCIR_BAR(i), + 4, &bar_val); + + if (hpdev->probed_bar[i] != bar_val) { + if (bootverbose) + printf("vmbus_pcib: initialize bar %d " + "by writing all 1s\n", i); + + _hv_pcifront_write_config(hpdev, PCIR_BAR(i), + 4, 0xffffffff); + } + } + } + mtx_unlock(&hbus->device_list_lock); +} + static void vmbus_pcib_set_detaching(void *arg, int pending __unused) { @@ -1479,6 +1520,8 @@ vmbus_pcib_attach(device_t dev) if (ret) goto vmbus_close; + vmbus_pcib_prepopulate_bars(hbus); + hbus->pci_bus = device_add_child(dev, "pci", -1); if (!hbus->pci_bus) { device_printf(dev, "failed to create pci bus\n"); From nobody Sat Nov 27 08:49:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 46C9718BAA37; Sat, 27 Nov 2021 08:49: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 4J1QKW01NLz4hGB; Sat, 27 Nov 2021 08:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D0D58191CB; Sat, 27 Nov 2021 08:49: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 1AR8no9p070227; Sat, 27 Nov 2021 08:49:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AR8noZQ070226; Sat, 27 Nov 2021 08:49:50 GMT (envelope-from git) Date: Sat, 27 Nov 2021 08:49:50 GMT Message-Id: <202111270849.1AR8noZQ070226@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: a9f6a79b2d6a - stable/13 - sddadone: 'error' gets assigned only errno codes, never MMC_ERR codes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a9f6a79b2d6a8f0ec7e63d8f1ae9876842c8678a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638002991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i7AxbvFR12KBk4ArDTWdvW6q0DYicfwDZpuBx9fHxEc=; b=TCAijbea8ERhQtrQSVs131pGj6xIpSGmT9A1ShOvP3+1OSVUCDDTickfpS5P7Tzkc0EWfw eKbElK30yIh5hxa6LniPGiMWpnZQ51Qa4FojkIuvc3dseRYd6TmmUIXBghR3xM+nNat9ok m7s/wfx2p5dEmhrVHsFtxpcEopOC960ouK6IXweQTUsvOrGWSPJchMA1wvi2U0p/mJoxO3 vYgRmcWtcycUroud8gLlip/zuSTik0z417GcIsaDLeNwHHPtgJphUO4rZHbloFLdeVfuam qCMhhc/ul1MqUxM9rd3v6KNmoEGv1zCEKaSkdDcsl6dVWJrNAKQiqmBxUldrmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638002991; a=rsa-sha256; cv=none; b=YEllBPwfaFr5hjTsn0JBr6qdt00pvHrKPbswB9HWitueCQ0o0U4W0q8QMaWISqS1H1I8SC Ru51bQJ7D3+LvIxdkUil5TS4N7ZlGlK/UKmg6EePETY/mD5cF/LXoQLx0BokkyMxPzg8Sa xjYT7IWxAz9fmumWntfSUgm4o7v0qKe0hDqWsg2DkPszpqzuva35froB+UwvUuA9uAR61R srX6p6+3bwEFxe7xQTZOdVQu6Sfyws6z5W/VECngdKEt7ZCkwS3XK//deptg4NSfp7sYdT T7l1CSalp1ayzWqKD0wdmo/VFoa3471KFF1H+35lbwFK5jNmv/6HDOFHzHpwkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=a9f6a79b2d6a8f0ec7e63d8f1ae9876842c8678a commit a9f6a79b2d6a8f0ec7e63d8f1ae9876842c8678a Author: Andriy Gapon AuthorDate: 2021-07-09 14:28:40 +0000 Commit: Andriy Gapon CommitDate: 2021-11-27 08:32:36 +0000 sddadone: 'error' gets assigned only errno codes, never MMC_ERR codes (cherry picked from commit e17b58ecbcb644f76cceda4ca7ff08f7677b5dfd) --- sys/cam/mmc/mmc_da.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c index 62066311aa93..22a467af2f5f 100644 --- a/sys/cam/mmc/mmc_da.c +++ b/sys/cam/mmc/mmc_da.c @@ -1935,7 +1935,7 @@ sddadone(struct cam_periph *periph, union ccb *done_ccb) /*reduction*/0, /*timeout*/0, /*getcount_only*/0); - error = 5; /* EIO */ + error = EIO; } else { if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) panic("REQ_CMP with QFRZN"); @@ -1956,7 +1956,7 @@ sddadone(struct cam_periph *periph, union ccb *done_ccb) softc->outstanding_cmds--; /* Complete partition switch */ softc->state = SDDA_STATE_NORMAL; - if (error != MMC_ERR_NONE) { + if (error != 0) { /* TODO: Unpause retune if accessing RPMB */ xpt_release_ccb(done_ccb); xpt_schedule(periph, CAM_PRIORITY_NORMAL); From nobody Sat Nov 27 08:49:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 885DA18BAC8B; Sat, 27 Nov 2021 08:49: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 4J1QKX129dz4h7G; Sat, 27 Nov 2021 08:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0DA319208; Sat, 27 Nov 2021 08:49: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 1AR8npZ5070251; Sat, 27 Nov 2021 08:49:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AR8npO4070250; Sat, 27 Nov 2021 08:49:51 GMT (envelope-from git) Date: Sat, 27 Nov 2021 08:49:51 GMT Message-Id: <202111270849.1AR8npO4070250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 83f68b84c234 - stable/13 - ds1307: allow configuration via hints on FDT-based systems List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 83f68b84c2347bbe11c5266e98bfd0a44334f004 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638002992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I+XQt+YJgS4ePV3xWVSLut92oD+kvBuxfv1qXKIZ/QY=; b=rUFffuFKcRn9xdsbpTVGp2OOFT+iZGHS+FYyJRVqm20MW1RxbyFHpnOM1zrYi3jMMJGQVg aNQQvW++CHkTjE9FCA63JDd1DKIOwzSl7iV8M9dUjXmiOqtwZyeuAoyOb6tvh3H3/3+P4m Y6il4cZhgdMB2+unkl5bt3vuklKU/RWoqEwNZZO5EweTbPOGCgAq+Xkq81hcqS5+0g/Tn2 CKOn3R8gfkMh0hl93mGBEhtsGKQfRJGk/oa5LHEKGhXE5UmHN3VrrWlIbfTZFEuLspp+cn f4LvBKcb4oXQjqWeu9sCvN5D26mSROnlHfFEufZ1+HkFDbXw6SQZdvmp3ZgoAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638002992; a=rsa-sha256; cv=none; b=H9/70ZkupGriqUylaTOBYNPL+EgKMSufwQHfv4VkIw9KAY3Fh9jGjusXyF6Z6RVFZandXG eOq1ffjSfsueLeqpFdfX0/TM3UnzqSCCF+PuwKa9gTdXhW3XM0+8LKOT0iOAG/eejCLrtG xP1u4wKPNeL5AtXslDmt0smDqRBvS1PWEZemEfuP4HEM9nl9wiZhrVVh7CZO28epXNN+o4 wU65MVpIIWTQoY/ElysF1YeVFwPXB9ASx210A9ZhngnIIg+KGn0+DtTrPbvxGhPESyqChM DOyXC3WpOjTilbbUl0sEcynY1II1qJRXgQeS897kOcJHiHoFyE36tGIU9FhhsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=83f68b84c2347bbe11c5266e98bfd0a44334f004 commit 83f68b84c2347bbe11c5266e98bfd0a44334f004 Author: Andriy Gapon AuthorDate: 2021-11-04 11:55:35 +0000 Commit: Andriy Gapon CommitDate: 2021-11-27 08:44:16 +0000 ds1307: allow configuration via hints on FDT-based systems On-board devices should be configured via the FDT and overlays. Hints are primarily useful for external and temporarily attached devices. Adding hints is much easier and faster than writing and compiling an overlay. (cherry picked from commit 27645265c4e49ad7eaa25847a280307acb138da8) --- sys/dev/iicbus/ds1307.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/dev/iicbus/ds1307.c b/sys/dev/iicbus/ds1307.c index 7bab7e78c0d8..47f47bb07f5e 100644 --- a/sys/dev/iicbus/ds1307.c +++ b/sys/dev/iicbus/ds1307.c @@ -216,18 +216,13 @@ ds1307_probe(device_t dev) return (ENXIO); compat = ofw_bus_search_compatible(dev, ds1307_compat_data); - - if (compat->ocd_str == NULL) - return (ENXIO); - - device_set_desc(dev, (const char *)compat->ocd_data); - - return (BUS_PROBE_DEFAULT); -#else + if (compat->ocd_str != NULL) { + device_set_desc(dev, (const char *)compat->ocd_data); + return (BUS_PROBE_DEFAULT); + } +#endif device_set_desc(dev, "Maxim DS1307 RTC"); - return (BUS_PROBE_NOWILDCARD); -#endif } static int From nobody Sat Nov 27 08:49:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D992918BAC8F; Sat, 27 Nov 2021 08:49: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 4J1QKY2f6Bz4hRF; Sat, 27 Nov 2021 08:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20CF318FBE; Sat, 27 Nov 2021 08:49: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 1AR8nrQC070281; Sat, 27 Nov 2021 08:49:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AR8nrMW070279; Sat, 27 Nov 2021 08:49:53 GMT (envelope-from git) Date: Sat, 27 Nov 2021 08:49:53 GMT Message-Id: <202111270849.1AR8nrMW070279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: f537b3056421 - stable/13 - icee: allow configuration via hints on FDT-based systems List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f537b30564210708cea309de6e2ba54cf18e52b1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638002993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mZNH44f0XUujf0WpiZEdVAmTvWw9VsPXtGMKUVidLdU=; b=o9ydl/L9jMX4UTnkuU9nCl8D4PDNVH9Y/0jMxugF+Ug40IdgV/uk8V3+WWGas7r528wJAO IKswLO7mMBo0jIFnyLnprgf164dUiQqL513bku5uPI8Pb+xjUfbZ9AFyIwJufoVfY5aZj6 z6V0b6+m5v+EhHSCv375y+zbFIjUjh82+YypAdISFqk5wo62MRpJ0YxzHkWGpGYw4cgSIk PKXHlAoDmCSxwyiiMH32lvYO3lq04Tk/jUyW2nXbGecn0VeG2tWQE23KYDHuVRQ3grBhaD FOwITXN3yQzvF2/6c/muCdGC7HhbceQX2KjWotSeUa8Ns0s1Zzllylw6slp8mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638002993; a=rsa-sha256; cv=none; b=nd9ECiah28uQpWWj/RlvSOKThXUSCi+EsDytLQr/9a0gI9Sfv0goQKbYV2CZtGGMIs7sn/ EDcTdbgo+AsXWvt3biKdn6t33z0SvA/uLw9HoeAfSNB1yZW5de+n9eJRTPS+i5zMAQtDEO k2nih8S418Z2zciBxFW/7J4sVXNQvRWqArh8kFGpMx0ClC2/btdQw9T3HGEgZj7Dzr2QsX HPIMFrEuSH41mQC6YSA2ds+yPlswuVzxtlkoMxfTsibE+rVILRc7Xy4SK78UGPt5desaEh a5GBkv/Z8hIzaBO1l+DkrV1D5++LoVj+kgj+q3a5i0OvQjHu+cbfyyGj5t2hKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=f537b30564210708cea309de6e2ba54cf18e52b1 commit f537b30564210708cea309de6e2ba54cf18e52b1 Author: Andriy Gapon AuthorDate: 2021-11-04 11:56:22 +0000 Commit: Andriy Gapon CommitDate: 2021-11-27 08:47:25 +0000 icee: allow configuration via hints on FDT-based systems On-board devices should be configured via the FDT and overlays. Hints are primarily useful for external and temporarily attached devices. Adding hints is much easier and faster than writing and compiling an overlay. (cherry picked from commit 01e3492337cb48484e03be38340cc67ac5e30a5b) --- sys/dev/iicbus/icee.c | 64 +++++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/sys/dev/iicbus/icee.c b/sys/dev/iicbus/icee.c index 19aff78bf45a..a658d73cb875 100644 --- a/sys/dev/iicbus/icee.c +++ b/sys/dev/iicbus/icee.c @@ -123,10 +123,10 @@ static struct cdevsw icee_cdevsw = .d_write = icee_write }; -#ifdef FDT static int icee_probe(device_t dev) { +#ifdef FDT struct eeprom_desc *d; if (!ofw_bus_status_okay(dev)) @@ -134,49 +134,42 @@ icee_probe(device_t dev) d = (struct eeprom_desc *) ofw_bus_search_compatible(dev, compat_data)->ocd_data; - if (d == NULL) - return (ENXIO); - - device_set_desc(dev, d->name); - return (BUS_PROBE_DEFAULT); -} - -static void -icee_init(struct icee_softc *sc) -{ - struct eeprom_desc *d; - - d = (struct eeprom_desc *) - ofw_bus_search_compatible(sc->dev, compat_data)->ocd_data; - if (d == NULL) - return; /* attach will see sc->size == 0 and return error */ - - sc->size = d->size; - sc->type = d->type; - sc->wr_sz = d->wr_sz; -} -#else /* !FDT */ -static int -icee_probe(device_t dev) -{ - + if (d != NULL) { + device_set_desc(dev, d->name); + return (BUS_PROBE_DEFAULT); + } +#endif device_set_desc(dev, "I2C EEPROM"); return (BUS_PROBE_NOWILDCARD); } -static void +static int icee_init(struct icee_softc *sc) { const char *dname; int dunit; +#ifdef FDT + struct eeprom_desc *d; + d = (struct eeprom_desc *) + ofw_bus_search_compatible(sc->dev, compat_data)->ocd_data; + if (d != NULL) { + sc->size = d->size; + sc->type = d->type; + sc->wr_sz = d->wr_sz; + return (0); + } +#endif dname = device_get_name(sc->dev); dunit = device_get_unit(sc->dev); - resource_int_value(dname, dunit, "size", &sc->size); - resource_int_value(dname, dunit, "type", &sc->type); - resource_int_value(dname, dunit, "wr_sz", &sc->wr_sz); + if (resource_int_value(dname, dunit, "type", &sc->type) != 0) + return (ENOENT); + if (resource_int_value(dname, dunit, "size", &sc->size) != 0) + return (ENOENT); + if (resource_int_value(dname, dunit, "wr_sz", &sc->wr_sz) != 0) + return (ENOENT); + return (0); } -#endif /* FDT */ static int icee_attach(device_t dev) @@ -187,13 +180,8 @@ icee_attach(device_t dev) sc->dev = dev; sc->addr = iicbus_get_addr(dev); - icee_init(sc); - if (sc->size == 0 || sc->type == 0 || sc->wr_sz == 0) { - device_printf(sc->dev, "Missing config data, " - "these cannot be zero: size %d type %d wr_sz %d\n", - sc->size, sc->type, sc->wr_sz); + if (icee_init(sc) != 0) return (EINVAL); - } if (bootverbose) device_printf(dev, "size: %d bytes, addressing: %d-bits\n", sc->size, sc->type); From nobody Sat Nov 27 08:52:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 45E8018BDC2D; Sat, 27 Nov 2021 08:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J1QNC75Mzz4kYQ; Sat, 27 Nov 2021 08:52:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D32BC1902D; Sat, 27 Nov 2021 08:52: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 1AR8qBFV082901; Sat, 27 Nov 2021 08:52:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AR8qBZ2082900; Sat, 27 Nov 2021 08:52:11 GMT (envelope-from git) Date: Sat, 27 Nov 2021 08:52:11 GMT Message-Id: <202111270852.1AR8qBZ2082900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 06f49eaf13bd - stable/12 - sddadone: 'error' gets assigned only errno codes, never MMC_ERR codes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 06f49eaf13bdd9a0e5f4d8e260891dede592db12 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638003132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hzAZH5QDJnAdOAzDUhzL0ngUEImylnbJo4e4No+pktM=; b=aWB1+EN7tO2VckeDNFpZ9MuwiJ2DziqSNvQY7mAvtxbONSrraguidx2bBYawOaHqqGafoY W5ar2K27zE1gqyytv+Q4IMbaoF36xEq7RVdMd/BlVKNxCDdr9iDrO0LdcI6bedz92qHEfv 1jO0pmIn/TElW4PtcO0J5umWVvRuLrLi1BAAcGPnWPG+4VwaKoiOwORSDNs5IV+BR7WOY4 +ED6Z3EVpyJqMtIy8IMQ/uOw9UmdGAZ9CRsTPXtKE0ubDN6VQQ3jSprDcl9ZVIMq7OaPkf oOK8yk2YdMVSAcldnePnP/F8rrSfuJzHspERL/BjaFg+dB0R7ceWUaquiCVu5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638003132; a=rsa-sha256; cv=none; b=pDRxqbkMg4N7gzNajC2Ci1U4/5XOSOB6e2P2XVCpQ4spPyrgo86nOp5gW/ez1B0k6D9bzf RgDD4PP7FnX7MwkItWAvnjaiE3jgbLk57Xv45nA7gb7sjXP5ffD6Y0XHqPc8z8NiBJ6InM 10GQHpZSca/ajFFAyx2dv3om73Q+ObbI7AF54+/zbiyjpD+LWGMj4b6EI4MakKmN0FVWeb QljkdgPGulTIdAXCRArdcTbVHxaBoPgZ36zJvWQl/744vF42wL9NT4GUE8DZ2Ri/Snf7Ty a+yuO6pNtHrpwUlH3NTChhT3SjOcMPi3IGfHkukr8t++R0yU60tx2ytbYKmD+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=06f49eaf13bdd9a0e5f4d8e260891dede592db12 commit 06f49eaf13bdd9a0e5f4d8e260891dede592db12 Author: Andriy Gapon AuthorDate: 2021-07-09 14:28:40 +0000 Commit: Andriy Gapon CommitDate: 2021-11-27 08:39:19 +0000 sddadone: 'error' gets assigned only errno codes, never MMC_ERR codes (cherry picked from commit e17b58ecbcb644f76cceda4ca7ff08f7677b5dfd) --- sys/cam/mmc/mmc_da.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c index 2587cda115cc..96898e92cb81 100644 --- a/sys/cam/mmc/mmc_da.c +++ b/sys/cam/mmc/mmc_da.c @@ -1834,7 +1834,7 @@ sddadone(struct cam_periph *periph, union ccb *done_ccb) /*reduction*/0, /*timeout*/0, /*getcount_only*/0); - error = 5; /* EIO */ + error = EIO; } else { if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) panic("REQ_CMP with QFRZN"); @@ -1855,7 +1855,7 @@ sddadone(struct cam_periph *periph, union ccb *done_ccb) softc->outstanding_cmds--; /* Complete partition switch */ softc->state = SDDA_STATE_NORMAL; - if (error != MMC_ERR_NONE) { + if (error != 0) { /* TODO: Unpause retune if accessing RPMB */ xpt_release_ccb(done_ccb); xpt_schedule(periph, CAM_PRIORITY_NORMAL); From nobody Sat Nov 27 08:52:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 52BDD18BDA6D; Sat, 27 Nov 2021 08:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J1QNF1wQ7z4kWY; Sat, 27 Nov 2021 08:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02950191DD; Sat, 27 Nov 2021 08:52: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 1AR8qCWT082927; Sat, 27 Nov 2021 08:52:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AR8qClJ082926; Sat, 27 Nov 2021 08:52:12 GMT (envelope-from git) Date: Sat, 27 Nov 2021 08:52:12 GMT Message-Id: <202111270852.1AR8qClJ082926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 45a19f61218b - stable/12 - ds1307: allow configuration via hints on FDT-based systems List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 45a19f61218b4072db9a327df5a7f176b6955163 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638003133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jk+XpJe4f4TizzdYgr7ReG4mhE5Zmpro5CmMDJFT5Rg=; b=PIiH9qlYSkeWPE2SLUUk9jF/G+5t0A8YBozRMnWsBU8+uyUKVGteptQU09IvPiMrRo5q0F BVszt4LSwNvAs17v1tdX59dKnJ9GQYr/skaD2p13AZJVxthHkU6TdEePDumI+GSHo/PFtR AU8Aq6VyCp9qE5k2d7f89X8MIAsxRxZm0ZgfQmGWoHSn8KIlFTeYq/pU8Ol9xeN5+dWVP3 X2aOvillBoR/Ma6RPSNMgtUMa+y9oXWFNvlPaBLtiRfMbNB2M8d05p1rIrb3xIumHvRYmC vTaUWX7TJzeG7cLh8VeyoS7Jo4vHHmSz7hl26JxQj1mlp/fR+hF1V84UkUFAaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638003133; a=rsa-sha256; cv=none; b=VsNtxUzIiDBGwGaEfObn2IjCOB1ZfaTQFw+zD9MVKW4HVsVF5R0yClDkgb4rKxjqHEKL5/ kI6itL9ec5/RniAPvnZxTZQtjJ2LPiArDgVEZ6qYISs1KUcORtAkGsZsgUE3w3pFEF/AIm Tm3bkPB5dqXvqwMQucgDnZesD6nCX8xTnHsXbbNHdULW3ICIm5GCAM9WO15EP2JiZVMEdB FsJ/cfXe2JT86sJ34PTEhoZm6iivGO8GxD6nXiwNlpQPXMBrM7QiU9lFrRVE1O25omJRbr FL9dMmJlEhzIeRh35q/LpQGnAwb6A5Es53uz1HuQVXYuWYleTbCu08RVZV1BpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=45a19f61218b4072db9a327df5a7f176b6955163 commit 45a19f61218b4072db9a327df5a7f176b6955163 Author: Andriy Gapon AuthorDate: 2021-11-04 11:55:35 +0000 Commit: Andriy Gapon CommitDate: 2021-11-27 08:46:31 +0000 ds1307: allow configuration via hints on FDT-based systems On-board devices should be configured via the FDT and overlays. Hints are primarily useful for external and temporarily attached devices. Adding hints is much easier and faster than writing and compiling an overlay. (cherry picked from commit 27645265c4e49ad7eaa25847a280307acb138da8) --- sys/dev/iicbus/ds1307.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/dev/iicbus/ds1307.c b/sys/dev/iicbus/ds1307.c index 7bab7e78c0d8..47f47bb07f5e 100644 --- a/sys/dev/iicbus/ds1307.c +++ b/sys/dev/iicbus/ds1307.c @@ -216,18 +216,13 @@ ds1307_probe(device_t dev) return (ENXIO); compat = ofw_bus_search_compatible(dev, ds1307_compat_data); - - if (compat->ocd_str == NULL) - return (ENXIO); - - device_set_desc(dev, (const char *)compat->ocd_data); - - return (BUS_PROBE_DEFAULT); -#else + if (compat->ocd_str != NULL) { + device_set_desc(dev, (const char *)compat->ocd_data); + return (BUS_PROBE_DEFAULT); + } +#endif device_set_desc(dev, "Maxim DS1307 RTC"); - return (BUS_PROBE_NOWILDCARD); -#endif } static int From nobody Sat Nov 27 08:52:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B084918BDB6C; Sat, 27 Nov 2021 08:52: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 4J1QNG3x4Lz4kdy; Sat, 27 Nov 2021 08:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 137711928D; Sat, 27 Nov 2021 08:52: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 1AR8qDfQ082956; Sat, 27 Nov 2021 08:52:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AR8qD9F082955; Sat, 27 Nov 2021 08:52:13 GMT (envelope-from git) Date: Sat, 27 Nov 2021 08:52:13 GMT Message-Id: <202111270852.1AR8qD9F082955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: ad5904ec5913 - stable/12 - icee: allow configuration via hints on FDT-based systems List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ad5904ec59133b0ab47383b0868eca33cf17b61b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638003134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PKKY8lCqUsrZ81+uzfAVXl9CWoCwYro4RXQ51iWJuzQ=; b=qmj1FkuZMFfXqg/RXH8QR9pshaQg2k+Htdx5WhB5WOYdRpW6EOxjsykktv2OKAnDGkKWht 5n/wJFDKBe2g6300PwJaHbk4rarqWAFr9LFcOjtvaDEA89806skUXQun6IPbRAfKRejiW4 dCcGQFxAiQu2f9Bi/l8wfzCINPa+3ib9DuzkFL9kWbLqtFFGYRO6CTUnv2WxpR9jj4fBiP QIGv9sS2TdbhvwSKmbQGuZys3eNbWtZF5699VVidvG+X3jF63KoFSf3PgItfZQGIFN/muh RUmK6fj8W3xbaaWADZyDy//AECS8EfcJqz/erCQViyD+n1PBEOxpOvAygYHIkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638003134; a=rsa-sha256; cv=none; b=gSiWoRRgJpcsQQjdBOgmXvNNsVk9awuayjKXlxHVZIbCZt/VFJMkRmE+agAPU9Nd8w8hwT /xQW4kF03dvR3DscSyUG6hs8Eph96L2OYk/b2JXP4pazxE5jAKkoXPBN92eCT8HV0zFiEC ymQqmjO3ug2/3R5EpGPuWbfeywy2Nk69424CVgfdgjRDy08BLIHg21mHpgKEm1eTg5HFd3 hdcQHV9hJ0fr8P6ys645KuD8IBMUzO92p7PbyyqQz1K5g4aCL1YsT2z7jVm64154pS/DWp rj32kIVrKnNSjRdJWGYV7A/Q7gLbBM3PLfGiXaxB44B7nGvOXS2jZdEBcDNm8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=ad5904ec59133b0ab47383b0868eca33cf17b61b commit ad5904ec59133b0ab47383b0868eca33cf17b61b Author: Andriy Gapon AuthorDate: 2021-11-04 11:56:22 +0000 Commit: Andriy Gapon CommitDate: 2021-11-27 08:48:59 +0000 icee: allow configuration via hints on FDT-based systems On-board devices should be configured via the FDT and overlays. Hints are primarily useful for external and temporarily attached devices. Adding hints is much easier and faster than writing and compiling an overlay. (cherry picked from commit 01e3492337cb48484e03be38340cc67ac5e30a5b) --- sys/dev/iicbus/icee.c | 64 +++++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/sys/dev/iicbus/icee.c b/sys/dev/iicbus/icee.c index 0f6ab4d0700a..bc2bd7338d1a 100644 --- a/sys/dev/iicbus/icee.c +++ b/sys/dev/iicbus/icee.c @@ -128,10 +128,10 @@ static struct cdevsw icee_cdevsw = .d_write = icee_write }; -#ifdef FDT static int icee_probe(device_t dev) { +#ifdef FDT struct eeprom_desc *d; if (!ofw_bus_status_okay(dev)) @@ -139,49 +139,42 @@ icee_probe(device_t dev) d = (struct eeprom_desc *) ofw_bus_search_compatible(dev, compat_data)->ocd_data; - if (d == NULL) - return (ENXIO); - - device_set_desc(dev, d->name); - return (BUS_PROBE_DEFAULT); -} - -static void -icee_init(struct icee_softc *sc) -{ - struct eeprom_desc *d; - - d = (struct eeprom_desc *) - ofw_bus_search_compatible(sc->dev, compat_data)->ocd_data; - if (d == NULL) - return; /* attach will see sc->size == 0 and return error */ - - sc->size = d->size; - sc->type = d->type; - sc->wr_sz = d->wr_sz; -} -#else /* !FDT */ -static int -icee_probe(device_t dev) -{ - + if (d != NULL) { + device_set_desc(dev, d->name); + return (BUS_PROBE_DEFAULT); + } +#endif device_set_desc(dev, "I2C EEPROM"); return (BUS_PROBE_NOWILDCARD); } -static void +static int icee_init(struct icee_softc *sc) { const char *dname; int dunit; +#ifdef FDT + struct eeprom_desc *d; + d = (struct eeprom_desc *) + ofw_bus_search_compatible(sc->dev, compat_data)->ocd_data; + if (d != NULL) { + sc->size = d->size; + sc->type = d->type; + sc->wr_sz = d->wr_sz; + return (0); + } +#endif dname = device_get_name(sc->dev); dunit = device_get_unit(sc->dev); - resource_int_value(dname, dunit, "size", &sc->size); - resource_int_value(dname, dunit, "type", &sc->type); - resource_int_value(dname, dunit, "wr_sz", &sc->wr_sz); + if (resource_int_value(dname, dunit, "type", &sc->type) != 0) + return (ENOENT); + if (resource_int_value(dname, dunit, "size", &sc->size) != 0) + return (ENOENT); + if (resource_int_value(dname, dunit, "wr_sz", &sc->wr_sz) != 0) + return (ENOENT); + return (0); } -#endif /* FDT */ static int icee_attach(device_t dev) @@ -192,13 +185,8 @@ icee_attach(device_t dev) sc->dev = dev; sc->addr = iicbus_get_addr(dev); - icee_init(sc); - if (sc->size == 0 || sc->type == 0 || sc->wr_sz == 0) { - device_printf(sc->dev, "Missing config data, " - "these cannot be zero: size %d type %d wr_sz %d\n", - sc->size, sc->type, sc->wr_sz); + if (icee_init(sc) != 0) return (EINVAL); - } if (bootverbose) device_printf(dev, "size: %d bytes, addressing: %d-bits\n", sc->size, sc->type); From nobody Sat Nov 27 09:22:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E0EE418A37C8; Sat, 27 Nov 2021 09:22:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4J1R3D4FPxz4tF2; Sat, 27 Nov 2021 09:22:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1AR9MOjt024235 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 27 Nov 2021 11:22:27 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1AR9MOjt024235 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1AR9MOa5024234; Sat, 27 Nov 2021 11:22:24 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 27 Nov 2021 11:22:24 +0200 From: Konstantin Belousov To: Wei Hu Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 75412a521f60 - main - Hyper-V: vPCI: Prepopulate device bars Message-ID: References: <202111270655.1AR6tslh023868@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: <202111270655.1AR6tslh023868@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4J1R3D4FPxz4tF2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Sat, Nov 27, 2021 at 06:55:54AM +0000, Wei Hu wrote: > The branch main has been updated by whu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=75412a521f60d4b0393c730ffb284e7c6ff9d2de > > commit 75412a521f60d4b0393c730ffb284e7c6ff9d2de > Author: Wei Hu > AuthorDate: 2021-11-27 06:42:34 +0000 > Commit: Wei Hu > CommitDate: 2021-11-27 06:42:34 +0000 > > Hyper-V: vPCI: Prepopulate device bars > > In recent Hyper-V releases on Windows Server 2022, vPCI code does not > initialize the last 4 bit of device bar registers. This behavior change > could result weird problems cuasing PCI code failure when configuring > bars. > > Just write all 1's to those bars whose probed values are not the same > as current read ones. This seems to make Hyper-V vPCI and > pci_write_bar() to cooperate correctly on these releases. Could you please elaborate both on the problem and on the solution more? It really makes not a lot of sense to me. Four low bits of BARs are space indicator, and for memory bar, 32/64 bitness and prefetch bit. It is some magic that, following your description, these values are wrong but writing 1's to them validate the value. Were other OSes affected by the bug? Do they use the same workaround? > > Reported by: khng@freebsd.org > Tested by: khng@freebsd.org > MFC after: 2 weeks > Sponsored by: Microsoft > --- > sys/dev/hyperv/pcib/vmbus_pcib.c | 43 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 43 insertions(+) > > diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c > index 72e430c946db..c7df32044678 100644 > --- a/sys/dev/hyperv/pcib/vmbus_pcib.c > +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c > @@ -1356,6 +1356,47 @@ _hv_pcifront_write_config(struct hv_pci_dev *hpdev, int where, int size, > } > } > > +/* > + * The vPCI in some Hyper-V releases do not initialize the last 4 > + * bit of BAR registers. This could result weird problems causing PCI > + * code fail to configure BAR correctly. > + * > + * Just write all 1's to those BARs whose probed values are not zero. > + * This seems to make the Hyper-V vPCI and pci_write_bar() to cooperate > + * correctly. > + */ > + > +static void > +vmbus_pcib_prepopulate_bars(struct hv_pcibus *hbus) > +{ > + struct hv_pci_dev *hpdev; > + int i; > + > + mtx_lock(&hbus->device_list_lock); > + TAILQ_FOREACH(hpdev, &hbus->children, link) { > + for (i = 0; i < 6; i++) { > + /* Ignore empty bar */ > + if (hpdev->probed_bar[i] == 0) > + continue; > + > + uint32_t bar_val = 0; > + > + _hv_pcifront_read_config(hpdev, PCIR_BAR(i), > + 4, &bar_val); > + > + if (hpdev->probed_bar[i] != bar_val) { > + if (bootverbose) > + printf("vmbus_pcib: initialize bar %d " > + "by writing all 1s\n", i); > + > + _hv_pcifront_write_config(hpdev, PCIR_BAR(i), > + 4, 0xffffffff); > + } > + } > + } > + mtx_unlock(&hbus->device_list_lock); > +} > + > static void > vmbus_pcib_set_detaching(void *arg, int pending __unused) > { > @@ -1479,6 +1520,8 @@ vmbus_pcib_attach(device_t dev) > if (ret) > goto vmbus_close; > > + vmbus_pcib_prepopulate_bars(hbus); > + > hbus->pci_bus = device_add_child(dev, "pci", -1); > if (!hbus->pci_bus) { > device_printf(dev, "failed to create pci bus\n"); From nobody Sat Nov 27 10:57:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DBCE118B0BA7; Sat, 27 Nov 2021 10:57: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 4J1T8v2z1zz3rJD; Sat, 27 Nov 2021 10:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 465181AAC9; Sat, 27 Nov 2021 10:57: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 1ARAvZaG043080; Sat, 27 Nov 2021 10:57:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ARAvZAH043079; Sat, 27 Nov 2021 10:57:35 GMT (envelope-from git) Date: Sat, 27 Nov 2021 10:57:35 GMT Message-Id: <202111271057.1ARAvZAH043079@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: 7184e8c21107 - main - Keep running fsck_ffs as long as "WAS MODIFIED" is reported List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7184e8c211074db57865adabf41a08a50d155582 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638010655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MmsWKELms284eJ6saF7EOO02J3sbq844Uuz/Shif6+I=; b=h+KNH3ugmiJgGzzF9jPd21ABa6Z8+KZlKmDzs/Fg2Bjvc6zdCR8/iWw140RwGXwRZMrhiK ou+AAQXrrUVuDNoDdK6Akf6/DH1UkIGiAIeLNuXPIYHV6TxBupLEESJJ65s+jog38SPkoc lPNPsharHOIwAUaIOH+SAfqe1BR31XUIyCq3AKZS+CQxpol0PPQGUut/xiYGymF0nfDRhW SASASFl1X9e9wCkO7qdn8xoHgn7vfEjv7OpDvcWXnvHTLgtKogL9B2s+2tLzxXgyjuRT5S UaRXFMCaRlqCwVnCv2fChCQpEvQA8+GsB/ynoqPWEQUXyx9YXtdTGZ4oMLVHSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638010655; a=rsa-sha256; cv=none; b=rvWaGNCkl9WtO2m5RBnWrwgOwg2D0RRQjrJ3Lo4/Epq+I91sbM86D4+Z77DzS3vMGzbJxx lizTm+Cs/0roYaEf+tvaM6NQsooY2lfw3ZnaNzlHRlZD5MBslu/1FAwtFa/axTii5BrFBr m04/kiezbAQe+v3b8JCe6yqh+6jS8djmDJ7RfIwvCsk4sJ8qCpzBKl+enluqfN1RpMotbg ix6g/k2p7QjCmKatRYmQKSallykZBJiUZcLXajwtZq2wUTZXA4zwcu9GCEZLN7tu7W+w8s B/UiJluu8EBQubMBUpjqZYpqaDmZFPMeVBU/zXiL5+RvliAWSMduZ6+FqbGyUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=7184e8c211074db57865adabf41a08a50d155582 commit 7184e8c211074db57865adabf41a08a50d155582 Author: Peter Holm AuthorDate: 2021-11-27 10:54:53 +0000 Commit: Peter Holm CommitDate: 2021-11-27 10:54:53 +0000 Keep running fsck_ffs as long as "WAS MODIFIED" is reported --- tools/test/stress2/misc/fsck.sh | 79 ++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 33 deletions(-) diff --git a/tools/test/stress2/misc/fsck.sh b/tools/test/stress2/misc/fsck.sh index a007e722988e..826c31f733c3 100755 --- a/tools/test/stress2/misc/fsck.sh +++ b/tools/test/stress2/misc/fsck.sh @@ -27,14 +27,15 @@ # SUCH DAMAGE. # -# fsck_ffs(8) test. +# fsck_ffs(8) disk image fuzz test. + # "UFS /dev/md11 (/mnt11) cylinder checksum failed" seen. # Fixed by r341510. # 'panic: invalid counts on struct mount' seen: # https://people.freebsd.org/~pho/stress/log/fsck-4.txt -[ $DEBUG ] || exit 0 # Still WiP +# "panic: softdep_load_inodeblock: negative i_effnlink" seen. . ../default.cfg @@ -42,11 +43,6 @@ cc -o /tmp/flip -Wall -Wextra -O2 ../tools/flip.c || exit 1 -echo 'int sync(void) { return (0); }' > /tmp/fsck_preload.c -mycc -o /tmp/fsck_preload.so -shared -fpic /tmp/fsck_preload.c || exit 1 -cc -o /tmp/fsck_preload.so -shared -fpic /tmp/fsck_preload.c || exit 1 -rm /tmp/fsck_preload.c - set -e u1=$mdstart u2=$((mdstart + 1)) @@ -69,7 +65,7 @@ set +e mount | grep "on $mp1 " | grep -q /dev/md && umount -f $mp1 [ -c /dev/md$u1 ] && mdconfig -d -u $u1 mdconfig -a -t swap -s 1g -u $u1 -newfs $newfs_flags /dev/md$u1 > /dev/null +newfs $newfs_flags -n /dev/md$u1 > /dev/null mount /dev/md$u1 $mp1 [ -c /dev/md$u2 ] && mdconfig -d -u $u2 @@ -85,15 +81,16 @@ umount $mp2 chk() { local i - LD_PRELOAD=/tmp/fsck_preload.so \ - fsck_ffs -fy $1 > $log 2>&1 + clean=0 + rerun=0 + waccess=0 + fsck_ffs -fy $1 > $log 2>&1 r=$? if grep -qE "Cannot find file system superblock|Superblock check-hash failed" $log; then for b in $backups; do echo "Using alternate SB $b" asbs=$((asbs + 1)) - LD_PRELOAD=/tmp/fsck_preload.so \ - fsck_ffs -b $b -fy $1 > $log 2>&1 + fsck_ffs -b $b -fy $1 > $log 2>&1 r=$? grep -qE "Cannot find file system superblock|Superblock check-hash failed" $log || break @@ -103,47 +100,63 @@ chk() { usedasb=0 fi LANG=C egrep -q "[A-Z][A-Z]" $log && clean=0 - ! grep -Eq "IS CLEAN|MARKED CLEAN" $log; clean=$? - ! grep -q RERUN $log; rerun=$? - ! grep -q "NO WRITE ACCESS" $log; waccess=$? + grep -Eq "IS CLEAN|MARKED CLEAN" $log && clean=1 + # For now regard a "was modified" as a cause for a rerun, + # disregarding "clean" claim. + grep -Eq "WAS MODIFIED" $log && rerun=1 + grep -q RERUN $log && rerun=1 + grep -q "NO WRITE ACCESS" $log && waccess=1 [ $r -ne 0 -a $clean -eq 1 ] && echo "Exit code $r w/ clean == 1" - } -cd /tmp +cd $mp1 s=0 start=`date +%s` while [ $((`date +%s` - start)) -lt 60 ]; do - gzip < $diskimage > $backup - fsync $backup; sync # ; sleep .2; sync; sleep .2; sync mount /dev/md$u2 $mp2 || { s=101; break; } + ls -lR $mp2 > /dev/null || { s=102; echo "ls failed"; break; } touch $mp2/`jot -rc 8 a z | tr -d '\n'` - umount $mp2 - /tmp/flip -n 4 $diskimage + while mount | grep -q "on $mp2 "; do umount $mp2; done + echo * | grep -q core && break + sync + mdconfig -d -u $u2 + /tmp/flip -n 10 $diskimage + + sync + gzip < $diskimage > $backup + fsync $backup + for i in `jot 3`; do - chk /dev/md$u2 - [ $clean -eq 1 ] && { cleans=$((cleans + 1)); break; } + chk $diskimage [ $rerun -eq 1 ] && { reruns=$((reruns + 1)); continue; } + [ $clean -eq 1 ] && { cleans=$((cleans + 1)); break; } + [ -f fsck_ffs.core ] && + { cp $diskimage \ + /tmp/fsck_ffs.core.diskimage.`date +%Y%m%dT%H%M%S`; break 2; } done + [ $clean -ne 1 ] && break + mdconfig -a -t vnode -f $diskimage -u $u2 [ $r -ne 0 -a $clean -eq 1 ] && { echo "CLEAN && non zero exit code"; break; } [ $clean -eq 1 ] && continue - [ $usedasb -eq 1 ] && { echo "Alt. SB failed"; s=103; } - [ $waccess -eq 1 ] && { echo "No write access"; s=555; } + [ $usedasb -eq 1 ] && { echo "Alt. SB failed"; s=104; } + [ $waccess -eq 1 ] && { echo "No write access"; s=105; } break done -[ $DEBUG ] && - echo "$cleans cleans, $reruns reruns, $asbs alternate SBs." && cat $log +mount | grep -q "on $mp2 " && umount $mp2 +mdconfig -d -u $u2 || exit 1 + +echo "$cleans cleans, $reruns reruns, $asbs alternate SBs." if [ $clean -ne 1 ]; then echo "FS still not clean. Last fsck_ffs exit code was $r." cat $log - cp -v $log /tmp || rm $log - [ $s -eq 0 ] && s=104 + cp -v $log /tmp + [ $s -eq 0 ] && s=106 fi -mdconfig -d -u $u2 || exit 1 -[ -f fsck_ffs.core ] && ls -l fsck_ffs.core - +echo * | grep -q core && { ls -l *.core; cp $log /tmp; exit 106; } || + rm -f $backup +cd /tmp umount $mp1 mdconfig -d -u $u1 -rm -f /tmp/fsck_preload.so $backup /tmp/flip +rm -f /tmp/flip exit $s From nobody Sat Nov 27 21:28:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 89E6418BBCD6; Sat, 27 Nov 2021 21:28: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 4J1l931zT8z4V3H; Sat, 27 Nov 2021 21:28:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2329C22F8E; Sat, 27 Nov 2021 21:28: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 1ARLSdQF081944; Sat, 27 Nov 2021 21:28:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ARLSd1N081943; Sat, 27 Nov 2021 21:28:39 GMT (envelope-from git) Date: Sat, 27 Nov 2021 21:28:39 GMT Message-Id: <202111272128.1ARLSd1N081943@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: 228e020a3b61 - main - Correct syscons description in i386 and amd64 configs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 228e020a3b6142bef17cfeb86cf06f1fd1f4f1fc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638048519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEpYd//s6t2e6O6jleKW17seuqWUoPjTY2MtYqrcrKE=; b=w2Qj9oy/rgW+uQe5JKq7TRsH4sXklCwJpDOJrytlNXtCUpOTFx6pGoiPJveI71Ecl8WIMp unOKBq3O+tSOT6qgmUeikHKvMfFzSE/e41d0g4tKkjp75+C1dbWGO1otGgClKVaEBz47SJ OFDimEswnUzrweZO80uR71qepeshYZ1ybJm+zVfgTncFN1qG6IzgW7oOiHp7RML647XSZK RgOb2srWetjua5YisdsxnZL2az14yLiIFPUmJR14i+pqBDGZPrJkirj8XCBtMbSXQm0Ub1 B3elg6DtOeQ9g/YSaz4j9PSf4/MVFGO32kP2PlrAt1rEPZqAULTpFHoYhQydqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638048519; a=rsa-sha256; cv=none; b=gUrFmfd6YgK8RTB3AyW9yRIXEs16ej1EpY8faN6LTkEXjVAoPeiixzrL/6uBZDOgjsYxuo DrSkx44m7TgW/4pTLzOayHALuYabCAfE702wPKS3nLrra+u+dMSovfyxbjEDVkojoEICAm QPGkphOsgdw/ug1/x8sbkP/76iUAuAzsqhEQwisme5adYQ8a79QVAYeVyYjd7CQki5CPy1 tZDFXQGEIH+sqNsXGlQ5Jmnn8DI7c4nURQeYAwBk5nJGyByadBklpKLNSibfdcxxggvKkw fCc0U9eUQsavvA8HZgtaBZMHqFwepE7Z17VL4HjjI1CmTihyCuVy+219a1Ewhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=228e020a3b6142bef17cfeb86cf06f1fd1f4f1fc commit 228e020a3b6142bef17cfeb86cf06f1fd1f4f1fc Author: Ed Maste AuthorDate: 2021-11-27 21:15:41 +0000 Commit: Ed Maste CommitDate: 2021-11-27 21:22:42 +0000 Correct syscons description in i386 and amd64 configs Commit 2d6f6d63733d switched to vt(4) as the default console. Sponsored by: The FreeBSD Foundation --- sys/amd64/conf/GENERIC | 4 ++-- sys/amd64/conf/MINIMAL | 4 ++-- sys/i386/conf/GENERIC | 4 ++-- sys/i386/conf/MINIMAL | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 60d2d0376aac..2732569c461c 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -217,11 +217,11 @@ options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support -# syscons is the default console driver, resembling an SCO console +# syscons is the legacy console driver, resembling an SCO console device sc options SC_PIXEL_MODE # add support for the raster text mode -# vt is the new video console driver +# vt is the default video console driver device vt device vt_vga device vt_efifb diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index 14c07c0f04b6..decf092661a5 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -109,11 +109,11 @@ options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support -# syscons is the default console driver, resembling an SCO console +# syscons is the legacy console driver, resembling an SCO console device sc options SC_PIXEL_MODE # add support for the raster text mode -# vt is the new video console driver +# vt is the default video console driver device vt device vt_vga device vt_efifb diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index b5ed7848f853..e3f1aee8c723 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -186,11 +186,11 @@ options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support -# syscons is the default console driver, resembling an SCO console +# syscons is the legacy console driver, resembling an SCO console device sc options SC_PIXEL_MODE # add support for the raster text mode -# vt is the new video console driver +# vt is the default video console driver device vt device vt_vga device vt_vbefb diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index 0aa6dff54b50..ba9c05bf8265 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -120,11 +120,11 @@ options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support -# syscons is the default console driver, resembling an SCO console +# syscons is the legacy console driver, resembling an SCO console device sc options SC_PIXEL_MODE # add support for the raster text mode -# vt is the new video console driver +# vt is the default video console driver device vt device vt_vga device vt_efifb From nobody Sat Nov 27 23:05:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 58E8118A081A; Sat, 27 Nov 2021 23:05: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 4J1nJv0VPfz3GNk; Sat, 27 Nov 2021 23:05:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1752244ED; Sat, 27 Nov 2021 23:05: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 1ARN5Yh5015203; Sat, 27 Nov 2021 23:05:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ARN5YtK015202; Sat, 27 Nov 2021 23:05:34 GMT (envelope-from git) Date: Sat, 27 Nov 2021 23:05:34 GMT Message-Id: <202111272305.1ARN5YtK015202@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: 1c15c8c0e935 - main - nfscl: Sanity check the Sequence slotid in reply List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1c15c8c0e935f3f7def7b03e9546f7d6790f465e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638054335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FiKIWHng59RDF781C3QBiEUCA155bLfTeRvYyEDsiZE=; b=KDPegnPzlmQXrl0UPzlRf4N2dldTigyluBjf8t/XSqdcwai7CzY4gUQlVZjb2m1Jr5Ceh+ BPnvnOmgjl1UIqMptL6zBJGoYp9iin6a3ZpdxxVSc9wJvb3MyJgMcaXmOUzM2jGQT7yHuQ CUEp6lX1RmkJt8T9YcO38WYry0K8xjubxQ5a9B59MpK9SjsWETFm4fTeVwmGBnJX7mQuAa +pfF+HZA6Y8SdldbUFGmP2I3be2WuqtqvZKsx18Os5bqvX5EQywuVknuO5egUiGBDuYw+z 4UpYv2BNOJXeQAQgIBwXDLCUkpmjxOY64I9c5BrgzNhsf/Bv+6zJBQsa9P62mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638054335; a=rsa-sha256; cv=none; b=ya6A/KDpAgh77UHFvQlx5J84pPH3IGI6vM9+NhNJ/F5n4JmAHZGEEz3iQC+FbgHvpOx+0A g95tpU6ZtH3ROB09OwhoG4fcw07TxF0nh1VnYubUJKxNitivD9+SflXIaOlKj03PNr4cpF kClWEUMWGgkmN/CNT1agQiFI80yCC0v39bL5tSbTibh0hFlmfqkZdIVsviULdGop30RY2P Jb6wZNWuJ9QzGlUzFyiXof+r1eoGqaNSsm7+Eh9+gbrCkKotHqMJ/BznDoA/1cm4zpGDQj 1BZcaAcX+UnifueEZft7sqmTl6ousIQOs2/x9hWAHVd1j4VQ6lnXMVT+lesljw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=1c15c8c0e935f3f7def7b03e9546f7d6790f465e commit 1c15c8c0e935f3f7def7b03e9546f7d6790f465e Author: Rick Macklem AuthorDate: 2021-11-27 23:02:04 +0000 Commit: Rick Macklem CommitDate: 2021-11-27 23:02:04 +0000 nfscl: Sanity check the Sequence slotid in reply The slotid in the Sequence reply must be the same as in the request. Check that it is the same and log a console message if it is not, plus set it to the correct value. Reported by: rtm@lcs.mit.edu Tested by: rtm@lcs.mit.edu PR: 260071 MFC after: 2 weeks --- sys/fs/nfs/nfs_commonkrpc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index c1a5fab2a358..4d8db64f419f 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1038,6 +1038,18 @@ tryagain: tl += NFSX_V4SESSIONID / NFSX_UNSIGNED; retseq = fxdr_unsigned(uint32_t, *tl++); slot = fxdr_unsigned(int, *tl++); + if ((nd->nd_flag & ND_HASSLOTID) != 0) { + if (slot != nd->nd_slotid) { + printf("newnfs_request:" + " Wrong session " + "slot=%d\n", slot); + slot = nd->nd_slotid; + } + } else if (slot != 0) { + printf("newnfs_request: Bad " + "session slot=%d\n", slot); + slot = 0; + } freeslot = slot; if (retseq != sep->nfsess_slotseq[slot]) printf("retseq diff 0x%x\n", From nobody Sat Nov 27 23:19:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 76D9818A8EE9; Sat, 27 Nov 2021 23:19: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 4J1nd00cvkz3Lrk; Sat, 27 Nov 2021 23:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E50ED24267; Sat, 27 Nov 2021 23: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 1ARNJVE8028433; Sat, 27 Nov 2021 23: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 1ARNJVHf028432; Sat, 27 Nov 2021 23:19:31 GMT (envelope-from git) Date: Sat, 27 Nov 2021 23:19:31 GMT Message-Id: <202111272319.1ARNJVHf028432@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: 4dcdf3987c1c - main - vfs: replace the MNTK_TEXT_REFS flag with VIRF_TEXT_REF List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4dcdf3987c1cc95d0d344468e8aa15452254691c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638055172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3PSoMdHoTozDrCUFM7o6ptKZPuhsEhmSiMNEyYZx8iY=; b=YjUv2l/3faKUY4A3yu8DkvlyGZKqPNLJehuAPyEfiqOvJJP9WnLXRd7VkoPr6dAz79sBcC FaBrt19GhBcA0COscQp9resSo27LxWZOXpwxrS3cdBnrkyOWCXOQXwrKwVbiQWQQmJp00e Hr1dVT3PSUjXJlzmcKcebnQU4sDs1rHOhG2qml7QvMKM7VnTisF/wBSQvDoe5MZ2SPSWht dL8Z6ToTyaDODaXR3prUc3iDSAvCosBul2TA83rFR2awUAfjUg9JR9pFE+XfCwsC3uRyAl geaKMaIo0S9j7vjOVjJxjGaiS9DRm7vaktqZe8aYe2TCaLeFesXWV77KTokFeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638055172; a=rsa-sha256; cv=none; b=EUip8+pih379+shlzOKwd8KmigaK2RXc/BlE34eh54CZ+BrSPRt6sVskyv9OBegJr/Z5WM fBELgoskhWuxiI5w8qyZ7TVxFnqxJLu0Y1sIn8uFchvYd1k9FJ4uIoi6TTJjaskhjqBprL ZjECJG/JskanuvoanDcPDNSraUnrXX5DcsQtqiyhz5cGErLGGBSy+WuDGyezCOPcDSy+qS bgNOxr8DQ9XUsk6iz9ThuBd/1zFpDqPiusC2Sx8VAs7Jh+9THogVLgJMvlRcoxRCOJ1xYl h+rDCVmYE7zx/hq0JkP54jVltSfbgk7m9QJW8HTB+I9zmtG60yVEF2Umb29rJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4dcdf3987c1cc95d0d344468e8aa15452254691c commit 4dcdf3987c1cc95d0d344468e8aa15452254691c Author: Mateusz Guzik AuthorDate: 2021-05-18 10:47:21 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-27 23:07:25 +0000 vfs: replace the MNTK_TEXT_REFS flag with VIRF_TEXT_REF This allows to stop maintaing the VI_TEXT_REF flag and consequently opens up fully lockless v_writecount adjustment. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D33127 --- sys/fs/tmpfs/tmpfs_subr.c | 2 +- sys/fs/tmpfs/tmpfs_vfsops.c | 2 +- sys/kern/vfs_default.c | 20 +++++++++----------- sys/kern/vfs_subr.c | 8 ++++---- sys/sys/mount.h | 2 +- sys/sys/vnode.h | 3 ++- 6 files changed, 18 insertions(+), 19 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 9810c1776314..41d9b6d5dcca 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -967,7 +967,7 @@ loop: vp->v_object = object; object->un_pager.swp.swp_tmpfs = vp; vm_object_set_flag(object, OBJ_TMPFS); - vn_irflag_set_locked(vp, VIRF_PGREAD); + vn_irflag_set_locked(vp, VIRF_PGREAD | VIRF_TEXT_REF); VI_UNLOCK(vp); VM_OBJECT_WUNLOCK(object); break; diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index b8ecedbb0348..7bd44decd830 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -469,7 +469,7 @@ tmpfs_mount(struct mount *mp) MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED | - MNTK_TEXT_REFS | MNTK_NOMSYNC; + MNTK_NOMSYNC; if (!nonc && (mp->mnt_flag & MNT_UNION) == 0) mp->mnt_kern_flag |= MNTK_FPLOOKUP; MNT_IUNLOCK(mp); diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 50829ad3044e..1f5869bd8cf3 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -1300,7 +1300,6 @@ int vop_stdset_text(struct vop_set_text_args *ap) { struct vnode *vp; - struct mount *mp; int error, n; vp = ap->a_vp; @@ -1326,12 +1325,10 @@ vop_stdset_text(struct vop_set_text_args *ap) * If requested by fs, keep a use reference to the * vnode until the last text reference is released. */ - mp = vp->v_mount; - if (mp != NULL && (mp->mnt_kern_flag & MNTK_TEXT_REFS) != 0 && - vp->v_writecount == 0) { - VNPASS((vp->v_iflag & VI_TEXT_REF) == 0, vp); - vp->v_iflag |= VI_TEXT_REF; - vrefl(vp); + if ((vn_irflag_read(vp) & VIRF_TEXT_REF) != 0) { + if (vp->v_writecount == 0) { + vrefl(vp); + } } atomic_subtract_int(&vp->v_writecount, 1); @@ -1366,11 +1363,12 @@ vop_stdunset_text(struct vop_unset_text_args *ap) last = false; VI_LOCK(vp); if (vp->v_writecount < 0) { - if ((vp->v_iflag & VI_TEXT_REF) != 0 && - vp->v_writecount == -1) { - last = true; - vp->v_iflag &= ~VI_TEXT_REF; + if ((vn_irflag_read(vp) & VIRF_TEXT_REF) != 0) { + if (vp->v_writecount == -1) { + last = true; + } } + atomic_add_int(&vp->v_writecount, 1); error = 0; } else { diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 65a9ebf304fe..06ca5dc7d93a 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4122,7 +4122,9 @@ vn_printf(struct vnode *vp, const char *fmt, ...) strlcat(buf, "|VIRF_PGREAD", sizeof(buf)); if (irflag & VIRF_MOUNTPOINT) strlcat(buf, "|VIRF_MOUNTPOINT", sizeof(buf)); - flags = irflag & ~(VIRF_DOOMED | VIRF_PGREAD | VIRF_MOUNTPOINT); + if (irflag & VIRF_TEXT_REF) + strlcat(buf, "|VIRF_TEXT_REF", sizeof(buf)); + flags = irflag & ~(VIRF_DOOMED | VIRF_PGREAD | VIRF_MOUNTPOINT | VIRF_TEXT_REF); if (flags != 0) { snprintf(buf2, sizeof(buf2), "|VIRF(0x%lx)", flags); strlcat(buf, buf2, sizeof(buf)); @@ -4163,8 +4165,6 @@ vn_printf(struct vnode *vp, const char *fmt, ...) snprintf(buf2, sizeof(buf2), "|VV(0x%lx)", flags); strlcat(buf, buf2, sizeof(buf)); } - if (vp->v_iflag & VI_TEXT_REF) - strlcat(buf, "|VI_TEXT_REF", sizeof(buf)); if (vp->v_iflag & VI_MOUNT) strlcat(buf, "|VI_MOUNT", sizeof(buf)); if (vp->v_iflag & VI_DOINGINACT) @@ -4175,7 +4175,7 @@ vn_printf(struct vnode *vp, const char *fmt, ...) strlcat(buf, "|VI_DEFINACT", sizeof(buf)); if (vp->v_iflag & VI_FOPENING) strlcat(buf, "|VI_FOPENING", sizeof(buf)); - flags = vp->v_iflag & ~(VI_TEXT_REF | VI_MOUNT | VI_DOINGINACT | + flags = vp->v_iflag & ~(VI_MOUNT | VI_DOINGINACT | VI_OWEINACT | VI_DEFINACT | VI_FOPENING); if (flags != 0) { snprintf(buf2, sizeof(buf2), "|VI(0x%lx)", flags); diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 1863a36738d1..d47d67f1156b 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -489,7 +489,7 @@ struct mntoptnames { #define MNTK_LOOKUP_EXCL_DOTDOT 0x00000800 #define MNTK_UNMAPPED_BUFS 0x00002000 #define MNTK_USES_BCACHE 0x00004000 /* FS uses the buffer cache. */ -#define MNTK_TEXT_REFS 0x00008000 /* Keep use ref for text */ +#define MNTK_UNUSED0 0x00008000 /* unused */ #define MNTK_VMSETSIZE_BUG 0x00010000 #define MNTK_UNIONFS 0x00020000 /* A hack for F_ISUNIONSTACK */ #define MNTK_FPLOOKUP 0x00040000 /* fast path lookup is supported */ diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index c84d015b011c..53b0a45064b9 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -251,8 +251,9 @@ struct xvnode { #define VIRF_PGREAD 0x0002 /* Direct reads from the page cache are permitted, never cleared once set */ #define VIRF_MOUNTPOINT 0x0004 /* This vnode is mounted on */ +#define VIRF_TEXT_REF 0x0008 /* Executable mappings ref the vnode */ -#define VI_TEXT_REF 0x0001 /* Text ref grabbed use ref */ +#define VI_UNUSED0 0x0001 /* unused */ #define VI_MOUNT 0x0002 /* Mount in progress */ #define VI_DOINGINACT 0x0004 /* VOP_INACTIVE is in progress */ #define VI_OWEINACT 0x0008 /* Need to call inactive */ From nobody Sat Nov 27 23:19:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C8B3118A9106; Sat, 27 Nov 2021 23:19: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 4J1nd10hLcz3Lwf; Sat, 27 Nov 2021 23:19:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E796E24538; Sat, 27 Nov 2021 23:19: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 1ARNJWhK028457; Sat, 27 Nov 2021 23:19:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ARNJW9c028456; Sat, 27 Nov 2021 23:19:32 GMT (envelope-from git) Date: Sat, 27 Nov 2021 23:19:32 GMT Message-Id: <202111272319.1ARNJW9c028456@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: e511bd1406fa - main - vfs: fully lockless v_writecount adjustment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e511bd1406fa35301e770aad05d1bfdc345c8639 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638055173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=07tqhZjfvf5KJw/b86tEYtIsV/5xLG7TYcj/MpwLOH0=; b=VDZzjRlB2iKPT9j7wFbgcduMlbYT/xZ5gWcUVk+H89UGAPfRYUAJXCb6+91WN4HpDV0l3V ufuGQHYsr4NR54dwGoOWXAvokI7P98QInlRLSeA+JxbcJkDsRREUHs1lOQX+4YwsCdGiPk YiAHz7FwKXteRMF14TkVG+bMnOJ8utkVZKV1/B3Oo0+2POkWktE1ZCJEDHqkOe1cNV0OnB vkXiAepSs+ufLW8DBKePBj5GVMFL5XF0KJK8aQOvpIHaVigqOEvmJTg7WHG4Tl0cIIeuq1 xQuUouMTCBypOKybiApn8TTqYg6dpC7zWfrODa7CXCkJJEzolAhaCWY90RrqTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638055173; a=rsa-sha256; cv=none; b=LuRqfhrSMtVXH/AITpH/Q7rhF6kXhfh5+xAqLamYPD7nK9s0Khtfz90M/cS4I28WB2Uy24 5rTIIBLY/eBYcF7fKvJwq3bJCxSHW0oxQ87WhcJjRGMHbL/i/2eSuMDe5mVlRqdtUGala/ h8aTb2uCtpvvGKI1l+uw6wnsS0xcKZe5jr0a9jDbEarwxo2nkYBg2vhUzvcIFQHdvV0FvC CEI9Qu81833c2mp/Tgd2Pgf8W3nbqg7wLZnpPgfT6N238i08pLJ1LRTpgRuxFsi7jFoouy iFMo6V2Q9LvFzQvUnm6YEdpF/9yORLITjrL7jq37l9VzBgwacQOCtTkHCzTeBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e511bd1406fa35301e770aad05d1bfdc345c8639 commit e511bd1406fa35301e770aad05d1bfdc345c8639 Author: Mateusz Guzik AuthorDate: 2021-11-26 12:33:28 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-27 23:07:26 +0000 vfs: fully lockless v_writecount adjustment Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D33128 --- sys/kern/vfs_default.c | 125 +++++++++++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 1f5869bd8cf3..6f304f0f719d 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -1293,91 +1293,86 @@ static int vop_stdis_text(struct vop_is_text_args *ap) { - return (ap->a_vp->v_writecount < 0); + return (atomic_load_int(&ap->a_vp->v_writecount) < 0); } int vop_stdset_text(struct vop_set_text_args *ap) { struct vnode *vp; - int error, n; + int n; + bool gotref; vp = ap->a_vp; - /* - * Avoid the interlock if execs are already present. - */ n = atomic_load_int(&vp->v_writecount); for (;;) { - if (n > -1) { - break; - } - if (atomic_fcmpset_int(&vp->v_writecount, &n, n - 1)) { - return (0); + if (__predict_false(n > 0)) { + return (ETXTBSY); } - } - VI_LOCK(vp); - if (vp->v_writecount > 0) { - error = ETXTBSY; - } else { /* - * If requested by fs, keep a use reference to the - * vnode until the last text reference is released. + * Transition point, we may need to grab a reference on the vnode. + * + * Take the ref early As a safety measure against bogus calls + * to vop_stdunset_text. */ - if ((vn_irflag_read(vp) & VIRF_TEXT_REF) != 0) { - if (vp->v_writecount == 0) { - vrefl(vp); + if (n == 0) { + gotref = false; + if ((vn_irflag_read(vp) & VIRF_TEXT_REF) != 0) { + vref(vp); + gotref = true; + } + if (atomic_fcmpset_int(&vp->v_writecount, &n, -1)) { + return (0); } + if (gotref) { + vunref(vp); + } + continue; } - atomic_subtract_int(&vp->v_writecount, 1); - error = 0; + MPASS(n < 0); + if (atomic_fcmpset_int(&vp->v_writecount, &n, n - 1)) { + return (0); + } } - VI_UNLOCK(vp); - return (error); + __assert_unreachable(); } static int vop_stdunset_text(struct vop_unset_text_args *ap) { struct vnode *vp; - int error, n; - bool last; + int n; vp = ap->a_vp; - /* - * Avoid the interlock if this is not the last exec. - */ n = atomic_load_int(&vp->v_writecount); for (;;) { - if (n >= -1) { - break; - } - if (atomic_fcmpset_int(&vp->v_writecount, &n, n + 1)) { - return (0); + if (__predict_false(n >= 0)) { + return (EINVAL); } - } - last = false; - VI_LOCK(vp); - if (vp->v_writecount < 0) { - if ((vn_irflag_read(vp) & VIRF_TEXT_REF) != 0) { - if (vp->v_writecount == -1) { - last = true; + /* + * Transition point, we may need to release a reference on the vnode. + */ + if (n == -1) { + if (atomic_fcmpset_int(&vp->v_writecount, &n, 0)) { + if ((vn_irflag_read(vp) & VIRF_TEXT_REF) != 0) { + vunref(vp); + } + return (0); } + continue; } - atomic_add_int(&vp->v_writecount, 1); - error = 0; - } else { - error = EINVAL; + MPASS(n < -1); + if (atomic_fcmpset_int(&vp->v_writecount, &n, n + 1)) { + return (0); + } } - VI_UNLOCK(vp); - if (last) - vunref(vp); - return (error); + __assert_unreachable(); } static int __always_inline @@ -1385,7 +1380,7 @@ vop_stdadd_writecount_impl(struct vop_add_writecount_args *ap, bool handle_msync { struct vnode *vp; struct mount *mp __diagused; - int error; + int n; vp = ap->a_vp; @@ -1400,20 +1395,26 @@ vop_stdadd_writecount_impl(struct vop_add_writecount_args *ap, bool handle_msync } #endif - VI_LOCK_FLAGS(vp, MTX_DUPOK); - if (__predict_false(vp->v_writecount < 0)) { - error = ETXTBSY; - } else { - VNASSERT(vp->v_writecount + ap->a_inc >= 0, vp, - ("neg writecount increment %d", ap->a_inc)); - if (handle_msync && vp->v_writecount == 0) { - vlazy(vp); + n = atomic_load_int(&vp->v_writecount); + for (;;) { + if (__predict_false(n < 0)) { + return (ETXTBSY); + } + + VNASSERT(n + ap->a_inc >= 0, vp, + ("neg writecount increment %d + %d = %d", n, ap->a_inc, + n + ap->a_inc)); + if (n == 0) { + if (handle_msync) { + vlazy(vp); + } + } + + if (atomic_fcmpset_int(&vp->v_writecount, &n, n + ap->a_inc)) { + return (0); } - vp->v_writecount += ap->a_inc; - error = 0; } - VI_UNLOCK(vp); - return (error); + __assert_unreachable(); } int From nobody Sat Nov 27 23:38:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9F2D818B2EB4; Sat, 27 Nov 2021 23:38: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 4J1p2K2VNLz3k2J; Sat, 27 Nov 2021 23:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 354B0249E8; Sat, 27 Nov 2021 23:38: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 1ARNc1VZ055450; Sat, 27 Nov 2021 23:38:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ARNc1mC055449; Sat, 27 Nov 2021 23:38:01 GMT (envelope-from git) Date: Sat, 27 Nov 2021 23:38:01 GMT Message-Id: <202111272338.1ARNc1mC055449@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: c3134a6af07a - main - nfscl: Disable use of the LookupOpen RPC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c3134a6af07af402b71f0b8587e09cb783c79eda Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638056281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=THoVrXIdnpUyrrcKsJF8QG0A1IyflWc+KBPKllpjO9M=; b=tVjIu1SwZtLBenf1P7q9VNl7pmfZIP/C3xZnEgCLhmOis6wfav2Djzi6GMkqu+eT2T+n4G A9UducNK/lvhUmdh5I6Rjx6c6O+np/mMHJKxhhvdxy+JUAmcC4RQmPGNbB9Riao0DvQ/4v CVwRxrzK4UeBpKGOlMPGjTAx5wqWstYJvxjzOjEXysJbH9WKZ+X07iWhzAOH0ugjvurFbp JiWmHz+RLSauxiJ7zPbPRZKwP2L6PjrvxceBiKwki1xYTxt+nALBaMMLgbO2Rmn6k6dJEu c3GYVXO9weMR/Kw0+l4nzQm+bQPujeLefa0SY2nlhyfsLSF7o/8vNGGnoMlRtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638056281; a=rsa-sha256; cv=none; b=I3wN2NwN8VC/pPB/Yzaqzp8dB8eub4M4mml4gAMilyJFh4IOcx6pcvTggF3oMHs2jdZC89 j1y376gX9niAnAk0lHGug2Q+Iiu31lVVI+gQUPYHbAQkszRHafnCl2as8qo+o4vd87nasm 3/Y+aimWwJ806yB/hJsDW335XiV3v19o8Qb3VvlmBBc9xJY3aC0j9rc0CgXV5ukB7UlZxJ 8H4A7XRyc85xFkQauwiswRBKyMnETZMkzMiTn84OxdGlLcDAt0C/i/I/YlCXXZIFMKLuxh CpYIKTmDpcnl6Bww7eWuacBpz39pPlhkGtXyfAUwBEqTjZbkXbvbfn+QxHZaQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=c3134a6af07af402b71f0b8587e09cb783c79eda commit c3134a6af07af402b71f0b8587e09cb783c79eda Author: Rick Macklem AuthorDate: 2021-11-27 23:34:45 +0000 Commit: Rick Macklem CommitDate: 2021-11-27 23:34:45 +0000 nfscl: Disable use of the LookupOpen RPC The LookupOpen RPC reduces the number of Open RPCs needed. Unfortunately, it breaks certain software builds over NFS, so disable it until this is fixed. The LookupOpen RPC is only used for NFSv4.1/4.2 mounts when the "oneopenown" mount option is specified, so this should not affect many users. --- sys/fs/nfsclient/nfs_clvnops.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 920bf2524c01..4a027ea07f26 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1322,13 +1322,18 @@ nfs_lookup(struct vop_lookup_args *ap) cache_purge_negative(dvp); } + openmode = 0; +#if 0 + /* + * The use of LookupOpen breaks some builds. It is disabled + * until that is fixed. + */ /* * If this an NFSv4.1/4.2 mount using the "oneopenown" mount * option, it is possible to do the Open operation in the same * compound as Lookup, so long as delegations are not being * issued. This saves doing a separate RPC for Open. */ - openmode = 0; NFSLOCKMNT(nmp); if (NFSHASNFSV4N(nmp) && NFSHASONEOPENOWN(nmp) && (nmp->nm_privflag & NFSMNTP_DELEGISSUED) == 0 && @@ -1340,6 +1345,7 @@ nfs_lookup(struct vop_lookup_args *ap) openmode |= NFSV4OPEN_ACCESSWRITE; } NFSUNLOCKMNT(nmp); +#endif newvp = NULLVP; NFSINCRGLOBAL(nfsstatsv1.lookupcache_misses); From nobody Sun Nov 28 01:22:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 40B0718C5943; Sun, 28 Nov 2021 01:22:54 +0000 (UTC) (envelope-from peterj@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 4J1rMK6NLNz4ly4; Sun, 28 Nov 2021 01:22:53 +0000 (UTC) (envelope-from peterj@freebsd.org) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 68B3E8494; Sun, 28 Nov 2021 01:22:52 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Sun, 28 Nov 2021 12:22:46 +1100 From: Peter Jeremy To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b19740f4ce7a - main - swap_pager: lock vnode in swapdev_strategy() Message-ID: References: <202111251935.1APJZA1e094731@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IOV4qFaapzeWeugn" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638062573; 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=okGXBRwZXvQqq1LCPIKdv0nDNGel78OCKKA0MghRhFQ=; b=RrN65LPQnDR1f7Y3Hd1cUN6mVpY6UlOjDmZ5dTaA/D5XSv2tZ2ndtM+Ra4WVtN8bKJNaoZ NcqMR0sR0BqM4XOzHepjXxrGyhKSI8gTgmee+feCrR/6w0xtz+T466Vmkf4svmujQLZiLL DqB6y/a1LKFoxKgEbm0JCJSJjJSy15pmfkc0d11pdFZDYwXy1XnB8zU4sfF2hlKzHujE4f ZfusjFk8bRKFAeAuLIRqmbIdO7xPLSm783j1NgWLuygTWyFvnMi7UJk9WpwlHkFzTFeauq E+wc8VRaOOopTwMVC6So1oZ1aW964aYAb9fzeJ3sIheWWsawJuaoAjZX31YJqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638062574; a=rsa-sha256; cv=none; b=QWruNDFEPxliANv7bsYvVmtnNyMHyEPzjKcFPSYeqTB/lqjA1reH8qQd6wdy206l6tPoTi ka9sBScysnU+myp09dtF0eT2B2uOFT/9nwN8i2yys5qI0QBo0E09AUUfcPOdE1bd9jvZPm 45zDs3wPDji+j1n5mljkzV3QFrHvgqGm1Ktl5Puim4EXszfrlWrgo2aE2sl8BzHAUWonIt IU3rz06NxD7M7/vEvejTEv1657kBP9uev0mEbRnux/n7HsN9NcZPW0M4iIPbDzTsMNmk9O AHuDQI5DYrYsDMXS8zDDvE+1NojwlfCtWIfkCTZjyJgnHe6bUuw06Z0LdTdgsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --IOV4qFaapzeWeugn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-Nov-27 01:26:17 +0200, Konstantin Belousov wr= ote: >commit 9c62295373f728459c19138f5aa03d9cb8422554 >Author: Konstantin Belousov >Date: Sat Nov 27 01:22:27 2021 +0200 > > swapoff_one(): only check free pages count manually turning swap off That didn't work but I don't think the underlying bug is related to your recent work on swap_pager - digging back through my logs, I've found another similar panic in August last year. Nov 28 09:40:17 rock64 syslogd: exiting on signal 15 Waiting (max 60 seconds) for system process `vnlru' to stop... done Waiting (max 60 seconds) for system process `syncer' to stop...=20 Syncing disks, vnodes remaining... 0 0 done Waiting (max 60 seconds) for system thread `bufdaemon' to stop... done Waiting (max 60 seconds) for system thread `bufspacedaemon-0' to stop... do= ne All buffers synced. No strategy for buffer at 0xffff0000bf8dc000 vnode 0xffffa00009024a80: type VBAD usecount 2, writecount 0, refcount 33263 seqc users 1 hold count flags () flags (VIRF_DOOMED|VV_VMSIZEVNLOCK) lock type nfs: SHARED (count 1) swap_pager: I/O error - pagein failed; blkno 241400,size 4096, error 45 panic: VOP_STRATEGY failed bp=3D0xffff0000bf8dc000 vp=3D0 cpuid =3D 0 time =3D 1638052821 KDB: stack backtrace: db_trace_self() at db_trace_self db_trace_self_wrapper() at db_trace_self_wrapper+0x30 vpanic() at vpanic+0x178 panic() at panic+0x44 bufstrategy() at bufstrategy+0x80 swapdev_strategy() at swapdev_strategy+0xcc swap_pager_getpages_locked() at swap_pager_getpages_locked+0x460 swapoff_one() at swapoff_one+0x3e4 swapoff_all() at swapoff_all+0x9c bufshutdown() at bufshutdown+0x2ac kern_reboot() at kern_reboot+0x240 sys_reboot() at sys_reboot+0x358 do_el0_sync() at do_el0_sync+0x4a4 handle_el0_sync() at handle_el0_sync+0x9c --- exception, esr 0x56000000 KDB: enter: panic [ thread pid 1 tid 100002 ] Stopped at kdb_enter+0x48: undefined f900c11f db>=20 This is the same traceback as my previous mail. Looking at the code path, the test whether there's enough RAM to swap in all the data passes in both cases: If swapoff_one() returned ENOMEM then swapoff_all() would report a "Cannot remove swap device" error and keep going (not bother to actually remove the swap device) - and that's not happening. I think the important message is "No strategy for buffer at 0x..." which comes from vop_nostrategy() and causes bufstrategy() to panic: swapdev_strategy() =3D> bstrategy() =3D> BO_STRATEGY() =3D> bufstrategy() =3D> VOP_STRATEGY() =3D> VOP_STRATEGY_APV() =3D> vop_nostrategy() =3D> bufdone() =3D> swp_pager_async_iodone() Presumably, stopping the network means there's no longer any way for swap operations to complete so the swap device has become associated with default_vnodeops, (though I haven't dug into the actual code path that does that). Moving up a level, does it really matter if swapoff_one() is skipped? If it actually returned an error (eg if the free memory test failed), then that's what would happen. By this point in the shutdown, there's no userland left (which makes me wonder why there's anything left in swap in any case) and only the final cleanups remain before the kernel shuts down. What's really needed is a way to detect that the relevant swap I/O provider has gone away and return to swapoff_all() without panicing. --=20 Peter Jeremy --IOV4qFaapzeWeugn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmGi2eFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzQXuxAAmZ8WeG9bcvQLUuyrx37KNUcYBV88wZf/MiWFr9v9r+1Bww493ICescF1 RLx8fydOTKTBuNOvZmIDPm15ZRuDKT2z8n0sSBwxQIO75SjVkuMSkJqxfR0BPVB6 cSr4iwpxQfHjoGReKHufkciTelvSTHLEYnHa+rpIMn7PgQ72Nr9aGbapBqsWvYNl ZH4NGnj4swsfw/LL7XHB9uYaISK1ZdDHxeaSpshXPjDkVek/SEaIfxzHX0NdYJDt bYOKcWWPKiGWx03loDi5Z4+I5Popb1ACC+Jwv3L4RIA3b4IlxWiBtWfpvD3xbZWm rpGQjky2SwUo6K+1MvLFIqsHeczciTo2CYsq3fWVXjue8b/Z0d1ooiqxfcWeY/r+ ExRIbP6S+YS/4UBMpekI1Lrf6aD849c/B0hCPkEExnhUeJAK23OCaJL706Zf98gJ 2zHLcPBsOmVpVn+bpTM2mfI7qvtbYwHZncWGfsUErH67RMRU6jic0B+nQ2q4ysWE 7Xrg9c4jXNcmoQ/71/nRCB1fGFp8/Of8IrC27h0qAn9IDfkwk9BkgVlAHrtg/BNG CdQexx+YzrH/CSzF1HQu5oMTUV1C56RXFTawbF9EJOvdR8elO9JFI5ecEm8mG8pk V6BSB/nA0xI4qyB/h02kAKJLr41y2bqorARBWiBMIuHfX2lRkI8= =vXIi -----END PGP SIGNATURE----- --IOV4qFaapzeWeugn-- From nobody Sun Nov 28 02:00:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 76FEF18AFAF0; Sun, 28 Nov 2021 02:01:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4J1sCP1Ptpz3F4g; Sun, 28 Nov 2021 02:01:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1AS20u8T070451 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 28 Nov 2021 04:00:59 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1AS20u8T070451 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1AS20ud9070450; Sun, 28 Nov 2021 04:00:56 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 28 Nov 2021 04:00:56 +0200 From: Konstantin Belousov To: Peter Jeremy Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b19740f4ce7a - main - swap_pager: lock vnode in swapdev_strategy() Message-ID: References: <202111251935.1APJZA1e094731@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4J1sCP1Ptpz3F4g X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Sun, Nov 28, 2021 at 12:22:46PM +1100, Peter Jeremy wrote: > On 2021-Nov-27 01:26:17 +0200, Konstantin Belousov wrote: > >commit 9c62295373f728459c19138f5aa03d9cb8422554 > >Author: Konstantin Belousov > >Date: Sat Nov 27 01:22:27 2021 +0200 > > > > swapoff_one(): only check free pages count manually turning swap off > > That didn't work but I don't think the underlying bug is related to > your recent work on swap_pager - digging back through my logs, I've > found another similar panic in August last year. It is definitely not caused by, it is just yet another issue. > > Nov 28 09:40:17 rock64 syslogd: exiting on signal 15 > Waiting (max 60 seconds) for system process `vnlru' to stop... done > Waiting (max 60 seconds) for system process `syncer' to stop... > Syncing disks, vnodes remaining... 0 0 done > Waiting (max 60 seconds) for system thread `bufdaemon' to stop... done > Waiting (max 60 seconds) for system thread `bufspacedaemon-0' to stop... done > All buffers synced. > No strategy for buffer at 0xffff0000bf8dc000 > vnode 0xffffa00009024a80: type VBAD > usecount 2, writecount 0, refcount 33263 seqc users 1 > hold count flags () > flags (VIRF_DOOMED|VV_VMSIZEVNLOCK) > lock type nfs: SHARED (count 1) > swap_pager: I/O error - pagein failed; blkno 241400,size 4096, error 45 > panic: VOP_STRATEGY failed bp=0xffff0000bf8dc000 vp=0 > cpuid = 0 > time = 1638052821 > KDB: stack backtrace: > db_trace_self() at db_trace_self > db_trace_self_wrapper() at db_trace_self_wrapper+0x30 > vpanic() at vpanic+0x178 > panic() at panic+0x44 > bufstrategy() at bufstrategy+0x80 > swapdev_strategy() at swapdev_strategy+0xcc > swap_pager_getpages_locked() at swap_pager_getpages_locked+0x460 > swapoff_one() at swapoff_one+0x3e4 > swapoff_all() at swapoff_all+0x9c > bufshutdown() at bufshutdown+0x2ac > kern_reboot() at kern_reboot+0x240 > sys_reboot() at sys_reboot+0x358 > do_el0_sync() at do_el0_sync+0x4a4 > handle_el0_sync() at handle_el0_sync+0x9c > --- exception, esr 0x56000000 > KDB: enter: panic > [ thread pid 1 tid 100002 ] > Stopped at kdb_enter+0x48: undefined f900c11f > db> > > This is the same traceback as my previous mail. Looking at the code > path, the test whether there's enough RAM to swap in all the data > passes in both cases: If swapoff_one() returned ENOMEM then > swapoff_all() would report a "Cannot remove swap device" error and > keep going (not bother to actually remove the swap device) - and > that's not happening. > > I think the important message is "No strategy for buffer at 0x..." > which comes from vop_nostrategy() and causes bufstrategy() to panic: > > swapdev_strategy() > => bstrategy() > => BO_STRATEGY() > => bufstrategy() > => VOP_STRATEGY() > => VOP_STRATEGY_APV() > => vop_nostrategy() > => bufdone() => swp_pager_async_iodone() > > Presumably, stopping the network means there's no longer any way for > swap operations to complete so the swap device has become associated > with default_vnodeops, (though I haven't dug into the actual code > path that does that). > > Moving up a level, does it really matter if swapoff_one() is skipped? > If it actually returned an error (eg if the free memory test failed), > then that's what would happen. By this point in the shutdown, there's > no userland left (which makes me wonder why there's anything left in > swap in any case) and only the final cleanups remain before the kernel > shuts down. What's really needed is a way to detect that the relevant > swap I/O provider has gone away and return to swapoff_all() without > panicing. I think the intent there is to ensure that the system is in as much steady state as possible. I can easily imagine some HBA doing weird things if some io is in flight when the reset comes in. So we want to ensure that no io occurs. The cause for your panic is not the network interface down state (in fact, I think that interface state up), but as you correctly analyzed, the call to vop_nostrategy(). It is there in stack because underlying filesystem was unmounted, and the swap vnode was reclaimed, replacing NFS vop vector with deadfs vop vector, which inherits from the default vop. The bit that I do not understand from your report, is why swapoff_all() did not occured earlier. Your earlier report, where spurious ENOMEM came out from swapoff(2) syscall, and which I fixed by the previous patch, means that there was an attempt to swapoff. Still, the solution is, IMO, to swapoff before unmount. We do not need swapin for flushing buffers. Please try this combined patch. diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 4b746a269171..201afeec9311 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1452,16 +1452,21 @@ bufshutdown(int show_busybufs) */ printf("Giving up on %d buffers\n", nbusy); DELAY(5000000); /* 5 seconds */ + swapoff_all(); } else { if (!first_buf_printf) printf("Final sync complete\n"); + /* - * Unmount filesystems + * Unmount filesystems. Swapoff before unmount, + * because swap on file is unoperational after unmount + * of underlying filesystem. */ - if (!KERNEL_PANICKED()) + if (!KERNEL_PANICKED()) { + swapoff_all(); vfs_unmountall(); + } } - swapoff_all(); DELAY(100000); /* wait for console output to finish */ } diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 4cfdb3fd2cc8..981a71b2c4b1 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -469,7 +469,8 @@ static bool swp_pager_swblk_empty(struct swblk *sb, int start, int limit); static void swp_pager_free_empty_swblk(vm_object_t, struct swblk *sb); static int swapongeom(struct vnode *); static int swaponvp(struct thread *, struct vnode *, u_long); -static int swapoff_one(struct swdevt *sp, struct ucred *cred); +static int swapoff_one(struct swdevt *sp, struct ucred *cred, + bool swapoff_syscall); /* * Swap bitmap functions @@ -2523,14 +2524,14 @@ sys_swapoff(struct thread *td, struct swapoff_args *uap) error = EINVAL; goto done; } - error = swapoff_one(sp, td->td_ucred); + error = swapoff_one(sp, td->td_ucred, true); done: sx_xunlock(&swdev_syscall_lock); return (error); } static int -swapoff_one(struct swdevt *sp, struct ucred *cred) +swapoff_one(struct swdevt *sp, struct ucred *cred, bool swapoff_syscall) { u_long nblks; #ifdef MAC @@ -2552,8 +2553,16 @@ swapoff_one(struct swdevt *sp, struct ucred *cred) * available virtual memory in the system will fit the amount * of data we will have to page back in, plus an epsilon so * the system doesn't become critically low on swap space. + * The vm_free_count() part does not account e.g. for clean + * pages that can be immediately reclaimed without paging, so + * this is very rough estimation. + * + * On the other hand, not turning swap off on swapoff_all() + * means that we loose swap data when filesystems go away, + * which is arguably worse. */ - if (vm_free_count() + swap_pager_avail < nblks + nswap_lowat) + if (swapoff_syscall && + vm_free_count() + swap_pager_avail < nblks + nswap_lowat) return (ENOMEM); /* @@ -2603,7 +2612,7 @@ swapoff_all(void) devname = devtoname(sp->sw_vp->v_rdev); else devname = "[file]"; - error = swapoff_one(sp, thread0.td_ucred); + error = swapoff_one(sp, thread0.td_ucred, false); if (error != 0) { printf("Cannot remove swap device %s (error=%d), " "skipping.\n", devname, error); From nobody Sun Nov 28 02:05:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8DB8A18B2F68; Sun, 28 Nov 2021 02:05: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 4J1sJx28qTz3GwT; Sun, 28 Nov 2021 02:05:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A4702683E; Sun, 28 Nov 2021 02:05: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 1AS25rSG054833; Sun, 28 Nov 2021 02:05:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AS25rNE054832; Sun, 28 Nov 2021 02:05:53 GMT (envelope-from git) Date: Sun, 28 Nov 2021 02:05:53 GMT Message-Id: <202111280205.1AS25rNE054832@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: 374f859ec08f - stable/13 - ng_h4: add deprecation notice List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 374f859ec08fc96a8cdd530eaeeba060c7b41912 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638065153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kCxYUUeAWlUIgtcVDx4znO+Hgy3R4bWm38DK4ORKrkg=; b=LLTNq5d2cfs90Sio04lO7FGiyuxdngfEyM2F0cJc71MeGmRpv+XUL7FmXWMAZd6Kwod5Dv k6BNtb1x4sQKeGEgpZmSI0h7asCSrbRQSEuzUPI0LaqZokDfDMHfVelsmvU/7977vev51W Z64mYDdrvuepanGi5+xPv7gACLyAwUxDKNXowJvFuvCe+Ugyf/wZo6vj76dkY+NfbuP8pp kt3Mr+4abXEm6teiXI1E61x603O0/I6ZNNsxURh+NDfZnC53nqfZmVQphWFyfAfV5ID2eh OJf8Jmzv2B/intn9HjzV/sSigHJcZMJ4QXa2Hhq8V962ihrPpcq/1LLKGPa+ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638065153; a=rsa-sha256; cv=none; b=NNuiXCXlNbVDB4ff58QX8Eui9FvSUO5PyYbC6ZE1KuDiXoK2l1f92z89BxwVpU6glL1BU6 69d9i8QwVMSyYEsI1OkpZOM6v4zbaCvPXolxI6D2CqcPzWfx7S9YMqFfonvCQyKw6jD24E zYMMJKzk1G4c8zHMtUGTqIJIbigUZiE2ePk04kR2cMmWZHkdk6xdM+dhZGNNLweHlCckwc sDH21HvRAuieG9yNAULygovEi7+Qr5wRMzGeTL5SAUVcQRcIp86uUlH0WIQsQ8K8MHtctp OiwEzxHntm5vMtT0hoPEqzOWAPS0gP55elDD9ZFCO8zEzkIYn8qdSKxO/7qbKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=374f859ec08fc96a8cdd530eaeeba060c7b41912 commit 374f859ec08fc96a8cdd530eaeeba060c7b41912 Author: Ed Maste AuthorDate: 2021-11-25 16:55:34 +0000 Commit: Ed Maste CommitDate: 2021-11-28 00:26:38 +0000 ng_h4: add deprecation notice It is already gone in FreeBSD 14. Sponsored by: The FreeBSD Foundation --- share/man/man4/ng_h4.4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/man/man4/ng_h4.4 b/share/man/man4/ng_h4.4 index bb539a230eba..52a9b8158746 100644 --- a/share/man/man4/ng_h4.4 +++ b/share/man/man4/ng_h4.4 @@ -25,7 +25,7 @@ .\" $Id: ng_h4.4,v 1.2 2003/05/21 19:37:35 max Exp $ .\" $FreeBSD$ .\" -.Dd June 14, 2002 +.Dd November 27, 2021 .Dt NG_H4 4 .Os .Sh NAME @@ -34,6 +34,11 @@ .Sh SYNOPSIS .In sys/types.h .In netgraph/bluetooth/include/ng_h4.h +.Sh DEPRECATION NOTICE +The +.Nm +Netgraph node is not present in +.Fx 14.0 . .Sh DESCRIPTION The .Nm h4 From nobody Sun Nov 28 02:05:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6E71418B3156; Sun, 28 Nov 2021 02:05: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 4J1sJy430sz3H0M; Sun, 28 Nov 2021 02:05:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6004926A25; Sun, 28 Nov 2021 02:05: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 1AS25sgT054857; Sun, 28 Nov 2021 02:05:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AS25sV2054856; Sun, 28 Nov 2021 02:05:54 GMT (envelope-from git) Date: Sun, 28 Nov 2021 02:05:54 GMT Message-Id: <202111280205.1AS25sV2054856@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: ee2e925603e4 - stable/13 - Fix coredump_phnum test with ASLR 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ee2e925603e42897fbabe1b24208d27bdcaae786 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638065154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=txo+mUkl0RcF72IJ4+vjs/jg/c5Vz7A9TVDy7oZus3A=; b=J6jVNrkv5RiKHBG3syR5IAgpFMzV5Xb8NkGAg1p0TbdKwKL43Vxg9bnF2gKPJRT4jYwpDt y2aQUG18G+PfPZbagUbuft0l3szQVB/RKWUcVC7y3q0djC7opxAE03nOF696wAexS9oH91 zguKD+uhMGCq2WV/3VYGhpivXBS/nyEjWNZ8WBZvTww8Wjx/vmRMnR587Cy8ONnsu7E3qE GcLtMIkQLEaRm8jukXGwi85pPZYQDKyp7z3yOh7Bu76blu8petbGwHij4yZllR1LhzZiZD R3G3Csr/insMzYbkG8cOQpkKCo8GbOfH3ngdbp7BtbfQKipQDjMryJ4HYFAdnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638065154; a=rsa-sha256; cv=none; b=TGTcS73FSJ78qaCpBL/Vz3ErhfOGrns253KYuiSDXzvE8sw7Ak/Y7rgDiAXEDGDPJmTqzR lTo7KqH/TV1n7txxT8PpNVv93OUW6NkAbOSqwHQVJz//bJrp4VpxcYpwrvjQoNefv9svhx Uh6gU+jJjuVHFpCVu5umxs0GJpBwqiJ7kL08xEh8Nju6sU5ivcMiIAfaLZgYi2aT8hYTXF 0U+ixsSvU8v38QEmzzkyhsISwtU6j5dgOY6r83COuV1uXCDO8n37Bp0mBU1hPzW18nBGP8 QlSoTuzFQsGCZDJqq1fmvA7HtbReqBo/CdZV9dPvbm8LTa1gPnFLmxc4OmoRrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ee2e925603e42897fbabe1b24208d27bdcaae786 commit ee2e925603e42897fbabe1b24208d27bdcaae786 Author: Ed Maste AuthorDate: 2021-11-21 17:17:20 +0000 Commit: Ed Maste CommitDate: 2021-11-28 00:27:03 +0000 Fix coredump_phnum test with ASLR enabled coredump_phnum intends to generate a core file with many PT_LOAD segments. Previously it called mmap() in a loop with alternating protections, relying on each mapping following the previous, to produce a core file with many page-sized PT_LOAD segments. With ASLR on we no longer have this property of each mmap() following the previous. Instead, perform a single allocation, and then use mprotect() to set alternating pages to PROT_READ. PR: 259970 Reported by: lwhsu, mw Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33070 (cherry picked from commit 8ec4c5dae32765701ac70811455084efd1570c32) --- tests/sys/kern/coredump_phnum_helper.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/sys/kern/coredump_phnum_helper.c b/tests/sys/kern/coredump_phnum_helper.c index da023e691a24..0dff59b918d9 100644 --- a/tests/sys/kern/coredump_phnum_helper.c +++ b/tests/sys/kern/coredump_phnum_helper.c @@ -42,18 +42,21 @@ int main(int argc __unused, char **argv __unused) { void *v; - unsigned i; + size_t i, pages; - for (i = 0; i < UINT16_MAX + 1000; i++) { + pages = UINT16_MAX + 1000; + v = mmap(NULL, pages * PAGE_SIZE, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0); + if (v == NULL) + err(1, "mmap"); + for (i = 0; i < pages; i += 2) { /* - * Alternate protections; otherwise the kernel will just extend - * the adjacent same-protection previous mapping. + * Alternate protections to interleave RW and R PT_LOAD + * segments. */ - v = mmap(NULL, PAGE_SIZE, - (((i % 2) == 0) ? PROT_READ : 0) | PROT_WRITE, - MAP_ANON | MAP_PRIVATE, -1, 0); - if (v == MAP_FAILED) - err(1, "mmap"); + if (mprotect((char *)v + i * PAGE_SIZE, PAGE_SIZE, + PROT_READ) != 0) + err(1, "mprotect"); } /* Dump core. */ From nobody Sun Nov 28 02:05:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 428C718B3063; Sun, 28 Nov 2021 02:05: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 4J1sJz5KfKz3H2b; Sun, 28 Nov 2021 02:05:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8140B26916; Sun, 28 Nov 2021 02:05: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 1AS25tNw054881; Sun, 28 Nov 2021 02:05:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AS25t72054880; Sun, 28 Nov 2021 02:05:55 GMT (envelope-from git) Date: Sun, 28 Nov 2021 02:05:55 GMT Message-Id: <202111280205.1AS25t72054880@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: 2104a8064951 - stable/13 - mkimg: zero entry in vhdx_write_metadata List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2104a806495173c399ca2709533ab0ab48b708b3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638065155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xQQisqtiNNSe4uf8We7Kdxt2jgcmhn8aPGz9vmv8iWc=; b=yAKHwI6mByLtmRtAn1kpfKolVvBXONq84nfMe7AxdeuwDtyF2VCELEq9l8lQtpY2Dy8l5G TthcuJvNQ5Sc9OHmnQPcHXRex/HU+RJopeAYjpJGJONH3BSUNAKz61peEqRUK5UZ7SMJOJ AQn3QCrNIwcN7uUnCVGxlz67ytJ0sl3S+HszDGIpIi+4hwxbBC3N/qov+LSRyzmNyryBQ0 YvU9meHW3lJM01RAxPB5Eq9NwsBmKS+WA+PFxwBvk2tCvShDEnX7cg1Ew5N/2AayuENxEM 4ovNsbzDc7wGKwmVGpu0gMODB2FDYThX6poXxzify1jvQBflLPbmiXmOaAPKpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638065155; a=rsa-sha256; cv=none; b=O5ZNfezUwUmN1ylE5HAKOHofLSxZcgsI1P3Z30P0DkiPP08VJ6lVxacQipVxiPY125NMfs o4srCSGSfdt80n8FSTEC3V6/yM26XiPpd0avWa4Tn/MdqlW45nvFo40p17xEJllss7Upzk ZRgswMG8v1VxHM9jUpvSy2bZjoVGXhkl4LxpJBjdQgicb4pT4lUfvcieItG15xaSuYCeaQ 70y0fUH5Q8gK9JJpI2LwsXhzaLiEScVvh9SG/q8yiV2SahhY+bHMwm9NRtSDlFaJKXCEcD 6FWQTFrJflx0BugK16NIGbiTN17XM88F3KgboEAazls++FHKI5IPX+uw6mvu/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2104a806495173c399ca2709533ab0ab48b708b3 commit 2104a806495173c399ca2709533ab0ab48b708b3 Author: Ed Maste AuthorDate: 2021-11-21 00:29:11 +0000 Commit: Ed Maste CommitDate: 2021-11-28 00:29:30 +0000 mkimg: zero entry in vhdx_write_metadata Otherwise _reserved might contain uninitialized data. MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 036af1053acd6cae68c5fb6bed30508f2e40be13) --- usr.bin/mkimg/vhdx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/mkimg/vhdx.c b/usr.bin/mkimg/vhdx.c index 4c97b20f5996..744d6e810ca5 100644 --- a/usr.bin/mkimg/vhdx.c +++ b/usr.bin/mkimg/vhdx.c @@ -331,6 +331,7 @@ vhdx_write_metadata(int fd, uint64_t image_size) memset(metadata, 0, SIZE_1MB); memset(&header, 0, sizeof(header)); + memset(&entry, 0, sizeof(entry)); le64enc(&header.signature, VHDX_METADATA_TABLE_HEADER_SIGNATURE); le16enc(&header.entry_count, 5); From nobody Sun Nov 28 02:56:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B611218B1AB0; Sun, 28 Nov 2021 02: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 4J1tQz0pcwz3mwB; Sun, 28 Nov 2021 02:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0C28271DF; Sun, 28 Nov 2021 02: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 1AS2uAis020319; Sun, 28 Nov 2021 02: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 1AS2uAwE020318; Sun, 28 Nov 2021 02:56:10 GMT (envelope-from git) Date: Sun, 28 Nov 2021 02:56:10 GMT Message-Id: <202111280256.1AS2uAwE020318@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: 2ff40d5e276f - stable/12 - ng_h4: add deprecation notice List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2ff40d5e276f0f7b191a3e628897c5a3ca54a19c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638068171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjz5QZTH+d2zIVLyNJN+YzI90Ua4sSfF/9cRlwYXTNQ=; b=FTUDzcDlrn+Hkl3QxlS1LMI51z3j+oWE8vBFxGxfrZEuAeuhvBi2xg62oJWaYgEm20HBn8 4INtoFPbkP3a/zq3Fty3nULWmNox6rrwc9UMI1OaDy5TSMtxe1votSB2GX7dIRr8qAPypd SM6bOMnQFgz8tANj60gIZuCh+tDoks91JEfpuO0OGyjgk9qfFaHLG48Y4lff4snONpSkIn eWp7xgmf6z157bWREIReK7lqhuAs9TlsRMieLCtZuzPlo4XZzJPKl/HIIuagLUUcHk2ky4 BZw189NwpwhNZAT99SK3+Z5LFtiRNgVkI8qa4HibI/gzkq9NjzgMkkX9NgZoxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638068171; a=rsa-sha256; cv=none; b=ETE46E6qxMqvkhknCpdwENwX05iQA9YfKgbTZ6byCJvman0vWnDmG8Ivu91AqsOQQa3xhS IuViZd4BfKAeVxE+ZzjTq/bdhzbZ+3YBIdMdK6WCvMQ4exCJ8rmFFPqgSCPUD7v7jDmFnj /wkye/sBoXPItGJn1gCvdVepVay1MP8MKkI10REpYaNDZbVfeB4+NLNoMy81+6NCJTr0n0 iFMvHxgkR3KJe+QWRKSPtHUjOgw/ezSM2Xig4wjxOGcAIEh1rvF+rKXAi1JwP+6wTW2SQb j0+CMu2SH0F8DUQGsTJ0MmpBQCVe/JadyS/dTMayqosioRiBBFmg/43vIsNgOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2ff40d5e276f0f7b191a3e628897c5a3ca54a19c commit 2ff40d5e276f0f7b191a3e628897c5a3ca54a19c Author: Ed Maste AuthorDate: 2021-11-25 16:55:34 +0000 Commit: Ed Maste CommitDate: 2021-11-28 02:55:46 +0000 ng_h4: add deprecation notice It is already gone in FreeBSD 14. Sponsored by: The FreeBSD Foundation (cherry picked from commit 374f859ec08fc96a8cdd530eaeeba060c7b41912) --- share/man/man4/ng_h4.4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/man/man4/ng_h4.4 b/share/man/man4/ng_h4.4 index bb539a230eba..52a9b8158746 100644 --- a/share/man/man4/ng_h4.4 +++ b/share/man/man4/ng_h4.4 @@ -25,7 +25,7 @@ .\" $Id: ng_h4.4,v 1.2 2003/05/21 19:37:35 max Exp $ .\" $FreeBSD$ .\" -.Dd June 14, 2002 +.Dd November 27, 2021 .Dt NG_H4 4 .Os .Sh NAME @@ -34,6 +34,11 @@ .Sh SYNOPSIS .In sys/types.h .In netgraph/bluetooth/include/ng_h4.h +.Sh DEPRECATION NOTICE +The +.Nm +Netgraph node is not present in +.Fx 14.0 . .Sh DESCRIPTION The .Nm h4 From nobody Sun Nov 28 02:56:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 00D1C18B1AB4; Sun, 28 Nov 2021 02:56: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 4J1tR01t22z3mhF; Sun, 28 Nov 2021 02:56:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2165B26DDE; Sun, 28 Nov 2021 02: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 1AS2uCPh020343; Sun, 28 Nov 2021 02: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 1AS2uCNe020342; Sun, 28 Nov 2021 02:56:12 GMT (envelope-from git) Date: Sun, 28 Nov 2021 02:56:12 GMT Message-Id: <202111280256.1AS2uCNe020342@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: d3a7b75bbcb5 - stable/12 - Fix coredump_phnum test with ASLR 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d3a7b75bbcb5171d7eda9d712437efd46bb7605b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638068172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gF3OhGaXB9/ab3bVCnTM/PV96UaIFCr5b791Rr74ny0=; b=kzy+vOTyLwSelpxFJ5sX1Fw75UJYKxyApkjnXiMHljOVhSfFAxWoZIiS+XNtq/Nd1TnnyP oTqU/yMBY14ax1nMkXh8ISM8/Vg39L5OvD4FmWc/VayMOoFoah0T2iqebwzLvslZo2SFmL z/jjB/VCvV/k4mYzPX0Km/e+I/BCZ/z/8hrpyUWyGZcRxIuIDqKgBWDSf+SmoXWqMhKvx6 6wi7VvHdvCXcAOeKMWQ0c3ZSAFgI0awPw0q+hiP7QMxA4MrONTYb8BClYY4vxV93ihWg8/ hQSF5tIHt4j21EaxS0qzCbvsCqSHIgkuHqQHswZEfKkZeEu6E6YlL4xw+00Ztg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638068172; a=rsa-sha256; cv=none; b=rE7UdHFhflI7G2joLIx7tlVrjma2mvV3yYXJ0ArgsNAYAI+keDZ77N/wAAVyDnwMGSxh+j h042iRArcQ5qmiyXLMs/jMjVJG0IIupQTg2q1lKjsWXR5Cu8f4eazZ0XXKT/lgh7DyfKet m8Lsg9tPz14SuWvie4ZelyY9VdQPoLR2RxvBzxdZ4k82RLj+2moomGt9Z7F81WrgpiUDvh fnk1g3rqv3A7a+JWvOghcQY3/TCtZPmd3T+72kfF2/IWOr95ZRH37viweSKDDEmzLaQPg/ Z1ESJ6HnsOLspbufBOoCHrcFgDgmhDtYBxe4xX+DWHX1ofjbxa+ovYSJGmnmiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d3a7b75bbcb5171d7eda9d712437efd46bb7605b commit d3a7b75bbcb5171d7eda9d712437efd46bb7605b Author: Ed Maste AuthorDate: 2021-11-21 17:17:20 +0000 Commit: Ed Maste CommitDate: 2021-11-28 02:55:46 +0000 Fix coredump_phnum test with ASLR enabled coredump_phnum intends to generate a core file with many PT_LOAD segments. Previously it called mmap() in a loop with alternating protections, relying on each mapping following the previous, to produce a core file with many page-sized PT_LOAD segments. With ASLR on we no longer have this property of each mmap() following the previous. Instead, perform a single allocation, and then use mprotect() to set alternating pages to PROT_READ. PR: 259970 Reported by: lwhsu, mw Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33070 (cherry picked from commit 8ec4c5dae32765701ac70811455084efd1570c32) (cherry picked from commit ee2e925603e42897fbabe1b24208d27bdcaae786) --- tests/sys/kern/coredump_phnum_helper.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/sys/kern/coredump_phnum_helper.c b/tests/sys/kern/coredump_phnum_helper.c index da023e691a24..0dff59b918d9 100644 --- a/tests/sys/kern/coredump_phnum_helper.c +++ b/tests/sys/kern/coredump_phnum_helper.c @@ -42,18 +42,21 @@ int main(int argc __unused, char **argv __unused) { void *v; - unsigned i; + size_t i, pages; - for (i = 0; i < UINT16_MAX + 1000; i++) { + pages = UINT16_MAX + 1000; + v = mmap(NULL, pages * PAGE_SIZE, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0); + if (v == NULL) + err(1, "mmap"); + for (i = 0; i < pages; i += 2) { /* - * Alternate protections; otherwise the kernel will just extend - * the adjacent same-protection previous mapping. + * Alternate protections to interleave RW and R PT_LOAD + * segments. */ - v = mmap(NULL, PAGE_SIZE, - (((i % 2) == 0) ? PROT_READ : 0) | PROT_WRITE, - MAP_ANON | MAP_PRIVATE, -1, 0); - if (v == MAP_FAILED) - err(1, "mmap"); + if (mprotect((char *)v + i * PAGE_SIZE, PAGE_SIZE, + PROT_READ) != 0) + err(1, "mprotect"); } /* Dump core. */ From nobody Sun Nov 28 02:56:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7BDED18B1C15; Sun, 28 Nov 2021 02:56: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 4J1tR15djNz3mfP; Sun, 28 Nov 2021 02:56:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E94A273A4; Sun, 28 Nov 2021 02: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 1AS2uDfi020367; Sun, 28 Nov 2021 02: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 1AS2uDro020366; Sun, 28 Nov 2021 02:56:13 GMT (envelope-from git) Date: Sun, 28 Nov 2021 02:56:13 GMT Message-Id: <202111280256.1AS2uDro020366@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: 38cb3cac475c - stable/12 - mkimg: zero entry in vhdx_write_metadata List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 38cb3cac475c70b7c9e71fb13d48fbdce40f52fd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638068173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xBUt3Q/BuNv1IzomILBDly0BVf87Y00tULq+nqh9bqA=; b=W8z3M7stWkEvUYKfcm5MLU/lB+Yg+dsVRaj9/zaw0qgytxtam4P1fDnxWyAMZEIoW5wX4M c+zRh9oqdr21sh+Ru49UgRZPMleqPiY3GuJydb+q6238bUaQbDcfWMGUnUZV7ZnaTqWqQ5 8YtCM0VIB4UZlJ6umZMdN/npcRQNuJScT4CsJVlLaBGND0BPeg9oyBKKjmBNQrm9HsrTb+ xSozyGRduZk9hZVmDHfI337f9eJ82JMUxkFEZaIDc8+EmXThvazAot+cxZBmxILZs9PC/M WbWeDfX72W3JDgEakoF0lwUGtko9LFSTwJyGfg32APf2jkKJo2xWAyfS1/z0Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638068173; a=rsa-sha256; cv=none; b=KMbh7G9K5P5Owgon9U1pxh5Z/dc24VAneTGGQQ7CzWo8dnGGWabbvc5x7N8R5nFZjLqL7u n4N/4r45rKsSxmHm/rxtECzxUT/ZBSg1TL9NOFM4MPp/IXW20HIteJxww/JAvTDFuAafPA w778T5iSJHPCr1BjSRs3XC6FZVse03JQkhFEuymSsZ0SYHpmDWsDD8p8XwWin6fdhVIiQB Ex5IcX3WT63chAA62sqcq0G2Ukb1AbhkoDKGTdmwWAIsrZz7OWxECi9dya7t2nrSyQMiiH zGgHQLGZC1JkbP0c7rxXvtq19lzTJ/8zIgNvsFxI2m+STnnWmHei+xfT4QwFDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=38cb3cac475c70b7c9e71fb13d48fbdce40f52fd commit 38cb3cac475c70b7c9e71fb13d48fbdce40f52fd Author: Ed Maste AuthorDate: 2021-11-21 00:29:11 +0000 Commit: Ed Maste CommitDate: 2021-11-28 02:55:46 +0000 mkimg: zero entry in vhdx_write_metadata Otherwise _reserved might contain uninitialized data. MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 036af1053acd6cae68c5fb6bed30508f2e40be13) --- usr.bin/mkimg/vhdx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/mkimg/vhdx.c b/usr.bin/mkimg/vhdx.c index 4c97b20f5996..744d6e810ca5 100644 --- a/usr.bin/mkimg/vhdx.c +++ b/usr.bin/mkimg/vhdx.c @@ -331,6 +331,7 @@ vhdx_write_metadata(int fd, uint64_t image_size) memset(metadata, 0, SIZE_1MB); memset(&header, 0, sizeof(header)); + memset(&entry, 0, sizeof(entry)); le64enc(&header.signature, VHDX_METADATA_TABLE_HEADER_SIGNATURE); le16enc(&header.entry_count, 5); From nobody Sun Nov 28 07:00:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2F95418BA4C7; Sun, 28 Nov 2021 07:00:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J1zrR6MP6z3mX4; Sun, 28 Nov 2021 07:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB6882A2E; Sun, 28 Nov 2021 07:00: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 1AS707UU044292; Sun, 28 Nov 2021 07:00:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AS70787044289; Sun, 28 Nov 2021 07:00:07 GMT (envelope-from git) Date: Sun, 28 Nov 2021 07:00:07 GMT Message-Id: <202111280700.1AS70787044289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: dad71022bd7a - main - Disable flaky test lib.libc.sys.setrlimit_test.setrlimit_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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dad71022bd7a8f95ab2ba656bec61e2424a1c3c5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638082807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lWme3sUb1vJzOfO63S5NHPAmnzUNzg/IhQTdUZ9T7v4=; b=A7hbpVFwoVGffHVtEuL2eQVPVsvmLEOlUtTNE5nSHeqVX6Nr4EXA6rWyWBFvt7kegSWZSa hY9E3BDgwtj2aPa1QU9airfMy55XQvfmO3mOtqSw5qxD4A/GHXMMPy4n1AViU7hiazNELQ aNN5DrF++llnInphvDDKLLPRk9nRGoKXqGSdQUck34CF3kytzs6mGLw/6KIUpv84u7pNVF fK+hLrBXZ1a4/aIeZwcopm0eGn3T95BdQnldj6+bY8vHB59higyFRnZZEJ2MVbm18/kMzr 0yOcExTYoGd5f5KIsTmtf9gsEECqvQPzScJrFeZjp7g4tYtnYLTbZQKqcNWcUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638082807; a=rsa-sha256; cv=none; b=fiSYktdeACVFic4H4jbzHv3sHhpD1QwUM84v1GnGgVdyK143BIjL5k6hElQ6e3ylsHZP9X NSJnpWG68MZ7Hs8MF1T0XyTmch64SSS/X4qNVM7Z9f7Pf1WL3OyddRfwQHv6zk5zhb6hA8 eJCCzeFKZn96EnDAdvIAEsq8I+JCV+MDrQ7cHXW93sq1mDQT9YW/N0l0wB5wFI1+9uXYqA sJ1DlyBJZthSpx0dePo1oYjFxal1/m3eTEW7EqO9rlVEERI6BeBtbvFs8NVu2Yt1ea9lqW Bx7PCEKUEskmjnWn4Py96J8LSc3biZ+ZVimpXWig0VMKtxP50TM5PgNbf9ElJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=dad71022bd7a8f95ab2ba656bec61e2424a1c3c5 commit dad71022bd7a8f95ab2ba656bec61e2424a1c3c5 Author: Li-Wen Hsu AuthorDate: 2021-11-28 06:58:21 +0000 Commit: Li-Wen Hsu CommitDate: 2021-11-28 06:58:21 +0000 Disable flaky test lib.libc.sys.setrlimit_test.setrlimit_stack PR: 259969 Sponsored by: The FreeBSD Foundation --- contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c b/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c index 6b90deab8f3f..d5c50155e6dd 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c @@ -550,6 +550,9 @@ ATF_TC_BODY(setrlimit_stack, tc) { struct rlimit res; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/259969"); + /* Ensure soft limit is not bigger than hard limit */ res.rlim_cur = res.rlim_max = 4192256; ATF_REQUIRE(setrlimit(RLIMIT_STACK, &res) == 0); From nobody Sun Nov 28 07:53:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1454318B2D03; Sun, 28 Nov 2021 07:53:13 +0000 (UTC) (envelope-from peterj@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 4J211h6PDkz4WTT; Sun, 28 Nov 2021 07:53:12 +0000 (UTC) (envelope-from peterj@freebsd.org) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 494BDB52D; Sun, 28 Nov 2021 07:53:11 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Sun, 28 Nov 2021 18:53:06 +1100 From: Peter Jeremy To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b19740f4ce7a - main - swap_pager: lock vnode in swapdev_strategy() Message-ID: References: <202111251935.1APJZA1e094731@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="silS3mqwC8aP56W6" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638085992; 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=CEMqXOHSJd5Hr8ke2P/mjuHO3g8NRKXokwX76ZJLE3w=; b=bl1P1TmYkGIBLQvv++IVGNx3G2A2sxEcDUBTvIK2EQ1Du0VbpZ9f/ax30YGEBuYUQbFAEF 7Kgni1ekeWEL/C6G7OoJ5bX2ln6JGjz2uJ23tmcsph28qamVChpbz70eNSVgAk2o5USRNK 4Ni4PTwVcwh55Il05/YBYRS71TdgMIzPcNIMlHv0NBAy/SGielD5uELOKAspDss7kGnjZE iPpSSOQETYfoXB9TB0GWJz8UM5322FI4cit0s06K7q1Z/UkNtTi3+cnHLxHHJVac3ySOyA D1QSczryGV37TCBYlo+03JxTu7dmWtGDfwy+PwD55v4xziqJR9gr2OZcs+sSTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638085992; a=rsa-sha256; cv=none; b=LUFVxKjzdjBoz2veJDw9D0nk0GNN3BMR3hpZdWQDQprw0yDFL3lVZj6gQdazmIuWENdfeB E74jJp4twVGinrQ6quePPGLzWNRFJB68GXDBQDw/FS/6kGpxD38WycB6ACoXufYffAGtjc xb2l7YMaWArAgutKS8QgpmgdjcLIj4p610zZ4Q7Su5pB13b+DmJ+h/qXYgP0KcxeLFbo6S ZpC5/rq5fVs+0bNPb3sRQVAgt0H983bu/MK3yOs+iipRxiij6dhVP1wwv8rK6L/ZDYW83z Te2zG0WgdvAhn2zy08TRgIGV+C0XbNgwVhPKnq13Yqbne7GLEvMQFJVPJu9LVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --silS3mqwC8aP56W6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-Nov-28 04:00:56 +0200, Konstantin Belousov wr= ote: >On Sun, Nov 28, 2021 at 12:22:46PM +1100, Peter Jeremy wrote: >> On 2021-Nov-27 01:26:17 +0200, Konstantin Belousov = wrote: >The cause for your panic is not the network interface down state (in fact, >I think that interface state up), but as you correctly analyzed, the >call to vop_nostrategy(). It is there in stack because underlying filesys= tem >was unmounted, and the swap vnode was reclaimed, replacing NFS vop vector >with deadfs vop vector, which inherits from the default vop. OK. Thanks for that explanation. I saw deadfs was a potential option but hadn't checked. >The bit that I do not understand from your report, is why swapoff_all() did >not occured earlier. Your earlier report, where spurious ENOMEM came out >from swapoff(2) syscall, and which I fixed by the previous patch, means=20 >that there was an attempt to swapoff. The ENOMEM swapoff is before the actual shutdown. I suspect my inclusion of that confused you, sorry. >Still, the solution is, IMO, to swapoff before unmount. We do not need >swapin for flushing buffers. > >Please try this combined patch. I've had a couple of goes at rebooting whilst thrashing with lots of swap in use and it seems happy so I think the patch is good to go. Thanks for the patches. --=20 Peter Jeremy --silS3mqwC8aP56W6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmGjNVZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzSE0g//a9+oPJ2kgUiAGBYm2CcBgruJfRN2fsDCvvuZgmegnYO5vEpy8CEmQhpo ZmVom0O2uDkPv11fso9F11CUJE3qGf6vwukojFRhycbgSIwO77YrVNv1DKhw3gds K57Jn6TAJaeasL1C3Ki8DSHbrUu8GbeVbKexxGtv6ggR//+Wj4+Ei3NU1cDuCbmX IesDG+X1MzY3/2Wtsq1rg8aX+lDf/V1hpYLyldqou98h7svrb8Q2brZ/DP/kpy4V oLRGlwDL1JZcnKhd/cX8Wb2OMTg8Yd8kSeuUZ0SAgbBGXLonhpamAOxJbvsu0v6W AG12iYE/diCYpEKvPdHRcCGAEin51IjeGN6PMFU/oW2To3dov+PUgwO/zWl7cSqj puDugTaZa/Uop4AlvRCpQN+b4qqLXj1qI0j09QwR3NWvLfQ8ZAWP5uq7/Db9Tlca RiVdizQP5qvSoEih9BOpHEaAcLyN1rWW9uP+wVC9iGDlcvqdaghpPPv1+AeNonxj azWurUmImNbiialD4I8V1+9z3bMJMIOv0+Ox8+o+hJUlsWIlfeljXJPK8VxkOAaN TPjyPiNXWbB9ETon8v259DXSlW+kXfr6CJe0K9hOum1Fkw/gGjgHi1anvcPssubP lbmfE3deKwqgBqyOLnNIsfZ8yWKHPEtPSs3l9GkAUfjA4BUkWkU= =P0xN -----END PGP SIGNATURE----- --silS3mqwC8aP56W6-- From nobody Sun Nov 28 08:36:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1CE9418C522D; Sun, 28 Nov 2021 08: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 4J21zV4GPMz4jym; Sun, 28 Nov 2021 08:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 730094002; Sun, 28 Nov 2021 08: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 1AS8aMrF073382; Sun, 28 Nov 2021 08: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 1AS8aMBD073381; Sun, 28 Nov 2021 08:36:22 GMT (envelope-from git) Date: Sun, 28 Nov 2021 08:36:22 GMT Message-Id: <202111280836.1AS8aMBD073381@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: 4f924a786ae0 - main - linker_kldload_busy(): allow recursion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4f924a786ae08af496dfe55230f8fe1e2ca16150 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638088582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XaBFjrepKSPZt4L7t4Vbm+z7tCj1sRUCBPrORupBcFc=; b=r+x2Za+Xpzo1k67xP0Nj/R5lXbPuyC3vgHnWrI8zjnr6Fhx5w6P+F1Coj6Pi3IqB5GOe+Z Ai7XkIQeWtlZgKaLj6+luxbWlMwnTs4FgKZpnyqLWThDl7ZME4VKjpaGJLH0PHtLF2IX+1 jyka/H8l9kNWYy2dhvx+JOwWaXNdBo8IUFWWbZyr2Og4xe7NRqDrqXbop2NLYcX4D3u3fy U/O8ztmf81/vv/vT/CziqRKnYMGOWlQ8N/Ue37aDgzO2ECmU2TAa8RBSuDPd+KYMsXFDGq EjAI+BbPJrxIVtOBFl0OvacLD985qLHSekz//hsITrdZNqJp6IImYC2PN/kqLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638088582; a=rsa-sha256; cv=none; b=uWtI4j+wg8yhwvUY+iuswt4zZ6bcovkAe8NbSZ7xHa+RfODKf07n8ggo7JkfbqJe+xsulF Npz/eIOwjORtR4/VDkyM5gy4J5Gj3k/1zzYjqSXzEvXHfwHvqMM5FQg1tL6IHtn6ZSiC9W C4CoaHVL1gby9LkqavgtcbOTUw7c18xJ+WE9P6Z3NSmRrHfZvC+n3DlAtTTuKDTZRq2BVR HoATKlUn1llsLnPXjkaFxvKVPjaeFx5I4+eKZkB/E8qWIawyo8GAvBSNSshIIAtLIbY3F+ OTAvkl1HL/LnvpdDw/p6vaXieAGjSJ46pxRClGgMil0wivUTrwY8XHgwRDv87g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4f924a786ae08af496dfe55230f8fe1e2ca16150 commit 4f924a786ae08af496dfe55230f8fe1e2ca16150 Author: Konstantin Belousov AuthorDate: 2021-11-12 19:45:06 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-28 08:36:09 +0000 linker_kldload_busy(): allow recursion Some drivers recursively loads modules by explicit calls to kldload during initialization, which might occur during kldload. PR: 259748 Reported and tested by: thj Reviewed by: markj Sponsored by: Nvidia networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32972 --- sys/kern/kern_linker.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index bcdbb467e84e..1337d2c0b278 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -106,7 +106,8 @@ MALLOC_DEFINE(M_LINKER, "linker", "kernel linker"); linker_file_t linker_kernel_file; static struct sx kld_sx; /* kernel linker lock */ -static bool kld_busy; +static u_int kld_busy; +static struct thread *kld_busy_owner; /* * Load counter used by clients to determine if a linker file has been @@ -1065,7 +1066,9 @@ linker_kldload_busy(int flags) if ((flags & LINKER_UB_LOCKED) == 0) sx_xlock(&kld_sx); - while (kld_busy) { + while (kld_busy > 0) { + if (kld_busy_owner == curthread) + break; error = sx_sleep(&kld_busy, &kld_sx, (flags & LINKER_UB_PCATCH) != 0 ? PCATCH : 0, "kldbusy", 0); @@ -1075,7 +1078,8 @@ linker_kldload_busy(int flags) return (error); } } - kld_busy = true; + kld_busy++; + kld_busy_owner = curthread; if ((flags & LINKER_UB_UNLOCK) != 0) sx_xunlock(&kld_sx); return (0); @@ -1090,9 +1094,15 @@ linker_kldload_unbusy(int flags) if ((flags & LINKER_UB_LOCKED) == 0) sx_xlock(&kld_sx); - MPASS(kld_busy); - kld_busy = false; - wakeup(&kld_busy); + MPASS(kld_busy > 0); + if (kld_busy_owner != curthread) + panic("linker_kldload_unbusy done by not owning thread %p", + kld_busy_owner); + kld_busy--; + if (kld_busy == 0) { + kld_busy_owner = NULL; + wakeup(&kld_busy); + } sx_xunlock(&kld_sx); } From nobody Sun Nov 28 11:43:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B0CBD18AEDE6; Sun, 28 Nov 2021 11:43: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 4J267j2HFTz4gfh; Sun, 28 Nov 2021 11:43:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DF246478; Sun, 28 Nov 2021 11:43: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 1ASBhjDj026191; Sun, 28 Nov 2021 11:43:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBhj6C026190; Sun, 28 Nov 2021 11:43:45 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:43:45 GMT Message-Id: <202111281143.1ASBhj6C026190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 03490cedbc6c - stable/13 - TWL: Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 03490cedbc6cf14316ac2522fddcdedbcf310297 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638099825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MKkyPvc2oJc+cl/w0dmluo9m8CAB4SMHT/yiu/KzulI=; b=fphNYy2QR5/AiiEFiahxGsYB8+PeVbhn1rdqf9G9KknGTg5MAqpEL8obTAhrXEJ63HxMr/ f6uIbOFWVckFsevYgeeHzzEkaS2OmIyA+zMMTFFcIwFP3M56g3MH0LMhwP7jd5hpmdzH7S 04La/djc0Zd6FsHDcdQkw4cTFTQA2XOCC9nXtfPxP81zvIDJE7aFehirE8Jnhq5MxFAqEZ 6BqSYGmxZ/4VWP3Lx/QXPRfiZHTVjZdHC0hsw4w1Qe8qIpmZrIUDJLuWL2E8HUI5dKuCKM iBeGbEfxu/3B03FFj9IxbciPq3bsNJc91PZJ2/+wTYpEMMcFxZuFrC1tgN9xsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638099825; a=rsa-sha256; cv=none; b=WztMjWxNbrUKERGbGzkDBHGZJMCmOGJr1dmbeuIsOvROwMXNKNZqCZ6OLfUaqwnsYcRcdp dXtiG6gXSUXo1eUQgUiD+zumacYPiIJjubpoCUKORJI6Vasc2JhBX3CkGZkzA0AAZe+5AV RiTIXpoNR9xi+ArjZ5H1hHq44vU3Vdv8oy0n4e0+9gcM4LjovkPhxf59UD6dJKDjOZzkMC SXA/ECdwZbW5Ts6cPTETgjZAvB3lmsXnM6fLbt+naZ0wByW9vF9Bb5+BJlI7jRFhryrqR+ 9m3Ite3YSAowM/eOhT/LPoKNC8UGFHBbGUGfAD0mDo8EtxzKGl3QP5Y+Qx+lKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=03490cedbc6cf14316ac2522fddcdedbcf310297 commit 03490cedbc6cf14316ac2522fddcdedbcf310297 Author: Gordon Bergling AuthorDate: 2021-11-19 18:26:34 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:40:29 +0000 TWL: Fix a typo in a source code comment - s/maxium/maximum/ (cherry picked from commit 8b11850f9d04c096d8ed3647db512f8feceefaf4) --- sys/arm/ti/twl/twl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/ti/twl/twl.c b/sys/arm/ti/twl/twl.c index e1b20cbbaa5f..c7755b524f0a 100644 --- a/sys/arm/ti/twl/twl.c +++ b/sys/arm/ti/twl/twl.c @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD$"); /* Each TWL device typically has more than one I2C address */ #define TWL_MAX_SUBADDRS 4 -/* The maxium number of bytes that can be written in one call */ +/* The maximum number of bytes that can be written in one call */ #define TWL_MAX_IIC_DATA_SIZE 63 /* The TWL devices typically use 4 I2C address for the different internal From nobody Sun Nov 28 11:43:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A077F18AF09A; Sun, 28 Nov 2021 11:43: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 4J267k2gHkz4gfj; Sun, 28 Nov 2021 11:43:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CB256479; Sun, 28 Nov 2021 11:43: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 1ASBhkdY026215; Sun, 28 Nov 2021 11:43:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBhkKU026214; Sun, 28 Nov 2021 11:43:46 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:43:46 GMT Message-Id: <202111281143.1ASBhkKU026214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: c8f21cc79f00 - stable/13 - sched_ule(4): Fix two typo in source code comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c8f21cc79f001b55469b4d6577a7cd0f927fafe9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638099826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZYK7mBQoR8/vKspK2aisdazQNQ77w8uUlQl/wiPm4s=; b=c76dpgLUtZd9pJm97m7cVey+yG7U6eCpNZ4lGAk1dmQoxyPcJHsdwaxpz7PBFYBGh+vIW5 ciWwJikYXFRf+czZBX6RziNG4nZwGSal87VnnIJZn6bAtXW/B8jJBOgW/t6a7gxthbvD0p 0ZBkhIgwnwSDoH9AC9MOMOPi9KFiZEZnizJg+dEl+Uwn4+4hNZ49UMMVmFlsibDXM82Ma6 CMAnP/TYfgNR7vFkqgutollPcaBVffA82mAybdNpDSww97v3Y2shAFaL/d4+HQfb0BQVV3 8BOrE5pSZFOZtpgjWBenE44XDCXqIXQ9g7kMFfuVtqyKnXsnNqIhtUWjdKR6hA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638099826; a=rsa-sha256; cv=none; b=Jk0wduWWvny507wC36YEqoRpYkPuJgKseobZrQIMySyCdLw9MzNoNScLrwFkV4Lc9d1gD4 u7PXWbLJJBh7uFpMJu8C1EMoi8prdQ4bNvYizZB/sCtFS1pWF5tmiOyIkqht5P6UjhPvoL EzZtwILNElr+DNailwlIwICkZLRTWJcSRaf90WxP8j0EU+b1Bydktev6n4wHvj7z4yCU4w t0eTuoCOQ2Z/De3XB+YG/j2W9f9+w/aJe4lyvFDNxiCXKMn7rIFZBzM0/lqargaGVa3fiP VrIEffnKSsUoSIsRKatcDYUFfJzJtNAee3abA0kEqqLGbpY/PYiRza2Iy/zdjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c8f21cc79f001b55469b4d6577a7cd0f927fafe9 commit c8f21cc79f001b55469b4d6577a7cd0f927fafe9 Author: Gordon Bergling AuthorDate: 2021-11-19 18:13:28 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:41:11 +0000 sched_ule(4): Fix two typo in source code comments - s/conditons/conditions/ - s/unconditonally/unconditionally/ (cherry picked from commit 15b5c347f1916d14e84765ae68921755ee930612) --- sys/kern/sched_ule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 708c19b27394..c9498cac7912 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -2020,7 +2020,7 @@ tdq_trysteal(struct tdq *tdq) /* * The data returned by sched_highest() is stale and * the chosen CPU no longer has an eligible thread. - * At this point unconditonally exit the loop to bound + * At this point unconditionally exit the loop to bound * the time spent in the critcal section. */ if (steal->tdq_load < steal_thresh || @@ -3033,7 +3033,7 @@ sched_fork_exit(struct thread *td) } /* - * Create on first use to catch odd startup conditons. + * Create on first use to catch odd startup conditions. */ char * sched_tdname(struct thread *td) From nobody Sun Nov 28 11:43:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2D40A18AEF60; Sun, 28 Nov 2021 11:43: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 4J267l3vpNz4gcy; Sun, 28 Nov 2021 11:43:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6257D635D; Sun, 28 Nov 2021 11:43: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 1ASBhlNq026239; Sun, 28 Nov 2021 11:43:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBhlMl026238; Sun, 28 Nov 2021 11:43:47 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:43:47 GMT Message-Id: <202111281143.1ASBhlMl026238@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 197f36e0005a - stable/13 - iscsi(4): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 197f36e0005af6aa83c57e6f163d10ca949fb410 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638099827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NqbYIpGXVvkDTFLpDoWrGzWpTKNdv7CCDBnW8cWCe3A=; b=RITFHojHDywzY6w3SulFsl8QR8fOQjrVgh0odksYZTdVrn0O9ww98nThkAEzzENrqq3Es4 SCw4imwQc34Drs+9mUoikZV8NKDo18b/XOO/RKwDUlZPzGiN3wofT8fuUG+pOaeZJS22wr CtwGaloEvj6cSgBtDj5lODcqvbpHzo96yDpRj3hlt7mEoQoREFEMuMAGveyj06mwTzwZeq SFic5+P97jPMHfm5mtP0u3p6EPXarMP2+xe0oXElXq87/n/Ks6tRoPqHDT42aGNs9EMIrI vyCklSrI2uZwujuO7lcMmu4An8JOAsRVa1TWIEh3oPKb5GWWpWbkNxTrzldhTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638099827; a=rsa-sha256; cv=none; b=I7P2FwGyZO7pwoxQayITjmWfPIXZkWPj1Nkbib8TfV2A9a065omKQ0cyAURblXZhUjh8y2 1OHBnqIlYcrw2PkE6YV+7nYhY1FwNfEANcXAxI7XNqQ7bT+xp9cKVsbzrSWEKSq8c8Vczg BW3J0gDymmzQVv3+jkJcstmt+qAcxTmXviFB2udojQxaXFM/ZzIhjXHwy+/aEjV8e/t193 eZe9UD40wBZtn3rxlMJOtNjod3Ua2vMiKr998vijwyLktFmZ0iNz0vZD6S9llK67l3ses6 7R5C7bcK702cgAeMERW59NAqV9GWCNDEGhgeQKucAQ7KV/OQGW303Z3NkJkAIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=197f36e0005af6aa83c57e6f163d10ca949fb410 commit 197f36e0005af6aa83c57e6f163d10ca949fb410 Author: Gordon Bergling AuthorDate: 2021-11-19 18:29:21 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:41:52 +0000 iscsi(4): Fix a typo in a source code comment - s/conditon/condition/ (cherry picked from commit 5e21882bb4e7d36ebcf0300234486a54ff4e7b13) --- sys/dev/isci/scil/scif_sas_design.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/isci/scil/scif_sas_design.h b/sys/dev/isci/scil/scif_sas_design.h index 1f2e8a851287..18c9e86e861d 100644 --- a/sys/dev/isci/scil/scif_sas_design.h +++ b/sys/dev/isci/scil/scif_sas_design.h @@ -334,7 +334,7 @@ Please refer to these files directly for further design information: The SCIF SAS SMP REMOTE DEVICE object represents the expander device and fulfills its SMP discover activities. The discover procedure includes a initial discover phase and a following SATA spinup_hold release phase, if there are expander attached -SATA device is discovered and in spinup_hold conditon. The SCIF SAS SMP REMOTE DEVICE +SATA device is discovered and in spinup_hold condition. The SCIF SAS SMP REMOTE DEVICE object also fulfills expander attached device Target Reset (Phy Control) activity. @image latex Discover Process.eps "SMP Discover Activity Diagram" width=10cm From nobody Sun Nov 28 11:43:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2799318AEF77; Sun, 28 Nov 2021 11:43: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 4J267m5l9nz4gwr; Sun, 28 Nov 2021 11:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A27063EF; Sun, 28 Nov 2021 11:43: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 1ASBhmqr026263; Sun, 28 Nov 2021 11:43:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBhmOp026262; Sun, 28 Nov 2021 11:43:48 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:43:48 GMT Message-Id: <202111281143.1ASBhmOp026262@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: f9236943e18a - stable/13 - ixl(4): Fix a typo in a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f9236943e18aba7226e0e6825575d452e5cd0245 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638099829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u4fu0WI5vRW6dZJmT86DUEZxzq41BGLL/JstpzsyCuk=; b=ZXrgoYrna/sy2pOtIZsxBZJxF4+tMdMGFOzB2Hsy/M/RJE7N0jAWI4UM3EWAO/iIJ6lBiK +IMEvA2UP2Jdr4r8L6brqZ5eSOCyVUa5KEw3svs32fsvsuXSNUJs7oZcy970iSnQPSkki4 WenYwY476XEZtZNa0DD9kLrz6O2NzAghRt9AtBsJVoETRD/maIP6u63eOxD/MHnYTzLPTQ sWdCFyh3vpTi4NKjTmuXMjQDmzQUwzsPIZ3+EwlTR8IkcJYbxolPxTfD3DeaipWwbojqbR CQ11RFfJ1hofdQVu5ELZo5NXRJhPgCo0kibH2eg/OyNPnJ4w62dAUraMyDK6xQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638099829; a=rsa-sha256; cv=none; b=v2MQZvdZWY3iMEl5XC+qLjFY2ieXrYtFUcqeBE7PFozUZ1bAsIphHQMuI6j7jzYBgueWXZ cPmtL+g33hdeNS99Y+vRiGAqlaZQBCOs62cmLs6C8P/ZnxFzFIe2EnsN5ZM5Pvrpv+wSos BV27Wj3p5wS/EbOQTbN272tVDPfz1HW/40YXBtvyynT35s0W1VFoC2E+jtKzK2bhkzyAgG CdXgc6woYtLWAaIGmFXN+L4134hLw97lYIymIkKbiEaklH6TAAFLGWasC9SkUh4Iqm8qJY HCwAQ4n/ZE0z99oEdEkVR59hFnnQkXNKTVEOgIJt+KMs94cq/RPEUvbh7eL+7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f9236943e18aba7226e0e6825575d452e5cd0245 commit f9236943e18aba7226e0e6825575d452e5cd0245 Author: Gordon Bergling AuthorDate: 2021-11-19 18:59:28 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:42:14 +0000 ixl(4): Fix a typo in a sysctl description (cherry picked from commit d7125850f031f8e763ff35c70fda310a1419b876) --- sys/dev/ixl/if_ixl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index e7e6e31a7fca..7fa2318db300 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -235,7 +235,7 @@ TUNABLE_INT("hw.ixl.debug_recovery_mode", &ixl_debug_recovery_mode); SYSCTL_INT(_hw_ixl, OID_AUTO, debug_recovery_mode, CTLFLAG_RDTUN, &ixl_debug_recovery_mode, 0, - "Act like when FW entered recovery mode (for debuging)"); + "Act like when FW entered recovery mode (for debugging)"); #endif static int ixl_i2c_access_method = 0; From nobody Sun Nov 28 11:43:49 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A6D4018AF20A; Sun, 28 Nov 2021 11:43: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 4J267p1CLXz4gfy; Sun, 28 Nov 2021 11:43:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C756647A; Sun, 28 Nov 2021 11:43: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 1ASBhnlI026294; Sun, 28 Nov 2021 11:43:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBhnqs026293; Sun, 28 Nov 2021 11:43:49 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:43:49 GMT Message-Id: <202111281143.1ASBhnqs026293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 7125ea0f154b - stable/13 - firewire(4): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7125ea0f154bd5675c9b393a21d4a4c6fb4bf680 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638099830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BmEtpmR7NhY3Drm5ROPvBbUNXmkCLFPTufaJYBsaS/w=; b=v9NMtl+UFGbVt7Oc1Rk4rSn4Wr5visAmEQ7Zzi0UEfeY81yaR6oaKVacxsEnnBROJuKHJ8 cjAo9S6KxaIF0Er6cIYEj7k9s22nVCJY1LoTTcNam8OVsYHwzzMtiysoHlHb5GyuJmkXNj pK5J3tZqEppXT0Lo166De/EVE3+/hHJ/6f6fjKvUP/uDlL91/TvTd4ToSeExztzktpNZKg r8ldbvFEBpN6kPoYHM9teyZSDsXdiCTzDTrVwPSFUUG+R7p5qD6oXIHXTyKt7a7jaWh6tJ yfPcUA5xSO7uCNR2n8d5UsT0VY0Yp2t2h8WD5Pa6/QQiz4DlJNQXfwdz/ds09w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638099830; a=rsa-sha256; cv=none; b=RcLZY9ZIUO0Uyi4MFukR/gp1Em3GTJ3NPU9SWdzhuti7j7rWN8kN7++MdiRmplSOlF17+3 pnOLn2T92H2Si0NRbwTRf/YJ4LdLeUJSYBY+1w1djtniNxEL/Qo20AmrLrG1y/zxj75vMd civBwMjTSY5zBTRYX8V7v+O/LYKVDx1XXMv6iRs15M1IAgxeJ2LDhzpqbuQqMz6okuDFrv W0ym88tSBsdWtcGL3pm74C0ekX6Cm8TYFRiZf+thDQLz3RgGcsk/meudqwPsYlcm5exnc0 DNt+UMkVIvFEsBgihUgwv5mGRjIgKt0Qfcu15R6jmieJpRwJ2AFWBnfeidEtiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7125ea0f154bd5675c9b393a21d4a4c6fb4bf680 commit 7125ea0f154bd5675c9b393a21d4a4c6fb4bf680 Author: Gordon Bergling AuthorDate: 2021-11-19 18:50:56 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:42:33 +0000 firewire(4): Fix a typo in a source code comment - s/unavailabe/unavailable/ (cherry picked from commit 3e5ddef0fd391049f378456e10a0cea015652bc0) --- sys/dev/firewire/sbp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/firewire/sbp.h b/sys/dev/firewire/sbp.h index 93ad991e3a76..f50723556763 100644 --- a/sys/dev/firewire/sbp.h +++ b/sys/dev/firewire/sbp.h @@ -126,7 +126,7 @@ struct sbp_status { #define STATUS_LUR 5 /* 6: Maximum payload too small */ /* 7: Reserved for future standardization */ -/* 8: Resource unavailabe */ +/* 8: Resource unavailable */ #define STATUS_RES_UNAVAIL 8 /* 9: Function Rejected */ /* 10: Login ID not recognized */ From nobody Sun Nov 28 11:43:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0598718AF1CB; Sun, 28 Nov 2021 11:43: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 4J267s2w44z4h0R; Sun, 28 Nov 2021 11:43:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A41163F3; Sun, 28 Nov 2021 11:43: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 1ASBhris026366; Sun, 28 Nov 2021 11:43:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBhqlB026365; Sun, 28 Nov 2021 11:43:52 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:43:52 GMT Message-Id: <202111281143.1ASBhqlB026365@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 654f47cfc0a6 - stable/13 - ffs_softdep: Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 654f47cfc0a64c86241a4d1f7a2a53a3829ecbfa Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638099833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ybxtQqE0iVmH6lwyAGSBMMlihVhaagt/Nz3SEnNXIE=; b=AeOKdrBBI9yC9m1U2F4RZr9LK3s/iiBOFWGXdKKtJoJ73BK/kPLpBNiml9goAZUcprDx5/ FyJdGYBSsYhyOa/th6du8aCznjVDSHf9jXufExYzj45MO2kJ6qGm4uluBDR0Kt53Dw+yGY 0P7xOW8pX/XRBOulbNI2ubrDB8p22neNmHa0SPVLGFKQH3HvoTB1dMkaNBIqNwY6mLd/bZ r5lqotafi7+rUKQnF9QYy6K5/uDmhvMYnKMMQ4p3uPJP+8a+be+OPji/qh0fLTt+QlMwFk xJxBQ2TU+HDHkmz/pA2aa6wnDa6iNrR3xrWSRrV5ty+RJXbyHSQ2RLzbzTZwRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638099833; a=rsa-sha256; cv=none; b=a8zYMpXq8zeCqcmGynGs/7CpCB544y1cVFwt2CtdB+vnRqPKa6XTjdqj6hmilarkRAY6im VDWi5pQlXYbY8l2tx5ISkLQwaQpjRRSwi6HzgQybp0w/PQfZ/61okQCwT0b04Nk+zYiYLn P7k59uVSoUa6YCwhuNVrLuk0+NLnnVWbmCEsdFVexTf4s6CAYI1++G5d+N2gydJtAVGd5b 6JaLGMAZD1TyS4wLZNm+JW7seeEYh91Lm6VQ40fIbMcwyinIIvaPgL9wcvPuzjUOvhz1sh Gjvon2GxjFMtNserOhxcbUVqapMN/tIemN9MF0wJ36yyoVrho7TTsvLQT4UWpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=654f47cfc0a64c86241a4d1f7a2a53a3829ecbfa commit 654f47cfc0a64c86241a4d1f7a2a53a3829ecbfa Author: Gordon Bergling AuthorDate: 2021-11-19 18:17:41 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:43:32 +0000 ffs_softdep: Fix a typo in a source code comment - s/conditonally/conditionally/ (cherry picked from commit bebff615877efdf549e5033b47ade4d8553f6a77) --- sys/ufs/ffs/ffs_softdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 0d2de850bd3e..8bc5e409cf04 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -9196,7 +9196,7 @@ complete_diradd(dap) /* * Cancel a diradd when a dirrem overlaps with it. We must cancel the journal - * add entries and conditonally journal the remove. + * add entries and conditionally journal the remove. */ static void cancel_diradd(dap, dirrem, jremref, dotremref, dotdotremref) From nobody Sun Nov 28 11:43:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8EBAB18AF2B8; Sun, 28 Nov 2021 11:43: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 4J267q0Nm2z4grb; Sun, 28 Nov 2021 11:43:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAB1363F0; Sun, 28 Nov 2021 11:43: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 1ASBhoJE026318; Sun, 28 Nov 2021 11:43:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBhonw026317; Sun, 28 Nov 2021 11:43:50 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:43:50 GMT Message-Id: <202111281143.1ASBhonw026317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 43c4228c970b - stable/13 - lpr(1): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 43c4228c970b07ec1280a0e43783fb12e4296fa7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638099831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zxYjnnVNQrAskHohbkusEz84jFTwrje5me9xhlF5es0=; b=XrVHB9dwsEXtjJaCHL32jkUlWhQXy2Cfz4g75Tz1dIGdfEXOG6NWWud1Aqne32J4N+pBau CgB4PGMijx6EAgIXiLPc+1nHaPGmwgp1eEUFg5W5W6da5RN7mBfVqh192l5YBbit2n5VrR FMgFwLY8swUBw0SnpnECsOIl21H5oIX/GJ4ffzjIZANeakoTcFfEO/VudzXhS5ttrMTZ6b Ch4AglFty0G7C7Ocw21QoRz3r8PmjCFoWL0AM+JNlNU/Vxd9MUqAhc1lg15RVSOtQSorr3 ORJKDt3EH8BBdTxDhd+hO0psnGg2qoi+3AnkA+7LI+ZYfSfeDE83O+VU7skosA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638099831; a=rsa-sha256; cv=none; b=VTQei3xj5bnWoV0A7ME4VxzJ275XlKjWoT3+dBaPV+BNX96pWMN7ZNMq7K92m5MbUR/RYR t4UQ/n0hUgmi7FXBgvUJnpga57V7Pm3P/n1ZHFX0W382zEHfKASR351bGXUqzr9ujZux8o lqABo4uhYlMR3kxgdUJMTVvl4i9LCMwC1+3TovRdiHCCpHkfaUXB/WoRfD1hFSJgLmokBl JC1Z6I51Z8JCiFKvoo1yKIqzX2jGQxKcUMSCOd+GP3dLldgmm9fShslLF9VqtpaUE3c2y8 xM7tasG53G8oGWKdt42hennLSfuV+E5eg0Wn7i1tRXkdi9YE/4gcWF+vroS3Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=43c4228c970b07ec1280a0e43783fb12e4296fa7 commit 43c4228c970b07ec1280a0e43783fb12e4296fa7 Author: Gordon Bergling AuthorDate: 2021-11-19 19:04:09 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:42:53 +0000 lpr(1): Fix a typo in a source code comment -s /debuging/debugging/ (cherry picked from commit 840d72371bdc48be58152c839160c492bef7f1b7) --- usr.sbin/lpr/common_source/ctlinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/lpr/common_source/ctlinfo.c b/usr.sbin/lpr/common_source/ctlinfo.c index d1f828e5ed99..15fed7bc32ef 100644 --- a/usr.sbin/lpr/common_source/ctlinfo.c +++ b/usr.sbin/lpr/common_source/ctlinfo.c @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); */ /* - * Some define's useful for debuging. + * Some define's useful for debugging. * TRIGGERTEST_FNAME and DEBUGREADCF_FNAME, allow us to do testing on * a per-spool-directory basis. */ From nobody Sun Nov 28 11:43:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 986E118AF348; Sun, 28 Nov 2021 11:43: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 4J267r1M0kz4gx7; Sun, 28 Nov 2021 11:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E07B763F2; Sun, 28 Nov 2021 11:43: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 1ASBhpWC026342; Sun, 28 Nov 2021 11:43:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBhpTM026341; Sun, 28 Nov 2021 11:43:51 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:43:51 GMT Message-Id: <202111281143.1ASBhpTM026341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 18e627e9c753 - stable/13 - ppbus(4): Fix a typo in source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 18e627e9c753684d6543f492c4d05caa282aaa56 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638099832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bo/hyK3q9EnketJk8KnlGVfO2VlKath8eY//GNX0BV4=; b=NqnXrQqG+ZxBbnBqeQdTDFKoCJzoMHAA/8CYOFd06lw1T0P4LCx0JANedfFd7+BmTldgtq Ef5eLk2+lDPh6CuSTrLV3AVQfSMz7tHNdmD/STd+9QWlxVzD63nAz12iDU32+JMFBPHM4S lFEYg8Dg+wM4t6syzVQYUP8oZdtsMX4L8uJYMhxpo+FJJ04cTYEzwz9qSM4gVwvk3tXXtW OPszjXo6Hi1fN6u5jUgDeW8aXYYjRIM1VKTCPB48NA/3tUgfvZQh1W9SPC/QyoSa+q7MlM V7rVRNTchX52Cr7FMh5bYE02IYfw1lNEbwIjs9EKy33JDNdk6+ZJFsXsfFv9HQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638099832; a=rsa-sha256; cv=none; b=e66qXEpYC393aWtHJWXe/Q99htrTi+EQL4SXGge4fduWbNZfneaOmkjHDzVNueqfQtDagF Hm6fllH7Q65ZphbETU/3LIc0DvlikH/x+wZelw0hgJzHWqI6KTxMJidsMnQMOWSBbzM+Fq 6E3elXpOG/QA12emdrP8/A5Ut4U8+AASChYWP4mhcOUuwfelIX3WX8KoOxvhhIV7Qn8HBc twbnCtGB75k4T/++YJNiWW47UpjhkmXrZDmgtUYMlF3uMuGzzDrPyQg8aFz1zQrZ8av+Rz 2VKZ4wRbl0F/CRSZMvGMjH7IcpjaZbq3dVhtAPNt5J+ereOqHQarMFQjzeKRpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=18e627e9c753684d6543f492c4d05caa282aaa56 commit 18e627e9c753684d6543f492c4d05caa282aaa56 Author: Gordon Bergling AuthorDate: 2021-11-19 18:19:36 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:43:11 +0000 ppbus(4): Fix a typo in source code comment - s/quering/querying/ Obtained from: NetBSD (cherry picked from commit 975e2e3f84b0b7425185c9bb43722da779e8cd98) --- sys/dev/ppbus/ppb_1284.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ppbus/ppb_1284.c b/sys/dev/ppbus/ppb_1284.c index 5752e4599a8d..52dfb27931ed 100644 --- a/sys/dev/ppbus/ppb_1284.c +++ b/sys/dev/ppbus/ppb_1284.c @@ -737,7 +737,7 @@ ppb_1284_negociate(device_t bus, int mode, int options) goto error; } - /* Event 7 - quering result consider nACK not to misunderstand + /* Event 7 - querying result consider nACK not to misunderstand * a remote computer terminate sequence */ if (options & PPB_EXTENSIBILITY_LINK) { /* XXX not fully supported yet */ From nobody Sun Nov 28 11:48:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A900718B37DA; Sun, 28 Nov 2021 11:48:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J26Dt2V70z4lDn; Sun, 28 Nov 2021 11:48:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 362A863F5; Sun, 28 Nov 2021 11:48: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 1ASBmEJh026910; Sun, 28 Nov 2021 11:48:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBmEPG026909; Sun, 28 Nov 2021 11:48:14 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:48:14 GMT Message-Id: <202111281148.1ASBmEPG026909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 27e280d90d22 - stable/12 - ffs_softdep: Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 27e280d90d227e6fbc78879f3128e417f8c3cf96 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638100094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kjgUIAKFNpHo4qX9Xb3TwpPFNX0uX2BWRXcjCSsyqI8=; b=RK8OAXKeWxymXBrVjmChGExKdF7/9VxU+wGe7kyH1j36/VabCN4RTf2SboTMx/17rbIYEU GaQE3ZdJv0azrBJHvFxgEiWwzIXzXVjRnWp8y4RrmCef8fJfNOrXSfah1TuQEQcnDT8sHz 5z/1fqAVjXEz8zSBewt5rYDTGTdBz3ZDLrgU44oQsEjH1Kq5HztA088p7jaRWg/kUedMQ4 hpa3OHA03ex3K3kHCrkmbGlfKAYdRrZfUolv+MLu4mior28f/CFOqlUIP/WOkkmk6XUmB1 foK8aPSOoJgsPy1rJeY2kKvIc40mUjNiZSN2mElV+GVrnGNymSa8WW6BDwI73w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638100094; a=rsa-sha256; cv=none; b=fr7r1eQf3adg+XGowvClxKsvDYAGhUI3vKLzizKSoNREIPAk53myy/ae9FfeUSjsaXnqJ+ O7th3tKXX5iO2KszMGm2dKc7oPQZCwYgVGcNN5EYTN48TtTK6nq4V8JvYezBKPxzslUqMF OICYmjGUsXEbtRCMvq5vfRBcg6NbiLSpVI5kCuumCgmbd92ntPFzSqfDQL4rx51gjOJjIp 2y2qA1wdJ7/SuHrfn2K+HytqI+x1Q6vQm6IBHvLsTLXSjXuixah1MumcDybxdZJTzNvpip tmWPvxJhlJEdVLHwD1yCiSnBg01RET7bEvXKoytKAXZQckzCn6TqTo7vooSLVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=27e280d90d227e6fbc78879f3128e417f8c3cf96 commit 27e280d90d227e6fbc78879f3128e417f8c3cf96 Author: Gordon Bergling AuthorDate: 2021-11-19 18:17:41 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:44:45 +0000 ffs_softdep: Fix a typo in a source code comment - s/conditonally/conditionally/ (cherry picked from commit bebff615877efdf549e5033b47ade4d8553f6a77) --- sys/ufs/ffs/ffs_softdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index bc83b92ee384..dc9c507ac11c 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -8804,7 +8804,7 @@ complete_diradd(dap) /* * Cancel a diradd when a dirrem overlaps with it. We must cancel the journal - * add entries and conditonally journal the remove. + * add entries and conditionally journal the remove. */ static void cancel_diradd(dap, dirrem, jremref, dotremref, dotdotremref) From nobody Sun Nov 28 11:48:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 421AE18B3924; Sun, 28 Nov 2021 11:48: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 4J26Dv4NSHz4lV4; Sun, 28 Nov 2021 11:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60D5A647D; Sun, 28 Nov 2021 11:48: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 1ASBmFsD026936; Sun, 28 Nov 2021 11:48:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBmFZF026935; Sun, 28 Nov 2021 11:48:15 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:48:15 GMT Message-Id: <202111281148.1ASBmFZF026935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: fb93bffd8ab5 - stable/12 - ppbus(4): Fix a typo in source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: fb93bffd8ab5db20049177665275ca6591a8869b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638100095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sEmypE1QCa+QhfX9f7uWlGOqWmQby+zGVmvRhMwNXyA=; b=d6IKPLnREEuQsPm2ueQH5JZk0DSnWPrvl1fWPqxaldsa+mnZD5Jp81/WBwdPQGwy5LFPyV ZP37nqVh+2l7BVPOeAarHBzGt5/QtobdrJjlXwShnIajBc7cgvegjNe9EC543doeX0Pfcy Osoq4Hy5jwb9xRTO+TQURfyK5lNlB8DmgTOXnBZSk7K24Z2ln2SDDcgHgp6D7Bym21a7nD gGnENfgd5scwk2DEbXEYzljpHfGHSWdGWSLpoc/gy/GpIgCuCrmgRcs1Kue44sjuU0wDh6 9CZGKAB+Xp5NIhnZsS4G48ZZfkJVq4HV+lBoMfXxVBuYkkUrBnhoS2b50hvfSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638100095; a=rsa-sha256; cv=none; b=ncQbfli5KRlvqEVQuE4zQCfljc1X25pkW2Qvu9SeMvd06Uh29x7wikN3rvpGd+A/sSl1Hj xEkCiKyg6FCAqMaJ8Eztw2Jecu+J33aTQweqaSK9AfBtBu5axJgfcDdLc0NQ4NeqcYnj7f yIaHwsmllXujgO/llkOAaDeerMtATuOv1pKJ/+lkKgaAPAvXtxruDG32uZ1g8nQjiEryrM ZVFDnPwS9OMrY1ksTq+FgnT0P4AJIWF4Bk7TMoTTTCGG+tSUNTZGuDx7aEuuKU4ygksFML XTur7zZ+iAgpdAxCp0q6e128Pf5q7EeAeh6jPUZez640JIeS4RHPtRtw71+q2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=fb93bffd8ab5db20049177665275ca6591a8869b commit fb93bffd8ab5db20049177665275ca6591a8869b Author: Gordon Bergling AuthorDate: 2021-11-19 18:19:36 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:45:05 +0000 ppbus(4): Fix a typo in source code comment - s/quering/querying/ Obtained from: NetBSD (cherry picked from commit 975e2e3f84b0b7425185c9bb43722da779e8cd98) --- sys/dev/ppbus/ppb_1284.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ppbus/ppb_1284.c b/sys/dev/ppbus/ppb_1284.c index cd46b36c5473..c16b90e7289a 100644 --- a/sys/dev/ppbus/ppb_1284.c +++ b/sys/dev/ppbus/ppb_1284.c @@ -741,7 +741,7 @@ ppb_1284_negociate(device_t bus, int mode, int options) goto error; } - /* Event 7 - quering result consider nACK not to misunderstand + /* Event 7 - querying result consider nACK not to misunderstand * a remote computer terminate sequence */ if (options & PPB_EXTENSIBILITY_LINK) { From nobody Sun Nov 28 11:48:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 74AFC18B3A9E; Sun, 28 Nov 2021 11:48: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 4J26Dx081Zz4lGx; Sun, 28 Nov 2021 11:48:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DBC26749; Sun, 28 Nov 2021 11:48: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 1ASBmGuK026971; Sun, 28 Nov 2021 11:48:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBmGrv026970; Sun, 28 Nov 2021 11:48:16 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:48:16 GMT Message-Id: <202111281148.1ASBmGrv026970@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 09a5ae5dec01 - stable/12 - lpr(1): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 09a5ae5dec010c13ba4cdf7bb9af96268d07de0c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638100097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Je/C1PDeAULqTRKoocaTt+3ewQ9+dCpaMF1JF25FKsc=; b=KL3yTD9pWI7TEqOirpf4yOIIYz0pse1kW+TodffAUwDtKBzKDK11gNDbBUcEoGpEy5g8sU Rt20P0pJHQzAazgCQlXJB2tgXMkmmcqbwm3/Ckj8M7Kjtn8bCsH0rAqN9yPOQwoHBsqAxq fYg3A81c7M3GT+MNgMfebLCwmWoDPOii3F8OPJk13e6n0XSYFClxHFYuozT6yGyI+glrIM o7mjQ/x9ZVRN1tNktdg4p/+Fv8BHI8UquESPlPwy2DjJPe1Lmpdzx+Mmd/cEWqLLUNI+RP 2ehpzdhom6hQb6JZ96RQPkqOCh0NbyrupzoSmfltx+1kHp6C0XwHNwsaY95XOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638100097; a=rsa-sha256; cv=none; b=DO6Gy9pUSPu3T0LFfuTLSrM3lxB0eHbS0jderGDFuBWcZOjyOUBUwR0aTKkCsMWGUm0ENh s6yR5d4YdbUbOr1b4VGiq/j/pGdfcy+3de+OoAyUPzxQGUnxtfUHjNjM7Al8GQPg7hvnxI HKoDOvG4fQV5U9o46EXxbDUJc1wKClsH5ciph/bIUoMdfwT9N+vQsWpK12VhrFMN8FoZoc o+GqjPoi7V/DXfmYWJv5toKdVUtMcGOrgIJ1TES1jHCQkM58GOCpwmd7UxI1+qtdOX4oIe VKpjuZFLuETrjUayv3ci2dbHdB4w5ULRi2/v1nRddNTQwSpdtq4B62b9StUF9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=09a5ae5dec010c13ba4cdf7bb9af96268d07de0c commit 09a5ae5dec010c13ba4cdf7bb9af96268d07de0c Author: Gordon Bergling AuthorDate: 2021-11-19 19:04:09 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:45:48 +0000 lpr(1): Fix a typo in a source code comment -s /debuging/debugging/ (cherry picked from commit 840d72371bdc48be58152c839160c492bef7f1b7) --- usr.sbin/lpr/common_source/ctlinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/lpr/common_source/ctlinfo.c b/usr.sbin/lpr/common_source/ctlinfo.c index d1f828e5ed99..15fed7bc32ef 100644 --- a/usr.sbin/lpr/common_source/ctlinfo.c +++ b/usr.sbin/lpr/common_source/ctlinfo.c @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); */ /* - * Some define's useful for debuging. + * Some define's useful for debugging. * TRIGGERTEST_FNAME and DEBUGREADCF_FNAME, allow us to do testing on * a per-spool-directory basis. */ From nobody Sun Nov 28 11:48:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7485118B39F2; Sun, 28 Nov 2021 11:48: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 4J26Dy1bRgz4lH0; Sun, 28 Nov 2021 11:48:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0AB76889; Sun, 28 Nov 2021 11:48: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 1ASBmH2Y027000; Sun, 28 Nov 2021 11:48:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBmHvp026999; Sun, 28 Nov 2021 11:48:17 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:48:17 GMT Message-Id: <202111281148.1ASBmHvp026999@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: c7b5149d47ac - stable/12 - firewire(4): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c7b5149d47ac81545c23aee8ec13db8b75bc0a2e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638100098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vxzzw6q9/ZzN8og5NxlI5puU1GEqvAdMlVV66Nu9DMU=; b=Uws6+pvgp6rKR9k0BRUs+GysRhc917aX2DenvRvQpmT4wbFiJqdgbWaMij1PDJV/5OK9Jd EZuiQRLedeHJ/oHkGnumje48UrsMSU7D5ayLY14TtX9okOziIWdFI7yaGZHbL/X0bXuQhm besNjV7B9L5aLEyZsZ2fs+jIVOxtPuQ5hFcSMQ/R6WgF3IuwDg1AnD8K4BjCVfDZto4MGB GUCIm+/XNpkI4iMU+FIiK+ufx6Bs32Vm0gLKGWBQcAiMvcCAVOqzXzKk4P7zg4v7V/pjyL d8lTxZTh3swGmKnQ8rHj5Iu4PN588PyFj/u4i+AU5v+TnFhVkpk2/laFQZ3wdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638100098; a=rsa-sha256; cv=none; b=fMQHOlspBTSR2Edcdweu38uvNHC6OK/Ii4p+X+RcKNLi/ftItZYj8mMoE0DFQqFU55+OqM 172WfE3SZUYBN10cq8JzyDiODtLwdR6SLFN5uK7Pcqk6xX3rXKY9WkOvC3KTWZap1MycxZ yFhWRpA59zP+rmyoPbKQiJ89Bq34CrcetVvPbBFmC5JiauuxsPtBLW7WJw2LYoM6wg9NIQ rZxle+hbmP/ZVJI2KWMfY+p6S1ncQ03zlaSvk9ileZmQ0aa5V7c95Pq+vq+e/K4lKB1Co+ O3a+VQRjEwngZseXj0xQcIRP1OlMhWuddJLISAqfShItJoPQHuphOPTWZ6oX4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c7b5149d47ac81545c23aee8ec13db8b75bc0a2e commit c7b5149d47ac81545c23aee8ec13db8b75bc0a2e Author: Gordon Bergling AuthorDate: 2021-11-19 18:50:56 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:46:15 +0000 firewire(4): Fix a typo in a source code comment - s/unavailabe/unavailable/ (cherry picked from commit 3e5ddef0fd391049f378456e10a0cea015652bc0) --- sys/dev/firewire/sbp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/firewire/sbp.h b/sys/dev/firewire/sbp.h index 93ad991e3a76..f50723556763 100644 --- a/sys/dev/firewire/sbp.h +++ b/sys/dev/firewire/sbp.h @@ -126,7 +126,7 @@ struct sbp_status { #define STATUS_LUR 5 /* 6: Maximum payload too small */ /* 7: Reserved for future standardization */ -/* 8: Resource unavailabe */ +/* 8: Resource unavailable */ #define STATUS_RES_UNAVAIL 8 /* 9: Function Rejected */ /* 10: Login ID not recognized */ From nobody Sun Nov 28 11:48:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1B70E18B3956; Sun, 28 Nov 2021 11:48: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 4J26Dy6p0Xz4lBG; Sun, 28 Nov 2021 11:48:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3E84674A; Sun, 28 Nov 2021 11:48: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 1ASBmIP3027035; Sun, 28 Nov 2021 11:48:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBmIDQ027034; Sun, 28 Nov 2021 11:48:18 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:48:18 GMT Message-Id: <202111281148.1ASBmIDQ027034@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 7ab9bcc23db0 - stable/12 - ixl(4): Fix a typo in a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7ab9bcc23db09aaa895b0e3fa65f134cf38d9504 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638100099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QHpUaRYTUkcbXwZvbJFlVpXAGtcwm0N4ifviK4KMDgA=; b=wLSORp/6YLaEFkVfBaKjjBJ9wdOR0WFnk1FRXajZNus2FhTqDgywv3lL7FJ6GcYhBdwroK UB329k2WySvh9bd0p/lfC7g5DZT/gKK8NQa5BOYcV5PHDEYRsfzRbpHErpq3UnQFbP1Woq II37THk5VNpdAResujRSt21WdLZFspKuJOf9kjrSJbG3zgR6lanZL/+0GmgcfI6WPyRtjm U+VwXvtuxd7iBNcaKn4t/aaoqmScxwzs1wKvctZBcSSP6qsp3nOQoqdaPx0ctC6qDBUjWl RovKERFpInL/Pd+gEoK6MPEME3yLfrvFHgr8xocCV0uwOgmZ5TwGuk2AbRZzCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638100099; a=rsa-sha256; cv=none; b=s7kQFvDSfRltBazzSXSkxDHNXxnDn3Pd7f7S3pEgCOKfpA6OIWKUgJ0xe//zeg8NnU2NwG 5JVGk3x4fj6dveUykgkVMcxFZd0ZUT5NWYlre+FuvOzjq8BrwT2BJYR6XXcqhVjK32bPsn ld6Ee4RnDPybydadFenGtRr31hN3UQsLSE6w/czsk5rCZxeHPBetBNuTGUOB9ylkiMgI8U dZUd3XSesaZuzE4flytMy7qmWVPKhZ8iMCrjtf4MI2ODDA31xVVz4Ia/9+FyC+R9pdua+U o1dcDIAIi+JcdsvG9Y9c7SauWMvJSNLW/0R0Cf9j1f8pWUVvDNQerN7xjdka0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7ab9bcc23db09aaa895b0e3fa65f134cf38d9504 commit 7ab9bcc23db09aaa895b0e3fa65f134cf38d9504 Author: Gordon Bergling AuthorDate: 2021-11-19 18:59:28 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:46:36 +0000 ixl(4): Fix a typo in a sysctl description (cherry picked from commit d7125850f031f8e763ff35c70fda310a1419b876) --- sys/dev/ixl/if_ixl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index 52c9dd293e6b..dc0163a44dfb 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -236,7 +236,7 @@ TUNABLE_INT("hw.ixl.debug_recovery_mode", &ixl_debug_recovery_mode); SYSCTL_INT(_hw_ixl, OID_AUTO, debug_recovery_mode, CTLFLAG_RDTUN, &ixl_debug_recovery_mode, 0, - "Act like when FW entered recovery mode (for debuging)"); + "Act like when FW entered recovery mode (for debugging)"); #endif static int ixl_i2c_access_method = 0; From nobody Sun Nov 28 11:48:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5CA4118B3AF6; Sun, 28 Nov 2021 11:48: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 4J26F05vVlz4lXL; Sun, 28 Nov 2021 11:48:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDB4563F6; Sun, 28 Nov 2021 11:48: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 1ASBmJBQ027145; Sun, 28 Nov 2021 11:48:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBmJ7O027144; Sun, 28 Nov 2021 11:48:19 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:48:19 GMT Message-Id: <202111281148.1ASBmJ7O027144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 143b0e9b16c9 - stable/12 - iscsi(4): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 143b0e9b16c999430ce5f3c156cc6ebfa9ccbc50 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638100101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=85wxUgK7Fp4zNyxl1DKmSlXU+LsfvLOWFHa6y0lBRig=; b=mW4q7ntDRYptAqhlPy0Vtq6a8lzCMHZWoCE2+PmrHASJdI9XM5ERTf4L4NlpnA0AaZrezj kk7CoD1O3jjMbCuYEHjwbbiyRI4lg0GnslizwkRp6HwEDrG8uGAOTUb5JJpQslYbTlwUhM PElqhQQLnpdphklmtssu8LaBbaAe2bItMYfi8hw4yWEuAIlq/Yv97EJO4rVpDr7GPjBjZw Tae5XnBIG+vcOL0p1HES2nR7aCl7xWs9+6EDxa0Up791ZBOCRLeWcHefXIqvskMgLNB2hZ HFSrluQ/AgKAZ4c9TBBJLalXKwJje448eHj090yvADMssf6+kPN8UuHFQ7qToQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638100101; a=rsa-sha256; cv=none; b=vHkQQI892q7YWJhakR1DHc8ds2vbEh4i6iEig3qOEIYLc4UT42HziV/brwxCyIwMFiv1Cw iDupNcdP7SbQeyFjMpKpm1YIPrVHOu+gy6BS8UdmBktcefJcXaW2A5+NHyLded0f/+YE2U Q1pXvdzrFsx4dr7rlEVPip5dIy+woNyMk2pD/4bHlO47KLVydIaLbRFD6V9SKoyKw1dcmw CSaEdPVSWwwIVK8VEKSY2VamQWSw1YilDDGail4E+INUPiT765ObE2eGHACKSwSf7u8Hpv dTRjOiX7YNS8X+mSRDJoY2J8C92SlzQOvuOlGpGjlK5eIAUwU0uQzVFCXLgqgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=143b0e9b16c999430ce5f3c156cc6ebfa9ccbc50 commit 143b0e9b16c999430ce5f3c156cc6ebfa9ccbc50 Author: Gordon Bergling AuthorDate: 2021-11-19 18:29:21 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:46:56 +0000 iscsi(4): Fix a typo in a source code comment - s/conditon/condition/ (cherry picked from commit 5e21882bb4e7d36ebcf0300234486a54ff4e7b13) --- sys/dev/isci/scil/scif_sas_design.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/isci/scil/scif_sas_design.h b/sys/dev/isci/scil/scif_sas_design.h index 1f2e8a851287..18c9e86e861d 100644 --- a/sys/dev/isci/scil/scif_sas_design.h +++ b/sys/dev/isci/scil/scif_sas_design.h @@ -334,7 +334,7 @@ Please refer to these files directly for further design information: The SCIF SAS SMP REMOTE DEVICE object represents the expander device and fulfills its SMP discover activities. The discover procedure includes a initial discover phase and a following SATA spinup_hold release phase, if there are expander attached -SATA device is discovered and in spinup_hold conditon. The SCIF SAS SMP REMOTE DEVICE +SATA device is discovered and in spinup_hold condition. The SCIF SAS SMP REMOTE DEVICE object also fulfills expander attached device Target Reset (Phy Control) activity. @image latex Discover Process.eps "SMP Discover Activity Diagram" width=10cm From nobody Sun Nov 28 11:48:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E141618B3D16; Sun, 28 Nov 2021 11:48:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J26F25qjWz4lMR; Sun, 28 Nov 2021 11:48:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 079B463F7; Sun, 28 Nov 2021 11:48: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 1ASBmKwq027192; Sun, 28 Nov 2021 11:48:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASBmKqL027191; Sun, 28 Nov 2021 11:48:20 GMT (envelope-from git) Date: Sun, 28 Nov 2021 11:48:20 GMT Message-Id: <202111281148.1ASBmKqL027191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: df533f4a54d4 - stable/12 - TWL: Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: df533f4a54d471bd26916728d5929a535c68ed46 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638100103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fm7EExttt3RE9F5q/hcY26e4g72qgtypzNiLVgihBhc=; b=O/8Mt6kfkfx88vfHbqbM7nHVXz7Eq+avuwipSDdxmGcG3ZzSwvhuXAzmPoOVlq+Ghf0Sme 7j0wO8Bt6uNqaS1UTS+xaNWp5MIJQQ/0WiuD/xr6v8PkIpBBARPSyZL/8UJguzZff5Reu/ PCO/nraVgXAXMOb9uh7e+jktqRTfr+x+sls0z+U/KXjqJIDhsOUrWIs+mKallYpArAQ+4k hQeFRLSV0vGwKyVyh/aG6cRvlfJ13FxRRCV02F9WpZkTQh8c4/QMcSHHB1vzajyh2p7iOX c+VZLS2dsuH08GSpYABpUOvjpUGkmTvdFdIaFtw5LbfVJR24KAS4FsPhNhTzUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638100103; a=rsa-sha256; cv=none; b=x0yZkRqWqBJ6AOw8OiWw5iYIQXrWthY2oyD4/YjQxQj0ibfxqOfqQcAGVUvBkLe3uk07QU GwEAxWgvzirAmYJy8C9z2B0/884zTe5Jh/55lBooVBY3pZr4iw8kEYiPF5xJ1JgRreN8aI 2y1bDk0CJsrQOzT+7HpytbjwLR5H7O2iD+OuWQGhmT2/gp6Dy8f4+ViRVooOGUogwjCY7i PuIUNizBD690OnEsa3Pq0YLynQT8L1OVi4S/rZ4WEz4dXAJ0QgIeXdSzix2YS0BRgDkf1h uKDhyG2gharJ5lTMvTKNg5N8bt1dvre+q0SEzWVJeHuoOIH4wxZYS+tT3bSfmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=df533f4a54d471bd26916728d5929a535c68ed46 commit df533f4a54d471bd26916728d5929a535c68ed46 Author: Gordon Bergling AuthorDate: 2021-11-19 18:26:34 +0000 Commit: Gordon Bergling CommitDate: 2021-11-28 11:47:36 +0000 TWL: Fix a typo in a source code comment - s/maxium/maximum/ (cherry picked from commit 8b11850f9d04c096d8ed3647db512f8feceefaf4) --- sys/arm/ti/twl/twl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/ti/twl/twl.c b/sys/arm/ti/twl/twl.c index 50f2bd9ea513..b1438bf82b2c 100644 --- a/sys/arm/ti/twl/twl.c +++ b/sys/arm/ti/twl/twl.c @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD$"); /* Each TWL device typically has more than one I2C address */ #define TWL_MAX_SUBADDRS 4 -/* The maxium number of bytes that can be written in one call */ +/* The maximum number of bytes that can be written in one call */ #define TWL_MAX_IIC_DATA_SIZE 63 /* The TWL devices typically use 4 I2C address for the different internal From nobody Sun Nov 28 16:37:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CB04018B6843; Sun, 28 Nov 2021 16:37: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 4J2Dfz3lcNz3m1H; Sun, 28 Nov 2021 16:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60985120FF; Sun, 28 Nov 2021 16:37: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 1ASGbl8Q013603; Sun, 28 Nov 2021 16:37:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASGbl0G013602; Sun, 28 Nov 2021 16:37:47 GMT (envelope-from git) Date: Sun, 28 Nov 2021 16:37:47 GMT Message-Id: <202111281637.1ASGbl0G013602@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: b8cf1c5c30a5 - main - Remove options VESA from x86 GENERIC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b8cf1c5c30a5e6da4e2c9702ffd607a90453fb33 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638117467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GPlVPwcgJmESSNHiJGTuhTP0AFfIMzoQMwauIDvYlNk=; b=dZnpCbUNdl/OGKpj9QlcUcb+oLPLDVOLndAgwVREIzdnp9gqnlFowUFo0i/jDX/2sZc+p1 H+QOQXfE51OhqHovEXdYL+oOrja7m33Nqws/L80TRVI4Wr4putXFYFVb8Romu59a9kSg7p z1WuhgwGvVAIUTJavbJ+1AkOJELJOIqBMdF37y0/m2Ubscs34+HrlYmVt4U1BUOQWzu7M8 zE941abJQ4EYJ0GlvOsl8hRJZuXongA6v4HM0fd0QEhaQXWJjuFunKSMpmPg0+jUF0RZx3 bzwalo/rul5zStvEFhOUQ4P24gCEiREZ63RGNUtSWTTXN6ynB+wKVpowhwrpwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638117467; a=rsa-sha256; cv=none; b=Lv2HyIst7OaNI10oM+EiTlOtad6RvMSd5p7bohzKQ7fORsoOf4zcN/jE77cVR2Ci/ud8bU Yc06/F2ji/d4EWZ+l/uaq8mCNlUIIJRDLYzy33WLl/Ot/cfYLKnOClP0TehXfK2Vald8vU eXpwIPPeDmzDZNK3Gb0DccWBtP0/P4jUbR3r9oir4rnweNIYbL4+7Hv4JxoFvXoRf0YTYS jHnWwFNZhppHBEOCnkmZagvlPcNfUe21gqpJsOyJ4C0etP0sjvZ5nCSKOIZprxCpsMDkME Ta/SjLB2fsG1PUthNtfLt4NfC5CVZ+fenadDr45TV6PZdgSP62JGf6JxQuu86Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b8cf1c5c30a5e6da4e2c9702ffd607a90453fb33 commit b8cf1c5c30a5e6da4e2c9702ffd607a90453fb33 Author: Ed Maste AuthorDate: 2021-11-27 20:27:45 +0000 Commit: Ed Maste CommitDate: 2021-11-28 16:29:17 +0000 Remove options VESA from x86 GENERIC options VESA / vesa.ko provides VESA Bios Extensions (VBE) support for the legacy sc(4) console. It is not used by the default console, vt(4). There is a report[1] of an incompatibility between VESA and the Nvidia driver breaking suspend/resume. Since VESA is not used by the default configuration anyway, just remove options VESA from GENERIC. The kernel module is still available and may be loaded by sc(4) users who want to select a VBE mode. (Note that vt(4) does not support selecting a VBE mode. The loader can set a VBE mode and vt(4) will use it via the vt_vbefb driver.) [1] https://lists.freebsd.org/archives/freebsd-hackers/2021-November/000469.html PR: 253733 Reported by: Stefan Blachmann [1] Reviewed by: imp, manu, tsoome Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33141 --- sys/amd64/conf/GENERIC | 1 - sys/i386/conf/GENERIC | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 2732569c461c..edd7ae6419d2 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -213,7 +213,6 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver -options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index e3f1aee8c723..26bdf4a53ed0 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -182,7 +182,6 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver -options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support From nobody Sun Nov 28 16:42:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DB3DD18BA369; Sun, 28 Nov 2021 16: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 4J2Dm24Dvlz3q0X; Sun, 28 Nov 2021 16:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72780127AE; Sun, 28 Nov 2021 16: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 1ASGgAvM026197; Sun, 28 Nov 2021 16: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 1ASGgAur026196; Sun, 28 Nov 2021 16:42:10 GMT (envelope-from git) Date: Sun, 28 Nov 2021 16:42:10 GMT Message-Id: <202111281642.1ASGgAur026196@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 8fff4d48d881 - stable/12 - os-release.5: Fix quoting of dots List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8fff4d48d881cdba4e4be91e470a32be7f3861f7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638117730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZQd9jg7kz31gtu6BkTfLFSTHcR5a4txsG8XcWtZ7q0=; b=O8zVCsHpK9OLMbq4RPZkVn/oaY1Ds8IjojDgzsBeuoh+LkUkYdx19RlDqwQDY9XxmGUxxB 6R6AMPIX6V2kyDO2Vot84skaTtuxLV7ilINTxO4otcSd79AZDH7nGmtlkj3W4J7zSVRrWr y2++MZsM3kGOIrq6s6H1wvv5EPFumukSZH/ylt5c+tS2eSg2aJrLHlVN7VzrZSILe4woLP 6eeEwtBihHIRNLyvExNY9mBbOj0oZvB2H19EWPlHsfHo69PRteas7ejhlG4zdPfatp6Zdv DaYpFcVtk/bXCqtPEL6vG8WcWW/heNRWcGPhHINEd5iuPGLpjjc+Ev/OZlGycw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638117730; a=rsa-sha256; cv=none; b=wRl0rhO4T+MkvBvVcdD0/y1Bsr7rw+uub7IxHAsCOh18u7kEswo/j/TL1PgM8kT0DyVJ2b A7d9inyAnLC4+n6SsvPAVXOVx1IeJYSrFPew99s/H7OngL9/YCYcMrWVcTd2t2nSVXopb1 iJwFEty/pBJO6hxZak26ceI/CK1FGGsdCkkhF4WDCFWd/RJsiFu0iOI0eT4v+Ktmo2rtzP nu07IG1FIYx89jbbk3P2isGHQDdpcIv8qIMfptPaJPbWO+9duHMbtZJG1eCI9T4r9onaP3 tzHwjUQ7/xW7zrHNZQtxFAbG+u8R9eS+EoU22jBIgNo6Yl6tnsVH87yMw7qIjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8fff4d48d881cdba4e4be91e470a32be7f3861f7 commit 8fff4d48d881cdba4e4be91e470a32be7f3861f7 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-23 10:34:44 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-28 16:42:01 +0000 os-release.5: Fix quoting of dots Dots needs to escaped with \& to be places inside Ql quotes. MFC after: 3 days (cherry picked from commit ee7485bef53df9108a20e497dac6341d030248ce) --- share/man/man5/os-release.5 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man5/os-release.5 b/share/man/man5/os-release.5 index 0ad154859e3e..536e5079cd65 100644 --- a/share/man/man5/os-release.5 +++ b/share/man/man5/os-release.5 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2019 +.Dd November 23, 2021 .Dt OS-RELEASE 5 .Os .Sh NAME @@ -66,13 +66,13 @@ A string describing the preferred OS name. Version string for the OS, in its usual and customary format. .It Dv ID Lower case version of the name with only a-z, 0-9, -.Ql . , +.Ql \&. , .Ql - , and .Ql _ . .It Dv VERSION_ID Lower case version of the version with only a-z, 0-9, -.Ql . , +.Ql \&. , .Ql - , and .Ql _ . @@ -101,7 +101,7 @@ A string describing the variant of this operating system. This variable is optional. .It Dv VARIANT_ID Lower case version of the variant with only a-z, 0-9, -.Ql . , +.Ql \&. , .Ql - , and .Ql _ . From nobody Sun Nov 28 16:44:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0331E18BAEF8; Sun, 28 Nov 2021 16:44: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 4J2Dpt52slz3qXK; Sun, 28 Nov 2021 16:44:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E80A1280F; Sun, 28 Nov 2021 16:44: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 1ASGic6X026484; Sun, 28 Nov 2021 16:44:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASGicmj026483; Sun, 28 Nov 2021 16:44:38 GMT (envelope-from git) Date: Sun, 28 Nov 2021 16:44:38 GMT Message-Id: <202111281644.1ASGicmj026483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 98ddcae346db - stable/13 - os-release.5: Fix quoting of dots List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 98ddcae346db6c537b43fcec392a0eb84ee63f6f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638117878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c1qdVHcRFOaQidHTGD4OCMW5kTM19Y1vhLCf9Or6nyk=; b=MGrs2lQzf4aYJqAxUiT4UrAVXavEfsR9abnxVMtx1CWJ+uGzkFf8h18p7UtGyAj41Nanmq J8xiKUQVWZHhhbCpLZU4cEkvU9PfJEjdv3JRcL67sqrsUKjinmAnUN5FCD0h3Yx3oXghEz goLqYcqTbjPyZiRNMbnlZ9aQv0QZN6X5d1yGn9fspdtK7avGVpimSmZi7p23fS9uKcZc4s VDxTOp30SIfc+xav4aHaiKm4sudUYrrCp+wezIo8bNL3bThY80grmq70Ua8CBcMJzsWAed 22sHFvYwMoKD3ZzFjHKOigC8YyyOirPLKM3Bz+R6/IbEFSQeiOg7U0+LsvoPWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638117878; a=rsa-sha256; cv=none; b=JXhgbAdivDdpVm1nFMBo8e5r7tltwA+Tiu5HTn9l3g5nm0hC/P/SZk64k1YipKKU2o2bNl EdDmeHW4hRajuad+VXSBwGcohbhskSM8hrG0PQsedZv4Z0GnyUseF1jRTnHdOoUv+lSu+K 45sbakAe2AFhlZB5+juRm7BXlhQK4mkQVVtK0mXdKiCVm3qZHFpDgXtKAXZqnKZEN9MZG+ EkMTOsSnu9Ov9R/p5UtXq2dgxg4daILjJIwbIAYInbV4Kj1ZcYAE7BvXRejbp/JXaNPmcu SxTQlgPRBXzmPfbR2m8xwyqf/vZ81jzeoZcpkzqKwIOhWjSYbtv0MdWM7uEhwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=98ddcae346db6c537b43fcec392a0eb84ee63f6f commit 98ddcae346db6c537b43fcec392a0eb84ee63f6f Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-23 10:34:44 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-28 16:42:37 +0000 os-release.5: Fix quoting of dots Dots needs to escaped with \& to be places inside Ql quotes. MFC after: 3 days (cherry picked from commit ee7485bef53df9108a20e497dac6341d030248ce) --- share/man/man5/os-release.5 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man5/os-release.5 b/share/man/man5/os-release.5 index ab56e477cf3d..a16ca33112d0 100644 --- a/share/man/man5/os-release.5 +++ b/share/man/man5/os-release.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2019 +.Dd November 23, 2021 .Dt OS-RELEASE 5 .Os .Sh NAME @@ -67,13 +67,13 @@ A string describing the preferred OS name. Version string for the OS, in its usual and customary format. .It Dv ID Lower case version of the name with only a-z, 0-9, -.Ql . , +.Ql \&. , .Ql - , and .Ql _ . .It Dv VERSION_ID Lower case version of the version with only a-z, 0-9, -.Ql . , +.Ql \&. , .Ql - , and .Ql _ . @@ -102,7 +102,7 @@ A string describing the variant of this operating system. This variable is optional. .It Dv VARIANT_ID Lower case version of the variant with only a-z, 0-9, -.Ql . , +.Ql \&. , .Ql - , and .Ql _ . From nobody Sun Nov 28 16:46:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ACDC118BC746; Sun, 28 Nov 2021 16: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 4J2Drt1lytz3rpx; Sun, 28 Nov 2021 16:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D8A1127C4; Sun, 28 Nov 2021 16:46: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 1ASGkMYT026715; Sun, 28 Nov 2021 16:46:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASGkM45026714; Sun, 28 Nov 2021 16:46:22 GMT (envelope-from git) Date: Sun, 28 Nov 2021 16:46:22 GMT Message-Id: <202111281646.1ASGkM45026714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 900ca3c03a4e - stable/12 - style.Makefile.5: Do not require $FreeBSD$ SCM IDs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 900ca3c03a4e06abc7bb645f594c5ff777fe0378 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638117982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FTnYjRm7mP23OfYEs/IMmJTH1ay7LLrwn4+WM/Sy0Zs=; b=vNp7f0zYs1X1EQo7gdC30MqKQKYAdLF+wtRJCVJ353QKqRXPi+RFjU4K79hpofIqcQYdUH Vl4iZWXmqslBTazjsRkmfE44DHNQPLXh30+ehbsnR6YMFU0BIXqGtLUImTwjk2jJscDgIl /UvugY+8W4S/a/RFSZHLRxPN+Vh8e1qC9kmYktWm5iLuOUpQCk5g7lzTyZVZl+v25ac7fM LRIhCsYxUQeFQ3tWYFqgcLlNs9X6m6lAv4FzRP6Tw/9I010x3rBC4FaONKdxfCqF0aA+2G S/7Eys4wbjZgVQKeFRHNQHZomzOEKskGbQDnTTvUIqgRuqf8GEF53TMBMZ2gbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638117982; a=rsa-sha256; cv=none; b=q5qKvtQqTTBif0Q6nXMtV4oY/tPu/2MealypO6mICKVegdrtO7boHAj7djfNNVP1741n5v /d24jqdiHIbebAwnyWpifQXBaLWN2pNwD6SLZRbjCL8ZbxfdCgyncsF1IbTSzJClhZbW4f rW4mqlhgm3INrI0XT2NOEOaXP5wDoXtCS+fZtRW8pOFUQJZRFOdfaC/kS9MVJar+npaO9G WILTV7PMlEcEtzVu0TDjAqOxreujZvDX6RDXrU9HWN9Hu6gYjcyGUQWsnlHPubpXpcArgs hkhiRq+z46m56g+RvQJcfHu+Xv/eL4L5MNzqLiSM9GN1nLDj2SN/yMkWQ3HZ1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=900ca3c03a4e06abc7bb645f594c5ff777fe0378 commit 900ca3c03a4e06abc7bb645f594c5ff777fe0378 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 21:00:30 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-28 16:45:54 +0000 style.Makefile.5: Do not require $FreeBSD$ SCM IDs It's no longer required to have those SCM IDs at the start of makefiles. MFC after: 3 days (cherry picked from commit 1ac5586c6d86134922e18871b270ca483c00bf8b) --- share/man/man5/style.Makefile.5 | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/share/man/man5/style.Makefile.5 b/share/man/man5/style.Makefile.5 index 5e34b968305b..e3f92242b640 100644 --- a/share/man/man5/style.Makefile.5 +++ b/share/man/man5/style.Makefile.5 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2015 +.Dd November 18, 2021 .Dt STYLE.MAKEFILE 5 .Os .Sh NAME @@ -42,13 +42,6 @@ This file specifies the preferred style for makefiles in the source tree. .Bl -bullet .It -All makefiles should have an SCM ID at the start of the file, -followed by a blank line. -.Bd -literal -# $FreeBSD\&$ - -.Ed -.It .Cm .PATH : comes next if needed, and is spelled .Dq Li ".PATH: " , From nobody Sun Nov 28 16:46:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A5E2D18BCA81; Sun, 28 Nov 2021 16:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2Dry5r6Sz3rYf; Sun, 28 Nov 2021 16:46:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C10412B04; Sun, 28 Nov 2021 16:46: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 1ASGkQJR026834; Sun, 28 Nov 2021 16:46:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASGkQs9026833; Sun, 28 Nov 2021 16:46:26 GMT (envelope-from git) Date: Sun, 28 Nov 2021 16:46:26 GMT Message-Id: <202111281646.1ASGkQs9026833@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 2b890871f7d1 - stable/13 - style.Makefile.5: Do not require $FreeBSD$ SCM IDs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2b890871f7d196a16d7e4c4c4007095449948bcc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638117987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AUzNzbC3nBBulTPqOwIwKV55AGYoGYSVekar6x7DORI=; b=c6vM8AwU4LjD/kUIU6JSVUNqzlI65DDC5bQuH+d0M5166PfaBA5otef1iZ8oDVTju8aLJf vXD1OlN8adfC4PnxWKSxP4I9hI/BsavdW7uXmfP241/mhA08/dOsP29qQSJSUcv184XHX+ enZPkS0UFcmxifAxZETafT0gzJ8zbLE5aCOHSgO6cAc63xxSTi1YFfRKzP2eB4cC5I+ws2 p/ouD5wjd4r6sGzS8gOdeiGdI/3lqyn0W5+XOOMjfqHqE/o63u0PFabh9RzJQSx1JO1/Xo ta7yMwZlsv/kItI4KPioQQCM9L1WHYJHdI5yYjLZ/RTBUT8CgwzIrR+C3pJ7zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638117987; a=rsa-sha256; cv=none; b=OYX2izRsL2u/lTAHBXRPd9Gi5dPAWOE10+4bWDFiEHgHMamapX/AWOvc68NM6sy7FqYKiS XVZW6TjoAIXZUF/Gynd6E3Nke7SB5UzjadUNo8UHXFCtko7Q9+XR5JlMkqEZHqgazBl8ET ky+k4kTsslt4i2PABsX/rRe+NKiwcJ450KCuG59CuTgGB1A6FsHyBbZLLhjjbQqbHpdhnj keh+OuQbX5Ijn5NE575q22URTIMaX2TPuuUk9jJzXxi/4HHcHCylKcLEk/zCOfyVRcjJtn MQY0rzZI3q9k6MP1rSP7FWArdQqx8JbXhuaETAALLUxBSH9G0kutQtYLsCx+BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=2b890871f7d196a16d7e4c4c4007095449948bcc commit 2b890871f7d196a16d7e4c4c4007095449948bcc Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 21:00:30 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-28 16:45:08 +0000 style.Makefile.5: Do not require $FreeBSD$ SCM IDs It's no longer required to have those SCM IDs at the start of makefiles. MFC after: 3 days (cherry picked from commit 1ac5586c6d86134922e18871b270ca483c00bf8b) --- share/man/man5/style.Makefile.5 | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/share/man/man5/style.Makefile.5 b/share/man/man5/style.Makefile.5 index 67991869ff57..4ced85704640 100644 --- a/share/man/man5/style.Makefile.5 +++ b/share/man/man5/style.Makefile.5 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 25, 2020 +.Dd November 18, 2021 .Dt STYLE.MAKEFILE 5 .Os .Sh NAME @@ -42,13 +42,6 @@ This file specifies the preferred style for makefiles in the source tree. .Bl -bullet .It -All makefiles should have an SCM ID at the start of the file, -followed by a blank line. -.Bd -literal -# $FreeBSD\&$ - -.Ed -.It .Cm .PATH : comes next if needed, and is spelled .Dq Li ".PATH: " , From nobody Sun Nov 28 18:08:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4567E18B2CF2; Sun, 28 Nov 2021 18:08: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 4J2GgD74w5z4mMB; Sun, 28 Nov 2021 18:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2EA61366D; Sun, 28 Nov 2021 18:08: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 1ASI883A035193; Sun, 28 Nov 2021 18:08:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASI88j4035192; Sun, 28 Nov 2021 18:08:08 GMT (envelope-from git) Date: Sun, 28 Nov 2021 18:08:08 GMT Message-Id: <202111281808.1ASI88j4035192@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: a4ef9e58bc0c - main - sbin: build ping if at least one of INET & INET6 is 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4ef9e58bc0c07110a54ba0fa88eb118c5377e6f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638122889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sANCbTn4KnHcgx7vE4P7m77/CdGMeqdMqfO6TdaCs9M=; b=aQjSiOGYoxYs1n2i+WooHD8kr+/tYkGL3mZTfTqF+45gmcQutUSHkIk774fe6EP6fQywAS WqMa8laQBdYNuK5I9HjmHvY3tb8VvroZoyNDp/NcGVSq5lnbfFRfz8cjXWMktwIwdg090m rFNGivobCAtFWagD2Fbx2F+GVlEU5oOSiH3XW35jHGTnS73Qanf1vu+dc23tLLzovUEHj3 VkwQLoBDNdzcVAnvy5pHlkd9lUwhA3Ts8CXQXGN3zaTPDAnf41GmF2PY7etssr2HCwhKjC hn7bxHasQhgkxQ6HMaeb4Afq59AZQK8RdkdtZx3ZP8coDEN0DvfceXcCseR2Tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638122889; a=rsa-sha256; cv=none; b=KuE/n/dkOgPO5msfq5lq9Yq6nQQq+/ANiizQSSb34SvR96uIgL8aSEJ3V/NqqNpawTrBJw uk0iSSUfLszQTdsvRQ+7WlBVzxqbqZla7V/slP8OeYChmUVGlZhK6nropRV1pthwn6hbvq mw9weQffUMU2gchmL7vT8saypoTQ8OW6UpklJHUXKQg4fEKDV/eQbVEGuY5OERhwwqcXJh 4sx8tZDzOHDX5JWKiM/x2IskbDqW8oCeNoLWgmaOQqBbJGoU7Qy+5KhAhGkWhTT3sh9XBu koo35ON5qvwKS8iIwLEAyNAtarYLwAgZ+h95/oWqYLteoM+zWZuS49f7pQiFMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a4ef9e58bc0c07110a54ba0fa88eb118c5377e6f commit a4ef9e58bc0c07110a54ba0fa88eb118c5377e6f Author: Ed Maste AuthorDate: 2021-11-28 17:50:13 +0000 Commit: Ed Maste CommitDate: 2021-11-28 18:05:39 +0000 sbin: build ping if at least one of INET & INET6 is enabled It does not build (and serves no purpose) if neither is true (i.e., building WITHOUT_INET and WITHOUT_INET6). Also add an explicit error in ping to make this case clear. PR: 260082 Sponsored by: The FreeBSD Foundation --- sbin/Makefile | 5 ++++- sbin/ping/main.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sbin/Makefile b/sbin/Makefile index 7eb497e3e3dd..69cf51a83e26 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -53,7 +53,6 @@ SUBDIR=adjkerntz \ nfsiod \ nos-tun \ pfilctl \ - ping \ rcorder \ reboot \ recoverdisk \ @@ -68,6 +67,10 @@ SUBDIR=adjkerntz \ tunefs \ umount +.if ${MK_INET} != "no" || ${MK_INET6} != "no" +SUBDIR+= ping +.endif + SUBDIR.${MK_CCD}+= ccdconfig SUBDIR.${MK_CXX}+= devd SUBDIR.${MK_HAST}+= hastctl diff --git a/sbin/ping/main.c b/sbin/ping/main.c index c021e2c26b14..1d0b714f1480 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$"); #define OPTSTR PING4OPTS #elif defined(INET6) #define OPTSTR PING6OPTS +#else +#error At least one of INET and INET6 is required #endif int From nobody Sun Nov 28 18:25:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7D10318BCF19; Sun, 28 Nov 2021 18:25: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 4J2H3k1Wrlz4tDZ; Sun, 28 Nov 2021 18:25:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1448513DBF; Sun, 28 Nov 2021 18:25: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 1ASIPr19061810; Sun, 28 Nov 2021 18:25:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASIPrnb061809; Sun, 28 Nov 2021 18:25:53 GMT (envelope-from git) Date: Sun, 28 Nov 2021 18:25:53 GMT Message-Id: <202111281825.1ASIPrnb061809@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: 0179739a0096 - main - OptionalObsoleteFiles: remove ping with INET & INET6 disabled List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0179739a0096c62cb3c9665d68246046255ab849 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638123954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xECF5IMWmiaX8sheRq/SNE4si0sxK/V3w8FTt8SrtJw=; b=TsYiPpWcghg/0pXY8E6HDjL0gyzj3RjJMV/G3xM5666SFMD6SBm8sVVI0N5TBO7aXrkM5v +h+ZBHvPLX5outGDkouCqYhBDqTUiMG4nCKv0oOgVSCABILxywZbJDD0+K3jep3MysGl49 3AebF97xnzA/sxbC0K1aXUauASvU/gJ0jwTxgrJMvbp4/AGNyiHIPaqqKY8/vgKp5Q9xyd D9LG1DvqXxJa1Ed5Cfafhks1/HDSz+R4DFUuUf9OZVg4EKZ97GsaLF8EbJmIZFlDHrCpyN sSEKjyOIFuI8yS6gbTQVgYUg8hCrGm3J8pxHz1dVMjpaRBjK6DieLDXBnrc9Yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638123954; a=rsa-sha256; cv=none; b=dBLmKkQyEqs2/0pYGA1RwBjD2f1YvyBNMQjbqoi9i+gOsEFyX1nB9RfWQp4t7vt1zY/JUc kSZ2R291l9+lLpr7XdRTuQEW54bg01EezCC/ZzW9rXIbAT2NhmcGudqmwfWigF56av8Q1o wqqX2V66jRoKEuQQSniV3JnkPs9B7X9W0pzi5uQNRgdtzDUIXGmuZf0AatPu2I1+s90BQi tR2eFh0iKnLBVfpPVGVUBI1QnzieHBZ3UXAafuPolCcoNkwA4A58Ie9rh/l0A+TaWtS3TR r0RWT9KoiaZ9IQB7FI8hfiy21RObAnGH8Yt1lbN+hXeGc4BBrLfvscNRxGHZ7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0179739a0096c62cb3c9665d68246046255ab849 commit 0179739a0096c62cb3c9665d68246046255ab849 Author: Ed Maste AuthorDate: 2021-11-28 18:23:29 +0000 Commit: Ed Maste CommitDate: 2021-11-28 18:23:29 +0000 OptionalObsoleteFiles: remove ping with INET & INET6 disabled Reported by: kevans Fixes: a4ef9e58bc0c ("sbin: build ping if at least one of...") Sponsored by: The FreeBSD Foundation --- tools/build/mk/OptionalObsoleteFiles.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 04addd495b67..f09029ef9b7c 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2573,6 +2573,11 @@ OLD_DIRS+=usr/share/i18n/csmapper/KS OLD_DIRS+=usr/share/i18n/csmapper/GB .endif +.if ${MK_INET} == no && ${MK_INET6} == no +OLD_FILES+=sbin/ping +OLD_FILES+=usr/share/man/man8/ping.8.gz +.endif + .if ${MK_INET6} == no OLD_FILES+=sbin/ping6 OLD_FILES+=sbin/rtsol From nobody Sun Nov 28 19:16:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A047018BDFFE; Sun, 28 Nov 2021 19:16: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 4J2JB71sz9z3hBR; Sun, 28 Nov 2021 19:16:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1CE0014AC8; Sun, 28 Nov 2021 19:16: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 1ASJGVse028462; Sun, 28 Nov 2021 19:16:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASJGVR3028461; Sun, 28 Nov 2021 19:16:31 GMT (envelope-from git) Date: Sun, 28 Nov 2021 19:16:31 GMT Message-Id: <202111281916.1ASJGVR3028461@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: b6c8c7b99a75 - main - pf: add pf_bcmp_state_key List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b6c8c7b99a750de18509715890615ad3f948b29a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638126991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=am1hK102R8yeQpt1e0r9NwCmn69FyCFMufBYcPvGx08=; b=aTS/dYyOaHWaDn1qP1lD8DsR+hD66p+e2YqJcR1mBxNaJr0YG9nJKhDblXXbsVQBRPZsG5 vkGMu41SJtuoIzkr8obHNIOjc/uVS7xg4dYS4lWXGfr5YQyp2a1DZP1er01sxcQQGCU9Ks yZXOrTHYkSGOThmokx8MiSgf5S5XiQ2gEWQiB5v9rw7zYkFb4h7a+DXlT4fc3f9abnYuXd 3/VllRQWzxYx1oTj8GXZvNV6eFriQFqmJmHu1Kfcg34d0u1Yo3Mv+H9kT8Oa4ZNFCUsQxr gXfX2bKkc2FpzWHkApS/GMT/hAH8pVDqia/LqJEHYLl97UnSMDaURqvH5J+q9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638126991; a=rsa-sha256; cv=none; b=co/M0CWm/VtehU1/lebuXgIcdKtzMBmbxdCRhrNbPGLpId1n2Y4obWhe89VGYeCmQ54wW1 LXPHZm7YflB4OLsXlYyr4m+Pr0M845IMPrqsRr4T5YrJJMe6NkaOTxdXcjuylKdwvakM4P 1KyF3o+dIR4fpZefiXDLptGlvI/DWSspWYC1Jq/XPnodg8nbhPOleKZwL6P27OxWzy3FlW 5Hlr6FXGtNkAnSFGctrYvgMZSgizyMsOq8ZDiteNpnnNMxubKeccFCehwpd/4nQoK+URWV sh+XppS9JCczi108N7uFja/Hhm35301lcz8egW7Xjt873byfnNK/Tlxv2LEl7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b6c8c7b99a750de18509715890615ad3f948b29a commit b6c8c7b99a750de18509715890615ad3f948b29a Author: Mateusz Guzik AuthorDate: 2021-11-24 17:25:18 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-28 19:15:45 +0000 pf: add pf_bcmp_state_key Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33131 --- sys/netpfil/pf/pf.c | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index d01ee906740f..1686def46260 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -419,6 +419,40 @@ VNET_DEFINE(struct intr_event *, pf_swi_ie); VNET_DEFINE(uint32_t, pf_hashseed); #define V_pf_hashseed VNET(pf_hashseed) +#ifdef __LP64__ +static int +pf_bcmp_state_key(struct pf_state_key *k1_orig, struct pf_state_key_cmp *k2_orig) +{ + unsigned long *k1 = (unsigned long *)k1_orig; + unsigned long *k2 = (unsigned long *)k2_orig; + + if (k1[0] != k2[0]) + return (1); + + if (k1[1] != k2[1]) + return (1); + + if (k1[2] != k2[2]) + return (1); + + if (k1[3] != k2[3]) + return (1); + + if (k1[4] != k2[4]) + return (1); + + return (0); +} +_Static_assert(sizeof(struct pf_state_key_cmp) == 40, "bad size of pf_state_key_cmp"); +#else +static inline int +pf_bcmp_state_key(struct pf_state_key *k1_orig, struct pf_state_key_cmp *k2_orig) +{ + + return (bcmp(k1_orig, k2_orig, sizeof(struct pf_state_key_cmp))); +} +#endif + int pf_addr_cmp(struct pf_addr *a, struct pf_addr *b, sa_family_t af) { @@ -1174,7 +1208,7 @@ pf_state_key_attach(struct pf_state_key *skw, struct pf_state_key *sks, keyattach: LIST_FOREACH(cur, &kh->keys, entry) - if (bcmp(cur, sk, sizeof(struct pf_state_key_cmp)) == 0) + if (pf_bcmp_state_key(cur, (struct pf_state_key_cmp *)sk) == 0) break; if (cur != NULL) { @@ -1480,7 +1514,7 @@ pf_find_state(struct pfi_kkif *kif, struct pf_state_key_cmp *key, u_int dir) PF_HASHROW_LOCK(kh); LIST_FOREACH(sk, &kh->keys, entry) - if (bcmp(sk, key, sizeof(struct pf_state_key_cmp)) == 0) + if (pf_bcmp_state_key(sk, key) == 0) break; if (sk == NULL) { PF_HASHROW_UNLOCK(kh); @@ -1527,7 +1561,7 @@ pf_find_state_all(struct pf_state_key_cmp *key, u_int dir, int *more) PF_HASHROW_LOCK(kh); LIST_FOREACH(sk, &kh->keys, entry) - if (bcmp(sk, key, sizeof(struct pf_state_key_cmp)) == 0) + if (pf_bcmp_state_key(sk, key) == 0) break; if (sk == NULL) { PF_HASHROW_UNLOCK(kh); From nobody Sun Nov 28 19:23:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D390518C171C; Sun, 28 Nov 2021 19:23: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 4J2JLF33pkz3kNs; Sun, 28 Nov 2021 19:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3873B14CD9; Sun, 28 Nov 2021 19:23: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 1ASJNXSV041251; Sun, 28 Nov 2021 19:23:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASJNXWE041250; Sun, 28 Nov 2021 19:23:33 GMT (envelope-from git) Date: Sun, 28 Nov 2021 19:23:33 GMT Message-Id: <202111281923.1ASJNXWE041250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f4c129f5fb16 - main - iwlwifi: import firmware for Intel iwlwifi/mvm supported chipsets. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4c129f5fb1669b284d76a838b1e509f97c2d299 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638127413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MuCBbJAnZmubnPupGIdnSl0tIzfa9YML0ERXAKzCn/o=; b=NtxZbi5A05ZwwdKib0nbu5O4KQaiBcUfbRplBu21TZs7/6GSSlex8uYFpcqXJPZYGn5uHQ 43wNI00o/jebEYXLCKlY2F/RaTVNyznoeFu9wABkcU1BaxnrqIZpiR0NSWmwF7dPEgrhEz NiDljNFGs4qGLTaCohrXDoQk+cKGpJmO6VK20vRvusrLT+FOsBfEOrq2UKT5PPQTTxbD85 NUQIl+PfkQ2FnbEgwzkTLIjPA2Io3RL59jfNRvr1dXLoiClPlKX1UZDOY4nztyVotVlNrB ZVYHZCxEu2H4t6fQXv+o+dtYLLX6qizYdMqwOqCKAi2q6k13DEPhawl1jfwHOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638127413; a=rsa-sha256; cv=none; b=e/AaAc2/GbN0+K+niD1FwM8P1Rk9H+nIWHcQR8m69LYnhJrMUYxP8qzsgj2cDOguxpzXJl Nyc5nVwlZMZwqcyyrtEdBeTsZ3p3seNMt+Qdi8AWck51sTWLSf/JY5gTtkeFJCbNbH3cDX Y86p+Tg8loXiXYgVyGF3DW4Y3QIdDwHx58xSRAavXhCvEgDw9Up2ZidwQdaQwZlPT9SuYm EGu36uFItUzxE3eB3AFMDZeZCAL4FOEvTUVJrqWzE7sqgrHhGv+vXvD54Wy3nLwMy6ju+m mQsxwJv4tknTcPonbASz2nXI0SGfkoPd6xZFDRKb/C5skXrrj7dzuOUAcKdmbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f4c129f5fb1669b284d76a838b1e509f97c2d299 commit f4c129f5fb1669b284d76a838b1e509f97c2d299 Author: Bjoern A. Zeeb AuthorDate: 2021-11-28 18:34:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-28 19:17:03 +0000 iwlwifi: import firmware for Intel iwlwifi/mvm supported chipsets. Import the most recent versions of the firmware images for iwlwifi chipsets supported by the "mvm" sub-driver. This is based on linux-firmware at f5d519563ac9d2d1f382a817aae5ec5473811ac8. The license of the firmware matches the previous iwnfw(4) and iwmfw(4) firmware files and you can find a copy in sys/contrib/dev/iwlwififw/LICENCE.iwlwifi_firmware . Add build infrastructure to create the .ko files but do not yet hook it up to the build until all parts are in the tree. There is an open issue concerning kldxref that we need to resolve (D32383). Sponsored by: The FreeBSD Foundation MFC after: 10 days --- sys/contrib/dev/iwlwififw/LICENCE.iwlwifi_firmware | 39 ++ sys/contrib/dev/iwlwififw/WHENCE | 442 +++++++++++++++++++++ sys/contrib/dev/iwlwififw/iwlwifi-3160-9.ucode | Bin 0 -> 669872 bytes sys/contrib/dev/iwlwififw/iwlwifi-3168-29.ucode | Bin 0 -> 1036288 bytes sys/contrib/dev/iwlwififw/iwlwifi-7260-9.ucode | Bin 0 -> 680508 bytes sys/contrib/dev/iwlwififw/iwlwifi-7265-9.ucode | Bin 0 -> 697828 bytes sys/contrib/dev/iwlwififw/iwlwifi-7265D-29.ucode | Bin 0 -> 1036772 bytes sys/contrib/dev/iwlwififw/iwlwifi-8000C-36.ucode | Bin 0 -> 2428004 bytes sys/contrib/dev/iwlwififw/iwlwifi-8265-36.ucode | Bin 0 -> 2436632 bytes .../iwlwififw/iwlwifi-9000-pu-b0-jf-b0-46.ucode | Bin 0 -> 1519264 bytes .../iwlwififw/iwlwifi-9260-th-b0-jf-b0-46.ucode | Bin 0 -> 1490096 bytes .../dev/iwlwififw/iwlwifi-Qu-b0-hr-b0-63.ucode | Bin 0 -> 1334856 bytes .../dev/iwlwififw/iwlwifi-Qu-b0-jf-b0-63.ucode | Bin 0 -> 1252748 bytes .../dev/iwlwififw/iwlwifi-Qu-c0-hr-b0-63.ucode | Bin 0 -> 1334872 bytes .../dev/iwlwififw/iwlwifi-Qu-c0-jf-b0-63.ucode | Bin 0 -> 1252764 bytes .../dev/iwlwififw/iwlwifi-QuZ-a0-hr-b0-67.ucode | Bin 0 -> 1347524 bytes .../dev/iwlwififw/iwlwifi-QuZ-a0-jf-b0-63.ucode | Bin 0 -> 1252744 bytes sys/contrib/dev/iwlwififw/iwlwifi-cc-a0-67.ucode | Bin 0 -> 1310488 bytes .../dev/iwlwififw/iwlwifi-so-a0-gf-a0-67.ucode | Bin 0 -> 1524432 bytes .../dev/iwlwififw/iwlwifi-so-a0-gf4-a0-67.ucode | Bin 0 -> 1541932 bytes .../dev/iwlwififw/iwlwifi-so-a0-hr-b0-64.ucode | Bin 0 -> 1427384 bytes .../dev/iwlwififw/iwlwifi-so-a0-jf-b0-64.ucode | Bin 0 -> 1365628 bytes .../dev/iwlwififw/iwlwifi-ty-a0-gf-a0-67.ucode | Bin 0 -> 1482872 bytes sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0.pnvm | Bin 0 -> 41612 bytes sys/modules/iwlwififw/Makefile | 57 +++ sys/modules/iwlwififw/Makefile.inc | 49 +++ sys/modules/iwlwififw/iwlwifi-3160-fw/Makefile | 6 + sys/modules/iwlwififw/iwlwifi-3168-fw/Makefile | 6 + sys/modules/iwlwififw/iwlwifi-7260-fw/Makefile | 6 + sys/modules/iwlwififw/iwlwifi-7265-fw/Makefile | 6 + sys/modules/iwlwififw/iwlwifi-7265D-fw/Makefile | 6 + sys/modules/iwlwififw/iwlwifi-8000C-fw/Makefile | 6 + sys/modules/iwlwififw/iwlwifi-8265-fw/Makefile | 6 + .../iwlwififw/iwlwifi-9000-pu-b0-jf-b0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-9260-th-b0-jf-b0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile | 6 + sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-so-a0-hr-b0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-so-a0-jf-b0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-ty-a0-gf-a0-fw/Makefile | 6 + .../iwlwififw/iwlwifi-ty-a0-gf-a0-pnvm/Makefile | 8 + 48 files changed, 721 insertions(+) diff --git a/sys/contrib/dev/iwlwififw/LICENCE.iwlwifi_firmware b/sys/contrib/dev/iwlwififw/LICENCE.iwlwifi_firmware new file mode 100644 index 000000000000..6bdd16d922b4 --- /dev/null +++ b/sys/contrib/dev/iwlwififw/LICENCE.iwlwifi_firmware @@ -0,0 +1,39 @@ +Copyright (c) 2006-2021, Intel Corporation. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software + is permitted. + +Limited patent license. Intel Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per +se is licensed hereunder. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/sys/contrib/dev/iwlwififw/WHENCE b/sys/contrib/dev/iwlwififw/WHENCE new file mode 100644 index 000000000000..9b82780cf0a9 --- /dev/null +++ b/sys/contrib/dev/iwlwififw/WHENCE @@ -0,0 +1,442 @@ +Driver: iwlwifi - Intel Wireless Wifi + +File: iwlwifi-3945-2.ucode +Version: 15.32.2.9 + +File: iwlwifi-4965-2.ucode +Version: 228.61.2.24 + +File: iwlwifi-5000-1.ucode +Version: 5.4.A.11 (aka 5.4.1.16) + +File: iwlwifi-5000-2.ucode +Version: 8.24.2.12 + +File: iwlwifi-5000-5.ucode +Version: 8.83.5.1 + +File: iwlwifi-5150-2.ucode +Version: 8.24.2.2 + +File: iwlwifi-1000-3.ucode +Version: 128.50.3.1 + +File: iwlwifi-1000-5.ucode +Version: 39.31.5.1 + +File: iwlwifi-6000-4.ucode +Version: 9.221.4.1 + +File: iwlwifi-6050-4.ucode +Version: 9.201.4.1 + +File: iwlwifi-6050-5.ucode +Version: 41.28.5.1 + +File: iwlwifi-6000g2a-5.ucode +Version: 17.168.5.3 + +File: iwlwifi-6000g2a-6.ucode +Version: 18.168.6.1 + +File: iwlwifi-6000g2b-5.ucode +Version: 17.168.5.1 + +File: iwlwifi-6000g2b-6.ucode +Version: 18.168.6.1 + +File: iwlwifi-135-6.ucode +Version: 18.168.6.1 + +File: iwlwifi-100-5.ucode +Version: 39.31.5.1 + +File: iwlwifi-105-6.ucode +Version: 18.168.6.1 + +File: iwlwifi-2030-6.ucode +Version: 18.168.6.1 + +File: iwlwifi-2000-6.ucode +Version: 18.168.6.1 + +File: iwlwifi-7260-7.ucode +Version: 22.1.7.0 + +File: iwlwifi-7260-8.ucode +Version: 22.24.8.0 + +File: iwlwifi-7260-9.ucode +Version: 25.228.9.0 + +File: iwlwifi-7260-10.ucode +Version: 23.15.10.0 + +File: iwlwifi-7260-12.ucode +Version: 25.17.12.0 + +File: iwlwifi-7260-13.ucode +Version: 25.30.13.0 + +File: iwlwifi-7260-16.ucode +Version: 16.242414.0 + +File: iwlwifi-7260-17.ucode +Version: 17.bfb58538.0 + +File: iwlwifi-3160-7.ucode +Version: 22.1.7.0 + +File: iwlwifi-3160-8.ucode +Version: 22.24.8.0 + +File: iwlwifi-3160-9.ucode +Version: 25.228.9.0 + +File: iwlwifi-3160-10.ucode +Version: 23.15.10.0 + +File: iwlwifi-3160-12.ucode +Version: 25.17.12.0 + +File: iwlwifi-3160-13.ucode +Version: 25.30.13.0 + +File: iwlwifi-3160-16.ucode +Version: 16.242414.0 + +File: iwlwifi-3160-17.ucode +Version: 17.bfb58538.0 + +File: iwlwifi-7265-8.ucode +Version: 22.24.8.0 + +File: iwlwifi-7265-9.ucode +Version: 25.228.9.0 + +File: iwlwifi-7265-10.ucode +Version: 23.15.10.0 + +File: iwlwifi-7265-12.ucode +Version: 25.17.12.0 + +File: iwlwifi-7265-13.ucode +Version: 25.30.13.0 + +File: iwlwifi-7265-16.ucode +Version: 16.242414.0 + +File: iwlwifi-7265-17.ucode +Version: 17.bfb58538.0 + +Link: iwlwifi-7265D-10.ucode -> iwlwifi-7265-10.ucode + +File: iwlwifi-7265D-12.ucode +Version: 25.17.12.0 + +File: iwlwifi-7265D-13.ucode +Version: 25.30.13.0 + +File: iwlwifi-7265D-16.ucode +Version: 16.242414.0 + +File: iwlwifi-7265D-17.ucode +Version: 17.352738.0 + +File: iwlwifi-7265D-21.ucode +Version: 21.302800.0 + +File: iwlwifi-7265D-22.ucode +Version: 22.391740.0 + +File: iwlwifi-7265D-27.ucode +Version: 27.541033.0 + +File: iwlwifi-7265D-29.ucode +Version: 29.f2390aa8.0 + +File: iwlwifi-3168-21.ucode +Version: 21.302800.0 + +File: iwlwifi-3168-22.ucode +Version: 22.391740.0 + +File: iwlwifi-3168-27.ucode +Version: 27.541033.0 + +File: iwlwifi-3168-29.ucode +Version: 29.0bd893f3.0 + +File: iwlwifi-8000C-13.ucode +Version: 25.30.13.0 + +File: iwlwifi-8000C-16.ucode +Version: 16.242414.0 + +File: iwlwifi-8000C-21.ucode +Version: 21.302800.0 + +File: iwlwifi-8000C-22.ucode +Version: 22.391740.0 + +File: iwlwifi-8000C-27.ucode +Version: 27.541033.0 + +File: iwlwifi-8000C-31.ucode +Version: 31.560484.0 + +File: iwlwifi-8000C-34.ucode +Version: 34.610288.0 + +File: iwlwifi-8000C-36.ucode +Version: 36.ca7b901d.0 + +File: iwlwifi-8265-21.ucode +Version: 21.302800.0 + +File: iwlwifi-8265-22.ucode +Version: 22.391740.0 + +File: iwlwifi-8265-27.ucode +Version: 27.541033.0 + +File: iwlwifi-8265-31.ucode +Version: 31.560484.0 + +File: iwlwifi-8265-34.ucode +Version: 34.610288.0 + +File: iwlwifi-8265-36.ucode +Version: 36.ca7b901d.0 + +File: iwlwifi-9000-pu-b0-jf-b0-33.ucode +Version: 33.610294.0 + +File: iwlwifi-9000-pu-b0-jf-b0-34.ucode +Version: 34.ba501b11.0 + +File: iwlwifi-9000-pu-b0-jf-b0-38.ucode +Version: 38.755cfdd8.0 + +File: iwlwifi-9000-pu-b0-jf-b0-41.ucode +Version: 41.fc1a7aea.0 + +File: iwlwifi-9000-pu-b0-jf-b0-43.ucode +Version: 43.95eb4e97.0 + +File: iwlwifi-9000-pu-b0-jf-b0-46.ucode +Version: 46.5e069cbd.0 + +File: iwlwifi-9260-th-b0-jf-b0-33.ucode +Version: 33.610294.0 + +File: iwlwifi-9260-th-b0-jf-b0-34.ucode +Version: 34.ba501b11.0 + +File: iwlwifi-9260-th-b0-jf-b0-38.ucode +Version: 38.755cfdd8.0 + +File: iwlwifi-9260-th-b0-jf-b0-41.ucode +Version: 41.fc1a7aea.0 + +File: iwlwifi-9260-th-b0-jf-b0-43.ucode +Version: 43.95eb4e97.0 + +File: iwlwifi-9260-th-b0-jf-b0-46.ucode +Version: 46.5e069cbd.0 + +File: iwlwifi-cc-a0-46.ucode +Version: 46.3cfab8da.0 + +File: iwlwifi-cc-a0-48.ucode +Version: 48.4fa0041f.0 + +File: iwlwifi-Qu-b0-hr-b0-48.ucode +Version: 48.4fa0041f.0 + +File: iwlwifi-Qu-b0-jf-b0-48.ucode +Version: 48.4fa0041f.0 + +File: iwlwifi-Qu-c0-hr-b0-48.ucode +Version: 48.4fa0041f.0 + +File: iwlwifi-Qu-c0-jf-b0-48.ucode +Version: 48.4fa0041f.0 + +File: iwlwifi-QuZ-a0-hr-b0-48.ucode +Version: 48.4fa0041f.0 + +File: iwlwifi-QuZ-a0-jf-b0-48.ucode +Version: 48.4fa0041f.0 + +File: iwlwifi-cc-a0-50.ucode +Version: 50.3e391d3e.0 + +File: iwlwifi-Qu-b0-hr-b0-50.ucode +Version: 50.3e391d3e.0 + +File: iwlwifi-Qu-b0-jf-b0-50.ucode +Version: 50.3e391d3e.0 + +File: iwlwifi-Qu-c0-hr-b0-50.ucode +Version: 50.3e391d3e.0 + +File: iwlwifi-Qu-c0-jf-b0-50.ucode +Version: 50.3e391d3e.0 + +File: iwlwifi-QuZ-a0-hr-b0-50.ucode +Version: 50.3e391d3e.0 + +File: iwlwifi-QuZ-a0-jf-b0-50.ucode +Version: 50.3e391d3e.0 + +File: iwlwifi-cc-a0-53.ucode +Version: 53.c31ac674.0 + +File: iwlwifi-Qu-b0-hr-b0-53.ucode +Version: 53.c31ac674.0 + +File: iwlwifi-Qu-b0-jf-b0-53.ucode +Version: 53.c31ac674.0 + +File: iwlwifi-Qu-c0-hr-b0-53.ucode +Version: 53.c31ac674.0 + +File: iwlwifi-Qu-c0-jf-b0-53.ucode +Version: 53.c31ac674.0 + +File: iwlwifi-QuZ-a0-hr-b0-53.ucode +Version: 53.c31ac674.0 + +File: iwlwifi-QuZ-a0-jf-b0-53.ucode +Version: 53.c31ac674.0 + +File: iwlwifi-cc-a0-55.ucode +Version: 55.d9698065.0 + +File: iwlwifi-Qu-b0-hr-b0-55.ucode +Version: 55.d9698065.0 + +File: iwlwifi-Qu-b0-jf-b0-55.ucode +Version: 55.d9698065.0 + +File: iwlwifi-Qu-c0-hr-b0-55.ucode +Version: 55.d9698065.0 + +File: iwlwifi-Qu-c0-jf-b0-55.ucode +Version: 55.d9698065.0 + +File: iwlwifi-QuZ-a0-hr-b0-55.ucode +Version: 55.d9698065.0 + +File: iwlwifi-QuZ-a0-jf-b0-55.ucode +Version: 55.d9698065.0 + +File: iwlwifi-cc-a0-59.ucode +Version: 59.601f3a66.0 + +File: iwlwifi-Qu-b0-hr-b0-59.ucode +Version: 59.601f3a66.0 + +File: iwlwifi-Qu-b0-jf-b0-59.ucode +Version: 59.601f3a66.0 + +File: iwlwifi-Qu-c0-hr-b0-59.ucode +Version: 59.601f3a66.0 + +File: iwlwifi-Qu-c0-jf-b0-59.ucode +Version: 59.601f3a66.0 + +File: iwlwifi-QuZ-a0-hr-b0-59.ucode +Version: 59.601f3a66.0 + +File: iwlwifi-QuZ-a0-jf-b0-59.ucode +Version: 59.601f3a66.0 + +File: iwlwifi-so-a0-gf-a0-64.ucode +Version: 64.97bbee0a.0 + +File: iwlwifi-so-a0-gf-a0-67.ucode +Version: 67.8f59b80b.0 + +File: iwlwifi-so-a0-gf4-a0-67.ucode +Version: 67.8f59b80b.0 + +File: iwlwifi-so-a0-gf-a0.pnvm + +File: iwlwifi-so-a0-gf4-a0.pnvm + +File: iwlwifi-so-a0-hr-b0-64.ucode +Version: 64.97bbee0a.0 + +File: iwlwifi-so-a0-jf-b0-64.ucode +Version: 64.97bbee0a.0 + +File: iwlwifi-ty-a0-gf-a0-59.ucode +Version: 59.601f3a66.0 + +File: iwlwifi-cc-a0-62.ucode +Version: 62.49eeb572.0 + +File: iwlwifi-Qu-b0-hr-b0-62.ucode +Version: 62.49eeb572.0 + +File: iwlwifi-Qu-b0-jf-b0-62.ucode +Version: 62.49eeb572.0 + +File: iwlwifi-Qu-c0-hr-b0-62.ucode +Version: 62.49eeb572.0 + +File: iwlwifi-Qu-c0-jf-b0-62.ucode +Version: 62.49eeb572.0 + +File: iwlwifi-QuZ-a0-hr-b0-62.ucode +Version: 62.49eeb572.0 + +File: iwlwifi-QuZ-a0-jf-b0-62.ucode +Version: 62.49eeb572.0 + +File: iwlwifi-ty-a0-gf-a0-62.ucode +Version: 62.49eeb572.0 + +File: iwlwifi-cc-a0-63.ucode +Version: 63.c04f3485.0 + +File: iwlwifi-cc-a0-67.ucode +Version: 67.8f59b80b.0 + +File: iwlwifi-Qu-b0-hr-b0-63.ucode +Version: 63.c04f3485.0 + +File: iwlwifi-Qu-b0-jf-b0-63.ucode +Version: 63.c04f3485.0 + +File: iwlwifi-Qu-c0-hr-b0-63.ucode +Version: 63.c04f3485.0 + +File: iwlwifi-Qu-c0-jf-b0-63.ucode +Version: 63.c04f3485.0 + +File: iwlwifi-QuZ-a0-hr-b0-63.ucode +Version: 63.c04f3485.0 + +File: iwlwifi-QuZ-a0-hr-b0-67.ucode +Version: 67.8f59b80b.0 + +File: iwlwifi-QuZ-a0-jf-b0-63.ucode +Version: 63.c04f3485.0 + +File: iwlwifi-ty-a0-gf-a0-63.ucode +Version: 63.c04f3485.0 + +File: iwlwifi-ty-a0-gf-a0-66.ucode +Version: 66.55c64978.0 + +File: iwlwifi-ty-a0-gf-a0-67.ucode +Version: 67.8f59b80b.0 + +File: iwlwifi-ty-a0-gf-a0.pnvm + +Licence: Redistributable. See LICENCE.iwlwifi_firmware for details + +Also available from http://wireless.kernel.org/en/users/Drivers/iwlwifi#Firmware diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-3160-9.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-3160-9.ucode new file mode 100644 index 000000000000..287a3a5f1834 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-3160-9.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-3168-29.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-3168-29.ucode new file mode 100644 index 000000000000..1759561ec203 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-3168-29.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-7260-9.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-7260-9.ucode new file mode 100644 index 000000000000..b271e861111f Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-7260-9.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-7265-9.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-7265-9.ucode new file mode 100644 index 000000000000..bbca2fe44942 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-7265-9.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-7265D-29.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-7265D-29.ucode new file mode 100644 index 000000000000..7c513f669790 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-7265D-29.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-8000C-36.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-8000C-36.ucode new file mode 100644 index 000000000000..e4988f6b421e Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-8000C-36.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-8265-36.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-8265-36.ucode new file mode 100644 index 000000000000..60fda3b7d45b Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-8265-36.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-46.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-46.ucode new file mode 100644 index 000000000000..14c1e150f6fd Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-46.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-9260-th-b0-jf-b0-46.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-9260-th-b0-jf-b0-46.ucode new file mode 100644 index 000000000000..b7f93abf7e9c Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-9260-th-b0-jf-b0-46.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-hr-b0-63.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-hr-b0-63.ucode new file mode 100644 index 000000000000..69ea5679e552 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-hr-b0-63.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-jf-b0-63.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-jf-b0-63.ucode new file mode 100644 index 000000000000..b5bf2d899a68 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-b0-jf-b0-63.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-hr-b0-63.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-hr-b0-63.ucode new file mode 100644 index 000000000000..29ec7d24f2a4 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-hr-b0-63.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-jf-b0-63.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-jf-b0-63.ucode new file mode 100644 index 000000000000..18fbd1bf7e48 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-Qu-c0-jf-b0-63.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-hr-b0-67.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-hr-b0-67.ucode new file mode 100644 index 000000000000..4859dfdaba7a Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-hr-b0-67.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-jf-b0-63.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-jf-b0-63.ucode new file mode 100644 index 000000000000..df20f459e030 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-QuZ-a0-jf-b0-63.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-cc-a0-67.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-cc-a0-67.ucode new file mode 100644 index 000000000000..74d4e2bf4455 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-cc-a0-67.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0-67.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0-67.ucode new file mode 100644 index 000000000000..1d9691dcc48f Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf-a0-67.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0-67.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0-67.ucode new file mode 100644 index 000000000000..04b484695e41 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-gf4-a0-67.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-hr-b0-64.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-hr-b0-64.ucode new file mode 100644 index 000000000000..afb15f5b58a4 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-hr-b0-64.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-jf-b0-64.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-jf-b0-64.ucode new file mode 100644 index 000000000000..76d8b1beb171 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-so-a0-jf-b0-64.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0-67.ucode b/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0-67.ucode new file mode 100644 index 000000000000..3ef0643da8fa Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0-67.ucode differ diff --git a/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0.pnvm b/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0.pnvm new file mode 100644 index 000000000000..6b8ae3670e21 Binary files /dev/null and b/sys/contrib/dev/iwlwififw/iwlwifi-ty-a0-gf-a0.pnvm differ diff --git a/sys/modules/iwlwififw/Makefile b/sys/modules/iwlwififw/Makefile new file mode 100644 index 000000000000..a885c8a237ba --- /dev/null +++ b/sys/modules/iwlwififw/Makefile @@ -0,0 +1,57 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2020-2021 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$ +# + +SUBDIR= \ + iwlwifi-3160-fw \ + iwlwifi-3168-fw \ + iwlwifi-7260-fw \ + iwlwifi-7265-fw \ + iwlwifi-7265D-fw \ + iwlwifi-8000C-fw \ + iwlwifi-8265-fw \ + iwlwifi-9000-pu-b0-jf-b0-fw \ + iwlwifi-9260-th-b0-jf-b0-fw \ + iwlwifi-Qu-b0-hr-b0-fw \ + iwlwifi-Qu-b0-jf-b0-fw \ + iwlwifi-Qu-c0-hr-b0-fw \ + iwlwifi-Qu-c0-jf-b0-fw \ + iwlwifi-QuZ-a0-hr-b0-fw \ + iwlwifi-QuZ-a0-jf-b0-fw \ + iwlwifi-cc-a0-fw \ + iwlwifi-so-a0-gf-a0-fw \ + iwlwifi-so-a0-gf4-a0-fw \ + iwlwifi-so-a0-hr-b0-fw \ + iwlwifi-so-a0-jf-b0-fw \ + iwlwifi-ty-a0-gf-a0-fw \ + iwlwifi-ty-a0-gf-a0-pnvm + +.include diff --git a/sys/modules/iwlwififw/Makefile.inc b/sys/modules/iwlwififw/Makefile.inc new file mode 100644 index 000000000000..3dddc965817e --- /dev/null +++ b/sys/modules/iwlwififw/Makefile.inc @@ -0,0 +1,49 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2020-2021 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$ +# +# Common rules for building iwlwifi firmware. + +EXT?= ucode +_NAME?= iwlwifi-${NAME}-${FWVERSION}.${EXT} + +IMG= ${_NAME} +KMOD= ${_NAME} + +CLEANFILES+= ${IMG} + +FIRMWS= ${IMG}:${IMG}:${FWVERSION} + +# License ack is not needed for iwlwifi (same as iwn/iwm). +#FIRMWARE_LICENSE= + +${IMG}: ${SRCTOP}/sys/contrib/dev/iwlwififw/${IMG} + cp ${.ALLSRC} ${.TARGET} + diff --git a/sys/modules/iwlwififw/iwlwifi-3160-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-3160-fw/Makefile new file mode 100644 index 000000000000..f55bc1a8080c --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-3160-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 9 +NAME= 3160 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-3168-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-3168-fw/Makefile new file mode 100644 index 000000000000..8d4a4e5c04a4 --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-3168-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 29 +NAME= 3168 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-7260-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-7260-fw/Makefile new file mode 100644 index 000000000000..fa2d9d067e83 --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-7260-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 9 +NAME= 7260 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-7265-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-7265-fw/Makefile new file mode 100644 index 000000000000..69fc2849cda4 --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-7265-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 9 +NAME= 7265 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-7265D-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-7265D-fw/Makefile new file mode 100644 index 000000000000..11bf5ae1687d --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-7265D-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 29 +NAME= 7265D + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-8000C-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-8000C-fw/Makefile new file mode 100644 index 000000000000..4931a64f06cc --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-8000C-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 36 +NAME= 8000C + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-8265-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-8265-fw/Makefile new file mode 100644 index 000000000000..f6cfafc557eb --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-8265-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 36 +NAME= 8265 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-fw/Makefile new file mode 100644 index 000000000000..8aeb6a9b966c --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 46 +NAME= 9000-pu-b0-jf-b0 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-9260-th-b0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-9260-th-b0-jf-b0-fw/Makefile new file mode 100644 index 000000000000..d727f2f305a9 --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-9260-th-b0-jf-b0-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 46 +NAME= 9260-th-b0-jf-b0 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile new file mode 100644 index 000000000000..f712419b5f81 --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 63 +NAME= Qu-b0-hr-b0 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile new file mode 100644 index 000000000000..acb9b34f1b19 --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 63 +NAME= Qu-b0-jf-b0 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile new file mode 100644 index 000000000000..5a959bab637a --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 63 +NAME= Qu-c0-hr-b0 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile new file mode 100644 index 000000000000..8d06ea7438fe --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 63 +NAME= Qu-c0-jf-b0 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile new file mode 100644 index 000000000000..f6bdb5285993 --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 67 +NAME= QuZ-a0-hr-b0 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile new file mode 100644 index 000000000000..4c295e0eb64d --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 63 +NAME= QuZ-a0-jf-b0 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile new file mode 100644 index 000000000000..1f2fdcaacaa4 --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 67 +NAME= cc-a0 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile new file mode 100644 index 000000000000..9f87f9bd1616 --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FWVERSION= 67 +NAME= so-a0-gf-a0 + +.include diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile new file mode 100644 index 000000000000..992b968033a8 --- /dev/null +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ *** 55 LINES SKIPPED *** From nobody Sun Nov 28 19:23:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D765D18C1476; Sun, 28 Nov 2021 19:23: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 4J2JLH4L0sz3kTZ; Sun, 28 Nov 2021 19:23:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09F891447A; Sun, 28 Nov 2021 19:23: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 1ASJNZuD041282; Sun, 28 Nov 2021 19:23:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASJNYj7041281; Sun, 28 Nov 2021 19:23:34 GMT (envelope-from git) Date: Sun, 28 Nov 2021 19:23:34 GMT Message-Id: <202111281923.1ASJNYj7041281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: bfcc09ddd422 - main - iwlwifi: import Intel's iwlwifi/mvm 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bfcc09ddd422c95a1a2e4e794b63ee54c4902398 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638127416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KauCvRYNfne2iIPHvjd9kJ6NaW9zN3vf2QZDKvoVbmM=; b=lWq8FFdTUoOQ2+931eHLMGfcc7jkLi4UbHB7qZn+ENfex1qwrDZCWSMUye0G7I0+9R4f4a TVTUjpCDk01JybYJfIxGLCSvrKINUM2BcAX1r6SXIdUO7PO500MB5Wzl7g/qExKq0AVZrO IFWzY+HcsSJFdntcRXY7OU9QUv5neSXRZwDw3CAU+O361NpCVuI8H+T9LASiCQIj0U3N9m 9ShDfcZf6wo95VkePvXlES8dzeuinBx78E7Ss8xA3HNSz0Tdyh7SK5aeDatDOwLfYxoVMM Dot4fSCiV9nVCtaySZTnBIpYD7uM55vfBDNu0I4f73/chOoTyi7+0krFhpbEGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638127416; a=rsa-sha256; cv=none; b=evCbTAvuH0xMLbsI0KE72Nxlalp66r7t46fJoYficG6L1HS8/DOVsvV4zWEbz7od9kQjXb Gja2yev6SmAV3Lr+QjZKwfN/XKgs1Jb0N4oFARPnkeXKzQ4nLhW1MSOxCjSSW2vTmVAKt0 4utYtKKPQBhurajoaBmIcgBr0Bd8iStPDf3tB4mb5mRZn4MfLhzuvmMSmXXQqq0/2y6X9P exw9XZASUnidkdpqzL8J3DJTz0fdUiDX+6iP6GJhGQUkdr7Jd7VfmSOEOjUcCBZxawWI2o lerlUd5ddzK4/LW6kJjZ03tDa/NaeL2U37X8hfNxEeoiDs9ndNj6qCcnOswUJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bfcc09ddd422c95a1a2e4e794b63ee54c4902398 commit bfcc09ddd422c95a1a2e4e794b63ee54c4902398 Author: Bjoern A. Zeeb AuthorDate: 2021-11-28 18:35:53 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-28 19:17:04 +0000 iwlwifi: import Intel's iwlwifi/mvm driver. Over the past few months we published multiple snapshots for this Linux derived driver and it has become fairly stable in terms of minimal local changes needed for new updates. The current version is based on iwlwifi-next update at cbaa6aeedee5f92dafa5982eceea2a1f98ce4f7d with the addition of a hand full of files replaced for FreeBSD. Given the lack of full license texts on non-local files this is imported under the draft policy for handling SPDX files (D29226). [1] Do not yet hook this to the build until the remaining compat code is all in. Along with the firmware import this will make publishing the last bits and final testing a lot easier. Sponsored by: The FreeBSD Foundation Approved by: core (imp) [1] MFC after: 10 days --- sys/contrib/dev/iwlwifi/cfg/22000.c | 909 ++++ sys/contrib/dev/iwlwifi/cfg/7000.c | 298 ++ sys/contrib/dev/iwlwifi/cfg/8000.c | 157 + sys/contrib/dev/iwlwifi/cfg/9000.c | 192 + sys/contrib/dev/iwlwifi/fw/acpi.h | 305 ++ sys/contrib/dev/iwlwifi/fw/api/alive.h | 174 + sys/contrib/dev/iwlwifi/fw/api/binding.h | 134 + sys/contrib/dev/iwlwifi/fw/api/cmdhdr.h | 156 + sys/contrib/dev/iwlwifi/fw/api/coex.h | 188 + sys/contrib/dev/iwlwifi/fw/api/commands.h | 617 +++ sys/contrib/dev/iwlwifi/fw/api/config.h | 150 + sys/contrib/dev/iwlwifi/fw/api/context.h | 38 + sys/contrib/dev/iwlwifi/fw/api/d3.h | 698 +++ sys/contrib/dev/iwlwifi/fw/api/datapath.h | 198 + sys/contrib/dev/iwlwifi/fw/api/dbg-tlv.h | 468 ++ sys/contrib/dev/iwlwifi/fw/api/debug.h | 407 ++ sys/contrib/dev/iwlwifi/fw/api/filter.h | 127 + sys/contrib/dev/iwlwifi/fw/api/led.h | 17 + sys/contrib/dev/iwlwifi/fw/api/location.h | 1694 +++++++ sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h | 151 + sys/contrib/dev/iwlwifi/fw/api/mac.h | 659 +++ sys/contrib/dev/iwlwifi/fw/api/nvm-reg.h | 505 +++ sys/contrib/dev/iwlwifi/fw/api/offload.h | 70 + sys/contrib/dev/iwlwifi/fw/api/paging.h | 29 + sys/contrib/dev/iwlwifi/fw/api/phy-ctxt.h | 160 + sys/contrib/dev/iwlwifi/fw/api/phy.h | 216 + sys/contrib/dev/iwlwifi/fw/api/power.h | 633 +++ sys/contrib/dev/iwlwifi/fw/api/rfi.h | 60 + sys/contrib/dev/iwlwifi/fw/api/rs.h | 720 +++ sys/contrib/dev/iwlwifi/fw/api/rx.h | 852 ++++ sys/contrib/dev/iwlwifi/fw/api/scan.h | 1190 +++++ sys/contrib/dev/iwlwifi/fw/api/sf.h | 82 + sys/contrib/dev/iwlwifi/fw/api/soc.h | 35 + sys/contrib/dev/iwlwifi/fw/api/sta.h | 494 ++ sys/contrib/dev/iwlwifi/fw/api/stats.h | 873 ++++ sys/contrib/dev/iwlwifi/fw/api/tdls.h | 161 + sys/contrib/dev/iwlwifi/fw/api/time-event.h | 418 ++ sys/contrib/dev/iwlwifi/fw/api/tx.h | 952 ++++ sys/contrib/dev/iwlwifi/fw/api/txq.h | 115 + sys/contrib/dev/iwlwifi/fw/dbg.c | 2936 ++++++++++++ sys/contrib/dev/iwlwifi/fw/dbg.h | 327 ++ sys/contrib/dev/iwlwifi/fw/debugfs.h | 17 + sys/contrib/dev/iwlwifi/fw/dump.c | 425 ++ sys/contrib/dev/iwlwifi/fw/error-dump.h | 542 +++ sys/contrib/dev/iwlwifi/fw/file.h | 984 ++++ sys/contrib/dev/iwlwifi/fw/img.c | 90 + sys/contrib/dev/iwlwifi/fw/img.h | 282 ++ sys/contrib/dev/iwlwifi/fw/init.c | 160 + sys/contrib/dev/iwlwifi/fw/notif-wait.c | 135 + sys/contrib/dev/iwlwifi/fw/notif-wait.h | 96 + sys/contrib/dev/iwlwifi/fw/paging.c | 296 ++ sys/contrib/dev/iwlwifi/fw/pnvm.c | 356 ++ sys/contrib/dev/iwlwifi/fw/pnvm.h | 38 + sys/contrib/dev/iwlwifi/fw/rs.c | 252 ++ sys/contrib/dev/iwlwifi/fw/runtime.h | 200 + sys/contrib/dev/iwlwifi/fw/smem.c | 114 + sys/contrib/dev/iwlwifi/fw/uefi.c | 262 ++ sys/contrib/dev/iwlwifi/fw/uefi.h | 45 + sys/contrib/dev/iwlwifi/iwl-agn-hw.h | 59 + sys/contrib/dev/iwlwifi/iwl-config.h | 639 +++ sys/contrib/dev/iwlwifi/iwl-context-info-gen3.h | 267 ++ sys/contrib/dev/iwlwifi/iwl-context-info.h | 184 + sys/contrib/dev/iwlwifi/iwl-csr.h | 633 +++ sys/contrib/dev/iwlwifi/iwl-dbg-tlv.c | 1313 ++++++ sys/contrib/dev/iwlwifi/iwl-dbg-tlv.h | 74 + sys/contrib/dev/iwlwifi/iwl-debug.c | 163 + sys/contrib/dev/iwlwifi/iwl-debug.h | 193 + sys/contrib/dev/iwlwifi/iwl-devtrace.c | 82 + sys/contrib/dev/iwlwifi/iwl-devtrace.h | 70 + sys/contrib/dev/iwlwifi/iwl-drv.c | 1926 ++++++++ sys/contrib/dev/iwlwifi/iwl-drv.h | 92 + sys/contrib/dev/iwlwifi/iwl-eeprom-parse.c | 879 ++++ sys/contrib/dev/iwlwifi/iwl-eeprom-parse.h | 88 + sys/contrib/dev/iwlwifi/iwl-eeprom-read.c | 401 ++ sys/contrib/dev/iwlwifi/iwl-eeprom-read.h | 12 + sys/contrib/dev/iwlwifi/iwl-fh.h | 720 +++ sys/contrib/dev/iwlwifi/iwl-io.c | 526 +++ sys/contrib/dev/iwlwifi/iwl-io.h | 102 + sys/contrib/dev/iwlwifi/iwl-modparams.h | 110 + sys/contrib/dev/iwlwifi/iwl-nvm-parse.c | 1756 ++++++++ sys/contrib/dev/iwlwifi/iwl-nvm-parse.h | 84 + sys/contrib/dev/iwlwifi/iwl-op-mode.h | 215 + sys/contrib/dev/iwlwifi/iwl-phy-db.c | 440 ++ sys/contrib/dev/iwlwifi/iwl-phy-db.h | 23 + sys/contrib/dev/iwlwifi/iwl-prph.h | 489 ++ sys/contrib/dev/iwlwifi/iwl-scd.h | 84 + sys/contrib/dev/iwlwifi/iwl-trans.c | 253 ++ sys/contrib/dev/iwlwifi/iwl-trans.h | 1504 +++++++ sys/contrib/dev/iwlwifi/mvm/binding.c | 163 + sys/contrib/dev/iwlwifi/mvm/coex.c | 685 +++ sys/contrib/dev/iwlwifi/mvm/constants.h | 126 + sys/contrib/dev/iwlwifi/mvm/ftm-initiator.c | 1368 ++++++ sys/contrib/dev/iwlwifi/mvm/ftm-responder.c | 481 ++ sys/contrib/dev/iwlwifi/mvm/fw-api.h | 41 + sys/contrib/dev/iwlwifi/mvm/fw.c | 1739 +++++++ sys/contrib/dev/iwlwifi/mvm/led.c | 119 + sys/contrib/dev/iwlwifi/mvm/mac-ctxt.c | 1639 +++++++ sys/contrib/dev/iwlwifi/mvm/mac80211.c | 5474 +++++++++++++++++++++++ sys/contrib/dev/iwlwifi/mvm/mvm.h | 2169 +++++++++ sys/contrib/dev/iwlwifi/mvm/nvm.c | 598 +++ sys/contrib/dev/iwlwifi/mvm/offloading.c | 207 + sys/contrib/dev/iwlwifi/mvm/ops.c | 1764 ++++++++ sys/contrib/dev/iwlwifi/mvm/phy-ctxt.c | 340 ++ sys/contrib/dev/iwlwifi/mvm/power.c | 956 ++++ sys/contrib/dev/iwlwifi/mvm/quota.c | 298 ++ sys/contrib/dev/iwlwifi/mvm/rfi.c | 118 + sys/contrib/dev/iwlwifi/mvm/rs-fw.c | 482 ++ sys/contrib/dev/iwlwifi/mvm/rs.c | 92 + sys/contrib/dev/iwlwifi/mvm/rs.h | 89 + sys/contrib/dev/iwlwifi/mvm/rx.c | 916 ++++ sys/contrib/dev/iwlwifi/mvm/rxmq.c | 2230 +++++++++ sys/contrib/dev/iwlwifi/mvm/scan.c | 3107 +++++++++++++ sys/contrib/dev/iwlwifi/mvm/sf.c | 279 ++ sys/contrib/dev/iwlwifi/mvm/sta.c | 3993 +++++++++++++++++ sys/contrib/dev/iwlwifi/mvm/sta.h | 549 +++ sys/contrib/dev/iwlwifi/mvm/tdls.c | 681 +++ sys/contrib/dev/iwlwifi/mvm/time-event.c | 1221 +++++ sys/contrib/dev/iwlwifi/mvm/time-event.h | 212 + sys/contrib/dev/iwlwifi/mvm/tt.c | 905 ++++ sys/contrib/dev/iwlwifi/mvm/tx.c | 2180 +++++++++ sys/contrib/dev/iwlwifi/mvm/utils.c | 1137 +++++ sys/contrib/dev/iwlwifi/pcie/ctxt-info-gen3.c | 342 ++ sys/contrib/dev/iwlwifi/pcie/ctxt-info.c | 263 ++ sys/contrib/dev/iwlwifi/pcie/drv.c | 1678 +++++++ sys/contrib/dev/iwlwifi/pcie/internal.h | 812 ++++ sys/contrib/dev/iwlwifi/pcie/rx.c | 2328 ++++++++++ sys/contrib/dev/iwlwifi/pcie/trans-gen2.c | 466 ++ sys/contrib/dev/iwlwifi/pcie/trans.c | 3679 +++++++++++++++ sys/contrib/dev/iwlwifi/pcie/tx-gen2.c | 261 ++ sys/contrib/dev/iwlwifi/pcie/tx.c | 1639 +++++++ sys/contrib/dev/iwlwifi/queue/tx.c | 1843 ++++++++ sys/contrib/dev/iwlwifi/queue/tx.h | 184 + sys/modules/iwlwifi/Makefile | 90 + 133 files changed, 86183 insertions(+) diff --git a/sys/contrib/dev/iwlwifi/cfg/22000.c b/sys/contrib/dev/iwlwifi/cfg/22000.c new file mode 100644 index 000000000000..1572097bccf1 --- /dev/null +++ b/sys/contrib/dev/iwlwifi/cfg/22000.c @@ -0,0 +1,909 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* + * Copyright (C) 2015-2017 Intel Deutschland GmbH + * Copyright (C) 2018-2021 Intel Corporation + */ +#include +#include +#include "iwl-config.h" +#include "iwl-prph.h" + +/* Highest firmware API version supported */ +#define IWL_22000_UCODE_API_MAX 67 + +/* Lowest firmware API version supported */ +#define IWL_22000_UCODE_API_MIN 39 + +/* NVM versions */ +#define IWL_22000_NVM_VERSION 0x0a1d + +/* Memory offsets and lengths */ +#define IWL_22000_DCCM_OFFSET 0x800000 /* LMAC1 */ +#define IWL_22000_DCCM_LEN 0x10000 /* LMAC1 */ +#define IWL_22000_DCCM2_OFFSET 0x880000 +#define IWL_22000_DCCM2_LEN 0x8000 +#define IWL_22000_SMEM_OFFSET 0x400000 +#define IWL_22000_SMEM_LEN 0xD0000 + +#define IWL_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-" +#define IWL_QNJ_B_HR_B_FW_PRE "iwlwifi-QuQnj-b0-hr-b0-" +#define IWL_QU_C_HR_B_FW_PRE "iwlwifi-Qu-c0-hr-b0-" +#define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0-" +#define IWL_QU_C_JF_B_FW_PRE "iwlwifi-Qu-c0-jf-b0-" +#define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0-" +#define IWL_QUZ_A_JF_B_FW_PRE "iwlwifi-QuZ-a0-jf-b0-" +#define IWL_QNJ_B_JF_B_FW_PRE "iwlwifi-QuQnj-b0-jf-b0-" +#define IWL_CC_A_FW_PRE "iwlwifi-cc-a0-" +#define IWL_SO_A_JF_B_FW_PRE "iwlwifi-so-a0-jf-b0-" +#define IWL_SO_A_HR_B_FW_PRE "iwlwifi-so-a0-hr-b0-" +#define IWL_SO_A_GF_A_FW_PRE "iwlwifi-so-a0-gf-a0-" +#define IWL_TY_A_GF_A_FW_PRE "iwlwifi-ty-a0-gf-a0-" +#define IWL_SO_A_GF4_A_FW_PRE "iwlwifi-so-a0-gf4-a0-" +#define IWL_SNJ_A_GF4_A_FW_PRE "iwlwifi-SoSnj-a0-gf4-a0-" +#define IWL_SNJ_A_GF_A_FW_PRE "iwlwifi-SoSnj-a0-gf-a0-" +#define IWL_SNJ_A_HR_B_FW_PRE "iwlwifi-SoSnj-a0-hr-b0-" +#define IWL_SNJ_A_JF_B_FW_PRE "iwlwifi-SoSnj-a0-jf-b0-" +#define IWL_MA_A_HR_B_FW_PRE "iwlwifi-ma-a0-hr-b0-" +#define IWL_MA_A_GF_A_FW_PRE "iwlwifi-ma-a0-gf-a0-" +#define IWL_MA_A_GF4_A_FW_PRE "iwlwifi-ma-a0-gf4-a0-" +#define IWL_MA_A_MR_A_FW_PRE "iwlwifi-ma-a0-mr-a0-" +#define IWL_MA_A_FM_A_FW_PRE "iwlwifi-ma-a0-fm-a0-" +#define IWL_SNJ_A_MR_A_FW_PRE "iwlwifi-SoSnj-a0-mr-a0-" +#define IWL_BZ_A_HR_B_FW_PRE "iwlwifi-bz-a0-hr-b0-" +#define IWL_BZ_A_GF_A_FW_PRE "iwlwifi-bz-a0-gf-a0-" +#define IWL_BZ_A_GF4_A_FW_PRE "iwlwifi-bz-a0-gf4-a0-" +#define IWL_BZ_A_MR_A_FW_PRE "iwlwifi-bz-a0-mr-a0-" +#define IWL_BZ_A_FM_A_FW_PRE "iwlwifi-bz-a0-fm-a0-" +#define IWL_GL_A_FM_A_FW_PRE "iwlwifi-gl-a0-fm7-a0-" + + +#define IWL_QU_B_HR_B_MODULE_FIRMWARE(api) \ + IWL_QU_B_HR_B_FW_PRE __stringify(api) ".ucode" +#define IWL_QNJ_B_HR_B_MODULE_FIRMWARE(api) \ + IWL_QNJ_B_HR_B_FW_PRE __stringify(api) ".ucode" +#define IWL_QUZ_A_HR_B_MODULE_FIRMWARE(api) \ + IWL_QUZ_A_HR_B_FW_PRE __stringify(api) ".ucode" +#define IWL_QUZ_A_JF_B_MODULE_FIRMWARE(api) \ + IWL_QUZ_A_JF_B_FW_PRE __stringify(api) ".ucode" +#define IWL_QU_C_HR_B_MODULE_FIRMWARE(api) \ + IWL_QU_C_HR_B_FW_PRE __stringify(api) ".ucode" +#define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \ + IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode" +#define IWL_QNJ_B_JF_B_MODULE_FIRMWARE(api) \ + IWL_QNJ_B_JF_B_FW_PRE __stringify(api) ".ucode" +#define IWL_CC_A_MODULE_FIRMWARE(api) \ + IWL_CC_A_FW_PRE __stringify(api) ".ucode" +#define IWL_SO_A_JF_B_MODULE_FIRMWARE(api) \ + IWL_SO_A_JF_B_FW_PRE __stringify(api) ".ucode" +#define IWL_SO_A_HR_B_MODULE_FIRMWARE(api) \ + IWL_SO_A_HR_B_FW_PRE __stringify(api) ".ucode" +#define IWL_SO_A_GF_A_MODULE_FIRMWARE(api) \ + IWL_SO_A_GF_A_FW_PRE __stringify(api) ".ucode" +#define IWL_TY_A_GF_A_MODULE_FIRMWARE(api) \ + IWL_TY_A_GF_A_FW_PRE __stringify(api) ".ucode" +#define IWL_SNJ_A_GF4_A_MODULE_FIRMWARE(api) \ + IWL_SNJ_A_GF4_A_FW_PRE __stringify(api) ".ucode" +#define IWL_SNJ_A_GF_A_MODULE_FIRMWARE(api) \ + IWL_SNJ_A_GF_A_FW_PRE __stringify(api) ".ucode" +#define IWL_SNJ_A_HR_B_MODULE_FIRMWARE(api) \ + IWL_SNJ_A_HR_B_FW_PRE __stringify(api) ".ucode" +#define IWL_SNJ_A_JF_B_MODULE_FIRMWARE(api) \ + IWL_SNJ_A_JF_B_FW_PRE __stringify(api) ".ucode" +#define IWL_MA_A_HR_B_FW_MODULE_FIRMWARE(api) \ + IWL_MA_A_HR_B_FW_PRE __stringify(api) ".ucode" +#define IWL_MA_A_GF_A_FW_MODULE_FIRMWARE(api) \ + IWL_MA_A_GF_A_FW_PRE __stringify(api) ".ucode" +#define IWL_MA_A_GF4_A_FW_MODULE_FIRMWARE(api) \ + IWL_MA_A_GF4_A_FW_PRE __stringify(api) ".ucode" +#define IWL_MA_A_MR_A_FW_MODULE_FIRMWARE(api) \ + IWL_MA_A_MR_A_FW_PRE __stringify(api) ".ucode" +#define IWL_MA_A_FM_A_FW_MODULE_FIRMWARE(api) \ + IWL_MA_A_FM_A_FW_PRE __stringify(api) ".ucode" +#define IWL_SNJ_A_MR_A_MODULE_FIRMWARE(api) \ + IWL_SNJ_A_MR_A_FW_PRE __stringify(api) ".ucode" +#define IWL_BZ_A_HR_B_MODULE_FIRMWARE(api) \ + IWL_BZ_A_HR_B_FW_PRE __stringify(api) ".ucode" +#define IWL_BZ_A_GF_A_MODULE_FIRMWARE(api) \ + IWL_BZ_A_GF_A_FW_PRE __stringify(api) ".ucode" +#define IWL_BZ_A_GF4_A_MODULE_FIRMWARE(api) \ + IWL_BZ_A_GF4_A_FW_PRE __stringify(api) ".ucode" +#define IWL_BZ_A_MR_A_MODULE_FIRMWARE(api) \ + IWL_BZ_A_MR_A_FW_PRE __stringify(api) ".ucode" +#define IWL_BZ_A_FM_A_MODULE_FIRMWARE(api) \ + IWL_BZ_A_FM_A_FW_PRE __stringify(api) ".ucode" +#define IWL_GL_A_FM_A_MODULE_FIRMWARE(api) \ + IWL_GL_A_FM_A_FW_PRE __stringify(api) ".ucode" + +static const struct iwl_base_params iwl_22000_base_params = { + .eeprom_size = OTP_LOW_IMAGE_SIZE_32K, + .num_of_queues = 512, + .max_tfd_queue_size = 256, + .shadow_ram_support = true, + .led_compensation = 57, + .wd_timeout = IWL_LONG_WD_TIMEOUT, + .max_event_log_size = 512, + .shadow_reg_enable = true, + .pcie_l1_allowed = true, +}; + +static const struct iwl_base_params iwl_ax210_base_params = { + .eeprom_size = OTP_LOW_IMAGE_SIZE_32K, + .num_of_queues = 512, + .max_tfd_queue_size = 65536, + .shadow_ram_support = true, + .led_compensation = 57, + .wd_timeout = IWL_LONG_WD_TIMEOUT, + .max_event_log_size = 512, + .shadow_reg_enable = true, + .pcie_l1_allowed = true, +}; + +static const struct iwl_ht_params iwl_22000_ht_params = { + .stbc = true, + .ldpc = true, + .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ) | + BIT(NL80211_BAND_6GHZ), +}; + +#define IWL_DEVICE_22000_COMMON \ + .ucode_api_max = IWL_22000_UCODE_API_MAX, \ + .ucode_api_min = IWL_22000_UCODE_API_MIN, \ + .led_mode = IWL_LED_RF_STATE, \ + .nvm_hw_section_num = 10, \ + .non_shared_ant = ANT_B, \ + .dccm_offset = IWL_22000_DCCM_OFFSET, \ + .dccm_len = IWL_22000_DCCM_LEN, \ + .dccm2_offset = IWL_22000_DCCM2_OFFSET, \ + .dccm2_len = IWL_22000_DCCM2_LEN, \ + .smem_offset = IWL_22000_SMEM_OFFSET, \ + .smem_len = IWL_22000_SMEM_LEN, \ + .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \ + .apmg_not_supported = true, \ + .trans.mq_rx_supported = true, \ + .vht_mu_mimo_supported = true, \ + .mac_addr_from_csr = 0x380, \ + .ht_params = &iwl_22000_ht_params, \ + .nvm_ver = IWL_22000_NVM_VERSION, \ + .trans.use_tfh = true, \ + .trans.rf_id = true, \ + .trans.gen2 = true, \ + .nvm_type = IWL_NVM_EXT, \ + .dbgc_supported = true, \ + .min_umac_error_event_table = 0x400000, \ + .d3_debug_data_base_addr = 0x401000, \ + .d3_debug_data_length = 60 * 1024, \ + .mon_smem_regs = { \ + .write_ptr = { \ + .addr = LDBG_M2S_BUF_WPTR, \ + .mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \ + }, \ + .cycle_cnt = { \ + .addr = LDBG_M2S_BUF_WRAP_CNT, \ + .mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \ + }, \ + } + +#define IWL_DEVICE_22500 \ + IWL_DEVICE_22000_COMMON, \ + .trans.device_family = IWL_DEVICE_FAMILY_22000, \ + .trans.base_params = &iwl_22000_base_params, \ + .gp2_reg_addr = 0xa02c68, \ + .mon_dram_regs = { \ + .write_ptr = { \ + .addr = MON_BUFF_WRPTR_VER2, \ + .mask = 0xffffffff, \ + }, \ + .cycle_cnt = { \ + .addr = MON_BUFF_CYCLE_CNT_VER2, \ + .mask = 0xffffffff, \ + }, \ + } + +#define IWL_DEVICE_AX210 \ + IWL_DEVICE_22000_COMMON, \ + .trans.umac_prph_offset = 0x300000, \ + .trans.device_family = IWL_DEVICE_FAMILY_AX210, \ + .trans.base_params = &iwl_ax210_base_params, \ + .min_txq_size = 128, \ + .gp2_reg_addr = 0xd02c68, \ + .min_256_ba_txq_size = 1024, \ + .mon_dram_regs = { \ + .write_ptr = { \ + .addr = DBGC_CUR_DBGBUF_STATUS, \ + .mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \ + }, \ + .cycle_cnt = { \ + .addr = DBGC_DBGBUF_WRAP_AROUND, \ + .mask = 0xffffffff, \ + }, \ + .cur_frag = { \ + .addr = DBGC_CUR_DBGBUF_STATUS, \ + .mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \ + }, \ + } + +#define IWL_DEVICE_BZ_COMMON \ + .ucode_api_max = IWL_22000_UCODE_API_MAX, \ + .ucode_api_min = IWL_22000_UCODE_API_MIN, \ + .led_mode = IWL_LED_RF_STATE, \ + .nvm_hw_section_num = 10, \ + .non_shared_ant = ANT_B, \ + .dccm_offset = IWL_22000_DCCM_OFFSET, \ + .dccm_len = IWL_22000_DCCM_LEN, \ + .dccm2_offset = IWL_22000_DCCM2_OFFSET, \ + .dccm2_len = IWL_22000_DCCM2_LEN, \ + .smem_offset = IWL_22000_SMEM_OFFSET, \ + .smem_len = IWL_22000_SMEM_LEN, \ + .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \ + .apmg_not_supported = true, \ + .trans.mq_rx_supported = true, \ + .vht_mu_mimo_supported = true, \ + .mac_addr_from_csr = 0x30, \ + .ht_params = &iwl_22000_ht_params, \ + .nvm_ver = IWL_22000_NVM_VERSION, \ + .trans.use_tfh = true, \ + .trans.rf_id = true, \ + .trans.gen2 = true, \ + .nvm_type = IWL_NVM_EXT, \ + .dbgc_supported = true, \ + .min_umac_error_event_table = 0x400000, \ + .d3_debug_data_base_addr = 0x401000, \ + .d3_debug_data_length = 60 * 1024, \ + .mon_smem_regs = { \ + .write_ptr = { \ + .addr = LDBG_M2S_BUF_WPTR, \ + .mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \ + }, \ + .cycle_cnt = { \ + .addr = LDBG_M2S_BUF_WRAP_CNT, \ + .mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \ + }, \ + } + +#define IWL_DEVICE_BZ \ + IWL_DEVICE_BZ_COMMON, \ + .trans.umac_prph_offset = 0x300000, \ + .trans.device_family = IWL_DEVICE_FAMILY_BZ, \ + .trans.base_params = &iwl_ax210_base_params, \ + .min_txq_size = 128, \ + .gp2_reg_addr = 0xd02c68, \ + .min_256_ba_txq_size = 1024, \ + .mon_dram_regs = { \ + .write_ptr = { \ + .addr = DBGC_CUR_DBGBUF_STATUS, \ + .mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \ + }, \ + .cycle_cnt = { \ + .addr = DBGC_DBGBUF_WRAP_AROUND, \ + .mask = 0xffffffff, \ + }, \ + .cur_frag = { \ + .addr = DBGC_CUR_DBGBUF_STATUS, \ + .mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \ + }, \ + } + +const struct iwl_cfg_trans_params iwl_qnj_trans_cfg = { + .mq_rx_supported = true, + .use_tfh = true, + .rf_id = true, + .gen2 = true, + .device_family = IWL_DEVICE_FAMILY_22000, + .base_params = &iwl_22000_base_params, +}; + +const struct iwl_cfg_trans_params iwl_qu_trans_cfg = { + .mq_rx_supported = true, + .use_tfh = true, + .rf_id = true, + .gen2 = true, + .device_family = IWL_DEVICE_FAMILY_22000, + .base_params = &iwl_22000_base_params, + .integrated = true, + .xtal_latency = 500, + .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_200US, +}; + +const struct iwl_cfg_trans_params iwl_qu_medium_latency_trans_cfg = { + .mq_rx_supported = true, + .use_tfh = true, + .rf_id = true, + .gen2 = true, + .device_family = IWL_DEVICE_FAMILY_22000, + .base_params = &iwl_22000_base_params, + .integrated = true, + .xtal_latency = 1820, + .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_1820US, +}; + +const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = { + .mq_rx_supported = true, + .use_tfh = true, + .rf_id = true, + .gen2 = true, + .device_family = IWL_DEVICE_FAMILY_22000, + .base_params = &iwl_22000_base_params, + .integrated = true, + .xtal_latency = 12000, + .low_latency_xtal = true, + .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US, +}; + +const struct iwl_cfg_trans_params iwl_snj_trans_cfg = { + .mq_rx_supported = true, + .use_tfh = true, + .rf_id = true, + .gen2 = true, + .device_family = IWL_DEVICE_FAMILY_AX210, + .base_params = &iwl_ax210_base_params, + .umac_prph_offset = 0x300000, +}; + +const struct iwl_cfg_trans_params iwl_so_trans_cfg = { + .mq_rx_supported = true, + .use_tfh = true, + .rf_id = true, + .gen2 = true, + .device_family = IWL_DEVICE_FAMILY_AX210, + .base_params = &iwl_ax210_base_params, + .umac_prph_offset = 0x300000, + .integrated = true, + /* TODO: the following values need to be checked */ + .xtal_latency = 500, + .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_200US, +}; + +const struct iwl_cfg_trans_params iwl_so_long_latency_trans_cfg = { + .mq_rx_supported = true, + .use_tfh = true, + .rf_id = true, + .gen2 = true, + .device_family = IWL_DEVICE_FAMILY_AX210, + .base_params = &iwl_ax210_base_params, + .umac_prph_offset = 0x300000, + .integrated = true, + .low_latency_xtal = true, + .xtal_latency = 12000, + .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US, +}; + +/* + * If the device doesn't support HE, no need to have that many buffers. + * 22000 devices can split multiple frames into a single RB, so fewer are + * needed; AX210 cannot (but use smaller RBs by default) - these sizes + * were picked according to 8 MSDUs inside 256 A-MSDUs in an A-MPDU, with + * additional overhead to account for processing time. + */ +#define IWL_NUM_RBDS_NON_HE 512 +#define IWL_NUM_RBDS_22000_HE 2048 +#define IWL_NUM_RBDS_AX210_HE 4096 + +/* + * All JF radio modules are part of the 9000 series, but the MAC part + * looks more like 22000. That's why this device is here, but called + * 9560 nevertheless. + */ +const struct iwl_cfg iwl9560_qu_b0_jf_b0_cfg = { + .fw_name_pre = IWL_QU_B_JF_B_FW_PRE, + IWL_DEVICE_22500, + .num_rbds = IWL_NUM_RBDS_NON_HE, +}; + +const struct iwl_cfg iwl9560_qu_c0_jf_b0_cfg = { + .fw_name_pre = IWL_QU_C_JF_B_FW_PRE, + IWL_DEVICE_22500, + .num_rbds = IWL_NUM_RBDS_NON_HE, +}; + +const struct iwl_cfg iwl9560_quz_a0_jf_b0_cfg = { + .fw_name_pre = IWL_QUZ_A_JF_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_NON_HE, +}; + +const struct iwl_cfg iwl9560_qnj_b0_jf_b0_cfg = { + .fw_name_pre = IWL_QNJ_B_JF_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_NON_HE, +}; + +const struct iwl_cfg_trans_params iwl_ax200_trans_cfg = { + .device_family = IWL_DEVICE_FAMILY_22000, + .base_params = &iwl_22000_base_params, + .mq_rx_supported = true, + .use_tfh = true, + .rf_id = true, + .gen2 = true, + .bisr_workaround = 1, +}; + +const struct iwl_cfg_trans_params iwl_ma_trans_cfg = { + .device_family = IWL_DEVICE_FAMILY_AX210, + .base_params = &iwl_ax210_base_params, + .mq_rx_supported = true, + .use_tfh = true, + .rf_id = true, + .gen2 = true, + .integrated = true, + .umac_prph_offset = 0x300000 +}; + +const struct iwl_cfg_trans_params iwl_bz_trans_cfg = { + .device_family = IWL_DEVICE_FAMILY_BZ, + .base_params = &iwl_ax210_base_params, + .mq_rx_supported = true, + .use_tfh = true, + .rf_id = true, + .gen2 = true, + .integrated = true, + .umac_prph_offset = 0x300000, + .xtal_latency = 12000, + .low_latency_xtal = true, + .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US, +}; + +const char iwl_ax101_name[] = "Intel(R) Wi-Fi 6 AX101"; +const char iwl_ax200_name[] = "Intel(R) Wi-Fi 6 AX200 160MHz"; +const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz"; +const char iwl_ax203_name[] = "Intel(R) Wi-Fi 6 AX203"; +const char iwl_ax211_name[] = "Intel(R) Wi-Fi 6E AX211 160MHz"; +const char iwl_ax221_name[] = "Intel(R) Wi-Fi 6E AX221 160MHz"; +const char iwl_ax231_name[] = "Intel(R) Wi-Fi 6E AX231 160MHz"; +const char iwl_ax411_name[] = "Intel(R) Wi-Fi 6E AX411 160MHz"; +const char iwl_bz_name[] = "Intel(R) TBD Bz device"; + +const char iwl_ax200_killer_1650w_name[] = + "Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)"; +const char iwl_ax200_killer_1650x_name[] = + "Killer(R) Wi-Fi 6 AX1650x 160MHz Wireless Network Adapter (200NGW)"; +const char iwl_ax201_killer_1650s_name[] = + "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)"; +const char iwl_ax201_killer_1650i_name[] = + "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)"; +const char iwl_ax210_killer_1675w_name[] = + "Killer(R) Wi-Fi 6E AX1675w 160MHz Wireless Network Adapter (210D2W)"; +const char iwl_ax210_killer_1675x_name[] = + "Killer(R) Wi-Fi 6E AX1675x 160MHz Wireless Network Adapter (210NGW)"; +const char iwl_ax211_killer_1675s_name[] = + "Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW)"; +const char iwl_ax211_killer_1675i_name[] = + "Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW)"; +const char iwl_ax411_killer_1690s_name[] = + "Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W)"; +const char iwl_ax411_killer_1690i_name[] = + "Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW)"; + +const struct iwl_cfg iwl_qu_b0_hr1_b0 = { + .fw_name_pre = IWL_QU_B_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .tx_with_siso_diversity = true, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwl_qu_b0_hr_b0 = { + .fw_name_pre = IWL_QU_B_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwl_ax201_cfg_qu_hr = { + .name = "Intel(R) Wi-Fi 6 AX201 160MHz", + .fw_name_pre = IWL_QU_B_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwl_qu_c0_hr1_b0 = { + .fw_name_pre = IWL_QU_C_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .tx_with_siso_diversity = true, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwl_qu_c0_hr_b0 = { + .fw_name_pre = IWL_QU_C_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwl_ax201_cfg_qu_c0_hr_b0 = { + .name = "Intel(R) Wi-Fi 6 AX201 160MHz", + .fw_name_pre = IWL_QU_C_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwl_quz_a0_hr1_b0 = { + .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .tx_with_siso_diversity = true, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwl_ax201_cfg_quz_hr = { + .name = "Intel(R) Wi-Fi 6 AX201 160MHz", + .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwl_ax1650s_cfg_quz_hr = { + .name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)", + .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwl_ax1650i_cfg_quz_hr = { + .name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)", + .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwl_ax200_cfg_cc = { + .fw_name_pre = IWL_CC_A_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0 = { + .name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)", + .fw_name_pre = IWL_QU_B_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0 = { + .name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)", + .fw_name_pre = IWL_QU_B_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg killer1650s_2ax_cfg_qu_c0_hr_b0 = { + .name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)", + .fw_name_pre = IWL_QU_C_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg killer1650i_2ax_cfg_qu_c0_hr_b0 = { + .name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)", + .fw_name_pre = IWL_QU_C_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwl_qnj_b0_hr_b0_cfg = { + .fw_name_pre = IWL_QNJ_B_HR_B_FW_PRE, + IWL_DEVICE_22500, + /* + * This device doesn't support receiving BlockAck with a large bitmap + * so we need to restrict the size of transmitted aggregation to the + * HT size; mac80211 would otherwise pick the HE max (256) by default. + */ + .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, + .num_rbds = IWL_NUM_RBDS_22000_HE, +}; + +const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0 = { + .name = "Intel(R) Wireless-AC 9560 160MHz", + .fw_name_pre = IWL_SO_A_JF_B_FW_PRE, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_NON_HE, +}; + +const struct iwl_cfg iwlax210_2ax_cfg_so_hr_a0 = { + .name = "Intel(R) Wi-Fi 6 AX210 160MHz", + .fw_name_pre = IWL_SO_A_HR_B_FW_PRE, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0 = { + .name = iwl_ax211_name, + .fw_name_pre = IWL_SO_A_GF_A_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0_long = { + .name = iwl_ax211_name, + .fw_name_pre = IWL_SO_A_GF_A_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, + .trans.xtal_latency = 12000, + .trans.low_latency_xtal = true, +}; + +const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = { + .name = "Intel(R) Wi-Fi 6 AX210 160MHz", + .fw_name_pre = IWL_TY_A_GF_A_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = { + .name = iwl_ax411_name, + .fw_name_pre = IWL_SO_A_GF4_A_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long = { + .name = iwl_ax411_name, + .fw_name_pre = IWL_SO_A_GF4_A_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, + .trans.xtal_latency = 12000, + .trans.low_latency_xtal = true, +}; + +const struct iwl_cfg iwlax411_2ax_cfg_sosnj_gf4_a0 = { + .name = iwl_ax411_name, + .fw_name_pre = IWL_SNJ_A_GF4_A_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwlax211_cfg_snj_gf_a0 = { + .name = iwl_ax211_name, + .fw_name_pre = IWL_SNJ_A_GF_A_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwl_cfg_snj_hr_b0 = { + .fw_name_pre = IWL_SNJ_A_HR_B_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwl_cfg_snj_a0_jf_b0 = { + .fw_name_pre = IWL_SNJ_A_JF_B_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwl_cfg_ma_a0_hr_b0 = { + .fw_name_pre = IWL_MA_A_HR_B_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwl_cfg_ma_a0_gf_a0 = { + .fw_name_pre = IWL_MA_A_GF_A_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwl_cfg_ma_a0_gf4_a0 = { + .fw_name_pre = IWL_MA_A_GF4_A_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwl_cfg_ma_a0_mr_a0 = { + .fw_name_pre = IWL_MA_A_MR_A_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwl_cfg_ma_a0_fm_a0 = { + .fw_name_pre = IWL_MA_A_FM_A_FW_PRE, + .uhb_supported = true, + IWL_DEVICE_AX210, + .num_rbds = IWL_NUM_RBDS_AX210_HE, +}; + +const struct iwl_cfg iwl_cfg_snj_a0_mr_a0 = { *** 86160 LINES SKIPPED *** From nobody Sun Nov 28 19:42:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6DBBA18AAB2D; Sun, 28 Nov 2021 19:42: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 4J2Jm96jCqz3rYD; Sun, 28 Nov 2021 19:42:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C75FF1520D; Sun, 28 Nov 2021 19:42: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 1ASJgXGW068013; Sun, 28 Nov 2021 19:42:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASJgX40068012; Sun, 28 Nov 2021 19:42:33 GMT (envelope-from git) Date: Sun, 28 Nov 2021 19:42:33 GMT Message-Id: <202111281942.1ASJgX40068012@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: 777526ed8382 - main - Remove options VESA from x86 MINIMAL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 777526ed83822e1af2b7f7ea4186dbf7d3d3d60a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638128553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=om1gOtouTYNsCuusqPIxUR/IURMLJkZOuBB9l/TjRcU=; b=paZHjHuqeVRbfbZCkn6+nQnSQdv2FwNFOa/gnOrB1C3cb5D+WaDPk45FdlH8OMr3NQ7G0H FZ01wuKKzT3HrMACWlcnH1hsg/QCIeRFPM3t2HDMSGtjrZ+xwmkRXzt0GC/p6WeRuJjV6B /Rr3Jl7aOT9tuE6rpyKhQ2r7hUE/OazUlkZHyqYtpO0QUw9gF+DBYMBf6qIzTzOjbg1/Wv hwJ/p6wvN3+YueK0dpRBXPzgF34UyQdY/gqQ3cCfh7+OrQeZOce5257bI7H/oztcloZIsQ G8bPwy4WVKpJOdQpb2E/sKStINsWmYUlehFCgfSNJk0lb7Ru8tAeVu8gNZzXpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638128554; a=rsa-sha256; cv=none; b=xez4s5G2f43DBXowDVVf+2KvWXkOXEYrknDb7GtCNlpOUqCsIOBX/KKdCaGL3KGAUvIYzh Bj5yVrmvOwbvVuA3cXCJs/j0379KlhHSSBXJJE5St7L6EbzLrkI7wYr2P1tXlJFZIm6JM4 EdYawhO1kEk2uZM664kqKLoRRDgZTxU3dD+Pdslx2M0j4XugkLnROgtvJnDQERbpGeHX4l RpKpsfLdqM77NmXh010m3fuJC3t+A2fOE2aLyxEmBoNofl/LjV6WyB5M3qccn4sjDJg+qV whx1+Un18pjw2Q2aIAirvyUPRsPwfTwdr48wTBOwJ6BNIEx01OtPpjb8WNtaPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=777526ed83822e1af2b7f7ea4186dbf7d3d3d60a commit 777526ed83822e1af2b7f7ea4186dbf7d3d3d60a Author: Ed Maste AuthorDate: 2021-11-28 19:10:28 +0000 Commit: Ed Maste CommitDate: 2021-11-28 19:37:46 +0000 Remove options VESA from x86 MINIMAL Followup to b8cf1c5c30a5, remove from MINIMAL in addition to GENERIC. options VESA / vesa.ko provides VESA Bios Extensions (VBE) support for the legacy sc(4) console. It is not used by the default console, vt(4). PR: 253733 Fixes: b8cf1c5c30a5 ("Remove options VESA from x86 GENERIC") Relnotes: Yes Sponsored by: The FreeBSD Foundation --- sys/amd64/conf/MINIMAL | 1 - sys/i386/conf/MINIMAL | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index decf092661a5..5f99f85b996d 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -105,7 +105,6 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver -options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index ba9c05bf8265..1716f8018c36 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -116,7 +116,6 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver -options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support From nobody Sun Nov 28 19:42:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A9EAB18AAB2E; Sun, 28 Nov 2021 19:42: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 4J2JmC0gVGz3rjw; Sun, 28 Nov 2021 19:42:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA03615042; Sun, 28 Nov 2021 19:42: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 1ASJgYof068037; Sun, 28 Nov 2021 19:42:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASJgYP3068036; Sun, 28 Nov 2021 19:42:34 GMT (envelope-from git) Date: Sun, 28 Nov 2021 19:42:34 GMT Message-Id: <202111281942.1ASJgYP3068036@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: 28dcccc12963 - main - x86 GENERIC/MINIMAL: group sc(4) devices together List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 28dcccc1296398f10fcd69883b553161a7a83593 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638128555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AhoafvfhTJvuH7VrUGGJHUrhQA0WCydApeEktq/42Tw=; b=jvCvr9rnxGMpTSwvN7EFDBw+OJYSyVOQlKKR0j3X/ezF8k4auMuGvmIkbEHJXIBO/QTZft wkMR9MsO52vs3quVP+YIhX6tVkwPVCs+D0jzWxu74Hc9Jule3gTZnSeIg/1Fw+KX2l963p nYn1J0WMJxba9NzbNTmsnt/gioFOZLWgkwHB08xi2aF5zEKerPPM2Vw7zbWVF36SX6yoVX 6QL6DmUL7a8a9CCTgABf/RI+xlDmGzms/uped2Ku6t+fSX3tQqG9fcULS2jGxCffJn1Cha E12YUfEfUOFM02XP5HF30yrNWgS+SprM9R0t5zlAjrNDq91ZX8drTEmMYbJmGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638128555; a=rsa-sha256; cv=none; b=gbCF1ieaks5T0omgHEYIXB9HlX85d4pS27GElt2ROJeUorMP12233LGsHVP5lmFqh9TSZ9 YqU5ilsWzWeHEgeGkfbtW5Moe7IIi2jOZ9QJc0zoDmnP7E3/XJ1yZcoF0jQOfuvyBmP0cV vJ5dgvzrpWZynDqB2mvNcNmUODXUYGhXPOEWD391iVzGDCUSDpysGAOb6p0BlswZ4GNB+4 bDSKFT6+MI7faTZfCVpA5qr0gv+caI8ySSEEo3OvV2KyLHzSZG3Z/yQJTaf3Ceed/+4fwm B81PuyME0+3vvQBvPHL1bHr8oh6qvZGkucLSHX2qRB19Ih+GwggH0AcH7Bxvgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=28dcccc1296398f10fcd69883b553161a7a83593 commit 28dcccc1296398f10fcd69883b553161a7a83593 Author: Ed Maste AuthorDate: 2021-11-28 19:11:56 +0000 Commit: Ed Maste CommitDate: 2021-11-28 19:38:41 +0000 x86 GENERIC/MINIMAL: group sc(4) devices together The vga and splash devices are part of the sc(4) system console. vt(4) uses the vt_vga driver instead, and has some limited splash support directly in vt_core.c. Leave the sc(4) options in GENERIC/MINIMAL (for now) but group them together under an sc(4) comment. Sponsored by: The FreeBSD Foundation --- sys/amd64/conf/GENERIC | 4 +--- sys/amd64/conf/MINIMAL | 4 +--- sys/i386/conf/GENERIC | 4 +--- sys/i386/conf/MINIMAL | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index edd7ae6419d2..4d679e89c92d 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -212,11 +212,9 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer +# syscons is the legacy console driver, resembling an SCO console device vga # VGA video card driver - device splash # Splash screen and screen saver support - -# syscons is the legacy console driver, resembling an SCO console device sc options SC_PIXEL_MODE # add support for the raster text mode diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index 5f99f85b996d..3c9dc8f4df5b 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -104,11 +104,9 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer +# syscons is the legacy console driver, resembling an SCO console device vga # VGA video card driver - device splash # Splash screen and screen saver support - -# syscons is the legacy console driver, resembling an SCO console device sc options SC_PIXEL_MODE # add support for the raster text mode diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 26bdf4a53ed0..679fc8b706f8 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -181,11 +181,9 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer +# syscons is the legacy console driver, resembling an SCO console device vga # VGA video card driver - device splash # Splash screen and screen saver support - -# syscons is the legacy console driver, resembling an SCO console device sc options SC_PIXEL_MODE # add support for the raster text mode diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index 1716f8018c36..d9d556048b76 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -115,11 +115,9 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer +# syscons is the legacy console driver, resembling an SCO console device vga # VGA video card driver - device splash # Splash screen and screen saver support - -# syscons is the legacy console driver, resembling an SCO console device sc options SC_PIXEL_MODE # add support for the raster text mode From nobody Sun Nov 28 21:20:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2BB5218B30F7; Sun, 28 Nov 2021 21:20: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 4J2Lx56B7wz3Dkl; Sun, 28 Nov 2021 21:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4867164EC; Sun, 28 Nov 2021 21: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 1ASLKPeA096738; Sun, 28 Nov 2021 21: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 1ASLKP8n096737; Sun, 28 Nov 2021 21:20:25 GMT (envelope-from git) Date: Sun, 28 Nov 2021 21:20:25 GMT Message-Id: <202111282120.1ASLKP8n096737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Danilo G. Baio" Subject: git: ec80eab8a16a - main - motd: Fix Questions List address List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dbaio X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec80eab8a16acc358895fd01d822799189948ad0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638134425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+dc9ZHjeUNPI2AIn5oaBxL0L10x67ckkaCS9xReqCn8=; b=yaPP6eIMdHbeXstC30J8qIWQKwbruMQhyjjA0cRrYsdUDW1vZKsRXkgpwzxCqLtugyyCOY oCDVRNS33jcjkWYTajVijvw/EUaJOuWJ14NoGyC5/8IHpOiOL4lbGsXYuIto2e2JlYK92G /ZwZEPTlUahwRJ+IyTcScjnyy4/9ZrrIQY/g8rrMQqJv//HFsQO4V2PO5xEWwLhVThD91o dhuf8USdmIaD/5MOPVB3RK7idzyM+65Aws5z4zrDlVy7pbpGd/0Wes2lhMw11zfTW/ePaq vQApAzM14fy8mYjh1kJRISKpAgrUPwgAG3dxn9IA4m5wahxULGX/wRzKplj4rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638134425; a=rsa-sha256; cv=none; b=UnztEWGFQGv+cIIqE42ZfHDsaqH/bPXOd4kYYgeoCsNIuBXfDkVGft4w0EZ2TLKz5Ldc20 UdiVb9zUqP4pVGZ4DKem8efOwGmMyjWVNh9xgLItZJ63BKZ52WEEMX94GESPP1EkFewokA /M90ppwCLxe4quSuLUvh1NMuc1qNtFKIBkbljW5t0vuZVE8uQ5pAsZKqIKSlGNBhEel65J RzvHaKIJ1qGBfmCTeAW8+ZYetC2LEZa25vdJBca1lU9Fun1Xz4mc5RCUvVZPOblE9bd+Y7 wwPd0NzAjkhIp5M9psJQencKslfzdf2qkNpB0ykNLc0Vxyg0b+F9mih1Bo7cug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dbaio (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ec80eab8a16acc358895fd01d822799189948ad0 commit ec80eab8a16acc358895fd01d822799189948ad0 Author: Danilo G. Baio AuthorDate: 2021-11-24 00:49:14 +0000 Commit: Danilo G. Baio CommitDate: 2021-11-28 21:15:04 +0000 motd: Fix Questions List address Following mailing lists migration from Mailman to Mlmmj. https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ --> https://lists.freebsd.org/subscription/freebsd-questions Adding a short link (as we already have for Faq and Handbook), so all links can be indented the same way. Reviewed by: imp (earlier version) Approved by: lwhsu Differential Revision: https://reviews.freebsd.org/D33101 --- usr.bin/login/motd.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/login/motd.template b/usr.bin/login/motd.template index ea98a3266c3a..e743370ca0a2 100644 --- a/usr.bin/login/motd.template +++ b/usr.bin/login/motd.template @@ -5,7 +5,7 @@ Release Notes, Errata: https://www.FreeBSD.org/releases/ Security Advisories: https://www.FreeBSD.org/security/ FreeBSD Handbook: https://www.FreeBSD.org/handbook/ FreeBSD FAQ: https://www.FreeBSD.org/faq/ -Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ +Questions List: https://www.FreeBSD.org/lists/questions/ FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ From nobody Sun Nov 28 23:07:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 768BE18C798D; Sun, 28 Nov 2021 23:07: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 4J2PJQ0m4lz4ZdJ; Sun, 28 Nov 2021 23:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE5F717CBF; Sun, 28 Nov 2021 23:07: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 1ASN7Hln035372; Sun, 28 Nov 2021 23:07:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASN7HWR035371; Sun, 28 Nov 2021 23:07:17 GMT (envelope-from git) Date: Sun, 28 Nov 2021 23:07:17 GMT Message-Id: <202111282307.1ASN7HWR035371@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: 8fbae6c7bd63 - main - fusefs: delete a redundant getnanouptime List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8fbae6c7bd63fca64b898843f63cb24269a7dd46 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638140838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U3/3iqpenBTER84qYigFjsIPlt0xVBJQw3F0pRLsOy8=; b=ZU2cig22mRyczvhVLUl13MEBvFUtcneqrgzQVMLktc1WB6uudQ80C1vS0e7LcgQlHYGWk3 wu94PRQGEuHvgQmIYO+Tebhknn6SkK03xEM00Wub6Mg0HeRH2Y1HkRdTC08B0v3NnIvi1v xLcvxK2/1p/bq0EjQ4Hr6UbRepWU3ON2txPt6SAFcRzIClik8Vts0vbhZ6vh13m7UoI2sz htxHjviQjtqDveu5nosIrZ0218BpmMvQZIGRdijytQRMYZqZ6ogE8iG0xK/HKmyHPSZs8f UYXlF28cLcbwYx7fmAUhzGwmtwXBUfR9PBnuPvestrdfmsmIWe4i9TlhAsyoBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638140838; a=rsa-sha256; cv=none; b=uFSTZnSAYRSuBmw5nZ+X1f/Kpwbg6Ktwb90uvF6suWEXkNrXSY4fHHc15ynHotNDu/fiFj 8ACzNss4DFoC+ygjHy6Lx72MEozxEbtt421c6RiDE6+Ir41t/Tnec2U9ESR1xJghmq0epi eET5xz47c5zk74vTsMbDH2Ks7sSGJIp1jQpM/IQ3b8TqqQExyy2UhAzX45+nnmht03coRY CAPyxMttbuISrVEw6RCTvvNcNX3DQFVuJum2Lza5TxZ8SSkYTLF4jdc95DTXYDlGtTXkkx 2DubOEboQTao1hwFcA2swdxTuduf3NCd4fnvSZFmkhAxXnmp7dxk370wm42qCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=8fbae6c7bd63fca64b898843f63cb24269a7dd46 commit 8fbae6c7bd63fca64b898843f63cb24269a7dd46 Author: Alan Somers AuthorDate: 2021-11-28 23:05:30 +0000 Commit: Alan Somers CommitDate: 2021-11-28 23:05:30 +0000 fusefs: delete a redundant getnanouptime It's been redundant since SVN r346060 added another getnanouptime just above. MFC after: 2 weeks --- sys/fs/fuse/fuse_vnops.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index e1c04f1583ba..e61a3cda80a7 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -1286,7 +1286,6 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) break; case ENOENT: /* negative match */ - getnanouptime(&now); if (timespeccmp(&timeout, &now, <=)) { /* Cache timeout */ cache_purge_negative(dvp); From nobody Sun Nov 28 23:52:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7FB0318BCAB1; Sun, 28 Nov 2021 23: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 4J2QJT1cFzz4pSZ; Sun, 28 Nov 2021 23:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F7601882E; Sun, 28 Nov 2021 23: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 1ASNqOjX000867; Sun, 28 Nov 2021 23:52:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASNqOxJ000866; Sun, 28 Nov 2021 23:52:24 GMT (envelope-from git) Date: Sun, 28 Nov 2021 23:52:24 GMT Message-Id: <202111282352.1ASNqOxJ000866@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: 638b90a1911a - main - nfs: Quiet a few "unused" warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 638b90a1911ab52e6bce1695e396bb307c806b62 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638143545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECxBkJ4JSzY2GrYoKQNlXVX8pwXRng02wgSOm6vHkqQ=; b=tRFSPRrTUR0IfhGTc9Y3tyUnNfRYa6oStQsgASZUv6vM/fphSXHeM7zd99WobIqbodSygN yrn4MOHHa0Gt1fWdUzVLuTK/gWzk/6ZEQTQIYsrp3DygCd1P48JwmkmigQP4ZJ4PBEvt2V kTOUYYE1KB4OZjCmClaMYuj9ywDDpGeQtqwuoKaofMmoDYo8/jI3TddXSFzEPnPGfudddv UNzGmkQESDB5VS/aPIhrflzM4zlZwgx1CorcxVUO+rorTGe7OUyZZctCx/YtF2PvW/P34O gPsMQAmylAyW4fXVk3R7qDHgbNuudXhbWYkn7QjYJbh7OZeNQN1lP7KSu7fMFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638143545; a=rsa-sha256; cv=none; b=qaNLoyRl3f/hQ/6dfxN/9vMw+UPx53lYVjqcmA0B5WQNX/PUt0m3Tp2peRDJcJM2Ug88Ma qDCaJAnuHYG1qhBMEW2yXZzIDHkTMpGZLU4c9mogkS52Ms0u5chBoVpMvj9/+SMqVOCvxh B7K21x5bos22dDjmwMrlp7B9yN6c4kleh0X9JzG10Ix1OHB0x8kbBrTV7bwrtkvBQ2quWt X47+AKVh8lYYmMcoVDF/3/yPCT8UNmG2y0FpxChyBYmYUdUatPIJxdaxvwmtRAo18EMfPX 85uc7FiejJMN50mB1JEnUcJDYbU6IkafvElEfWPeJQPlPLJBi66O/IJb0w/xlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=638b90a1911ab52e6bce1695e396bb307c806b62 commit 638b90a1911ab52e6bce1695e396bb307c806b62 Author: Rick Macklem AuthorDate: 2021-11-28 23:48:51 +0000 Commit: Rick Macklem CommitDate: 2021-11-28 23:48:51 +0000 nfs: Quiet a few "unused" warnings For most of these warnings, the variable is loaded with data parsed out of an RPC messages. In case the data is useful in the future, I just marked these with __unused. --- sys/fs/nfs/nfs_commonsubs.c | 3 +-- sys/fs/nfsserver/nfs_nfsdport.c | 2 +- sys/fs/nfsserver/nfs_nfsdserv.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index d3d572fe5a90..910f10eb1b4a 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -943,7 +943,7 @@ nfsm_fhtom(struct nfsrv_descript *nd, u_int8_t *fhp, int size, int set_true) { u_int32_t *tl; u_int8_t *cp; - int fullsiz, rem, bytesize = 0; + int fullsiz, bytesize = 0; if (size == 0) size = NFSX_MYFH; @@ -960,7 +960,6 @@ nfsm_fhtom(struct nfsrv_descript *nd, u_int8_t *fhp, int size, int set_true) case ND_NFSV3: case ND_NFSV4: fullsiz = NFSM_RNDUP(size); - rem = fullsiz - size; if (set_true) { bytesize = 2 * NFSX_UNSIGNED + fullsiz; NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 78151309896c..f06c2d5a6975 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -2307,7 +2307,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdgram, int nlen, r, error = 0, getret = 1, usevget = 1; int siz, cnt, fullsiz, eofflag, ncookies, entrycnt; caddr_t bpos0, bpos1; - u_int64_t off, toff, verf; + u_int64_t off, toff, verf __unused; u_long *cookies = NULL, *cookiep; nfsattrbit_t attrbits, rderrbits, savbits; struct uio io; diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 4c5dade2c278..445ef2ad9e2b 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -5081,8 +5081,8 @@ nfsrvd_layoutstats(struct nfsrv_descript *nd, __unused int isdgram, int cnt, error = 0; int layouttype __unused; char devid[NFSX_V4DEVICEID] __unused; - uint64_t offset, len, readcount, readbytes, writecount, writebytes - __unused; + uint64_t offset __unused, len __unused, readcount __unused; + uint64_t readbytes __unused, writecount __unused, writebytes __unused; NFSM_DISSECT(tl, uint32_t *, 6 * NFSX_HYPER + NFSX_STATEID + NFSX_V4DEVICEID + 2 * NFSX_UNSIGNED); From nobody Mon Nov 29 00:08:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 20A7B18C616A; Mon, 29 Nov 2021 00:08: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 4J2Qg150Vcz3Bs5; Mon, 29 Nov 2021 00:08:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85E1A1886D; Mon, 29 Nov 2021 00:08: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 1AT08T7s015503; Mon, 29 Nov 2021 00:08:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AT08T2G015502; Mon, 29 Nov 2021 00:08:29 GMT (envelope-from git) Date: Mon, 29 Nov 2021 00:08:29 GMT Message-Id: <202111290008.1AT08T2G015502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: b61ed468809f - stable/13 - nfsstat: Add output for counts of new RPCs to the "-E" option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b61ed468809f953adb2f885e1ec29f500c608087 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638144509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2QRZbc2ObT9Q4H5eZUrriuuppmzv+fr/Iv5y5BnGoLc=; b=j4Cycekl1HE67w1zT0qRW54w7Lk+R7OT2yvpZaGqs5U85IOeFjDGmUjU9FjeGUil5+Janw wmIbBJk8Mc/rh0Vm8hzB2kzPPIbaUBP3On5OXGxdddrP9li6FGLhoT+Z+h+ETq2k6PnpyB BjVXOcf63DYzsN3sqgLrzMkXfiAFrBXcryiqIj8jAb66rRmps02NdpI6q+kHxfFHixVuJx BPP2bF5dbvGrLcCwxTtNsu4GCMJXv0QJKnd/393Chas3AxsplXVSVcVqXK15glurY+Jmr5 VYamOpE4hheB1FeyD8jEQSTo3qmADXO2yeiFJ6bJ3L+C8gR3QKrJ0M1Lf2texw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638144509; a=rsa-sha256; cv=none; b=rqljJ1sqbl1kQp0vfAAaj3gjKV4PAdR4S6HnWYbTRLAbtgBVcS+9qUfBxHQZqAxR/x9WD6 3+NmuAoJb6Rb+48vRbR/aWE3Z+yldDtMmTwkNlVktSowT4BuCERJ1EkwErM0B+/+HhyxT0 3E0sm2o3NMkgHNXJrbfK8msRDQjiHSLaTmaOy0CzjeZghIab9E8vmrkp38c0z6RpUskn8a JWl/oQH0nDx+mdSjYcWrBOKzjkE21ajUogFivVBsAzE1LEc3HDJ6XrpJDrYLyTuw2iPW0w U0VOpTElPK8kLpV9ltoznWN83aG9Yr8zhANoTjZ7mtC0QiYGI5bW/4KBXqWIXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=b61ed468809f953adb2f885e1ec29f500c608087 commit b61ed468809f953adb2f885e1ec29f500c608087 Author: Rick Macklem AuthorDate: 2021-11-14 21:36:14 +0000 Commit: Rick Macklem CommitDate: 2021-11-28 23:58:03 +0000 nfsstat: Add output for counts of new RPCs to the "-E" option Add output to the "-E" option for new RPCs related to NFSv4.1/4.2. Also, add output of the counts for allocated layouts and the title for the "Client" section (which was lost during a previous commit). (cherry picked from commit 75c666197cc7574f6f0d48344f8725f72072fc84) --- usr.bin/nfsstat/nfsstat.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index e2d747634bcc..da075d57c52e 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -749,10 +749,14 @@ exp_intpr(int clientOnly, int serverOnly, int nfs41) (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_WRITEDS], (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_COMMITDS]); - xo_emit("{T:OpenLayout/%13.13s}{T:CreateLayout/%13.13s}\n"); - xo_emit("{:openlayout/%13ju}{:createlayout/%13ju}\n", + xo_emit("{T:OpenLayout/%13.13s}{T:CreateLayout/%13.13s}" + "{T:BindConnSess/%13.13s}{T:LookupOpen/%13.13s}\n"); + xo_emit("{:openlayout/%13ju}{:createlayout/%13ju}" + "{:bindconnsess/%13ju}{:lookupopen/%13ju}\n", (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_OPENLAYGET], - (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATELAYGET]); + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATELAYGET], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_BINDCONNTOSESS], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOOKUPOPEN]); xo_close_container("nfsv41"); @@ -772,17 +776,23 @@ exp_intpr(int clientOnly, int serverOnly, int nfs41) (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_GETEXTATTR]); xo_emit("{T:SetExtattr/%13.13s}{T:RmExtattr/%13.13s}" - "{T:ListExtattr/%13.13s}\n"); + "{T:ListExtattr/%13.13s}{T:Deallocate/%13.13s}" + "{T:LayoutError/%13.13s}\n"); xo_emit("{:setextattr/%13ju}{:rmextattr/%13ju}" - "{:listextattr/%13ju}\n", + "{:listextattr/%13ju}{:deallocate/%13ju}" + "{:layouterror/%13ju}\n", (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SETEXTATTR], (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_RMEXTATTR], - (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LISTEXTATTR]); + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LISTEXTATTR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_DEALLOCATE], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LAYOUTERROR]); xo_close_container("nfsv42"); } xo_close_container("operations"); + if (printtitle) + xo_emit("{T:Client:}\n"); xo_open_container("client"); xo_emit("{T:OpenOwner/%13.13s}{T:Opens/%13.13s}" "{T:LockOwner/%13.13s}{T:Locks/%13.13s}" @@ -798,12 +808,13 @@ exp_intpr(int clientOnly, int serverOnly, int nfs41) (uintmax_t)ext_nfsstats.cllocalopenowners); xo_emit("{T:LocalOpen/%13.13s}{T:LocalLown/%13.13s}" - "{T:LocalLock/%13.13s}\n"); + "{T:LocalLock/%13.13s}{T:Layouts/%13.13s}\n"); xo_emit("{:localopen/%13ju}{:locallown/%13ju}" - "{:locallock/%13ju}\n", + "{:locallock/%13ju}{:layouts/%13ju}\n", (uintmax_t)ext_nfsstats.cllocalopens, (uintmax_t)ext_nfsstats.cllocallockowners, - (uintmax_t)ext_nfsstats.cllocallocks); + (uintmax_t)ext_nfsstats.cllocallocks, + (uintmax_t)ext_nfsstats.cllayouts); xo_close_container("client"); xo_open_container("rpc"); @@ -1061,6 +1072,9 @@ exp_intpr(int clientOnly, int serverOnly, int nfs41) (uintmax_t)ext_nfsstats.srvlockowners, (uintmax_t)ext_nfsstats.srvlocks, (uintmax_t)ext_nfsstats.srvdelegates); + xo_emit("{T:Layouts/%13.13s}\n"); + xo_emit("{:layouts/%13ju}\n", + (uintmax_t)ext_nfsstats.srvlayouts); xo_close_container("server"); if (printtitle) From nobody Mon Nov 29 01:36:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 30D1718A8D9D; Mon, 29 Nov 2021 01: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 4J2ScQ4zRlz3tdl; Mon, 29 Nov 2021 01:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C72B196F2; Mon, 29 Nov 2021 01: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 1AT1aMhG034023; Mon, 29 Nov 2021 01: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 1AT1aM5L034022; Mon, 29 Nov 2021 01:36:22 GMT (envelope-from git) Date: Mon, 29 Nov 2021 01:36:22 GMT Message-Id: <202111290136.1AT1aM5L034022@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: 65d70b3bae0c - main - fusefs: fix copy_file_range when extending a 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: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65d70b3bae0c70798b0a2b8ed129bc146fed1cce Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638149782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FB8tBVMWGY+FuzOE2GyRClL4Wv8+StJv2oNmkbJCc60=; b=MkU1mo0THHAhFSTDZKNNzCdJyUtUQMaB8FIRlDa6udRd9cDjC5UmkYMwD3k0HStk6ajXhq AlMgT94eWRyh9dCwsHtvrR98laYQXh0sVG0RqQUO2gbN9BFwGwLII1g1pgOem4H8XZayrL yvddtAHxF0Oxd+KHl0GiYYWkqUzhSnzaKNS5+pXhC862ZyTuig9NUGmZ+yjwWqSYsb8OV1 0fEZiFix0bWwR1hDq/MEkjmCiHl82GcnwvRqu5ABvsmn+8vEG4dzxYesZLPR9Ef/NvU83Z C32Pm3Xu/CKklSfcC0krb8Rn8AicCJATSvni+je8WR4e8XhdvCE6iLlGc+DfIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638149782; a=rsa-sha256; cv=none; b=keXA+qvP1e4bAxbD1DzxS9achqt1Hu1/BzJhrdgl6VR2kFGZn5q29h4S9xWgmHUboJXTwi GTDMYYwLnCC51iAeVQHdV4hDhrtKRq7YVRxm+gJBvU9tMnpKIEgPMB83W0lE0ttD0YLEq2 fGxvCLcTFdqO/lgRb80YypcKFgfYmty24ISsFzwXM4uO7Q2/2T/O94jN2FZnvtMOQrD1oj 25F7LdDp4FKSbR8EUgyetGhm442yP0UucSQoz69+9v043P/vC/+cmv9vOEMi+0t78KuQ5k uNAFAzvJNLkVH2zaI2uTtgCDr7azLcP5zb01CUILg2pYxhI8wnxefpJu93a0yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=65d70b3bae0c70798b0a2b8ed129bc146fed1cce commit 65d70b3bae0c70798b0a2b8ed129bc146fed1cce Author: Alan Somers AuthorDate: 2021-11-29 01:35:58 +0000 Commit: Alan Somers CommitDate: 2021-11-29 01:35:58 +0000 fusefs: fix copy_file_range when extending a file When copy_file_range extends a file, it must update the cached file size. MFC after: 2 weeks Reviewed by: rmacklem, pfg Differential Revision: https://reviews.freebsd.org/D33151 --- sys/fs/fuse/fuse_vnops.c | 3 +++ tests/sys/fs/fusefs/copy_file_range.cc | 47 ++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index e61a3cda80a7..d87639ec3f79 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -650,6 +650,7 @@ fuse_vnop_copy_file_range(struct vop_copy_file_range_args *ap) struct vnode *invp = ap->a_invp; struct vnode *outvp = ap->a_outvp; struct mount *mp = vnode_mount(invp); + struct fuse_vnode_data *outfvdat = VTOFUD(outvp); struct fuse_dispatcher fdi; struct fuse_filehandle *infufh, *outfufh; struct fuse_copy_file_range_in *fcfri; @@ -731,6 +732,8 @@ fuse_vnop_copy_file_range(struct vop_copy_file_range_args *ap) *ap->a_inoffp += fwo->size; *ap->a_outoffp += fwo->size; fuse_internal_clear_suid_on_write(outvp, outcred, td); + if (*ap->a_outoffp > outfvdat->cached_attrs.va_size) + fuse_vnode_setsize(outvp, *ap->a_outoffp, false); } fdisp_destroy(&fdi); diff --git a/tests/sys/fs/fusefs/copy_file_range.cc b/tests/sys/fs/fusefs/copy_file_range.cc index bb8eecf8b862..03a892d35d29 100644 --- a/tests/sys/fs/fusefs/copy_file_range.cc +++ b/tests/sys/fs/fusefs/copy_file_range.cc @@ -353,6 +353,53 @@ TEST_F(CopyFileRange, same_file) ASSERT_EQ(len, copy_file_range(fd, &off_in, fd, &off_out, len, 0)); } +/* + * copy_file_range can extend the size of a file + * */ +TEST_F(CopyFileRange, extend) +{ + const char FULLPATH[] = "mountpoint/src.txt"; + const char RELPATH[] = "src.txt"; + struct stat sb; + const uint64_t ino = 4; + const uint64_t fh = 0xdeadbeefa7ebabe; + off_t fsize = 65536; + off_t off_in = 0; + off_t off_out = 65536; + ssize_t len = 65536; + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1, fh); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_COPY_FILE_RANGE && + in.header.nodeid == ino && + in.body.copy_file_range.fh_in == fh && + (off_t)in.body.copy_file_range.off_in == off_in && + in.body.copy_file_range.nodeid_out == ino && + in.body.copy_file_range.fh_out == fh && + (off_t)in.body.copy_file_range.off_out == off_out && + in.body.copy_file_range.len == (size_t)len && + in.body.copy_file_range.flags == 0); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, write); + out.body.write.size = len; + }))); + + fd = open(FULLPATH, O_RDWR); + ASSERT_GE(fd, 0); + ASSERT_EQ(len, copy_file_range(fd, &off_in, fd, &off_out, len, 0)); + + /* Check that cached attributes were updated appropriately */ + ASSERT_EQ(0, fstat(fd, &sb)) << strerror(errno); + EXPECT_EQ(fsize + len, sb.st_size); + + leak(fd); +} + /* With older protocol versions, no FUSE_COPY_FILE_RANGE should be attempted */ TEST_F(CopyFileRange_7_27, fallback) { From nobody Mon Nov 29 01:43:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6D89018AD72B; Mon, 29 Nov 2021 01:46:15 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail09.asahi-net.or.jp (mail09.asahi-net.or.jp [202.224.55.49]) by mx1.freebsd.org (Postfix) with ESMTP id 4J2Sqq1Yljz4RtG; Mon, 29 Nov 2021 01:46:14 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from vmware12.advok.com (pool-96-225-64-148.nwrknj.fios.verizon.net [96.225.64.148]) (Authenticated sender: NR2Y-OOT) by mail09.asahi-net.or.jp (Postfix) with ESMTPSA id 666174B81F; Mon, 29 Nov 2021 10:46:05 +0900 (JST) Date: Sun, 28 Nov 2021 20:43:39 -0500 From: Yoshihiro Ota To: Konstantin Belousov , Peter Jeremy Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b19740f4ce7a - main - swap_pager: lock vnode in swapdev_strategy() Message-Id: <20211128204339.58f06247fd2946ddc030d1b0@j.email.ne.jp> In-Reply-To: References: <202111251935.1APJZA1e094731@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; i386-portbld-freebsd13.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-Rspamd-Queue-Id: 4J2Sqq1Yljz4RtG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, I wonder creating /etc/rc.d/nfsswap that depends on nfsclient can give a smoother shutdown like swaplate depends on mountlate. Hiro On Sun, 28 Nov 2021 04:00:56 +0200 Konstantin Belousov wrote: > On Sun, Nov 28, 2021 at 12:22:46PM +1100, Peter Jeremy wrote: > > On 2021-Nov-27 01:26:17 +0200, Konstantin Belousov wrote: > > >commit 9c62295373f728459c19138f5aa03d9cb8422554 > > >Author: Konstantin Belousov > > >Date: Sat Nov 27 01:22:27 2021 +0200 > > > > > > swapoff_one(): only check free pages count manually turning swap off > > > > That didn't work but I don't think the underlying bug is related to > > your recent work on swap_pager - digging back through my logs, I've > > found another similar panic in August last year. > It is definitely not caused by, it is just yet another issue. > > > > > Nov 28 09:40:17 rock64 syslogd: exiting on signal 15 > > Waiting (max 60 seconds) for system process `vnlru' to stop... done > > Waiting (max 60 seconds) for system process `syncer' to stop... > > Syncing disks, vnodes remaining... 0 0 done > > Waiting (max 60 seconds) for system thread `bufdaemon' to stop... done > > Waiting (max 60 seconds) for system thread `bufspacedaemon-0' to stop... done > > All buffers synced. > > No strategy for buffer at 0xffff0000bf8dc000 > > vnode 0xffffa00009024a80: type VBAD > > usecount 2, writecount 0, refcount 33263 seqc users 1 > > hold count flags () > > flags (VIRF_DOOMED|VV_VMSIZEVNLOCK) > > lock type nfs: SHARED (count 1) > > swap_pager: I/O error - pagein failed; blkno 241400,size 4096, error 45 > > panic: VOP_STRATEGY failed bp=0xffff0000bf8dc000 vp=0 > > cpuid = 0 > > time = 1638052821 > > KDB: stack backtrace: > > db_trace_self() at db_trace_self > > db_trace_self_wrapper() at db_trace_self_wrapper+0x30 > > vpanic() at vpanic+0x178 > > panic() at panic+0x44 > > bufstrategy() at bufstrategy+0x80 > > swapdev_strategy() at swapdev_strategy+0xcc > > swap_pager_getpages_locked() at swap_pager_getpages_locked+0x460 > > swapoff_one() at swapoff_one+0x3e4 > > swapoff_all() at swapoff_all+0x9c > > bufshutdown() at bufshutdown+0x2ac > > kern_reboot() at kern_reboot+0x240 > > sys_reboot() at sys_reboot+0x358 > > do_el0_sync() at do_el0_sync+0x4a4 > > handle_el0_sync() at handle_el0_sync+0x9c > > --- exception, esr 0x56000000 > > KDB: enter: panic > > [ thread pid 1 tid 100002 ] > > Stopped at kdb_enter+0x48: undefined f900c11f > > db> > > > > This is the same traceback as my previous mail. Looking at the code > > path, the test whether there's enough RAM to swap in all the data > > passes in both cases: If swapoff_one() returned ENOMEM then > > swapoff_all() would report a "Cannot remove swap device" error and > > keep going (not bother to actually remove the swap device) - and > > that's not happening. > > > > I think the important message is "No strategy for buffer at 0x..." > > which comes from vop_nostrategy() and causes bufstrategy() to panic: > > > > swapdev_strategy() > > => bstrategy() > > => BO_STRATEGY() > > => bufstrategy() > > => VOP_STRATEGY() > > => VOP_STRATEGY_APV() > > => vop_nostrategy() > > => bufdone() => swp_pager_async_iodone() > > > > Presumably, stopping the network means there's no longer any way for > > swap operations to complete so the swap device has become associated > > with default_vnodeops, (though I haven't dug into the actual code > > path that does that). > > > > Moving up a level, does it really matter if swapoff_one() is skipped? > > If it actually returned an error (eg if the free memory test failed), > > then that's what would happen. By this point in the shutdown, there's > > no userland left (which makes me wonder why there's anything left in > > swap in any case) and only the final cleanups remain before the kernel > > shuts down. What's really needed is a way to detect that the relevant > > swap I/O provider has gone away and return to swapoff_all() without > > panicing. > > I think the intent there is to ensure that the system is in as much steady > state as possible. I can easily imagine some HBA doing weird things if > some io is in flight when the reset comes in. So we want to ensure that > no io occurs. > > The cause for your panic is not the network interface down state (in fact, > I think that interface state up), but as you correctly analyzed, the > call to vop_nostrategy(). It is there in stack because underlying filesystem > was unmounted, and the swap vnode was reclaimed, replacing NFS vop vector > with deadfs vop vector, which inherits from the default vop. > > The bit that I do not understand from your report, is why swapoff_all() did > not occured earlier. Your earlier report, where spurious ENOMEM came out > from swapoff(2) syscall, and which I fixed by the previous patch, means > that there was an attempt to swapoff. > > Still, the solution is, IMO, to swapoff before unmount. We do not need > swapin for flushing buffers. > > Please try this combined patch. > > diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c > index 4b746a269171..201afeec9311 100644 > --- a/sys/kern/vfs_bio.c > +++ b/sys/kern/vfs_bio.c > @@ -1452,16 +1452,21 @@ bufshutdown(int show_busybufs) > */ > printf("Giving up on %d buffers\n", nbusy); > DELAY(5000000); /* 5 seconds */ > + swapoff_all(); > } else { > if (!first_buf_printf) > printf("Final sync complete\n"); > + > /* > - * Unmount filesystems > + * Unmount filesystems. Swapoff before unmount, > + * because swap on file is unoperational after unmount > + * of underlying filesystem. > */ > - if (!KERNEL_PANICKED()) > + if (!KERNEL_PANICKED()) { > + swapoff_all(); > vfs_unmountall(); > + } > } > - swapoff_all(); > DELAY(100000); /* wait for console output to finish */ > } > > diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c > index 4cfdb3fd2cc8..981a71b2c4b1 100644 > --- a/sys/vm/swap_pager.c > +++ b/sys/vm/swap_pager.c > @@ -469,7 +469,8 @@ static bool swp_pager_swblk_empty(struct swblk *sb, int start, int > limit); static void swp_pager_free_empty_swblk(vm_object_t, struct swblk *sb); > static int swapongeom(struct vnode *); > static int swaponvp(struct thread *, struct vnode *, u_long); > -static int swapoff_one(struct swdevt *sp, struct ucred *cred); > +static int swapoff_one(struct swdevt *sp, struct ucred *cred, > + bool swapoff_syscall); > > /* > * Swap bitmap functions > @@ -2523,14 +2524,14 @@ sys_swapoff(struct thread *td, struct swapoff_args *uap) > error = EINVAL; > goto done; > } > - error = swapoff_one(sp, td->td_ucred); > + error = swapoff_one(sp, td->td_ucred, true); > done: > sx_xunlock(&swdev_syscall_lock); > return (error); > } > > static int > -swapoff_one(struct swdevt *sp, struct ucred *cred) > +swapoff_one(struct swdevt *sp, struct ucred *cred, bool swapoff_syscall) > { > u_long nblks; > #ifdef MAC > @@ -2552,8 +2553,16 @@ swapoff_one(struct swdevt *sp, struct ucred *cred) > * available virtual memory in the system will fit the amount > * of data we will have to page back in, plus an epsilon so > * the system doesn't become critically low on swap space. > + * The vm_free_count() part does not account e.g. for clean > + * pages that can be immediately reclaimed without paging, so > + * this is very rough estimation. > + * > + * On the other hand, not turning swap off on swapoff_all() > + * means that we loose swap data when filesystems go away, > + * which is arguably worse. > */ > - if (vm_free_count() + swap_pager_avail < nblks + nswap_lowat) > + if (swapoff_syscall && > + vm_free_count() + swap_pager_avail < nblks + nswap_lowat) > return (ENOMEM); > > /* > @@ -2603,7 +2612,7 @@ swapoff_all(void) > devname = devtoname(sp->sw_vp->v_rdev); > else > devname = "[file]"; > - error = swapoff_one(sp, thread0.td_ucred); > + error = swapoff_one(sp, thread0.td_ucred, false); > if (error != 0) { > printf("Cannot remove swap device %s (error=%d), " > "skipping.\n", devname, error); > From nobody Mon Nov 29 01:55:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0919E18B0FD4; Mon, 29 Nov 2021 01: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 4J2T2p5Dz8z4V6J; Mon, 29 Nov 2021 01:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93C0C1A304; Mon, 29 Nov 2021 01: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 1AT1tk9C060628; Mon, 29 Nov 2021 01: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 1AT1tk0B060627; Mon, 29 Nov 2021 01:55:46 GMT (envelope-from git) Date: Mon, 29 Nov 2021 01:55:46 GMT Message-Id: <202111290155.1AT1tk0B060627@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: 91972cfcddf9 - main - fusefs: update atime on reads when using cached attributes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 91972cfcddf950d7a9c33df5a9171ada1805a144 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638150946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xJNh2Hui9B0F1bBiBzK3BPiigGkC1/iRwVgssm+vtgU=; b=bL+Qm8qfNkJmWS8UxwC36W2WFVCEWmbsl+UL30suFpmftxJbvpY9dq9OVwmOa0yYMNyAEb Yn6kmzjdtEZbpOau2zncpQ/wthXYhiFIce5MVqPppYTTdANdPl/7y4Czrm72qfmx+QfZsX thRXh2cyiPuyr4vguxrT/HBEFt8IMQgd+n1VvyV2JiN3LOSytqwFZPiYMsNN/f4FmJ/iwe YFNHTrj8QLnErcRJ6d0of45qQ8YU5gFcOZnmCg+9TWIm+gkkRPOHtkYa9re4yc2ZrapvsG ioOQJ8Su8EOvYyyqjgKFxArWSpmhZYt/4/9bhtZy8g3xgE4oIHNX7AJe5s7erw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638150946; a=rsa-sha256; cv=none; b=vVDav+so1OGuzCimSpKlddmHMjkgtnRU3E8j3xBl91niUMKecq+wYp/fS41WwPGa4NKTa4 bxYn9AynHrU6BI9YtEmLPRkW5n/Q7Aw2632ijZ8s/AqlZi+LFZ0+tugqwQdNvrWkUwWArI RKA4awR9pdAKZN/K7EWq9DI+J+XvRtuTIx5meJDAxQmn8DVJydZmknB9ZDUKktYSOw+zhz zQJDMqJD0VkIC6DMTUl6rh46599Z/LlvBAvgyF8g9j2alMIsSDUC4/rW9RdoKBkrdtO4W+ LnlRuLZ7l/ubtWdDUTA4lpdDfwpLCwGQXI/NhAV2c5fBBtDT48/U9epdHG2H5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=91972cfcddf950d7a9c33df5a9171ada1805a144 commit 91972cfcddf950d7a9c33df5a9171ada1805a144 Author: Alan Somers AuthorDate: 2021-11-29 01:53:31 +0000 Commit: Alan Somers CommitDate: 2021-11-29 01:53:31 +0000 fusefs: update atime on reads when using cached attributes When using cached attributes, whether or not the data cache is enabled, fusefs must update a file's atime whenever it reads from it, so long as it wasn't mounted with -o noatime. Update it in-kernel, and flush it to the server on close or during the next setattr operation. The downside is that close() will now frequently trigger a FUSE_SETATTR upcall. But if you care about performance, you should be using -o noatime anyway. MFC after: 2 weeks Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D33145 --- sys/fs/fuse/fuse_internal.c | 11 +- sys/fs/fuse/fuse_io.c | 3 +- sys/fs/fuse/fuse_node.c | 12 +- sys/fs/fuse/fuse_node.h | 3 +- sys/fs/fuse/fuse_vnops.c | 10 +- tests/sys/fs/fusefs/cache.cc | 1 + tests/sys/fs/fusefs/io.cc | 1 + tests/sys/fs/fusefs/mockfs.cc | 6 +- tests/sys/fs/fusefs/mockfs.hh | 3 +- tests/sys/fs/fusefs/read.cc | 296 ++++++++++++++++++++++++++++++++++++++++++ tests/sys/fs/fusefs/utils.cc | 2 +- tests/sys/fs/fusefs/utils.hh | 2 + 12 files changed, 341 insertions(+), 9 deletions(-) diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index cf11daaed68f..d57de19038dd 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -925,6 +925,7 @@ fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap, struct fuse_getattr_in *fgai; struct fuse_attr_out *fao; off_t old_filesize = fvdat->cached_attrs.va_size; + struct timespec old_atime = fvdat->cached_attrs.va_atime; struct timespec old_ctime = fvdat->cached_attrs.va_ctime; struct timespec old_mtime = fvdat->cached_attrs.va_mtime; enum vtype vtyp; @@ -949,6 +950,10 @@ fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap, vtyp = IFTOVT(fao->attr.mode); if (fvdat->flag & FN_SIZECHANGE) fao->attr.size = old_filesize; + if (fvdat->flag & FN_ATIMECHANGE) { + fao->attr.atime = old_atime.tv_sec; + fao->attr.atimensec = old_atime.tv_nsec; + } if (fvdat->flag & FN_CTIMECHANGE) { fao->attr.ctime = old_ctime.tv_sec; fao->attr.ctimensec = old_ctime.tv_nsec; @@ -1208,6 +1213,10 @@ int fuse_internal_setattr(struct vnode *vp, struct vattr *vap, fsai->valid |= FATTR_ATIME; if (vap->va_vaflags & VA_UTIMES_NULL) fsai->valid |= FATTR_ATIME_NOW; + } else if (fvdat->flag & FN_ATIMECHANGE) { + fsai->atime = fvdat->cached_attrs.va_atime.tv_sec; + fsai->atimensec = fvdat->cached_attrs.va_atime.tv_nsec; + fsai->valid |= FATTR_ATIME; } if (vap->va_mtime.tv_sec != VNOVAL) { fsai->mtime = vap->va_mtime.tv_sec; @@ -1256,7 +1265,7 @@ int fuse_internal_setattr(struct vnode *vp, struct vattr *vap, } if (err == 0) { struct fuse_attr_out *fao = (struct fuse_attr_out*)fdi.answ; - fuse_vnode_undirty_cached_timestamps(vp); + fuse_vnode_undirty_cached_timestamps(vp, true); fuse_internal_cache_attrs(vp, &fao->attr, fao->attr_valid, fao->attr_valid_nsec, NULL, false); } diff --git a/sys/fs/fuse/fuse_io.c b/sys/fs/fuse/fuse_io.c index f818fbd52869..2bc592952a4f 100644 --- a/sys/fs/fuse/fuse_io.c +++ b/sys/fs/fuse/fuse_io.c @@ -236,6 +236,7 @@ fuse_io_dispatch(struct vnode *vp, struct uio *uio, int ioflag, switch (uio->uio_rw) { case UIO_READ: + fuse_vnode_update(vp, FN_ATIMECHANGE); if (directio) { SDT_PROBE2(fusefs, , io, trace, 1, "direct read of vnode"); @@ -616,7 +617,7 @@ retry: fdisp_destroy(&fdi); if (wrote_anything) - fuse_vnode_undirty_cached_timestamps(vp); + fuse_vnode_undirty_cached_timestamps(vp, false); return (err); } diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index 937f80ffc9ce..1d485b6a0b46 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -475,11 +475,13 @@ fuse_vnode_size(struct vnode *vp, off_t *filesize, struct ucred *cred, } void -fuse_vnode_undirty_cached_timestamps(struct vnode *vp) +fuse_vnode_undirty_cached_timestamps(struct vnode *vp, bool atime) { struct fuse_vnode_data *fvdat = VTOFUD(vp); fvdat->flag &= ~(FN_MTIMECHANGE | FN_CTIMECHANGE); + if (atime) + fvdat->flag &= ~FN_ATIMECHANGE; } /* Update a fuse file's cached timestamps */ @@ -487,7 +489,8 @@ void fuse_vnode_update(struct vnode *vp, int flags) { struct fuse_vnode_data *fvdat = VTOFUD(vp); - struct fuse_data *data = fuse_get_mpdata(vnode_mount(vp)); + struct mount *mp = vnode_mount(vp); + struct fuse_data *data = fuse_get_mpdata(mp); struct timespec ts; vfs_timestamp(&ts); @@ -495,6 +498,11 @@ fuse_vnode_update(struct vnode *vp, int flags) if (data->time_gran > 1) ts.tv_nsec = rounddown(ts.tv_nsec, data->time_gran); + if (mp->mnt_flag & MNT_NOATIME) + flags &= ~FN_ATIMECHANGE; + + if (flags & FN_ATIMECHANGE) + fvdat->cached_attrs.va_atime = ts; if (flags & FN_MTIMECHANGE) fvdat->cached_attrs.va_mtime = ts; if (flags & FN_CTIMECHANGE) diff --git a/sys/fs/fuse/fuse_node.h b/sys/fs/fuse/fuse_node.h index dcf5e4047778..8d806348f62d 100644 --- a/sys/fs/fuse/fuse_node.h +++ b/sys/fs/fuse/fuse_node.h @@ -92,6 +92,7 @@ */ #define FN_MTIMECHANGE 0x00000800 #define FN_CTIMECHANGE 0x00001000 +#define FN_ATIMECHANGE 0x00002000 struct fuse_vnode_data { /** self **/ @@ -203,7 +204,7 @@ int fuse_vnode_savesize(struct vnode *vp, struct ucred *cred, pid_t pid); int fuse_vnode_setsize(struct vnode *vp, off_t newsize, bool from_server); -void fuse_vnode_undirty_cached_timestamps(struct vnode *vp); +void fuse_vnode_undirty_cached_timestamps(struct vnode *vp, bool atime); void fuse_vnode_update(struct vnode *vp, int flags); diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index d87639ec3f79..a81916b8fbbd 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -613,6 +613,7 @@ fuse_vnop_close(struct vop_close_args *ap) int fflag = ap->a_fflag; struct thread *td = ap->a_td; pid_t pid = td->td_proc->p_pid; + struct fuse_vnode_data *fvdat = VTOFUD(vp); int err = 0; if (fuse_isdeadfs(vp)) @@ -623,8 +624,15 @@ fuse_vnop_close(struct vop_close_args *ap) return 0; err = fuse_flush(vp, cred, pid, fflag); + if (err == 0 && (fvdat->flag & FN_ATIMECHANGE)) { + struct vattr vap; + + VATTR_NULL(&vap); + vap.va_atime = fvdat->cached_attrs.va_atime; + err = fuse_internal_setattr(vp, &vap, td, NULL); + } /* TODO: close the file handle, if we're sure it's no longer used */ - if ((VTOFUD(vp)->flag & FN_SIZECHANGE) != 0) { + if ((fvdat->flag & FN_SIZECHANGE) != 0) { fuse_vnode_savesize(vp, cred, td->td_proc->p_pid); } return err; diff --git a/tests/sys/fs/fusefs/cache.cc b/tests/sys/fs/fusefs/cache.cc index ac62147f15a8..4df262cecd0f 100644 --- a/tests/sys/fs/fusefs/cache.cc +++ b/tests/sys/fs/fusefs/cache.cc @@ -75,6 +75,7 @@ virtual void SetUp() { default: FAIL() << "Unknown cache mode"; } + m_noatime = true; // To prevent SETATTR for atime on close FuseTest::SetUp(); if (IsSkipped()) diff --git a/tests/sys/fs/fusefs/io.cc b/tests/sys/fs/fusefs/io.cc index 65ba1ea19bc3..1502bd263f51 100644 --- a/tests/sys/fs/fusefs/io.cc +++ b/tests/sys/fs/fusefs/io.cc @@ -114,6 +114,7 @@ void SetUp() default: FAIL() << "Unknown cache mode"; } + m_noatime = true; // To prevent SETATTR for atime on close FuseTest::SetUp(); if (IsSkipped()) diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index 99f7ccc61273..8a2d1f910867 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -392,7 +392,7 @@ void MockFS::debug_response(const mockfs_buf_out &out) { MockFS::MockFS(int max_readahead, bool allow_other, bool default_permissions, bool push_symlinks_in, bool ro, enum poll_method pm, uint32_t flags, uint32_t kernel_minor_version, uint32_t max_write, bool async, - bool noclusterr, unsigned time_gran, bool nointr) + bool noclusterr, unsigned time_gran, bool nointr, bool noatime) { struct sigaction sa; struct iovec *iov = NULL; @@ -467,6 +467,10 @@ MockFS::MockFS(int max_readahead, bool allow_other, bool default_permissions, build_iovec(&iov, &iovlen, "async", __DECONST(void*, &trueval), sizeof(bool)); } + if (noatime) { + build_iovec(&iov, &iovlen, "noatime", + __DECONST(void*, &trueval), sizeof(bool)); + } if (noclusterr) { build_iovec(&iov, &iovlen, "noclusterr", __DECONST(void*, &trueval), sizeof(bool)); diff --git a/tests/sys/fs/fusefs/mockfs.hh b/tests/sys/fs/fusefs/mockfs.hh index 600a4b4292c0..dd6d259ca5af 100644 --- a/tests/sys/fs/fusefs/mockfs.hh +++ b/tests/sys/fs/fusefs/mockfs.hh @@ -356,7 +356,8 @@ class MockFS { bool default_permissions, bool push_symlinks_in, bool ro, enum poll_method pm, uint32_t flags, uint32_t kernel_minor_version, uint32_t max_write, bool async, - bool no_clusterr, unsigned time_gran, bool nointr); + bool no_clusterr, unsigned time_gran, bool nointr, + bool noatime); virtual ~MockFS(); diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index 3cba564affcf..839b42a897e9 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -105,6 +105,13 @@ class ReadAhead: public Read, } }; +class ReadNoatime: public Read { + virtual void SetUp() { + m_noatime = true; + Read::SetUp(); + } +}; + class ReadSigbus: public Read { public: @@ -132,6 +139,14 @@ handle_sigbus(int signo __unused, siginfo_t *info, void *uap __unused) { jmp_buf ReadSigbus::s_jmpbuf; void *ReadSigbus::s_si_addr; +class TimeGran: public Read, public WithParamInterface { +public: +virtual void SetUp() { + m_time_gran = 1 << GetParam(); + Read::SetUp(); +} +}; + /* AIO reads need to set the header's pid field correctly */ /* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236379 */ TEST_F(AioRead, aio_read) @@ -323,6 +338,172 @@ TEST_F(AsyncRead, async_read) leak(fd); } +/* The kernel should update the cached atime attribute during a read */ +TEST_F(Read, atime) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + struct stat sb1, sb2; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + ASSERT_EQ(0, fstat(fd, &sb1)); + + /* Ensure atime will be different than it was during lookup */ + nap(); + + ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); + ASSERT_EQ(0, fstat(fd, &sb2)); + + /* The kernel should automatically update atime during read */ + EXPECT_TRUE(timespeccmp(&sb1.st_atim, &sb2.st_atim, <)); + EXPECT_TRUE(timespeccmp(&sb1.st_ctim, &sb2.st_ctim, ==)); + EXPECT_TRUE(timespeccmp(&sb1.st_mtim, &sb2.st_mtim, ==)); + + leak(fd); +} + +/* The kernel should update the cached atime attribute during a cached read */ +TEST_F(Read, atime_cached) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + struct stat sb1, sb2; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + ASSERT_EQ(bufsize, pread(fd, buf, bufsize, 0)) << strerror(errno); + ASSERT_EQ(0, fstat(fd, &sb1)); + + /* Ensure atime will be different than it was during the first read */ + nap(); + + ASSERT_EQ(bufsize, pread(fd, buf, bufsize, 0)) << strerror(errno); + ASSERT_EQ(0, fstat(fd, &sb2)); + + /* The kernel should automatically update atime during read */ + EXPECT_TRUE(timespeccmp(&sb1.st_atim, &sb2.st_atim, <)); + EXPECT_TRUE(timespeccmp(&sb1.st_ctim, &sb2.st_ctim, ==)); + EXPECT_TRUE(timespeccmp(&sb1.st_mtim, &sb2.st_mtim, ==)); + + leak(fd); +} + +/* dirty atime values should be flushed during close */ +TEST_F(Read, atime_during_close) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + struct stat sb; + uint64_t ino = 42; + const mode_t newmode = 0755; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([&](auto in) { + uint32_t valid = FATTR_ATIME; + return (in.header.opcode == FUSE_SETATTR && + in.header.nodeid == ino && + in.body.setattr.valid == valid && + (time_t)in.body.setattr.atime == + sb.st_atim.tv_sec && + in.body.setattr.atimensec == + sb.st_atim.tv_nsec); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, attr); + out.body.attr.attr.ino = ino; + out.body.attr.attr.mode = S_IFREG | newmode; + }))); + expect_flush(ino, 1, ReturnErrno(0)); + expect_release(ino, FuseTest::FH); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + /* Ensure atime will be different than during lookup */ + nap(); + + ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); + ASSERT_EQ(0, fstat(fd, &sb)); + + close(fd); +} + +/* A cached atime should be flushed during FUSE_SETATTR */ +TEST_F(Read, atime_during_setattr) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + struct stat sb; + uint64_t ino = 42; + const mode_t newmode = 0755; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([&](auto in) { + uint32_t valid = FATTR_MODE | FATTR_ATIME; + return (in.header.opcode == FUSE_SETATTR && + in.header.nodeid == ino && + in.body.setattr.valid == valid && + (time_t)in.body.setattr.atime == + sb.st_atim.tv_sec && + in.body.setattr.atimensec == + sb.st_atim.tv_nsec); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, attr); + out.body.attr.attr.ino = ino; + out.body.attr.attr.mode = S_IFREG | newmode; + }))); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + /* Ensure atime will be different than during lookup */ + nap(); + + ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); + ASSERT_EQ(0, fstat(fd, &sb)); + ASSERT_EQ(0, fchmod(fd, newmode)) << strerror(errno); + + leak(fd); +} + +/* The kernel should flush dirty atime values during close */ /* 0-length reads shouldn't cause any confusion */ TEST_F(Read, direct_io_read_nothing) { @@ -613,6 +794,80 @@ TEST_F(Read, mmap) leak(fd); } +/* + * The kernel should not update the cached atime attribute during a read, if + * MNT_NOATIME is used. + */ +TEST_F(ReadNoatime, atime) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + struct stat sb1, sb2; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + ASSERT_EQ(0, fstat(fd, &sb1)); + + nap(); + + ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); + ASSERT_EQ(0, fstat(fd, &sb2)); + + /* The kernel should not update atime during read */ + EXPECT_TRUE(timespeccmp(&sb1.st_atim, &sb2.st_atim, ==)); + EXPECT_TRUE(timespeccmp(&sb1.st_ctim, &sb2.st_ctim, ==)); + EXPECT_TRUE(timespeccmp(&sb1.st_mtim, &sb2.st_mtim, ==)); + + leak(fd); +} + +/* + * The kernel should not update the cached atime attribute during a cached + * read, if MNT_NOATIME is used. + */ +TEST_F(ReadNoatime, atime_cached) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + struct stat sb1, sb2; + uint64_t ino = 42; + int fd; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + + fd = open(FULLPATH, O_RDONLY); + ASSERT_LE(0, fd) << strerror(errno); + + ASSERT_EQ(bufsize, pread(fd, buf, bufsize, 0)) << strerror(errno); + ASSERT_EQ(0, fstat(fd, &sb1)); + + nap(); + + ASSERT_EQ(bufsize, pread(fd, buf, bufsize, 0)) << strerror(errno); + ASSERT_EQ(0, fstat(fd, &sb2)); + + /* The kernel should automatically update atime during read */ + EXPECT_TRUE(timespeccmp(&sb1.st_atim, &sb2.st_atim, ==)); + EXPECT_TRUE(timespeccmp(&sb1.st_ctim, &sb2.st_ctim, ==)); + EXPECT_TRUE(timespeccmp(&sb1.st_mtim, &sb2.st_mtim, ==)); + + leak(fd); +} + /* Read of an mmap()ed file fails */ TEST_F(ReadSigbus, mmap_eio) { @@ -1068,3 +1323,44 @@ INSTANTIATE_TEST_CASE_P(RA, ReadAhead, tuple(true, 0), tuple(true, 1), tuple(true, 2))); + +/* fuse_init_out.time_gran controls the granularity of timestamps */ +TEST_P(TimeGran, atime_during_setattr) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + const char *CONTENTS = "abcdefgh"; + ssize_t bufsize = strlen(CONTENTS); + uint8_t buf[bufsize]; + uint64_t ino = 42; + const mode_t newmode = 0755; + int fd; + + expect_lookup(RELPATH, ino, bufsize); + expect_open(ino, 0, 1); + expect_read(ino, 0, bufsize, bufsize, CONTENTS); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + uint32_t valid = FATTR_MODE | FATTR_ATIME; + return (in.header.opcode == FUSE_SETATTR && + in.header.nodeid == ino && + in.body.setattr.valid == valid && + in.body.setattr.atimensec % m_time_gran == 0); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, attr); + out.body.attr.attr.ino = ino; + out.body.attr.attr.mode = S_IFREG | newmode; + }))); + + fd = open(FULLPATH, O_RDWR); + ASSERT_LE(0, fd) << strerror(errno); + + ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); + ASSERT_EQ(0, fchmod(fd, newmode)) << strerror(errno); + + leak(fd); +} + +INSTANTIATE_TEST_CASE_P(TG, TimeGran, Range(0u, 10u)); diff --git a/tests/sys/fs/fusefs/utils.cc b/tests/sys/fs/fusefs/utils.cc index 4b59f6e26e12..16dfc9c52939 100644 --- a/tests/sys/fs/fusefs/utils.cc +++ b/tests/sys/fs/fusefs/utils.cc @@ -161,7 +161,7 @@ void FuseTest::SetUp() { m_default_permissions, m_push_symlinks_in, m_ro, m_pm, m_init_flags, m_kernel_minor_version, m_maxwrite, m_async, m_noclusterr, m_time_gran, - m_nointr); + m_nointr, m_noatime); /* * FUSE_ACCESS is called almost universally. Expecting it in * each test case would be super-annoying. Instead, set a diff --git a/tests/sys/fs/fusefs/utils.hh b/tests/sys/fs/fusefs/utils.hh index 5d5c5290a60d..a6f1d63ada6b 100644 --- a/tests/sys/fs/fusefs/utils.hh +++ b/tests/sys/fs/fusefs/utils.hh @@ -64,6 +64,7 @@ class FuseTest : public ::testing::Test { bool m_default_permissions; uint32_t m_kernel_minor_version; enum poll_method m_pm; + bool m_noatime; bool m_push_symlinks_in; bool m_ro; bool m_async; @@ -85,6 +86,7 @@ class FuseTest : public ::testing::Test { m_default_permissions(false), m_kernel_minor_version(FUSE_KERNEL_MINOR_VERSION), m_pm(BLOCKING), + m_noatime(false), m_push_symlinks_in(false), m_ro(false), m_async(false), From nobody Mon Nov 29 02:01:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1146918B46D2; Mon, 29 Nov 2021 02:01:45 +0000 (UTC) (envelope-from peterj@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 4J2T9h6DCPz4X7H; Mon, 29 Nov 2021 02:01:44 +0000 (UTC) (envelope-from peterj@freebsd.org) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 3352E245A0; Mon, 29 Nov 2021 02:01:42 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Mon, 29 Nov 2021 13:01:37 +1100 From: Peter Jeremy To: Yoshihiro Ota Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b19740f4ce7a - main - swap_pager: lock vnode in swapdev_strategy() Message-ID: References: <202111251935.1APJZA1e094731@gitrepo.freebsd.org> <20211128204339.58f06247fd2946ddc030d1b0@j.email.ne.jp> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: 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="gSMqs7XClM+mRZ+F" Content-Disposition: inline In-Reply-To: <20211128204339.58f06247fd2946ddc030d1b0@j.email.ne.jp> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638151304; 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=OmwZS4shxHYjXple3ySCCgcKxaO3jueIz1/YP3eB7gw=; b=rkSbhE9ZLBGYsE0CXJBkDOpbw2tTau63jl/ZhfnobCzu0/Sz1KOgkh2QlyQtvamMP/r7K4 ZJn65MSps0ec2MqQuDS9nI6yQ7/QfRritNPGLRsMEFMxXMPHbhqa81mh10ASlg+cSqPvak zZTyX/dQcQJNkLcmMzAqCmK/YvPGkbpHs7jt411WkFFAYohkt1pb2Qjlc8Z1pZZJ84MZg/ m1aFaExeOjbsrlaLbvuPBna+u+nwRfL14gSryYaGhfjQr09XZnzEgBEg8mq4zayi9TLLQa JV8QB/xnvDJbDM6rF0V0l1UrkKq5SFMCdYXT8Ipicr62LNvuIm7jElVlEs/oIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638151304; a=rsa-sha256; cv=none; b=cZ9mCpERNEoa6IQV384Bm84C+nBu3sm7H6S1uKIF9oDqqF5sJwlCqBl0qJ171nGlys1XUW nvZYfAXZkcPfF9IJboyjUrelbolS1hV4GU9R3V+BbKJudhTlwueubVjUVhqJ8JsBnYas2e 9Jfn2OooOx96Khg1PFEv9N+w//+oC4GdYfzF1INIBJwDk/EuFfX18kFd7xIM5cIcYLTKOG kNa+hGmNZQTvIynpJ0lHx6aOFH8fM1iG0xYslUx6oWCkSwhflUPzUcrJR1gDuS7RYxzLmr CaJaxoR83+dycZdT01kpyxnuNDLZBB/DGGYq3obqNhXvemssoUG2ikmYXVPppA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --gSMqs7XClM+mRZ+F Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-Nov-28 20:43:39 -0500, Yoshihiro Ota wrote: >I wonder creating /etc/rc.d/nfsswap that depends on nfsclient can give a s= moother shutdown like swaplate depends on mountlate. /etc/rc.d/swaplate already attempts a swapoff but the check in swapoff_one() is sufficiently rubbery that the check will often fail, leaving the swap device active. --=20 Peter Jeremy --gSMqs7XClM+mRZ+F Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmGkNHtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzSfmA/8DgvH6Fa9WdAheWajRKrTlpxxEBomFGj9MLvTwlByLWLpUgGYi+lEy8c2 zL9gTRQyXVbtVmVLtOdrdlShOLNTEuRhikESxwTbjHEhRWJijQWaFnxPI2t8VIWR aRPJRqdOQNkCwq3ahlDxbhXkwnQGSNJT04wKAYGF3/ZY4nJpJlr8Tm0jAM4fIeGw aRNQvQh3IvOPdCyoetsqloz/PPDXz8WHXMq/2Rp5iM/FibmnGZZwKbMzIsOOaEjh Pnv/Lk5KVZaxpjE0wN3EkdBfN2FzULsinQisNuqoSP8HB7S77Em+VvsXEMTf2T3s cz23kxZR8SIJ7UjCdRBLzodHBn0zGxNYaQw8a5j3v5zjVqt1mzgKETsj1kRinTim rC1qZkFqWjPxDxbDrqY/MVNc1Y9yDB/kOIZ5aTqe9CVzORBJ30U5oxjl6hs639fj u9NWXqNeiiV/PTOC7gpk4c60/kUfwxicJ/lRwT71WX3K9mzMNETa8Cq7te1UhvtH X2Eph5VvQYM/TyO+DpskTvaHTwVg1b5RKL8s0uQlBo4tE/Qsreey7Pvv7YS+7kwm Hy+Gve9IJul0LgqyPpurZuNZGf2/SLEnj6UpsvH6u2oUH9XyVLzmaroRnc5lp0FG EzCeOe9YQi+0n5aXWjEaG99+g/nSWrY+GrxlooXq1h0TLWwT++M= =kY7Y -----END PGP SIGNATURE----- --gSMqs7XClM+mRZ+F-- From nobody Mon Nov 29 02:30:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B560618C188A; Mon, 29 Nov 2021 02:30: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 4J2Tpk2qpyz4gWL; Mon, 29 Nov 2021 02:30:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 409EC1A4B7; Mon, 29 Nov 2021 02:30: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 1AT2UMw2009002; Mon, 29 Nov 2021 02:30:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AT2UM3C009001; Mon, 29 Nov 2021 02:30:22 GMT (envelope-from git) Date: Mon, 29 Nov 2021 02:30:22 GMT Message-Id: <202111290230.1AT2UM3C009001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: cfb0e4d76cc6 - main - xhci: Add PCI IDs for Thunderbolt 3/4 USB controllers. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cfb0e4d76cc61b81ef367337676a7fc51c3b062d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638153022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByxTHkNkX5NHcnB6moboo4gkpy4Zp3W+HqLZvu6sPu0=; b=vN2dz/y+gJK35UtZE/dfSzgTurc5NqtA/iKi1euG31G43cfKWq0V/qmSEy/ECBurhmV2yo BpaITEnW/JgaQE25FQuCsLGHgoF43DY38+n0QqkaK3S6mQspgYPH2h2dVLzBlAbWvAOBjR rYy0QGc82kdR5R6GxStRp7/V6PCNq3mo6BNIfqXk+Pe+Sdd9PlqRW1MrunVQ0HMggWYdgX 2HJWT8+7L8VJecEmGkTQc5tnDrvJmEZBzfwS6TFBEZwAZs8D8SEULCoaP+SlhUQ0WIjqBN XGCwp7NYuT+l/0n5ZTep2ups4vEqniMN75YCpMK84kZ5fKsmNuVmqOw79epLzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638153022; a=rsa-sha256; cv=none; b=fsq7qGmCnDiUNkSAXIzb/y6XDRzOGldzLaPzNIq6mxTK6doHjfhYBvL/+hriq+Bfuhop3S 2bdPxTL6gQOwU4Mj8HRA9AVK/YFASKzfSWwrqlPmZ3pbm28pp0D+5u3qcSrxatnQnK6zgO j/5dnqwzTSI3qQFSKZAZl4ihUExC8CYYGHUCUbX3wDDcbYt0jTgsyC0ZQ/SA4YDHm06m9v ZrSFZP3HW93l9dggzUtLUpM78f3xQzJX4rFyqcvXXA7ak6esKBV5PG4wCJVhMctVB0tz1E s6sT6nSEQOVa/f6OFPeIaqe5A4Crivb13J9Sybr5xEQjzrdwa2qqnTByAr4YiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=cfb0e4d76cc61b81ef367337676a7fc51c3b062d commit cfb0e4d76cc61b81ef367337676a7fc51c3b062d Author: Alexander Motin AuthorDate: 2021-11-29 02:29:26 +0000 Commit: Alexander Motin CommitDate: 2021-11-29 02:29:26 +0000 xhci: Add PCI IDs for Thunderbolt 3/4 USB controllers. MFC after: 2 weeks --- sys/dev/usb/controller/xhci_pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c index dc59869dd527..f1c567ac6ded 100644 --- a/sys/dev/usb/controller/xhci_pci.c +++ b/sys/dev/usb/controller/xhci_pci.c @@ -121,8 +121,20 @@ xhci_pci_match(device_t self) case 0x11421b21: return ("ASMedia ASM1042A USB 3.0 controller"); + case 0x0b278086: + return ("Intel Goshen Ridge Thunderbolt 4 USB controller"); case 0x0f358086: return ("Intel BayTrail USB 3.0 controller"); + case 0x11388086: + return ("Intel Maple Ridge Thunderbolt 4 USB controller"); + case 0x15c18086: + case 0x15d48086: + case 0x15db8086: + return ("Intel Alpine Ridge Thunderbolt 3 USB controller"); + case 0x15e98086: + case 0x15ec8086: + case 0x15f08086: + return ("Intel Titan Ridge Thunderbolt 3 USB controller"); case 0x19d08086: return ("Intel Denverton USB 3.0 controller"); case 0x9c318086: From nobody Mon Nov 29 03:35:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5540C18B8970; Mon, 29 Nov 2021 03:35: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 4J2WGR0SjFz3HPd; Mon, 29 Nov 2021 03:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E43FA1B5C5; Mon, 29 Nov 2021 03:35: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 1AT3Zwuw094226; Mon, 29 Nov 2021 03:35:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AT3Zw3J094225; Mon, 29 Nov 2021 03:35:58 GMT (envelope-from git) Date: Mon, 29 Nov 2021 03:35:58 GMT Message-Id: <202111290335.1AT3Zw3J094225@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: d109559ddbf7 - main - fusefs: fix 32-bit build of the tests after 91972cfcddf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d109559ddbf7afe311c1f1795ece137071406db8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638156959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TGtNoNpfaGW2GnYtH8OX8v9llEErK5yapXYoyABTNTQ=; b=P57tymIOsyvymKytOk8fHvrEMpmz2O3KawCTjJAJkSU8pBFKtRvWY3N85KNZ7C3fldOCFH 1bwPWlf25DNGd6UsR9hPIu2edJaUWoZLJEVrS6k6TbjS5LIUBLduL8rQOWd0IbUlg6S94s EZmBvxuIm6WSdVbj15OnmetjlaI+Fc/iESFJnFgE30DfFFvTDFHS3GbXXZoL9CauwMHkOr UMWTeu5KU/deNuSu2lImVsdNBnn31niOo7ZG1pNqyxVgy1jaz2zEYfkH2yusrvzmACNLYa 44czYrJr3rT4kkknqoiGkAMTV6RhFrCqFtH8r6hgeYJtryIsbXvPvZv/BcUaKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638156959; a=rsa-sha256; cv=none; b=k5xoU/brxwl3ZPdeeM40E/dSyyeC1ZuHq7QNVZPFS7VxK0UNe/jXqyvwPsv8sguVxbjAWZ 5qi2Akx/2dQF63WPFFq/IDy/1Uc0maxdU/2iO0Voo/+zsNsV8v8mW5qDqnFnjU2Kx+QNMv XO7YejVqdYgVFP5ALiJJT7uPz4/O7nHzbOTB2rjydj06sgdRUrhCvov6k9iJdNBVYllDIN miog6zUF46I6mzPLXhqg+VRCIw3zKLKZeXBKz9+RL66p571pqYhelq/jhnuNeDqgrwgvnu 1mUzlbrDPtAsR/ueLmHMPYhG0PBqtxUt8wttw+yb5vt0sLbNi3MzUQ0DLEfpKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d109559ddbf7afe311c1f1795ece137071406db8 commit d109559ddbf7afe311c1f1795ece137071406db8 Author: Alan Somers AuthorDate: 2021-11-29 03:34:32 +0000 Commit: Alan Somers CommitDate: 2021-11-29 03:35:42 +0000 fusefs: fix 32-bit build of the tests after 91972cfcddf MFC after: 2 weeks MFC with: 91972cfcddf950d7a9c33df5a9171ada1805a144 --- tests/sys/fs/fusefs/read.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index 839b42a897e9..0888fbc913e8 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -432,7 +432,7 @@ TEST_F(Read, atime_during_close) in.body.setattr.valid == valid && (time_t)in.body.setattr.atime == sb.st_atim.tv_sec && - in.body.setattr.atimensec == + (long)in.body.setattr.atimensec == sb.st_atim.tv_nsec); }, Eq(true)), _) @@ -480,7 +480,7 @@ TEST_F(Read, atime_during_setattr) in.body.setattr.valid == valid && (time_t)in.body.setattr.atime == sb.st_atim.tv_sec && - in.body.setattr.atimensec == + (long)in.body.setattr.atimensec == sb.st_atim.tv_nsec); }, Eq(true)), _) From nobody Mon Nov 29 12:27:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0BE2518C095C; Mon, 29 Nov 2021 12:27: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 4J2l4B5LYlz4WfJ; Mon, 29 Nov 2021 12:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97FB8226AD; Mon, 29 Nov 2021 12:27: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 1ATCRsUj099045; Mon, 29 Nov 2021 12:27:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATCRs4l099044; Mon, 29 Nov 2021 12:27:54 GMT (envelope-from git) Date: Mon, 29 Nov 2021 12:27:54 GMT Message-Id: <202111291227.1ATCRs4l099044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: e671037b3c49 - main - powerpc64le: add LINT64LE kernel config List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e671037b3c49734566e7e0af74ba1a64f45b77a2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638188874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=prDGtPMsoF6AzBQDPJh/tfKeUV1mXYAAgk+x8rgDUq4=; b=B22takXiEwUTLiov4TDKFVubkOLkX0Tjr6hB0guwXGvYzERYV5VMxfn1wkOpQsTg+9OVg1 Q8/AX5aFwCo91dKuhZ/JkHXHo1EBINXbhrq65RAKjE4/iV4Fa+6PA2h5o24oXacdE2ApLa kx9TXQwqfjvXkpFXTOX4pjJDCnfH+G7cKwLFy5+E05RG8euchDlkV+bCZJtGGhgnWdtYh5 bteNjUUBq04UkIMH8+Tb8cEgyZI8vCWaHBiPq7dCXlcHxfUW846nk+TSNMitEETevdlQNO CI2F/yG2T6UZ2ZuNuJCf9vPBuedu4ysGKeLBVlBq+74ZmJ2fUxYAn+8u2Cd+iQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638188874; a=rsa-sha256; cv=none; b=aisJHs9n23aVDgsbu85pXoRRCTBheytt9tIctUYl+ifwp2MUGFF1ybED8vytDCU0IRQwiW 3j2X3J6s82m/xlgAfaF1bOj7I9cjmxzTgwwejhtBcTcAf70vB1XBfGFgSsPrIb/X5P7Scv MMGB/HXnH/bBl9ZBQvsICHXSVsVcDKq93Kg2BYO+H70gsbGrpzsJGCWKmh/gIsO3aODIsh qNtOkYlJ/ygYVJfmcQ4KzxteLsMzsWGrC+kBIn5sPshP65NZ18dZhfHzP5QLPuGlxOBBiy AklHOko8XvFOYSuh6pGZk51EPlVxj2BwJ9lwPBqHsfrdx6p92g53INTw4GX+5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=e671037b3c49734566e7e0af74ba1a64f45b77a2 commit e671037b3c49734566e7e0af74ba1a64f45b77a2 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-11-29 15:08:26 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-11-29 15:08:26 +0000 powerpc64le: add LINT64LE kernel config Add configuration file to be used by "FreeBSD--powerpc64le-LINT" CI/Jenkins job Reviewed by: lwhsu MFC after: 2 days Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D33136 --- sys/powerpc/conf/LINT64LE | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/powerpc/conf/LINT64LE b/sys/powerpc/conf/LINT64LE new file mode 100644 index 000000000000..9c9a417dd9d7 --- /dev/null +++ b/sys/powerpc/conf/LINT64LE @@ -0,0 +1,5 @@ +# $FreeBSD$ + +include "../../conf/NOTES" +include NOTES +machine powerpc powerpc64le From nobody Mon Nov 29 12:49:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5D5B718CA3BD; Mon, 29 Nov 2021 12:49: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 4J2lXw29Tqz4fD4; Mon, 29 Nov 2021 12:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A2EA22AC5; Mon, 29 Nov 2021 12:49: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 1ATCnKrv025206; Mon, 29 Nov 2021 12:49:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATCnKZA025205; Mon, 29 Nov 2021 12:49:20 GMT (envelope-from git) Date: Mon, 29 Nov 2021 12:49:20 GMT Message-Id: <202111291249.1ATCnKZA025205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 147bf5e930b7 - main - tcp: Don't try to upgrade a read lock just for logging List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 147bf5e930b70638a73059e19c97d3f3a9a227fd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638190160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MUZ2+IM65nzTmReYFcIgeaEZqf1jXI6c5gReEboWvpo=; b=sucQH2WdroHLV5KkK1tqhBS3VnTCG9+tXyKddScYW/s4AxIWHvnJkX5qOH+A2zj/HNt3xI J1+xThGflik0CjcYa/s9xM7J0axZ50b6lteueENNdgvGHKgBa7TVeA09BArO+bB4NBUcHC jU5lxKs109D2og5CvPhADg3LJtPPir320Xn/YJDOnNIkMmb7X2dVVF/bUlYRODtgKJvCrg o7rXg94iBRxrBTpCjSFhl//5Xo5GyPuQAIG6/U/xdhvtmF1dztGzBlI14vdse5fVWYohhw 8izl+jS4WjJ8BpdjA33pGIG6KmF01hUVOxUYM1+pz+V2qoIHkAagasYjJOlECQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638190160; a=rsa-sha256; cv=none; b=CMK0XfisKxSqTvmECZI8ESNOA1KTwBA4xNUnqFUYu5nYb8+9zEGGy0b+8l+HiuT33CKCcj UDHbVJ6mlwAKKTvn2UhyvMB1DzTW3DQX1KCqJLv/zr4B8VCzgVI3g04PmZa0IKe73aV6TG HCgBbB2wuuOMfhEC4GahOiEl0XdAGC6ToL2hfd2xIKIJ26P6OMJpEemLGdjVy2aOUNN+OR EV+XnT2UKc3/x6VnF2TYQealQM5Ydv53hfl4Gu0VH/dubAzXxBuLve+dPVdmFZAUwUJQJC 8c789hIvtY4+dxx+uQCf++4rc20mgmGjG99j2b8b036HF+ZVgw7u1trPXByYNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=147bf5e930b70638a73059e19c97d3f3a9a227fd commit 147bf5e930b70638a73059e19c97d3f3a9a227fd Author: Michael Tuexen AuthorDate: 2021-11-26 10:53:00 +0000 Commit: Michael Tuexen CommitDate: 2021-11-29 12:48:40 +0000 tcp: Don't try to upgrade a read lock just for logging Reviewed by: glebius, lstewart, rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D33098 --- sys/netinet/tcp_subr.c | 54 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 14 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 5fa16f43f28b..34cc291dc274 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -101,6 +101,9 @@ __FBSDID("$FreeBSD$"); #endif #include +#ifdef INVARIANTS +#define TCPSTATES +#endif #include #include #include @@ -1755,9 +1758,12 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, int isipv6; #endif /* INET6 */ int optlen, tlen, win, ulen; - bool incl_opts, lock_upgraded; + bool incl_opts; uint16_t port; int output_ret; +#ifdef INVARIANTS + int thflags = th->th_flags; +#endif KASSERT(tp != NULL || m != NULL, ("tcp_respond: tp and m both NULL")); NET_EPOCH_ASSERT(); @@ -2088,18 +2094,12 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, TCP_PROBE3(debug__output, tp, th, m); if (flags & TH_RST) TCP_PROBE5(accept__refused, NULL, NULL, m, tp, nth); - lock_upgraded = false; lgb = NULL; if ((tp != NULL) && (tp->t_logstate != TCP_LOG_STATE_OFF)) { - union tcp_log_stackspecific log; - struct timeval tv; - - lock_upgraded = !INP_WLOCKED(inp) && INP_TRY_UPGRADE(inp); - /* - *`If we don't already own the write lock and can't upgrade, - * just don't log the event, but still send the response. - */ if (INP_WLOCKED(inp)) { + union tcp_log_stackspecific log; + struct timeval tv; + memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tp->t_inpcb->inp_in_hpts; log.u_bbr.ininput = tp->t_inpcb->inp_in_input; @@ -2107,8 +2107,36 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, log.u_bbr.pkts_out = tp->t_maxseg; log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.delivered = 0; - lgb = tcp_log_event_(tp, nth, NULL, NULL, TCP_LOG_OUT, ERRNO_UNK, - 0, &log, false, NULL, NULL, 0, &tv); + lgb = tcp_log_event_(tp, nth, NULL, NULL, TCP_LOG_OUT, + ERRNO_UNK, 0, &log, false, NULL, NULL, 0, &tv); + } else { + /* + * We can not log the packet, since we only own the + * read lock, but a write lock is needed. The read lock + * is not upgraded to a write lock, since only getting + * the read lock was done intentionally to improve the + * handling of SYN flooding attacks. + * This happens only for pure SYN segments received in + * the initial CLOSED state, or received in a more + * advanced state than listen and the UDP encapsulation + * port is unexpected. + * The incoming SYN segments do not really belong to + * the TCP connection and the handling does not change + * the state of the TCP connection. Therefore, the + * sending of the RST segments is not logged. Please + * note that also the incoming SYN segments are not + * logged. + * + * The following code ensures that the above description + * is and stays correct. + */ + KASSERT((thflags & (TH_ACK|TH_SYN)) == TH_SYN && + (tp->t_state == TCPS_CLOSED || + (tp->t_state > TCPS_LISTEN && tp->t_port != port)), + ("%s: Logging of TCP segment with flags 0x%b and " + "UDP encapsulation port %u skipped in state %s", + __func__, thflags, PRINT_TH_FLAGS, + ntohs(port), tcpstates[tp->t_state])); } } @@ -2129,8 +2157,6 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, #endif if (lgb != NULL) lgb->tlb_errno = output_ret; - if (lock_upgraded) - INP_DOWNGRADE(inp); } /* From nobody Mon Nov 29 13:21:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AE87118B2715; Mon, 29 Nov 2021 13:21:43 +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 4J2mGG5DC1z4q5k; Mon, 29 Nov 2021 13:21:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-oi1-x230.google.com with SMTP id be32so34500234oib.11; Mon, 29 Nov 2021 05:21:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7WmkC7rfpenq3xIe4SWn/MTWUYynmhz3prx4/L1/hFo=; b=ocZwRXL31mTmAThkQTX0D8jOw4yoswmvGw59N6k5wAjwOoBBW3CDOT6cthsSjkrW4O nCqCr53T14/VgQRL5BnRX+l5Ax8pjrrJ+vh3dSwOuvLHdw/yStqdAAbJ8oCxVkOsQWl6 OdAxENptD8lrBrbNp7CVB9QvFff4BoiOJovBr0fviwR23PQlIv3u3gmjLHEWIIwxmrTT tZ/hIrPQo1wDpAza5KyoLZ4yZ6tEEe39jrdosXX4p6j00vHMJlLt/WcmePgiGi1OdwqB MUfdf0HBt7LV5cqZVI0DP8myCWck01RGlg1qW6OPbh25c8H576AEBXb55RPWeEeHVcdl klBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7WmkC7rfpenq3xIe4SWn/MTWUYynmhz3prx4/L1/hFo=; b=J0hRI8i4Ru0uteRmUeTtUPnyaNxFF1bbRbT2W+LucRBlvQTmjkYTQBnCoFjUXC5oxB Y24vUG14hlu0x5ruEf4hZxtx5CyoPvd4/4i3Xd+DQEIimoIth7ny+3q148rpDx2UNsm0 kkogcf/src5b3eL4RxaMBUMlChuTXA+65fNcWciHR0TEUyWUr7MA2JH1aJ6RTkyDscy6 a1EPrb5HDqOp2DlBBXfGCT4DKZRxcHjoSTXn/maNvks7piQPmEeggAlCW2aeeoc9Yajw dswtWc+82JnIqcsq3CLPHu4sk+HfPg1Wd+B4wqzyLX7TpMlhSO0gyKrEwYvBBqcMZJRa z+zQ== X-Gm-Message-State: AOAM5321CVWviWW1Le4ff9G7R7I7eSMXo39k5FiPUUS1zwHdN1nb+Bwc 88oSQH+Ghrwt/xyNfCYPRxEiFsuegMIblOmKlAYW3HL+ X-Google-Smtp-Source: ABdhPJz+EaHUpfQBueTt5yBQfZZ8bD2hLCF19hnTaHhzbWmcnQ3vi0Gweef5z7ZTGwz9u32G2aWCqz+Ccyoo3y53mcE= X-Received: by 2002:aca:3047:: with SMTP id w68mr39800836oiw.75.1638192096067; Mon, 29 Nov 2021 05:21:36 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:126d:0:b0:3b4:5824:6a18 with HTTP; Mon, 29 Nov 2021 05:21:35 -0800 (PST) In-Reply-To: <202111051525.1A5FPgwj073325@gitrepo.freebsd.org> References: <202111051525.1A5FPgwj073325@gitrepo.freebsd.org> From: Mateusz Guzik Date: Mon, 29 Nov 2021 14:21:35 +0100 Message-ID: Subject: Re: git: d836c48e7110 - main - cam_periph: wired is really a bool, update it to a bool. To: Warner Losh 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: 4J2mGG5DC1z4q5k X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=ocZwRXL3; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2607:f8b0:4864:20::230 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-0.69 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::230:from]; NEURAL_SPAM_LONG(0.31)[0.311]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N On 11/5/21, Warner Losh wrote: > The branch main has been updated by imp: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=d836c48e7110f2894885cf84ce8990f7916663cc > > commit d836c48e7110f2894885cf84ce8990f7916663cc > Author: Warner Losh > AuthorDate: 2021-11-05 14:56:48 +0000 > Commit: Warner Losh > CommitDate: 2021-11-05 14:56:48 +0000 > > cam_periph: wired is really a bool, update it to a bool. > > Sponsored by: Netflix > Reviewed by: scottl > Differential Revision: https://reviews.freebsd.org/D32823 > --- > sys/cam/cam_periph.c | 25 +++++++++++++------------ > 1 file changed, 13 insertions(+), 12 deletions(-) > > diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c > index bb4baaf0888f..54fe9a0ef40c 100644 > --- a/sys/cam/cam_periph.c > +++ b/sys/cam/cam_periph.c > @@ -600,8 +600,9 @@ static u_int > camperiphunit(struct periph_driver *p_drv, path_id_t pathid, > target_id_t target, lun_id_t lun, const char *sn) > { > + bool wired; > u_int unit; > - int wired, i, val, dunit; > + int i, val, dunit; > const char *dname, *strval; > char pathbuf[32], *periph_name; > > @@ -610,29 +611,29 @@ camperiphunit(struct periph_driver *p_drv, path_id_t > pathid, > unit = 0; > i = 0; > dname = periph_name; > - for (wired = 0; resource_find_dev(&i, dname, &dunit, NULL, NULL) == 0; > - wired = 0) { > + while (resource_find_dev(&i, dname, &dunit, NULL, NULL) == 0) { > + wired = false; This has a side effect of no longer initializing wired if the first resource_find_dev call returns != 0, which in turn causes KMSAN to panic due to: unit = camperiphnextunit(p_drv, unit, wired, pathid, target, lun); below. It is unclear to me what this code should do. Plopping 'wired = false;' upfront at least restores the previous state and prevents the panic. > if (resource_string_value(dname, dunit, "at", &strval) == 0) { > if (strcmp(strval, pathbuf) != 0) > continue; > - wired++; > + wired = true; > } > if (resource_int_value(dname, dunit, "target", &val) == 0) { > if (val != target) > continue; > - wired++; > + wired = true; > } > if (resource_int_value(dname, dunit, "lun", &val) == 0) { > if (val != lun) > continue; > - wired++; > + wired = true; > } > if (resource_string_value(dname, dunit, "sn", &strval) == 0) { > if (sn == NULL || strcmp(strval, sn) != 0) > continue; > - wired++; > + wired = true; > } > - if (wired != 0) { > + if (wired) { > unit = dunit; > break; > } > -- Mateusz Guzik From nobody Mon Nov 29 14:20:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D5C0F18B004C; Mon, 29 Nov 2021 14:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2nZg456qz3h26; Mon, 29 Nov 2021 14:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C94E23DDD; Mon, 29 Nov 2021 14:20: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 1ATEKxJf055900; Mon, 29 Nov 2021 14:20:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATEKxqX055899; Mon, 29 Nov 2021 14:20:59 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:20:59 GMT Message-Id: <202111291420.1ATEKxqX055899@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: 141f0db23eff - stable/13 - pchtherm: Let the driver be compiled into the kernel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 141f0db23eff6fe49aa4ee8cc9c84aabc3f3eaa6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638195659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EmNzp9s4YALQhjhNLH14W+kWUWjVuhDAKkPwMvZUf/c=; b=avXaAlPsUekbgH4jL6mlUcnUAr0hCJ20Bma/XiE7b/Eybf/7vazkZr/CqSB0Kxcbb6D7nH 90CpYJ3VYu+touRoFs1lOCnv9xIHF6h+TBylWKVfvH7YLmMIYEbAiOuj6DelRiQcnpoVRF YRcpKauWaZkbWLHiMbajmThlEEfkxU7BsjZp3CgwJKhvsJ+j5SRFh8wnilgQoKI+41o2vf PBlRNHrZmeL8nhQ7zqciB2qwBoAECekWBqTlBpHUg26ycQ+kb1X31khxfxsoFYbZiuy1vc 2mkFOzIb+6t8MeHO0kxkNscpUJgeeulIvr3jyEYKM4lcGcqyYLZJLyTx61bHDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638195659; a=rsa-sha256; cv=none; b=qb8XRUR3WZyyWhibrFi4qJRG+ry/gYD8+YOAWKXORPk38XfFWzi9u/NGTZrk12tIa8uFW6 Iy1ZrpOsEhJNl9hK48Je6RKrKKMs6YIwyjjEWUJGJ6+wrsYdwB7G4kvIm1u/VNu71u9uur BQs0WF+WIT1mAmauWFuA8MrLrAtXrkieTyfYhPwf6/KD/yECrJ0FRhrhRC5NRZswwnliWW UPH0GrXYPihhCr/8zElv+0QzpRc69ArNT+yqydDW0w/d9jCm7pGWHgrWasnmuT1Xi/cOG0 rU9316myIUw50gp2VuRrSarYeJxY5J5YBK6ZhNonj5ja5Hi5K+osiTf9y8frqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=141f0db23eff6fe49aa4ee8cc9c84aabc3f3eaa6 commit 141f0db23eff6fe49aa4ee8cc9c84aabc3f3eaa6 Author: N.J. Mann AuthorDate: 2021-11-22 17:04:05 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 14:04:16 +0000 pchtherm: Let the driver be compiled into the kernel PR: 259776 (cherry picked from commit a11983366ea72165809837a667d58e2ad440c496) --- sys/conf/files.x86 | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index 4ff888e8910c..69e1f7fd6802 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -162,6 +162,7 @@ dev/if_ndis/if_ndis_pci.c optional ndis cardbus | ndis pci dev/if_ndis/if_ndis_usb.c optional ndis usb dev/imcsmb/imcsmb.c optional imcsmb dev/imcsmb/imcsmb_pci.c optional imcsmb pci +dev/intel/pchtherm.c optional pchtherm dev/intel/spi.c optional intelspi dev/io/iodev.c optional io dev/iommu/busdma_iommu.c optional acpi iommu pci From nobody Mon Nov 29 14:21:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9C85618B0123; Mon, 29 Nov 2021 14:21:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2nZh62Lfz3RFP; Mon, 29 Nov 2021 14:21:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99FAD23F67; Mon, 29 Nov 2021 14:21: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 1ATEL09b055926; Mon, 29 Nov 2021 14:21:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATEL02p055925; Mon, 29 Nov 2021 14:21:00 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:21:00 GMT Message-Id: <202111291421.1ATEL02p055925@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: 294965542720 - stable/13 - Fix segment size in compressing core dumps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2949655427209b7d086eb35a92ea1e175d1b1a67 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638195661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PsjM/cOvIe+hBMc34XiOYwR+egrTNrk7zCZxtrH3SqA=; b=ZG6B8IczOu8QDqVU1yM+lty/0V0SXeDOwaVEkc0MnYqYUv4Hgz6KTHPlxK7SwkNI20B4cA 7MAGBbMuBk8y096DH96hTp52oaJSybce3bd1OnRAKLX9XdL+/htPI/lYEemVVuTR90htQr 4Oc8rQmtSycEcHSZBbZJKi5/XEHhWX5Mz2FBYUmvak+R1WaK0J7/tLh0Fdw9sK7w+Rv7U1 rz+/CFuusuPecdJhpOTvvBYQyBSXV8svceE/0+EdP2KAXWC961zIEQrNjRLOCOT/MA4AWL vdIj3QM0VHhHBcdXju7/HvZNt5qVgC94mhA135jdRpIazT+Fv3CBEYwgAIGQjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638195661; a=rsa-sha256; cv=none; b=KM+rCNFlIMrLuhRWus5gNAoq8m/RU7+VPDmKoRIabSZrgc8SqQftYg0etrLiPz6CTXhe5a ctSpd3+RV+kE2LLOA7zTQEujbXlBuxdidhsHLJf1DyzknLOWjtaOeRsyFf3tRLVJpna7bg LRfOqyr6+pRiMCWooNiYK9leNWqq/QaFdYskPO+CEeLNYZoMzpA3a6Z32aMj3qa26Kuv/T Knbl8TreiV7Hf0rO4TChoJRdmAqqEeecADqdwklavFEi1Vf4ZjHlnw23RU6x8CzTMvHs7V jaLNCltz9/le2oAr/31jESQDrNLdSsqcKlC95y4v3KV8MPcbJoQDnexF+6Cy6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2949655427209b7d086eb35a92ea1e175d1b1a67 commit 2949655427209b7d086eb35a92ea1e175d1b1a67 Author: Justin Hibbits AuthorDate: 2021-10-01 18:39:18 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 14:08:11 +0000 Fix segment size in compressing core dumps A core segment is bounded in size only by memory size. On 64-bit architectures this means a segment can be much larger than 4GB. However, compress_chunk() takes only a u_int, clamping segment size to 4GB-1, resulting in a truncated core. Everything else, including the compressor internally, uses size_t, so use size_t at the boundary here. This dates back to the original refactor back in 2015 (r279801 / aa14e9b7). PR: 260006 Sponsored by: Juniper Networks, Inc. (cherry picked from commit 63cb9308a75b99fe057409705bc1b2ac0293f578) --- sys/kern/imgact_elf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index e1b6e3fc6ba7..18ddbae57d4a 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1505,9 +1505,9 @@ static void note_procstat_vmmap(void *, struct sbuf *, size_t *); * Write out a core segment to the compression stream. */ static int -compress_chunk(struct coredump_params *p, char *base, char *buf, u_int len) +compress_chunk(struct coredump_params *p, char *base, char *buf, size_t len) { - u_int chunk_len; + size_t chunk_len; int error; while (len > 0) { From nobody Mon Nov 29 14:21:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2972718B0381; Mon, 29 Nov 2021 14:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2nZk3NpWz3h8j; Mon, 29 Nov 2021 14:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8E0C23CD1; Mon, 29 Nov 2021 14:21: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 1ATEL1M3055955; Mon, 29 Nov 2021 14:21:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATEL16x055954; Mon, 29 Nov 2021 14:21:01 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:21:01 GMT Message-Id: <202111291421.1ATEL16x055954@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: fdd27db34802 - stable/13 - vm: Add a mode to vm_object_page_remove() which skips invalid 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fdd27db34802decf062339411e5f84993e733be0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638195662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sMWaKpPXLXHjsNJcn3B9m/rwEgobkxN0E8OvtmWECiY=; b=fgikVjcCQQVMdrfinz5gzm2M5CqblXSOshqaXu6ojFvyWU1Ln3mc4Rj++bsA5Tz2Ykb84b wZSPrFiIGrMSt4PSq9zbjij2rzU7qOwvM2VayLf6p9jT2/ZhXRcIAv3AsduN2Q2tidSfB4 aHiLPL/ufoKkKYF/2GaXHsSB67jPP4hRfjYKiDEv8FY0DOguwceoxTkh/OBKYG6pbYB4S0 hQlUyxhH7PYFbB1odCe0ed8sSYbhDJldV3TnozHFXg7YXXP+4rUrA+ueHhySNqndDyHt0I ZuPkkh8vnnSzLrEiE/XBGgk8EJm8WGUwjxOD/ytbtzNl6/74hc8LiAGXBRrnYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638195662; a=rsa-sha256; cv=none; b=lxqU5YwJf63IsJhRyDvY1l/oZAwiIp4JMAE3M8zMwsf6i7xoCNvv1h1XqUC52Hup1bjCi1 KjjhyuN3JSXGBpMNiSzqbMYw/xOybc0B3LxkkwWGHyT4cN1cUh8kKh5lHWjIYzWuAqEg0T 9dzfdV04Uqk4Hek3K3B0AnJkankvYK1KkFdTr1ReRSZmherOGqT40ecpZWWpGKHnCiWBUA ib3R2rY8xO/7BiAtR7ugOVbDp6k01RCcw3rNEHKWc5oAJ4M6yM7SUwJrgEL7rC/1CKUEDL rF4TXG6KybUkdXdvvCquTEFrC9SWUq2Nu5gCPDVURYR8cTXvXi4gCumerKf3rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fdd27db34802decf062339411e5f84993e733be0 commit fdd27db34802decf062339411e5f84993e733be0 Author: Mark Johnston AuthorDate: 2021-11-15 16:44:04 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 14:09:28 +0000 vm: Add a mode to vm_object_page_remove() which skips invalid pages This will be used to break a deadlock in ZFS between the per-mountpoint teardown lock and page busy locks. In particular, when purging data from the page cache during dataset rollback, we want to avoid blocking on the busy state of invalid pages since the busying thread may be blocked on the teardown lock in zfs_getpages(). Add a helper, vn_pages_remove_valid(), for use by filesystems. Bump __FreeBSD_version so that the OpenZFS port can make use of the new helper. PR: 258208 Reviewed by: avg, kib, sef Tested by: pho (part of a larger patch) Sponsored by: The FreeBSD Foundation (cherry picked from commit d28af1abf031ee87a478b37180e3f0c518caedf6) --- sys/kern/vfs_vnops.c | 22 ++++++++++++++++++++++ sys/sys/vnode.h | 2 ++ sys/vm/vm_object.c | 19 +++++++++++++++++++ sys/vm/vm_object.h | 1 + 4 files changed, 44 insertions(+) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index b78c24e3e313..afb1c6799825 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -2425,6 +2425,10 @@ vn_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, return (setfown(td, active_cred, vp, uid, gid)); } +/* + * Remove pages in the range ["start", "end") from the vnode's VM object. If + * "end" is 0, then the range extends to the end of the object. + */ void vn_pages_remove(struct vnode *vp, vm_pindex_t start, vm_pindex_t end) { @@ -2437,6 +2441,24 @@ vn_pages_remove(struct vnode *vp, vm_pindex_t start, vm_pindex_t end) VM_OBJECT_WUNLOCK(object); } +/* + * Like vn_pages_remove(), but skips invalid pages, which by definition are not + * mapped into any process' address space. Filesystems may use this in + * preference to vn_pages_remove() to avoid blocking on pages busied in + * preparation for a VOP_GETPAGES. + */ +void +vn_pages_remove_valid(struct vnode *vp, vm_pindex_t start, vm_pindex_t end) +{ + vm_object_t object; + + if ((object = vp->v_object) == NULL) + return; + VM_OBJECT_WLOCK(object); + vm_object_page_remove(object, start, end, OBJPR_VALIDONLY); + VM_OBJECT_WUNLOCK(object); +} + int vn_bmap_seekhole(struct vnode *vp, u_long cmd, off_t *off, struct ucred *cred) { diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index ba5eafc80d4b..66e8a7c0a87e 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -763,6 +763,8 @@ int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, int vn_open_vnode(struct vnode *vp, int fmode, struct ucred *cred, struct thread *td, struct file *fp); void vn_pages_remove(struct vnode *vp, vm_pindex_t start, vm_pindex_t end); +void vn_pages_remove_valid(struct vnode *vp, vm_pindex_t start, + vm_pindex_t end); int vn_pollrecord(struct vnode *vp, struct thread *p, int events); int vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base, int len, off_t offset, enum uio_seg segflg, int ioflg, diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 5bbe7faed50b..47595d38137c 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2094,6 +2094,21 @@ again: for (; p != NULL && (p->pindex < end || end == 0); p = next) { next = TAILQ_NEXT(p, listq); + /* + * Skip invalid pages if asked to do so. Try to avoid acquiring + * the busy lock, as some consumers rely on this to avoid + * deadlocks. + * + * A thread may concurrently transition the page from invalid to + * valid using only the busy lock, so the result of this check + * is immediately stale. It is up to consumers to handle this, + * for instance by ensuring that all invalid->valid transitions + * happen with a mutex held, as may be possible for a + * filesystem. + */ + if ((options & OBJPR_VALIDONLY) != 0 && vm_page_none_valid(p)) + continue; + /* * If the page is wired for any reason besides the existence * of managed, wired mappings, then it cannot be freed. For @@ -2106,6 +2121,10 @@ again: vm_page_sleep_if_busy(p, "vmopar"); goto again; } + if ((options & OBJPR_VALIDONLY) != 0 && vm_page_none_valid(p)) { + vm_page_xunbusy(p); + continue; + } if (vm_page_wired(p)) { wired: if ((options & OBJPR_NOTMAPPED) == 0 && diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index adbe022417f4..2a16d8c6f096 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -232,6 +232,7 @@ struct vm_object { */ #define OBJPR_CLEANONLY 0x1 /* Don't remove dirty pages. */ #define OBJPR_NOTMAPPED 0x2 /* Don't unmap pages. */ +#define OBJPR_VALIDONLY 0x4 /* Ignore invalid pages. */ TAILQ_HEAD(object_q, vm_object); From nobody Mon Nov 29 14:21:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 13F4F18B0405; Mon, 29 Nov 2021 14:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2nZm4fYsz3h0Y; Mon, 29 Nov 2021 14:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 027DF23AF4; Mon, 29 Nov 2021 14:21: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 1ATEL3Nn056003; Mon, 29 Nov 2021 14:21:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATEL3jh056002; Mon, 29 Nov 2021 14:21:03 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:21:03 GMT Message-Id: <202111291421.1ATEL3jh056002@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: 1556ae13560c - stable/13 - vm_page: Remove vm_page_sbusy() and vm_page_xbusy() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1556ae13560c18f44b5daed19608c547e0bf6e8a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638195664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x2ew3SVGT7UXBL146X2WbS8mbC/orGkVDQcNdC+SUjg=; b=uB2WCETULUecgnUQ9uLyC3pZCLWuXOxPv8uoBLSjzP1ybnPTMlq3I5RAp0btX1cPjaMcPa /dZgoKBJRUDGTAq6GL/DNEopt5CCi0XwAEi+3pApakglPyw7uJes3cyLmUiWvcUKd5QEMv uXwafJqekQuUVswrKkUoswx17MZjiS2tPxxC47F96xEcGm6OoYchMiru5V5g4+btQuGSr+ 6oPNSNJVEymvq6TkUnWoGdfWZfp6ZrNfVyFIGJQvfl4gip9SbsYKPKKupUb6bl6KtNKucA 8BKbWLNkleQ8LM3ctZ9UXptihupVUVARoRT2iuPrCMzp5bSFArUuhkQ0R8Aq1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638195664; a=rsa-sha256; cv=none; b=sEt+aMMrYrSxHDDVURrD2wbpFDFvZY8yqLg84sXn6xYnvsl2zAOYOzAkxXvq69MlIoNzhp IFKEj14eWSto8q4XSdCWIx+bp84VkYAGTvBzYR8mCqDnR2eCqa085nHm1g34fFR2pN7orF 2u0th315sTzHPU6sjrfCsn+eagv1Z1F1M3xhiY9MtgEWwzJ6VrvCAgkDD90Rg44KtSKjea jtaZSgcQX/JbXcv22stC3hbx9vIdgIaWQ8rjsq56vIuBBGjbwKaGCa46gpgPLq5v1oWtFr VJSJVIw6A5YLls8QGl1w04je1xOmjR+RwpkTZbpXjq6Yq2mXBC7yBF8YAJiPVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1556ae13560c18f44b5daed19608c547e0bf6e8a commit 1556ae13560c18f44b5daed19608c547e0bf6e8a Author: Mark Johnston AuthorDate: 2021-11-15 16:35:52 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 14:11:37 +0000 vm_page: Remove vm_page_sbusy() and vm_page_xbusy() They are unused today and cannot be safely used in the face of unlocked lookup, in which pages may be busied without the object lock held. Obtained from: jeff (object_concurrency patches) Reviewed by: kib (cherry picked from commit a2665158d03e87dad410384e5c61c72e675f3edd) --- ObsoleteFiles.inc | 4 +++- share/man/man9/Makefile | 2 -- share/man/man9/vm_page_busy.9 | 16 ---------------- sys/vm/vm_page.h | 12 ------------ 4 files changed, 3 insertions(+), 31 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 1448b9076c95..9e6b7b987d79 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,7 +36,9 @@ # xargs -n1 | sort | uniq -d; # done -# 20211115: vm_page_sleep_if_busy removed +# 20211115: vm_page busy functions removed +OLD_FILES+=share/man/man9/vm_page_sbusy.9.gz +OLD_FILES+=share/man/man9/vm_page_xbusy.9.gz OLD_FILES+=share/man/man9/vm_page_sleep_if_busy.9.gz # 20210923: rename boot(9) to kern_reboot(9) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 14cdf7470b41..f6eced940295 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2325,12 +2325,10 @@ MLINKS+=vm_page_busy.9 vm_page_busied.9 \ vm_page_busy.9 vm_page_busy_downgrade.9 \ vm_page_busy.9 vm_page_busy_sleep.9 \ vm_page_busy.9 vm_page_sbusied.9 \ - vm_page_busy.9 vm_page_sbusy.9 \ vm_page_busy.9 vm_page_sunbusy.9 \ vm_page_busy.9 vm_page_trysbusy.9 \ vm_page_busy.9 vm_page_tryxbusy.9 \ vm_page_busy.9 vm_page_xbusied.9 \ - vm_page_busy.9 vm_page_xbusy.9 \ vm_page_busy.9 vm_page_xunbusy.9 \ vm_page_busy.9 vm_page_assert_sbusied.9 \ vm_page_busy.9 vm_page_assert_unbusied.9 \ diff --git a/share/man/man9/vm_page_busy.9 b/share/man/man9/vm_page_busy.9 index 3f08a467bcb1..88511aafabca 100644 --- a/share/man/man9/vm_page_busy.9 +++ b/share/man/man9/vm_page_busy.9 @@ -32,12 +32,10 @@ .Nm vm_page_busy_downgrade , .Nm vm_page_busy_sleep , .Nm vm_page_sbusied , -.Nm vm_page_sbusy , .Nm vm_page_sunbusy , .Nm vm_page_trysbusy , .Nm vm_page_tryxbusy , .Nm vm_page_xbusied , -.Nm vm_page_xbusy , .Nm vm_page_xunbusy , .Nm vm_page_assert_sbusied , .Nm vm_page_assert_unbusied , @@ -56,8 +54,6 @@ .Ft int .Fn vm_page_sbusied "vm_page_t m" .Ft void -.Fn vm_page_sbusy "vm_page_t m" -.Ft void .Fn vm_page_sunbusy "vm_page_t m" .Ft int .Fn vm_page_trysbusy "vm_page_t m" @@ -66,8 +62,6 @@ .Ft int .Fn vm_page_xbusied "vm_page_t m" .Ft void -.Fn vm_page_xbusy "vm_page_t m" -.Ft void .Fn vm_page_xunbusy "vm_page_t m" .Pp .Cd "options INVARIANTS" @@ -140,11 +134,6 @@ in shared mode. Returns zero otherwise. .Pp The -.Fn vm_page_sbusy -function shared busies -.Fa m . -.Pp -The .Fn vm_page_sunbusy function shared unbusies .Fa m . @@ -173,11 +162,6 @@ in exclusive mode. Returns zero otherwise. .Pp The -.Fn vm_page_xbusy -function exclusive busies -.Fa m . -.Pp -The .Fn vm_page_xunbusy function exclusive unbusies .Fa m . diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 4b43b1d71f54..1785728b7a7e 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -748,24 +748,12 @@ void vm_page_lock_assert_KBI(vm_page_t m, int a, const char *file, int line); #define vm_page_busied(m) \ (vm_page_busy_fetch(m) != VPB_UNBUSIED) -#define vm_page_sbusy(m) do { \ - if (!vm_page_trysbusy(m)) \ - panic("%s: page %p failed shared busying", __func__, \ - (m)); \ -} while (0) - #define vm_page_xbusied(m) \ ((vm_page_busy_fetch(m) & VPB_SINGLE_EXCLUSIVE) != 0) #define vm_page_busy_freed(m) \ (vm_page_busy_fetch(m) == VPB_FREED) -#define vm_page_xbusy(m) do { \ - if (!vm_page_tryxbusy(m)) \ - panic("%s: page %p failed exclusive busying", __func__, \ - (m)); \ -} while (0) - /* Note: page m's lock must not be owned by the caller. */ #define vm_page_xunbusy(m) do { \ if (!atomic_cmpset_rel_int(&(m)->busy_lock, \ From nobody Mon Nov 29 14:21:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 12F1718B01C1; Mon, 29 Nov 2021 14:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2nZl5FDZz3h6H; Mon, 29 Nov 2021 14:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9A6423CD2; Mon, 29 Nov 2021 14:21: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 1ATEL2pm055979; Mon, 29 Nov 2021 14:21:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATEL2Fe055978; Mon, 29 Nov 2021 14:21:02 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:21:02 GMT Message-Id: <202111291421.1ATEL2Fe055978@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: cb081566cf86 - stable/13 - vm_page: Consolidate page busy sleep mechanisms List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: cb081566cf868dccce2f96bf5276b6dc561c842d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638195664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7kEuu6Df/fyYZ7axVcIfJ+9c1xjfAMnWAmts5rs7ozs=; b=LPxkO+XHtJZIezBNsXsBLr6gn/0cyM9LfC0NspDXDIWGmmEUxbol4ik8qOtkvtsv+ufkPn fdwoYibCHNBBaA3g87TCx3iRv25//LoQI7jvBx1UJRbgkRmN7cUHvKn5+cQzxIUNlvYZLu FrJbUYqGd/0dIWaJgbhuaDdQBEOudQ81KjEvRHYJMNuOrcTrBkHAApB1kuGDNCfHyk2o4a lGqkXu1crxX0c8r6Pu+hZ0+PNNnNFC008cxsODeCSPDrIAxTJ+1UFiaqW1mB0wpHYObwwB vfHZhc9HeD2n79CWEN5B+no7xRlM/q1R1P5M+AW/MHry6d1fSKMINW4IxQJ6Ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638195664; a=rsa-sha256; cv=none; b=RhLyudshWtvWr7aBh6LO36+1diXgEU8j4VKQ9LItHvGuWIL2+/umewzef7YWv73N7QH2gQ hpI7Gp+16g8AeDjAhCZJCKNgSI+YkJ2rkci5jPQk+Yn515z93ndwQCBj0asrZZDhNbc6pg 9Kgp8aQUCN3tHcKUQN/tR4JENOHotTMJTC7qNBwPguN0ivya4/u3NExSoV/a4aglSA6yAA o6sM4KlX8S7+nkCjO7EPzFGouqV365Rp7A7vhiV3BspDAvV6BknUDmwlkqMKuPa6TMD3dV YYfmqIy02CFi4dzyyJmKeQ1mmY6y7XkkO7ms1SDIjeb5dzalK1t7sLJWjXUTkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cb081566cf868dccce2f96bf5276b6dc561c842d commit cb081566cf868dccce2f96bf5276b6dc561c842d Author: Mark Johnston AuthorDate: 2021-11-15 16:35:44 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 14:11:29 +0000 vm_page: Consolidate page busy sleep mechanisms - Modify vm_page_busy_sleep() and vm_page_busy_sleep_unlocked() to take a VM_ALLOC_* flag indicating whether to sleep on shared-busy, and fix up callers. - Modify vm_page_busy_sleep() to return a status indicating whether the object lock was dropped, and fix up callers. - Convert callers of vm_page_sleep_if_busy() to use vm_page_busy_sleep() instead. - Remove vm_page_sleep_if_(x)busy(). No functional change intended. Obtained from: jeff (object_concurrency patches) Reviewed by: kib (cherry picked from commit 87b646630c4892e21446cd096bea6bcaecea33ac) --- ObsoleteFiles.inc | 3 ++ share/man/man9/Makefile | 1 - share/man/man9/vm_page_busy.9 | 40 +++++++++--------- sys/vm/vm_fault.c | 5 +-- sys/vm/vm_object.c | 27 ++++++++---- sys/vm/vm_page.c | 97 ++++++++----------------------------------- sys/vm/vm_page.h | 6 +-- 7 files changed, 62 insertions(+), 117 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index ac85e8b55e26..1448b9076c95 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,6 +36,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20211115: vm_page_sleep_if_busy removed +OLD_FILES+=share/man/man9/vm_page_sleep_if_busy.9.gz + # 20210923: rename boot(9) to kern_reboot(9) OLD_FILES+=usr/share/man/man9/boot.9.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 500cd252a3df..14cdf7470b41 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2326,7 +2326,6 @@ MLINKS+=vm_page_busy.9 vm_page_busied.9 \ vm_page_busy.9 vm_page_busy_sleep.9 \ vm_page_busy.9 vm_page_sbusied.9 \ vm_page_busy.9 vm_page_sbusy.9 \ - vm_page_busy.9 vm_page_sleep_if_busy.9 \ vm_page_busy.9 vm_page_sunbusy.9 \ vm_page_busy.9 vm_page_trysbusy.9 \ vm_page_busy.9 vm_page_tryxbusy.9 \ diff --git a/share/man/man9/vm_page_busy.9 b/share/man/man9/vm_page_busy.9 index f4e922a8319f..3f08a467bcb1 100644 --- a/share/man/man9/vm_page_busy.9 +++ b/share/man/man9/vm_page_busy.9 @@ -24,7 +24,7 @@ .\" DAMAGE. .\" .\" $FreeBSD$ -.Dd August 07, 2013 +.Dd November 11, 2021 .Dt VM_PAGE_BUSY 9 .Os .Sh NAME @@ -33,7 +33,6 @@ .Nm vm_page_busy_sleep , .Nm vm_page_sbusied , .Nm vm_page_sbusy , -.Nm vm_page_sleep_if_busy , .Nm vm_page_sunbusy , .Nm vm_page_trysbusy , .Nm vm_page_tryxbusy , @@ -52,14 +51,12 @@ .Fn vm_page_busied "vm_page_t m" .Ft void .Fn vm_page_busy_downgrade "vm_page_t m" -.Ft void -.Fn vm_page_busy_sleep "vm_page_t m" "const char *msg" +.Ft bool +.Fn vm_page_busy_sleep "vm_page_t m" "const char *msg" "int allocflags" .Ft int .Fn vm_page_sbusied "vm_page_t m" .Ft void .Fn vm_page_sbusy "vm_page_t m" -.Ft int -.Fn vm_page_sleep_if_busy "vm_page_t m" "const char *msg" .Ft void .Fn vm_page_sunbusy "vm_page_t m" .Ft int @@ -114,8 +111,23 @@ from an exclusive busy state to a shared busy state. .Pp The .Fn vm_page_busy_sleep -function puts the invoking thread to sleep using the appropriate -waitchannels for the busy mechanism. +checks the busy state of the page +.Fa m +and puts the invoking thread to sleep if the page is busy. +The VM object for the page must be locked. +The +.Fa allocflags +parameter must be either +.Dv 0 , +in which case the function will sleep if the page is busied, +or +.Dv VM_ALLOC_IGN_SBUSY , +in which case the function will sleep only if the page is exclusively +busied. +A return value of true indicates that the invoking thread was put to +sleep and that the object was unlocked. +A return value of false indicates that the invoking thread did not sleep +and the object remains locked. The parameter .Fa msg is a string describing the sleep condition for userland tools. @@ -133,18 +145,6 @@ function shared busies .Fa m . .Pp The -.Fn vm_page_sleep_if_busy -function puts the invoking thread to sleep, using the appropriate -waitchannels for the busy mechanism, if -.Fa m . -is busied in either exclusive or shared mode. -If the invoking thread slept a non-zero value is returned, otherwise -0 is returned. -The parameter -.Fa msg -is a string describing the sleep condition for userland tools. -.Pp -The .Fn vm_page_sunbusy function shared unbusies .Fa m . diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index c0ac89e4b70f..646f9ddb9017 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1290,9 +1290,8 @@ vm_fault_busy_sleep(struct faultstate *fs) } vm_object_pip_wakeup(fs->object); unlock_map(fs); - if (fs->m == vm_page_lookup(fs->object, fs->pindex)) - vm_page_busy_sleep(fs->m, "vmpfw", false); - else + if (fs->m != vm_page_lookup(fs->object, fs->pindex) || + !vm_page_busy_sleep(fs->m, "vmpfw", 0)) VM_OBJECT_WUNLOCK(fs->object); VM_CNT_INC(v_intrans); vm_object_deallocate(fs->first_object); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 47595d38137c..c465a2cf76dd 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1397,7 +1397,8 @@ next_page: */ vm_page_aflag_set(tm, PGA_REFERENCED); } - vm_page_busy_sleep(tm, "madvpo", false); + if (!vm_page_busy_sleep(tm, "madvpo", 0)) + VM_OBJECT_WUNLOCK(tobject); goto relookup; } vm_page_advise(tm, advice); @@ -1581,7 +1582,8 @@ retry: */ if (vm_page_tryxbusy(m) == 0) { VM_OBJECT_WUNLOCK(new_object); - vm_page_sleep_if_busy(m, "spltwt"); + if (vm_page_busy_sleep(m, "spltwt", 0)) + VM_OBJECT_WLOCK(orig_object); VM_OBJECT_WLOCK(new_object); goto retry; } @@ -1667,14 +1669,17 @@ vm_object_collapse_scan_wait(vm_object_t object, vm_page_t p) VM_OBJECT_WUNLOCK(object); VM_OBJECT_WUNLOCK(backing_object); vm_radix_wait(); + VM_OBJECT_WLOCK(object); + } else if (p->object == object) { + VM_OBJECT_WUNLOCK(backing_object); + if (vm_page_busy_sleep(p, "vmocol", 0)) + VM_OBJECT_WLOCK(object); } else { - if (p->object == object) + VM_OBJECT_WUNLOCK(object); + if (!vm_page_busy_sleep(p, "vmocol", 0)) VM_OBJECT_WUNLOCK(backing_object); - else - VM_OBJECT_WUNLOCK(object); - vm_page_busy_sleep(p, "vmocol", false); + VM_OBJECT_WLOCK(object); } - VM_OBJECT_WLOCK(object); VM_OBJECT_WLOCK(backing_object); return (TAILQ_FIRST(&backing_object->memq)); } @@ -2118,7 +2123,8 @@ again: * not specified. */ if (vm_page_tryxbusy(p) == 0) { - vm_page_sleep_if_busy(p, "vmopar"); + if (vm_page_busy_sleep(p, "vmopar", 0)) + VM_OBJECT_WLOCK(object); goto again; } if ((options & OBJPR_VALIDONLY) != 0 && vm_page_none_valid(p)) { @@ -2426,7 +2432,10 @@ again: VM_OBJECT_RUNLOCK(tobject); tobject = t1object; } - vm_page_busy_sleep(tm, "unwbo", true); + tobject = tm->object; + if (!vm_page_busy_sleep(tm, "unwbo", + VM_ALLOC_IGN_SBUSY)) + VM_OBJECT_RUNLOCK(tobject); goto again; } vm_page_unwire(tm, queue); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 6be310531924..74c03ed3a21b 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1000,24 +1000,26 @@ vm_page_sunbusy(vm_page_t m) * vm_page_busy_sleep: * * Sleep if the page is busy, using the page pointer as wchan. - * This is used to implement the hard-path of busying mechanism. + * This is used to implement the hard-path of the busying mechanism. + * + * If VM_ALLOC_IGN_SBUSY is specified in allocflags, the function + * will not sleep if the page is shared-busy. * - * If nonshared is true, sleep only if the page is xbusy. + * The object lock must be held on entry. * - * The object lock must be held on entry and will be released on exit. + * Returns true if it slept and dropped the object lock, or false + * if there was no sleep and the lock is still held. */ -void -vm_page_busy_sleep(vm_page_t m, const char *wmesg, bool nonshared) +bool +vm_page_busy_sleep(vm_page_t m, const char *wmesg, int allocflags) { vm_object_t obj; obj = m->object; VM_OBJECT_ASSERT_LOCKED(obj); - vm_page_lock_assert(m, MA_NOTOWNED); - if (!_vm_page_busy_sleep(obj, m, m->pindex, wmesg, - nonshared ? VM_ALLOC_SBUSY : 0 , true)) - VM_OBJECT_DROP(obj); + return (_vm_page_busy_sleep(obj, m, m->pindex, wmesg, allocflags, + true)); } /* @@ -1026,21 +1028,19 @@ vm_page_busy_sleep(vm_page_t m, const char *wmesg, bool nonshared) * Sleep if the page is busy, using the page pointer as wchan. * This is used to implement the hard-path of busying mechanism. * - * If nonshared is true, sleep only if the page is xbusy. + * If VM_ALLOC_IGN_SBUSY is specified in allocflags, the function + * will not sleep if the page is shared-busy. * * The object lock must not be held on entry. The operation will * return if the page changes identity. */ void vm_page_busy_sleep_unlocked(vm_object_t obj, vm_page_t m, vm_pindex_t pindex, - const char *wmesg, bool nonshared) + const char *wmesg, int allocflags) { - VM_OBJECT_ASSERT_UNLOCKED(obj); - vm_page_lock_assert(m, MA_NOTOWNED); - _vm_page_busy_sleep(obj, m, pindex, wmesg, - nonshared ? VM_ALLOC_SBUSY : 0, false); + (void)_vm_page_busy_sleep(obj, m, pindex, wmesg, allocflags, false); } /* @@ -1050,6 +1050,8 @@ vm_page_busy_sleep_unlocked(vm_object_t obj, vm_page_t m, vm_pindex_t pindex, * lockstate against parameters. Returns true if it sleeps and * false otherwise. * + * allocflags uses VM_ALLOC_* flags to specify the lock required. + * * If locked is true the lock will be dropped for any true returns * and held for any false returns. */ @@ -1395,71 +1397,6 @@ vm_page_free_invalid(vm_page_t m) vm_page_free(m); } -/* - * vm_page_sleep_if_busy: - * - * Sleep and release the object lock if the page is busied. - * Returns TRUE if the thread slept. - * - * The given page must be unlocked and object containing it must - * be locked. - */ -int -vm_page_sleep_if_busy(vm_page_t m, const char *wmesg) -{ - vm_object_t obj; - - vm_page_lock_assert(m, MA_NOTOWNED); - VM_OBJECT_ASSERT_WLOCKED(m->object); - - /* - * The page-specific object must be cached because page - * identity can change during the sleep, causing the - * re-lock of a different object. - * It is assumed that a reference to the object is already - * held by the callers. - */ - obj = m->object; - if (_vm_page_busy_sleep(obj, m, m->pindex, wmesg, 0, true)) { - VM_OBJECT_WLOCK(obj); - return (TRUE); - } - return (FALSE); -} - -/* - * vm_page_sleep_if_xbusy: - * - * Sleep and release the object lock if the page is xbusied. - * Returns TRUE if the thread slept. - * - * The given page must be unlocked and object containing it must - * be locked. - */ -int -vm_page_sleep_if_xbusy(vm_page_t m, const char *wmesg) -{ - vm_object_t obj; - - vm_page_lock_assert(m, MA_NOTOWNED); - VM_OBJECT_ASSERT_WLOCKED(m->object); - - /* - * The page-specific object must be cached because page - * identity can change during the sleep, causing the - * re-lock of a different object. - * It is assumed that a reference to the object is already - * held by the callers. - */ - obj = m->object; - if (_vm_page_busy_sleep(obj, m, m->pindex, wmesg, VM_ALLOC_SBUSY, - true)) { - VM_OBJECT_WLOCK(obj); - return (TRUE); - } - return (FALSE); -} - /* * vm_page_dirty_KBI: [ internal use only ] * diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index b31ea0241cc7..4b43b1d71f54 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -592,9 +592,9 @@ malloc2vm_flags(int malloc_flags) bool vm_page_busy_acquire(vm_page_t m, int allocflags); void vm_page_busy_downgrade(vm_page_t m); int vm_page_busy_tryupgrade(vm_page_t m); -void vm_page_busy_sleep(vm_page_t m, const char *msg, bool nonshared); +bool vm_page_busy_sleep(vm_page_t m, const char *msg, int allocflags); void vm_page_busy_sleep_unlocked(vm_object_t obj, vm_page_t m, - vm_pindex_t pindex, const char *wmesg, bool nonshared); + vm_pindex_t pindex, const char *wmesg, int allocflags); void vm_page_free(vm_page_t m); void vm_page_free_zero(vm_page_t m); @@ -678,8 +678,6 @@ vm_page_t vm_page_scan_contig(u_long npages, vm_page_t m_start, vm_page_t m_end, u_long alignment, vm_paddr_t boundary, int options); vm_page_bits_t vm_page_set_dirty(vm_page_t m); void vm_page_set_valid_range(vm_page_t m, int base, int size); -int vm_page_sleep_if_busy(vm_page_t m, const char *msg); -int vm_page_sleep_if_xbusy(vm_page_t m, const char *msg); vm_offset_t vm_page_startup(vm_offset_t vaddr); void vm_page_sunbusy(vm_page_t m); bool vm_page_try_remove_all(vm_page_t m); From nobody Mon Nov 29 14:21:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8DE4818B035A; Mon, 29 Nov 2021 14: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 4J2nZp2stjz3h91; Mon, 29 Nov 2021 14:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1AEB623B78; Mon, 29 Nov 2021 14:21: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 1ATEL5nd056027; Mon, 29 Nov 2021 14:21:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATEL5V9056026; Mon, 29 Nov 2021 14:21:05 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:21:05 GMT Message-Id: <202111291421.1ATEL5V9056026@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: e0cee46f5800 - stable/13 - amd64: Initialize kernel_pmap's active CPU set to all_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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e0cee46f5800071c105955c530ae91afa2cca002 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638195667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ou4ZDkEta9aSOWh8fLDmBMGlB3ahjI41MJBlitTXBgI=; b=vBKcAEMMHqNF0RvsWH79VYyCulBFf0aermX5LWpliR1dqF/ulyjyixMFQevi6XzOlh9avS HQHOugexCOQ5IEGGXaJEBJnIVK+8sEPTyOE3BnI7RyWDqEwvMRBtSWjgcgwASZmh3Dj6Co SFnWMfO756o2sJ/Q6EulcqUgsIDyqibjKS2467WLJOV9TY2OA7/f476TCQ/IAc9ef+US9W FFSqyS8O27+ZuP6T2P66JV236RiR4v9fQMXeHrlHmwgvbe0HiZnkuk2et5iCOzkvvhmSPD z/mAmsQQtmxY62M1v32r/wsxIDpGWi2UZSMrbejY0SWvskeRHuy4ND6JqEU7HA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638195667; a=rsa-sha256; cv=none; b=INW0vSFosNzBfF4IzL7VJGR1vvWL7S1GOknzERiVz2/+N1xwXU61pij8s5Vdn9Yhke4i/s S4d15N8R6MOJ7JXQ/y5gKc15Gb8igY8LZaZZVIU5VFITuPFAuo8q902Oa6XKevULM78Zl8 VsApYstXQ2IpXbPV2kfvgZRIDkSvfloC/TuLR8AtrQXz0c+mE+nrcZP8UbJYbYbx4Dhk7U Nl476GMhQ9kozYYv1fiEgeNu3yc90xkR1jzoshkQByJQ0HrRYrB7bWd9a2kDDDfu4Z95Yz 9WUHLTT5z1bzaKn3TSt1IIS0a/76DP2U5Vz8jG34uEvdWPsBcMOBXnuxw1rwzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e0cee46f5800071c105955c530ae91afa2cca002 commit e0cee46f5800071c105955c530ae91afa2cca002 Author: Mark Johnston AuthorDate: 2021-11-15 17:41:24 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 14:17:08 +0000 amd64: Initialize kernel_pmap's active CPU set to all_cpus This is in preference to simply filling the cpuset, and allows the conditional in pmap_invalidate_cpu_mask() to be elided. Also export pmap_invalidate_cpu_mask() outside of pmap.c for use in a subsequent commit. Suggested by: kib Reviewed by: alc, kib Tested by: pho Sponsored by: The FreeBSD Foundation (cherry picked from commit 71e6e9da225aede95f6813a0fcf886538d0da9fe) --- sys/amd64/amd64/pmap.c | 22 ++++++++++++++-------- sys/amd64/include/pmap.h | 6 ++++++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 524b40ed2fee..986a1b670d60 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1924,11 +1924,16 @@ pmap_bootstrap(vm_paddr_t *firstaddr) kernel_pmap->pm_pmltop = kernel_pml4; kernel_pmap->pm_cr3 = KPML4phys; kernel_pmap->pm_ucr3 = PMAP_NO_CR3; - CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); kernel_pmap->pm_stats.resident_count = res; kernel_pmap->pm_flags = pmap_flags; + /* + * The kernel pmap is always active on all CPUs. Once CPUs are + * enumerated, the mask will be set equal to all_cpus. + */ + CPU_FILL(&kernel_pmap->pm_active); + /* * Initialize the TLB invalidations generation number lock. */ @@ -2968,12 +2973,6 @@ pmap_invalidate_ept(pmap_t pmap) smr_wait(pmap->pm_eptsmr, goal); } -static cpuset_t -pmap_invalidate_cpu_mask(pmap_t pmap) -{ - return (pmap == kernel_pmap ? all_cpus : pmap->pm_active); -} - static inline void pmap_invalidate_preipi_pcid(pmap_t pmap) { @@ -10808,7 +10807,14 @@ pmap_pti_init(void) pti_finalized = true; VM_OBJECT_WUNLOCK(pti_obj); } -SYSINIT(pmap_pti, SI_SUB_CPU + 1, SI_ORDER_ANY, pmap_pti_init, NULL); + +static void +pmap_cpu_init(void *arg __unused) +{ + CPU_COPY(&all_cpus, &kernel_pmap->pm_active); + pmap_pti_init(); +} +SYSINIT(pmap_cpu, SI_SUB_CPU + 1, SI_ORDER_ANY, pmap_cpu_init, NULL); static pdp_entry_t * pmap_pti_pdpe(vm_offset_t va) diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index bd6a8c006813..14ff4cf3cde9 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -535,6 +535,12 @@ void pmap_kasan_enter(vm_offset_t); void pmap_kmsan_enter(vm_offset_t); #endif +static __inline cpuset_t +pmap_invalidate_cpu_mask(pmap_t pmap) +{ + return (pmap->pm_active); +} + #endif /* _KERNEL */ /* Return various clipped indexes for a given VA */ From nobody Mon Nov 29 14:21:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CF46518B0C61; Mon, 29 Nov 2021 14:21:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2nb96st0z3hPY; Mon, 29 Nov 2021 14:21:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9923923DE5; Mon, 29 Nov 2021 14:21: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 1ATELPrX056221; Mon, 29 Nov 2021 14:21:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATELPfM056220; Mon, 29 Nov 2021 14:21:25 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:21:25 GMT Message-Id: <202111291421.1ATELPfM056220@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: f47775628333 - stable/12 - Fix segment size in compressing core dumps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: f4777562833311b5b4c99e5dda8d50d91a514bf0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638195686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5eb4MFMjfQH6P187nu1KyzwAqn3Q6A+BvTGoqKvXQ0E=; b=Ad6zY3+KfFIAUXT7qw/nF2FExaglSjV5u9Ncn5R0q7txrVmwExxr6AAPRBlP4taFGPhsrF t7wgyswvSG/4qU+B/NTUpLepMMomEdeSg7+Uk10jmyIp9iHla/MI6JU4bBNkuTANE+QpH+ GtdmRxcVXKego82EQSw0HrqtFA6dxNBZbTQHDycbbA5CWZ2yugMwrFrnUCLi4GtoK1iQQM p/n8NAFU3MTXvyDbzC2CHXAX4L/531TfP76obTKTwHJ2ysIIlXIfBFGTl3Pstr5QNb4Hl9 GktChkZlCypzI+Hvpbja7IIE5AMJCLHfqbW8kN21tpBlTAZRQ+aG2otG04VZ4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638195686; a=rsa-sha256; cv=none; b=QBzlY7NDBjpeAEs0NP9p4UvqtVR1y1QGIPDLdmQs2qGjBAfBJN5+ugqdZvUxDHR5So0e+t txKM0KIl2YDqIgMyL/PsDJCNTdbbK3M76qza3zqzVG5DRBKTwjv7oiMJYJytPcSRsv61aw S4gSYKtO9roLzddYLLZGvA2/l8Z8uqKhn6BmZsW6moR6GEQbsfawsqAEWn+VO2uEeESfH5 B1AWdm6h0AeXHdVOtCeowAkAeScVpD54IxgPGt2PCSKtmQedIvLRC+AUqB+wxcCT/Flgoe ca6r+NtFk+LL0wxgO0R86cN9WjeLP+cV14sd61O3f3Y4xqN1MFvsb8cjfEd0ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f4777562833311b5b4c99e5dda8d50d91a514bf0 commit f4777562833311b5b4c99e5dda8d50d91a514bf0 Author: Justin Hibbits AuthorDate: 2021-10-01 18:39:18 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 14:21:19 +0000 Fix segment size in compressing core dumps A core segment is bounded in size only by memory size. On 64-bit architectures this means a segment can be much larger than 4GB. However, compress_chunk() takes only a u_int, clamping segment size to 4GB-1, resulting in a truncated core. Everything else, including the compressor internally, uses size_t, so use size_t at the boundary here. This dates back to the original refactor back in 2015 (r279801 / aa14e9b7). PR: 260006 Sponsored by: Juniper Networks, Inc. (cherry picked from commit 63cb9308a75b99fe057409705bc1b2ac0293f578) --- sys/kern/imgact_elf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 416de09630ae..c056cfcec8e0 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1473,9 +1473,9 @@ static void note_procstat_vmmap(void *, struct sbuf *, size_t *); * Write out a core segment to the compression stream. */ static int -compress_chunk(struct coredump_params *p, char *base, char *buf, u_int len) +compress_chunk(struct coredump_params *p, char *base, char *buf, size_t len) { - u_int chunk_len; + size_t chunk_len; int error; while (len > 0) { From nobody Mon Nov 29 14:28:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1D5AC18B5E9D; Mon, 29 Nov 2021 14:28: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 4J2nkt5vykz3n8y; Mon, 29 Nov 2021 14:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC8692401A; Mon, 29 Nov 2021 14:28: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 1ATES61M059280; Mon, 29 Nov 2021 14:28:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATES6AA059279; Mon, 29 Nov 2021 14:28:06 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:28:06 GMT Message-Id: <202111291428.1ATES6AA059279@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: 4022f3eec404 - stable/13 - cddl: fix missing ZFS library 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4022f3eec40406dbd702d380ba27c875caf81e57 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638196086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jQhhBj7pVeHeeMiVUfUVCsKFt/o6IRbEAPgLNya9SFU=; b=Zs04u/Q75bRn51BWECEnj0aeQtXoAXiI0I49cs4xqmFQlqcxUW1f77RD2M1q+0cMzbUTXj 6JQak9zuHk32yfS+ien+2VeRQqTMDyE2ahppKjsCcKA3+pFBbNOHtNozt/OLewONkL3Xhn WE8bj1536CXObwhoLyjPgB0qIm22D4Pz+UDVykT67+GM4YPBuAOFNVZNUdUirGTKEcpp+q fay87hSdMC+ggvtklXKYRvAjHk4t1IGW8qsrXVQEMgBFqMtuc8du4b3um2k0Nmt19e/Ar7 Xu//0NYtb/VRylNezuXQ6wNd/PrfAS8ODMt0MAgvr7yxBCur/QyesUCzsBOvIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638196086; a=rsa-sha256; cv=none; b=Ni1/bJ4gL578eBg+3s2sDC90mPAx1CHzF+LZU5605ecsk5lOZYdBdi33FktYQbqYkhqAOu XnYaEcPiqsnorz0sA/DH3x4GCQntI4/9rUqi4/eSap27tNgIdOegSo4h5ygGnKp7Fhz5zS Q0hWO6EGsbfJxj7+Cv+PUn20R/MS79W6MMgN+Ad9qcZD3jR/Ic9Dhkkgwiqll1EC79+GYL Iw2BpGkqpalvRMCuOpedzY+lespfqZGoPK343Uv1tfOhrp7Fwc04tVBgDfBuW0qsgyxdez Yr6rBBJXTAMOKdynWR43jAG1CWlVTNuQ68oW6r39gXzBao4p/56BHr2X2dzOcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4022f3eec40406dbd702d380ba27c875caf81e57 commit 4022f3eec40406dbd702d380ba27c875caf81e57 Author: Greg V AuthorDate: 2021-10-16 16:29:28 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 14:26:35 +0000 cddl: fix missing ZFS library dependencies In 9fae47666 zfsd got a libspl dependency to avoid undefined references. However that workaround did not help external consumers of libzfs_core. Fix all missing dependencies lld 13 and the rtld complain about. Reviewed by: freqlabs, markj (cherry picked from commit 9e9c651caceb9ecd17131e8bb29791ba4cf1cec7) --- Makefile.inc1 | 8 ++++++-- cddl/lib/Makefile | 4 +++- cddl/lib/libavl/Makefile | 1 + cddl/lib/libnvpair/Makefile | 1 + cddl/lib/libzfs_core/Makefile | 2 +- cddl/lib/libzutil/Makefile | 2 +- cddl/usr.sbin/zfsd/Makefile.common | 2 +- share/mk/src.libnames.mk | 6 ++++-- 8 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 4439b9ef67d4..34bb10e6925f 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3006,11 +3006,15 @@ _cddl_lib_libzfs_core= cddl/lib/libzfs_core _cddl_lib_libzfs= cddl/lib/libzfs _cddl_lib_libzfsbootenv= cddl/lib/libzfsbootenv +cddl/lib/libavl__L: cddl/lib/libspl__L + +cddl/lib/libnvpair__L: cddl/lib/libspl__L + cddl/lib/libtpool__L: cddl/lib/libspl__L -cddl/lib/libzutil__L: cddl/lib/libavl__L cddl/lib/libtpool__L +cddl/lib/libzutil__L: cddl/lib/libavl__L lib/libgeom__L lib/msun__L cddl/lib/libtpool__L -cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L +cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L cddl/lib/libspl__L cddl/lib/libzutil__L cddl/lib/libzfs__L: cddl/lib/libzfs_core__L lib/msun__L lib/libutil__L cddl/lib/libzfs__L: lib/libthr__L lib/libmd__L lib/libz__L cddl/lib/libumem__L diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile index ae6862f70443..5ca0d56b291a 100644 --- a/cddl/lib/Makefile +++ b/cddl/lib/Makefile @@ -36,11 +36,13 @@ _pam_zfs_key= pam_zfs_key .endif .endif +SUBDIR_DEPEND_libavl= libspl SUBDIR_DEPEND_libctf= libspl SUBDIR_DEPEND_libdtrace= libctf +SUBDIR_DEPEND_libnvpair= libspl SUBDIR_DEPEND_libtpool= libspl SUBDIR_DEPEND_libuutil= libavl libspl -SUBDIR_DEPEND_libzfs_core= libnvpair +SUBDIR_DEPEND_libzfs_core= libnvpair libspl libzutil SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core libzutil SUBDIR_DEPEND_libzpool= libavl libnvpair libumem libicp SUBDIR_DEPEND_libzutil= libavl libtpool diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile index 2f7b9ad30856..b5e3b458f982 100644 --- a/cddl/lib/libavl/Makefile +++ b/cddl/lib/libavl/Makefile @@ -4,6 +4,7 @@ PACKAGE= runtime LIB= avl +LIBADD= spl SRCS= avl.c WARNS?= 3 CFLAGS+= -DIN_BASE diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile index 670253eff7c1..aaf76ed3fb28 100644 --- a/cddl/lib/libnvpair/Makefile +++ b/cddl/lib/libnvpair/Makefile @@ -4,6 +4,7 @@ .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libnvpair LIB= nvpair +LIBADD= spl PACKAGE= runtime # user diff --git a/cddl/lib/libzfs_core/Makefile b/cddl/lib/libzfs_core/Makefile index 52747bfcc2d8..6350990064f7 100644 --- a/cddl/lib/libzfs_core/Makefile +++ b/cddl/lib/libzfs_core/Makefile @@ -5,7 +5,7 @@ LIB= zfs_core -LIBADD= nvpair +LIBADD= nvpair spl zutil PACKAGE= runtime INCS= libzfs_core.h diff --git a/cddl/lib/libzutil/Makefile b/cddl/lib/libzutil/Makefile index 7aea9da14e90..b2677eb3f8ae 100644 --- a/cddl/lib/libzutil/Makefile +++ b/cddl/lib/libzutil/Makefile @@ -5,7 +5,7 @@ .PATH: ${SRCTOP}/sys/contrib/openzfs/module/os/freebsd/zfs LIB= zutil -LIBADD= avl tpool +LIBADD= avl geom m tpool PACKAGE= runtime INCS = zutil_import.h diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common index c18c796ce0ed..5e9257d7b37e 100644 --- a/cddl/usr.sbin/zfsd/Makefile.common +++ b/cddl/usr.sbin/zfsd/Makefile.common @@ -26,7 +26,7 @@ CFLAGS+= -I${SRCTOP}/cddl/usr.sbin # use issetugid(2) CFLAGS+= -D_MACHINE_FLOAT_H_ -DHAVE_ISSETUGID -LIBADD+= devdctl zfs zfs_core util geom bsdxml sbuf nvpair avl spl uutil zutil +LIBADD+= devdctl zfs util geom bsdxml sbuf nvpair avl uutil zutil cscope: find ${.CURDIR} -type f -a \( -name "*.[ch]" -o -name "*.cc" \) \ diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index c4d7ad8e2fcc..ae28000ca7f6 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -256,6 +256,7 @@ LIBVERIEXEC?= ${LIBVERIEXECDIR}/libveriexec.a _DP_80211= sbuf bsdxml _DP_9p= sbuf _DP_archive= z bz2 lzma bsdxml zstd +_DP_avl= spl _DP_zstd= pthread .if ${MK_BLACKLIST} != "no" _DP_blacklist+= pthread @@ -378,6 +379,7 @@ _DP_c+= ssp_nonshared _DP_stats= sbuf pthread _DP_stdthreads= pthread _DP_tacplus= md +_DP_nvpair= spl _DP_panelw= ncursesw _DP_rpcsec_gss= gssapi _DP_smb= kiconv @@ -389,9 +391,9 @@ _DP_uutil= avl spl _DP_zfs= md pthread umem util uutil m avl bsdxml crypto geom nvpair \ z zfs_core zutil _DP_zfsbootenv= zfs nvpair -_DP_zfs_core= nvpair +_DP_zfs_core= nvpair spl zutil _DP_zpool= md pthread z icp spl nvpair avl umem -_DP_zutil= avl tpool +_DP_zutil= avl geom m tpool _DP_be= zfs spl nvpair zfsbootenv _DP_netmap= _DP_ifconfig= m From nobody Mon Nov 29 14:28:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CD59A18B5CD2; Mon, 29 Nov 2021 14:28: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 4J2nkw0rgxz3n1k; Mon, 29 Nov 2021 14:28:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE6F624104; Mon, 29 Nov 2021 14:28: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 1ATES7VA059311; Mon, 29 Nov 2021 14:28:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATES7X4059310; Mon, 29 Nov 2021 14:28:07 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:28:07 GMT Message-Id: <202111291428.1ATES7X4059310@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: d364adc09c05 - stable/13 - Hoist cddl prebuild lib dependency definitions out of a MK_ZFS block List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d364adc09c058ee838eef849072193b05d625f8b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638196088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TZBiAQFggHn1y6IktFMDQySeRpnCSCMkBVQhzoYntCA=; b=lYmTSusuzjHE0xhIMQLceHD0NC/5We6jCPktpnjkKjgCdN7ZAFRyOIm4jJQes2IAZJBXkd 3A9ChsGG3u/t091zuVR+RlqnwKEnqoZHd2FU2tQ4T7ULh6dOVwFlZ7aSvAFaYs7Z2FUb10 3i9pJG+t9SQncHci61mdzgwb1+C3EMPmjQ1gzDmtch7AzLA7dswlFqFGyL+uZP0HAO/5Xk hQ3uoxHNr/2frcIggNMXAVFaZ5pwxQXHPXOWGaSWD2EdIR7AEgsNFdQqwJ2CGxOfyIWCJh dvms4Fw+vtzTaKj2aYcrbd1n+fC4Che8c4JYCaZ1+REzeEGp2iYgmr8UpwrR0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638196088; a=rsa-sha256; cv=none; b=Rbznh+aokJoptXIDB7f9JraQeAP0HI6hTt2NVcp0/Q+s+az5alGOo4B9gv1dYkeaSBPiB1 89YjNfBQoepVY1nmMrQ9ZC5rEuYuPLhXNGewmYNGXqObfdVVjGbfrWg6G77LhOCerFTm/J HWBkzdFQwUBHShIvYmut02xnqtuuRivzKjF8IUBDGQOQHegCvnKBGelpoVl2EPmy65Cqpp R9zPm6Ho5H4/KAEzTOsSCVTm90/i9BiSHr+uOK4ZudDzQc/TwXcAkpBPWhwsQwEaKAAyAm ojCeJz9nMY9UTq/kuQ+JLSS83QHhJDHJ3R8xWCmf232r3O3YUNX05JdXr4Cfeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d364adc09c058ee838eef849072193b05d625f8b commit d364adc09c058ee838eef849072193b05d625f8b Author: Mark Johnston AuthorDate: 2021-11-26 14:27:19 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 14:27:49 +0000 Hoist cddl prebuild lib dependency definitions out of a MK_ZFS block The compilation of several libraries under cddl/lib is not conditional on MK_ZFS = "yes", so their dependency on libspl is not conditional either. Unbreak buildworld when WITHOUT_ZFS is set. Reported by: bz Fixes: 9e9c651caceb ("cddl: fix missing ZFS library dependencies") (cherry picked from commit 7b3642da21cb4b1c301d8c6b6ce0847d19d8a473) --- Makefile.inc1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 34bb10e6925f..995ed7af3e4b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2995,6 +2995,8 @@ _cddl_lib_libavl= cddl/lib/libavl _cddl_lib_libuutil= cddl/lib/libuutil _cddl_lib_libspl= cddl/lib/libspl +cddl/lib/libavl__L: cddl/lib/libspl__L +cddl/lib/libnvpair__L: cddl/lib/libspl__L cddl/lib/libuutil__L: cddl/lib/libavl__L cddl/lib/libspl__L .if ${MK_ZFS} != "no" @@ -3006,10 +3008,6 @@ _cddl_lib_libzfs_core= cddl/lib/libzfs_core _cddl_lib_libzfs= cddl/lib/libzfs _cddl_lib_libzfsbootenv= cddl/lib/libzfsbootenv -cddl/lib/libavl__L: cddl/lib/libspl__L - -cddl/lib/libnvpair__L: cddl/lib/libspl__L - cddl/lib/libtpool__L: cddl/lib/libspl__L cddl/lib/libzutil__L: cddl/lib/libavl__L lib/libgeom__L lib/msun__L cddl/lib/libtpool__L From nobody Mon Nov 29 14:58:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4DCD218C4980; Mon, 29 Nov 2021 14:58: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 4J2pQT0HwZz4T8V; Mon, 29 Nov 2021 14:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF820244DC; Mon, 29 Nov 2021 14:58: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 1ATEwuiV099076; Mon, 29 Nov 2021 14:58:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATEwuUZ099075; Mon, 29 Nov 2021 14:58:56 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:58:56 GMT Message-Id: <202111291458.1ATEwuUZ099075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 60c3b9a78ae9 - stable/13 - if_gif: fix vnet shutdown panic List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 60c3b9a78ae939bf705da2f22ae36a926f28ec8b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638197937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y6nvvBGo+gAm5glI+n/VouR1BObT+aTZZ84uz6JydzQ=; b=vJ6Pfa7P67J2KXIDBD5+3Cu4j+swZga2g7fQQEqoD3U2GUJzLJjT07JtmdgF/BkEHEYUwA 9UFaFL5wTKK+zExQWJ1UNSTtjwXqBX/zSdyYB1wcvH43UGP62BJPGF/zHSZNQtxI8CNlC/ ZVQU/BkBUTqN6cAX5eA+5GEeoF/emBfbJUisOb+DBnBCPvepPX/u2kRGdGmR+1l2q/s+v0 /gTh3ORRCDeIoDuHYvx4Vk7sGuS3a7YUfv5EDKlwYKP0cAjCjr6GMqXltO4WJfA1znFB5D t8nmKywD0nKm1YRNYdHvGQqfSB9KXaqHkgGjYb3QN8M/Jf7GL6zC48iv7vBoPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638197937; a=rsa-sha256; cv=none; b=LaAS54YlVbAgXbFVxXHfTUeGX6LTZGJo+y214f7j7oVFrsWG/mUoPX6gRDLeStzvFgTpM6 5F7sY2FsEWxNGP3u7HekDiXhTLCwf4Pxz46dmQEZIBlrog2AiB1z2q1SzysUDE1Jod/2gK 0wYkHf2Z0lO/Ssz/zgryWM8gK1cQ/XieO7oaDWhMswaIbEwoeVMYbxjsD+2wUbgCO9dL4f YIBcU+4aE3idDAMP5GWLrRV0NjQl6ZygPc5bqXxj7LK7SQBlHPG3qoWCrTVLkXCXVSL5Kg Mlfaz88Fn1pyNjsEjhml7pfLkuMXXXroSbzS6CpUKgqlHckvotnET7Nx1axNgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=60c3b9a78ae939bf705da2f22ae36a926f28ec8b commit 60c3b9a78ae939bf705da2f22ae36a926f28ec8b Author: Kristof Provost AuthorDate: 2021-11-04 17:05:58 +0000 Commit: Kristof Provost CommitDate: 2021-11-29 14:44:39 +0000 if_gif: fix vnet shutdown panic If an if_gif exists and has an address assigned inside a vnet when the vnet is shut down we failed to clean up the address, leading to a panic when we ip_destroy() and the V_in_ifaddrhashtbl is not empty. This happens because of the VNET_SYS(UN)INIT order, which means we destroy the if_gif interface before the addresses can be purged (and if_detach() does not remove addresses, it assumes this will be done by the stack teardown code). Set subsystem SI_SUB_PSEUDO just like if_bridge so the cleanup operations happen in the correct order. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32835 (cherry picked from commit 8ca6c11a7cf834721c03cbe1a1aab0a17bae4d4d) --- sys/net/if_gif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 796f427e356b..ea4b80690e50 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -214,7 +214,7 @@ vnet_gif_init(const void *unused __unused) in6_gif_init(); #endif } -VNET_SYSINIT(vnet_gif_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, +VNET_SYSINIT(vnet_gif_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_gif_init, NULL); static void @@ -229,7 +229,7 @@ vnet_gif_uninit(const void *unused __unused) in6_gif_uninit(); #endif } -VNET_SYSUNINIT(vnet_gif_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, +VNET_SYSUNINIT(vnet_gif_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_gif_uninit, NULL); static int From nobody Mon Nov 29 14:58:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 97D2C18C490D; Mon, 29 Nov 2021 14:58: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 4J2pQV1QC9z4TMp; Mon, 29 Nov 2021 14:58:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 06C30245E7; Mon, 29 Nov 2021 14:58: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 1ATEwvoI099132; Mon, 29 Nov 2021 14:58:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATEwvp7099131; Mon, 29 Nov 2021 14:58:57 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:58:57 GMT Message-Id: <202111291458.1ATEwvp7099131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 9bb3c824f523 - stable/13 - net tests: basic if_gif(4) test case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9bb3c824f523fb9f1ea09fb88651a974a27cda31 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638197938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4hVKmbevwEfsXe8xDH4Y05d4VFDkUIINjZYfnGXnJNk=; b=X0Z4xGOkIA9jjY52O2BszFKd/n7LM6IFuc7a2HQ2CvAuWgrFGSo278424OtSgyQxy+7vuM tr+pIjy0PRhWRld2SMH3Yjta0uYsdaJklFwybu7Q11UFX/ZYViMrH2AeVmR52DQHGLEfRo GUHZ/pmeryoxCKs85lWmMEWB8viMuyzSZyUu568na62d7Wf6dfIIgEUW1W8hTiGzAoGlZw s9gpPdKLt+Qwnx/CI8s2un35gPlPT7DPhxBuKUBcHm/B7y6nLi/9xMmk4dl/OzmLDg6GXx z5WPYtShbTPsZTRD94HS8MSWGKleO3XE8/wAcM6ddCbCBaOKUrb9UcXtotgoDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638197938; a=rsa-sha256; cv=none; b=f0LNrHBJq6tf13+/4x5tI0b1xYHa9BNMp0WDuu6QnGm7Dt1QbHvU9AbsyEpr7uFGmsM5U6 ssik0atKePL3b2xpJH4lU04cEW0h0rjqJhEkcP8VOmyt0o28x0bljf4wzOmC+N14owH9jZ ToaNSZXWerF3DBkexzFDlqDkLFqsCZ6kLm8Bp4yDLdKe4FTS6+2MtIjtuwe5XX9qugfH3T FbtWxG5y8QPp/EkKLJB4LWsS3kewydkUmwfHsfHohcM4J+qWhc8Y9x9GBhO+QVEYpmpvMV MIZi7rhOS2d6KglawadIFbNAfsgfkdUF9+4ro5yGY73tTlbdNBJ3V0p8aRXBNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9bb3c824f523fb9f1ea09fb88651a974a27cda31 commit 9bb3c824f523fb9f1ea09fb88651a974a27cda31 Author: Kristof Provost AuthorDate: 2021-11-04 16:15:19 +0000 Commit: Kristof Provost CommitDate: 2021-11-29 14:44:40 +0000 net tests: basic if_gif(4) test case MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32836 (cherry picked from commit 6e0755b37b20f776c7a9ac7a720db1af13966717) --- tests/sys/net/Makefile | 1 + tests/sys/net/if_gif.sh | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/tests/sys/net/Makefile b/tests/sys/net/Makefile index 4771040816b7..9ff2b8c775b5 100644 --- a/tests/sys/net/Makefile +++ b/tests/sys/net/Makefile @@ -9,6 +9,7 @@ ATF_TESTS_C+= if_epair ATF_TESTS_SH+= if_bridge_test TEST_METADATA.if_bridge_test+= required_programs="python" ATF_TESTS_SH+= if_clone_test +ATF_TESTS_SH+= if_gif ATF_TESTS_SH+= if_lagg_test ATF_TESTS_SH+= if_tun_test ATF_TESTS_SH+= if_vlan diff --git a/tests/sys/net/if_gif.sh b/tests/sys/net/if_gif.sh new file mode 100644 index 000000000000..e4cf3722565a --- /dev/null +++ b/tests/sys/net/if_gif.sh @@ -0,0 +1,77 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/../common/vnet.subr + +atf_test_case "basic" "cleanup" +basic_head() +{ + atf_set descr 'Basic gif(4) test' + atf_set require.user root +} + +basic_body() +{ + vnet_init + if ! kldstat -q -m if_gif; then + atf_skip "This test requires if_gif" + fi + + epair=$(vnet_mkepair) + + vnet_mkjail one ${epair}a + jexec one ifconfig ${epair}a 192.0.2.1/24 up + gone=$(jexec one ifconfig gif create) + jexec one ifconfig $gone tunnel 192.0.2.1 192.0.2.2 + jexec one ifconfig $gone inet 198.51.100.1/24 198.51.100.2 up + + vnet_mkjail two ${epair}b + jexec two ifconfig ${epair}b 192.0.2.2/24 up + gtwo=$(jexec two ifconfig gif create) + jexec two ifconfig $gtwo tunnel 192.0.2.2 192.0.2.1 + jexec two ifconfig $gtwo inet 198.51.100.2/24 198.51.100.1 up + + # Sanity check + atf_check -s exit:0 -o ignore \ + jexec one ping -c 1 192.0.2.2 + + # Tunnel test + atf_check -s exit:0 -o ignore \ + jexec one ping -c 1 198.51.100.2 + atf_check -s exit:0 -o ignore \ + jexec two ping -c 1 198.51.100.1 +} + +basic_cleanup() +{ + vnet_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "basic" +} From nobody Mon Nov 29 14:58:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 876C118C4777; Mon, 29 Nov 2021 14:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2pQV45Z6z4T8b; Mon, 29 Nov 2021 14:58:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 278F62462C; Mon, 29 Nov 2021 14:58: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 1ATEww7w099183; Mon, 29 Nov 2021 14:58:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATEwwve099182; Mon, 29 Nov 2021 14:58:58 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:58:58 GMT Message-Id: <202111291458.1ATEwwve099182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: b4a51fd9c124 - stable/12 - if_gif: fix vnet shutdown panic List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b4a51fd9c12493e9e7ca6e2ac572ec41d99a941c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638197939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=odeC/Xq9WSmf+IC2AE1HmeRQK6akJCSCOGEespCNuDk=; b=sEQLP1Fu7G93ksmfvKk+n9nVQU9bgLvCg/dDRhLzp+gdlnTBGIlgtKmu4NpswO+npE20DD oqj/pN8LwotMWHbBztGHd961IdyKR1DaoCgexS6Cs3nY3zsapMPaYXarIZ0liVGJ5oHgxi McDPmo+Ni3H83cMMC4MixR3EUp4mR7lfTPAK4NK5XCrOzZFI1Mj2/nEp+F6rSRH9CGJupI AKG0c0ZcLbUe9cTjhlAiz1a1ThqJF3mtbYgnZUyHAy673iwZQjdxR/j0mHz0emhe4/AJrP xu0SckRBAz1/oYKnHw7p6S6OUHLJ8OHXxJIyxFXT2d1xInv4OZIQbPJCwKbBvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638197939; a=rsa-sha256; cv=none; b=MB+lpfvYcbZ28PPBMmkalnwWKZpC2Q4VS3eb4hwlNHUyvlwA/Hy+ZnnbOcuPS7nK0fgssJ Jr0RqXrVnFAKVHbzgcnh6p5P03WDz2Ygn/HjgJTnbyeUzaBopbthktLTpPMDUfU54clE7S AyEqGg5aOVIdvLZ5w3WxftcEtVgUwuZ6oRNiO/YO9Chs2IE1mQoNMJx6wiNCgmzA6mh6u6 mO9W5LdynbGutMkBqfO8DpkuzSStLjpFduOeNrt3+ey/IH1xVvmI7FRBP66tA7EDEt3Etv OXgEgUIZi1TsP8iGpC5MVmG8TGWuaZGkvyuPJ0qoSBO4OPH29G4jdaS5+uI9VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b4a51fd9c12493e9e7ca6e2ac572ec41d99a941c commit b4a51fd9c12493e9e7ca6e2ac572ec41d99a941c Author: Kristof Provost AuthorDate: 2021-11-04 17:05:58 +0000 Commit: Kristof Provost CommitDate: 2021-11-29 14:58:07 +0000 if_gif: fix vnet shutdown panic If an if_gif exists and has an address assigned inside a vnet when the vnet is shut down we failed to clean up the address, leading to a panic when we ip_destroy() and the V_in_ifaddrhashtbl is not empty. This happens because of the VNET_SYS(UN)INIT order, which means we destroy the if_gif interface before the addresses can be purged (and if_detach() does not remove addresses, it assumes this will be done by the stack teardown code). Set subsystem SI_SUB_PSEUDO just like if_bridge so the cleanup operations happen in the correct order. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32835 (cherry picked from commit 8ca6c11a7cf834721c03cbe1a1aab0a17bae4d4d) --- sys/net/if_gif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index c9ccee4c98bd..ae70cb9e7715 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -214,7 +214,7 @@ vnet_gif_init(const void *unused __unused) in6_gif_init(); #endif } -VNET_SYSINIT(vnet_gif_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, +VNET_SYSINIT(vnet_gif_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_gif_init, NULL); static void @@ -229,7 +229,7 @@ vnet_gif_uninit(const void *unused __unused) in6_gif_uninit(); #endif } -VNET_SYSUNINIT(vnet_gif_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, +VNET_SYSUNINIT(vnet_gif_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_gif_uninit, NULL); static int From nobody Mon Nov 29 14:58:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 244C318C4926; Mon, 29 Nov 2021 14:59: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 4J2pQW3wY7z4TKb; Mon, 29 Nov 2021 14:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B38624069; Mon, 29 Nov 2021 14:58: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 1ATEwxep099237; Mon, 29 Nov 2021 14:58:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATEwxRs099236; Mon, 29 Nov 2021 14:58:59 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:58:59 GMT Message-Id: <202111291458.1ATEwxRs099236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 09dfa60b58e8 - stable/12 - net tests: basic if_gif(4) test case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 09dfa60b58e8a4dcbb82e2060a1f23cadb504474 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638197939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uLIJMbyILwPe+szH+WzeiQSNBuPpxadPMZoduuTKMaY=; b=eJSOCOMbE3wVH4QTl0YNb5OZ4LJQtpwyqBCyIDOcJ93OOlV5AbPP3hNKYgbEkiTlR5HXlA g+cCVrN7y/m7Zf5BAJf3jLjjsazzY11IVUVJjspc4WbpfkewjXRCWm2M+kdRRyt3RJ5pAw EeHI+SNguqfvBWe7EjUx5k1w2HyMk4yVGb8hsvnaZ0Ng5Ay48b+vDqa1j17/RUXYilu1mE kf0jucTuRTQ35XWVZADi4R1qrBD8BEUskPpnKSwv4KHHVQfqxOQXDilV1rMJMRMJbMAb4/ oLzQMZOTqC+7dI11lIrPrSKl741ehzDgiuyysuDABqEZEUqgr5/4FleEYfzMrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638197939; a=rsa-sha256; cv=none; b=uSwrrl4Kj0J0phOnHjuA8a5efYYHWgimpuBf9ko/MzIzoprRKN7aVonVqHSDf44GVDrgl3 N2JkRceFGulYSsf6U84yn8WPVoIu4xeLJXKlto7Wgae9G/Nq8dLTDifrOiZG5qq8Ci5fzY 9CWDDmyv1knoasyJxX24b9XWFcGSiBN4Vra/UywmTP6CrHwDwoSGCHF1vv/gBAFjA6lmu7 oA21vQlwESidG7mildwWNWVYCG9SD0SoQItyYC5D1H+aQ8KB1fIJPX9vlxB25UztmyMibA 03YfJEh26hfar/nZeGZITl54x4zQWc7aQAhwM2l82AbCm4R0LNffhdoehevdKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=09dfa60b58e8a4dcbb82e2060a1f23cadb504474 commit 09dfa60b58e8a4dcbb82e2060a1f23cadb504474 Author: Kristof Provost AuthorDate: 2021-11-04 16:15:19 +0000 Commit: Kristof Provost CommitDate: 2021-11-29 14:58:07 +0000 net tests: basic if_gif(4) test case MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32836 (cherry picked from commit 6e0755b37b20f776c7a9ac7a720db1af13966717) --- tests/sys/net/Makefile | 1 + tests/sys/net/if_gif.sh | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/tests/sys/net/Makefile b/tests/sys/net/Makefile index cccabd9fc775..7340688286cc 100644 --- a/tests/sys/net/Makefile +++ b/tests/sys/net/Makefile @@ -8,6 +8,7 @@ BINDIR= ${TESTSDIR} ATF_TESTS_C+= if_epair ATF_TESTS_SH+= if_bridge_test ATF_TESTS_SH+= if_clone_test +ATF_TESTS_SH+= if_gif ATF_TESTS_SH+= if_lagg_test ATF_TESTS_SH+= if_tun_test ATF_TESTS_SH+= if_vlan diff --git a/tests/sys/net/if_gif.sh b/tests/sys/net/if_gif.sh new file mode 100644 index 000000000000..e4cf3722565a --- /dev/null +++ b/tests/sys/net/if_gif.sh @@ -0,0 +1,77 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/../common/vnet.subr + +atf_test_case "basic" "cleanup" +basic_head() +{ + atf_set descr 'Basic gif(4) test' + atf_set require.user root +} + +basic_body() +{ + vnet_init + if ! kldstat -q -m if_gif; then + atf_skip "This test requires if_gif" + fi + + epair=$(vnet_mkepair) + + vnet_mkjail one ${epair}a + jexec one ifconfig ${epair}a 192.0.2.1/24 up + gone=$(jexec one ifconfig gif create) + jexec one ifconfig $gone tunnel 192.0.2.1 192.0.2.2 + jexec one ifconfig $gone inet 198.51.100.1/24 198.51.100.2 up + + vnet_mkjail two ${epair}b + jexec two ifconfig ${epair}b 192.0.2.2/24 up + gtwo=$(jexec two ifconfig gif create) + jexec two ifconfig $gtwo tunnel 192.0.2.2 192.0.2.1 + jexec two ifconfig $gtwo inet 198.51.100.2/24 198.51.100.1 up + + # Sanity check + atf_check -s exit:0 -o ignore \ + jexec one ping -c 1 192.0.2.2 + + # Tunnel test + atf_check -s exit:0 -o ignore \ + jexec one ping -c 1 198.51.100.2 + atf_check -s exit:0 -o ignore \ + jexec two ping -c 1 198.51.100.1 +} + +basic_cleanup() +{ + vnet_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "basic" +} From nobody Mon Nov 29 15:09:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 429A018ABA1D; Mon, 29 Nov 2021 15:09: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 4J2pfl6KVlz4ZG6; Mon, 29 Nov 2021 15:09:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B15DA24997; Mon, 29 Nov 2021 15:09: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 1ATF9Zbu013199; Mon, 29 Nov 2021 15:09:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATF9Z7W013198; Mon, 29 Nov 2021 15:09:35 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:09:35 GMT Message-Id: <202111291509.1ATF9Z7W013198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: aa798fc2f17e - main - apic.4: Fix a typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa798fc2f17eea83c20c18f144fa5c07c1a9a25f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638198575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/z/GiKab1ssK16V38zh+tyDzzgGG85S8sVGHoAZgmrE=; b=EaTdAf0J0s0jUgXJmWl56wr71exuRGhhQLvxeyVL9ONrWw9SJfrgoPLGG9bp0mESKZYm6R xSlDQ7dXuUr2yPrLdSIEcRJnX9/wxD++djtPUI99c43dJ9h4SX7pMLvsJS1JcE8NzP9LBr GuM7rtwDBB5p3Cw2QLVIMpXMaDDMa77lDQz510SYMmnngWrA/zo+uVB1F3Gq6pg6+ijHkc 3Uap4wacjXr4ok4S/iShQeQ0NtO8cMSCIGCrl2SweydLGhsk6V9doazy5tG+HgOdcfr/NQ YpLPDVI7iMIAeAqNYQz2H+zrdyQS9o25XecCgzFesgE70t2mQb85OeHFxjG8Zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638198575; a=rsa-sha256; cv=none; b=xdaBsP4To+SbKa9lb90ONPof35GRgIFjpFnkhvBTgk0HV64+aDPTb0ulrdb5oaL/BVx8gq ElzND6+b7yR8PWM3Y4GWcvsVs/a22oxKYb0V7iEMVdXWSFRIAavBeCemo2nhTkJdbW8cm2 2NqgjL0ot3kisU0V45KkKglw9x/1V3ywT/9CNiiGBs7LrOAgjLO1/caromUaBWnqzQSUpf g3G0ZOWtrjd/jQqqtORAd7OglIzNvXcGCg9WovL7ho1z4fBu6dEHXEwefKt1xY7+8iJp1c ayIaqZjGBdZJujYFWacfVbC86KpTuqbXBzJ80uYCM+p4oBG9Iz+AY4V678e6Rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=aa798fc2f17eea83c20c18f144fa5c07c1a9a25f commit aa798fc2f17eea83c20c18f144fa5c07c1a9a25f Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-27 12:25:30 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-29 15:09:02 +0000 apic.4: Fix a typo MFC after: 3 days --- share/man/man4/apic.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/apic.4 b/share/man/man4/apic.4 index 02d199b17754..da9b71ef6798 100644 --- a/share/man/man4/apic.4 +++ b/share/man/man4/apic.4 @@ -39,7 +39,7 @@ kernel configuration file: .Cd "device apic" .Ed .Pp -The following tunable is settable from the +The following tunables are settable from the .Xr loader 8 : .Bl -ohang .It Va hint.apic. Ns Ar X Ns Va .clock From nobody Mon Nov 29 15:09:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 787A318AB37B; Mon, 29 Nov 2021 15:09: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 4J2pfn0SJDz4ZP2; Mon, 29 Nov 2021 15:09:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6F50246E2; Mon, 29 Nov 2021 15:09: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 1ATF9aCY013223; Mon, 29 Nov 2021 15:09:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATF9aOB013222; Mon, 29 Nov 2021 15:09:36 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:09:36 GMT Message-Id: <202111291509.1ATF9aOB013222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 5d21348dfd95 - main - rc.subr.8: Document changes to load_rc_config List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d21348dfd95bdc19290dd172c5352e3787e86a5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638198577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rdZAfPgY4zT7ENCMCeERh99DRoF2JOM0HEKupnTHvkY=; b=iSUDYaZvU2CDE8Z5rtKdr3+pmEMMwwsIL5SB5P+d8Ot2eotFJfyyjD7F4NPOBRs+n0cyR+ fX7mnWGek3eVipxGkM4hBRtebXMQZtNYzis5OduAAwe8SrkzPjOmmKoQ8Y9MxxfMHBZEbj icjNEzr19+7wDf1a48r1KG3ItD3GhCUWBfWl6OBk4b308sZu04oSqIcKepSNCkBxDUYXLi Mlu1fOpMb8o1E3c9qXJqafax0pJjABeOe4oUPa5UQObEdRjyYpU+xffNEo7pSlqevBSILU gX0sDQJyEjijb/yLXgvLfGGFDpkGFni2DRYxexgXZi4DxaxKyQPE8ujMTTVaEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638198577; a=rsa-sha256; cv=none; b=LNGYkAMZJRU3acoWrII/GOGPzxQzOJ2gPw+LPUx3mZHKC3oQMPVhs99nhX2UEhXQer6VC/ gikJ8C/sSyxKkZzPg7M3VUebg62O3nR8FqH9CN/O35Q/FXk/JOtZkdqIGv7y4fAr5v3UfG 4cOdzDub3GRP1VC0rML1CTSW63lC7/OMgva+GrWHNj6M7CZX/qVsyvxRasUq+RJOMTF+4v TYCOLdQbe6vBZ6SCL7c8v1ONM1KBuzls/s5szhjYPg+Rv377ZM1EB2xrxdfjemw1MiGo85 8dtySkG/+OqG+VQAOVBv60STNsK/o3lqK/U8ttUvd6j+R+V5A/ukP6YoXR3WpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5d21348dfd95bdc19290dd172c5352e3787e86a5 commit 5d21348dfd95bdc19290dd172c5352e3787e86a5 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-29 15:02:32 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-29 15:09:02 +0000 rc.subr.8: Document changes to load_rc_config Since e27961a496322e2590da29f3c5fe710b269e6754, load_rc_config does not require a service name as its first argument. This change was documented in the rc.subr script in 0b9c2e7ac58caac0413aa36749e4c212514d142d. Let's update the manual page as well. MFC after: 3 days --- share/man/man8/rc.subr.8 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index f522a5d162c3..14718ecf2737 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 31, 2020 +.Dd November 29, 2021 .Dt RC.SUBR 8 .Os .Sh NAME @@ -59,7 +59,7 @@ .It .Ic load_kld Oo Fl e Ar regex Oc Oo Fl m Ar module Oc Ar file .It -.Ic load_rc_config Ar name +.Ic load_rc_config Op Ar service .It .Ic load_rc_config_var Ar name Ar var .It @@ -279,14 +279,18 @@ regular expression matching the module name can be supplied via By default, the module is assumed to have the same name as .Ar file , which is not always the case. -.It Ic load_rc_config Ar name -Source in the configuration files for -.Ar name . +.It Ic load_rc_config Op Ar service +Source in the configuration file(s) for +.Ar service . +If no +.Ar service +is specified, +only the global configuration file(s) will be loaded. First, .Pa /etc/rc.conf is sourced if it has not yet been read in. Then, -.Pa /etc/rc.conf.d/ Ns Ar name +.Pa /etc/rc.conf.d/ Ns Ar service is sourced if it is an existing file. The latter may also contain other variable assignments to override .Ic run_rc_command From nobody Mon Nov 29 15:11:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2C16418AC8E5; Mon, 29 Nov 2021 15:11: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 4J2phs6PLzz4bld; Mon, 29 Nov 2021 15:11:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD65524A1E; Mon, 29 Nov 2021 15:11: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 1ATFBP8I022620; Mon, 29 Nov 2021 15:11:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFBPJc022619; Mon, 29 Nov 2021 15:11:25 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:11:25 GMT Message-Id: <202111291511.1ATFBPJc022619@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: 8f02234dbd1d - stable/13 - Don't build sanitizer runtimes under WITHOUT_CXX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8f02234dbd1d578740b08afb4a0d6b877432adc9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638198685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SjQa7YA6ps2ufo1wWXU+FSO2oMNBftLvLKn9JmruUnQ=; b=oWXmJj8GCnvJuhF18Y+fvvlmUurBiN6mck5OMwOUGx2oOUzxgk8c6bXtPSEdLbYMU9Lnvs /IemXXMzHpIDrFBz/f3bw/4U0FOfRP35Ob8xC4QY9cps6ZM+Bb7xhIvOJ/kIYw00wlrFVK XjjpkWiI+0/A/LeWvChS+qvPWmwMsTBq8v6RcN2NWA5Oei7i7vfFmOAvXd8JwXBdM5vl/o /0jVPP3wt7ACsXgg3y3yhALUvQGS+zOLqTcATeSIP97j/bZ1kTb+ZMPjI81Ds+20a2fYBM DNF1ImgCkVP5gBOuYecc4rPnkCTSOlLO0j2a97LTqWb8QVsQLA6guLt3utlCNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638198685; a=rsa-sha256; cv=none; b=IGoSY2C9a3TOSy5O0xX2QuUjkuaoogYipJtG1gV1gIzfUJ2I2XteSzQKXd2sF/qxog6wGD PjOeO/qwGtfYsLecvMQ46NOPEKLiXHOys3JMoTfYQwvJvMHpewbcmAjJZdzpFGo+AedOwv KvaGx6ha/4nh2JV6VEabMfzuc4iZFuAWN3rdQdzYqyI1dw8Fk630ijhJKoEvDFTpPbLphe 3IwA68AwJGuTovs7Ueeq2+NWC2f42p1EQ1GC5pRpKwyjG2srRj4MrPACtMVYcBuYDSRClo Ag82qe/zfoX1j5d+vwlvxXDMJiEgprMEwUfb/ormXdbkZsJjiR5DsN7evJpBEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8f02234dbd1d578740b08afb4a0d6b877432adc9 commit 8f02234dbd1d578740b08afb4a0d6b877432adc9 Author: Ed Maste AuthorDate: 2021-10-29 00:49:12 +0000 Commit: Ed Maste CommitDate: 2021-11-29 15:10:53 +0000 Don't build sanitizer runtimes under WITHOUT_CXX In the past we built the sanitizer runtimes when building Clang (and using Clang as the compiler) but 7676b388adbc changed this to be conditional only on using Clang, to make the runtimes available for external Clang. They fail to build when WITHOUT_CXX is set though, so add MK_CXX as part of the condition. Reported by: Michael Dexter, Build Option Survey Reviewed by: imp, jrtc27 Fixes: 7676b388adbc ("Always build the sanitizer runtimes...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32731 (cherry picked from commit ad09e2c8cfbc2cf6f2b8826c121d6de8b3bfe96d) --- lib/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 3c218415d9ca..f42909ec0b09 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -172,10 +172,9 @@ SUBDIR.${MK_KERBEROS_SUPPORT}+= libcom_err SUBDIR.${MK_LDNS}+= libldns SUBDIR.${MK_STATS}+= libstats -# The libraries under libclang_rt can only be built by clang, and only make -# sense to build when clang is enabled at all. Furthermore, they can only be -# built for certain architectures. -.if ${COMPILER_TYPE} == "clang" && \ +# The libraries under libclang_rt can only be built by clang and when we enable +# C++ support. Furthermore, they can only be built for certain architectures. +.if ${COMPILER_TYPE} == "clang" && ${MK_CXX} != "no" && \ (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" || \ ${MACHINE_CPUARCH} == "powerpc") From nobody Mon Nov 29 15:11:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 008FC18AC8EB; Mon, 29 Nov 2021 15:11: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 4J2phv0vXzz4bjQ; Mon, 29 Nov 2021 15:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB6792437E; Mon, 29 Nov 2021 15:11: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 1ATFBQ1n022646; Mon, 29 Nov 2021 15:11:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFBQYl022645; Mon, 29 Nov 2021 15:11:26 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:11:26 GMT Message-Id: <202111291511.1ATFBQYl022645@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: 8bb7b159b5b8 - stable/13 - src.opts.mk: Add WITHOUT_CXX 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8bb7b159b5b892ab8bf597203690434309691860 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638198687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YO7/VzWcA77lh9aUlpH/IFxfebQVn+D3b53aInrnio4=; b=Qv5N+dBhGkVhehoKha+WL9FWr/ODtrMHN1D5DLXtxH64jsTTj256uSMxGWyDhE/FEG1OvP c4r/9Raxh89WkytrPUADnZLQJaZsZuvQuMeDskhfh4oIkysEmQ5weWukyg2DgELmm2+DCi 1Np1rzMWG2ER6rIls4FbZPP7BpkcbPwo7X4xce38VSuAWB3Sg6KHUXJDE2IqsqtfQ9ze5k PWcTa1CG4dyx9kqhbroaW9VCghu+xM5fgdFibpNdz53Dl5KsRc3PaULcgjZGvqT0QQqwTb ykrWVa8LBAGQFKKxeOOYlrdqmIMov57P0IWBgGXd2HE3Mx0lOZEpKNWz3PkcdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638198687; a=rsa-sha256; cv=none; b=slm4ahZAOeq+xaECvKqoos8C/HT57d1db+n4Q8gzhbwD7ipTX51bjLaqas+UdHoeIr5HlI nWko3KFb15LNFeaUxvz1UwLULNBhiRVTWrojQc2gCrDJ/0OT/brwActIcs551nnWv8kjD9 VmFrdEnF9bin4+biNjwMxcrZ4LNLQZd5jK7vML0lp3dJkezp8IUdcBX/rxZdf/Kh1Hy+HL aE3uIkmYnzdELJ12q4tyz0mWV7zcZ66HMAvfgOgDuuOANMpxJuqcIU42mJmRNqCkPNbO/J Ykr4KBcs6wE3XlyztLdkfaohvzybh1vi7bVBy4Hgqmwb1zVGiQxa0KVKrKc22g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8bb7b159b5b892ab8bf597203690434309691860 commit 8bb7b159b5b892ab8bf597203690434309691860 Author: Ed Maste AuthorDate: 2021-10-29 01:43:33 +0000 Commit: Ed Maste CommitDate: 2021-11-29 15:10:53 +0000 src.opts.mk: Add WITHOUT_CXX dependencies OFED, OPENMP, and PMC depend on C++ support. Force them off when building WITHOUT_CXX. Reported by: Michael Dexter, Build Option Survey Reviewed by: imp, jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32730 (cherry picked from commit 0e1c864898c1803835b1be0d59342ca761051db8) --- share/mk/src.opts.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 9c1138a446ca..d692b7efe58b 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -395,6 +395,9 @@ MK_KERBEROS_SUPPORT:= no .if ${MK_CXX} == "no" MK_CLANG:= no MK_GOOGLETEST:= no +MK_OFED:= no +MK_OPENMP:= no +MK_PMC:= no MK_TESTS:= no .endif From nobody Mon Nov 29 15:11:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 87F0718AC9C3; Mon, 29 Nov 2021 15:11: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 4J2phw37h0z4bRH; Mon, 29 Nov 2021 15:11:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1368024B89; Mon, 29 Nov 2021 15:11: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 1ATFBSJ2022671; Mon, 29 Nov 2021 15:11:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFBRAx022670; Mon, 29 Nov 2021 15:11:27 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:11:27 GMT Message-Id: <202111291511.1ATFBRAx022670@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: 7cc6e39cb6a9 - stable/13 - Do not build libatf-c++ when WITHOUT_CXX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7cc6e39cb6a934dea99a6aff336b353e938fbc58 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638198688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wMpyX1/2sb1JdDyTdHHZ3To5aDkwOrlUjK7lCnL1IeE=; b=qs/DfNMUR0jz4gGye92Z8WU4T72ouvSCQs24UGFNsPAxheHnjoTybry5GVEOr2ZacMa5RB o/09DeyMsNGPeb33cA4n98nlFi9W2MOzwzMVWoZr3sLdFJ8X1bUJwJwDaFlM7xn/zuzL9Y JCJ/Pt2Z8qLJxXxl4AnxZgaKbC6cOz+twed5S5Ad1LDcdvDczO85OiIhzRO2CfS4BUlCql ITRjeXtD9zbf0S5JZ4+caBa4WInw4exeSnGwbEhVmVUmyZ/MiyoQ5gn9iXBImlA/WqoKpz yJe/8tuEUyK6yOoKl7nkBy/RlUm6XH4kpITZH1WohgQ5EOx1VDDwWisZp2KjOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638198688; a=rsa-sha256; cv=none; b=hweyWkqFjAdDd5WhMyx6wYy1hh7cDGtREJ+gddZYv4ZdYsA367zWj1gpDk+Erv6Q640fOE 7YYgcvYc1eDxwMS7IeLXTTkjS74lbqCJmPHex9m/pseiFR0/2sbG049Xu+ayZPqOmjSfL8 k5yskKKWApamOktsngP61X2s/EpO0yQnFE2qdkpbrgcE/VdkH95QaWbbvkVtMFhl9hVaur MN1dNlWxf1IZrQ3Bw294uaaYEG+19W2h3TerpEeB+APM1ue1KGHQbewh0tmXhmzyQqDMVD pCQXYf4BVjIxD8aziOdy+ltBPduIs7Je498hcXKAjK+h7oEQy106GRI5sXfUSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7cc6e39cb6a934dea99a6aff336b353e938fbc58 commit 7cc6e39cb6a934dea99a6aff336b353e938fbc58 Author: Ed Maste AuthorDate: 2021-10-29 03:01:21 +0000 Commit: Ed Maste CommitDate: 2021-11-29 15:10:53 +0000 Do not build libatf-c++ when WITHOUT_CXX libatf-c++ requires C++ support. From jrtc27: bit slightly odd this isn't gated by MK_TESTS (which itself depends on MK_CXX), but this makes sense given the current behaviour. Reported by: Michael Dexter, Build Option Survey Reviewed by: imp, jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32732 (cherry picked from commit 6ce99625ca7acecaa64723f0440007eb3f60f53d) --- lib/atf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/atf/Makefile b/lib/atf/Makefile index baadf535b424..05c7973fdc02 100644 --- a/lib/atf/Makefile +++ b/lib/atf/Makefile @@ -27,8 +27,8 @@ .include -SUBDIR= libatf-c \ - libatf-c++ \ +SUBDIR= libatf-c +SUBDIR.${MK_CXX}+= libatf-c++ SUBDIR.${MK_TESTS}+= tests From nobody Mon Nov 29 15:11:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A140818ACAC9; Mon, 29 Nov 2021 15:11: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 4J2phy4jt3z4bRT; Mon, 29 Nov 2021 15:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56290246FD; Mon, 29 Nov 2021 15:11: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 1ATFBUE9022734; Mon, 29 Nov 2021 15:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFBUis022733; Mon, 29 Nov 2021 15:11:30 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:11:30 GMT Message-Id: <202111291511.1ATFBUis022733@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: 23566768d92a - stable/13 - syslogd: fix WITHOUT_INET 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 23566768d92aed2a59d3e5d9392824cbe83b867f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638198691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e2jv/N9o25exI8oKDqJWrlHtQuOmDUuIs61whiGKIJM=; b=mE/PN04+NE9lEUcrdyeJRTbMKB/wE0E12abyUTr0SAqmCO4841Vfk+ipBW/im1EXJlrngd hZbJXvrRHAjA73ConAbonUHiY/DXwXCxa+w0Yo4J4gBHghlifAvVW/SntEsBPubJ1IS8fA KCUBzR/mEtzqsBD6Pj1d5aDzGZ9UsNIrFZ1h62Ho8CgLXt5KGvNv0Kuf0IKe4GpmnENalb RmwmIeZaG99wOZPmAAE+cHVUjP7WcU0YA/M1xRPLM515fiOSAAnIsqX/pV4z5yFcctduSc bzie9PRjzkKNZnKLcylxJeD5Ky6Ny6RVjYWWGTHm8njmFIRf9uwcAEwmPa+ycg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638198691; a=rsa-sha256; cv=none; b=RAz+qbommyknVNR2uALivbLK+gQjJPhT26JmwW4vnG3v8LsWTK9KBSZ1cCwA7uGT89QOws XcgYK9FEjgjOjA2+5P9Aj6OOgltvmjQmEOw19+AhJMKZUZG4fh5InmksnTV7Ayjso5jCkm CKoQKRZzkZBSW6PU24/ARJEQxt2RHJxXpTtS0fYCVU9WOYi3rfy8pnlEbTqqjIRTPFAJ/d vjX8UPOFlepXc5sOY2RIBd7+NwqwzWqfNLK6zbTjeLLAvZ8udRYavG3Whh2ENZhTurOrI1 qK6O01AdrGOONmfes3PrfrF9fL5jp+E3csKgo9WZnNrzDOzCR6Px5YcqdRC0Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=23566768d92aed2a59d3e5d9392824cbe83b867f commit 23566768d92aed2a59d3e5d9392824cbe83b867f Author: Artem Khramov AuthorDate: 2021-06-12 17:21:13 +0000 Commit: Ed Maste CommitDate: 2021-11-29 15:10:53 +0000 syslogd: fix WITHOUT_INET builds Since 2d82b47 syslogd can't be built with `WITHOUT_INET` or `WITHOUT_INET6` build variables set, because `iovlist_truncate` is not defined but used. This change wraps the problematic `iovlist_truncate` call within ifdef directive. It's compiled out in this situation... Pull Request: https://github.com/freebsd/freebsd-src/pull/475 Reviewed by: imp@ (commit message slightly tweaked) (cherry picked from commit f06fa6f88733d709a5f9dd3a27b1a08571e49e6b) PR: 260098 --- usr.sbin/syslogd/syslogd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index c3b8af4fa8fa..5c2555480d3f 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1861,8 +1861,10 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) dprintf("\n"); } +#if defined(INET) || defined(INET6) /* Truncate messages to maximum forward length. */ iovlist_truncate(il, MaxForwardLen); +#endif lsent = 0; for (r = f->fu_forw_addr; r; r = r->ai_next) { From nobody Mon Nov 29 15:11:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D524318AC96D; Mon, 29 Nov 2021 15:11: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 4J2phy0F01z4bRN; Mon, 29 Nov 2021 15:11:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3485F24B8A; Mon, 29 Nov 2021 15:11: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 1ATFBTSC022710; Mon, 29 Nov 2021 15:11:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFBTkg022709; Mon, 29 Nov 2021 15:11:29 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:11:29 GMT Message-Id: <202111291511.1ATFBTkg022709@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: 3c1222232251 - stable/13 - src.conf.5: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3c1222232251e4e3b8bb69434fe7f9ca41444b1d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638198690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sfWZEy4Jf3rPID369x/R3DfOcj4UtL+jYcaJEbg8w/Y=; b=TRWkuBuxm7D9RlPVWGBbHLQFEPzp/AqKm+LwItOZs3P8cRxBX8wUnjNHZyXRuY/3vKq5dB 7y04OfgOAaQK2R85f2calbEW39ypYqfuQvxIn6FkOH42t+C5BtUY+Ya8KqjYwCtooUCJC+ 4/uTBpGTLVNje5nR9kBwkJ/qkYhBDBmqO6N20CMeIE9qZEzFKw7v/sZjLxz2z2SyKRytL0 ZdxqrzfPz0FcwkhVjRbveT/W/fNmy0kxDAuO2y0VlTkJuoZLkD91Aa8yt+HDAzVzGGvxGg ywwPIC1Xp7czW83ONQP/BU6xAH4pDi4OBI3MdYmkn01zMQJHWWACoPl+92pmLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638198690; a=rsa-sha256; cv=none; b=TaDEEd41vY4ePOQr5VZjJB2M5pVLNYOsKk99j/NlSlQwx1rC/qT7kc4VQNvZ916vHaHEmg 5YcaYz75VjecIjpli0GAI/pwQDc8U1YKi11eqYlE0sYCwRB0+d5VHpjkSXUFmOZMDk87TN wtX8Jb3nFr2qP/sZr7q8JQebhbSAwbNXSbp6jqHpNODZ2yUaRNnqhJNnLrEyWmogkL4Xyp 0zZxMjTyDvzFnH1IYo3lNLyFAr94hjeEXnI4dpiS3HQt+bsxLOOfplip/H0/noXeQOHfxi hD0QIU+fRKc9F6wZuLYogSi23imTEWGxSBZdw3Wtqjl9FUiK2KSsw9fRtzX1Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3c1222232251e4e3b8bb69434fe7f9ca41444b1d commit 3c1222232251e4e3b8bb69434fe7f9ca41444b1d Author: Ed Maste AuthorDate: 2021-11-29 14:16:17 +0000 Commit: Ed Maste CommitDate: 2021-11-29 15:10:53 +0000 src.conf.5: regen --- share/man/man5/src.conf.5 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index eb15153b274e..2e8ec5764844 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd October 8, 2021 +.Dd November 29, 2021 .Dt SRC.CONF 5 .Os .Sh NAME @@ -393,6 +393,8 @@ When set, it enforces these options: .It .Va WITHOUT_OPENSSL .It +.Va WITHOUT_OPENSSL_KTLS +.It .Va WITHOUT_PKGBOOTSTRAP .It .Va WITHOUT_SVN @@ -456,6 +458,14 @@ When set, it enforces these options: .It .Va WITHOUT_LLVM_COV .It +.Va WITHOUT_OFED +.It +.Va WITHOUT_OFED_EXTRA +.It +.Va WITHOUT_OPENMP +.It +.Va WITHOUT_PMC +.It .Va WITHOUT_TESTS .El .It Va WITHOUT_DEBUG_FILES @@ -1296,6 +1306,8 @@ When set, it enforces these options: .It .Va WITHOUT_OPENSSH .It +.Va WITHOUT_OPENSSL_KTLS +.It .Va WITHOUT_PKGBOOTSTRAP .It .Va WITHOUT_SVN From nobody Mon Nov 29 15:14:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 75A2018AE218 for ; Mon, 29 Nov 2021 15:14:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x932.google.com (mail-ua1-x932.google.com [IPv6:2607:f8b0:4864:20::932]) (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 4J2pmh08GXz4dVh for ; Mon, 29 Nov 2021 15:14:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x932.google.com with SMTP id n6so34796738uak.1 for ; Mon, 29 Nov 2021 07:14:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S8n9hxn8USssC32kefVVFL18dF1a71HGklFq1en7Wec=; b=0j40FmkT42HsX38ofr0aWYrab+6IZIz9TbYMhU/U9gFtBsr6vYxkQEcV8foa85u0cR AitUg1gPTapG/FMnW0wya4ZKWbTzHKYDRYQgcXk7wTpsbhlnCL7oA6syEGeUJXDfDOn5 ZeiMGMRMsaFkv8IZaQmOvlw6IlK3PqTejjC8Od0v2f6Pv6x4rRy2NHLhNRoI7DJ6Zo8m 7WKkCFWJKqQEcc0/DQBFRqXQuYNI4c2qI02Gvfjxd2qL+Q4iKRMUd3/ufF00Tn9l02Sa WgdT8kGu8tGgmUtKnthpRTYb7dvzXt8nCqGo+kn0OYxjU9elVNcWOxzj/kcUTjVTJCIp d1hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=S8n9hxn8USssC32kefVVFL18dF1a71HGklFq1en7Wec=; b=ieYZtO0iqi4OacmpjdVAmvkjvuf8umC7satYJb1sNSK9rax4c3IXpDwtMnYf+i9MHD kYzZGt5GOjMmdM1VPDB5R4gF+buRZqsK1IwxHEs8MLe1JnSIniv9UP5cH9/n2vIYBdcj IHmXnSEfM7PCHBuGSEpZ+Xc5AvQ0+8nSVXugFiiMjju9CKYEcgmXCPjMlcFeMdpn1Zvb wsGd9Hs9g9nhEBUY4OZv3M20nH8y9QuD18uQAVCVs7alG4Hgm5hshVGtuGdmu9rCpfW3 6qH0aZ9/jhet6PrmD4okqj5F2fupy4n+s6XwKWK9T5lAc5OSqGiZHuIle253MkhJkqzd XGow== X-Gm-Message-State: AOAM533HD7gZeCKIB15C4JWxOK31QrfuEotOqxaGM0u+Q7lZ3wa9jhJi k4kDBbYjh5Vyxz9ajZM/DBDNaviEy9D+4ys2D4ah+Q== X-Google-Smtp-Source: ABdhPJz5XvE0C1+1oJDfty2iDc8CZlAAtLbtyu6V8cUMK/EjXgc1cIqs9fQObPzrycsmWO8kcQEIKEE9ZKOfpHUYH5w= X-Received: by 2002:a67:f912:: with SMTP id t18mr33736028vsq.6.1638198883406; Mon, 29 Nov 2021 07:14: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 References: <202111051525.1A5FPgwj073325@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 29 Nov 2021 08:14:37 -0700 Message-ID: Subject: Re: git: d836c48e7110 - main - cam_periph: wired is really a bool, update it to a bool. To: Mateusz Guzik Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000846aab05d1eee668" X-Rspamd-Queue-Id: 4J2pmh08GXz4dVh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000846aab05d1eee668 Content-Type: text/plain; charset="UTF-8" On Mon, Nov 29, 2021 at 6:21 AM Mateusz Guzik wrote: > On 11/5/21, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > > > https://cgit.FreeBSD.org/src/commit/?id=d836c48e7110f2894885cf84ce8990f7916663cc > > > > commit d836c48e7110f2894885cf84ce8990f7916663cc > > Author: Warner Losh > > AuthorDate: 2021-11-05 14:56:48 +0000 > > Commit: Warner Losh > > CommitDate: 2021-11-05 14:56:48 +0000 > > > > cam_periph: wired is really a bool, update it to a bool. > > > > Sponsored by: Netflix > > Reviewed by: scottl > > Differential Revision: https://reviews.freebsd.org/D32823 > > --- > > sys/cam/cam_periph.c | 25 +++++++++++++------------ > > 1 file changed, 13 insertions(+), 12 deletions(-) > > > > diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c > > index bb4baaf0888f..54fe9a0ef40c 100644 > > --- a/sys/cam/cam_periph.c > > +++ b/sys/cam/cam_periph.c > > > @@ -600,8 +600,9 @@ static u_int > > camperiphunit(struct periph_driver *p_drv, path_id_t pathid, > > target_id_t target, lun_id_t lun, const char *sn) > > { > > + bool wired; > > u_int unit; > > - int wired, i, val, dunit; > > + int i, val, dunit; > > const char *dname, *strval; > > char pathbuf[32], *periph_name; > > > > @@ -610,29 +611,29 @@ camperiphunit(struct periph_driver *p_drv, > path_id_t > > pathid, > > unit = 0; > > i = 0; > > dname = periph_name; > > - for (wired = 0; resource_find_dev(&i, dname, &dunit, NULL, NULL) > == 0; > > - wired = 0) { > > + while (resource_find_dev(&i, dname, &dunit, NULL, NULL) == 0) { > > + wired = false; > > This has a side effect of no longer initializing wired if the first > resource_find_dev call returns != 0, which in turn causes KMSAN to > panic due to: > > unit = camperiphnextunit(p_drv, unit, wired, pathid, target, lun); > > below. > > It is unclear to me what this code should do. Plopping 'wired = > false;' upfront at least restores the previous state and prevents the > panic. > https://reviews.freebsd.org/D33163 I made this change at the last minute due to a review comment to change this to a while loop. wired should always be false unless we find something to the contrary. Plus, the old code did that as well. Taken together, the change is obvious. I never saw it on my systems because all of them wire units in different ways. > > if (resource_string_value(dname, dunit, "at", &strval) == > 0) { > > if (strcmp(strval, pathbuf) != 0) > > continue; > > - wired++; > > + wired = true; > > } > > if (resource_int_value(dname, dunit, "target", &val) == 0) > { > > if (val != target) > > continue; > > - wired++; > > + wired = true; > > } > > if (resource_int_value(dname, dunit, "lun", &val) == 0) { > > if (val != lun) > > continue; > > - wired++; > > + wired = true; > > } > > if (resource_string_value(dname, dunit, "sn", &strval) == > 0) { > > if (sn == NULL || strcmp(strval, sn) != 0) > > continue; > > - wired++; > > + wired = true; > > } > > - if (wired != 0) { > > + if (wired) { > > unit = dunit; > > break; > > } > > > > > -- > Mateusz Guzik > --000000000000846aab05d1eee668-- From nobody Mon Nov 29 15:43:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9C58418BC2F0; Mon, 29 Nov 2021 15: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 4J2qPK4kGjz4nLL; Mon, 29 Nov 2021 15:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 839012540A; Mon, 29 Nov 2021 15:43: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 1ATFh1Bi065675; Mon, 29 Nov 2021 15: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 1ATFh1R1065674; Mon, 29 Nov 2021 15:43:01 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:01 GMT Message-Id: <202111291543.1ATFh1R1065674@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: 075fa5a9a8a3 - main - libc/gen/getgrent.c: plug warnings about write-only variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 075fa5a9a8a3a140541ef07142ed5b721264c0e9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GGEPlHP75d9/R5nnEC5wM1/K4nsWJutUQfZJeMtm98g=; b=t82lv0UarbO4HH772dJdX0o6UjE2oUUsp7hEJya0gsKJyowpa1TePNRWvp9O3ma61IDXZs hXamIlCjuOAGTOKNGP642Rjuav6YywHhdV2M0g3PdmV2giR0+YPw5yNp3E98DaLB9+Uu38 0IuBahIJpgxPLpMmIkaf7sNcGnaPcscqVF71x3GLseCsMLyJ56i389mlK9QbfSQDpnkZ47 259BcGnhQpOGxJfGUAlUaIKN4WM4YiVgeo4Nq2M1hEcEEHpm03PK10pg4r5P+1+qiZS9nC fGSRENhjVg/0uLchqonvqNVhAt7vKcLINOpVJJBmlKWzZlbJAis5Ouwa/k6mKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200581; a=rsa-sha256; cv=none; b=f+uxYcu52ggmMj3gFYfAEy4zT5AlVn21X7+lxknRVfOtacap9utMwYXNB+acV7t6inTp+T 2wmIa0R9HKEHKwRMWD+hKOrcz5nokBQcWshG9MhRVvw2UDfe+MGLJXjCjfzYPTWfPhgBS/ p0yMDMOWViPivi+6i+V5MLAvs42sG+xWfwN6M4Ia7ADyymCjv73U1NzOQ3rk8Hec7gqsDc Q7id0udsSR8yQ4dfUEy9QjVzrTKXjFO6mKZaMv4eCXMAQcIBsAT8tZNJ5g3e6zpwypF8L6 Qjoso3At0d09KBjGMFjmsb6RjHGIqtDmBF8dzLMWUI6kWzLm9F6x/YvhFrwfLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=075fa5a9a8a3a140541ef07142ed5b721264c0e9 commit 075fa5a9a8a3a140541ef07142ed5b721264c0e9 Author: Konstantin Belousov AuthorDate: 2021-11-28 02:46:56 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:50 +0000 libc/gen/getgrent.c: plug warnings about write-only variables The variables clang13 complains about take the results of var_arg() calls. I decided to kept variables around, annotating their definitions with __unused, to keep clear expected types of the varargs. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/gen/getgrent.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index 5832cb8c6799..3743518c8f58 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -210,12 +210,11 @@ static int grp_marshal_func(char *buffer, size_t *buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - gid_t gid; + char *name __unused; + gid_t gid __unused; struct group *grp; - char *orig_buf; - size_t orig_buf_size; - + char *orig_buf __unused; + size_t orig_buf_size __unused; struct group new_grp; size_t desired_size, size, mem_size; char *p, **mem; @@ -305,8 +304,8 @@ static int grp_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - gid_t gid; + char *name __unused; + gid_t gid __unused; struct group *grp; char *orig_buf; size_t orig_buf_size; From nobody Mon Nov 29 15:43:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 220AF18BC3B8; Mon, 29 Nov 2021 15: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 4J2qPL5pK6z4nQh; Mon, 29 Nov 2021 15:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A698B25234; Mon, 29 Nov 2021 15: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 1ATFh2rs065699; Mon, 29 Nov 2021 15:43:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFh2ME065698; Mon, 29 Nov 2021 15:43:02 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:02 GMT Message-Id: <202111291543.1ATFh2ME065698@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: 701473ef9468 - main - libc/gen/getpwent.c: plug warnings about write-only variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 701473ef9468cf0f0482fb2c62344637dbdcce96 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aqz4mNZkrbeomIQCOOCRnob2niAJIGxQjIFiAb3deak=; b=RI5nzE26XsRsOKhTkNzPKtdxAaQhwCzHTcdRFEBrNyRRdKPpW0O9ts7Ca3altTOT5BqJ2i 2ebi0aI6R9KzLCFcFNf5Wkqkb7njFZbU6y9KSO0uZsR4HsctbFqWnNAFhR+LLBslPDlkNA rRAwUmALXCHec5DxsZillxUyFNtDyUvwJ+RA0N4bJheBwLQfrcu1XwwzstSLrKrGoG14gE H4Cre8rhWh5s1brL9x/iolop3W3IBUYq3bAYZSx2AXWHOupm9LzvIRuZ/D9PB7F3zJhlJD 6jOLb1y84r+3ep8/WEKBJae49zXauwWJRxoMyD6kzywkZQR0gYpWSIUowqZJFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200582; a=rsa-sha256; cv=none; b=j0GLccQwDVEcwDIUzW7RPeWTLqTj0/C1lN3dKLhh31VP5sHS/yur2TKraINN04YKvPG6ZJ PqXiFqtPDAWSx3EJaZ5dJLTv5LuZzRZHy0a4rUVvseJexLaOQwZKmgEwPARlxBuUTpztnx SZU/wQVs6w4pYcD2oOJJKd4rzOsC8nw/SiFpsJpU3WOo/++PbuYBrrUuhnx8O2LNMDshtr FTnoNyBZu+OrRG6jlzMFNINrAQ9rh9mv5xMpf5p2JOS2eNzdBG+FBGYy0Us9ppHUlS+g/c cdwbzXikEdNygkjz27kBpYq98qfSmC+YZRxmk29utLndN50leqjUAxtn44OmJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=701473ef9468cf0f0482fb2c62344637dbdcce96 commit 701473ef9468cf0f0482fb2c62344637dbdcce96 Author: Konstantin Belousov AuthorDate: 2021-11-28 02:50:18 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:50 +0000 libc/gen/getpwent.c: plug warnings about write-only variables Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/gen/getpwent.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index bc1d341fd3ad..634fc4fc8229 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -257,11 +257,11 @@ static int pwd_marshal_func(char *buffer, size_t *buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - uid_t uid; + char *name __unused; + uid_t uid __unused; struct passwd *pwd; - char *orig_buf; - size_t orig_buf_size; + char *orig_buf __unused; + size_t orig_buf_size __unused; struct passwd new_pwd; size_t desired_size, size; @@ -361,8 +361,8 @@ static int pwd_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - uid_t uid; + char *name __unused; + uid_t uid __unused; struct passwd *pwd; char *orig_buf; size_t orig_buf_size; From nobody Mon Nov 29 15:43:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6E9D918BC61F; Mon, 29 Nov 2021 15: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 4J2qPN54SBz4nHv; Mon, 29 Nov 2021 15:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8C1125487; Mon, 29 Nov 2021 15: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 1ATFh3cI065723; Mon, 29 Nov 2021 15: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 1ATFh3oF065722; Mon, 29 Nov 2021 15:43:03 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:03 GMT Message-Id: <202111291543.1ATFh3oF065722@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: 024547c9bd6f - main - libc/net/gethostnamadr.c: mark write-only variables as __unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 024547c9bd6f7e65d383199aab80dae08824ae48 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6dCR/7U453AzW0bWtpYyAgTjxYvdq2r53MRueewcRDs=; b=u3ntLMULshwc8Yc2qq3psHjGlXXp+xTkkRfGW9yQhP/d7yMDwTQSMtx4+r38bEYTJq1jqr 0OIZbQAVR3uQfdMxszGVZkz4xJ3NZZNTL+dEwIy0cWQq/W2NPn+cpc4G9Cp4o/fNvBdOAV YA0Qh0XyabWTA5dAgnSccqqWDvXKUtow1sBcxeC9OBQRSjKP7VNuuMZsGtRRsTtsmXZrcR Z1Wbc2RhKgdAXjQ4GDXPY5Hr/Vs4zKw/3vIbtpipfv7b9Pd2S0OYYqOYuW2zwIQYZRynAw tYyiNvWmQ7XYOW8Pbh8YpWU0gHV51Xe8drwvCUPc23saPiboUjWWzF9S7tz3qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200585; a=rsa-sha256; cv=none; b=fdVq+Vgw4U/pAAkYHHjoHhNaZuk4cbCGSjduZzOts2ab921CiS4wns5prYR/cveu3rGX8M xhsM4ZZbLHgsloB18p9nhlZ8f3H34Y62C6X/SPxtk45xUv3FcG65z5Nibq2l7/VF35nH3Y ra1kxsLnU5hvDzNOdL6meTkodMwUQwSkKAaP+86CGQdga0VngG/YNCqIkbu342mLqOAfJa GXHis1GQZvSwUBTTy/KoTU2qcBkEjz/2ISY4HQX3h9i/GcllxULpQHK+2YKIau2xl8BBqh s3wutVmoiy4vRM/UYzEpfqD+WC7KmgCInVQ4YuONuW0HE0O5/fkSt8k8/V15Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=024547c9bd6f7e65d383199aab80dae08824ae48 commit 024547c9bd6f7e65d383199aab80dae08824ae48 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:22:24 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:50 +0000 libc/net/gethostnamadr.c: mark write-only variables as __unused Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/net/gethostnamadr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index 718a64defab9..2da8024c47f4 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/lib/libc/net/gethostnamadr.c @@ -258,10 +258,10 @@ static int host_marshal_func(char *buffer, size_t *buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *str; - void *addr; - socklen_t len; - int type; + char *str __unused; + void *addr __unused; + socklen_t len __unused; + int type __unused; struct hostent *ht; struct hostent new_ht; @@ -364,10 +364,10 @@ static int host_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *str; - void *addr; - socklen_t len; - int type; + char *str __unused; + void *addr __unused; + socklen_t len __unused; + int type __unused; struct hostent *ht; char *p; From nobody Mon Nov 29 15:43:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EBCFC18BC46E; Mon, 29 Nov 2021 15: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 4J2qPQ47WFz4nLg; Mon, 29 Nov 2021 15:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBABE25235; Mon, 29 Nov 2021 15: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 1ATFh4up065747; Mon, 29 Nov 2021 15: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 1ATFh4e5065746; Mon, 29 Nov 2021 15:43:04 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:04 GMT Message-Id: <202111291543.1ATFh4e5065746@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: 1c4f305d21c0 - main - libc/net/getnetnamadr.c: Mark write-only variables as unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1c4f305d21c069ebfdab6baada0837f7ecc810ea Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iUYC49yvvZWgyMXiRNDguOVAeJRZ07y5MipvBnCgyGQ=; b=NPsOvLcLbqIsFoHmgunKeAdvFCkxBoIbz5/rk7B+gksPiz3du+37lQo5k19i3YTr8ZkOFT uqGtyblzoqKUHz+0DE7n6380jBh8QoRWVhOFKVoVa8527iZcfIE+zD1eCboz/xV/ljSaUl ZDdt8ZjxNT3I2LEVRN0ZhFvEc3NXul5VWZC6rqLoegHYQHWc+m8UugSa6wqMszgKjyOK2w mnnyGrjA/EEk4oCXadSIYiCa0tBMabiQqQ799nOjqY5BBDQ9RPhDsTLG4G0//oqKf7Bt42 8dfxs5LqaUxzoIs2drGgYWO4mPFq6E/u8ZItARqfhDxPWMsOj9avD6aBhzO+oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200587; a=rsa-sha256; cv=none; b=vjdgjxjq6ildayVEvJVq3cBNS3J/1H++pG68LqkbVyxetEE32jI9tj3/ULf+xQBPPu2gh3 CS8G8Y5cmwW40h0FQgr3EROQklVYEirq1j9uz1fCcJa689vrCysldwDDVFE5G9+pV7BAQV 98uOmbSPXPINGa+BUjmrvSm8C/Y3Pw1jOLXsPg1/rw6dkOchpwtkcMy/QQ9J8M92bDaQtq Wp3euQb+NwmFqNkz9rCIwy49PLzWLu/YyTGVzr70RdpdSam+diOHITXLSZ95qUkffz1gLs gEMHBcLUsDcLwaZybWErYNXX1SVior1y+s6y5O/LJSM4PFwd8283wqL9ev6j7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1c4f305d21c069ebfdab6baada0837f7ecc810ea commit 1c4f305d21c069ebfdab6baada0837f7ecc810ea Author: Konstantin Belousov AuthorDate: 2021-11-28 03:45:52 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:50 +0000 libc/net/getnetnamadr.c: Mark write-only variables as unused Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/net/getnetnamadr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/libc/net/getnetnamadr.c b/lib/libc/net/getnetnamadr.c index 2d9776685cf9..82ff089c1f1b 100644 --- a/lib/libc/net/getnetnamadr.c +++ b/lib/libc/net/getnetnamadr.c @@ -121,12 +121,12 @@ static int net_marshal_func(char *buffer, size_t *buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - uint32_t net; - int type; + char *name __unused; + uint32_t net __unused; + int type __unused; struct netent *ne; - char *orig_buf; - size_t orig_buf_size; + char *orig_buf __unused; + size_t orig_buf_size __unused; struct netent new_ne; size_t desired_size, size, aliases_size; @@ -210,9 +210,9 @@ static int net_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - uint32_t net; - int type; + char *name __unused; + uint32_t net __unused; + int type __unused; struct netent *ne; char *orig_buf; size_t orig_buf_size; From nobody Mon Nov 29 15:43:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7067018BC657; Mon, 29 Nov 2021 15:43: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 4J2qPR2t49z4nN9; Mon, 29 Nov 2021 15:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1213A250B4; Mon, 29 Nov 2021 15: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 1ATFh6XJ065773; Mon, 29 Nov 2021 15: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 1ATFh57e065772; Mon, 29 Nov 2021 15:43:05 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:05 GMT Message-Id: <202111291543.1ATFh57e065772@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: f6d403743c9e - main - libc/net/getprotoent.c: Mark write-only variables as unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f6d403743c9eb1facdfcc0fdfbec74fb19dbbc21 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GQhzWTODkcFPmAwyqWdXCtBG0o7je9cHP9Z8esbAqhc=; b=IVQ2mAspCvHEsxGlAYRyD1toZ7DO5N79gNEpm9qQFM3Y1mJCTqve/l5dXk4J90YLzguwL9 PfB1UM8Wf4GZQM6J0IvcL6Gk3Iz1oYOaREhRkpny9QFL83begb6+M69tJXIoXiCvCHeJw6 NOwVXW/b4C4z15hNwjU//3PyJae1t5ajlcdk59OWcZsJwxpdDQO+ne860Mc59yeX9CBtYO fDyZ4Kfyepp3JmgBqnnlDK7dJQJ3gR+XaoNIXvqA8OZvmsHc2f4qlwJTWLezBOyOj95iyJ 9BmjE+Vj8dQc3vDHYHqFf5UhZqsb5C7U7d700JooMbm0lhgC2DK9Tz7NgRIDOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200588; a=rsa-sha256; cv=none; b=X29rwLB0y2MFJrVTDEZu6GkOyHj5Cd7+EUtTTfB27Clb5CCdYC7uNM+56ZaPiFPbOtEJAM dmBotmGoSwKDwtvoBuYvlTA2lfvX9kAodYrIytqduPxGJcYiNDs42N6qMdalcFmhWSYeD4 cvQ/dhaNLexiqZwGfBzc1Sb+KrZkWdSxY4MLg6fNT6iKNXG4zyhZmckyn/j7FRuxzkHvVn rEjNrXKxlydQwhtx0FhNiV5DVBZd3rlV4odY2GijC+ovcbR7vvJYKsDD27rNCQvBySHvCU G1uJLgwmAcOf3sF5ht4HbcvjoPmOtSGgsBFWRC7JeHuwWOQlkFlpDYZ56QIIqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f6d403743c9eb1facdfcc0fdfbec74fb19dbbc21 commit f6d403743c9eb1facdfcc0fdfbec74fb19dbbc21 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:48:05 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:50 +0000 libc/net/getprotoent.c: Mark write-only variables as unused Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/net/getprotoent.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libc/net/getprotoent.c b/lib/libc/net/getprotoent.c index 73b069250499..b3bb52195dfc 100644 --- a/lib/libc/net/getprotoent.c +++ b/lib/libc/net/getprotoent.c @@ -144,11 +144,11 @@ int __proto_marshal_func(char *buffer, size_t *buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - int num; + char *name __unused; + int num __unused; struct protoent *proto; - char *orig_buf; - size_t orig_buf_size; + char *orig_buf __unused; + size_t orig_buf_size __unused; struct protoent new_proto; size_t desired_size, size, aliases_size; @@ -231,8 +231,8 @@ int __proto_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - int num; + char *name __unused; + int num __unused; struct protoent *proto; char *orig_buf; size_t orig_buf_size; From nobody Mon Nov 29 15:43:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 539D518BC6DA; Mon, 29 Nov 2021 15:43: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 4J2qPT1Rqfz4nWk; Mon, 29 Nov 2021 15:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E36E25236; Mon, 29 Nov 2021 15:43: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 1ATFh8wW065826; Mon, 29 Nov 2021 15:43:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFh8Yt065825; Mon, 29 Nov 2021 15:43:08 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:08 GMT Message-Id: <202111291543.1ATFh8Yt065825@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: 0e00befcaf66 - main - libc/net/nscachedcli.c: remove write-only variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e00befcaf6614c513fb32485ea9a2b188169bc2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LYYOqwHHigAG0LLniH3v+ncUdxjgqjZ/mBUqEQy/eXE=; b=RMlpdnldR1Ss7dhJoxYjeNT/X54+spDZhRVT7Cc4yEXYxfbcJscdF/zAVL93sCenMxgizJ 4V8/nAiPQE+WJmPJ5HLX9b7Poj4Zn5bh41feAoCq348ifuSEKncdy5udQCkjHZ6gfuoDrX xpCaG266aFo4iYDs+/POnUNbjW6UArrNjhRPWGRtBfShE1JsQFLTLPh6fWlrbRvEJSghh5 AP2NdLgSHek1AUjeUbJKlK3FbJaER+LM/EKQ/eQRdgwpNf6UvO9GjTmWr3SyQ4NVjAwTLd 3m47neaLlTUOHwoRVR2K+EPqG8TQzt9bv6qAgDcOY0yb/PljYZ316iLObKB/dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200590; a=rsa-sha256; cv=none; b=r77RTdD7jbH8L7ZX+ljUcNp9zawvbvd+dL/HQNrLIpQtUv9kKgDSwlu4azIZT6oeO9dpto X0lDROfLFIHlPzoYQp6D4/SFoCQPF7qpfZKjDRZnjUA87rg2THGMP/7ZXYkGvUbBvIrJqD frQTW/mQRDpWz9NL2FcOml5L2le2USv8v87HZJ0FwGYqCxtp49CS3+mnlvHeUTTo89lsKm no6PidS7tdnGB15GaV+zLT9rC9qZPGOnDqqc2PJpY569dRDC4hM4PphEREXu2DQIO/7h/p LxmE9HtNOuvVf+dsZlb5ariOyFuc9oHTqbJynRXK/flMBBLE9HYNBz8nJzq7Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0e00befcaf6614c513fb32485ea9a2b188169bc2 commit 0e00befcaf6614c513fb32485ea9a2b188169bc2 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:57:12 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:50 +0000 libc/net/nscachedcli.c: remove write-only variables Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/net/nscachedcli.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/libc/net/nscachedcli.c b/lib/libc/net/nscachedcli.c index 53f69dda7fbb..2acc12af2d1e 100644 --- a/lib/libc/net/nscachedcli.c +++ b/lib/libc/net/nscachedcli.c @@ -153,7 +153,6 @@ send_credentials(struct cached_connection_ *connection, int type) struct kevent eventlist; int nevents; ssize_t result; - int res; memset(&cmsg, 0, sizeof(cmsg)); cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(struct cmsgcred)); @@ -171,7 +170,7 @@ send_credentials(struct cached_connection_ *connection, int type) EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD, NOTE_LOWAT, sizeof(int), NULL); - res = _kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL); + (void)_kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL); nevents = _kevent(connection->write_queue, NULL, 0, &eventlist, 1, NULL); @@ -474,10 +473,9 @@ int __close_cached_mp_write_session(struct cached_connection_ *ws) { int notification; - int result; notification = CET_MP_WRITE_SESSION_CLOSE_NOTIFICATION; - result = safe_write(ws, ¬ification, sizeof(int)); + (void)safe_write(ws, ¬ification, sizeof(int)); __close_cached_connection(ws); return (0); } From nobody Mon Nov 29 15:43:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1C3AB18BC5F8; Mon, 29 Nov 2021 15:43: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 4J2qPR3NH4z4nR4; Mon, 29 Nov 2021 15:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B1E8250B5; Mon, 29 Nov 2021 15: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 1ATFh7jh065802; Mon, 29 Nov 2021 15: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 1ATFh7Tb065801; Mon, 29 Nov 2021 15:43:07 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:07 GMT Message-Id: <202111291543.1ATFh7Tb065801@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: 346eaa41f89a - main - libc/net/getservent.c: Mark write-only variables as unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 346eaa41f89aaf1545b89f77a88fd1cdd3c37456 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+F5W0+FDoiYQ64aNNmDi//33bfl5Q8YyY9mqe3IcBWo=; b=v/gZPUw4Ffe/JjO+ye2BFoWFxBWDdcPsDS35flq4IIZrtpnlZIfsKYGbVSZcS4DQ1+4KMQ cyBGaPcr/uLodi2jw3VWjRSLV8ecg8LUGKbEz7zy5HEoe9mDhGSKdP7lsT08F8GNvEOuMN GBKb49MgrSKPnFXY0zJFs2LaX5KY7K82kMZJinZcVO9sPHJg3PlHmoGA31XvlD5RPu5xg7 UBghfF6Y6aPJKKS4DeYZsGvCpgIE99MRSpOMsA95I6n4C6CRJ7xPf4MlEjH+2JWUpxhjEp VOan+qSbc14CQg/lIWmuWvtuuqAPUibUpWux1YvTBaz9DXyBMBKdMGCNCvBRuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200589; a=rsa-sha256; cv=none; b=T/fX9EkW51LcR47e0jRyn981aZUvDjLUcS0jvST6gwDg2KHz0LBZK9acZS9v8hXE7jeuxB QqaWplAk7zRLZD4mt9wQODtQwSW5RVWC6kKRr3N8NQzEgtUc+As+RCDXdUsCjspuODE7QH atUgTbBmGzM7BiVHi4XDtuMebACGzDIm0XZLsPN595i8BVMrKFmpYBeKSmbrhnC+DJNdbh e7X5qPTgfoamP/KvDCcx4MLbsYfGsdngeCIp+naOnSJ4X7LtsuHTUw0GTq6f4JHUgomm6R +Qq36im0yY8wl+Jrh1YGbXi6nXUp1Cra3hWIEkw+mxzW9fyfL+BImD7HHIXr0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=346eaa41f89aaf1545b89f77a88fd1cdd3c37456 commit 346eaa41f89aaf1545b89f77a88fd1cdd3c37456 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:52:33 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:50 +0000 libc/net/getservent.c: Mark write-only variables as unused Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/net/getservent.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/libc/net/getservent.c b/lib/libc/net/getservent.c index 76db40d96cf5..bcb9f8ff8b84 100644 --- a/lib/libc/net/getservent.c +++ b/lib/libc/net/getservent.c @@ -947,12 +947,12 @@ int serv_marshal_func(char *buffer, size_t *buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - char *proto; - int port; + char *name __unused; + char *proto __unused; + int port __unused; struct servent *serv; - char *orig_buf; - size_t orig_buf_size; + char *orig_buf __unused; + size_t orig_buf_size __unused; struct servent new_serv; size_t desired_size; @@ -1048,9 +1048,9 @@ int serv_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - char *proto; - int port; + char *name __unused; + char *proto __unused; + int port __unused; struct servent *serv; char *orig_buf; char *p; From nobody Mon Nov 29 15:43:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 604E618BCA91; Mon, 29 Nov 2021 15:43: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 4J2qPW3STqz4nhZ; Mon, 29 Nov 2021 15:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A441925237; Mon, 29 Nov 2021 15:43: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 1ATFhAWv065874; Mon, 29 Nov 2021 15:43:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFhAX7065873; Mon, 29 Nov 2021 15:43:10 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:10 GMT Message-Id: <202111291543.1ATFhAX7065873@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: 412fd7a34cf9 - main - setproctitle_internal(): remove kbuf local, it is write-only List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 412fd7a34cf99727f0aa5c70fd694cf06094d831 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NoERD7bjW+QQAcs45Up/7tLL/z3bFoqOapyPtXQfuCM=; b=OegUi1kYagW2Ddrh9uXG9MUMBVnAhWXykVDqTAuhxhE+Q5k6XSHIJi5WAWHpG8Iab8potT F5neRTBGqhQ6RqIDmFvvtuRmeXWcGFElnm0VoQEx6kZ1M4l2aHM7nC0OhqGuCfUKeF0OFX q6sGNoj9HtLkPBQiKpfuxGmAq3utnHbPlahSDt6kliXltX6UCnWxsE5HrhNHLxwti+7jhk KdvRY9FCAZqVAhrDlYco6U3Kfnsl7hzgJCIWm6BoNkpKCff943aCJqMVIw1nvVW3f0IrB5 bjSOGkGGID/amMo+pJ9QCC+uLQQ7OvIbN/mreQcE8nyJCqUTE4yDWedIhiY17g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200592; a=rsa-sha256; cv=none; b=hA1aYQRyjRHe1HsM2ucY3KhxzWQLchAAVBmHoqT6KucxdK2YVbxbCjP9FaKlLkltxr+ExE iIGLTZN7OaLZoA7aeXybjJcRMsUTVPaD457j4doj2uggYDmzN2oL/cDxK+NaYINSd30uhD z/iQDCeHQ0d1VXoYyNvRlov9/6IGrWqdY8iA9jf4lKu7bHRGvFEhXFKApusSGEpbej8ghv zNMB1zkxXM0UZPll+cBWjn97jASIYP+JPAYWaN8vU1d/qKidcQkzlnVcfkQWpjhnxbTzs7 IpUtixlFp6NXCOEygdmfAec1cyyaYVLXHJdxvMyQ6lC/0bn0ZllEokrviYGkKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=412fd7a34cf99727f0aa5c70fd694cf06094d831 commit 412fd7a34cf99727f0aa5c70fd694cf06094d831 Author: Konstantin Belousov AuthorDate: 2021-11-28 02:51:45 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:51 +0000 setproctitle_internal(): remove kbuf local, it is write-only Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/gen/setproctitle.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/libc/gen/setproctitle.c b/lib/libc/gen/setproctitle.c index 3f858952255c..08612e99d9bb 100644 --- a/lib/libc/gen/setproctitle.c +++ b/lib/libc/gen/setproctitle.c @@ -62,7 +62,7 @@ setproctitle_internal(const char *fmt, va_list ap) static struct ps_strings *ps_strings; static char *buf = NULL; static char *obuf = NULL; - static char **oargv, *kbuf; + static char **oargv; static int oargc = -1; static char *nargv[2] = { NULL, NULL }; char **nargvp; @@ -103,12 +103,10 @@ setproctitle_internal(const char *fmt, va_list ap) nargvp = nargv; nargc = 1; - kbuf = buf; } else if (*obuf != '\0') { /* Idea from NetBSD - reset the title on fmt == NULL */ nargvp = oargv; nargc = oargc; - kbuf = obuf; } else /* Nothing to restore */ return (NULL); From nobody Mon Nov 29 15:43:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E01FA18BC913; Mon, 29 Nov 2021 15:43: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 4J2qPW2j6zz4nYP; Mon, 29 Nov 2021 15:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9212B2540B; Mon, 29 Nov 2021 15:43: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 1ATFh9dI065850; Mon, 29 Nov 2021 15:43:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFh9Ae065849; Mon, 29 Nov 2021 15:43:09 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:09 GMT Message-Id: <202111291543.1ATFh9Ae065849@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: 16b238b74004 - main - libc/rpc/getrpcent.c: Mark write-only variables as unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 16b238b74004f9cde53c6305d760f9e485e9cd91 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MsgA7aEzcKM71CtqfOC+xc58vl+NKMaqqAwhbYR1fEg=; b=RRMUzrs99lkCrK0hdW80Y4zT7Vb8QMU389ooZ+spQOusWUMPffMmP6IVgshl7WJ5yEyzyf L3PzNONP6cgFs1oN850vXjfOaYknZFFIIooHdfsR08Cd/RY51g5zK8TcRWqs1ufqHhASUF L7L9F6y2mqcyQqjyoZFQ0QP2YcDLfp5CBW2bDaWHq22AvjLgnMYjQ7Jer6Fhi0NjlmPZR7 GuLOcuiGMJ2jfkn6vZJn47x1skcB78Xkg9LkcqL5exOuNV7jjTLVzHKziK6or7yUHSMFS+ oPSdC7jl3QUlRK9OhcCq5NaUgR64uV3kwtViY/qLwLuGpas58hIOEA1LLypXxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200592; a=rsa-sha256; cv=none; b=FAsRxeRbYwVRodQMFmqOd7/17nvWG7ibwf5LKagP3ulIrTvocZtPcYuuMhWKDb6Lf2uOVX 6zABtdaJUYLWyWwoo5LMGRZus0GNtTZWuFpUsOH8ZEQI3rx/ZfqXGYGLlpVqBdJvF9UR62 eVlvlWaTDMKY+Ed/TIrJCN5/wK+RU8wTbAAa35oiAvzvc9mS/rJrC9kVfihZ/KSe9fYA/t pw112vFle9pYT/Wsb29HWk8ebJq2mL0FDXzeMxuJIC24vH5g2J6IUddTl7ybzm2D4Kj07U WQWddB4nXPD/sr9JFz38RP7viPmNef+gSvpz/rx+W4RqcrclelX9FjqjiK4rng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=16b238b74004f9cde53c6305d760f9e485e9cd91 commit 16b238b74004f9cde53c6305d760f9e485e9cd91 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:53:05 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:50 +0000 libc/rpc/getrpcent.c: Mark write-only variables as unused Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/rpc/getrpcent.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libc/rpc/getrpcent.c b/lib/libc/rpc/getrpcent.c index 4f3df270de0c..e4770e4e88c5 100644 --- a/lib/libc/rpc/getrpcent.c +++ b/lib/libc/rpc/getrpcent.c @@ -657,11 +657,11 @@ static int rpc_marshal_func(char *buffer, size_t *buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - int num; + char *name __unused; + int num __unused; struct rpcent *rpc; - char *orig_buf; - size_t orig_buf_size; + char *orig_buf __unused; + size_t orig_buf_size __unused; struct rpcent new_rpc; size_t desired_size, size, aliases_size; @@ -744,8 +744,8 @@ static int rpc_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, void *cache_mdata) { - char *name; - int num; + char *name __unused; + int num __unused; struct rpcent *rpc; char *orig_buf; size_t orig_buf_size; From nobody Mon Nov 29 15:43:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C668218BC8D6; Mon, 29 Nov 2021 15:43: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 4J2qPX5LNyz4nSy; Mon, 29 Nov 2021 15:43:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC7052540C; Mon, 29 Nov 2021 15:43: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 1ATFhBFZ065898; Mon, 29 Nov 2021 15:43:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFhBLw065897; Mon, 29 Nov 2021 15:43:11 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:11 GMT Message-Id: <202111291543.1ATFhBLw065897@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: 959c7ab51ed2 - main - acl_delete_entry(): 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 959c7ab51ed2bcb7b9622194d47b461dc19919f5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9poOPXGq6iaMoBXQfnwistfCwsXlL8jWLwtrEOFBUbM=; b=uFN+Gnv9rD3X5vBVhdQ1jpP+ab7x0EcGEOM/avxSKUqBoWTtLkZqRMWebt6219ykCfjxMQ zDQOxzooqdqCnmkxnsGFNaFLjDskFd8KeSNSDQaT1/of3sfbYWSou9UPKLcMCG/qGCjjci up+8Dvsj9+zHAE2U+0EUKlasn8I4SebewVeJt8Clwc+HCgmEgiA56l5LIcyb0yhzngKs+7 gi+r3uX7l9AuV0QdxdmDYMKZA4qmEJ4xNkFYYc5Ci1FzvL2BYot1ZDyDfoiNvBkzKWozYL Qpk8+cbRw4JDY0bWUVxSucD05QDuBimr6QXGtAbIJArbvzthxyoNiYdBIrl7bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200593; a=rsa-sha256; cv=none; b=XHIeKvZ28B//qOcGDXl8+91H+oVlrkjPBxrMvqJIht97LjKhJqttt5A13sn21X3M0AMrKw gdtUaoRZCd/QJExeUahgBAwPH++B49LS7yBf8+vlC4K5p7g7Dwd7f1xrr+nsQNnMk4Qh3l VSwarGri2a5tl70fiXbmGvsdIo60EFAfjqlvq1c3csAwAfWM5x7UdHE+zcL6YOcyppYwcj dwVUrRE026mRGXPwc6GLtsVIk36K2Xq3FvPZf10WbOGA4Z5JnYc/edJULD9r2mREqRGVLL upG+nm9tqS0gRjfY6/05QcxDeQBfB6fNQgYRXcZW6BhzY8AaEqktlDjticLg4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=959c7ab51ed2bcb7b9622194d47b461dc19919f5 commit 959c7ab51ed2bcb7b9622194d47b461dc19919f5 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:12:42 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:51 +0000 acl_delete_entry(): remove write-only variable Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/posix1e/acl_delete_entry.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/libc/posix1e/acl_delete_entry.c b/lib/libc/posix1e/acl_delete_entry.c index 59462c8ae6ab..189669ad7530 100644 --- a/lib/libc/posix1e/acl_delete_entry.c +++ b/lib/libc/posix1e/acl_delete_entry.c @@ -76,7 +76,6 @@ _entry_matches(const acl_entry_t a, const acl_entry_t b) int acl_delete_entry(acl_t acl, acl_entry_t entry_d) { - struct acl *acl_int; struct acl_entry entry_int; int i, j, found = 0; @@ -85,8 +84,6 @@ acl_delete_entry(acl_t acl, acl_entry_t entry_d) return (-1); } - acl_int = &acl->ats_acl; - if (_entry_brand(entry_d) != _acl_brand(acl)) { errno = EINVAL; return (-1); From nobody Mon Nov 29 15:43:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0193918BC869; Mon, 29 Nov 2021 15:43: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 4J2qPZ2sbWz4nbq; Mon, 29 Nov 2021 15:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0060825488; Mon, 29 Nov 2021 15:43: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 1ATFhCHQ065928; Mon, 29 Nov 2021 15:43:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFhClO065927; Mon, 29 Nov 2021 15:43:12 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:12 GMT Message-Id: <202111291543.1ATFhClO065927@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: 4b6f4db3410d - main - libc/x86/__vdso_gettc.c::tsc_selector_idx(): cpu_id is calculated but not used List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4b6f4db3410d3d00c5e0e597243bb7d945356213 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8u8cEtz2vaAb2ouARaSpO3UdeGeRt5MbW0MmWJtLzeA=; b=MeFfnBpJ9O+6nekXWpIyouwuNFOpw7ZwirfYzTIu0g5XnpFLj1Pe+SkC3pv/9AgaK8KOjG ib1ScNTqFWkhLGNTjLDYqq2pySNgAouZEdYnrikpy/djtozWtTMVv5npeNeJVQjOo/v+es iqMnCqAvqMxBqitUa77i2y7SW2vInLeAARy8K5/KeIbFYJ7qqAADlkDoP6qHtnnVQdy5i3 GjYoOuaBeRT7fOEM63jZ5g0VA+WzGP/ICXj9XIXsF4scOR/j8yOVXna/wMvCQMAu2U+iJy FA8zmBweiioVzUF5vM+AStY/BPmf0BrbeVs7GIhjccJkiafHEgK2e7Nu8A7MCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200596; a=rsa-sha256; cv=none; b=JGFzCmZ5veXwaaCFgZXrmeFcWsdyWsWAiCInwmdWVYzkCe3u1MXjphJ8mC6CNFXX/8vVAG F3DoPRwzcxnflVF7FIfYHXyKUEILVxfN84Me+6cpm+7jpDnVQPGQ9+yuPxPLjsM4R3nIRx BqSnDZhUCTL8esaZRtUGags4qHmt4EN8yX+mSvgVr02tFOImRohOyVXXrglR1Z8xWdU/N9 f7HSwH2H1055g80vIhLvlIOMqp/Z9pUTdS9y1dF0r2pXw9ZZ7EXBp+6WHSOR4eLzE+dHuU nEe6KTeGMtaatA2hroNAw7f2Uk8CbEANsqmw6FUgEDuQjzRxWd54M4tqIVVfhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4b6f4db3410d3d00c5e0e597243bb7d945356213 commit 4b6f4db3410d3d00c5e0e597243bb7d945356213 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:14:20 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:51 +0000 libc/x86/__vdso_gettc.c::tsc_selector_idx(): cpu_id is calculated but not used Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/x86/sys/__vdso_gettc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/libc/x86/sys/__vdso_gettc.c b/lib/libc/x86/sys/__vdso_gettc.c index 5cc847e31c0e..b3f3de9f4203 100644 --- a/lib/libc/x86/sys/__vdso_gettc.c +++ b/lib/libc/x86/sys/__vdso_gettc.c @@ -147,7 +147,7 @@ static const struct tsc_selector_tag tsc_selector[] = { static int tsc_selector_idx(u_int cpu_feature) { - u_int amd_feature, cpu_exthigh, cpu_id, p[4], v[3]; + u_int amd_feature, cpu_exthigh, p[4], v[3]; static const char amd_id[] = "AuthenticAMD"; static const char hygon_id[] = "HygonGenuine"; bool amd_cpu; @@ -162,9 +162,6 @@ tsc_selector_idx(u_int cpu_feature) amd_cpu = memcmp(v, amd_id, sizeof(amd_id) - 1) == 0 || memcmp(v, hygon_id, sizeof(hygon_id) - 1) == 0; - do_cpuid(1, p); - cpu_id = p[0]; - if (cpu_feature != 0) { do_cpuid(0x80000000, p); cpu_exthigh = p[0]; From nobody Mon Nov 29 15:43:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B352F18BCC0A; Mon, 29 Nov 2021 15:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2qPf0Lblz4nNg; Mon, 29 Nov 2021 15:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 343C325289; Mon, 29 Nov 2021 15:43: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 1ATFhF98065976; Mon, 29 Nov 2021 15:43:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFhFa4065975; Mon, 29 Nov 2021 15:43:15 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:15 GMT Message-Id: <202111291543.1ATFhFa4065975@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: 631607ac2965 - main - t_mlock.c: Remove null_errno, it is write-only List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 631607ac2965e8c6dcc0f21effc9b36fcb530558 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CtAAuXrTua+hg0xu5reVulDdMO1hJOMVnsQLNqUNiz0=; b=bULABgmGlhF9PF7+ypTVtSwmDj9gSsB6rqk1qJKJuY9NaruWcoxbSJKzzOsBKXGLSuKm8n LUesFXGcWFnuciWNjwSBOp/BbN2I6TfivBDoWFomHBE0n7ZFdwseKpruG4zvLumqGLPJXC 649Zf3Kj4iarvqu05f2zdTUYhJ8rllJMCgnJbERsV9e8PIe0sh9s1xV9xDo10OuhA1vXIs AR+JFLBQUNZbapOXHM8FwCmWw2qwfShq1xeNzNUeaSWjcixNl5dZFrOZ+M86tMs+iHrwAM zyJTGvAPFsEN0AZ4Y0kvR6Bb7oFjUlmxaep3JgwII5Kem+QZPeVW2YBAkfY40g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200598; a=rsa-sha256; cv=none; b=xsSS3RaHoGFw1qD0hgvXUtcgWnMHT1GibL53OV4CBen7Pd61whMYA4GRPmXBXNb3YC8/vF oDIoH7rNTPYmmexpfxD/bOOfYgXKdewtUal/IWP08roQ+Zufx/R35GxmBqeBqwIsFjPzbc 2F+gkTC8StB5sTImZrav+Lnu4OE3EUf254EjkBJGYdVpiXXM2makqX/t7iZf8b6ScnkFHI y9MO3LrUR8H5t6Q4zf5Dc8wCYgtgZaot+cT71uaQpPaU0SCMofyywpIWmaCbOUdE+CmyWL gC/E8nZFMvUsYR6eovRM1ty+QYp8oyzzZKTY3tuU3NhbQRciDvKii98TMJtT6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=631607ac2965e8c6dcc0f21effc9b36fcb530558 commit 631607ac2965e8c6dcc0f21effc9b36fcb530558 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:28:29 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:51 +0000 t_mlock.c: Remove null_errno, it is write-only Sponsored by: The FreeBSD Foundation MFC after: 1 week --- contrib/netbsd-tests/lib/libc/sys/t_mlock.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c index 61085f35cc21..d9ffbe366a04 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c @@ -106,14 +106,9 @@ ATF_TC_BODY(mlock_err, tc) #if !defined(__aarch64__) && !defined(__riscv) void *invalid_ptr; #endif - int null_errno = ENOMEM; /* error expected for NULL */ void *buf; #ifdef __FreeBSD__ -#ifdef VM_MIN_ADDRESS - if ((uintptr_t)VM_MIN_ADDRESS > 0) - null_errno = EINVAL; /* NULL is not inside user VM */ -#endif /* Set max_wired really really high to avoid EAGAIN */ set_vm_max_wired(INT_MAX); #else @@ -124,9 +119,6 @@ ATF_TC_BODY(mlock_err, tc) */ errno = 0; ATF_REQUIRE_ERRNO(ENOMEM, mlock(NULL, page) == -1); - - if (vmin > 0) - null_errno = EINVAL; /* NULL is not inside user VM */ #endif errno = 0; From nobody Mon Nov 29 15:43:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8D48518BCB1B; Mon, 29 Nov 2021 15:43: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 4J2qPc5xXxz4nYc; Mon, 29 Nov 2021 15:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D82325238; Mon, 29 Nov 2021 15:43: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 1ATFhDMR065952; Mon, 29 Nov 2021 15:43:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFhDKx065951; Mon, 29 Nov 2021 15:43:13 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:13 GMT Message-Id: <202111291543.1ATFhDKx065951@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: c8a4a49d582f - main - libc/stdio/vfwscanf.c::convert_wstring(): wcp0 is write-only List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c8a4a49d582f539c73ef436ceb9d623dd9f20221 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jc/rwUBW44//CUPaahgApy1RAYorBL2XcKZO0zqV8zA=; b=DAaFDyhgs1BBN/AlpR3/N7Ozmh2O2fxRZj2/Xvneab5kHWFTcSw4DKNzoXZx74KXm1bpek yJGtLDLJ2pO5g3VdTs3WgyskMnyEp8lG71uO8NTKdnCRieQJJZfCCruqTqHeRLWXd8cHHL e8N2IT2q/AnAiSGpFWH6ROmbjdVallaXIOHJmqH+TkuOY4tT/WAiGUxPiowt10ex6zxHme 3KsyRWpqUMuUVnT6I/Pc4Ch8tBZPmG9hxZd4OjAeHZlnP7r7dCJR7CPpcvFoRHFOruFnTu C8RkpLNgNhgB/5hOJqLEdugOGGW2FG740KZXXcBNOt774ZMnJBn7/Yfounb2Ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200597; a=rsa-sha256; cv=none; b=Ychb8PmXi5aqGUbq++gpCPe1IGo57pTLA38xOmIl0HfZiVPdfQhvFd2AUiyChlMSDaxeaU JNkvCqG6cx1LaZgGVmYSqPtGYlIJiox0Qp8V5ypXz0zg6xGnNUFSWAdhePBW84LBSSb3HA bvaPkwoJmk5T2t9uQfisBdthmXdDL/n8zLMZ17EpgcD+tzJ8ucgHFCKYL48LVW2tsYtI1X 27ogZiG84XVyVtrTc8P1zQ5c4wGCxX2Hf5UN3jVqJzACM6bpQ2eNvv2KvtsTcng3k5Z+ke hocarvY9sT26m9FpJXflpjmhI1w4EhHIscVC+9Zdd+x91Cx4JjLaMD9T1uC2gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c8a4a49d582f539c73ef436ceb9d623dd9f20221 commit c8a4a49d582f539c73ef436ceb9d623dd9f20221 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:16:08 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:51 +0000 libc/stdio/vfwscanf.c::convert_wstring(): wcp0 is write-only --- lib/libc/stdio/vfwscanf.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libc/stdio/vfwscanf.c b/lib/libc/stdio/vfwscanf.c index fbd3a8ad747a..34488912171a 100644 --- a/lib/libc/stdio/vfwscanf.c +++ b/lib/libc/stdio/vfwscanf.c @@ -268,7 +268,6 @@ convert_string(FILE *fp, char * mbp, int width, locale_t locale) static __inline int convert_wstring(FILE *fp, wchar_t *wcp, int width, locale_t locale) { - wchar_t *wcp0; wint_t wi; int nread; @@ -280,7 +279,6 @@ convert_wstring(FILE *fp, wchar_t *wcp, int width, locale_t locale) if (wi != WEOF) __ungetwc(wi, fp, locale); } else { - wcp0 = wcp; while ((wi = __fgetwc(fp, locale)) != WEOF && width-- != 0 && !iswspace(wi)) { *wcp++ = (wchar_t)wi; From nobody Mon Nov 29 15:43:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A468B18BCDB3; Mon, 29 Nov 2021 15:43: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 4J2qPj2b5zz4nTK; Mon, 29 Nov 2021 15:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9AA4C2540D; Mon, 29 Nov 2021 15:43: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 1ATFhIjI066052; Mon, 29 Nov 2021 15:43:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFhI0n066051; Mon, 29 Nov 2021 15:43:18 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:18 GMT Message-Id: <202111291543.1ATFhI0n066051@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: 181751a8b6ef - main - citrus_prop.c: do not ignore sign List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 181751a8b6ef580c44d49ef3cac1c6627bfa461e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gwh7ON89X2+ntm/KXEPfkSBC4XYDlMq8sHUiaty4PKo=; b=jR4MTBqN7BXuTE4WQRQO9B+L+MlTn+WooVB83YqkS1g9wSiFGpIsn+463fvoWsFmjcfSG7 ia3IwEw+COAJNpuXVNzN9J1eIJLj6o6LiPvDPwtiGoVVH4XHhKjSG1H9S3GWAjp2Wks0aw pxtr9Q9PWvd6V9C5HJtPViXAXVzrWWIRbW5tQInVag0zv2q5bZVcVzxnbnxSFNNYbGDOBA sb7s83S79zuOTqbChbi1u505KhVAEO9WfxjWRwVKuL2SKrFyZkwr8oO5JwIspL5YMXoJpn nyfD8HyEzlIQQvawvsm7mDvYG/wwpQCjYsYyqvmQxAdxgPjxKyL/QYA6sfokmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200603; a=rsa-sha256; cv=none; b=RwaZL9Y6h1/QMIkHVSShfWqvb/ysiZNkSKQTH2KYTar2RX9xa9UG4PjRLEWIGGexNX/0C3 BfQJ5XBxJzSleamHYJz+PS/el7oWM8SYY6rN8Lq3U8B9W50hm0iI4rjKKUDCqeWUTidT8O NSzrntjYd+XM2C+RuMG4RJ6r8TKe2ow+nTvXBxWpoA2diW3EOV5z6Q1zmWgWM9yBdBNt9e +SGXaToz6XUibHSPX68LJWvrK5n2qSqVQHalA9Ndrbmkq7Jg5MnxlocOn9SC9qw/Sy0CJf EzPWO/jlzWqxulxVgr5eBWHM2SJnJ64nVGhKcAT4SswbrD7Z+4kUvebb611a1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=181751a8b6ef580c44d49ef3cac1c6627bfa461e commit 181751a8b6ef580c44d49ef3cac1c6627bfa461e Author: Konstantin Belousov AuthorDate: 2021-11-28 03:03:49 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:54 +0000 citrus_prop.c: do not ignore sign In _citrus_prop_read_TYPE_func_ generated functions, do not ignore parsed '-' sign, negate the value as appropriate. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33146 --- lib/libc/iconv/citrus_prop.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libc/iconv/citrus_prop.c b/lib/libc/iconv/citrus_prop.c index 7ac39bbee6e5..0b627f362c22 100644 --- a/lib/libc/iconv/citrus_prop.c +++ b/lib/libc/iconv/citrus_prop.c @@ -79,7 +79,7 @@ static const char *xdigit = "0123456789ABCDEF"; #define _CITRUS_PROP_READ_UINT_COMMON(_func_, _type_, _max_) \ static int \ _citrus_prop_read_##_func_##_common(struct _memstream * __restrict ms, \ - _type_ * __restrict result, int base) \ + _type_ * __restrict result, int base, int neg) \ { \ _type_ acc, cutoff; \ int ch, cutlim, n; \ @@ -99,7 +99,7 @@ _citrus_prop_read_##_func_##_common(struct _memstream * __restrict ms, \ acc += n; \ } \ _memstream_ungetc(ms, ch); \ - *result = acc; \ + *result = neg ? -acc : acc; \ return (0); \ } _CITRUS_PROP_READ_UINT_COMMON(chr, int, UCHAR_MAX) @@ -139,7 +139,7 @@ _citrus_prop_read_##_func_(struct _memstream * __restrict ms, \ return (EINVAL); \ _memstream_ungetc(ms, ch); \ return (_citrus_prop_read_##_func_##_common \ - (ms, &obj->u._func_, base)); \ + (ms, &obj->u._func_, base, neg)); \ } _CITRUS_PROP_READ_INT(chr, int) _CITRUS_PROP_READ_INT(num, uint64_t) @@ -185,7 +185,8 @@ _citrus_prop_read_character_common(struct _memstream * __restrict ms, base -= 8; /*FALLTHROUGH*/ case 'x': - return (_citrus_prop_read_chr_common(ms, result, base)); + return (_citrus_prop_read_chr_common(ms, result, + base, 0)); /*NOTREACHED*/ default: /* unknown escape */ From nobody Mon Nov 29 15:43:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 660FB18BCD90; Mon, 29 Nov 2021 15:43: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 4J2qPg6978z4nfb; Mon, 29 Nov 2021 15:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 558D8253A5; Mon, 29 Nov 2021 15:43: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 1ATFhGM9066000; Mon, 29 Nov 2021 15:43:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFhGYM065999; Mon, 29 Nov 2021 15:43:16 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:16 GMT Message-Id: <202111291543.1ATFhGYM065999@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: e8b6309c70f0 - main - netbsd h_raw.c test: fake use of sum to avoid 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8b6309c70f0d751e626f8babbad68a16a95577c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bsV/Y8Hq5ouZeJDeUdgvItIiaIENFva1Ze7l+0Fe35M=; b=wjz0NnPzJyfztC4ARabgHjPKUsbgoFx2AgRCJvRVWLmeHQA2D7foFUtD1P0RRR2T9Z2imx jDBNHqPciRKVR96D49anUQmW/lBYJnQLPsa7j5cMo+Zw1QoeY0TAfvIoc3bFe7Dc/at3pE WuhewqnnrBM0GzkEMKYWjTnG1FbhJe15xEdpUhETTiFss2qlU4QDyg9PU+SCYWb+YNTwYk TG4USGoSuywzcy6v3hG8efiA1uno0vg08zufrCH+RYLLuUqnf7rPgsfIbZKwyKu6FHOHwo 4I7DNNNKsM8OHx3kzz+mBWBagO/dgEKPclFWfrxyA8PWVf1LjrdSuATu9j/xdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200600; a=rsa-sha256; cv=none; b=QO7YZQLIipD6Io6DqXfL8SQ+6NGi0KxZmF+ZZM9/kM27TRuHii0lE8OW5ce/JP5yQHfZu7 jgnQXq751a6wQ20hSNWTKZ2rvLMigqXU7tbrbwobqeY0VOuuf43Rt0KNBtPe5JyIq5KLf6 7D6eobGD0Ts1QzoGUuJ/Y/85+T8g+HEoVgbFX9eLmRAsY0AAxnK/lnCPQ/qZPU7rHsirOs ukA0t0TenMOZ9H52Sj77T9EN/zoPRkMLAdLiqAEiihP9iStlE+jipqxF8Ovky4rROGA+m3 74W9mIHFVriIp4cjFgl2Dluec2soH6naTuGyEq8RfVn8rkzI5gGZaqQQ7pmPHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e8b6309c70f0d751e626f8babbad68a16a95577c commit e8b6309c70f0d751e626f8babbad68a16a95577c Author: Konstantin Belousov AuthorDate: 2021-11-28 03:35:45 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:51 +0000 netbsd h_raw.c test: fake use of sum to avoid warning Sponsored by: The FreeBSD Foundation MFC after: 1 week --- contrib/netbsd-tests/lib/libc/ssp/h_raw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/netbsd-tests/lib/libc/ssp/h_raw.c b/contrib/netbsd-tests/lib/libc/ssp/h_raw.c index a2324814716d..eaac78b231c7 100644 --- a/contrib/netbsd-tests/lib/libc/ssp/h_raw.c +++ b/contrib/netbsd-tests/lib/libc/ssp/h_raw.c @@ -35,6 +35,7 @@ __RCSID("$NetBSD: h_raw.c,v 1.6 2011/07/24 14:00:36 christos Exp $"); #include void poke(int *, size_t); +int y; void poke(int *b, size_t index) @@ -45,6 +46,7 @@ poke(int *b, size_t index) b[index] = 42; for (i = 0; i < 10; i++) sum += b[i]; + y = sum; } int From nobody Mon Nov 29 15:43:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F3B5B18BCC2E; Mon, 29 Nov 2021 15:43: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 4J2qPh4NS0z4ncW; Mon, 29 Nov 2021 15:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79CCF251BD; Mon, 29 Nov 2021 15:43: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 1ATFhHqo066024; Mon, 29 Nov 2021 15:43:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFhH5N066023; Mon, 29 Nov 2021 15:43:17 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:17 GMT Message-Id: <202111291543.1ATFhH5N066023@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: a64a3b798825 - main - libc/tests/stdlib/dynthr_mod/dynthr_mod.c: mark dummy as used List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a64a3b798825bc176ae052fc3ead88566b60ba7d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7z3xGd2X+ry3tx0vbCAVZmupeT+2mVDM6wJvbUjOe5U=; b=BMWEmaIb9ZpqN+0nD9QTb5cB7GBzxxyVJ5wXmLFjogQ4bpJ/EdVCh5tigrbKhyvbbU6WvI wRXj/m18SZVkGaaNOMLapu6h4x9sNyNfNdUWhgKUWdmx6cGj3oR0KD+Z3vL0M8EGlgsLmU eQs/5GWb67//NOiP3pP3hRDejxyaKY7LnPMU/dxB6sCvp6qzzkuxIwI/m4lEaOPOZRaEdT hLEIza3c41kY68FUgaESqQUrHW8RZqwkjupZJxpwjc5SNP3IKpqdqtPiP486aggWxU6Wz8 he+FmbNzZLCQWA2uuOfzJBAG4sjaodI2yHUxq4nxzYKIDfZoHqwRZThNEcoDOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200602; a=rsa-sha256; cv=none; b=PbFAAhlG7btFTthw8SmF2XwbZntgIPyylCre3efJztT/KD4Y6N1CnGyX+4elx5vErcU8G9 ZGHn/8nMFxvhWlVJfmcn8ooU9A95xftIb99dwDbUwamzSj/8QQ5AgLCgoeGfwvu7xTa3c5 HIsqzuI5hVXJ7WS0FPbkzPXFbrhR/2O2dbS4dYTsokyo1ilFP/dAV3T1AMlY50YHeWO/dI mGN7i5lQzjQXmpVLMh0kfoq3u1iUGyF3zsyO+4dsfwuFRLbMUqQ/haWO6vnRFqqmN9PnID u9VZFlNY+UQ2ZqO+MISvabaWoRfz2byW4Wh+UfryD09rN9+1bf8xFZF84WoZNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a64a3b798825bc176ae052fc3ead88566b60ba7d commit a64a3b798825bc176ae052fc3ead88566b60ba7d Author: Konstantin Belousov AuthorDate: 2021-11-28 03:25:28 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:51 +0000 libc/tests/stdlib/dynthr_mod/dynthr_mod.c: mark dummy as used It receives the malloc() result, and we do not want the malloc() call to be optimized out, which is allowed for hosted compiler. Use dummy for actual write though. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/tests/stdlib/dynthr_mod/dynthr_mod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/tests/stdlib/dynthr_mod/dynthr_mod.c b/lib/libc/tests/stdlib/dynthr_mod/dynthr_mod.c index 4f5622f47a81..c19a1a54a8b6 100644 --- a/lib/libc/tests/stdlib/dynthr_mod/dynthr_mod.c +++ b/lib/libc/tests/stdlib/dynthr_mod/dynthr_mod.c @@ -51,6 +51,7 @@ mod_thread(void *ptr __unused) char *volatile dummy; dummy = malloc(500); + *dummy = 'a'; return (NULL); } From nobody Mon Nov 29 16:02:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2556218C882F; Mon, 29 Nov 2021 16:02: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 4J2qqR5jjmz3GkT; Mon, 29 Nov 2021 16:02:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4D0C25690; Mon, 29 Nov 2021 16:02: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 1ATG2Bru092067; Mon, 29 Nov 2021 16:02:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATG2B05092066; Mon, 29 Nov 2021 16:02:11 GMT (envelope-from git) Date: Mon, 29 Nov 2021 16:02:11 GMT Message-Id: <202111291602.1ATG2B05092066@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 8661e085fb95 - main - mmc: Fix HS200/HS400 capability 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: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8661e085fb953855dbc7059f21a64a05ae61b22c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638201731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=097eBlGYz4PplnUp6IgUgC3hGi5jys1Jo//RfJ/gqrU=; b=fUbnx1UXNfdT8d1SCa9lAoa5g7wbm35VHJswY7Br+gJ+nz2q9NKQYi4kjck6bzr4P8qQh5 E3TKSncDZqv4YecLBspy2Vq+Gr8VLbrPQIYviDqYMOul5JraWOMbMfCqLx2sZRTTmtv7T5 pI5g4qjz0mnAU/U2cSE31l2k0tmNJsNO07PmtHSVPCWrFwz0dft47jxyzg1xkTyEYdbg9x Z+zln7dJ/f5FSWtjAs3Dug9fRVFW2p5NRtcSwgCYtUG+ssWFXCRxpulXKZXogZJP/XcGDx tZtKVlX5ZkdVXzzIcqEn9pMUeluZ1swOg3lO2UQ8tIdNcQlgWcm5twDiEZRKfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638201731; a=rsa-sha256; cv=none; b=ygp9YohmZHl/caBVmfz24Bc4I49xFV3bj8C9uidlPlSO+Cahn0DBInjmIprHYpWKV5qFgk hCHdu1eO28lyDUwpvH+6qQM5HMUv9iKsKvKQnhGKGERRaByUKdfbLjc/Z3bu2GcvEz5bdR BZKJ6e4b5Crxjcfz9uOhALXdv3QvN7mLwFUdAvT9aLHQ0nyaodbpp2/w44QrE9pU5/E9Ue pRR1YQFaWfDkfZwxHi1CWP10++cMk5en9b6OajLLLpCUEeXT4RERCgzvcUcBUbhHd+0fKA tbckTSbAMuVkAgs0tPJg1THdKQnFaKSivAZJJ8XeuUeahdkhbVHh9c+6vEoKnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=8661e085fb953855dbc7059f21a64a05ae61b22c commit 8661e085fb953855dbc7059f21a64a05ae61b22c Author: Kornel Duleba AuthorDate: 2021-11-28 11:24:07 +0000 Commit: Marcin Wojtas CommitDate: 2021-11-29 16:02:01 +0000 mmc: Fix HS200/HS400 capability check HS200 and HS400 speeds can be enabled either with 1.2, or 1.8V signaling voltage. Because of that we have four cabability flags: MMC_CAP_MMC_HS200_120, MMC_CAP_MMC_HS200_180, MMC_CAP_MMC_HS400_120, MMC_CAP_MMC_HS400_180. MMC logic only enables HS200/HS400 mode if both flags are set for the corresponding speed. Fix that by being more permissive in host timing cap check. Reviewed by: manu, mw MFC after: 2 weeks Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D33130 --- sys/dev/mmc/mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index 1fc25e372f2b..9c73dfd57ce0 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -1543,9 +1543,11 @@ mmc_host_timing(device_t dev, enum mmc_bus_timing timing) case bus_timing_mmc_ddr52: return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_DDR52)); case bus_timing_mmc_hs200: - return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS200)); + return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS200_120) || + HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS200_180)); case bus_timing_mmc_hs400: - return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400)); + return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400_120) || + HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400_180)); case bus_timing_mmc_hs400es: return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400 | MMC_CAP_MMC_ENH_STROBE)); From nobody Mon Nov 29 16:39:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0989418B194A; Mon, 29 Nov 2021 16:39: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 4J2rfF3sx7z3jd5; Mon, 29 Nov 2021 16:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 606F225E17; Mon, 29 Nov 2021 16:39: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 1ATGdHpA033927; Mon, 29 Nov 2021 16:39:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATGdHva033926; Mon, 29 Nov 2021 16:39:17 GMT (envelope-from git) Date: Mon, 29 Nov 2021 16:39:17 GMT Message-Id: <202111291639.1ATGdHva033926@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: 0190c38b9dfa - main - swapoff_one(): only check free pages count manually turning swap off List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0190c38b9dfaa16de1bc61e829b9a1221fed7896 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638203957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1XIxJa0QOc0qy9xGNXLNZB3JDEG2y0BZsbUj1N8iCkc=; b=bbukeDaPU8atifS/QM5B/2lmwyGGYvAXp3vBqtf3Pd8WpEjkzQBDvkmTSZj746A8AB4I8/ uklvszbunlFfWgFGRmSKcM/dlkZeaE0PRmwZBX3XzuFHYW+f6sbTFEqolVqhY37HfkLH9B KixbMdP13YRDcGMLgQ/n6795HxObO5XJkym86QPccy5A1M425qR/bVQ6fQH4MFsJsS7yL/ 5ax+4/Yso6bhRTnFxNHGr1cX+xtY13IqeFxImLI8rs+egnjKGD4Bexynbf4otl5MbzZAeT AIvB4Y924960Rge8eiBOn0gvV5XJZfmRZ0srofDyKOMMO7pw1OHgCsfypnu+Kw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638203957; a=rsa-sha256; cv=none; b=GXN4x1trUNhV4susN0UCrVNizMbM4giaavmglYJTMsy/xQnXXfR2YH/a05UV+jEVP3vgCp cJbQDsvV6iC+i4kv/nyGGsM+1+pu3lGExrzdsxzPtweTX98qSeW2VDRZJBm7uDGsFYg5OI zWZW4bWuk7bO1uoz7AW+4Hh/EzWozX0V1kMbwUKoN1mreUyZ7ar3eQl4t1hhdBhOmGNXL1 6/RLV61auFpL3hff9MIjr1mY19AJxxWmQG4tyReX4/d0gNxZywuLhzEzPqU5V3znNXVOUV BFP+UhwjamQ0kd5M2CLeo/al0i42dLXl4ku/D/uz1MMfj/l8WdD0awClV5oYPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0190c38b9dfaa16de1bc61e829b9a1221fed7896 commit 0190c38b9dfaa16de1bc61e829b9a1221fed7896 Author: Konstantin Belousov AuthorDate: 2021-11-26 23:22:27 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 16:38:02 +0000 swapoff_one(): only check free pages count manually turning swap off When swap is turned off due to system shutdown or reboot, ignore the check. Problem is that the check is not accurate by any means, free page count can legitimately be low while system still able to page in everything from the swap. Then, we turn swap off if swapping on real file or some non-standard geom provider, and typically panic when system appears to actually need to unavailable page. For syscall, it is better to be safe than sorry. Reported and tested by: peterj Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33147 --- sys/vm/swap_pager.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 4cfdb3fd2cc8..f313d8b2d014 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -469,7 +469,8 @@ static bool swp_pager_swblk_empty(struct swblk *sb, int start, int limit); static void swp_pager_free_empty_swblk(vm_object_t, struct swblk *sb); static int swapongeom(struct vnode *); static int swaponvp(struct thread *, struct vnode *, u_long); -static int swapoff_one(struct swdevt *sp, struct ucred *cred); +static int swapoff_one(struct swdevt *sp, struct ucred *cred, + bool ignore_check); /* * Swap bitmap functions @@ -2523,14 +2524,14 @@ sys_swapoff(struct thread *td, struct swapoff_args *uap) error = EINVAL; goto done; } - error = swapoff_one(sp, td->td_ucred); + error = swapoff_one(sp, td->td_ucred, false); done: sx_xunlock(&swdev_syscall_lock); return (error); } static int -swapoff_one(struct swdevt *sp, struct ucred *cred) +swapoff_one(struct swdevt *sp, struct ucred *cred, bool ignore_check) { u_long nblks; #ifdef MAC @@ -2552,8 +2553,16 @@ swapoff_one(struct swdevt *sp, struct ucred *cred) * available virtual memory in the system will fit the amount * of data we will have to page back in, plus an epsilon so * the system doesn't become critically low on swap space. + * The vm_free_count() part does not account e.g. for clean + * pages that can be immediately reclaimed without paging, so + * this is a very rough estimation. + * + * On the other hand, not turning swap off on swapoff_all() + * means that we can lose swap data when filesystems go away, + * which is arguably worse. */ - if (vm_free_count() + swap_pager_avail < nblks + nswap_lowat) + if (!ignore_check && + vm_free_count() + swap_pager_avail < nblks + nswap_lowat) return (ENOMEM); /* @@ -2603,7 +2612,7 @@ swapoff_all(void) devname = devtoname(sp->sw_vp->v_rdev); else devname = "[file]"; - error = swapoff_one(sp, thread0.td_ucred); + error = swapoff_one(sp, thread0.td_ucred, true); if (error != 0) { printf("Cannot remove swap device %s (error=%d), " "skipping.\n", devname, error); From nobody Mon Nov 29 16:39:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1A1D418B1BC1; Mon, 29 Nov 2021 16:39: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 4J2rfG4TR2z3jXH; Mon, 29 Nov 2021 16:39:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7ACB425DB5; Mon, 29 Nov 2021 16:39: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 1ATGdI10033951; Mon, 29 Nov 2021 16:39:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATGdIlx033950; Mon, 29 Nov 2021 16:39:18 GMT (envelope-from git) Date: Mon, 29 Nov 2021 16:39:18 GMT Message-Id: <202111291639.1ATGdIlx033950@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: 08bb51f8d60c - main - shutdown: unmount filesystems after swapoff List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 08bb51f8d60c552d1f7c202cc2eb267ed480e541 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638203958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4TmhjRTNO0hARezHTq4U6t5r3OAhZoR9tS9dgm3rVJM=; b=Ja0V02wzGslH/kCocpqC8aOIOnKNShWOhSqcxcEPc2vt2+7JFJ+AP1uK+/hQ4jokCowaD6 rHnEeXxUOrOIoorE4yMVAPfMg5IbA5cI7t/OLqMW0IsRNy/BMRZ0kH2wskgcgN8o1E4IBF 8MNxDbRCNTzUF40hexGMNlHdYYpQtY6SaLFKX9tbCQz6O5IQ7qgaQPFNQ2FEoiqD2EOTZM aZZ7VmPh3OwlK+urYGKw/ikE7lFQFd3KUkYJPL+YIHsrQayUtAe3fmnwRdAI3B53XK+LfS UeXO28Hpa4jcIn7Iyeb5li1qCKKeIBr++dA/sag6qB9zmsvD6GaIr6yC0HfGlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638203958; a=rsa-sha256; cv=none; b=Ak726kS0DYhYen7kiHZCE4mOtWOWMsVQDqHbq+krU/ovRD4J9NyKmyPIQpXE8kqwDgcPmv Lyt0b7QOHowgyRZsaLCXfO/poJaWFXxYG9zJjuulzOrig8FNd0fJxm8CGHldLYibIdqXqd pk01pMxWizMfkAnbkA0eLfgCU9c4kSANkZbNUztzIggqm/nXzZ1Wxq7CoOox9O1bQhcAb+ nV5AKlMROqXeV/7P4g6jUcbHkvjZnbQe6GIINrnXzRwnVaoxVd7jJ1KG0VczKyk3QzxxF9 xxG4bDFP4MpqNUCwuzQeMLnE1n70WzFK7wxalQ0+XmuOK+LCQCF5vfEtd3+5kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=08bb51f8d60c552d1f7c202cc2eb267ed480e541 commit 08bb51f8d60c552d1f7c202cc2eb267ed480e541 Author: Konstantin Belousov AuthorDate: 2021-11-28 01:52:46 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 16:38:02 +0000 shutdown: unmount filesystems after swapoff Swap on file requires operational underlying mount, otherwise swapoff_all() is guaranteed to panic due to the default strategy VOP for reclaimed vnodes. Reported and tested by: peterj Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33147 --- sys/kern/vfs_bio.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 4b746a269171..8d6eac800caf 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1452,16 +1452,21 @@ bufshutdown(int show_busybufs) */ printf("Giving up on %d buffers\n", nbusy); DELAY(5000000); /* 5 seconds */ + swapoff_all(); } else { if (!first_buf_printf) printf("Final sync complete\n"); + /* - * Unmount filesystems + * Unmount filesystems. Swapoff before unmount, + * because file-backed swap is non-operational after unmount + * of the underlying filesystem. */ - if (!KERNEL_PANICKED()) + if (!KERNEL_PANICKED()) { + swapoff_all(); vfs_unmountall(); + } } - swapoff_all(); DELAY(100000); /* wait for console output to finish */ } From nobody Mon Nov 29 16:49:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0026918B86DE; Mon, 29 Nov 2021 16:49: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 4J2rsq5DByz3ncV; Mon, 29 Nov 2021 16:49:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 930D526096; Mon, 29 Nov 2021 16:49: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 1ATGnJkJ047276; Mon, 29 Nov 2021 16:49:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATGnJEG047275; Mon, 29 Nov 2021 16:49:19 GMT (envelope-from git) Date: Mon, 29 Nov 2021 16:49:19 GMT Message-Id: <202111291649.1ATGnJEG047275@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 1cde21402ab7 - main - cdceem(4): Fix "set but not used" warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1cde21402ab7c2527dec1050f37b14ae077eafe7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638204559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MNe0upHpBP91Ak04RpPs9IeFK0qEBQC9Wh7gSeoOeE8=; b=sATTlFN+bOQfZtqeULV7nX6mL9jy0XVr7QtpFB1Y0f/4LukS72B6A/DDyuoghjCKCkuqM5 E3h7xu0cTg3MF2+m2t0Yggmh/x7IAHAe/qvq1rGW99hGEw4OwGJpMSFazBXsrNKKkkA2t/ O+1AAtngJRx5kCNyCNvWre3KcjXgHijBZF4PoBi89OKxFqBYSmXq8BD6OUweTjvISbXvoS mm4SYrpoGoP/ZMCq/QN4Xx1iB9lzFy64V/xMwqKEH0VfKmDaNfQ9gvsIqiaWU1w1cvTqxt Y7VRWWY8t0/mHhRlrNrKXPThflBDrJB5CtYow35TjyqIZcpwLbqY0w6zOnGpHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638204559; a=rsa-sha256; cv=none; b=q9HQbiu+GXZJZ7i7+5bGTOibNTN7QTOmaPbvZl1GV5qxObILc6wwbaH4PuXaY5BNoRQ0uh /8vVFEMFQDAuBUzwyJ+O7mqqJjehWr02gqWU+OIg/fCa7W3sOBRfKpE25YN25H61HlQ42o 8ysu20uiAH1pZDfP4SvTeFqLTkuCe+5wuARF3YILeiadJDKguJzkusKnnxy5UlYKKsihbh 3iS9wDyWq9ej3zNZX+d65GRQ2wqUQuqUqDM+Ap/2j6QJ46FUdsP38jpOI9VXcKkris5gZ3 C5odnwVlvWbU4ijYYD+Wo/f5MJwhZOmS6InkA0jcRz5sMg9Fv3skBCSW1I97NQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=1cde21402ab7c2527dec1050f37b14ae077eafe7 commit 1cde21402ab7c2527dec1050f37b14ae077eafe7 Author: Edward Tomasz Napierala AuthorDate: 2021-11-29 16:42:59 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-11-29 16:45:15 +0000 cdceem(4): Fix "set but not used" warnings No functional changes. Sponsored By: EPSRC --- sys/dev/usb/net/if_cdceem.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/usb/net/if_cdceem.c b/sys/dev/usb/net/if_cdceem.c index 92441d8173ee..7c56a3482402 100644 --- a/sys/dev/usb/net/if_cdceem.c +++ b/sys/dev/usb/net/if_cdceem.c @@ -571,7 +571,7 @@ cdceem_send_echo(struct usb_xfer *xfer, int *offp) { struct cdceem_softc *sc; struct usb_page_cache *pc; - int maxlen, off; + int maxlen __diagused, off; uint16_t hdr; off = *offp; @@ -610,7 +610,7 @@ cdceem_send_echo_response(struct usb_xfer *xfer, int *offp) { struct cdceem_softc *sc; struct usb_page_cache *pc; - int maxlen, off; + int maxlen __diagused, off; uint16_t hdr; off = *offp; @@ -650,7 +650,7 @@ cdceem_send_data(struct usb_xfer *xfer, int *offp) struct usb_page_cache *pc; struct ifnet *ifp; struct mbuf *m; - int maxlen, off; + int maxlen __diagused, off; uint32_t crc; uint16_t hdr; @@ -714,7 +714,7 @@ cdceem_bulk_write_callback(struct usb_xfer *xfer, usb_error_t usb_error) { struct cdceem_softc *sc; struct ifnet *ifp; - int actlen, aframes, maxlen, off; + int actlen, aframes, maxlen __diagused, off; sc = usbd_xfer_softc(xfer); maxlen = usbd_xfer_max_len(xfer); @@ -783,9 +783,8 @@ static uint32_t cdceem_m_crc32(struct mbuf *m, uint32_t src_offset, uint32_t src_len) { uint32_t crc = 0xFFFFFFFF; - int error; - error = m_apply(m, src_offset, src_len, cdceem_m_crc32_cb, &crc); + m_apply(m, src_offset, src_len, cdceem_m_crc32_cb, &crc); return (crc ^ 0xFFFFFFFF); } From nobody Mon Nov 29 16:49:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BD76018B884C; Mon, 29 Nov 2021 16:49: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 4J2rsr6nZsz3nZ5; Mon, 29 Nov 2021 16:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B541B25DDA; Mon, 29 Nov 2021 16:49: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 1ATGnKw5047300; Mon, 29 Nov 2021 16:49:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATGnK79047299; Mon, 29 Nov 2021 16:49:20 GMT (envelope-from git) Date: Mon, 29 Nov 2021 16:49:20 GMT Message-Id: <202111291649.1ATGnK79047299@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: fbf524675763 - main - cfiscsi(4): Fix "set but not used" 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: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fbf5246757630650c23ed711c527a67dd52eb745 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638204561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZUCY2IO0kKQgYNEKXhrwkpt07cIfqZHo7JLa1WFcf8U=; b=HesSSWf6pB0O4yUtA5jA4XILkXuIeS8pyvmJmGJWWiauQELnD7iv12BEtUvsGEPZOeuJVa P6Jjl30EYv/KbXZg+LH2XEremfX/Dr24OxAB6O+bGJ9pkAhtpLLaq6yhHWyUQa/BIbj3kf 9zkxsJI7TIs5H1L+NjHBZ7+BBQrtkwjk1SgXNzA18maQR/9Aml+luaffgQYsJAe6n5EHg3 VVt0unOlnZQct0kfsYevviztD9S/jvv0kvpxrfm3DDn1l/FyzBKWLKc4EzAZP+7wHOKKcf DgF5ey25Ke0etiFkuuddxH3YrUCRQCqig03bsalIz8QK0dANJw3W5CHI0fzcog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638204561; a=rsa-sha256; cv=none; b=bb230PBdf2+cx6APeaOpWx+SLDEltHBYSoonw+5HwfHCXZ3QUCka/Uf4kQNYYXUngJMFX2 L12tV08yz0tac/o3m234OH9G76eWIPpP3HqxG7abewTTWc6R3L2BxoMQe2UkPbhIyQ60gY gEAkJOZkNhD+zvPUK+iyNRdQFIrKE++mlIh8DWiCuJJS0BMGVi3zw4O0dWYTTiBBMnRiKI cLzNCC+5Weg9Rlduge7zmhsNsEKEvn/axF0DZVvJ3UlEQa8KWnOas/depq4+gEfyJ7w0OY 90V4KSzh1mSAFsfhVlDF/dZAT/nkNMlDL7xq9u7MKdRmQtF4YHWJ3kZyr5BO2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=fbf5246757630650c23ed711c527a67dd52eb745 commit fbf5246757630650c23ed711c527a67dd52eb745 Author: Edward Tomasz Napierala AuthorDate: 2021-11-29 16:44:12 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-11-29 16:45:15 +0000 cfiscsi(4): Fix "set but not used" warning No functional changes. Sponsored By: EPSRC --- sys/cam/ctl/ctl_frontend_iscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c index b8ab25e89eb9..6b002566b465 100644 --- a/sys/cam/ctl/ctl_frontend_iscsi.c +++ b/sys/cam/ctl/ctl_frontend_iscsi.c @@ -2857,12 +2857,11 @@ cfiscsi_scsi_command_done(union ctl_io *io) struct iscsi_bhs_scsi_response *bhssr; #ifdef DIAGNOSTIC struct cfiscsi_data_wait *cdw; -#endif struct cfiscsi_session *cs; +#endif uint16_t sense_length; request = PRIV_REQUEST(io); - cs = PDU_SESSION(request); bhssc = (struct iscsi_bhs_scsi_command *)request->ip_bhs; KASSERT((bhssc->bhssc_opcode & ~ISCSI_BHS_OPCODE_IMMEDIATE) == ISCSI_BHS_OPCODE_SCSI_COMMAND, @@ -2872,6 +2871,7 @@ cfiscsi_scsi_command_done(union ctl_io *io) // bhssc->bhssc_initiator_task_tag); #ifdef DIAGNOSTIC + cs = PDU_SESSION(request); CFISCSI_SESSION_LOCK(cs); TAILQ_FOREACH(cdw, &cs->cs_waiting_for_data_out, cdw_next) KASSERT(bhssc->bhssc_initiator_task_tag != From nobody Mon Nov 29 16:49:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AC33318B8A27; Mon, 29 Nov 2021 16:49: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 4J2rst1HzMz3nPb; Mon, 29 Nov 2021 16:49:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB19626097; Mon, 29 Nov 2021 16:49: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 1ATGnLFQ047324; Mon, 29 Nov 2021 16:49:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATGnLXn047323; Mon, 29 Nov 2021 16:49:21 GMT (envelope-from git) Date: Mon, 29 Nov 2021 16:49:21 GMT Message-Id: <202111291649.1ATGnLXn047323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: a089c17d3206 - main - linux(4): Fix "set but not used" warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a089c17d320684e6eb36556fa131a8286e6a821d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638204562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fu6zkCrmFjnIOceAx6U9bi9Kn5GULwm3GUnnGdalk40=; b=FjNrSttYx7TADosITqA/FtTzXDfb7c3R783lgxtkwd5rogqEizb0NkvLxU277qtCg2w/XZ hUH9Ntd2/AGAu4ngGM1WCCdRFTcGV44At4MPuBTUD47WszR8JvAFJzXtmig3Zc+ObRdJIs T4Xt8UmORhwn+72qX8da/UD9L0lK3HIgAqDRhoMB2XB21pCCWO5ajsiba4PnUUP+wFMJjc oS489WzOBGomg0eqppwsXQb33quygI91xyxGEcYtuZw6T2bE4qwtxi0LWBorsAKtILqDhw iM/IK4IdUj03MQHO0aU18pUFkMBpQ5rbTxJMxW+OXzda5mZ1EsugFdUjyMdCrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638204562; a=rsa-sha256; cv=none; b=c3UMDnVLWZye7GYiyu8cLQjmd4YZziDPi5bxX5i4R/nQjlVo1nf/0/VeL/oeqpv1bmpsL1 NvfJ4uvLnoDkrgVpVBhI/GzqApqFk3/vHp92rhfskGt7gnEAOSrzrhLav13xKhiaxh2jmE DPtlLjUqna5wmxkl9B726Rj3W4Ask+hKau0tabH+onBAcTjqzCmHCTZlvY3WZVjdL/lqyq tFpdIxV/IF/hMr/7SZm8GeydptnL+Z/lhYQghWNDnYuQmPVZgKjfnG40NGaVjMXFeFk9kR 5GpSaqWqkDQY4HaHu3L+cmjocYLA/4pJj1fvZw+hjFjIw8xG0VDVVt/UjuXW7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=a089c17d320684e6eb36556fa131a8286e6a821d commit a089c17d320684e6eb36556fa131a8286e6a821d Author: Edward Tomasz Napierala AuthorDate: 2021-11-29 16:44:40 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-11-29 16:45:16 +0000 linux(4): Fix "set but not used" warnings No functional changes. Sponsored By: EPSRC --- sys/arm64/linux/linux_sysvec.c | 2 -- sys/compat/linux/linux_fork.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index d576ef48aa44..c88442a19c53 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -439,7 +439,6 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) struct l_sigframe *fp, frame; struct sigacts *psp; int onstack, sig; - uint32_t spsr; td = curthread; p = td->td_proc; @@ -474,7 +473,6 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) /* Fill in the frame to copy out */ bzero(&frame, sizeof(frame)); get_mcontext(td, &frame.sf_uc.uc_mcontext, 0); - spsr = frame.sf_uc.uc_mcontext.mc_gpregs.gp_spsr; /* Translate the signal. */ sig = bsd_to_linux_signal(sig); diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c index f722e3c08482..bcd5ffe3c589 100644 --- a/sys/compat/linux/linux_fork.c +++ b/sys/compat/linux/linux_fork.c @@ -482,7 +482,7 @@ out: int linux_exit(struct thread *td, struct linux_exit_args *args) { - struct linux_emuldata *em; + struct linux_emuldata *em __diagused; em = em_find(td); KASSERT(em != NULL, ("exit: emuldata not found.\n")); From nobody Mon Nov 29 17:49:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0DB6218B56AF; Mon, 29 Nov 2021 17:49: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 4J2tBv4xdRz4bvs; Mon, 29 Nov 2021 17:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B80C26CC3; Mon, 29 Nov 2021 17:49: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 1ATHnBXN027840; Mon, 29 Nov 2021 17:49:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATHnBGW027839; Mon, 29 Nov 2021 17:49:11 GMT (envelope-from git) Date: Mon, 29 Nov 2021 17:49:11 GMT Message-Id: <202111291749.1ATHnBGW027839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 1910048eb931 - main - USB: add CYUSB330x 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1910048eb931bb749c42534a8f252d772c0719de Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638208151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5UEUMux6ltb7HOdog4TFetiIdVvYc9rElgRw2ha31GE=; b=rGWB4Cspw7Vn973ScngKfEdq6L+VoOKO+9sRRggO3oSjthEHTMBmAj8DY+3kpLWrJn1LwU nZxTDRZq7peJpy0q43o/kHWATeuHJcLKgoIav1xdouKnIql5lwucMA0IJF/Y78OpamwuIr iYPBS8eYn8JHLiucC4ULrz1MpifTvbBYJPbQvtstIfH1Wl8Y10GmmUqt4OKB++cZOVQfCI qZ1MUTbDBS0QwCg8WODd7Cx6eq1VbFNfT3AFmIVF8oKi8XESOL8WH6xIrBvYqUHrWIGcYz dVIWljuMCWnl9DRHpoOhE+WUIxF+hLqRJ4ScO5K5rm+jLXYTA/i5erh20xmfSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638208151; a=rsa-sha256; cv=none; b=XbvefWXyYtG9YRFuKpoyBs74usCOuj19BGE3uVAqLRr3fMYLcbvWFIAPTlZ5N3bwZtcqy0 Q0tZLl5xpeWJYm6ObxFyGITSkpVvpOKHN3YmUYAkY+VuqCBQGm7AuZ1e4XtMCbvtupmn8j YpEnv1cw6rpHSrU9nRb1a1TLXZT4B4lARFt5jPgnR92S3TBQckkh0Bk3b1CZnqPIQXZB7o HAXYOHcO4JXec1k0rG1gQvRwsaW+tIUuhCYzUcdY0y/IrIeulAch9qdOZBfSCI4cJIv4+U W+JN+LMCl3b5Eg0RKw88K4jrkMd+g8i6o3aLmUFTfqZF3RQB5FiOznzMo2dexQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1910048eb931bb749c42534a8f252d772c0719de commit 1910048eb931bb749c42534a8f252d772c0719de Author: Bjoern A. Zeeb AuthorDate: 2021-10-15 10:46:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-29 17:44:08 +0000 USB: add CYUSB330x to usbdevs Add the Cypress dual USB3/2 HUB CYUSB330x as found in SolidRun's HoneyComb to usbdevs. --- sys/dev/usb/usbdevs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 7cf67ecf44bf..874d5b3e54dd 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1639,6 +1639,8 @@ product CYPRESS FMRADIO 0x1002 FM Radio product CYPRESS IKARILASER 0x121f Ikari Laser SteelSeries ApS product CYPRESS USBRS232 0x5500 USB-RS232 Interface +product CYPRESS CYUSB330x 0x6500 HX3 USB 3.0 Hub +product CYPRESS CYUSB330x_2 0x6502 HX3 USB 3.0 Hub (USB 2.0) product CYPRESS SLIM_HUB 0x6560 Slim Hub product CYPRESS XX6830XX 0x6830 PATA Storage Device product CYPRESS SILVERSHIELD 0xfd13 Gembird Silver Shield PM From nobody Mon Nov 29 17:54:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7359118B6274; Mon, 29 Nov 2021 17:54: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 4J2tJd1PV2z4crS; Mon, 29 Nov 2021 17:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 06FDA26F11; Mon, 29 Nov 2021 17:54: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 1ATHs8E5040511; Mon, 29 Nov 2021 17:54:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATHs804040510; Mon, 29 Nov 2021 17:54:08 GMT (envelope-from git) Date: Mon, 29 Nov 2021 17:54:08 GMT Message-Id: <202111291754.1ATHs804040510@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Neel Chauhan Subject: git: 3dd3a395ba97 - main - ext2: Check for e2fs_first_dblock in ext2_compute_sb_data() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3dd3a395ba975d0fbe13320e6e69fb85b037da5e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638208449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6XupuY9b6Ww3jO9cVvR1QnzQAd0Sx0hMfbQdaZai/pw=; b=ZY4tk84cxxZ1n05AObWb5cNo0qAraG53/x5DE+4Az5WrPYOae14WZ7ubglfCmURJf2IH0R FNIuFWwM0CRMrTepKk6aQtT8JWJwt1utHFYgv1FrY/SP4tV2DSyhQW0H2LR54w5gVc3oe4 dbYxBktbRYP9j2WvbiwvrqU7dKgo8kURa9e839R3tiPWKpxwjzlVifk/qukfq845g65xXQ xs2YCWPaGOWR6y/U05b8nWrhqtPeKoq0pOmKy8u8c82DiHTjxkAOWjL14M6YaAxjacO+eG 6rVfuliSYRpgECng861ZYhpd7STMFpRr4LBEGf/xpkFG4rpN1ug1nyfFElWIfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638208449; a=rsa-sha256; cv=none; b=tOs+dxh8KXHHMAgkSyuU43oYBo+sEBxzbHWiRAYhHkouKBIqg/hO4CPA3u+sTAwpc0s/1n p132hts61dFGO0KVemc5omvpAy+28i/pkKAtKU3SC5TnNalu6+NSmxvJJxWY2a4HKRmaph /MlQKh/KaGA4r6NlbhmTtREaM5n8/gW7ZwidGjYW7rG6qau6T9wF4ehGL8Wu2sU0yteCna th4d+XkwzOoxOul8r/Shxn8Xjjo+cNmT1Lknmy9uKzhbpl8BM+5onyhnStvqwCkO67R3tY Rr0ZAZqDVtqSRqpjDdy1pIsbDo2UXk3B7/eqNAFtNM4t8wNtwZXcjP067uaWRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3dd3a395ba975d0fbe13320e6e69fb85b037da5e commit 3dd3a395ba975d0fbe13320e6e69fb85b037da5e Author: Neel Chauhan AuthorDate: 2021-11-16 22:59:26 +0000 Commit: Neel Chauhan CommitDate: 2021-11-29 17:53:45 +0000 ext2: Check for e2fs_first_dblock in ext2_compute_sb_data() This prevents a kernel panic on a damaged ext2 superblock. PR: 259107 Reported by: Robert Morris Differential Revision: https://reviews.freebsd.org/D33029 --- sys/fs/ext2fs/ext2_vfsops.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index 65f429949f55..0ab0327ae074 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -465,6 +465,13 @@ ext2_compute_sb_data(struct vnode *devvp, struct ext2fs *es, int g_count = 0; int error; + /* Check if first dblock is valid */ + if (fs->e2fs->e2fs_bcount >= 1024 && fs->e2fs->e2fs_first_dblock) { + SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, + "first dblock is invalid"); + return (EINVAL); + } + /* Check checksum features */ if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM) && EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_METADATA_CKSUM)) { @@ -611,7 +618,8 @@ ext2_compute_sb_data(struct vnode *devvp, struct ext2fs *es, return (EINVAL); } - if (le32toh(es->e2fs_first_dblock) >= fs->e2fs_bcount) { + if (le32toh(es->e2fs_first_dblock) != (fs->e2fs_bsize > 1024 ? 0 : 1) || + le32toh(es->e2fs_first_dblock) >= fs->e2fs_bcount) { SDT_PROBE1(ext2fs, , vfsops, ext2_compute_sb_data_error, "first data block out of range"); return (EINVAL); From nobody Mon Nov 29 17:56:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D7FFD18B987B; Mon, 29 Nov 2021 17:56: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 4J2tMl46LZz4fLh; Mon, 29 Nov 2021 17:56:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E05426BE9; Mon, 29 Nov 2021 17:56: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 1ATHupZj040841; Mon, 29 Nov 2021 17:56:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATHupaV040840; Mon, 29 Nov 2021 17:56:51 GMT (envelope-from git) Date: Mon, 29 Nov 2021 17:56:51 GMT Message-Id: <202111291756.1ATHupaV040840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Neel Chauhan Subject: git: 5c50e93e6ce4 - stable/13 - ext2fs: check for eh_depth in ext4_ext_check_header() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5c50e93e6ce43e8558e043de0745bad889c3a77f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638208611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u+nuTnlVzRxKj368N1s+ThPT3VKouCtEmZyKhok4m64=; b=cL+7eUqsixTo9S0PaltAeS8YHjM3MM2KPejAXDLdNm7rmVEYfHmfhWjK4zjFLNk5XrEoYk Xfd2UwhCqAXv338IQVfaQpFtMx1IXeR2onBrvFe3bIErBy7gumeHoJ01Htd3+NIRn/b6lg J/IBCzJ+if4dbJ/O7vBT19k0Rkgye7B7Ot42yj5yBb/87yikIAEb/3jEMzRLdTwz94t9z0 Tbed3yIzNm1xeNR0Rp2e11ZWeprfIotFjoqA9L+GH3ht5nQRGSeaXk0Dnn+gB3C8DzqTkj W9UvGGfnwFDkQw5+im2zQ10gqYPw3Gptf77LHsCLpzhKg9htWZzqwf5mqoM39w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638208611; a=rsa-sha256; cv=none; b=diyDJ1AeBtwwa+Mb8NZzno67VD3Waesrhw4RD/ifiOP6Ni2PBj2i5T2WrChpnVK02Y3DCK 5d97sXNQ4nXgnDut0maRhuGOvf9jCOJWL8q2+matHXmvWgtBu1uAQbjVOqzO3gWruphceI gS7VHvZFYufhqr5EJW2s+l1VOf3j2OxexsyKm9ys1bzv8rAsu6yjplJpXNBXqGxOhOSwy9 NNE9YbGcw63zPceJUNKX9Ovqm3BQnGAW5aeNGvnxmAwsQ/V+itaSLHxmxP9+yfDTwTPBLW U0tkzYxIjSXCZKc2Vzm80LO2LuKDZa8BpedUOHxwPlYGC2CeFl5qUgcD4/RbNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5c50e93e6ce43e8558e043de0745bad889c3a77f commit 5c50e93e6ce43e8558e043de0745bad889c3a77f Author: Neel Chauhan AuthorDate: 2021-11-17 00:25:04 +0000 Commit: Neel Chauhan CommitDate: 2021-11-29 17:56:42 +0000 ext2fs: check for eh_depth in ext4_ext_check_header() PR: 259112 Reported by: Robert Morris Reviewed by: fsu (src) Differential Revision: https://reviews.freebsd.org/D33030 (cherry picked from commit be60d8f276fa20fc11ad814e54c9c2540f79c7da) --- sys/fs/ext2fs/ext2_extents.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c index 1a5dca66dd76..b33ff9fa8a1a 100644 --- a/sys/fs/ext2fs/ext2_extents.c +++ b/sys/fs/ext2fs/ext2_extents.c @@ -251,6 +251,10 @@ ext4_ext_check_header(struct inode *ip, struct ext4_extent_header *eh) error_msg = "header: invalid eh_entries"; goto corrupted; } + if (eh->eh_depth > 5) { + error_msg = "header: invalid eh_depth"; + goto corrupted; + } return (0); From nobody Mon Nov 29 17:57:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3864718B9AD5; Mon, 29 Nov 2021 17:57: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 4J2tNH6Zxcz4fYR; Mon, 29 Nov 2021 17:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C158F26D41; Mon, 29 Nov 2021 17:57: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 1ATHvJgX040993; Mon, 29 Nov 2021 17:57:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATHvJDk040992; Mon, 29 Nov 2021 17:57:19 GMT (envelope-from git) Date: Mon, 29 Nov 2021 17:57:19 GMT Message-Id: <202111291757.1ATHvJDk040992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Neel Chauhan Subject: git: 8facf7082d49 - stable/12 - ext2fs: check for eh_depth in ext4_ext_check_header() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8facf7082d4973aedc30cdd8e90fbd33beb17d7f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638208640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vvNofMRg5rp+EaDlaYbkRzu9W2Ikqsvut59+CWUXWe4=; b=sZtYdvYA7NcbsimtomtnqyYgbd7gxHqgKdyN8hk931PEuqmA7jjReAJUNEkU1fRU3BDyjv 6ul+8XhT6BcHjDncvqxUyHHTX9YpeVUjPbHxPl3BaiUvc/1hdhsvUDX8moggMkiZj4Q73x g+shrz6EAnQfDFMWK/6xpm5kvVPu9DXAWH7BZ+izzoPvHfGS2lOFOivQVMJWsJS43EmqGm 1OfZf99EqQTLf0XLp8xI6ARGD+bpb+3O45tPGS2CnP48gUJl6XzcmGqjVTHjiQtNCat3gM zQ1p5O5fsmA0MCmCvfkH7CUasA6VtFO2RMIniA0SrL4noo5kEdMvrHJc9mhIAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638208640; a=rsa-sha256; cv=none; b=Mf2upW302/JFzxMghyWaSID5TbkVrObIpj8By/GFu2foGM/shXXJLlt3G7rXsaPBJ/yP+E VXb0+HWwL1MFSe35P6Vnta6xT6z9KgzQsf7JtQLweFXUi+cEoxan0gg+VQ3tPeme4Ho3yf +DalZurCBlCno7hol/XfBuwPR5g5wJVb7SEWx0/d54JmG5gi4fGceDz3LUaZFjGOAyp8jV GPaQH8BKhQzV8HSCapQR9pqlh+5KELbBO0BE5p0AxvfST6RCKpsn0wYSfnEtr4o+bQd3u1 DIaWDUlsnU2sXpcd2vTXT+dyGlxEcCnAMk5u3ZLRYIFAOKPaRVBH1i7jLIArzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8facf7082d4973aedc30cdd8e90fbd33beb17d7f commit 8facf7082d4973aedc30cdd8e90fbd33beb17d7f Author: Neel Chauhan AuthorDate: 2021-11-17 00:25:04 +0000 Commit: Neel Chauhan CommitDate: 2021-11-29 17:57:12 +0000 ext2fs: check for eh_depth in ext4_ext_check_header() PR: 259112 Reported by: Robert Morris Reviewed by: fsu (src) Differential Revision: https://reviews.freebsd.org/D33030 (cherry picked from commit be60d8f276fa20fc11ad814e54c9c2540f79c7da) --- sys/fs/ext2fs/ext2_extents.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c index 61c751e9af5e..ba95b8a6f3ae 100644 --- a/sys/fs/ext2fs/ext2_extents.c +++ b/sys/fs/ext2fs/ext2_extents.c @@ -250,6 +250,10 @@ ext4_ext_check_header(struct inode *ip, struct ext4_extent_header *eh) error_msg = "header: invalid eh_entries"; goto corrupted; } + if (eh->eh_depth > 5) { + error_msg = "header: invalid eh_depth"; + goto corrupted; + } return (0); From nobody Mon Nov 29 18:57:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ECC3418ADFC8; Mon, 29 Nov 2021 18:57: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 4J2vk84q9Dz3FdR; Mon, 29 Nov 2021 18:57:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86C7127C26; Mon, 29 Nov 2021 18:57: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 1ATIvqAi020363; Mon, 29 Nov 2021 18:57:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATIvqKE020362; Mon, 29 Nov 2021 18:57:52 GMT (envelope-from git) Date: Mon, 29 Nov 2021 18:57:52 GMT Message-Id: <202111291857.1ATIvqKE020362@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: d5ea04ee7ba6 - main - dummynet: Avoid an out-of-bounds read in do_config() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5ea04ee7ba6c7cd8e0918a080caf5f2c8fb3955 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638212272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GqFUQQPyzN5OCSH0/Qm6sf93g60U6bdZudxb+4dtNNU=; b=ugvXeWAH9ip/M14g20jFBJeNkji50Sx+kTtscp/c7BtsF+YGK8+ao3pw/Xp33X1MyyUiLr 32NPW0w0Q0xQbIdtwqI8zb2esZYiInxi/MKtC9GB/PwaOXjggILr2dSHI6aTNrBjtRdUOy s02YIE47fPJa6Ub2ydPZhErClwF61bogJnBi+Rs4qYy1QHm4MkWrXpHTE9oGHQPLR/cTsJ 7KkaIKSOhj7a3AE0zRzbPWbX5WqQdHBFw1+6P+oj1rPdcfjVdTjB9hvAEUIeh8B8wdbdn7 0NnAg8ZQUPDds0/Bn6iAa93icCKH/+0ADhKCFWHqybQE/VgOG1/+Are6MGZj+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638212272; a=rsa-sha256; cv=none; b=ru4J9enzyP0tcZCoaQt8BRQWJAOLXGX6z4Tlwq9QJO128jGjCPenLjcwPXu8uLQ7YCqR/3 jVQg+0rJx1JzLLxFAYshQMeQC3p8W6oZJnVsHO68fpG0Kal1dp7XZi6287wXs8ebfXc95E +bhhRJv3X6h6TIO2dJMf8WQ6jAO1tbTNe3K4SCGjPmdyET+GMAonH6iGbmlhFvvcY/Sx7t RR1s02kvx2bhfT6HKuUo9L7IEHz5JBV924a5YkwmMW3ISWmbfQwdE2boXhdKSTv8fO8+a4 24sfQOooOETAJVidNhsE0DnhVqOyjNUxZ+yxIMj4rm8Ld/ylAKF4VFcA19fz4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d5ea04ee7ba6c7cd8e0918a080caf5f2c8fb3955 commit d5ea04ee7ba6c7cd8e0918a080caf5f2c8fb3955 Author: Mark Johnston AuthorDate: 2021-11-29 18:50:21 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 18:57:24 +0000 dummynet: Avoid an out-of-bounds read in do_config() do_config() processes a buffer of variable-length dummynet commands. The loop which processes this buffer loads the fixed-length header before checking whether there are any bytes left to read, so it performs a 4-byte read past the end of the buffer before terminating. Restructure the loop to avoid this. Reported by: Jenkins (KASAN job) Reviewed by: kp MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33132 --- sys/netpfil/ipfw/ip_dummynet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c index a890507f7b31..919445ff71d0 100644 --- a/sys/netpfil/ipfw/ip_dummynet.c +++ b/sys/netpfil/ipfw/ip_dummynet.c @@ -2011,7 +2011,9 @@ do_config(void *p, int l) } arg = NULL; dn = NULL; - for (off = 0; l >= sizeof(o); memcpy(&o, (char *)p + off, sizeof(o))) { + off = 0; + while (l >= sizeof(o)) { + memcpy(&o, (char *)p + off, sizeof(o)); if (o.len < sizeof(o) || l < o.len) { D("bad len o.len %d len %d", o.len, l); err = EINVAL; From nobody Mon Nov 29 18:57:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 87F1818AE06E; Mon, 29 Nov 2021 18:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2vkB0C4lz3FbM; Mon, 29 Nov 2021 18:57:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1FC7279C8; Mon, 29 Nov 2021 18:57: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 1ATIvrrY020387; Mon, 29 Nov 2021 18:57:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATIvrkB020386; Mon, 29 Nov 2021 18:57:53 GMT (envelope-from git) Date: Mon, 29 Nov 2021 18:57:53 GMT Message-Id: <202111291857.1ATIvrkB020386@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: 1c732c85911e - main - dummynet: Fix socket option length validation for IP_DUMMYNET3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1c732c85911eb9e39071cbdb50dfb1f0d76de40f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638212274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L6vvSZ97LoBgCsw1vWwnhpjqp6rkcUhfom1yNkpxlSA=; b=ytPq4owkS/6QBGg7IXs0WRakJAWLy5g32+OnfC586DvV7HgSKNz1x/2j2F+Xq24bcOwdx7 PDR6SWnbH+5rw2xs9jdXPSL0tl+fL0eeqGbCbEb9HVkeZEKHsOUVyCzQVxng3znD50tU3N s6VKYFFvkbohPeb/5qKKrYbuRDIcN8+hzMWekjwjDOvMGdeeHqqosRS17tdcMARTRYHQUb JxlcnuhnQNqHqTyqU5N9Nk1Ia97zsMKelQzkIq88tIx4pNsdMofq4HgoItwhsHaRh1PYhI cV05GDn6fnPRSqKpY6W6NOEV8FidoCs+r0d2a+jokJgpxtl9Bbl53o1oln5BAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638212274; a=rsa-sha256; cv=none; b=hHNYgrXKV8OjjsygwpmAcg39JepzEX821bZoKeJSCRKV5nmTJ1ZOXe22pT+4cbjjk9Oeh3 wspACFFV/LCyavw6kXgh9blCuAooDgbv1l+OPDFCbEM0i+SUoXoTiyhYFFLg3y4iQz+hT6 Xl8TJStYTwYg7LM47hAchMprAPuMFGFUtZ0/doKepgoF6Ug7rgHBWztu1/qZN7Xae2dEsD A1LcHsjHzWq6fRC0dA6fxb83mULiAFvT50Ty+t7jn8RTTBTmLnHkw0UIhbD13tHA41gWGF ZVCP8kf2PEilgp53OUATQs+qSA9jQ3vrW7ctOdNH0gSLfXcrfl973s0aTFCnKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1c732c85911eb9e39071cbdb50dfb1f0d76de40f commit 1c732c85911eb9e39071cbdb50dfb1f0d76de40f Author: Mark Johnston AuthorDate: 2021-11-29 18:50:30 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 18:57:24 +0000 dummynet: Fix socket option length validation for IP_DUMMYNET3 The socket option handler tries to ensure that the option length is no larger than some reasonable maximum, and no smaller than sizeof(struct dn_id). But the loaded option length is stored in an int, which is converted to an unsigned integer for the comparison with a size_t, so negative values are not caught and instead get passed to malloc(). Change the code to use a size_t for the buffer size. Reviewed by: kp MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33133 --- sys/netpfil/ipfw/ip_dn_private.h | 2 +- sys/netpfil/ipfw/ip_dummynet.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/netpfil/ipfw/ip_dn_private.h b/sys/netpfil/ipfw/ip_dn_private.h index cc084f2fcc0d..25015fe02c2d 100644 --- a/sys/netpfil/ipfw/ip_dn_private.h +++ b/sys/netpfil/ipfw/ip_dn_private.h @@ -437,7 +437,7 @@ int dn_compat_copy_queue(struct copy_args *a, void *_o); int dn_compat_copy_pipe(struct copy_args *a, void *_o); int copy_data_helper_compat(void *_o, void *_arg); int dn_compat_calc_size(void); -int do_config(void *p, int l); +int do_config(void *p, size_t l); /* function to drain idle object */ void dn_drain_scheduler(void); diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c index 919445ff71d0..0cd606bd56b2 100644 --- a/sys/netpfil/ipfw/ip_dummynet.c +++ b/sys/netpfil/ipfw/ip_dummynet.c @@ -1991,7 +1991,7 @@ dummynet_flush(void) * processed on a config_sched. */ int -do_config(void *p, int l) +do_config(void *p, size_t l) { struct dn_id o; union { @@ -2015,7 +2015,7 @@ do_config(void *p, int l) while (l >= sizeof(o)) { memcpy(&o, (char *)p + off, sizeof(o)); if (o.len < sizeof(o) || l < o.len) { - D("bad len o.len %d len %d", o.len, l); + D("bad len o.len %d len %zu", o.len, l); err = EINVAL; break; } @@ -2487,7 +2487,8 @@ ip_dn_ctl(struct sockopt *sopt) { struct epoch_tracker et; void *p = NULL; - int error, l; + size_t l; + int error; error = priv_check(sopt->sopt_td, PRIV_NETINET_DUMMYNET); if (error) @@ -2516,14 +2517,14 @@ ip_dn_ctl(struct sockopt *sopt) error = ip_dummynet_compat(sopt); break; - case IP_DUMMYNET3 : + case IP_DUMMYNET3: if (sopt->sopt_dir == SOPT_GET) { error = dummynet_get(sopt, NULL); break; } l = sopt->sopt_valsize; if (l < sizeof(struct dn_id) || l > 12000) { - D("argument len %d invalid", l); + D("argument len %zu invalid", l); break; } p = malloc(l, M_TEMP, M_NOWAIT); @@ -2532,9 +2533,8 @@ ip_dn_ctl(struct sockopt *sopt) break; } error = sooptcopyin(sopt, p, l, l); - if (error) - break ; - error = do_config(p, l); + if (error == 0) + error = do_config(p, l); break; } From nobody Mon Nov 29 18:57:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7339618AE072; Mon, 29 Nov 2021 18:57: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 4J2vkC1sqXz3FVG; Mon, 29 Nov 2021 18:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9D0D27A60; Mon, 29 Nov 2021 18:57: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 1ATIvsMs020418; Mon, 29 Nov 2021 18:57:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATIvsjL020417; Mon, 29 Nov 2021 18:57:54 GMT (envelope-from git) Date: Mon, 29 Nov 2021 18:57:54 GMT Message-Id: <202111291857.1ATIvsjL020417@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: 7a3372303802 - main - mii/dp83822phy: Remove a declaration for a non-existent function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7a3372303802eb4afd1f3582ea05bffbc53f047d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638212275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/apVQAdot05XIIoiqy7LKslW1rB0J1t/sZN+ZAM0DN0=; b=pzZam9dr5S+W2UtkAaDEwDTBUqh3kFu24Y41tJa9vqfug4G87YqSb4Xuk2WYT3+JbW2Qq/ 7zuCVr+MQ87PygiI63ytvjjzfbUxcHQZPHGTBdCIEAW1Xv+L1TIOwrdfXiQAaEGc1MxUQg OVcmtEHs5PkKrPaTGiku+3eZOVTs0SMoKLuX58Ji+6hSCodsgO1jOqtmN/O/KXlvsHk6n9 zX2X0fD22hAblPfnNuo+cu0wpofIS+zpXNVT3/tK4yzxnTm92UUh6AbVd8ysP+LP5P26Cw +iLuV8ktfFiZfQYVU3eOrVTDw5YyWM61nkW+xCUrunYae6KDbxeukiaAZthB8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638212275; a=rsa-sha256; cv=none; b=FSLYcgkQ/hTCcg59jhU1doo9zyPE2pthkjTW1tGZrvhmOMcPJObxlQCAzOnPih0c1wSO6X amVTLOaL+9kgeRL8VPNBO9xdbp9ddSM/enOjlTM2WHCXnmFFKPHSMDJFknmyaxHYEyEaN+ GVliqe8mFZ9HDPcQY6MdJcgUpeHxF5bYJqNlp/inE4a+kuK+JgWbcQGKGAwaGYv9hOeM3J ap9rknD9P/OxGm93KJsO5ULo/EFWM2pth7K3S+uPWiQxbASH57/rnhsHX8m2DhA4RdDFRO Y6aBgJT3WsYWuq5z2wg6Pc1DX2hk+LS0PstZ9hvs3gUkkCt2Nfe3REugY0vo1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7a3372303802eb4afd1f3582ea05bffbc53f047d commit 7a3372303802eb4afd1f3582ea05bffbc53f047d Author: Mark Johnston AuthorDate: 2021-11-29 18:51:05 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 18:57:24 +0000 mii/dp83822phy: Remove a declaration for a non-existent function Fixes: 0c9156faeccb ("Introduce DP83822 PHY driver") --- sys/dev/mii/dp83822phy.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/mii/dp83822phy.c b/sys/dev/mii/dp83822phy.c index 181fc610be76..ac5c8b19be39 100644 --- a/sys/dev/mii/dp83822phy.c +++ b/sys/dev/mii/dp83822phy.c @@ -78,7 +78,6 @@ __FBSDID("$FreeBSD$"); #define DP83822_MISR2_INT_STS_SHIFT 8 static int dp_service(struct mii_softc*, struct mii_data*, int); -static void dp_status(struct mii_softc*); struct dp83822_softc { struct mii_softc mii_sc; From nobody Mon Nov 29 18:57:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CD03718AE2BD; Mon, 29 Nov 2021 18:57: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 4J2vkD488yz3FK0; Mon, 29 Nov 2021 18:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1936277EE; Mon, 29 Nov 2021 18:57: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 1ATIvtu0020442; Mon, 29 Nov 2021 18:57:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATIvtAq020441; Mon, 29 Nov 2021 18:57:55 GMT (envelope-from git) Date: Mon, 29 Nov 2021 18:57:55 GMT Message-Id: <202111291857.1ATIvtAq020441@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: 9ff084f0fab6 - main - libelf: Link gelf_getchdr.3 to the build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ff084f0fab6846aa6f30bb1aac9692461405f86 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638212276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JQSOy/88s2iVJgZhQv1zhRa+81dJm3DO2VHBCoUPGnk=; b=pe7XoB280wBcl4D6ot6/pfnBoo3l/8Ja9OgiNCk5VAUh+bNDL6ftxfnLY44EsWoHw+MzeX zHFA2VNUKCKm4e4B28YX5DvSvHhppbo7RGWOllMqhorscNcigviNPFXK9di0tcfqTRLXN9 4+94HgqXPYzsPPsF86rB1I2BhIwetcNsEbrpilwuxn1zqL3FM/VEMJF2mUl/zWaLD/tfEJ bwYQmF/5cGptWsF4uQNrpX6rjicyjoeFAP+5Ev6yW28f/XtiO2Ih3BPC4ZuFZpJJ6NTbIs /LXLE7/6+b16KCSxbcbuhTtDxIyLTL9iWqkwx/IIylAWi6Xo/PQKEjm7c35wIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638212276; a=rsa-sha256; cv=none; b=TJsyxa7hYsdpzei7QLjJE6LXi08MFJ9oy/peMPM5HQYoufPXn/yCqgTH1BzutftUhBVlRm si9Gv5xRPtMh7g5LFNOk55koDN4YSguMLXPOaWWvkpByOR/Nzy7wvVnIoloVelJk2p2wVR QjL+8pDmwnP9wx1PFztkoKdOo42iPc1dcELsXJ3L3uCCiRQ3/XELWK/v0qcFYi3q6iZBRR 08mC0ALeCEKqJWLJoxOJH9kMWA+WWnpbL8G3wEIBRAhfJeEMkEkFQJiEJ17tM2dH5azk8q dJG7tuDzuH/Vz8oLtrpnSkPQGAMAvi411/gf+MW/5OVrTMIA34CKoFXIbZoBxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9ff084f0fab6846aa6f30bb1aac9692461405f86 commit 9ff084f0fab6846aa6f30bb1aac9692461405f86 Author: Mark Johnston AuthorDate: 2021-11-29 18:51:38 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 18:57:24 +0000 libelf: Link gelf_getchdr.3 to the build MFC after: 1 week Sponsored by: The FreeBSD Foundation --- lib/libelf/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libelf/Makefile b/lib/libelf/Makefile index 8174f4e06bba..9f21da5267eb 100644 --- a/lib/libelf/Makefile +++ b/lib/libelf/Makefile @@ -132,6 +132,7 @@ MAN= elf.3 \ gelf_checksum.3 \ gelf_fsize.3 \ gelf_getcap.3 \ + gelf_getchdr.3 \ gelf_getclass.3 \ gelf_getdyn.3 \ gelf_getehdr.3 \ @@ -179,6 +180,7 @@ MLINKS+= \ MLINKS+= \ gelf_checksum.3 elf${E}_checksum.3 \ gelf_fsize.3 elf${E}_fsize.3 \ + gelf_getchdr.3 elf${E}_getchdr.3 \ gelf_getehdr.3 elf${E}_getehdr.3 \ gelf_getphdr.3 elf${E}_getphdr.3 \ gelf_getshdr.3 elf${E}_getshdr.3 \ From nobody Mon Nov 29 18:57:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A66B318AE178; Mon, 29 Nov 2021 18: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 4J2vkG3r08z3Fc4; Mon, 29 Nov 2021 18:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FE8827C27; Mon, 29 Nov 2021 18:57: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 1ATIvulP020466; Mon, 29 Nov 2021 18:57:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATIvu4f020465; Mon, 29 Nov 2021 18:57:56 GMT (envelope-from git) Date: Mon, 29 Nov 2021 18:57:56 GMT Message-Id: <202111291857.1ATIvu4f020465@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: e0189cf66a94 - main - elf.5: Document compressed section headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e0189cf66a94e1149793caf4dea17288da22a0c3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638212279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NNzVrSBgob6doIheE+GA0eu6JVbmT74eW2Wf7R9FZHA=; b=qrQxSshyOxawUgU9zfXeNJKjzevWStybyrIS3vcJ1VrCaO/Wk+hvlwcfjEGEHnbWkhUgw6 B53WZknneeXkfyxyy82E2LorxlKotQjeAiH8rLNThXkjzPfpGRAF5VTFAURvoKEGW/G8z4 Xhb8tBEaDzmmauuLC2JIhHHs0RkWs8wNb18GUxG+gzyU6lsTY8RuYNrb1B+Vh/e/UpyeVa J+h4cCO5pFT5E/CCqeTGpVrHtKWM0TE66XbL+lapUMU3uu7KjNZHCbQYHDc4faPPYPTXQQ VIXNpuDfdL101cQConhjPfJwl4+jStC3EB1t7KX/x9oLGOHca06yWo1X8ktOwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638212279; a=rsa-sha256; cv=none; b=oarcs6mGwG41iBnHB+PAtzJ+LWThFUwnIBM6NLpRd/dtxvnA+W+g4yrDR1UYJUXF4x54z+ OGovqGzAbEdu1Ej1s2Qgg1gK4/DdcjcyVyE2jbTSEEHB1mowTdDuRyHXinlL0vYWRwAZVY hQ4kbx70G8LyOnixbNqguwoY8dcV/Rfwg9/UGwkC7WsDGxRdgoLn9ufQznW0aWWe6imutE K65hunUYB017vLSPRH++PMmQARhtE3vSLjd292eo21NKY0/h8FAvBanhpMr38Q+HPLptm/ AB0nujZ/bbsoN3WCY8rLUrlLkMwr3AKFAY6uoJ+WSG1GDCscowxPn56VAQKdoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e0189cf66a94e1149793caf4dea17288da22a0c3 commit e0189cf66a94e1149793caf4dea17288da22a0c3 Author: Mark Johnston AuthorDate: 2021-11-29 18:51:50 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 18:57:24 +0000 elf.5: Document compressed section headers Reviewed by: emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33138 --- share/man/man5/elf.5 | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/share/man/man5/elf.5 b/share/man/man5/elf.5 index 3134e8614988..81376e7e6bb9 100644 --- a/share/man/man5/elf.5 +++ b/share/man/man5/elf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2020 +.Dd November 27, 2021 .Dt ELF 5 .Os .Sh NAME @@ -795,6 +795,8 @@ The section contains executable machine instructions. .It Dv SHF_MASKPROC All bits included in this mask are reserved for processor-specific semantics. +.It Dv SHF_COMPRESSED +The section data is compressed. .El .Pp .It Dv sh_addr @@ -1069,6 +1071,50 @@ be registered. This section holds information used for C++ exception-handling. .El .Pp +A section with the +.Dv SHF_COMPRESSED +flag set contains a compressed copy of the section data. +Compressed section data begins with an +.Vt Elf64_Chdr +or +.Vt Elf32_Chdr structure +which encodes the compression algorithm and some characteristics of the +uncompressed data. +.Bd -literal -offset indent +typedef struct { + Elf32_Word ch_type; + Elf32_Word ch_size; + Elf32_Word ch_addralign; +} Elf32_Chdr; +.Ed +.Bd -literal -offset indent +typedef struct { + Elf64_Word ch_type; + Elf64_Word ch_reserved; + Elf64_Xword ch_size; + Elf64_Xword ch_addralign; +} Elf64_Chdr; +.Ed +.Pp +.Bl -tag -width "ch_addralign" -compact +.It Dv ch_type +The compression algorithm used. +A value of +.Dv ELFCOMPRESS_ZLIB +indicates that the data is compressed using +.Xr zlib 3 . +.It Dv ch_size +The size, in bytes, of the uncompressed section data. +This corresponds to the +.Sy sh_size +field of a section header containing uncompressed data. +.It Dv ch_addralign +The address alignment of the uncompressed section data. +This corresponds to the +.Sy sh_addralign +field of a section header containing uncompressed data. +.El +.Pp String table sections hold null-terminated character sequences, commonly called strings. The object file uses these strings to represent symbol @@ -1342,6 +1388,7 @@ writeable and executable. .Xr objdump 1 , .Xr readelf 1 , .Xr execve 2 , +.Xr zlib 3 , .Xr ar 5 , .Xr core 5 .Rs From nobody Mon Nov 29 22:05:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1B3C518C7917; Mon, 29 Nov 2021 22:05:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2ztZ5y82z3GPr; Mon, 29 Nov 2021 22:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC4552740; Mon, 29 Nov 2021 22:05: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 1ATM5Q9l075513; Mon, 29 Nov 2021 22:05:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5QRf075512; Mon, 29 Nov 2021 22:05:26 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:26 GMT Message-Id: <202111292205.1ATM5QRf075512@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 33f9ea209e95 - main - syscalls: add missing SAL annotations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 33f9ea209e954cfa3a89d05b400198bf14dd7ad6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pMxQoPIYGhfbpRAR5K1pPJTbPz4DI/YuBOhBEZLCZ0M=; b=ieCPjuEuSCZN3yTmwXuMqLnceXBe+ojtzpi50Ngog9wfc30m0DPD3Qe8LYenH+zRAN/EES 5XmQBEQ6RORF+IJTeMIiugNONK6PP/Ba+D7bgDi6zrOIdLhv+zk41l3uD72B4aS1MRvyV8 HQbkkckTiVqz/TOWerOggf3HzL79606VIOqX/RWhj/sQxJ0lOHcRpIiMbR8T/Vddcfek1u MxJzQu2INgXGk5RUJuhJpXLpDn8yQ0JpQkOCW/PS917t4C1M6h6DoJzWK7RvdKi9QhIwfK b3vFbcErxtWtPZ0IQckPmH9heP46BMls6LmZND/24CiyWYyHNAhoQ3/D7XFGSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223526; a=rsa-sha256; cv=none; b=eogRYkLciQyfUWRic9/heoF37wxLj4mEhPoCJegin+Fib+Qj5kqRAzqzVvQalOZVPyjvTS BY1V7nUJZg91ALzdJU+NxSraIEOWO2XXGwHCaE0w0xbdZUG/GIX51Ail1QvZ7mPDgWkkBv +cG/H8z8RLaRBHv8XBoC601y2zO67KJl6aDHtdjmkinBI1oS6wE8F+687CqyoCZDOYcjdS Okc7g07WE06obWIoAQ4NJ6eth92RvEneMsKeWxLldq8XkGMVQYluIVmt3W772Itf4UTTt4 +f/YSuUEzzTOckw/7Rviaez56YCXON8RM8HToWtLwBGnEbDvjHT193NT/4y/Fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=33f9ea209e954cfa3a89d05b400198bf14dd7ad6 commit 33f9ea209e954cfa3a89d05b400198bf14dd7ad6 Author: Brooks Davis AuthorDate: 2021-11-29 22:02:59 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:41 +0000 syscalls: add missing SAL annotations freebsd7_shmctl was missing an annotation Reviewed by: kib, imp --- sys/kern/syscalls.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 315e2692bfa1..45e4bb8d830e 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1341,7 +1341,7 @@ int shmctl( int shmid, int cmd, - _Contains_long_ struct shmid_ds_old *buf + _Inout_opt_ _Contains_long_ struct shmid_ds_old *buf ); } 230 AUE_SHMDT NOSTD { From nobody Mon Nov 29 22:05:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6DD8E18C76FB; Mon, 29 Nov 2021 22:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2ztb73dWz3GSM; Mon, 29 Nov 2021 22:05:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF5DC2697; Mon, 29 Nov 2021 22:05: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 1ATM5Rx2075537; Mon, 29 Nov 2021 22:05:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5R1l075536; Mon, 29 Nov 2021 22:05:27 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:27 GMT Message-Id: <202111292205.1ATM5R1l075536@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 3660e76a2220 - main - syscalls: correct a couple style 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3660e76a2220d5218b4c28c2d2f2c90142f1ec4e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vQrS8eEi4Sk4w350nvdbBJzi2lBeI+Z6eDB72hkwnDY=; b=u6plzDY2YTbhA0BmIZc3i9pjUs1KEqGwZZqQnGZCPqJPzPeN+FieSkqJ/L/nkmMs7BEw8i be4H/DX4apBA+NZ11BMmiY2IJ8f4Fv6XnakFqD3NVPQ8eSS5FIad6bUeV8V89NVUIVjkus RMLIgrS0c24xwwqn6mxo77S0t77gdhiiYYZKiobcpVp4wKg+zWF0XC9Z5UE5esWak9ViMc qFkfm7yVB3p/djo4VbYmZ+j9WdYYoL9rFpxueQ1nLTHz5bRFPd1qjd2mKwTHYrHvSItSzD l23oeBxJ7OywuUD0dTD7RsHZCsKOvVTddxo1UwTb3UvKeE4FQ6BNXib09hivKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223528; a=rsa-sha256; cv=none; b=iL+z2tFtJmboJVad1JRmxGt1Zxwtnn2XEktnOWipszb1UYf+Fw3T/Vo99iiQluQ2F3P2eJ ZOmfAzVCIo592ahKfrbSVuhRtT8X+mmMXxPg433pI2CWCr+ACTGGHUtBko9Wcq5kCEjGAM 17tLrw7hZb4sD78J3HLeItHu5lPZ4PRu/VHmixwCQY3T6v8dl+5B8f+kA+CFOEDbLRwnP5 aIgkSjB4JsAwxPBBlv6OOmS5NMR1d4aSOkdTissRtHrdBJKiuIuZrHc+cLc+tAbaidq7V0 j4mT6Be63uLi6ZotXPLLqDTIRBjxG6U51T/0e1C552EP2ZwOllMBbN6gYfhFAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=3660e76a2220d5218b4c28c2d2f2c90142f1ec4e commit 3660e76a2220d5218b4c28c2d2f2c90142f1ec4e Author: Brooks Davis AuthorDate: 2021-11-29 22:02:59 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:41 +0000 syscalls: correct a couple style issues Reviewed by: kib, imp --- sys/kern/syscalls.master | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 45e4bb8d830e..a989d7f5f9b6 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1743,7 +1743,7 @@ } 335 AUE_NULL STD|CAPENABLED { int utrace( - _In_reads_bytes_(len) const void *addr, + _In_reads_bytes_(len) const void *addr, size_t len ); } @@ -2337,8 +2337,7 @@ ssize_t extattr_list_link( _In_z_ const char *path, int attrnamespace, - _Out_writes_bytes_opt_(nbytes) - void *data, + _Out_writes_bytes_opt_(nbytes) void *data, size_t nbytes ); } From nobody Mon Nov 29 22:05:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2955818C7927; Mon, 29 Nov 2021 22:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2ztd1SPZz3GNR; Mon, 29 Nov 2021 22:05:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5B822597; Mon, 29 Nov 2021 22:05: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 1ATM5Sxr075561; Mon, 29 Nov 2021 22:05:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5Sll075560; Mon, 29 Nov 2021 22:05:28 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:28 GMT Message-Id: <202111292205.1ATM5Sll075560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 28f047188492 - main - uipc: rework recvfrom, getsockname, getpeername List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28f047188492c8f2ddca66f162fd2ac9bdc170a6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UyVp2pN3Bk3+B5ym+wBaGpUfTN+xEwlnXENyO30JQVo=; b=m44rPwp5n382xM9nRWDp0wpewBtYPivjpmo9uzwy3pUX0iU+CcEAOgI7IO1seoOp0vb9Ml ZtElz/v5SnfIv27z77FEWgZI7lUhdb8K6DuefcVLuEqnJCSMBt0135pOM5E32g8j8QgOjf ndezGy5NGL4ZPFZw4bds7NmqiqrYzv1uDU5+JQRI2nMkJu7wu5qUqqM6mLSNrBt7ns3P15 3PgbdXTYfYRXAUOexQh2oAOBwcibUBZdKwR3965HZaiJnhyjazwcB944aytu2bhijUC+x/ K+SYYDeFXU7DdbKoW8KmGI6caWXnquCk9g9E2fpvqncTFTOo/cGJgxcl1Kj44Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223529; a=rsa-sha256; cv=none; b=cTL87BmtBSi8ICXs+ARsKboscuBmEXskWT1Ky8qGFr63lIvSRCzUWqlwooyT0R6ilOL/qY PD5F7EWonfftc/d6tOXxh/vd7vyQBPKwQQttg4ZDFip9HGni6EymMw0oRNzGpwV2K9TEtT oUDRE2d+UjlhQgku4tT6i2Xjgm7AdbTD4wtitv249Lm/ZTAYX4jYpvb0mPujqx5fEwoSYG OPcY3/YjiN1tKJPLGG7vs7ZLWORzPsmD604RnwrGCFvmJIF07Zuoj8yI+Kxa/JxOfh4uBO ge4wg3Soe6lQUOKASMqtYJTG2gx57d5ZFJ+75JPsBXF3DsB820wWyqaNEDUq2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=28f047188492c8f2ddca66f162fd2ac9bdc170a6 commit 28f047188492c8f2ddca66f162fd2ac9bdc170a6 Author: Brooks Davis AuthorDate: 2021-11-29 22:02:59 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:41 +0000 uipc: rework recvfrom, getsockname, getpeername Stop using _args structs as part of internal kernel APIs. Add a kern_recvfrom and adjust getsockname and getpeername's equivalent functions to take individual arguments rather than a uap pointer. Adopt a convention from CheriBSD that a function interacting with userspace pointers and sitting between the sys_ syscall and kern_ implementation is named user_. Reviewed by: kib, imp --- sys/kern/uipc_syscalls.c | 79 +++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 44079bae1e9b..3111ce7e16e4 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -78,10 +78,6 @@ static int recvit(struct thread *td, int s, struct msghdr *mp, void *namelenp); static int accept1(struct thread *td, int s, struct sockaddr *uname, socklen_t *anamelen, int flags); -static int getsockname1(struct thread *td, struct getsockname_args *uap, - int compat); -static int getpeername1(struct thread *td, struct getpeername_args *uap, - int compat); static int sockargs(struct mbuf **, char *, socklen_t, int); /* @@ -1069,40 +1065,48 @@ recvit(struct thread *td, int s, struct msghdr *mp, void *namelenp) return (error); } -int -sys_recvfrom(struct thread *td, struct recvfrom_args *uap) +static int +kern_recvfrom(struct thread *td, int s, void *buf, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlenaddr) { struct msghdr msg; struct iovec aiov; int error; - if (uap->fromlenaddr) { - error = copyin(uap->fromlenaddr, - &msg.msg_namelen, sizeof (msg.msg_namelen)); + if (fromlenaddr != NULL) { + error = copyin(fromlenaddr, &msg.msg_namelen, + sizeof (msg.msg_namelen)); if (error != 0) goto done2; } else { msg.msg_namelen = 0; } - msg.msg_name = uap->from; + msg.msg_name = from; msg.msg_iov = &aiov; msg.msg_iovlen = 1; - aiov.iov_base = uap->buf; - aiov.iov_len = uap->len; + aiov.iov_base = buf; + aiov.iov_len = len; msg.msg_control = 0; - msg.msg_flags = uap->flags; - error = recvit(td, uap->s, &msg, uap->fromlenaddr); + msg.msg_flags = flags; + error = recvit(td, s, &msg, fromlenaddr); done2: return (error); } +int +sys_recvfrom(struct thread *td, struct recvfrom_args *uap) +{ + return (kern_recvfrom(td, uap->s, uap->buf, uap->len, + uap->flags, uap->from, uap->fromlenaddr)); +} + + #ifdef COMPAT_OLDSOCK int orecvfrom(struct thread *td, struct recvfrom_args *uap) { - - uap->flags |= MSG_COMPAT; - return (sys_recvfrom(td, uap)); + return (kern_recvfrom(td, uap->s, uap->buf, uap->len, + uap->flags | MSG_COMPAT, uap->from, uap->fromlenaddr)); } #endif @@ -1331,21 +1335,19 @@ kern_getsockopt(struct thread *td, int s, int level, int name, void *val, return (error); } -/* - * getsockname1() - Get socket name. - */ static int -getsockname1(struct thread *td, struct getsockname_args *uap, int compat) +user_getsockname(struct thread *td, int fdes, struct sockaddr *asa, + socklen_t *alen, bool compat) { struct sockaddr *sa; socklen_t len; int error; - error = copyin(uap->alen, &len, sizeof(len)); + error = copyin(alen, &len, sizeof(len)); if (error != 0) return (error); - error = kern_getsockname(td, uap->fdes, &sa, &len); + error = kern_getsockname(td, fdes, &sa, &len); if (error != 0) return (error); @@ -1354,11 +1356,11 @@ getsockname1(struct thread *td, struct getsockname_args *uap, int compat) if (compat && SV_PROC_FLAG(td->td_proc, SV_AOUT)) ((struct osockaddr *)sa)->sa_family = sa->sa_family; #endif - error = copyout(sa, uap->asa, (u_int)len); + error = copyout(sa, asa, len); } free(sa, M_SONAME); if (error == 0) - error = copyout(&len, uap->alen, sizeof(len)); + error = copyout(&len, alen, sizeof(len)); return (error); } @@ -1404,34 +1406,30 @@ bad: int sys_getsockname(struct thread *td, struct getsockname_args *uap) { - - return (getsockname1(td, uap, 0)); + return (user_getsockname(td, uap->fdes, uap->asa, uap->alen, false)); } #ifdef COMPAT_OLDSOCK int ogetsockname(struct thread *td, struct getsockname_args *uap) { - - return (getsockname1(td, uap, 1)); + return (user_getsockname(td, uap->fdes, uap->asa, uap->alen, true)); } #endif /* COMPAT_OLDSOCK */ -/* - * getpeername1() - Get name of peer for connected socket. - */ static int -getpeername1(struct thread *td, struct getpeername_args *uap, int compat) +user_getpeername(struct thread *td, int fdes, struct sockaddr *asa, + socklen_t *alen, int compat) { struct sockaddr *sa; socklen_t len; int error; - error = copyin(uap->alen, &len, sizeof (len)); + error = copyin(alen, &len, sizeof (len)); if (error != 0) return (error); - error = kern_getpeername(td, uap->fdes, &sa, &len); + error = kern_getpeername(td, fdes, &sa, &len); if (error != 0) return (error); @@ -1440,11 +1438,11 @@ getpeername1(struct thread *td, struct getpeername_args *uap, int compat) if (compat && SV_PROC_FLAG(td->td_proc, SV_AOUT)) ((struct osockaddr *)sa)->sa_family = sa->sa_family; #endif - error = copyout(sa, uap->asa, (u_int)len); + error = copyout(sa, asa, len); } free(sa, M_SONAME); if (error == 0) - error = copyout(&len, uap->alen, sizeof(len)); + error = copyout(&len, alen, sizeof(len)); return (error); } @@ -1495,17 +1493,14 @@ done: int sys_getpeername(struct thread *td, struct getpeername_args *uap) { - - return (getpeername1(td, uap, 0)); + return (user_getpeername(td, uap->fdes, uap->asa, uap->alen, 0)); } #ifdef COMPAT_OLDSOCK int ogetpeername(struct thread *td, struct ogetpeername_args *uap) { - - /* XXX uap should have type `getpeername_args *' to begin with. */ - return (getpeername1(td, (struct getpeername_args *)uap, 1)); + return (user_getpeername(td, uap->fdes, uap->asa, uap->alen, 1)); } #endif /* COMPAT_OLDSOCK */ From nobody Mon Nov 29 22:05:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BDFBD18C7992; Mon, 29 Nov 2021 22:05: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 4J2ztf3Qhcz3G5d; Mon, 29 Nov 2021 22:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 185762598; Mon, 29 Nov 2021 22:05: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 1ATM5UJ8075585; Mon, 29 Nov 2021 22:05:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5TQZ075584; Mon, 29 Nov 2021 22:05:29 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:29 GMT Message-Id: <202111292205.1ATM5TQZ075584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: ba4e5253a38e - main - syscalls: normalize orecvfrom and ogetsockname List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba4e5253a38e13ff14ac25fbef98b24be179d529 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZExUDx3Z8Pzqar22GvD9MgwPZwN/5eCc5oyU+HavgdY=; b=BqxYerS9PYRuLz5bQmiRkOBJNsFsP5OCMg0LMIWVsBHrCnW9ZfLDRqTdwhkYiCkzJhicna H/E/f9n15K5YtIHsBtC7sW+0Am8NMBfHpzWU++jS2ucaj05Gm+7fTb3myJlI53tdBs/ZBA zn4jM2lCUpDXsfeu+ntuk2wLKhAwc/IGyLOeth9R4ib7wcVx3TIc1O9hfQ12l1nszZLt1j ef/GYgl8Fht7+5Vwffx0misu8zZ6l6EzFHWubI7ycsO6NAsTz3U8/0iFXYea+/jSo20i+d ukXDbqR/l9EaNpNHm7dgm/dv4UOMkPKUuDt9Bho3p0z49ut3gHFRbw6R+2Wf1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223530; a=rsa-sha256; cv=none; b=gqx7vWu4K7nT6LEWYTRxcVXkr7FSSEP4JRxZqB+n8xKIxUhPNxKnCmpnShDUN5tpSYEotG zezPfGRfbcNYopiMDmL9wKFUIBsy5XEOle9F2M9MPOWv5+TncaxmVeTiSYa/O5GgTpy98U OBM1uGFdTuVpw6vblZuOqJdUuQBWmhgI4dzHuN7TloG5dxZrvBwxzF/cvDu4eCtx76Bf4k D4UQ5Y2qlpI186YzRUm2+Ou+kuwr8AYeCm8wdfUnY/f3Wkj+FlMRlf2u1CzXQkfXWirNYM NnA149zXuCKCTmbQGpwh15wEHW5WcbGlPTxVkuXfS1ndwgmGEHQxlERWJKRyGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ba4e5253a38e13ff14ac25fbef98b24be179d529 commit ba4e5253a38e13ff14ac25fbef98b24be179d529 Author: Brooks Davis AuthorDate: 2021-11-29 22:02:59 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:42 +0000 syscalls: normalize orecvfrom and ogetsockname Declare o_args rather than reusing the equivalent _args structs. Avoiding the addition of a new type isn't worth the gratutious differences. Reviewed by: kib, imp --- sys/kern/syscalls.master | 10 +++++----- sys/kern/uipc_syscalls.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index a989d7f5f9b6..6e89f2c313ea 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -816,7 +816,7 @@ mode_t mode ); } -125 AUE_RECVFROM COMPAT|NOARGS|CAPENABLED { +125 AUE_RECVFROM COMPAT|CAPENABLED { int recvfrom( int s, _Out_writes_(len) void *buf, @@ -825,7 +825,7 @@ _Out_writes_bytes_(*fromlenaddr) struct sockaddr *from, _Inout_ __socklen_t *fromlenaddr ); - } recvfrom recvfrom_args int + } 126 AUE_SETREUID STD|CAPENABLED { int setreuid( int ruid, @@ -963,13 +963,13 @@ 149 AUE_O_QUOTA COMPAT { int quota(void); } -150 AUE_GETSOCKNAME COMPAT|NOARGS|CAPENABLED { +150 AUE_GETSOCKNAME COMPAT|CAPENABLED { int getsockname( - int fdec, + int fdes, _Out_writes_bytes_(*alen) struct sockaddr *asa, _Inout_ __socklen_t *alen ); - } getsockname getsockname_args int + } 151-153 AUE_NULL RESERVED ; 154 is initialised by the NLM code, if present. 154 AUE_NULL NOSTD { diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 3111ce7e16e4..0e083e058916 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1103,7 +1103,7 @@ sys_recvfrom(struct thread *td, struct recvfrom_args *uap) #ifdef COMPAT_OLDSOCK int -orecvfrom(struct thread *td, struct recvfrom_args *uap) +orecvfrom(struct thread *td, struct orecvfrom_args *uap) { return (kern_recvfrom(td, uap->s, uap->buf, uap->len, uap->flags | MSG_COMPAT, uap->from, uap->fromlenaddr)); @@ -1411,7 +1411,7 @@ sys_getsockname(struct thread *td, struct getsockname_args *uap) #ifdef COMPAT_OLDSOCK int -ogetsockname(struct thread *td, struct getsockname_args *uap) +ogetsockname(struct thread *td, struct ogetsockname_args *uap) { return (user_getsockname(td, uap->fdes, uap->asa, uap->alen, true)); } From nobody Mon Nov 29 22:05:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E5A9618C78D6; Mon, 29 Nov 2021 22:05: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 4J2ztg459hz3GSq; Mon, 29 Nov 2021 22:05:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 368F12698; Mon, 29 Nov 2021 22:05: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 1ATM5V1D075615; Mon, 29 Nov 2021 22:05:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5Vp4075614; Mon, 29 Nov 2021 22:05:31 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:31 GMT Message-Id: <202111292205.1ATM5Vp4075614@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: c2996f8ad930 - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2996f8ad930f2245b9ef725e72ec7ed7c04161a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JRcuuyaQAK7cFswMqNKbc1/uVV4VzsZpWIgA4waxmfU=; b=uaL3XX+sqkA1AW+DlHqItu8ZgCbI6qWJiN5Z5maHmQJWPo6WvslPYnWdCCHbuYEv/gTUDb tyEVCJRK7IiC5iWwmf1z/39uWSdHgz5fADB67r5YF0+UiOVKPoCV+2+9mhZUTNEzAepQq/ iCFl+GRSIr0/qtXmfR3c+GTxkGQ/kFi2sRBVlQWrg5tvAn410+1g5r+4P47bRFJYkwHAVt tZnSCs5FcxT0shvQdC20zUjvo72VTNW94sC2t5EFQDcmKMNw4XiQWWq4hQu4+qYLXg/r2I qC2KtYAA1rDcEsu27Ubxg2MJbnL3+83UKPrJBXHN1VtRypdW3IY+hDKPbwTgNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223531; a=rsa-sha256; cv=none; b=Jic4HlCJBvJ0yKAWtFiNrBvhqEXzXIEVOs8ywgonhj0u+VW5YG/xPaMt/zFWh9DTEF0DsW FM+kiusZdEqZh2bx93defTZ05hhY3D8mXwrNLlhawfNkkqYzpTp87H43OA/4+LLL6xsn7/ WDoTBYOu2pw78ALf9VzWgLG+4t0W3JXyYQE7MnazEpg6tNjlcMcjRn3fYZ7WI22c8mBlDs 3IUhZYKr1UFhOKdQTP947dw/lB5rZVwAwZFPCwc5bCY4IdAcO6Rs1G23CeIa7vIevPjwGQ ZOYk3adxM7XGhzY4qGgZfgBEH6z44d3BJ9SySkksORNxi9REzt+6vR/yz5ZmSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=c2996f8ad930f2245b9ef725e72ec7ed7c04161a commit c2996f8ad930f2245b9ef725e72ec7ed7c04161a Author: Brooks Davis AuthorDate: 2021-11-29 22:02:59 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:42 +0000 syscalls: regen --- sys/compat/freebsd32/freebsd32_sysent.c | 4 ++-- sys/kern/init_sysent.c | 4 ++-- sys/sys/sysproto.h | 17 +++++++++++++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 56a88edf3c6d..52e54fcbf60b 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -181,7 +181,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_settimeofday_args), .sy_call = (sy_call_t *)freebsd32_settimeofday, .sy_auevent = AUE_SETTIMEOFDAY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 122 = freebsd32_settimeofday */ { .sy_narg = AS(fchown_args), .sy_call = (sy_call_t *)sys_fchown, .sy_auevent = AUE_FCHOWN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 123 = fchown */ { .sy_narg = AS(fchmod_args), .sy_call = (sy_call_t *)sys_fchmod, .sy_auevent = AUE_FCHMOD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 124 = fchmod */ - { compat(AS(recvfrom_args),recvfrom), .sy_auevent = AUE_RECVFROM, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 125 = old recvfrom */ + { compat(AS(orecvfrom_args),recvfrom), .sy_auevent = AUE_RECVFROM, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 125 = old recvfrom */ { .sy_narg = AS(setreuid_args), .sy_call = (sy_call_t *)sys_setreuid, .sy_auevent = AUE_SETREUID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 126 = setreuid */ { .sy_narg = AS(setregid_args), .sy_call = (sy_call_t *)sys_setregid, .sy_auevent = AUE_SETREGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 127 = setregid */ { .sy_narg = AS(rename_args), .sy_call = (sy_call_t *)sys_rename, .sy_auevent = AUE_RENAME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 128 = rename */ @@ -206,7 +206,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)sys_setsid, .sy_auevent = AUE_SETSID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 147 = setsid */ { .sy_narg = AS(quotactl_args), .sy_call = (sy_call_t *)sys_quotactl, .sy_auevent = AUE_QUOTACTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 148 = quotactl */ { compat(0,quota), .sy_auevent = AUE_O_QUOTA, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 149 = old quota */ - { compat(AS(getsockname_args),getsockname), .sy_auevent = AUE_GETSOCKNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 150 = old getsockname */ + { compat(AS(ogetsockname_args),getsockname), .sy_auevent = AUE_GETSOCKNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 150 = old getsockname */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 151 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 152 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 153 = reserved for local use */ diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 64528318bf8f..af2ffc744534 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -180,7 +180,7 @@ struct sysent sysent[] = { { .sy_narg = AS(settimeofday_args), .sy_call = (sy_call_t *)sys_settimeofday, .sy_auevent = AUE_SETTIMEOFDAY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 122 = settimeofday */ { .sy_narg = AS(fchown_args), .sy_call = (sy_call_t *)sys_fchown, .sy_auevent = AUE_FCHOWN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 123 = fchown */ { .sy_narg = AS(fchmod_args), .sy_call = (sy_call_t *)sys_fchmod, .sy_auevent = AUE_FCHMOD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 124 = fchmod */ - { compat(AS(recvfrom_args),recvfrom), .sy_auevent = AUE_RECVFROM, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 125 = old recvfrom */ + { compat(AS(orecvfrom_args),recvfrom), .sy_auevent = AUE_RECVFROM, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 125 = old recvfrom */ { .sy_narg = AS(setreuid_args), .sy_call = (sy_call_t *)sys_setreuid, .sy_auevent = AUE_SETREUID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 126 = setreuid */ { .sy_narg = AS(setregid_args), .sy_call = (sy_call_t *)sys_setregid, .sy_auevent = AUE_SETREGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 127 = setregid */ { .sy_narg = AS(rename_args), .sy_call = (sy_call_t *)sys_rename, .sy_auevent = AUE_RENAME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 128 = rename */ @@ -205,7 +205,7 @@ struct sysent sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)sys_setsid, .sy_auevent = AUE_SETSID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 147 = setsid */ { .sy_narg = AS(quotactl_args), .sy_call = (sy_call_t *)sys_quotactl, .sy_auevent = AUE_QUOTACTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 148 = quotactl */ { compat(0,quota), .sy_auevent = AUE_O_QUOTA, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 149 = old quota */ - { compat(AS(getsockname_args),getsockname), .sy_auevent = AUE_GETSOCKNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 150 = old getsockname */ + { compat(AS(ogetsockname_args),getsockname), .sy_auevent = AUE_GETSOCKNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 150 = old getsockname */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 151 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 152 = reserved for local use */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 153 = reserved for local use */ diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 49022b50a4f9..71ef869ce224 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -2356,6 +2356,14 @@ struct osendmsg_args { char msg_l_[PADL_(const struct omsghdr *)]; const struct omsghdr * msg; char msg_r_[PADR_(const struct omsghdr *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; +struct orecvfrom_args { + char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; + char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char from_l_[PADL_(struct sockaddr *)]; struct sockaddr * from; char from_r_[PADR_(struct sockaddr *)]; + char fromlenaddr_l_[PADL_(__socklen_t *)]; __socklen_t * fromlenaddr; char fromlenaddr_r_[PADR_(__socklen_t *)]; +}; struct otruncate_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char length_l_[PADL_(long)]; long length; char length_r_[PADR_(long)]; @@ -2384,6 +2392,11 @@ struct okillpg_args { char pgid_l_[PADL_(int)]; int pgid; char pgid_r_[PADR_(int)]; char signum_l_[PADL_(int)]; int signum; char signum_r_[PADR_(int)]; }; +struct ogetsockname_args { + char fdes_l_[PADL_(int)]; int fdes; char fdes_r_[PADR_(int)]; + char asa_l_[PADL_(struct sockaddr *)]; struct sockaddr * asa; char asa_r_[PADR_(struct sockaddr *)]; + char alen_l_[PADL_(__socklen_t *)]; __socklen_t * alen; char alen_r_[PADR_(__socklen_t *)]; +}; struct ogetdirentries_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; @@ -2415,7 +2428,7 @@ int osigsuspend(struct thread *, struct osigsuspend_args *); int osigstack(struct thread *, struct osigstack_args *); int orecvmsg(struct thread *, struct orecvmsg_args *); int osendmsg(struct thread *, struct osendmsg_args *); -int orecvfrom(struct thread *, struct recvfrom_args *); +int orecvfrom(struct thread *, struct orecvfrom_args *); int otruncate(struct thread *, struct otruncate_args *); int oftruncate(struct thread *, struct oftruncate_args *); int ogetpeername(struct thread *, struct ogetpeername_args *); @@ -2425,7 +2438,7 @@ int ogetrlimit(struct thread *, struct ogetrlimit_args *); int osetrlimit(struct thread *, struct osetrlimit_args *); int okillpg(struct thread *, struct okillpg_args *); int oquota(struct thread *, struct oquota_args *); -int ogetsockname(struct thread *, struct getsockname_args *); +int ogetsockname(struct thread *, struct ogetsockname_args *); int ogetdirentries(struct thread *, struct ogetdirentries_args *); #endif /* COMPAT_43 */ From nobody Mon Nov 29 22:05:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 50CFD18C79B2; Mon, 29 Nov 2021 22:05: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 4J2ztj5Yd4z3GQK; Mon, 29 Nov 2021 22:05:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 850E02599; Mon, 29 Nov 2021 22:05: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 1ATM5XM4075664; Mon, 29 Nov 2021 22:05:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5XmV075663; Mon, 29 Nov 2021 22:05:33 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:33 GMT Message-Id: <202111292205.1ATM5XmV075663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 7fb006e7d61e - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7fb006e7d61e9883344dfb20b277c3c015ab67b1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wJQ3LisiEDMktCFR0x+Y6B6bFr9fjVqnUO8rjtO11xU=; b=P2Pm5jSNXovznYK5a73Maa0sgn5soCXRyr9bYl6QUr0Sppbl0nrf1SrOt0pNMsDieFMJBn 3LJ+vihdLNw4wHXdpM5lUG7ztz+in72xSAMGPz080k1NCc5vzRKpgoYBZyGesEhLSoICWY nH/3KM4y/2a9oyfPeGIWYn4eG1bPITVI93H5bx6nJogxv+F1hOqxvv6ZuzxSbxDO5ILy2k /wgWnXWEi2mfp0Jaw4t8ksnNohc3ZwLt72qaddsjcl5ALdn5tztgRrzzw4gDFuYCkLhzjq 47jrp2WrAZB5u5IC1yEOPtFrGxp1/6BoJToesgkVOIdf2slFDyoyra6bTjVSbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223533; a=rsa-sha256; cv=none; b=EztbwkiCgI4XHNiZV3dCzc5wksjG10+jnIFcaiRRGiMqMxrXBBC36kSEtG+8MLakUGGvzD XUBdNN0GpO7KJPC85VcgoSykL8K/+UiUXh2e+3Fd0WQx+al5vUj8+8afiy5m3a8o/HKvSs +LM/jNFKytrzEaIFavKS2RW2KYG+WPvWgWbV4UthYgBEL4/uLXHyazUP6E88SEIL1FOCNT oKZ8InhaJ0MagjcINexGsYFiLR+6Y7C0aOP2x3xepJN5v1iEgvLEK9suIboXEoSiOWIaGO KEiw2364cKA9EG5Md7d2lCA0D3F8VFdlXUqWCHFd/9RNrES/OXLZ8VH7lPFk5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=7fb006e7d61e9883344dfb20b277c3c015ab67b1 commit 7fb006e7d61e9883344dfb20b277c3c015ab67b1 Author: Brooks Davis AuthorDate: 2021-11-29 22:03:00 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:42 +0000 syscalls: regen --- sys/compat/freebsd32/freebsd32_sysent.c | 4 ++-- sys/compat/freebsd32/freebsd32_systrace_args.c | 4 ++-- sys/kern/init_sysent.c | 4 ++-- sys/kern/systrace_args.c | 4 ++-- sys/sys/sysproto.h | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 52e54fcbf60b..7bb6579ea864 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -250,8 +250,8 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(pathconf_args), .sy_call = (sy_call_t *)sys_pathconf, .sy_auevent = AUE_PATHCONF, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 191 = pathconf */ { .sy_narg = AS(fpathconf_args), .sy_call = (sy_call_t *)sys_fpathconf, .sy_auevent = AUE_FPATHCONF, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 192 = fpathconf */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 193 = reserved for local use */ - { .sy_narg = AS(__getrlimit_args), .sy_call = (sy_call_t *)sys_getrlimit, .sy_auevent = AUE_GETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 194 = getrlimit */ - { .sy_narg = AS(__setrlimit_args), .sy_call = (sy_call_t *)sys_setrlimit, .sy_auevent = AUE_SETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 195 = setrlimit */ + { .sy_narg = AS(getrlimit_args), .sy_call = (sy_call_t *)sys_getrlimit, .sy_auevent = AUE_GETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 194 = getrlimit */ + { .sy_narg = AS(setrlimit_args), .sy_call = (sy_call_t *)sys_setrlimit, .sy_auevent = AUE_SETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 195 = setrlimit */ { compat11(AS(freebsd11_freebsd32_getdirentries_args),freebsd32_getdirentries), .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 196 = freebsd11 freebsd32_getdirentries */ { compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), .sy_auevent = AUE_MMAP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 197 = freebsd6 freebsd32_mmap */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 198 = __syscall */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index e4dad59ea7dd..a76d37727abb 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -924,7 +924,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* getrlimit */ case 194: { - struct __getrlimit_args *p = params; + struct getrlimit_args *p = params; uarg[a++] = p->which; /* u_int */ uarg[a++] = (intptr_t)p->rlp; /* struct rlimit * */ *n_args = 2; @@ -932,7 +932,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* setrlimit */ case 195: { - struct __setrlimit_args *p = params; + struct setrlimit_args *p = params; uarg[a++] = p->which; /* u_int */ uarg[a++] = (intptr_t)p->rlp; /* struct rlimit * */ *n_args = 2; diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index af2ffc744534..0ee450c5d32f 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -249,8 +249,8 @@ struct sysent sysent[] = { { .sy_narg = AS(pathconf_args), .sy_call = (sy_call_t *)sys_pathconf, .sy_auevent = AUE_PATHCONF, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 191 = pathconf */ { .sy_narg = AS(fpathconf_args), .sy_call = (sy_call_t *)sys_fpathconf, .sy_auevent = AUE_FPATHCONF, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 192 = fpathconf */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 193 = reserved for local use */ - { .sy_narg = AS(__getrlimit_args), .sy_call = (sy_call_t *)sys_getrlimit, .sy_auevent = AUE_GETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 194 = getrlimit */ - { .sy_narg = AS(__setrlimit_args), .sy_call = (sy_call_t *)sys_setrlimit, .sy_auevent = AUE_SETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 195 = setrlimit */ + { .sy_narg = AS(getrlimit_args), .sy_call = (sy_call_t *)sys_getrlimit, .sy_auevent = AUE_GETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 194 = getrlimit */ + { .sy_narg = AS(setrlimit_args), .sy_call = (sy_call_t *)sys_setrlimit, .sy_auevent = AUE_SETRLIMIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 195 = setrlimit */ { compat11(AS(freebsd11_getdirentries_args),getdirentries), .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 196 = freebsd11 getdirentries */ { compat6(AS(freebsd6_mmap_args),mmap), .sy_auevent = AUE_MMAP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 197 = freebsd6 mmap */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 198 = __syscall */ diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 0965d0d5ac5a..8e9e42de5e86 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -947,7 +947,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* getrlimit */ case 194: { - struct __getrlimit_args *p = params; + struct getrlimit_args *p = params; uarg[a++] = p->which; /* u_int */ uarg[a++] = (intptr_t)p->rlp; /* struct rlimit * */ *n_args = 2; @@ -955,7 +955,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* setrlimit */ case 195: { - struct __setrlimit_args *p = params; + struct setrlimit_args *p = params; uarg[a++] = p->which; /* u_int */ uarg[a++] = (intptr_t)p->rlp; /* struct rlimit * */ *n_args = 2; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 71ef869ce224..cd8163101a12 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -547,11 +547,11 @@ struct fpathconf_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char name_l_[PADL_(int)]; int name; char name_r_[PADR_(int)]; }; -struct __getrlimit_args { +struct getrlimit_args { char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; char rlp_l_[PADL_(struct rlimit *)]; struct rlimit * rlp; char rlp_r_[PADR_(struct rlimit *)]; }; -struct __setrlimit_args { +struct setrlimit_args { char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; char rlp_l_[PADL_(struct rlimit *)]; struct rlimit * rlp; char rlp_r_[PADR_(struct rlimit *)]; }; @@ -1973,8 +1973,8 @@ int sys_setegid(struct thread *, struct setegid_args *); int sys_seteuid(struct thread *, struct seteuid_args *); int sys_pathconf(struct thread *, struct pathconf_args *); int sys_fpathconf(struct thread *, struct fpathconf_args *); -int sys_getrlimit(struct thread *, struct __getrlimit_args *); -int sys_setrlimit(struct thread *, struct __setrlimit_args *); +int sys_getrlimit(struct thread *, struct getrlimit_args *); +int sys_setrlimit(struct thread *, struct setrlimit_args *); int sys___sysctl(struct thread *, struct __sysctl_args *); int sys_mlock(struct thread *, struct mlock_args *); int sys_munlock(struct thread *, struct munlock_args *); From nobody Mon Nov 29 22:05:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C8BAC18C77EE; Mon, 29 Nov 2021 22:05: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 4J2zth5fDhz3GQF; Mon, 29 Nov 2021 22:05:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F80D2355; Mon, 29 Nov 2021 22:05: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 1ATM5W7X075640; Mon, 29 Nov 2021 22:05:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5WYJ075639; Mon, 29 Nov 2021 22:05:32 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:32 GMT Message-Id: <202111292205.1ATM5WYJ075639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 638c5fa8df1d - main - syscalls: normalize (get|set)rlimit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 638c5fa8df1d3f2bf4c63c2923f592b0c9e63751 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZSBg5nHqsr4XNZpt+TyqhjZqZUpe9/LH6Zx/UAycUT0=; b=xVHUhBXkYyd4zkjQgGxJM49AUaEDlJJt+3655lNT+Ok8NDB+svVPcly9PzgdUhn6WzigYT cQcaLbXCNRAZ7Ho9FRxVMUWhclCtQoDusc5d+ljq1ZLhGVwG8X1JejgFSvRMFIBBv2p7im 0ul1GDo1t3/s8/XQ0DF8cF2buZZUYX65fGxiYP752hmSWCy48QRbYHOM4+ZYy9y2dP5yCO v9kAQuW9aS6Ysja0c7duA7xYwvzH89tQvKPjIqXJuisqmTtCe9l9s1ick4390Yudp1pFlq j93VhpkkjHnBgklHWMuXpXcIEPkKw5FZCt4pD8t4rK8+bX9Pecw0+BWwxdL3Lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223532; a=rsa-sha256; cv=none; b=lOfwCw7rhMx68K6lnvdhbXHhUWn8Ng7hD4/S6oaM+6wH4lXAbxe/cDM3EAZgLHGMdYms6J U04ksVFO5EiQcVx7jfsdkndB4FMoPjFPrCajq52ywZbLzvHjBUjDsLLeJ6/2tZZD5fBaT9 7nGW2EtHRKxOX8XpUXJRA14QWM2tXHYcIQ05oNdDPQ7I7tBiR3qz3WqUJBj5t5HxCDmXS+ tTC0Zh4uH0GZQBfoXlKFkn7WtvR8PeXjDCUWuXQsSJaBhnJholQS1HzEjF/1GG1tzX1Bsf 6tKHS4twah/f8RtWpEPyDhJkWkbk0xWZdgUb37hVwIN4t0nrGDOcBlGlXTXYOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=638c5fa8df1d3f2bf4c63c2923f592b0c9e63751 commit 638c5fa8df1d3f2bf4c63c2923f592b0c9e63751 Author: Brooks Davis AuthorDate: 2021-11-29 22:02:59 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:42 +0000 syscalls: normalize (get|set)rlimit Declare normal _args structs rather than going out of the way to declare ___args. Reviewed by: kib, imp --- sys/kern/kern_resource.c | 8 ++++---- sys/kern/syscalls.master | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index b556d4fded51..5b90148ccf99 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -592,13 +592,13 @@ ogetrlimit(struct thread *td, struct ogetrlimit_args *uap) #endif /* COMPAT_43 */ #ifndef _SYS_SYSPROTO_H_ -struct __setrlimit_args { +struct setrlimit_args { u_int which; struct rlimit *rlp; }; #endif int -sys_setrlimit(struct thread *td, struct __setrlimit_args *uap) +sys_setrlimit(struct thread *td, struct setrlimit_args *uap) { struct rlimit alim; int error; @@ -782,14 +782,14 @@ kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which, } #ifndef _SYS_SYSPROTO_H_ -struct __getrlimit_args { +struct getrlimit_args { u_int which; struct rlimit *rlp; }; #endif /* ARGSUSED */ int -sys_getrlimit(struct thread *td, struct __getrlimit_args *uap) +sys_getrlimit(struct thread *td, struct getrlimit_args *uap) { struct rlimit rlim; int error; diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 6e89f2c313ea..cedadd9b94bf 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1166,13 +1166,13 @@ u_int which, _Out_ struct rlimit *rlp ); - } getrlimit __getrlimit_args int + } 195 AUE_SETRLIMIT STD|CAPENABLED { int setrlimit( u_int which, _In_ struct rlimit *rlp ); - } setrlimit __setrlimit_args int + } 196 AUE_GETDIRENTRIES COMPAT11|CAPENABLED { int getdirentries( int fd, From nobody Mon Nov 29 22:05:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 78CCF18C7C01; Mon, 29 Nov 2021 22:05: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 4J2ztk6xvWz3GT3; Mon, 29 Nov 2021 22:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9739B2699; Mon, 29 Nov 2021 22:05: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 1ATM5YCB075688; Mon, 29 Nov 2021 22:05:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5Ykt075687; Mon, 29 Nov 2021 22:05:34 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:34 GMT Message-Id: <202111292205.1ATM5Ykt075687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: cffb55f0f37c - main - syscalls: normalize exit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cffb55f0f37c5bddd1d203bfbe281bea8ab62cda Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2AvrVAaHaaNWts70jC7LtWI8DeRbvEe8iLewESic2Oo=; b=yn5KB24JaduMuKO1DDLEPfgiyZiSiGPEOhfbVPCBD0AFzTKiaIOdLximXR8l960lRu/rpk Hxg7hhNjBmkT/4yuEmFuNHkIu58fwHJvDywMRZvsOlwMiv4tik3HPdijTPhcoN1MERjEbr KOPA6qz3o07AmDpf2GwdeubUNsajoUiF0Qvf6erdoxaWG0+JIBuzush29RCOED4/NyT7I2 64tchdo3OnLxeDyLK8C3Kpym8DBggL9KRx8bPThruoAsox4qRKK/G3M/KYX+nv13g6DqT2 XmnkyqiKaoO9MCBZ8Q+9cCuzO0WKYsklwXm9cqLSoXgb+34MZNhhqlzA3g4JNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223535; a=rsa-sha256; cv=none; b=IyxsyfkG64GhiVcKvolrc+ikF3vwq1UTpkOA8dnZF6JHjbPThv1Usdn505tMjNe++SI9jY sVxAt0kFDAA55PfOS5NZayzWOp4lLxSY6dm0XwzqNLtZWF41pRjDDNKYYUEylCiZEdN5kf IHaW4xkUR+CmWDwRNCGb2qBHcKbSJMHe09QnWy+XycJGk9DCxGvEdTGuIyQq4XRCConHzG vp1tvw+ZsBAO4li6OtYi9WrzhF0PrUD/CoSZ9KEyuCl4lyvoheV6hfTVyjSxU8Fj3cqSCi +qPWO4ILGhk2Ww9Vd+2sPxYJMTt/u52B1tYIjycKA+g0apz9AoNKqjGR0P+Njg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=cffb55f0f37c5bddd1d203bfbe281bea8ab62cda commit cffb55f0f37c5bddd1d203bfbe281bea8ab62cda Author: Brooks Davis AuthorDate: 2021-11-29 22:03:00 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:43 +0000 syscalls: normalize exit Declare the exit system call normally. This results in the implementation being named sys_exit rather than sys_sys_exit and being decalred as returning an int. Infact it does not return at all because exit1 does not, so add an __unreachable() to let the compiler know that. Reviewed by: kib, imp --- sys/kern/kern_exit.c | 6 +++--- sys/kern/syscalls.master | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 2f1cfb2a25d2..6d1cd5705f30 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -205,12 +205,12 @@ exit_onexit(struct proc *p) /* * exit -- death of process. */ -void -sys_sys_exit(struct thread *td, struct sys_exit_args *uap) +int +sys_exit(struct thread *td, struct exit_args *uap) { exit1(td, uap->rval, 0); - /* NOTREACHED */ + __unreachable(); } /* diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index cedadd9b94bf..693454c67eca 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -116,10 +116,10 @@ int nosys(void); } syscall nosys_args int 1 AUE_EXIT STD|CAPENABLED { - void sys_exit( + void exit( int rval ); - } exit sys_exit_args void + } 2 AUE_FORK STD|CAPENABLED { int fork(void); } From nobody Mon Nov 29 22:05:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E65DC18C7C29; Mon, 29 Nov 2021 22:05: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 4J2ztm3X5sz3G64; Mon, 29 Nov 2021 22:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BEF2B269A; Mon, 29 Nov 2021 22:05: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 1ATM5ZBD075712; Mon, 29 Nov 2021 22:05:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5ZjV075711; Mon, 29 Nov 2021 22:05:35 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:35 GMT Message-Id: <202111292205.1ATM5ZjV075711@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 5c1835b1d4b5 - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c1835b1d4b554235a6904f3a984680baf38edf2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eyIcfLGyOXCYUBREkdNCKk9MT73VPuP6fFBrDjtsWeI=; b=YS008ZxKvjvpPStmHdFaTeZ11lflIPlmTZVT2YBLHf+cXpJdq1efPalgVz6o9BYQrkH9hL fFQLrE2WgzlfcRQKiCkUY3SP15M+QVTuhJM8IrELW1mYZnXIRl2UgrptqYIS8y9+HqL64D fkRwiXrXZgpLX+rSLdcvSUFgc1XmnaXEyzQEOu1zy4aKz1RX91ZA1ZpATae/us0BZgX6Xn lcoJCO1wEd6j8QcV2w4kZUc8h3D4PfOAUuyxe6qfKI8SLqSZBiWzsmknD6vkSc91F5h5Je LK8L7uWIT5JQrNxwE43K6vHW/qiiA/r2RxywhHNAf0J/VF+w2NXKFz6LBpY1rA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223537; a=rsa-sha256; cv=none; b=UOE7T2MaatBEUUUck41g6ji4shvIb0NWOD3PuAGu8FSfItAi775vcgeFcaC44UzIOPD1q4 NN92lWROQrRq+EBvVD3S17oOc35cILAvKLC5KLZ2vakDpVf1w0HsEvZ0m2X4UESpt3XeAU j1fEihGua/3X/PkANKYBuKKRkQhJV/kQVNWRb6XP7PmxmiCOTlD1IKAHr6opIEu1dfbi2H hnVjxix21TQ5Rbr9qYBG5skz+8mTh70p0ycYspXfpaJX869xvKsJm2x5Lu0fXeKE1lW9Il TW7p7Iu6fnsFNeZ44lX3OxgY03w9ZMrcgy3wOsqYsiVfiX8XC6l4B/vdMbubGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5c1835b1d4b554235a6904f3a984680baf38edf2 commit 5c1835b1d4b554235a6904f3a984680baf38edf2 Author: Brooks Davis AuthorDate: 2021-11-29 22:03:00 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:43 +0000 syscalls: regen --- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 8 ++++---- sys/kern/init_sysent.c | 2 +- sys/kern/systrace_args.c | 8 ++++---- sys/sys/sysproto.h | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 7bb6579ea864..29dd2892da05 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -57,7 +57,7 @@ /* The casts are bogus but will do for now. */ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 0 = syscall */ - { .sy_narg = AS(sys_exit_args), .sy_call = (sy_call_t *)sys_sys_exit, .sy_auevent = AUE_EXIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 1 = exit */ + { .sy_narg = AS(exit_args), .sy_call = (sy_call_t *)sys_exit, .sy_auevent = AUE_EXIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 1 = exit */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_fork, .sy_auevent = AUE_FORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 2 = fork */ { .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_READ, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 3 = read */ { .sy_narg = AS(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_WRITE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 4 = write */ diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index a76d37727abb..3392bfe99813 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -20,9 +20,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } - /* sys_exit */ + /* exit */ case 1: { - struct sys_exit_args *p = params; + struct exit_args *p = params; iarg[a++] = p->rval; /* int */ *n_args = 1; break; @@ -3333,7 +3333,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* nosys */ case 0: break; - /* sys_exit */ + /* exit */ case 1: switch (ndx) { case 0: @@ -8973,7 +8973,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) switch (sysnum) { /* nosys */ case 0: - /* sys_exit */ + /* exit */ case 1: if (ndx == 0 || ndx == 1) p = "void"; diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 0ee450c5d32f..05c15d7b7afc 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -56,7 +56,7 @@ /* The casts are bogus but will do for now. */ struct sysent sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 0 = syscall */ - { .sy_narg = AS(sys_exit_args), .sy_call = (sy_call_t *)sys_sys_exit, .sy_auevent = AUE_EXIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 1 = exit */ + { .sy_narg = AS(exit_args), .sy_call = (sy_call_t *)sys_exit, .sy_auevent = AUE_EXIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 1 = exit */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_fork, .sy_auevent = AUE_FORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 2 = fork */ { .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_READ, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 3 = read */ { .sy_narg = AS(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_WRITE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 4 = write */ diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 8e9e42de5e86..22f84178cbfc 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -17,9 +17,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } - /* sys_exit */ + /* exit */ case 1: { - struct sys_exit_args *p = params; + struct exit_args *p = params; iarg[a++] = p->rval; /* int */ *n_args = 1; break; @@ -3429,7 +3429,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* nosys */ case 0: break; - /* sys_exit */ + /* exit */ case 1: switch (ndx) { case 0: @@ -9143,7 +9143,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) switch (sysnum) { /* nosys */ case 0: - /* sys_exit */ + /* exit */ case 1: if (ndx == 0 || ndx == 1) p = "void"; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index cd8163101a12..96f8abce4e31 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -37,7 +37,7 @@ struct thread; struct nosys_args { register_t dummy; }; -struct sys_exit_args { +struct exit_args { char rval_l_[PADL_(int)]; int rval; char rval_r_[PADR_(int)]; }; struct fork_args { @@ -1858,7 +1858,7 @@ struct sched_getcpu_args { register_t dummy; }; int nosys(struct thread *, struct nosys_args *); -void sys_sys_exit(struct thread *, struct sys_exit_args *); +int sys_exit(struct thread *, struct exit_args *); int sys_fork(struct thread *, struct fork_args *); int sys_read(struct thread *, struct read_args *); int sys_write(struct thread *, struct write_args *); From nobody Mon Nov 29 22:05:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B0D0F18C7CA5; Mon, 29 Nov 2021 22:05: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 4J2ztn1XSbz3GVp; Mon, 29 Nov 2021 22:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E71482741; Mon, 29 Nov 2021 22:05: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 1ATM5awG075738; Mon, 29 Nov 2021 22:05:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5auY075737; Mon, 29 Nov 2021 22:05:36 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:36 GMT Message-Id: <202111292205.1ATM5auY075737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: d7f306c5be6f - main - makesyscalls: add a new SYSMUX type List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7f306c5be6fb4b4ab4455e1d033cc9545ce015d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Djl4XCzaipP1P0zy/Q0IK38uUcJlvgu3dm7vkNXbeJ4=; b=Mt5Y9KuJFYzpx6KARVu8UOz7YLRBeSbpHbUZgd7V23bB3rBPGXRTsxYDexRi702qsRUuMK Mvyzp8i9U8qkH0ZCB9z3tF6KSTpMc/yBNdduqCwvgIG858ZdaQI92PKmxbVWreX7iL2noa iI3Q9Q4OHw78VXRsQZ8dSlRtELhijPAFdrLNIToIPmT5OVlcemJnBFp5P03lw0KCGognac 2Atgivr+quEdPuXnYwznk3IJ9PKXwyKZyAUENzw+WMit76AeHpbn2061c3Hv5PyCY8GMUm VeVKHkhRDyIJPTpWzw09lUjfnJqfWM0Ae6dk/T94onJcXpaSNSUD66QDaQ+xZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223538; a=rsa-sha256; cv=none; b=BSSzKEe2X0vzvrF+NnnIvoSzehMKYVh27+CcrSKHXStyAbkRRymdgFGiiR5ZUm1FoLzmWN rgCw4XeSmefOCQwtfsEnj8uwtACS9uv9+r+DcbykfZBqI5d8NDfQsIRWXfp/nVUhxhrpp7 /NsqfIr06C0lt76l/NaXQmV/ssNVo1hKU3I1DBJoyinfEjtxQr8tFjAddE27OUMqGuY5Wx W+KndbPT2okaNVZKa42zvA5iDdrLWIwk+mpiOTE8CoyDd4K/9k+0cjFYrszQWEjlzhq41h S++8rnA3KK7Hp98f+E3iw/qp9NwO3ASzvBSW2yOkU8jiTPnuiEkuOFpSTY7lMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d7f306c5be6fb4b4ab4455e1d033cc9545ce015d commit d7f306c5be6fb4b4ab4455e1d033cc9545ce015d Author: Brooks Davis AuthorDate: 2021-11-29 22:03:00 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:43 +0000 makesyscalls: add a new SYSMUX type This type is for system call multiplexers (syscall(2), __syscall(2)) that don't have a normal handler and instead are handled in the machine-dependent syscall code. Reviewed by: kib, imp --- sys/kern/syscalls.master | 6 ++++-- sys/tools/makesyscalls.lua | 23 ++++++++++++++++++----- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 693454c67eca..96541023ec28 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -13,8 +13,8 @@ ; there is no audit event for the call at this time. For the ; case where the event exists, but we don't want auditing, the ; event should be #defined to AUE_NULL in audit_kevents.h. -; type one of STD, OBSOL, RESERVED, UNIMPL, COMPAT, COMPAT4, COMPAT6, -; COMPAT7, COMPAT11, COMPAT12, NODEF, NOARGS, NOPROTO, NOSTD +; type one of STD, OBSOL, RESERVED, UNIMPL, SYSMUX, COMPAT*, +; NODEF, NOARGS, NOPROTO, NOSTD ; The COMPAT* options may be combined with one or more NO* ; options separated by '|' with no spaces (e.g. COMPAT|NOARGS) ; The CAPENABLED option may be ORed into a type. @@ -48,6 +48,8 @@ ; function prototype in sys/sysproto.h. Does add a ; definition to syscall.h besides adding a sysent. ; NOTSTATIC syscall is loadable +; SYSMUX syscall multiplexer. No prototype, argument struct, or +; handler is declared or used. Handled in MD syscall code. ; CAPENABLED syscall is allowed in capability mode ; ; To support programmatic generation of both the default ABI and 32-bit compat diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index e8f882f6641d..4fa5727470a8 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -196,6 +196,7 @@ local known_flags = { NOSTD = 0x00000080, NOTSTATIC = 0x00000100, CAPENABLED = 0x00000200, + SYSMUX = 0x00000400, -- Compat flags start from here. We have plenty of space. } @@ -733,7 +734,9 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, auditev, syscallret, funcname, funcalias, funcargs, argalias) local argssize - if #funcargs > 0 or flags & known_flags["NODEF"] ~= 0 then + if flags & known_flags["SYSMUX"] ~= 0 then + argssize = "0" + elseif #funcargs > 0 or flags & known_flags["NODEF"] ~= 0 then argssize = "AS(" .. argalias .. ")" else argssize = "0" @@ -752,7 +755,7 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, case %d: ]], funcname, sysnum)) - if #funcargs > 0 then + if #funcargs > 0 and flags & known_flags["SYSMUX"] == 0 then write_line("systracetmp", "\t\tswitch (ndx) {\n") write_line("systrace", string.format( "\t\tstruct %s *p = params;\n", argalias)) @@ -820,8 +823,12 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, break; ]], syscallret)) end + local n_args = #funcargs + if flags & known_flags["SYSMUX"] ~= 0 then + n_args = 0 + end write_line("systrace", string.format( - "\t\t*n_args = %d;\n\t\tbreak;\n\t}\n", #funcargs)) + "\t\t*n_args = %d;\n\t\tbreak;\n\t}\n", n_args)) write_line("systracetmp", "\t\tbreak;\n") local nargflags = get_mask({"NOARGS", "NOPROTO", "NODEF"}) @@ -872,7 +879,13 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, string.format("\t{ .sy_narg = %s, .sy_call = (sy_call_t *)", argssize)) local column = 8 + 2 + #argssize + 15 - if flags & known_flags["NOSTD"] ~= 0 then + if flags & known_flags["SYSMUX"] ~= 0 then + write_line("sysent", string.format( + "nosys, .sy_auevent = AUE_NULL, " .. + ".sy_flags = %s, .sy_thrcnt = SY_THR_STATIC },", + sysflags)) + column = column + #"nosys" + #"AUE_NULL" + 3 + elseif flags & known_flags["NOSTD"] ~= 0 then write_line("sysent", string.format( "lkmressys, .sy_auevent = AUE_NULL, " .. ".sy_flags = %s, .sy_thrcnt = SY_THR_ABSENT },", @@ -1271,7 +1284,7 @@ process_syscall_def = function(line) local ncompatflags = get_mask({"STD", "NODEF", "NOARGS", "NOPROTO", "NOSTD"}) local compatflags = get_mask_pat("COMPAT.*") - if noproto then + if noproto or flags & known_flags["SYSMUX"] ~= 0 then flags = flags | known_flags["NOPROTO"]; end if flags & known_flags["OBSOL"] ~= 0 then From nobody Mon Nov 29 22:05:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F168118C7CAB; Mon, 29 Nov 2021 22:05: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 4J2ztp57N6z3G6B; Mon, 29 Nov 2021 22:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18EDF2805; Mon, 29 Nov 2021 22:05: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 1ATM5bur075766; Mon, 29 Nov 2021 22:05:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5bYJ075765; Mon, 29 Nov 2021 22:05:37 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:37 GMT Message-Id: <202111292205.1ATM5bYJ075765@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: a8efd4d1b3b4 - main - syscalls: make syscall and __syscall SYSMUX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8efd4d1b3b43a5762f87befe22dd6e1cda73373 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F6EjmFPMyFT4GOERKLEwFX2BZHz7vksVNy7JPI2AMTQ=; b=q7LedPJWPgGJKExHnRoBEzxL97fbYDudkteynq3+ni2MrGnWTDB7pNdOxLLvQcZU+lzVa0 G4eNHOQPRGrZE5L2D6enZzd+1CtHdSDkc//lwKYHxVHD2ykluBPAUQcLrz6ZOCeyPH8NxJ wxcxrA5k2DmiXtHaOr8ZieZxGMqaL52FSN2Uq+w+8/hTomLMhiJh8xRIZt/w/sIZg9dtL3 Skgr7HropkZnGou1la+UCI6rgde/izG2TkxJgJiw0TAzzuDAKIcrJsPmW+UDpwKRvyOAes 89KPG44PK1TeEMnXZX3yPeoG6eRRY7CPLIep8ihdQmoRlQAAF3W03MwIkTIAxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223539; a=rsa-sha256; cv=none; b=nZJulTzVreMWIiQd7s1YEpsubtVKoSgQMl4+GWjsHQqpxzFdKEONv2+HhUZ1ooPnwodFqy eVJgeHrQ5mg3feVuCjHc4HW0gSpN/HR/P+WFnYCNikIG2yh2ebf0vVst3olxHEzJV/axKi sonoSLsGBwNbp1Au6tRzJNZxbB9wHNBOLGzKfCDjehiwCz37PkuQNuVlLyJJB8XLxgrV3o FGYXu6YhtzWecOc2v409l5FnJ88e/oZHqKRrs/KzLV4RTens44O8SaNYuKaDpSvND0ugoz FHVeEWes63MCzhH34RavZo4GJw3rAP8hOJTHIWs98Rwc1W/6nKHnAmaS31GKDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a8efd4d1b3b43a5762f87befe22dd6e1cda73373 commit a8efd4d1b3b43a5762f87befe22dd6e1cda73373 Author: Brooks Davis AuthorDate: 2021-11-29 22:03:00 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:44 +0000 syscalls: make syscall and __syscall SYSMUX Rather than combining the declearation of nosys with the registration of SYS_syscall, declare syscall(2) and __syscall(2) with the new SYSMUX type in syscalls.master and declare nosys directly. This eliminates the last use of syscall aliases in the tree. Reviewed by: kib, imp --- sys/kern/syscalls.master | 18 ++++++++++++------ sys/sys/sysent.h | 6 ++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 96541023ec28..92cc727f22c9 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -114,9 +114,12 @@ #include %%ABI_HEADERS%% -0 AUE_NULL STD { - int nosys(void); - } syscall nosys_args int +0 AUE_NULL SYSMUX { + int syscall( + int number, + ... + ); + } 1 AUE_EXIT STD|CAPENABLED { void exit( int rval @@ -1194,9 +1197,12 @@ off_t pos ); } -198 AUE_NULL NOPROTO { - int nosys(void); - } __syscall __syscall_args int +198 AUE_NULL SYSMUX { + int __syscall( + int64_t number, + ... + ); + } 199 AUE_LSEEK COMPAT6|CAPENABLED { off_t lseek( int fd, diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index fc678d49750a..e0b067927036 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -192,6 +192,12 @@ extern struct sysentvec aout_sysvec; extern struct sysent sysent[]; extern const char *syscallnames[]; +struct nosys_args { + register_t dummy; +}; + +int nosys(struct thread *, struct nosys_args *); + #define NO_SYSCALL (-1) struct module; From nobody Mon Nov 29 22:05:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E7FD418C7C7F; Mon, 29 Nov 2021 22:05: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 4J2ztq5g3kz3GXy; Mon, 29 Nov 2021 22:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A7A12806; Mon, 29 Nov 2021 22:05: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 1ATM5dnZ075790; Mon, 29 Nov 2021 22:05:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5dZM075789; Mon, 29 Nov 2021 22:05:39 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:39 GMT Message-Id: <202111292205.1ATM5dZM075789@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 401eec363585 - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 401eec3635856b8f5b6b7961ebf372d1dd1fb60f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LnR0F884U2UmEcJJT8NeaQ9ShKVaEv5c3vglUIIWF3c=; b=eGNlCPkWSO2VUMHhK6VM8302wsTtUBSR0PPMh0J2syVEaeU8cj10e5/tVvNhoO48WH77Gk LGytFfzNqbunonDNiLm7dz2/cz4iMZL1AS9jlJt2ISY+W4/n5ib57FlZHRHTQjrMUJkp9G BRiQ0tk2yZmJbElhu6Qby4JkN2x5ZVsQCU1MRwvse6qtQZX3Z74XRTfKsEpMwX0jc/Pt35 0BMSP0IcmtWJkiu5zaHL5s94h0Bd22ya3P4GmwuDGUlFmFbqYTpizfxQ97XD9/RmKIXH+T bNy+Vh2W+k4/p5ERF+F+WydGIwCVr2i6pwUYEQgNvryk4/Cc7A/IXG3ymG3lGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223540; a=rsa-sha256; cv=none; b=x/t0e09UAB4GF85pW2cNfHIYZ9xyQyq/WYvs9LLJvlOaaw3sEysXhf0G18kHMbzvan2Nux Hbe+ymNxErS8GdNZgxWyrOcMd9RCOgKT0YE89TaXUyFc7HGNlAmzlTvHc2CYqKX0nFJB9A 7Oja2UbPMXeHQA0grnLHx7XN9Pd6jG5KV12oCKF3ugim88hzRYYkJHfEGdaJw+WHfC21k/ 4plgbpUyMX78nnGIv+4BS/nKjb28Kny3b2OV7BItOo2s1f4mlZqOZ3BCs5MWevP7pxlDkF bZiJ4ZcwSfyMmpPtOe1FeQcx/1GSEI0m7ZNYnB+rFr5oOV7/eiCQKpD/qMH5mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=401eec3635856b8f5b6b7961ebf372d1dd1fb60f commit 401eec3635856b8f5b6b7961ebf372d1dd1fb60f Author: Brooks Davis AuthorDate: 2021-11-29 22:03:00 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:44 +0000 syscalls: regen --- sys/compat/freebsd32/freebsd32_systrace_args.c | 12 ++++++------ sys/kern/systrace_args.c | 12 ++++++------ sys/sys/sysproto.h | 5 ----- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 3392bfe99813..b5035a3868f6 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -15,7 +15,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) int64_t *iarg = (int64_t *)uarg; int a = 0; switch (sysnum) { - /* nosys */ + /* syscall */ case 0: { *n_args = 0; break; @@ -938,7 +938,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 2; break; } - /* nosys */ + /* __syscall */ case 198: { *n_args = 0; break; @@ -3330,7 +3330,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { - /* nosys */ + /* syscall */ case 0: break; /* exit */ @@ -4821,7 +4821,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* nosys */ + /* __syscall */ case 198: break; /* freebsd32___sysctl */ @@ -8971,7 +8971,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { - /* nosys */ + /* syscall */ case 0: /* exit */ case 1: @@ -9507,7 +9507,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* nosys */ + /* __syscall */ case 198: /* freebsd32___sysctl */ case 202: diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 22f84178cbfc..d39c39050408 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -12,7 +12,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) int64_t *iarg = (int64_t *)uarg; int a = 0; switch (sysnum) { - /* nosys */ + /* syscall */ case 0: { *n_args = 0; break; @@ -961,7 +961,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 2; break; } - /* nosys */ + /* __syscall */ case 198: { *n_args = 0; break; @@ -3426,7 +3426,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { - /* nosys */ + /* syscall */ case 0: break; /* exit */ @@ -4962,7 +4962,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* nosys */ + /* __syscall */ case 198: break; /* __sysctl */ @@ -9141,7 +9141,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) { const char *p = NULL; switch (sysnum) { - /* nosys */ + /* syscall */ case 0: /* exit */ case 1: @@ -9692,7 +9692,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* nosys */ + /* __syscall */ case 198: /* __sysctl */ case 202: diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 96f8abce4e31..fc56afba1239 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -34,9 +34,6 @@ struct thread; #define PADR_(t) 0 #endif -struct nosys_args { - register_t dummy; -}; struct exit_args { char rval_l_[PADL_(int)]; int rval; char rval_r_[PADR_(int)]; }; @@ -1857,7 +1854,6 @@ struct fspacectl_args { struct sched_getcpu_args { register_t dummy; }; -int nosys(struct thread *, struct nosys_args *); int sys_exit(struct thread *, struct exit_args *); int sys_fork(struct thread *, struct fork_args *); int sys_read(struct thread *, struct read_args *); @@ -2734,7 +2730,6 @@ int freebsd12_closefrom(struct thread *, struct freebsd12_closefrom_args *); #endif /* COMPAT_FREEBSD12 */ -#define SYS_AUE_syscall AUE_NULL #define SYS_AUE_exit AUE_EXIT #define SYS_AUE_fork AUE_FORK #define SYS_AUE_read AUE_READ From nobody Mon Nov 29 22:05:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C0F5A18C7F36; Mon, 29 Nov 2021 22:05: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 4J2ztt3Cr1z3GY7; Mon, 29 Nov 2021 22:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DE6A269B; Mon, 29 Nov 2021 22:05: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 1ATM5eKQ075814; Mon, 29 Nov 2021 22:05:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5euU075813; Mon, 29 Nov 2021 22:05:40 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:40 GMT Message-Id: <202111292205.1ATM5euU075813@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6d37a1670b09 - main - syscalls: mprotect does not take a 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d37a1670b090a3224cbba8488b445c3990bf298 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aXo+hmjE4DiM0H95oopI+U02xY5rMroSOeevbB1bCfg=; b=oMAIEyZUd40PQI6MP47kYI2blQb3hlauybhL6WbSaAOjtV4cR1Ke1VdLmi85Cj8ghs14RH RtYo0gFtLy3gPgu9IaPAcdeJa/eZhyyvqx9voRvY0fh0mUPKuXw/4bdmwyiDmr2ezQ/taO Lz2U4DhbE+JZ4NRdMDODO+kRppjIVVRgy/zX2voSa5lsWbolKtTY2BYux7IlVjjfVvtGKp B6Izh8P+DANEjDrpJ8R+5u9wayC9vBsWlUXo0vlddc3EzEyGoBYfWW9+p1iH3h1wJeudXu KfbIZjuSeh3Y+90FgQlUivFOuJfh+7MxHd9ky6fuSCo6VjAVgwbrn+BGsRt0TA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223543; a=rsa-sha256; cv=none; b=OmegQs5fM6ey/B+3q2OSc/Etel3JSjq2RLcIjLhPj8Lc8sFVVXc+QX2kXCC5kzv4wlQ0Kn FXEa6X3GXWG1WV+xhzYUJTkpdN89xcKRTrFgfVcTE7o3ibRYdcocatULUwuJN62AhlqNAy 9y6Av0qkPx10nnb/LuKYqdRlc5d45qP2FwfsMq066dGsiEmueA1SrGjnaCqtN9hskUXMpO Yb8vY18yLnERZ/uuQBHQmk5z77IsdVgv3cIp/JVzxvTm4dXm46XzOPsTjVJjExYAdZE5m3 5ovy7NVrUS9nLssiob7q/LiB44cWJSeHvWiEVyKG5wk7voqpeHV9RUr12kwzbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6d37a1670b090a3224cbba8488b445c3990bf298 commit 6d37a1670b090a3224cbba8488b445c3990bf298 Author: Brooks Davis AuthorDate: 2021-11-29 22:03:00 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:47 +0000 syscalls: mprotect does not take a const The mprotect syscall decleration is not const. I added this one incorrectly in a944d28d0edf7ceb1bef4d789dfa4e8e18331658. Reported by: kib Reviewed by: kib, imp --- sys/kern/syscalls.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 92cc727f22c9..543940fc2b97 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -534,7 +534,7 @@ } 74 AUE_MPROTECT STD|CAPENABLED { int mprotect( - _In_ const void *addr, + _In_ void *addr, size_t len, int prot ); From nobody Mon Nov 29 22:05:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 56DF318C7E9D; Mon, 29 Nov 2021 22:05: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 4J2zts6L4fz3GY6; Mon, 29 Nov 2021 22:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B337269C; Mon, 29 Nov 2021 22:05: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 1ATM5fjC075838; Mon, 29 Nov 2021 22:05:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5fRQ075837; Mon, 29 Nov 2021 22:05:41 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:41 GMT Message-Id: <202111292205.1ATM5fRQ075837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 0e765d9b08dc - main - syscalls: regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e765d9b08dcc2386b799815f2c835c97a93614c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5RXNCbvcJc+pHOAvXkHOBxTqCNdTZlvYVdwdYpeWJUg=; b=aq6EeH3ncDYIjElD8PHSXsMDbSJ7EyeCWf3f/CWlRZAQMSKjsug0mziez+m2sOEYP42ziI uhZdmpktjUcDyAQTwq/elT2UDXRiySNqAu6b/xDbh51xC6jEISVN7I+rWwSDrTwEmlRdKL NLzc0z5B9bT+PunP2W7CUoG4xQ6vBdrogXUIQo//cLRRL5pBGPhkAq/KXHGBHSu//vzwE0 5evLJ2Yac7PffQrExu4HndP/17q1FUxir252MasiaBxTM6/vAmp00y4EPfvCUT9nuFiOP9 nTBI2uuvq82ERnsgVEz1bRwwsftF+5cpPhxgFc5st4HU4WEkQLjBm5Y3lH0K6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223542; a=rsa-sha256; cv=none; b=PNoCO6yMHxs3fanNB8WYUsg9pvjhQV2TgCaq9Wz2HPfOi2WPLzKNuiUEXK0NzdrK6axEdP 6bwjgye411BU4vDGNblZnAQBbPxCUawOV+VkmTgb6GIyReEoj60+lQb9s5rJfa5ne0SSCj l8MEu0zCnCc9kQVjwC41sHpSFmy0kE3bfC6ITqZ5+oan0YueBEcT5dF1rcx+GngEXUnn+y RPFuEq3BrmUsdTW1gGJWZ5wZyDqqofEs4LzHj6/6kg4MOPdFSaxySkYWnLtvTSEZhsoFPC 21yEOgD+HTzWtQTiOfkUO3sqiNSWe77gbhTM7DBcLUg83K5FqXs3CnYPgmxPQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0e765d9b08dcc2386b799815f2c835c97a93614c commit 0e765d9b08dcc2386b799815f2c835c97a93614c Author: Brooks Davis AuthorDate: 2021-11-29 22:03:00 +0000 Commit: Brooks Davis CommitDate: 2021-11-29 22:04:58 +0000 syscalls: regen --- sys/compat/freebsd32/freebsd32_proto.h | 2 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 4 ++-- sys/kern/systrace_args.c | 4 ++-- sys/sys/sysproto.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index e7912d2fea0c..ce583e9ac78d 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -74,7 +74,7 @@ struct freebsd32_execve_args { char envv_l_[PADL_(uint32_t *)]; uint32_t * envv; char envv_r_[PADR_(uint32_t *)]; }; struct freebsd32_mprotect_args { - char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)]; + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index b5035a3868f6..4d075ca7470e 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -447,7 +447,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_mprotect */ case 74: { struct freebsd32_mprotect_args *p = params; - uarg[a++] = (intptr_t)p->addr; /* const void * */ + uarg[a++] = (intptr_t)p->addr; /* void * */ uarg[a++] = p->len; /* size_t */ iarg[a++] = p->prot; /* int */ *n_args = 3; @@ -3995,7 +3995,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 74: switch (ndx) { case 0: - p = "userland const void *"; + p = "userland void *"; break; case 1: p = "size_t"; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index d39c39050408..cb7b2ee503b9 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -444,7 +444,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* mprotect */ case 74: { struct mprotect_args *p = params; - uarg[a++] = (intptr_t)p->addr; /* const void * */ + uarg[a++] = (intptr_t)p->addr; /* void * */ uarg[a++] = p->len; /* size_t */ iarg[a++] = p->prot; /* int */ *n_args = 3; @@ -4091,7 +4091,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 74: switch (ndx) { case 0: - p = "userland const void *"; + p = "userland void *"; break; case 1: p = "size_t"; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index fc56afba1239..5d8d3321680c 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -266,7 +266,7 @@ struct munmap_args { char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; }; struct mprotect_args { - char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)]; + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; }; From nobody Tue Nov 30 01:08:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AC9EC18AD12C; Tue, 30 Nov 2021 01:08: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 4J33xs2nHYz3MJG; Tue, 30 Nov 2021 01:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BACB4E42; Tue, 30 Nov 2021 01:08: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 1AU18XH4015086; Tue, 30 Nov 2021 01:08:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU18XTE015085; Tue, 30 Nov 2021 01:08:33 GMT (envelope-from git) Date: Tue, 30 Nov 2021 01:08:33 GMT Message-Id: <202111300108.1AU18XTE015085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen Subject: git: bd6dce978c1a - main - rc.conf(5): Add _limits, _login_class, and _oomprotect List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd6dce978c1a4d4472c98ff5685de3c2f2bd0203 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638234513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cm8ekSBOs/Phk/pfvnTDDt1jmyukS1oZSn/Ne6HD0wQ=; b=JqYyrDQkEjO9h6Mot+i9Wyw0/FztyeLFonYJBvRsbSzRchSXX3W7aEUUQi0nrsu4VIc/Bg LttLD1eAV3pPf7yz+AJS8OBt5HUMD84p3tITKFDpqw45i44zmK/GAvG097E6hjHA0HcYgA 7I2Lt+F8t0Qa0yjk4KNw9pcGHOa3IEMQafwbK0XZsHNrhsv6G6K+SUT2auwJbFcILU9b4T 5LPjjFGVx+IAuKdwxJV36Uw1J0dmrRgo06zco1YfN/decz1Z3iR2czis5M1qb56VjOwo7C UHo6/Mt7su6DIHRtXWfQMs1gzHdOTsqxzRyscVR8Su/uU2zP3maNdH24EbA9bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638234513; a=rsa-sha256; cv=none; b=xTR5uRM0a21A9rN2II6VP2zQ7bApdHS/dAepzR8mVn4nEA0JJ6kHTOdAmvtNFYMjdYGqFY /Dy2XSf62Ackp0HwcZIy0IfAiBy6lx4zA/c2NfsffUVabQQDGdxJQA+G5ZOtLoFELJE0z6 nZj72FKf8RHUYFZHt2RaDWoJeO5jcYTeFd0lGEnmAikEvxLQPBvpm7UbAp7m41pdo3m8nn 0CAXTRilubjfXFZs5VFCTOe2vd9S/0odSnEsgv9i7DJatJxplJ0AmmNOHAWEvlqBD/fctZ 16PDMaKjTvbM0+G/eDlYcodOv5GalPvEszfJafqY9+nrmBi+0zPCs5+ylxEKLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by debdrup (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bd6dce978c1a4d4472c98ff5685de3c2f2bd0203 commit bd6dce978c1a4d4472c98ff5685de3c2f2bd0203 Author: Daniel Ebdrup Jensen AuthorDate: 2021-05-18 12:46:41 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2021-11-30 01:06:40 +0000 rc.conf(5): Add _limits, _login_class, and _oomprotect Add a few very useful variables that might easily be overlooked, since they're only documented in rc.subr(8) which might not be the first place that people look. At least _oomprotect has existed since 11.0-RELEASE, and doesn't appear to be very well-known. While the others aren't as new, in my estimation, a lot more people would use them if they knew about them. While here, also add a reference to rc.subr(8) and login.conf(5), and sort the variables alphabetically. Reported by: Daniel Dettlaff Reviewed by: ceri, gbe, 0mp, ygy, a.wolk, pauamma --- share/man/man5/rc.conf.5 | 51 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index a22f267c13b9..7a704242373b 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 21, 2021 +.Dd November 30, 2021 .Dt RC.CONF 5 .Os .Sh NAME @@ -192,24 +192,53 @@ services are enabled that utilize the force_depend check. .Pq Vt str .Xr chroot 8 to this directory before running the service. -.It Ao Ar name Ac Ns Va _user -.Pq Vt str -Run the service under this user account. -.It Ao Ar name Ac Ns Va _group -.Pq Vt str -Run the chrooted service under this system group. -Unlike the _user -setting, this setting has no effect if the service is not chrooted. .It Ao Ar name Ac Ns Va _fib .Pq Vt int The .Xr setfib 1 value to run the service under. +.It Ao Ar name Ac Ns Va _group +.Pq Vt str +Run the chrooted service under this system group. +Unlike the +.Ao Ar name Ac Ns Va _user +setting, this setting has no effect if the service is not chrooted. +.It Ao Ar name Ac Ns Va _limits +.Pq Vt str +Resource limits to apply to the service using +.Xr limits 1 . +By default, resource limits are based on the login class defined in +.Ao Ar name Ac Ns Va _login_class . +.It Ao Ar name Ac Ns Va _login_class +.Pq Vt str +Login class to be used with +.Ao Ar name Ac Ns Va _limits . +Defaults to +.Dq Li daemon . .It Ao Ar name Ac Ns Va _nice .Pq Vt int The .Xr nice 1 value to run the service under. +.It Ao Ar name Ac Ns Va _oomprotect +Use +.Xr protect 1 +to prevent the service from being killed when swap space +is exhausted. +Use +.Dq Li YES +to protect only the service itself, and +.Dq Li ALL +to protect the service and all child processes. +.Pp +Please note rc scripts that redefine +.Bd +${name}_cmd +.Ed +such as PostgreSQL will not a inherit the OOM killer protection. +.It Ao Ar name Ac Ns Va _user +.Pq Vt str +Run the service under this user account. .It Va apm_enable .Pq Vt bool If set to @@ -4625,6 +4654,8 @@ it will be made permanently active. .Xr gdb 1 , .Xr info 1 , .Xr kbdcontrol 1 , +.Xr limits 1 , +.Xr protect 1 , .Xr sh 1 , .Xr vi 1 , .Xr vidcontrol 1 , @@ -4646,6 +4677,7 @@ it will be made permanently active. .Xr ipnat 5 , .Xr jail.conf 5 , .Xr loader.conf 5 , +.Xr login.conf 5 , .Xr motd 5 , .Xr newsyslog.conf 5 , .Xr pf.conf 5 , @@ -4694,6 +4726,7 @@ it will be made permanently active. .Xr quotaon 8 , .Xr rc 8 , .Xr rc.sendmail 8 , +.Xr rc.subr 8 , .Xr rcorder 8 , .Xr rfcomm_pppd 8 , .Xr route 8 , From nobody Tue Nov 30 01:13:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 909E618AFCDA; Tue, 30 Nov 2021 01:13:06 +0000 (UTC) (envelope-from debdrup@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 4J34361R35z3PN4; Tue, 30 Nov 2021 01:13:06 +0000 (UTC) (envelope-from debdrup@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638234786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=P4azYCLz5vM/rq1JNf8adW1BIltnv7771vYPe/vo1SM=; b=tNghfxpVW9yTcFOdYa4wLsBNbjDkRUNJvvS+BN2QpwY8wSt63ow4HPyj7abMyPa3ooR+aU gqvyVEEsTQH176tFtRorps8e1moEP+uB7sG+ULYSDx3LaZ17mbmh7dvEfiUo+nCp3+piyd JK1wnATTSv76X6hpXcXFwsRDPttV/ELqFZsFxk3H0qR1Lmqj4bs9HMPNtit8BefEzMnloI lFq0ppiQM+e/vZ8G0vqDBJ4FgOTctJdIF/JoWoRhHEACZ5bz7MCz95hoOA5JwkDXxOFNCX /trpk7vvS0GLqKPE3Q8yTmN9QX648MERvhQphEiTKUx4MJ+aSG/U34oJlNO7nQ== Received: by freefall.freebsd.org (Postfix, from userid 1471) id 17AE91F3BC; Tue, 30 Nov 2021 01:13:06 +0000 (UTC) Date: Tue, 30 Nov 2021 02:13:04 +0100 From: Daniel Ebdrup Jensen To: dev-commits-src-main@freebsd.org, dev-commits-src-all@FreeBSD.org Subject: Re: git: bd6dce978c1a - main - rc.conf(5): Add _limits, _login_class, and _oomprotect Message-ID: <20211130011304.aaflevbo5g47jpil@nerd-thinkpad.local> Mail-Followup-To: Daniel Ebdrup Jensen , dev-commits-src-main@freebsd.org, dev-commits-src-all@FreeBSD.org References: <202111300108.1AU18XTE015085@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fjefr2hmm5yycfuv" Content-Disposition: inline In-Reply-To: <202111300108.1AU18XTE015085@gitrepo.freebsd.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638234786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=P4azYCLz5vM/rq1JNf8adW1BIltnv7771vYPe/vo1SM=; b=SjvexIeEgkfdsRlqoeuswEV0o6pxCfOC+h5iu6Tmv2tS5u7tnfSnh6XSuuh/Up9c7lMxz8 rBHvoeorgsa+RvMe64UOYIogHO6iljjbx+F8GlJXDs/iRnRwEzhfuoNF/YOexlPcBdr3qE DavBhbyPma+hqSPBlVf4xSFEqjXJG3Hu6oyPmae8JBjnNrXUpLgy9a1n1GJjl5ndGGcpjC SiDz6u148lpnTeDlbtT57FBNx4huAzKrm23IWC9Xd1vW4WTqpz41+85irzagKaUglwxdZq tqOY3FQ6q5g6UXyqGkXOrGlMAnik1UQClS7s1zPprXDGh4jxnn31ImY2sTVYsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638234786; a=rsa-sha256; cv=none; b=mLEc3KZ+ymVMtGI09Y2A+e0SM8as9uKJJ6NNDiaJefPnBmi1DMHQwXcYtDkMzxYRf22cNt gWKM+ixNbWOYXI+t2AVwglMcxSDrO5dJ1mvs+X48LFlLNFfl1GWN/LetpHPsfvMs7KOR3D g+5WBaCjElCA6YwSsA2g5GHxuRhNHw76c0m25pf4VeqQ0+xuZlLbRU8++fTP3v66zQQ6Hr PuzCbIhJhNLy67GgYmaegFq4AG5XUVBxoW5FK814IQH2/t605oV/fjuBJ2bbLYsdjoobLa 4NRWTvd67ZKZfMMgHxzroPmZssamHMytIsk05FptqY+0yTTpIJDU5a8ARXxTIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --fjefr2hmm5yycfuv Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On Tue, Nov 30, 2021 at 01:08:33AM +0000, Daniel Ebdrup Jensen wrote: >The branch main has been updated by debdrup (doc committer): > >URL: https://cgit.FreeBSD.org/src/commit/?id=bd6dce978c1a4d4472c98ff5685de3c2f2bd0203 > >commit bd6dce978c1a4d4472c98ff5685de3c2f2bd0203 >Author: Daniel Ebdrup Jensen >AuthorDate: 2021-05-18 12:46:41 +0000 >Commit: Daniel Ebdrup Jensen >CommitDate: 2021-11-30 01:06:40 +0000 > > rc.conf(5): Add _limits, _login_class, and _oomprotect > > Add a few very useful variables that might easily be overlooked, since > they're only documented in rc.subr(8) which might not be the first place > that people look. > > At least _oomprotect has existed since 11.0-RELEASE, and doesn't appear > to be very well-known. While the others aren't as new, in my estimation, > a lot more people would use them if they knew about them. > > While here, also add a reference to rc.subr(8) and login.conf(5), and > sort the variables alphabetically. > > Reported by: Daniel Dettlaff > Reviewed by: ceri, gbe, 0mp, ygy, a.wolk, pauamma >--- Hi folks, Sorry, despite working on this for what's probably too long, I forgot to add this: Differential Revision: https://reviews.freebsd.org/D30330 Clearly I need a small pointy hat. :) Yours apologetically, Daniel Ebdrup Jensen --fjefr2hmm5yycfuv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEDonNJPbg/JLIMoS6Ps5hSHzN87oFAmGleqBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDBF ODlDRDI0RjZFMEZDOTJDODMyODRCQTNFQ0U2MTQ4N0NDREYzQkEACgkQPs5hSHzN 87qE1Qf/b/AY1RAQbOU5eek+G0AhJI7S41xHlg0VKLDS27Syy8Jxc6eoeYEGMcS9 toREGMlpE/AbHn8vhz2bPq4HUY+gyPNNAm8fGJogPujhmWJecv+z/hTVPM/Cicy6 fTBJTV9vmLE8JxCZSI1iIFuYU4AdaooXqqXsebqFh54TkHmNnFc0nMCiGhiyXvcj OXoASMKMBYVA4UBq3thMWzuhymqGwlQV703O0v2aEO5Rbf2BY7H7kaBGko1Z1v/0 8a3VQLW47A14i+vISpYbbve512UKtjDxfwByPUSziwp6UoY0kc383mZuQxDgnZDr J/2kVL42yGyMvJLQJiNcajNJoArKkQ== =fpU+ -----END PGP SIGNATURE----- --fjefr2hmm5yycfuv-- From nobody Tue Nov 30 01:20:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5E88418B304C; Tue, 30 Nov 2021 01:20: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 4J34CC5nxXz3RG9; Tue, 30 Nov 2021 01:20:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0D4E4FB8; Tue, 30 Nov 2021 01:20: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 1AU1K7ss031459; Tue, 30 Nov 2021 01:20:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU1K7WD031456; Tue, 30 Nov 2021 01:20:07 GMT (envelope-from git) Date: Tue, 30 Nov 2021 01:20:07 GMT Message-Id: <202111300120.1AU1K7WD031456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: f5b0083302ed - main - mpsutil: Fix data truncation by too short buffers. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5b0083302edcf421265530cc01dd87c06b23af1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638235208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QURekTin+Kf884b/OG852ojBUhHSn7CACN+l3L/u0cg=; b=LR0/zG46W7aNsp4JN7CEj5s9Eog6FctfIPgq932yC00SMF65swBFFZmdQ3Ek64VfccbFyQ VDWO/cw+Dchk8oQ6RIMqPkyeh1DxquivpI2N73IkV21wfrdsAO8/+nl3c66nv4VN9dzmUI O/tT8Lo8dTIKvoIeGMGXDwrFVXew47x3D4fqKI1A8tywyA2TDhpA0TQkvpdeMFiorSnwj9 hBV3O0874ZDQ+QjQekAG2bF85NHDnDCvEyBKRi/+BdJoH3ZFyb/211UkhteXxCyEdwhxqZ /8MvHrtnVkQ4rtCem7zGS9WcoJHKsgVdhTEtmMEwsTs/RHHp7fPhwceR6r74TA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638235208; a=rsa-sha256; cv=none; b=OosJnruFi6mqIpHuhA6SbCa+dNiCqpnGN7A0lZAIDgCJzjzxofxKhnmEHZAYo+jin33Bgg 8pA+VkYGfbcUK8qe2g7T8zNhphQqGy8G+IkmK7FB8/svLC0YA+4yt9OKojuVKbZbMnnTMp E3hj84nUbbM7NqtNWwGI0uBbqe6sTVR3Do9gYyD8ca30fq8EHVtNJWl1+sYQen3xlnOMOi JRpir3flCOefqC2hm5uJULlDQoG1pnImuQsUAnYCrAgjvYyEHtsAMwy74bpmlYX1b4B4FM U583hl3kVo8VIbqfPEB3fW19kHgGWRNDVXyhfUv20ct3RrxbkcM9yHkT/f9LDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=f5b0083302edcf421265530cc01dd87c06b23af1 commit f5b0083302edcf421265530cc01dd87c06b23af1 Author: Alexander Motin AuthorDate: 2021-11-30 01:14:13 +0000 Commit: Alexander Motin CommitDate: 2021-11-30 01:20:03 +0000 mpsutil: Fix data truncation by too short buffers. Length of some string buffers was insufficient for cases of more that 99 targets per HBA or slots per enclosure. Some others are tuned just for better alignment. While there also fix output formatting issues. MFC after: 1 week Sponsored by: iXsystems, Inc. --- usr.sbin/mpsutil/mps_show.c | 51 +++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/usr.sbin/mpsutil/mps_show.c b/usr.sbin/mpsutil/mps_show.c index 7c2596497818..d293003fc67f 100644 --- a/usr.sbin/mpsutil/mps_show.c +++ b/usr.sbin/mpsutil/mps_show.c @@ -74,7 +74,7 @@ show_adapter(int ac, char **av) MPI2_IOC_FACTS_REPLY *facts; U16 IOCStatus; char *speed, *minspeed, *maxspeed, *isdisabled, *type; - char devhandle[5], ctrlhandle[5]; + char devhandle[8], ctrlhandle[8]; int error, fd, v, i; if (ac != 1) { @@ -210,13 +210,14 @@ show_adapter(int ac, char **av) type = get_device_type(le32toh(phy0->ControllerPhyDeviceInfo)); if (le16toh(phy0->AttachedDevHandle) != 0) { - snprintf(devhandle, 5, "%04x", le16toh(phy0->AttachedDevHandle)); - snprintf(ctrlhandle, 5, "%04x", + snprintf(devhandle, sizeof(devhandle), "%04x", + le16toh(phy0->AttachedDevHandle)); + snprintf(ctrlhandle, sizeof(ctrlhandle), "%04x", le16toh(phy0->ControllerDevHandle)); speed = get_device_speed(phy0->NegotiatedLinkRate); } else { - snprintf(devhandle, 5, " "); - snprintf(ctrlhandle, 5, " "); + snprintf(devhandle, sizeof(devhandle), " "); + snprintf(ctrlhandle, sizeof(ctrlhandle), " "); speed = " "; } printf("%-8d%-12s%-11s%-10s%-8s%-7s%-7s%s\n", @@ -516,7 +517,7 @@ show_devices(int ac, char **av) MPI2_CONFIG_PAGE_SAS_DEV_0 *device; MPI2_CONFIG_PAGE_EXPANDER_1 *exp1; uint16_t IOCStatus, handle, bus, target; - char *type, *speed, enchandle[5], slot[3], bt[8]; + char *type, *speed, enchandle[8], slot[8], bt[16]; char buf[256]; int fd, error, nphys; @@ -605,11 +606,11 @@ show_devices(int ac, char **av) speed = " "; if (device->EnclosureHandle != 0) { - snprintf(enchandle, 5, "%04x", le16toh(device->EnclosureHandle)); - snprintf(slot, 3, "%02d", le16toh(device->Slot)); + snprintf(enchandle, sizeof(enchandle), "%04x", le16toh(device->EnclosureHandle)); + snprintf(slot, sizeof(slot), "%02d", le16toh(device->Slot)); } else { - snprintf(enchandle, 5, " "); - snprintf(slot, 3, " "); + snprintf(enchandle, sizeof(enchandle), " "); + snprintf(slot, sizeof(slot), " "); } printf("%-10s", bt); snprintf(buf, sizeof(buf), "%08x%08x", le32toh(device->SASAddress.High), @@ -634,7 +635,7 @@ static int show_enclosures(int ac, char **av) { MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 *enc; - char *type, sepstr[5]; + char *type, sepstr[8]; uint16_t IOCStatus, handle; int fd, error, issep; @@ -663,9 +664,9 @@ show_enclosures(int ac, char **av) } type = get_enc_type(le16toh(enc->Flags), &issep); if (issep == 0) - snprintf(sepstr, 5, " "); + snprintf(sepstr, sizeof(sepstr), " "); else - snprintf(sepstr, 5, "%04x", le16toh(enc->SEPDevHandle)); + snprintf(sepstr, sizeof(sepstr), "%04x", le16toh(enc->SEPDevHandle)); printf(" %.2d %08x%08x %s %04x %s\n", le16toh(enc->NumSlots), le32toh(enc->EnclosureLogicalID.High), le32toh(enc->EnclosureLogicalID.Low), sepstr, le16toh(enc->EnclosureHandle), @@ -685,7 +686,7 @@ show_expanders(int ac, char **av) MPI2_CONFIG_PAGE_EXPANDER_0 *exp0; MPI2_CONFIG_PAGE_EXPANDER_1 *exp1; uint16_t IOCStatus, handle; - char enchandle[5], parent[5], rphy[3], rhandle[5]; + char enchandle[8], parent[8], rphy[4], rhandle[8]; char *speed, *min, *max, *type; int fd, error, nphys, i; @@ -717,19 +718,19 @@ show_expanders(int ac, char **av) handle = le16toh(exp0->DevHandle); if (exp0->EnclosureHandle == 0x00) - snprintf(enchandle, 5, " "); + snprintf(enchandle, sizeof(enchandle), " "); else - snprintf(enchandle, 5, "%04d", le16toh(exp0->EnclosureHandle)); + snprintf(enchandle, sizeof(enchandle), "%04d", le16toh(exp0->EnclosureHandle)); if (exp0->ParentDevHandle == 0x0) - snprintf(parent, 5, " "); + snprintf(parent, sizeof(parent), " "); else - snprintf(parent, 5, "%04x", le16toh(exp0->ParentDevHandle)); + snprintf(parent, sizeof(parent), "%04x", le16toh(exp0->ParentDevHandle)); printf(" %02d %08x%08x %04x %s %s %d\n", exp0->NumPhys, le32toh(exp0->SASAddress.High), le32toh(exp0->SASAddress.Low), le16toh(exp0->DevHandle), parent, enchandle, exp0->SASLevel); printf("\n"); - printf(" Phy RemotePhy DevHandle Speed Min Max Device\n"); + printf(" Phy RemotePhy DevHandle Speed Min Max Device\n"); for (i = 0; i < nphys; i++) { exp1 = mps_read_extended_config_page(fd, MPI2_CONFIG_EXTPAGETYPE_SAS_EXPANDER, @@ -745,20 +746,20 @@ show_expanders(int ac, char **av) } type = get_device_type(le32toh(exp1->AttachedDeviceInfo)); if ((le32toh(exp1->AttachedDeviceInfo) &0x7) == 0) { - speed = " "; - snprintf(rphy, 3, " "); - snprintf(rhandle, 5, " "); + speed = " "; + snprintf(rphy, sizeof(rphy), " "); + snprintf(rhandle, sizeof(rhandle), " "); } else { speed = get_device_speed( exp1->NegotiatedLinkRate); - snprintf(rphy, 3, "%02d", + snprintf(rphy, sizeof(rphy), "%02d", exp1->AttachedPhyIdentifier); - snprintf(rhandle, 5, "%04x", + snprintf(rhandle, sizeof(rhandle), "%04x", le16toh(exp1->AttachedDevHandle)); } min = get_device_speed(exp1->HwLinkRate); max = get_device_speed(exp1->HwLinkRate >> 4); - printf(" %02d %s %s %s %s %s %s\n", exp1->Phy, rphy, rhandle, speed, min, max, type); + printf(" %02d %s %s %s %s %s %s\n", exp1->Phy, rphy, rhandle, speed, min, max, type); free(exp1); } From nobody Tue Nov 30 01:35:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2AD9118BBC82; Tue, 30 Nov 2021 01:35:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J34Y55GZhz3nKf; Tue, 30 Nov 2021 01:35:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9617F53EA; Tue, 30 Nov 2021 01:35: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 1AU1Zb1C054605; Tue, 30 Nov 2021 01:35:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU1ZbJc054604; Tue, 30 Nov 2021 01:35:37 GMT (envelope-from git) Date: Tue, 30 Nov 2021 01:35:37 GMT Message-Id: <202111300135.1AU1ZbJc054604@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: 02e3eb8d482d - stable/13 - mbuf: Only allow extpg mbufs if the system has a direct map List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 02e3eb8d482d513f1870b36c523a8f39a1c67b94 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638236137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2nh1SRx4AQlcnrAKNoCoxDgVNm8VnUVkB4f8tQTs+vI=; b=q5alA+imXfjJ+rbAl2jAbBuMZxBPnPm8WS5h2SWP40iupWtZEaeRuy0ZI4xiIK+jwSUZ4h vIe8odpme6513RreiCKr0oUZjyaA1myui/qWUrMCfdi/0G39elCdmFeA8x7qeHNtid2X1q 4CUoYNBdfg+EVip+iVE1w0Wo+vqQeKi0ymBY+4DXzB2GZIPnzvirrdgYY3bJxKdX7Z8UC0 EXSg5Gmb5mbn6snX3G2eN4Waf+XFuqZ2MMnDhxAVUU74JFxcJFNmEyNp7qxrYF8DUU8HCU hOXrVibksb88tO/HQYwX9K+YxAhwvSIHBeg3aZ/BXIyU9AhEKlQ+gTAaA0v6tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638236137; a=rsa-sha256; cv=none; b=wLm8WYtEA9eDUewLpQ8Hs2eYlPhVsMH8FECXhj2bCedOkGyLhz2MTKZYuqet4wCIeKCi58 8Y+cjSgTx7x0jTKqPsy5HVgDKe8/FVvITninoTRNhatBchiUKFdkXF+sTDm9i8FNgYUGsU Zi5prP0BABwkUGd30G7KMqnHP54z+uJ0i/ttLeVMQHz3rgawyBqUW9RhsC3Mh6Wf+gqg0b zVn05sfvryGdQWI/Y3+3fWaTa2H12U+q24sP/PhaHxij55+VeAsyLduAxVt+EjY7mVmoRK OJxT2gvaZHYSWzFh1WxPRP46/CGez0rSg1nR+RDpvvJn6o7TLLBIKpOqaecdCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=02e3eb8d482d513f1870b36c523a8f39a1c67b94 commit 02e3eb8d482d513f1870b36c523a8f39a1c67b94 Author: Mark Johnston AuthorDate: 2021-11-16 18:31:04 +0000 Commit: Mark Johnston CommitDate: 2021-11-30 01:34:54 +0000 mbuf: Only allow extpg mbufs if the system has a direct map Some upcoming changes will modify software checksum routines like in_cksum() to operate using m_apply(), which uses the direct map to access packet data for unmapped mbufs. This approach of course does not work on platforms without a direct map, so we have to disallow the use of unmapped mbufs on such platforms. I believe this is the right tradeoff: we only configure KTLS on amd64 and arm64 today (and one KTLS consumer, NFS TLS, requires a direct map already), and the use of unmapped mbufs with plain sendfile is a recent optimization. If need be, m_apply() could be modified to create CPU-private mappings of extpg mbuf pages as a fallback. So, change mb_use_ext_pgs to be hard-wired to zero on systems without a direct map. Note that PMAP_HAS_DMAP is not a compile-time constant on some systems, so the default value of mb_use_ext_pgs has to be determined during boot. Reviewed by: jhb Discussed with: gallatin Sponsored by: The FreeBSD Foundation (cherry picked from commit fcaa890c4469118255d463495b4044eef484fa3e) --- sys/kern/kern_mbuf.c | 32 ++++++++++++++++++++++++++++++-- sys/rpc/rpcsec_tls/rpctls_impl.c | 2 +- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 4e818d87a756..3a389e1f2fd3 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -116,9 +116,26 @@ int nmbjumbop; /* limits number of page size jumbo clusters */ int nmbjumbo9; /* limits number of 9k jumbo clusters */ int nmbjumbo16; /* limits number of 16k jumbo clusters */ -bool mb_use_ext_pgs = true; /* use M_EXTPG mbufs for sendfile & TLS */ -SYSCTL_BOOL(_kern_ipc, OID_AUTO, mb_use_ext_pgs, CTLFLAG_RWTUN, +bool mb_use_ext_pgs = false; /* use M_EXTPG mbufs for sendfile & TLS */ + +static int +sysctl_mb_use_ext_pgs(SYSCTL_HANDLER_ARGS) +{ + int error, extpg; + + extpg = mb_use_ext_pgs; + error = sysctl_handle_int(oidp, &extpg, 0, req); + if (error == 0 && req->newptr != NULL) { + if (extpg != 0 && !PMAP_HAS_DMAP) + error = EOPNOTSUPP; + else + mb_use_ext_pgs = extpg != 0; + } + return (error); +} +SYSCTL_PROC(_kern_ipc, OID_AUTO, mb_use_ext_pgs, CTLTYPE_INT | CTLFLAG_RW, &mb_use_ext_pgs, 0, + sysctl_mb_use_ext_pgs, "IU", "Use unmapped mbufs for sendfile(2) and TLS offload"); static quad_t maxmbufmem; /* overall real memory limit for all mbufs */ @@ -137,6 +154,7 @@ static void tunable_mbinit(void *dummy) { quad_t realmem; + int extpg; /* * The default limit for all mbuf related memory is 1/2 of all @@ -173,6 +191,16 @@ tunable_mbinit(void *dummy) if (nmbufs < nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) nmbufs = lmax(maxmbufmem / MSIZE / 5, nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16); + + /* + * Unmapped mbufs can only safely be used on platforms with a direct + * map. + */ + if (PMAP_HAS_DMAP) { + extpg = mb_use_ext_pgs; + TUNABLE_INT_FETCH("kern.ipc.mb_use_ext_pgs", &extpg); + mb_use_ext_pgs = extpg != 0; + } } SYSINIT(tunable_mbinit, SI_SUB_KMEM, SI_ORDER_MIDDLE, tunable_mbinit, NULL); diff --git a/sys/rpc/rpcsec_tls/rpctls_impl.c b/sys/rpc/rpcsec_tls/rpctls_impl.c index 110ba107540a..c495213b08e2 100644 --- a/sys/rpc/rpcsec_tls/rpctls_impl.c +++ b/sys/rpc/rpcsec_tls/rpctls_impl.c @@ -711,7 +711,7 @@ rpctls_getinfo(u_int *maxlenp, bool rpctlscd_run, bool rpctlssd_run) int error; size_t siz; - if (PMAP_HAS_DMAP == 0 || !mb_use_ext_pgs) + if (!mb_use_ext_pgs) return (false); siz = sizeof(enable); error = kernel_sysctlbyname(curthread, "kern.ipc.tls.enable", From nobody Tue Nov 30 01:35:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D11E318BBB98; Tue, 30 Nov 2021 01:35: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 4J34Y70Z2pz3n5q; Tue, 30 Nov 2021 01:35:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4C0154D9; Tue, 30 Nov 2021 01:35: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 1AU1Zcj2054631; Tue, 30 Nov 2021 01:35:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU1ZcCC054630; Tue, 30 Nov 2021 01:35:38 GMT (envelope-from git) Date: Tue, 30 Nov 2021 01:35:38 GMT Message-Id: <202111300135.1AU1ZcCC054630@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: 422456ae27f5 - stable/13 - sctp: Use m_apply() to calcuate a checksum for an mbuf chain List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 422456ae27f5f79dee3969de9190fbe9b9301c3c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638236139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ujecD9ihZvX7EQy6pZT8qEKudshjvSnhNEv9FEf027g=; b=ONqlZtZHVBxO1pOmiWFNDND2RJHYDUxlFJmCrV7mlnk0MJq+k5JA07kPyAANLJVEt/U7Ip TmU1xzk4ekA9qeWjGXTJWa/bQBHQkekOLiluIJqnoBcDFJcymi7+pVPGVliDkiWLha6zFL IoukliXYR29+eUu2D0kzDY2IuDJY8rXb2CjkefCzMm6EwYy7RMrUaS1/ASxzxkGmcCwbBy v8kIszGHCX7ZR32CKP3dzft51TMyOIi0+OXYI0PAd7jNs+ZOy3VHmXTBPy4Us8VQYYxgYv Q7lk8mhnO1puOsYZGYtMQF2Azl4afj+mGxjLfS4S7k23Dt7KpvKCQWPB1IZY3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638236139; a=rsa-sha256; cv=none; b=Jv8UufvmZuXuCYuWIqZ7IThho1mMvKxd45FV3VOw4c5Z/Yc88/dmhI7C7NKRbCvTRueNN+ 26ZXuUOszr1qXb64bbVeuYLXlBakGXAeTK+3ZmR5TrbhM6mBkGTMUP/1kteZoy6/OK26PU dYmSCPUpI1yoK1reUvPWS/ChIMSzmMbqiSgI0VmVyzBArpmiGO6R+8XNpdVFftYSyVVV5r MNBuemjN1faNrN/9lDtIooNtfOdE4/yY3gZN+bRGQtsc0zpoo4/jmrJunc3VZP27JqpDhT 81AFtURawof7lDZsEE2vl+YIs+19/wN0pP+vqna4+e1AWjEHNTrNEU1yrLagkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=422456ae27f5f79dee3969de9190fbe9b9301c3c commit 422456ae27f5f79dee3969de9190fbe9b9301c3c Author: Mark Johnston AuthorDate: 2021-11-16 18:36:30 +0000 Commit: Mark Johnston CommitDate: 2021-11-30 01:35:08 +0000 sctp: Use m_apply() to calcuate a checksum for an mbuf chain m_apply() works on unmapped mbufs, so this will let us elide mb_unmapped_to_ext() calls preceding sctp_calculate_cksum() calls in the network stack. Modify sctp_calculate_cksum() to assume it's passed an mbuf header. This assumption appears to be true in practice, and we need to know the full length of the chain. No functional change intended. Reviewed by: tuexen, jhb Sponsored by: The FreeBSD Foundation (cherry picked from commit b4d758a0cc54d991d2bdf7f697ec0b6b3fd6230d) --- sys/netinet/sctp_crc32.c | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/sys/netinet/sctp_crc32.c b/sys/netinet/sctp_crc32.c index a36d36dc4861..97b881bb5062 100644 --- a/sys/netinet/sctp_crc32.c +++ b/sys/netinet/sctp_crc32.c @@ -80,6 +80,16 @@ sctp_finalize_crc32c(uint32_t crc32c) return (crc32c); } +static int +sctp_calculate_cksum_cb(void *arg, void *data, u_int len) +{ + uint32_t *basep; + + basep = arg; + *basep = calculate_crc32c(*basep, data, len); + return (0); +} + /* * Compute the SCTP checksum in network byte order for a given mbuf chain m * which contains an SCTP packet starting at offset. @@ -89,30 +99,17 @@ sctp_finalize_crc32c(uint32_t crc32c) uint32_t sctp_calculate_cksum(struct mbuf *m, uint32_t offset) { - uint32_t base = 0xffffffff; - - while (offset > 0) { - KASSERT(m != NULL, ("sctp_calculate_cksum, offset > length of mbuf chain")); - if (offset < (uint32_t)m->m_len) { - break; - } - offset -= m->m_len; - m = m->m_next; - } - if (offset > 0) { - base = calculate_crc32c(base, - (unsigned char *)(m->m_data + offset), - (unsigned int)(m->m_len - offset)); - m = m->m_next; - } - while (m != NULL) { - base = calculate_crc32c(base, - (unsigned char *)m->m_data, - (unsigned int)m->m_len); - m = m->m_next; - } - base = sctp_finalize_crc32c(base); - return (base); + uint32_t base; + int len; + + M_ASSERTPKTHDR(m); + KASSERT(offset < m->m_pkthdr.len, + ("%s: invalid offset %u into mbuf %p", __func__, offset, m)); + + base = 0xffffffff; + len = m->m_pkthdr.len - offset; + (void)m_apply(m, offset, len, sctp_calculate_cksum_cb, &base); + return (sctp_finalize_crc32c(base)); } #if defined(SCTP) || defined(SCTP_SUPPORT) From nobody Tue Nov 30 01:35:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F121818BBAC1; Tue, 30 Nov 2021 01:35:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J34Y81StQz3nBG; Tue, 30 Nov 2021 01:35:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E751253EB; Tue, 30 Nov 2021 01:35: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 1AU1ZdZt054660; Tue, 30 Nov 2021 01:35:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU1ZdNM054659; Tue, 30 Nov 2021 01:35:39 GMT (envelope-from git) Date: Tue, 30 Nov 2021 01:35:39 GMT Message-Id: <202111300135.1AU1ZdNM054659@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: 5b5bbf2e7c34 - stable/13 - sctp: Remove now-unneeded mb_unmapped_to_ext() calls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5b5bbf2e7c341ec6ba569536fb14acb990d53334 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638236140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HEKZZd4gMvSQH95ey7MkqhPm3lJELcGobHynSI2GYK0=; b=yViCLOBaOlFl7xWerTOxOhKrlPZ/G3sKAd+U4iGrKkcn2/X7Gdl1NwcIHXFqyL5y1vZj9G QLdadVwkP6Eap9PlM7xpKCMKe9EKEh5wNAfHhWE5W3QZgQItS+HogRBo+bgkt+3mjbMHZT Wn8xqa6LIg1mM9WojZCmOUeAvhc5dRxi8yqBrfriGUggOPAOIAV+wvmGrBQfxy+S4doHqF gSLT7JsMMRfbS1Dm0UDddhDhTN0SOqg2PtRcq2UqrecBURu0b13DGx1dknt6feL71qP+tf hD2pux65rT2uT+A/PSKLEEEMDsQ7AfwI3pca4gEkvmHMDDf8jsxazqVjNYdv2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638236140; a=rsa-sha256; cv=none; b=OgK3hHDKQpMoPVczkSryhITLl4YAmNNnnM8l3AmMYc1MRPmvSomzmNNNZG24P3WZyRDaza YS4CKGoSr4cbAnh3/SrYYZOPpS2HvOsFcTljwJfcLSiv44SoHTk5lYqBF3gOB+Yi6LuTLU ZMfJouwicCYrqdPdz9a5gZ87Mhp1nkORchvX9ivbyrg/H1qmB04Qg9roEj9nhQPOpwJX+x kV6B6sslwqOKkspJrKgDzMVrSN/x6i0OtuQOn1dV0S0YHyWcFDI8cYEetRcXLoElIGgXWS bl4XpiNCaXAtGeRu08a9jT2TgZSvj4DpI/t78laHUDI4qQOGqCnlqnblAp9o2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5b5bbf2e7c341ec6ba569536fb14acb990d53334 commit 5b5bbf2e7c341ec6ba569536fb14acb990d53334 Author: Mark Johnston AuthorDate: 2021-11-16 18:38:09 +0000 Commit: Mark Johnston CommitDate: 2021-11-30 01:35:20 +0000 sctp: Remove now-unneeded mb_unmapped_to_ext() calls sctp_delayed_checksum() now handles unmapped mbufs, thanks to m_apply(). No functional change intended. Reviewed by: tuexen Sponsored by: The FreeBSD Foundation (cherry picked from commit 756bb50b6a867f3309ce76d76f1842a667dd303a) --- sys/netinet/ip_divert.c | 6 ------ sys/netinet/ip_output.c | 12 ------------ sys/netipsec/ipsec_output.c | 12 ------------ sys/netpfil/pf/pf.c | 3 --- 4 files changed, 33 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 4919893d6a61..936e216e0926 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -220,9 +220,6 @@ divert_packet(struct mbuf *m, bool incoming) } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP) { - m = mb_unmapped_to_ext(m); - if (m == NULL) - return; sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; } @@ -238,9 +235,6 @@ divert_packet(struct mbuf *m, bool incoming) } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) - return; sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; } diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index c269fca42015..4acec2bb877c 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -750,12 +750,6 @@ sendit: } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSTAT_INC(ips_odropped); - error = ENOBUFS; - goto bad; - } sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; } @@ -908,12 +902,6 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m0->m_pkthdr.csum_flags & CSUM_SCTP) { - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) { - error = ENOBUFS; - IPSTAT_INC(ips_odropped); - goto done; - } sctp_delayed_cksum(m0, hlen); m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; } diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index 86f06fd10947..a2deef95cdb5 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -336,12 +336,6 @@ ipsec4_common_output(struct mbuf *m, struct inpcb *inp, int forwarding) if (m->m_pkthdr.csum_flags & CSUM_SCTP) { struct ip *ip; - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSECSTAT_INC(ips_out_nomem); - key_freesp(&sp); - return (ENOBUFS); - } ip = mtod(m, struct ip *); sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; @@ -642,12 +636,6 @@ ipsec6_common_output(struct mbuf *m, struct inpcb *inp, int forwarding) } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSEC6STAT_INC(ips_out_nomem); - key_freesp(&sp); - return (ENOBUFS); - } sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; } diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 042658906bd2..84db11d2f0ef 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5976,9 +5976,6 @@ pf_route(struct mbuf **m, struct pf_krule *r, int dir, struct ifnet *oifp, } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m0->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) - goto done; sctp_delayed_cksum(m0, (uint32_t)(ip->ip_hl << 2)); m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; } From nobody Tue Nov 30 02:16:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6A33818B1B87; Tue, 30 Nov 2021 02:16: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 4J35SM0KKVz4Vcr; Tue, 30 Nov 2021 02:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DEE5C59FC; Tue, 30 Nov 2021 02:16: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 1AU2GY9h008105; Tue, 30 Nov 2021 02:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU2GY9W008104; Tue, 30 Nov 2021 02:16:34 GMT (envelope-from git) Date: Tue, 30 Nov 2021 02:16:34 GMT Message-Id: <202111300216.1AU2GY9W008104@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: adbaf1b443c6 - main - posix_spawn.c: format fae_action anon enum more stylish List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: adbaf1b443c68c70911aeb62c9963dd583ec9b45 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638238595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8QKlPwRMvsiAN0DTy9pk9mKdMbEACsvORES2qz+WgaI=; b=UwdAD6b/zQo5TsT6El7m+T9AebDMb+RdXYPuIzpa7Jx9TG2zUZpEMF1yxvJztzXy2QrOSR cO/T48ias2aRCKvkRgiyxz6ObHeL1zZrbQ3TyzuDzOYapdG5XcKqplRUTZmxQBnOLra1Of kcDXJ3gug5GKxspyDuEpVphwjJfc1ZvB1KHzSpSsoQBKYbdlHrq2n5qWsBJ7w4GhfIOt2z zp8FQ1KOp0OpPb4B8PqLwpOnRJXUzMU6Z1DUhYGbEu49OlYDHlJ3tSQ+CS/DXEKeTq5Siq 4574ZgA/P7VQ/sa1i+qRyp9yJLuu6kiIpiOIHeE/OZym7cdM7JHIcsYe9m5WpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638238595; a=rsa-sha256; cv=none; b=flqcHiV4IJWQz0YtRjL91u7elXkpo/xZeOBRiQzxDvu1ZVFbQPAVLbAtToXRad4E/niNvV ilmpRKhqZPWY7FD2fW5Gn9TAeizvcZ1/OLlHohyP0NF/NnO5HAoDTZl4Xt9O7Pffpqx1Uq AjQWbmTwv+O9/EDicMNn/hMQcIEDws980SjjuBD08ysVinZW+bzFSasopVfuSNOLZzGnMA I/ynASfoldpMmq3nialPh0hVADKwBK8XtKYHvP2Py7lyQTA4NzMy+52G/w2zQDtuBkziA0 9T/Vo2OzOwaD6+wzELu0iQO+GMVm2YZkTTVTNvgalqnXzb3SeRlVeUjS3VY9JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=adbaf1b443c68c70911aeb62c9963dd583ec9b45 commit adbaf1b443c68c70911aeb62c9963dd583ec9b45 Author: Konstantin Belousov AuthorDate: 2021-11-27 22:36:19 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-30 01:43:54 +0000 posix_spawn.c: format fae_action anon enum more stylish Reviewed by: kevans, ngie (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33143 --- lib/libc/gen/posix_spawn.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index 0bca52811e30..e70772e31753 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -62,7 +62,11 @@ struct __posix_spawn_file_actions { typedef struct __posix_spawn_file_actions_entry { STAILQ_ENTRY(__posix_spawn_file_actions_entry) fae_list; - enum { FAE_OPEN, FAE_DUP2, FAE_CLOSE } fae_action; + enum { + FAE_OPEN, + FAE_DUP2, + FAE_CLOSE, + } fae_action; int fae_fildes; union { From nobody Tue Nov 30 02:16:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B243C18B1AC3; Tue, 30 Nov 2021 02:16: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 4J35SN1NcWz4Vgh; Tue, 30 Nov 2021 02:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0868B5DCC; Tue, 30 Nov 2021 02:16: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 1AU2GZGO008129; Tue, 30 Nov 2021 02:16:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU2GZPN008128; Tue, 30 Nov 2021 02:16:35 GMT (envelope-from git) Date: Tue, 30 Nov 2021 02:16:35 GMT Message-Id: <202111300216.1AU2GZPN008128@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: b239cc204a57 - main - posix_spawn: style, use return () List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b239cc204a57de4fea7c9477169591ed2df36fc8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638238596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NKgQguTCky5QY2EoL4vYrPvLR9Y5MvG1nPu8f1D6iSQ=; b=kk/pUOWxLEISkVFtisPZI30fU0yAsxxIyuDFQV5CIwm/jXx2WVKiiBFBdK6uiUAaJsxtOw 9OTbuuh1Sq4BEe00QPXXRUPIqiRCsjQ3hd8mDRopHcuBiOfmfJ6xCI9X0OPVrTOEzzhHkU lBBGOdhTYi6Nko6esCZkHHGYnMk0u7PjtWAQEADfeq7OaQJjSuu5NukNn55QXpYj5KYazs yCw8XHc4wKh3HogqITosDZTH6P1iNWdUnZjkHcDkOm+tWDy9zR38zNTRHKsym8U35t8d/W biOFkKSD1vxhl2X5nWyGyHIDwTD4Ds74dG9sJWsdreVUSk8EZH5GwnFDJZ1ESA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638238596; a=rsa-sha256; cv=none; b=qdI5lsGJRBOPtl7LbxnYdqjUW1q0vkwp6ltoq0/gSBYAmlk1+jYxK4ze5EAR3b4fj7Hox5 4RaX1bsP0IGu/ZyNY6/OM6Rp/XXPLUOTDrJhClf9+auaez6jFdTqe10sXG74X3E7u6cZwa LZONOU7/hLpbrQ35w+b+WLr6xaq342gQF1lOnUZ4MvQQf8Tsv5pSUqW2c0ULJv2VGr4DBZ txpJuhf7GWuuSO9jW1GfbpeeHX0+pflyKu6M/+85SbDVCowr7kH0se0xMQKZy5NkEJjo1s vBm96BmawwvgIIT7u41gyUZNv37k1/nE7uNCQ0SNeQwS693D3963pyNi6uFdjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b239cc204a57de4fea7c9477169591ed2df36fc8 commit b239cc204a57de4fea7c9477169591ed2df36fc8 Author: Konstantin Belousov AuthorDate: 2021-11-27 22:45:12 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-30 01:43:54 +0000 posix_spawn: style, use return () Reviewed by: kevans, ngie (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33143 --- lib/libc/gen/posix_spawn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index e70772e31753..03283cfcfb04 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -353,7 +353,7 @@ posix_spawn(pid_t *pid, const char *path, const posix_spawnattr_t *sa, char * const argv[], char * const envp[]) { - return do_posix_spawn(pid, path, fa, sa, argv, envp, 0); + return (do_posix_spawn(pid, path, fa, sa, argv, envp, 0)); } int @@ -362,7 +362,7 @@ posix_spawnp(pid_t *pid, const char *path, const posix_spawnattr_t *sa, char * const argv[], char * const envp[]) { - return do_posix_spawn(pid, path, fa, sa, argv, envp, 1); + return (do_posix_spawn(pid, path, fa, sa, argv, envp, 1)); } /* From nobody Tue Nov 30 02:16:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B2EC518B17F7; Tue, 30 Nov 2021 02:16: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 4J35SP2l7pz4Vjd; Tue, 30 Nov 2021 02:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32C215CEE; Tue, 30 Nov 2021 02:16: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 1AU2GbkW008158; Tue, 30 Nov 2021 02:16:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU2GbUa008157; Tue, 30 Nov 2021 02:16:37 GMT (envelope-from git) Date: Tue, 30 Nov 2021 02:16:37 GMT Message-Id: <202111300216.1AU2GbUa008157@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: 8ed1e4a5c1a9 - main - posix_spawn(3), posix_spawn_file_actions_addopen(3): use .Fo/.Fc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8ed1e4a5c1a9d0550f1a81e80e22c4012dadec64 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638238597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DtqdBKJhhXatzc1eKxHt/RusW2UNa3zQ1joXU0l625E=; b=qnAd7h5BX57FVl3cnSCPb8ZSvvhFUFnrxPg5Z9/7XKvzoewIuzOeq6iTcco4iHycxJou6V nGPRUnP5wnK2xCQYddh4f7/m0E2+0ODGFaybWVd2YRaOGI8RoE2Jk4PSbd4wXFBYUaIrFq bU/Yz7Gm4VoSzTVjbmI+aD55GFE9DHy+w8GLHKg3N3Ju4V2MHw6vK9NyWUysmazSLvfV9p G0e10IlHrcEcO5wFZIq5LediDncmPtMD2HJVT3CNimE6azSRBG5MB8A98TAQfRvxPV9hAC hQc1iWuvyMrdbC9J7nDcomULtjuqu2TwiwsjZnsqKvPkuaoz80bXYFsAwOW2pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638238597; a=rsa-sha256; cv=none; b=bFNr4RChCOuA92VYVR+Wu6PAiewEFNlfIotg5ErRGVKFhmF7BcvdDanGSpAY/ZEvfOBIxc VqpsBGTv5FD8VlzaTFvepqvqwakgtv20O57K2Ud/apCESh9P0Wbl+sLg+OP7N3FbmZ7wiy geXrKkszB02wkTUo5v7IqZbI9xUI+oqol4MMdG0f7HlZq3/4H0eT4EY6dLb9q33X423lWg yBfdnFmzLYDExHx1S0XxCcIbdSCYmXZs3noHR+4bt07ciUL9/2sQ98EMy0i+OzsjQUb4LL R9HXaX8GicpaJ57eTXuAHvNO3EAtHzV8pKlDKKeRfY4YJPRgOGePBdp7uvqgzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8ed1e4a5c1a9d0550f1a81e80e22c4012dadec64 commit 8ed1e4a5c1a9d0550f1a81e80e22c4012dadec64 Author: Konstantin Belousov AuthorDate: 2021-11-28 00:16:26 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-30 01:43:54 +0000 posix_spawn(3), posix_spawn_file_actions_addopen(3): use .Fo/.Fc to wrap too long lines with function prototypes. Reviewed by: kevans, ngie (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33143 --- lib/libc/gen/posix_spawn.3 | 18 ++++++++++++++++-- lib/libc/gen/posix_spawn_file_actions_addopen.3 | 19 ++++++++++++++++--- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3 index 596dac318673..12df7dc41875 100644 --- a/lib/libc/gen/posix_spawn.3 +++ b/lib/libc/gen/posix_spawn.3 @@ -46,9 +46,23 @@ .Sh SYNOPSIS .In spawn.h .Ft int -.Fn posix_spawn "pid_t *restrict pid" "const char *restrict path" "const posix_spawn_file_actions_t *file_actions" "const posix_spawnattr_t *restrict attrp" "char *const argv[restrict]" "char *const envp[restrict]" +.Fo posix_spawn +.Fa "pid_t *restrict pid" +.Fa "const char *restrict path" +.Fa "const posix_spawn_file_actions_t *file_actions" +.Fa "const posix_spawnattr_t *restrict attrp" +.Fa "char *const argv[restrict]" +.Fa "char *const envp[restrict]" +.Fc .Ft int -.Fn posix_spawnp "pid_t *restrict pid" "const char *restrict file" "const posix_spawn_file_actions_t *file_actions" "const posix_spawnattr_t *restrict attrp" "char *const argv[restrict]" "char *const envp[restrict]" +.Fo posix_spawnp +.Fa "pid_t *restrict pid" +.Fa "const char *restrict file" +.Fa "const posix_spawn_file_actions_t *file_actions" +.Fa "const posix_spawnattr_t *restrict attrp" +.Fa "char *const argv[restrict]" +.Fa "char *const envp[restrict]" +.Fc .Sh DESCRIPTION The .Fn posix_spawn diff --git a/lib/libc/gen/posix_spawn_file_actions_addopen.3 b/lib/libc/gen/posix_spawn_file_actions_addopen.3 index 0b57999bf4be..5cecb49a614d 100644 --- a/lib/libc/gen/posix_spawn_file_actions_addopen.3 +++ b/lib/libc/gen/posix_spawn_file_actions_addopen.3 @@ -47,11 +47,24 @@ .Sh SYNOPSIS .In spawn.h .Ft int -.Fn posix_spawn_file_actions_addopen "posix_spawn_file_actions_t * file_actions" "int fildes" "const char *restrict path" "int oflag" "mode_t mode" +.Fo posix_spawn_file_actions_addopen +.Fa "posix_spawn_file_actions_t * file_actions" +.Fa "int fildes" +.Fa "const char *restrict path" +.Fa "int oflag" +.Fa "mode_t mode" +.Fc .Ft int -.Fn posix_spawn_file_actions_adddup2 "posix_spawn_file_actions_t * file_actions" "int fildes" "int newfildes" +.Fo posix_spawn_file_actions_adddup2 +.Fa "posix_spawn_file_actions_t * file_actions" +.Fa "int fildes" +.Fa "int newfildes" +.Fc .Ft int -.Fn posix_spawn_file_actions_addclose "posix_spawn_file_actions_t * file_actions" "int fildes" +.Fo posix_spawn_file_actions_addclose +.Fa "posix_spawn_file_actions_t * file_actions" +.Fa "int fildes" +.Fc .Sh DESCRIPTION These functions add an open, dup2 or close action to a spawn file actions object. From nobody Tue Nov 30 02:16:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 79BBA18B19D6; Tue, 30 Nov 2021 02:16: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 4J35SQ4GGbz4Vd3; Tue, 30 Nov 2021 02:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 463A559FD; Tue, 30 Nov 2021 02:16: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 1AU2Gctf008184; Tue, 30 Nov 2021 02:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU2Gcwe008183; Tue, 30 Nov 2021 02:16:38 GMT (envelope-from git) Date: Tue, 30 Nov 2021 02:16:38 GMT Message-Id: <202111300216.1AU2Gcwe008183@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: 25cda42a4981 - main - posix_spawn: add chdir-related non-portable actions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 25cda42a498101612687b32005856cd8b14f2f7a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638238598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aAyGFv8xddZxCxPpXoYP6Xy5FWe8ZA4TlSkXQ1aj6SU=; b=Qq6nWJ0ea2e0rBTo4+K24/FQJnI8HFnpYIBZN4/O22ToFq/KyvRUbVjmTmCi602giCq/ce AgwTCc2HE4oVzL+IltXl+2B6fCWReNjut3uk/4JIJBo45wd03HAO/UGlmiP2rB30ERYBKp HSn3tS/BW/9U3utnMGG0kbLLSqMySTtZV8I6kftmrRXJPHZ+ZEQXPwrkFWvYPZLUtJs3DB cNdUMT0G3qm1Ax6WaKSsPZai+fO85dR34Kb9iclQhxbr/KhK0TorSGFW6wcTZGfOewcKyA E/rMNg/ZnG9pPpbeTtBned82vbN/1XLgkNBDyYkUHqzdxWUWs8nR59ap2/jC8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638238598; a=rsa-sha256; cv=none; b=B2h6U9BxqI0Q9asRWzgiQJSgKK1KWa+FqJkbNd56StHH4cho2fn3YqEGJbp+Q75QGMNTTz /3XXvfZEiUaQSF/71NB24FkD79Ax5cXe1wJq8hwSNB6pl0gYaJmiEqmKYUKSQudxHlGETi owv/To486EP4nG0WtllWyLX+X80tqvTePtWLo/qUluI5DjKWGXWVe7MfnsQtF1ZTuBr512 75VH5MBndrzMBxuIUQCxdqo2iEV3RLXddEPN6w6mtZ1wXOecTCIZgmob425hXb0Zzzeih5 gJI1/PHtJgKH9eaMaOhRwP5/WfQzJcY+gXReQ3rBpa+xXAT/emgd9iGLEZoL1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=25cda42a498101612687b32005856cd8b14f2f7a commit 25cda42a498101612687b32005856cd8b14f2f7a Author: Konstantin Belousov AuthorDate: 2021-11-27 22:49:03 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-30 01:43:54 +0000 posix_spawn: add chdir-related non-portable actions Namely posix_spawn_file_actions_addchdir_np and posix_spawn_file_actions_addfchdir_np. Reviewed by: kevans, ngie (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33143 --- include/spawn.h | 7 ++++++ lib/libc/gen/Symbol.map | 2 ++ lib/libc/gen/posix_spawn.c | 57 +++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 65 insertions(+), 1 deletion(-) diff --git a/include/spawn.h b/include/spawn.h index 79753bba0510..4ba3998a3e90 100644 --- a/include/spawn.h +++ b/include/spawn.h @@ -87,6 +87,13 @@ int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t * __restrict, int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, int); int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int); +#if __BSD_VISIBLE +int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t * + __restrict, const char * __restrict); +int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *, + int); +#endif + /* * Spawn attributes */ diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index b6c3c252be7c..bae2463d99d4 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -436,6 +436,8 @@ FBSD_1.6 { }; FBSD_1.7 { + posix_spawn_file_actions_addchdir_np; + posix_spawn_file_actions_addfchdir_np; sched_getaffinity; sched_setaffinity; sched_getcpu; diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index 03283cfcfb04..00d1724a6515 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -66,6 +66,8 @@ typedef struct __posix_spawn_file_actions_entry { FAE_OPEN, FAE_DUP2, FAE_CLOSE, + FAE_CHDIR, + FAE_FCHDIR, } fae_action; int fae_fildes; @@ -180,6 +182,14 @@ process_file_actions_entry(posix_spawn_file_actions_entry_t *fae) /* Perform a close(), do not fail if already closed */ (void)_close(fae->fae_fildes); break; + case FAE_CHDIR: + if (chdir(fae->fae_path) != 0) + return (errno); + break; + case FAE_FCHDIR: + if (fchdir(fae->fae_fildes) != 0) + return (errno); + break; } return (0); } @@ -393,7 +403,8 @@ posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *fa) STAILQ_REMOVE_HEAD(&(*fa)->fa_list, fae_list); /* Deallocate file action entry */ - if (fae->fae_action == FAE_OPEN) + if (fae->fae_action == FAE_OPEN || + fae->fae_action == FAE_CHDIR) free(fae->fae_path); free(fae); } @@ -478,6 +489,50 @@ posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *fa, return (0); } +int +posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t * + __restrict fa, const char *__restrict path) +{ + posix_spawn_file_actions_entry_t *fae; + int error; + + fae = malloc(sizeof(posix_spawn_file_actions_entry_t)); + if (fae == NULL) + return (errno); + + fae->fae_action = FAE_CHDIR; + fae->fae_path = strdup(path); + if (fae->fae_path == NULL) { + error = errno; + free(fae); + return (error); + } + + STAILQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list); + return (0); +} + +int +posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *__restrict fa, + int fildes) +{ + posix_spawn_file_actions_entry_t *fae; + + if (fildes < 0) + return (EBADF); + + /* Allocate object */ + fae = malloc(sizeof(posix_spawn_file_actions_entry_t)); + if (fae == NULL) + return (errno); + + fae->fae_action = FAE_FCHDIR; + fae->fae_fildes = fildes; + + STAILQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list); + return (0); +} + /* * Spawn attributes */ From nobody Tue Nov 30 02:16:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1DFEB18B1B40; Tue, 30 Nov 2021 02:16: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 4J35SS0rnNz4Vjv; Tue, 30 Nov 2021 02:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CD835DCD; Tue, 30 Nov 2021 02:16: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 1AU2Gd2S008208; Tue, 30 Nov 2021 02:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU2GdGw008207; Tue, 30 Nov 2021 02:16:39 GMT (envelope-from git) Date: Tue, 30 Nov 2021 02:16:39 GMT Message-Id: <202111300216.1AU2GdGw008207@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: bd44dce5b317 - main - Document posix_spawn_file_actions_addchdir_np(3) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd44dce5b3176c19a9435a5e7e125fc06182fbc9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638238600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R9lrSUiCd77rU9Aleh8v6eL6tAph+FmXFg1wmV8vZNA=; b=dccxLedwQOjX6zNrTAH78W0I2zBcjfRnxjB0VM0X5EhVh0NgcNhzdrixEWnTkFStSv0rcW 9xKmCzN5JMFLaXrvNXhvwZM+lxAtx6YSNNrMZhgxZ8GoqCid0obZbP/mceFMUemV5fEp5J af+A41vdNqAJSwEQf1ByLSmbGhChZhgctcIzTbGQDF2ieVNf7qdG+Xl8faNX2F6uq2Hnb1 FnAm0Jqywmdorq8ekJV3NqYP98X298QJS3ubXy7Z2P+Jcw0nic4VxW5pkECgMs0pb3edok zJ2VXzGJYQIJbPZ3m78sPlSPuO2uaxIfVDEOIsDl3LzHevintiK8BnVOe6nEqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638238600; a=rsa-sha256; cv=none; b=XmMn8jVrxAcuenZXJDnSGfYe0NzgQIWfirAvuuYjanjlxNrsvLhb8fk8PoKt31r2EVn3B2 JktaXgvsTTwUAVtByOAtXWmojiQ6d0nTFl+lOBxX27HYeAeug9uIUHXDjvu1bxCa+Q08nX Ldk/hrhiemdS+nBl0T05s/7dcBeBwMlqJpiX9bXj2D7VMBtQjrQuTlSEPdVW1mi/l9IOBs S/svXetzKLyHABIMMy66+mrdAigHzKZ11N+lYRbvPKZ2Ojc/5iU9HnW3IK7TsV26c3tv2e gsnc9lJL93j4VoPRvZOg5y05jWhzugkgD8paaqLYoopxoAqMZdRbladl3XDCDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bd44dce5b3176c19a9435a5e7e125fc06182fbc9 commit bd44dce5b3176c19a9435a5e7e125fc06182fbc9 Author: Konstantin Belousov AuthorDate: 2021-11-28 00:11:21 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-30 01:43:54 +0000 Document posix_spawn_file_actions_addchdir_np(3) Reviewed by: kevans, ngie (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33143 --- lib/libc/gen/Makefile.inc | 2 + lib/libc/gen/posix_spawn.3 | 4 +- lib/libc/gen/posix_spawn_file_actions_addopen.3 | 49 ++++++++++++++++++++++++- lib/libc/gen/posix_spawn_file_actions_init.3 | 2 +- 4 files changed, 53 insertions(+), 4 deletions(-) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 75bc30d70976..0b53a275e861 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -464,6 +464,8 @@ MLINKS+=popen.3 pclose.3 MLINKS+=posix_spawn.3 posix_spawnp.3 \ posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclose.3 \ posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_adddup2.3 \ + posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addchdir_np.3 \ + posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addfchdir_np.3 \ posix_spawn_file_actions_init.3 posix_spawn_file_actions_destroy.3 \ posix_spawnattr_getflags.3 posix_spawnattr_setflags.3 \ posix_spawnattr_getpgroup.3 posix_spawnattr_setpgroup.3 \ diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3 index 12df7dc41875..848733a41a7d 100644 --- a/lib/libc/gen/posix_spawn.3 +++ b/lib/libc/gen/posix_spawn.3 @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 5, 2016 +.Dd November 28, 2021 .Dt POSIX_SPAWN 3 .Os .Sh NAME @@ -436,6 +436,8 @@ including trying to close a descriptor that is not open. .Xr posix_spawn_file_actions_addclose 3 , .Xr posix_spawn_file_actions_adddup2 3 , .Xr posix_spawn_file_actions_addopen 3 , +.Xr posix_spawn_file_actions_addchdir_np 3 , +.Xr posix_spawn_file_actions_addfchdir_np 3 , .Xr posix_spawn_file_actions_destroy 3 , .Xr posix_spawn_file_actions_init 3 , .Xr posix_spawnattr_destroy 3 , diff --git a/lib/libc/gen/posix_spawn_file_actions_addopen.3 b/lib/libc/gen/posix_spawn_file_actions_addopen.3 index 5cecb49a614d..b364e92c18f8 100644 --- a/lib/libc/gen/posix_spawn_file_actions_addopen.3 +++ b/lib/libc/gen/posix_spawn_file_actions_addopen.3 @@ -40,8 +40,10 @@ .Sh NAME .Nm posix_spawn_file_actions_addopen , .Nm posix_spawn_file_actions_adddup2 , -.Nm posix_spawn_file_actions_addclose -.Nd "add open, dup2 or close action to spawn file actions object" +.Nm posix_spawn_file_actions_addclose , +.Nm posix_spawn_file_actions_addchdir_np , +.Nm posix_spawn_file_actions_addfchdir_np +.Nd "add open, dup2, close, or chdir/fchdir actions to spawn file actions object" .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -65,6 +67,16 @@ .Fa "posix_spawn_file_actions_t * file_actions" .Fa "int fildes" .Fc +.Ft int +.Fo posix_spawn_file_actions_addchdir_np +.Fa "posix_spawn_file_actions_t *restrict file_actions" +.Fa "const char *restrict path" +.Fc +.Ft int +.Fo posix_spawn_file_actions_addfchdir_np +.Fa "posix_spawn_file_actions_t * file_actions" +.Fa "int fildes" +.Fc .Sh DESCRIPTION These functions add an open, dup2 or close action to a spawn file actions object. @@ -163,6 +175,26 @@ close(fildes) .Pp had been called) when a new process is spawned using this file actions object. +.Pp +The +.Fn posix_spawn_file_actions_addchdir_np +and +.Fn posix_spawn_file_actions_addfchdir_np +functions add a change current directory action to the object +referenced by +.Fa file_actions +that affects actions (opens with relative path) performed after the operation, +in the order of insertion into the +.Fa file_actions +object. +It also sets the working directory for the spawned program. +The +.Fn posix_spawn_file_actions_addchdir_np +function takes the +.Fa path +to set as the working directory, while +.Fn posix_spawn_file_actions_addfchdir_np +takes the directory file descriptor. .Sh RETURN VALUES Upon successful completion, these functions return zero; otherwise, an error number is returned to indicate the error. @@ -204,6 +236,13 @@ is equal to (clearing .Dv FD_CLOEXEC ) . A future update of the Standard is expected to require this behavior. +.Pp +The +.Fn posix_spawn_file_actions_addchdir_np +and +.Fn posix_spawn_file_actions_addfchdir_np +functions are non-standard functions implemented after the similar +functionality provided by glibc. .Sh HISTORY The .Fn posix_spawn_file_actions_addopen , @@ -212,5 +251,11 @@ and .Fn posix_spawn_file_actions_addclose functions first appeared in .Fx 8.0 . +The +.Fn posix_spawn_file_actions_addchdir_np +and +.Fn posix_spawn_file_actions_addfchdir_np +functions first appeared in +.Fx 14.0 . .Sh AUTHORS .An \&Ed Schouten Aq Mt ed@FreeBSD.org diff --git a/lib/libc/gen/posix_spawn_file_actions_init.3 b/lib/libc/gen/posix_spawn_file_actions_init.3 index 380eed769003..31b62beed570 100644 --- a/lib/libc/gen/posix_spawn_file_actions_init.3 +++ b/lib/libc/gen/posix_spawn_file_actions_init.3 @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 24, 2008 +.Dd November 28, 2021 .Dt POSIX_SPAWN_FILE_ACTIONS_INIT 3 .Os .Sh NAME From nobody Tue Nov 30 02:16:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2091418B1BD2; Tue, 30 Nov 2021 02:16: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 4J35ST0vSpz4Vk1; Tue, 30 Nov 2021 02:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C0A65D23; Tue, 30 Nov 2021 02:16: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 1AU2Gekb008232; Tue, 30 Nov 2021 02:16:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU2GeeS008231; Tue, 30 Nov 2021 02:16:40 GMT (envelope-from git) Date: Tue, 30 Nov 2021 02:16:40 GMT Message-Id: <202111300216.1AU2GeeS008231@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: a18ddf775744 - main - posix_spawn: add closefrom non-portable action List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a18ddf775744f31a844fd01fbe90207f7c5e706d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638238601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fFIqukKd2mQP6HANVWEZpuB2QDA+TE9Pd7gHbJ+50Ow=; b=ZlqRN3o1AlW2G7GpHHpja0KXeGGhwpdD5pICk+W4xbFCtPN5F/jsERhn22KrsZ+UfDm8zx Km2wTqqLN6eV1rQzAsyIK9l8vf9Mai8DPIbUjexyVPdBkTCxpzgFUu+fjAYrbqCnYDKfrL HCXdBipBbwww27x89MH/Q6QalWDqCeXQfIQLAwo+wydgGZb4TrRk39S4lJRsDAJVMsZ7Tp e7EKWO1lWCcHdDQOgel7h10m8/oDbWEweb/LsGysvJTRu2QDMe4co0qMdeScVzb2N35bm5 sryOKfLdHuJ1U8ENXyc0o/DnjbRuHJGQ40Xdt+0ERB7RDV/TO+iyTx64tRA3tA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638238601; a=rsa-sha256; cv=none; b=iQ4pLE9ZVzhdQhE1jIGG88IGmLECDwg6PN4QKOSEa7YxMVAieC7HNaAt7ow3k+DOyZ6X4h Nzzfl4RAfzcni/PYk11FihXVfVV4zcyWVC8thDwRo7z/4PAKTR2Thie9xblvUI5Oqarj7F 1WeDAI7U5aLOlHLCBAAwis64mEuDrnU/4BRJ2wrS683lsxfcQW5MJgaKInRUv6ojI+cLHb rbFyzuZY6RhtE+q+sh/LcU8EH5n02TLnXvbN0uOGugK+PQITarH2eEMdV3THMi3MiDpJeR XZpE5U0FZDpUnKNI32qiarihl9KAIEzsONNM/HaL+Qw3iyZYojVXMYx0uJ2rxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a18ddf775744f31a844fd01fbe90207f7c5e706d commit a18ddf775744f31a844fd01fbe90207f7c5e706d Author: Konstantin Belousov AuthorDate: 2021-11-27 22:54:16 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-30 01:43:54 +0000 posix_spawn: add closefrom non-portable action Namely posix_spawn_file_actions_addclosefrom_np, in the form it is provided by glibc. Reviewed by: kevans, ngie (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33143 --- include/spawn.h | 2 ++ lib/libc/gen/Symbol.map | 1 + lib/libc/gen/posix_spawn.c | 25 +++++++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/include/spawn.h b/include/spawn.h index 4ba3998a3e90..53373a6c8db8 100644 --- a/include/spawn.h +++ b/include/spawn.h @@ -92,6 +92,8 @@ int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t * __restrict, const char * __restrict); int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *, int); +int posix_spawn_file_actions_addclosefrom_np(posix_spawn_file_actions_t *, + int); #endif /* diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index bae2463d99d4..5554c32ab4f2 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -437,6 +437,7 @@ FBSD_1.6 { FBSD_1.7 { posix_spawn_file_actions_addchdir_np; + posix_spawn_file_actions_addclosefrom_np; posix_spawn_file_actions_addfchdir_np; sched_getaffinity; sched_setaffinity; diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index 00d1724a6515..909db9a60a02 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -68,6 +68,7 @@ typedef struct __posix_spawn_file_actions_entry { FAE_CLOSE, FAE_CHDIR, FAE_FCHDIR, + FAE_CLOSEFROM, } fae_action; int fae_fildes; @@ -190,6 +191,9 @@ process_file_actions_entry(posix_spawn_file_actions_entry_t *fae) if (fchdir(fae->fae_fildes) != 0) return (errno); break; + case FAE_CLOSEFROM: + closefrom(fae->fae_fildes); + break; } return (0); } @@ -533,6 +537,27 @@ posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *__restrict fa, return (0); } +int +posix_spawn_file_actions_addclosefrom_np (posix_spawn_file_actions_t * + __restrict fa, int from) +{ + posix_spawn_file_actions_entry_t *fae; + + if (from < 0) + return (EBADF); + + /* Allocate object */ + fae = malloc(sizeof(posix_spawn_file_actions_entry_t)); + if (fae == NULL) + return (errno); + + fae->fae_action = FAE_CLOSEFROM; + fae->fae_fildes = from; + + STAILQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list); + return (0); +} + /* * Spawn attributes */ From nobody Tue Nov 30 02:16:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8207D18B19FF; Tue, 30 Nov 2021 02:16: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 4J35SV0DqYz4VpF; Tue, 30 Nov 2021 02:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5B055FFA; Tue, 30 Nov 2021 02:16: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 1AU2GfBx008256; Tue, 30 Nov 2021 02:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU2Gf9F008255; Tue, 30 Nov 2021 02:16:41 GMT (envelope-from git) Date: Tue, 30 Nov 2021 02:16:41 GMT Message-Id: <202111300216.1AU2Gf9F008255@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: 78963d796d5c - main - Document posix_spawn_file_actions_addclosefrom_np(3) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78963d796d5cd8b4f6f0e810eaae7a5f02706b02 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638238602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0lE8gsOKK7O4J9RkrQmxxkqAea7k2r0/jxOfbdN/VYo=; b=SeqhcEkhQyfQI0W0YQXx0X6Hsy64bqqXaaKk5QzymtuGiBmqTVIR6FusguXgHcOGiAY9Xn iuwLK8ZpsNwJJaibjfYfgP4PDu6naftTimlCnZoiC/ebTgIJHjOlCPrDiUwCH4UCpZX1EQ 1/y1jGtvE9GnDNkUnjByGO2FG+vVhB6OPlIuxEX7LYuF6V/mNO3qn6FCoBNklpcuv6zU3r Poqdjyv5BP1rWOGCCIKbzUq+yCj1l0Zm3/W7ifMHguMVPAGtjpIm2ehxCYB/7KU5daKCZo C0wAzf8+FRSTCt/sAeqZzN6D2ZAO/67HqT/uaivGz0M36pJ73lcLlAmNvhhccA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638238602; a=rsa-sha256; cv=none; b=jaPnU/XEV9QMNgVUPjtO/DHEGs72w8mpC2v0qibqXZnbG5XUhMzDiiRPc9WVIx6Y1cQ3Df 2+u/3vrGbhQK0NAXfnsCHgIM8pdzFcpGh+lDxhqb/K0MfzFjnZEqWUpCXHIlg9dctIDUa9 xzxzVAfPI9oQgVwZMB+9SFUCjMeuL8ijC6fz3xBJMSfA8MQbxM8TTZPwJdQOUs5qoSxS8Q XVaphdePy9h1xlyCSoPkwov5L1lwHyKftlHKm3scV1ZsHsHayoOQ/kZBC49jOHS8IFauL5 6Uw3e4ejoHg+eumiE+h14B6yVLeKn7WvCd3wljel2KyRtagPDjQLJtl+M61Q3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=78963d796d5cd8b4f6f0e810eaae7a5f02706b02 commit 78963d796d5cd8b4f6f0e810eaae7a5f02706b02 Author: Konstantin Belousov AuthorDate: 2021-11-28 00:23:55 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-30 01:43:54 +0000 Document posix_spawn_file_actions_addclosefrom_np(3) Reviewed by: kevans, ngie (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33143 --- lib/libc/gen/Makefile.inc | 1 + lib/libc/gen/posix_spawn.3 | 6 ++++++ lib/libc/gen/posix_spawn_file_actions_addopen.3 | 26 ++++++++++++++++++++----- lib/libc/gen/posix_spawn_file_actions_init.3 | 1 + 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 0b53a275e861..6a9e284b5860 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -463,6 +463,7 @@ MLINKS+=modf.3 modff.3 \ MLINKS+=popen.3 pclose.3 MLINKS+=posix_spawn.3 posix_spawnp.3 \ posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclose.3 \ + posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclosefrom_np.3 \ posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_adddup2.3 \ posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addchdir_np.3 \ posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addfchdir_np.3 \ diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3 index 848733a41a7d..f7d54903dcb6 100644 --- a/lib/libc/gen/posix_spawn.3 +++ b/lib/libc/gen/posix_spawn.3 @@ -422,6 +422,11 @@ in addition to those described by This implementation ignores any errors from .Fn close , including trying to close a descriptor that is not open. +The ignore extends to any errors from individual file descriptors +.Fn close +executed as part of the +.Fn closefrom +action. .El .Sh SEE ALSO .Xr close 2 , @@ -434,6 +439,7 @@ including trying to close a descriptor that is not open. .Xr setpgid 2 , .Xr vfork 2 , .Xr posix_spawn_file_actions_addclose 3 , +.Xr posix_spawn_file_actions_addclosefrom_np 3 , .Xr posix_spawn_file_actions_adddup2 3 , .Xr posix_spawn_file_actions_addopen 3 , .Xr posix_spawn_file_actions_addchdir_np 3 , diff --git a/lib/libc/gen/posix_spawn_file_actions_addopen.3 b/lib/libc/gen/posix_spawn_file_actions_addopen.3 index b364e92c18f8..0782e15b3126 100644 --- a/lib/libc/gen/posix_spawn_file_actions_addopen.3 +++ b/lib/libc/gen/posix_spawn_file_actions_addopen.3 @@ -41,9 +41,10 @@ .Nm posix_spawn_file_actions_addopen , .Nm posix_spawn_file_actions_adddup2 , .Nm posix_spawn_file_actions_addclose , +.Nm posix_spawn_file_actions_addclosefrom_np , .Nm posix_spawn_file_actions_addchdir_np , .Nm posix_spawn_file_actions_addfchdir_np -.Nd "add open, dup2, close, or chdir/fchdir actions to spawn file actions object" +.Nd "add open, dup2, close, closefrom, or chdir/fchdir actions to spawn file actions object" .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -68,6 +69,11 @@ .Fa "int fildes" .Fc .Ft int +.Fo posix_spawn_file_actions_addclosefrom_np +.Fa "posix_spawn_file_actions_t * file_actions" +.Fa "int from" +.Fc +.Ft int .Fo posix_spawn_file_actions_addchdir_np .Fa "posix_spawn_file_actions_t *restrict file_actions" .Fa "const char *restrict path" @@ -177,6 +183,14 @@ had been called) when a new process is spawned using this file actions object. .Pp The +.Fn posix_spawn_file_actions_addclosefrom_np +function adds a close action to close all file descriptors numerically +equal or greater then the argument +.Fa from . +For each open file descriptor, logically the close action is performed, +and any possible errors encountered are ignored. +.Pp +The .Fn posix_spawn_file_actions_addchdir_np and .Fn posix_spawn_file_actions_addfchdir_np @@ -238,9 +252,10 @@ is equal to A future update of the Standard is expected to require this behavior. .Pp The -.Fn posix_spawn_file_actions_addchdir_np +.Fn posix_spawn_file_actions_addchdir_np , +.Fn posix_spawn_file_actions_addfchdir_np , and -.Fn posix_spawn_file_actions_addfchdir_np +.Fn posix_spawn_file_actions_addclosefrom_np functions are non-standard functions implemented after the similar functionality provided by glibc. .Sh HISTORY @@ -252,9 +267,10 @@ and functions first appeared in .Fx 8.0 . The -.Fn posix_spawn_file_actions_addchdir_np +.Fn posix_spawn_file_actions_addchdir_np , +.Fn posix_spawn_file_actions_addfchdir_np , and -.Fn posix_spawn_file_actions_addfchdir_np +.Fn posix_spawn_file_actions_addclosefrom_np functions first appeared in .Fx 14.0 . .Sh AUTHORS diff --git a/lib/libc/gen/posix_spawn_file_actions_init.3 b/lib/libc/gen/posix_spawn_file_actions_init.3 index 31b62beed570..1215a04f6386 100644 --- a/lib/libc/gen/posix_spawn_file_actions_init.3 +++ b/lib/libc/gen/posix_spawn_file_actions_init.3 @@ -83,6 +83,7 @@ Insufficient memory exists to initialize the spawn file actions object. .Sh SEE ALSO .Xr posix_spawn 3 , .Xr posix_spawn_file_actions_addclose 3 , +.Xr posix_spawn_file_actions_addclosefrom_np 3 , .Xr posix_spawn_file_actions_adddup2 3 , .Xr posix_spawn_file_actions_addopen 3 , .Xr posix_spawnp 3 From nobody Tue Nov 30 02:16:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CFD8818B1C47; Tue, 30 Nov 2021 02: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 4J35SW0sM8z4VdP; Tue, 30 Nov 2021 02:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCC915BAA; Tue, 30 Nov 2021 02: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 1AU2GgDj008282; Tue, 30 Nov 2021 02: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 1AU2GgX8008281; Tue, 30 Nov 2021 02:16:42 GMT (envelope-from git) Date: Tue, 30 Nov 2021 02:16:42 GMT Message-Id: <202111300216.1AU2GgX8008281@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: f16ec9c6e36f - main - Add tests for posix_spawn_file_actions_add{chdir,fchdir}_np(3) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f16ec9c6e36f1d481468e7301d6f3b857db17561 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638238603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g6vJUcgVxptmfWD/BETzPso4pxCR++EDCdgDFTcL2wc=; b=VONZWdFziB3ehYIfSgCl8+WWD2Udah3dDSlzow3g2cluUzprOWccBO+N1QZyIoMy2SgmES xrz+zS9Dxpds8Yj79kbjsh0BxrWq3G+n8jxlNNJ2V7WFCah+VN8kot7dgQOC1T/j2JE1sI 7Ex960hd3bTsLXrVX6hselijgfOC+1OrnQCuB0fwGBiM0ARzznhTZA7jZglL8UhCkL80Av FXz4qgbN6Px18sfkauXMKkr1jOFKUE1n/8BEoILdNWhnuDRrkp7gzlQzhi2nYg9L9CMYoX 3lyPoYkY70pjl0zDwkmsm83Qqs+Elgp8neQQY/fOMZAn9pYVPqfrMrZ+rcsczg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638238603; a=rsa-sha256; cv=none; b=pm0tZgJLeZF4JrFez/4wKU4VjZFL28AciBR14HIwGSnSLHKnKfrDPQ9DYJvFA6yPeqN3j3 vmkmPWz/0FNVwAdx2W7bbJ5Swrx+pFKxU9ZuGQJcoW7L3TQnoAXnkCGh8L2PvvPnUdCfZb scShnQttlLc8zXFQzGjqvcoBDkDD9MzpcNdxtemQYEdJdKpw69mFRbjih3cxvegNqoK3cx 6ECkWvsIq0ePLuIETIZrkzYAwbJFkJsuBsk2YTGrB4kG/01JRtv/2PiZYPBya8Iu8lcBQG DBfNvW3DOAZbkQe/65o2WpKoV3GL9lBG03qkcBzyXKTAcA9R3DA73zbXy3Be6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f16ec9c6e36f1d481468e7301d6f3b857db17561 commit f16ec9c6e36f1d481468e7301d6f3b857db17561 Author: Konstantin Belousov AuthorDate: 2021-11-28 00:55:26 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-30 01:43:54 +0000 Add tests for posix_spawn_file_actions_add{chdir,fchdir}_np(3) Reviewed by: kevans, ngie (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33143 --- .../lib/libc/gen/posix_spawn/t_fileactions.c | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c index b3d364207fbb..ce2078eae98e 100644 --- a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c +++ b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c @@ -385,6 +385,79 @@ ATF_TC_BODY(t_spawn_empty_fileactions, tc) ATF_REQUIRE(insize == outsize); } +static const char bin_pwd[] = "/bin/pwd"; + +static void +t_spawn_chdir_impl(bool chdir) +{ + int status, err, tmpdir_fd; + pid_t pid; + char * const args[2] = { __UNCONST("pwd"), NULL }; + posix_spawn_file_actions_t fa; + FILE *f; + char read_pwd[128]; + size_t ss; + static const char tmp_path[] = "/tmp"; + + unlink(TESTFILE); + + posix_spawn_file_actions_init(&fa); + posix_spawn_file_actions_addopen(&fa, fileno(stdout), + TESTFILE, O_WRONLY | O_CREAT, 0600); + if (chdir) { + ATF_REQUIRE(posix_spawn_file_actions_addchdir_np(&fa, + tmp_path) == 0); + } else { + tmpdir_fd = open(tmp_path, O_DIRECTORY | O_RDONLY); + ATF_REQUIRE(tmpdir_fd > 0); + ATF_REQUIRE(posix_spawn_file_actions_addfchdir_np(&fa, + tmpdir_fd) == 0); + } + err = posix_spawn(&pid, bin_pwd, &fa, NULL, args, NULL); + posix_spawn_file_actions_destroy(&fa); + if (!chdir) + close(tmpdir_fd); + + ATF_REQUIRE(err == 0); + waitpid(pid, &status, 0); + ATF_REQUIRE(WIFEXITED(status) && WEXITSTATUS(status) == EXIT_SUCCESS); + + f = fopen(TESTFILE, "r"); + ATF_REQUIRE(f != NULL); + ss = fread(read_pwd, 1, sizeof(read_pwd), f); + fclose(f); + ATF_REQUIRE(ss == strlen(tmp_path) + 1); + ATF_REQUIRE(strncmp(read_pwd, tmp_path, strlen(tmp_path)) == 0); +} + +ATF_TC(t_spawn_chdir); + +ATF_TC_HEAD(t_spawn_chdir, tc) +{ + atf_tc_set_md_var(tc, "descr", + "posix_spawn changes directory for the spawned program"); + atf_tc_set_md_var(tc, "require.progs", bin_pwd); +} + +ATF_TC_BODY(t_spawn_chdir, tc) +{ + t_spawn_chdir_impl(true); +} + +ATF_TC(t_spawn_fchdir); + +ATF_TC_HEAD(t_spawn_fchdir, tc) +{ + atf_tc_set_md_var(tc, "descr", + "posix_spawn changes directory for the spawned program"); + atf_tc_set_md_var(tc, "require.progs", bin_pwd); +} + +ATF_TC_BODY(t_spawn_fchdir, tc) +{ + t_spawn_chdir_impl(false); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, t_spawn_fileactions); @@ -395,6 +468,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, t_spawn_reopen); ATF_TP_ADD_TC(tp, t_spawn_openmode); ATF_TP_ADD_TC(tp, t_spawn_empty_fileactions); + ATF_TP_ADD_TC(tp, t_spawn_chdir); + ATF_TP_ADD_TC(tp, t_spawn_fchdir); return atf_no_error(); } From nobody Tue Nov 30 05:42:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 27CF618B273C; Tue, 30 Nov 2021 05:42: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 4J3B1Z68Fcz4l1v; Tue, 30 Nov 2021 05:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2C9D10E0E; Tue, 30 Nov 2021 05: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 1AU5gAW8087302; Tue, 30 Nov 2021 05: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 1AU5gA1m087299; Tue, 30 Nov 2021 05:42:10 GMT (envelope-from git) Date: Tue, 30 Nov 2021 05:42:10 GMT Message-Id: <202111300542.1AU5gA1m087299@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 94e25b7acba7 - main - flex_spi: Support for FlexSPI Flash controller. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94e25b7acba7f929606a1a57f8d193995d8f8920 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638250930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lp622dT2F7CnsgoonsiCFScIz65MMHlyVyo/Kk5CVqs=; b=uwMruzKXsXgcWDS3+RYMiZPa9YvJ+aXSjQSps2xZQ2MJKySBahECDydo5EV4RDkLqnDZMI gL3ejvkKQhjaEfg+AL27Ccy4726Z5Epe9m0mb5r+EMquP/59xjeQzn01Npq3QwteXllMYc tCGSxVPupRUmOFe5WjN4gTm7PLvmsKalMkypboMOVfPhvtRoAIRVwC52tpE4PrRe6VGwdd 2DGMT8KpMGyaSSlioE1eKdi5krGKEI5kuvx5o1Y+P/wcH2O1PR8NbtsN9mCOyXZC8o7ANy Hntul5CCb/rkm5g8QR2nJB9Qbu1t3e+9hDCG221IQkXxkP+Oo0sEUne9X3/jLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638250930; a=rsa-sha256; cv=none; b=lIc3qBckc9Shu4YDxWZYY/iruYbXc2tileHiYHLa+o7NPI8Im4KcIqcmJp0hhy6UiskQXU rxgakDtBp4S1k9Iz79zDwYkujjViB/QRl0eX9ZPauR5u9E+DhEsRxdOmGJNj6fZ48Fr79f XbLqjUp03EecqlDpU5BKZe0Fdm+dS70HA+ziAClW6j/nE/NfYZxcBstTCoXqmY8glqngIe ziuUI9wcSEDzA/bEl8qFIJWKW6DABIdy1YPQOyDsgWEYhE1f0tjNTTqoIL/X1KrpE/51DB rPpawShr/8Q/R8WphQfhLR8DZbgNkgwBHBhqTn5H4J6ll46QMKGOarwEFDUP4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=94e25b7acba7f929606a1a57f8d193995d8f8920 commit 94e25b7acba7f929606a1a57f8d193995d8f8920 Author: Wojciech Macek AuthorDate: 2021-11-25 09:36:55 +0000 Commit: Wojciech Macek CommitDate: 2021-11-30 05:41:34 +0000 flex_spi: Support for FlexSPI Flash controller. NXP FlexSPI is a complex SPI controller which provides full offload for accessing NOR Flash. Create a Flash driver which attaches to existing FreeBSD infrastructure and exports generic READ and WRITE disk commands. The Flash has to be identified first to configure controller internals. For now, only one NOR Flash chip is supported. Future commits shall either increase number of known chips or implement SFDP mechanism which can be used by other Flash drivers. Sponsored by: Alstom Obtained from: Semihalf Differential revision: https://reviews.freebsd.org/D33117 --- sys/conf/files.arm64 | 1 + sys/dev/flash/flexspi/flex_spi.c | 991 +++++++++++++++++++++++++++++++++++++ sys/dev/flash/flexspi/flex_spi.h | 336 +++++++++++++ sys/modules/Makefile | 1 + sys/modules/flash/Makefile | 10 + sys/modules/flash/flexspi/Makefile | 15 + 6 files changed, 1354 insertions(+) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 722a33da812d..f941764ebd0f 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -529,6 +529,7 @@ arm64/qoriq/clk/lx2160a_clkgen.c optional clk SOC_NXP_LS arm64/qoriq/clk/qoriq_clk_pll.c optional clk SOC_NXP_LS arm64/qoriq/clk/qoriq_clkgen.c optional clk SOC_NXP_LS dev/ahci/ahci_fsl_fdt.c optional SOC_NXP_LS ahci fdt +dev/flash/flexspi/flex_spi.c optional clk flex_spi SOC_NXP_LS fdt # Qualcomm arm64/qualcomm/qcom_gcc.c optional qcom_gcc fdt diff --git a/sys/dev/flash/flexspi/flex_spi.c b/sys/dev/flash/flexspi/flex_spi.c new file mode 100644 index 000000000000..fc85919fc2f8 --- /dev/null +++ b/sys/dev/flash/flexspi/flex_spi.c @@ -0,0 +1,991 @@ +/*- + * Copyright (c) 2021 Alstom Group. + * Copyright (c) 2021 Semihalf. + * + * 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 ``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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +#include + +#include "flex_spi.h" + +static MALLOC_DEFINE(SECTOR_BUFFER, "flex_spi", "FSL QSPI sector buffer memory"); + +#define AHB_LUT_ID 31 +#define MHZ(x) ((x)*1000*1000) +#define SPI_DEFAULT_CLK_RATE (MHZ(10)) + +static int driver_flags = 0; +SYSCTL_NODE(_hw, OID_AUTO, flex_spi, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "FlexSPI driver parameters"); +SYSCTL_INT(_hw_flex_spi, OID_AUTO, driver_flags, CTLFLAG_RDTUN, &driver_flags, 0, + "Configuration flags and quirks"); + +static struct ofw_compat_data flex_spi_compat_data[] = { + {"nxp,lx2160a-fspi", true}, + {NULL, false} +}; + +struct flex_spi_flash_info { + char* name; + uint32_t jedecid; + uint32_t sectorsize; + uint32_t sectorcount; + uint32_t erasesize; + uint32_t maxclk; +}; + +/* Add information about supported Flashes. TODO: use SFDP instead */ +static struct flex_spi_flash_info flex_spi_flash_info[] = { + {"W25Q128JW", 0x001860ef, 64*1024, 256, 4096, MHZ(100)}, + {NULL, 0, 0, 0, 0, 0} +}; + +struct flex_spi_softc +{ + device_t dev; + unsigned int flags; + + struct bio_queue_head bio_queue; + struct mtx disk_mtx; + struct disk *disk; + struct proc *p; + unsigned int taskstate; + uint8_t *buf; + + struct resource *ahb_mem_res; + struct resource *mem_res; + + clk_t fspi_clk_en; + clk_t fspi_clk; + uint64_t fspi_clk_en_hz; + uint64_t fspi_clk_hz; + + /* TODO: support more than one Flash per bus */ + uint64_t fspi_max_clk; + uint32_t quirks; + + /* Flash parameters */ + uint32_t sectorsize; + uint32_t sectorcount; + uint32_t erasesize; +}; + +static int flex_spi_read(struct flex_spi_softc *sc, off_t offset, caddr_t data, + size_t count); +static int flex_spi_write(struct flex_spi_softc *sc, off_t offset, + uint8_t *data, size_t size); + +static int flex_spi_attach(device_t dev); +static int flex_spi_probe(device_t dev); +static int flex_spi_detach(device_t dev); + +/* disk routines */ +static int flex_spi_open(struct disk *dp); +static int flex_spi_close(struct disk *dp); +static int flex_spi_ioctl(struct disk *, u_long, void *, int, struct thread *); +static void flex_spi_strategy(struct bio *bp); +static int flex_spi_getattr(struct bio *bp); +static void flex_spi_task(void *arg); + +static uint32_t +read_reg(struct flex_spi_softc *sc, uint32_t offset) +{ + + return ((bus_read_4(sc->mem_res, offset))); +} + +static void +write_reg(struct flex_spi_softc *sc, uint32_t offset, uint32_t value) +{ + + bus_write_4(sc->mem_res, offset, (value)); +} + +static int +reg_read_poll_tout(struct flex_spi_softc *sc, uint32_t offset, uint32_t mask, + uint32_t delay_us, uint32_t iterations, bool positive) +{ + uint32_t reg; + uint32_t condition = 0; + + do { + reg = read_reg(sc, offset); + if (positive) + condition = ((reg & mask) == 0); + else + condition = ((reg & mask) != 0); + + if (condition == 0) + break; + + DELAY(delay_us); + } while (condition && (--iterations > 0)); + + return (condition != 0); +} + +static int +flex_spi_clk_setup(struct flex_spi_softc *sc, uint32_t rate) +{ + int ret = 0; + + /* disable to avoid glitching */ + ret |= clk_disable(sc->fspi_clk_en); + ret |= clk_disable(sc->fspi_clk); + + ret |= clk_set_freq(sc->fspi_clk, rate, 0); + sc->fspi_clk_hz = rate; + + /* enable clocks back */ + ret |= clk_enable(sc->fspi_clk_en); + ret |= clk_enable(sc->fspi_clk); + + if (ret) + return (EINVAL); + + return (0); +} + +static void +flex_spi_prepare_lut(struct flex_spi_softc *sc, uint8_t op) +{ + uint32_t lut_id; + uint32_t lut; + + /* unlock LUT */ + write_reg(sc, FSPI_LUTKEY, FSPI_LUTKEY_VALUE); + write_reg(sc, FSPI_LCKCR, FSPI_LCKER_UNLOCK); + + /* Read JEDEC ID */ + lut_id = 0; + + switch (op) { + case LUT_FLASH_CMD_JEDECID: + lut = LUT_DEF(0, LUT_CMD, LUT_PAD(1), FSPI_CMD_READ_IDENT); + lut |= LUT_DEF(1, LUT_NXP_READ, LUT_PAD(1), 0); + write_reg(sc, FSPI_LUT_REG(lut_id), lut); + write_reg(sc, FSPI_LUT_REG(lut_id) + 4, 0); + break; + case LUT_FLASH_CMD_READ: + lut = LUT_DEF(0, LUT_CMD, LUT_PAD(1), FSPI_CMD_FAST_READ); + lut |= LUT_DEF(1, LUT_ADDR, LUT_PAD(1), 3*8); + write_reg(sc, FSPI_LUT_REG(lut_id), lut); + lut = LUT_DEF(0, LUT_DUMMY, LUT_PAD(1), 1*8); + lut |= LUT_DEF(1, LUT_NXP_READ, LUT_PAD(1), 0); + write_reg(sc, FSPI_LUT_REG(lut_id) + 4, lut); + write_reg(sc, FSPI_LUT_REG(lut_id) + 8, 0); + break; + case LUT_FLASH_CMD_STATUS_READ: + lut = LUT_DEF(0, LUT_CMD, LUT_PAD(1), FSPI_CMD_READ_STATUS); + lut |= LUT_DEF(1, LUT_NXP_READ, LUT_PAD(1), 0); + write_reg(sc, FSPI_LUT_REG(lut_id), lut); + write_reg(sc, FSPI_LUT_REG(lut_id) + 4, 0); + break; + case LUT_FLASH_CMD_PAGE_PROGRAM: + lut = LUT_DEF(0, LUT_CMD, LUT_PAD(1), FSPI_CMD_PAGE_PROGRAM); + lut |= LUT_DEF(1, LUT_ADDR, LUT_PAD(1), 3*8); + write_reg(sc, FSPI_LUT_REG(lut_id), lut); + lut = LUT_DEF(0, LUT_NXP_WRITE, LUT_PAD(1), 0); + write_reg(sc, FSPI_LUT_REG(lut_id) + 4, lut); + write_reg(sc, FSPI_LUT_REG(lut_id) + 8, 0); + break; + case LUT_FLASH_CMD_WRITE_ENABLE: + lut = LUT_DEF(0, LUT_CMD, LUT_PAD(1), FSPI_CMD_WRITE_ENABLE); + write_reg(sc, FSPI_LUT_REG(lut_id), lut); + write_reg(sc, FSPI_LUT_REG(lut_id) + 4, 0); + break; + case LUT_FLASH_CMD_WRITE_DISABLE: + lut = LUT_DEF(0, LUT_CMD, LUT_PAD(1), FSPI_CMD_WRITE_DISABLE); + write_reg(sc, FSPI_LUT_REG(lut_id), lut); + write_reg(sc, FSPI_LUT_REG(lut_id) + 4, 0); + break; + case LUT_FLASH_CMD_SECTOR_ERASE: + lut = LUT_DEF(0, LUT_CMD, LUT_PAD(1), FSPI_CMD_SECTOR_ERASE); + lut |= LUT_DEF(1, LUT_ADDR, LUT_PAD(1), 3*8); + write_reg(sc, FSPI_LUT_REG(lut_id), lut); + write_reg(sc, FSPI_LUT_REG(lut_id) + 4, 0); + break; + default: + write_reg(sc, FSPI_LUT_REG(lut_id), 0); + } + + /* lock LUT */ + write_reg(sc, FSPI_LUTKEY, FSPI_LUTKEY_VALUE); + write_reg(sc, FSPI_LCKCR, FSPI_LCKER_LOCK); +} + +static void +flex_spi_prepare_ahb_lut(struct flex_spi_softc *sc) +{ + uint32_t lut_id; + uint32_t lut; + + /* unlock LUT */ + write_reg(sc, FSPI_LUTKEY, FSPI_LUTKEY_VALUE); + write_reg(sc, FSPI_LCKCR, FSPI_LCKER_UNLOCK); + + lut_id = AHB_LUT_ID; + lut = LUT_DEF(0, LUT_CMD, LUT_PAD(1), FSPI_CMD_FAST_READ); + lut |= LUT_DEF(1, LUT_ADDR, LUT_PAD(1), 3*8); + write_reg(sc, FSPI_LUT_REG(lut_id), lut); + lut = LUT_DEF(0, LUT_DUMMY, LUT_PAD(1), 1*8); + lut |= LUT_DEF(1, LUT_NXP_READ, LUT_PAD(1), 0); + write_reg(sc, FSPI_LUT_REG(lut_id) + 4, lut); + write_reg(sc, FSPI_LUT_REG(lut_id) + 8, 0); + + /* lock LUT */ + write_reg(sc, FSPI_LUTKEY, FSPI_LUTKEY_VALUE); + write_reg(sc, FSPI_LCKCR, FSPI_LCKER_LOCK); +} + +#define DIR_READ 0 +#define DIR_WRITE 1 + +static void +flex_spi_read_rxfifo(struct flex_spi_softc *sc, uint8_t *buf, uint8_t size) +{ + int i, ret, reg; + + /* + * Default value of water mark level is 8 bytes, hence in single + * read request controller can read max 8 bytes of data. + */ + for (i = 0; i < size; i += 4) { + /* Wait for RXFIFO available */ + if (i % 8 == 0) { + ret = reg_read_poll_tout(sc, FSPI_INTR, FSPI_INTR_IPRXWA, + 1, 50000, 1); + if (ret) + device_printf(sc->dev, + "timed out waiting for FSPI_INTR_IPRXWA\n"); + } + + if (i % 8 == 0) + reg = read_reg(sc, FSPI_RFDR); + else + reg = read_reg(sc, FSPI_RFDR + 4); + + if (size >= (i + 4)) + *(uint32_t *)(buf + i) = reg; + else + memcpy(buf + i, ®, size - i); + + /* move the FIFO pointer */ + if (i % 8 != 0) + write_reg(sc, FSPI_INTR, FSPI_INTR_IPRXWA); + } + + /* invalid the RXFIFO */ + write_reg(sc, FSPI_IPRXFCR, FSPI_IPRXFCR_CLR); + /* move the FIFO pointer */ + write_reg(sc, FSPI_INTR, FSPI_INTR_IPRXWA); +} + +static void +flex_spi_write_txfifo(struct flex_spi_softc *sc, uint8_t *buf, uint8_t size) +{ + int i, ret, reg; + + /* invalid the TXFIFO */ + write_reg(sc, FSPI_IPRXFCR, FSPI_IPTXFCR_CLR); + + /* + * Default value of water mark level is 8 bytes, hence in single + * read request controller can read max 8 bytes of data. + */ + for (i = 0; i < size; i += 4) { + /* Wait for RXFIFO available */ + if (i % 8 == 0) { + ret = reg_read_poll_tout(sc, FSPI_INTR, FSPI_INTR_IPTXWE, + 1, 50000, 1); + if (ret) + device_printf(sc->dev, + "timed out waiting for FSPI_INTR_IPRXWA\n"); + } + + if (size >= (i + 4)) + reg = *(uint32_t *)(buf + i); + else { + reg = 0; + memcpy(®, buf + i, size - i); + } + + if (i % 8 == 0) + write_reg(sc, FSPI_TFDR, reg); + else + write_reg(sc, FSPI_TFDR + 4, reg); + + /* move the FIFO pointer */ + if (i % 8 != 0) + write_reg(sc, FSPI_INTR, FSPI_INTR_IPTXWE); + } + + /* move the FIFO pointer */ + write_reg(sc, FSPI_INTR, FSPI_INTR_IPTXWE); +} + +static int +flex_spi_do_op(struct flex_spi_softc *sc, uint32_t op, uint32_t addr, + uint8_t *buf, uint8_t size, uint8_t dir) +{ + + uint32_t cnt = 1000, reg; + + reg = read_reg(sc, FSPI_IPRXFCR); + /* invalidate RXFIFO first */ + reg &= ~FSPI_IPRXFCR_DMA_EN; + reg |= FSPI_IPRXFCR_CLR; + write_reg(sc, FSPI_IPRXFCR, reg); + + /* Prepare LUT */ + flex_spi_prepare_lut(sc, op); + + write_reg(sc, FSPI_IPCR0, addr); + /* + * Always start the sequence at the same index since we update + * the LUT at each BIO operation. And also specify the DATA + * length, since it's has not been specified in the LUT. + */ + write_reg(sc, FSPI_IPCR1, size | + (0 << FSPI_IPCR1_SEQID_SHIFT) | (0 << FSPI_IPCR1_SEQNUM_SHIFT)); + + if ((size != 0) && (dir == DIR_WRITE)) + flex_spi_write_txfifo(sc, buf, size); + + /* Trigger the LUT now. */ + write_reg(sc, FSPI_IPCMD, FSPI_IPCMD_TRG); + + + /* Wait for completion. */ + do { + reg = read_reg(sc, FSPI_INTR); + if (reg & FSPI_INTR_IPCMDDONE) { + write_reg(sc, FSPI_INTR, FSPI_INTR_IPCMDDONE); + break; + } + DELAY(1); + } while (--cnt); + if (cnt == 0) { + device_printf(sc->dev, "timed out waiting for command completion\n"); + return (ETIMEDOUT); + } + + /* Invoke IP data read, if request is of data read. */ + if ((size != 0) && (dir == DIR_READ)) + flex_spi_read_rxfifo(sc, buf, size); + + return (0); +} + +static int +flex_spi_wait_for_controller(struct flex_spi_softc *sc) +{ + int err; + + /* Wait for controller being ready. */ + err = reg_read_poll_tout(sc, FSPI_STS0, + FSPI_STS0_ARB_IDLE, 1, POLL_TOUT, 1); + + return (err); +} + +static int +flex_spi_wait_for_flash(struct flex_spi_softc *sc) +{ + int ret; + uint32_t status = 0; + + ret = flex_spi_wait_for_controller(sc); + if (ret != 0) { + device_printf(sc->dev, "%s: timed out waiting for controller", __func__); + return (ret); + } + + do { + ret = flex_spi_do_op(sc, LUT_FLASH_CMD_STATUS_READ, 0, (void*)&status, + 1, DIR_READ); + if (ret != 0) { + device_printf(sc->dev, "ERROR: failed to get flash status\n"); + return (ret); + } + + } while (status & STATUS_WIP); + + return (0); +} + +static int +flex_spi_identify(struct flex_spi_softc *sc) +{ + int ret; + uint32_t id = 0; + struct flex_spi_flash_info *finfo = flex_spi_flash_info; + + ret = flex_spi_do_op(sc, LUT_FLASH_CMD_JEDECID, 0, (void*)&id, sizeof(id), DIR_READ); + if (ret != 0) { + device_printf(sc->dev, "ERROR: failed to identify device\n"); + return (ret); + } + + /* XXX TODO: SFDP to be implemented */ + while (finfo->jedecid != 0) { + if (id == finfo->jedecid) { + device_printf(sc->dev, "found %s Flash\n", finfo->name); + sc->sectorsize = finfo->sectorsize; + sc->sectorcount = finfo->sectorcount; + sc->erasesize = finfo->erasesize; + sc->fspi_max_clk = finfo->maxclk; + return (0); + } + finfo++; + } + + return (EINVAL); +} + +static inline int +flex_spi_force_ip_mode(struct flex_spi_softc *sc) +{ + + if (sc->quirks & FSPI_QUIRK_USE_IP_ONLY) + return (1); + if (driver_flags & FSPI_QUIRK_USE_IP_ONLY) + return (1); + + return (0); +} + +static int +flex_spi_read(struct flex_spi_softc *sc, off_t offset, caddr_t data, + size_t count) +{ + int err; + size_t len; + + /* Wait for controller being ready. */ + err = flex_spi_wait_for_controller(sc); + if (err) + device_printf(sc->dev, + "warning: spi_read, timed out waiting for controller"); + + /* Use AHB access whenever we can */ + if (flex_spi_force_ip_mode(sc) != 0) { + do { + if (((offset % 4) != 0) || (count < 4)) { + *(uint8_t*)data = bus_read_1(sc->ahb_mem_res, offset); + data++; + count--; + offset++; + } else { + *(uint32_t*)data = bus_read_4(sc->ahb_mem_res, offset); + data += 4; + count -= 4; + offset += 4; + } + } while (count); + + return (0); + } + + do { + len = min(64, count); + err = flex_spi_do_op(sc, LUT_FLASH_CMD_READ, offset, (void*)data, + len, DIR_READ); + if (err) + return (err); + offset += len; + data += len; + count -= len; + } while (count); + + return (0); +} + +static int +flex_spi_write(struct flex_spi_softc *sc, off_t offset, uint8_t *data, + size_t size) +{ + int ret = 0; + size_t ptr; + + flex_spi_wait_for_flash(sc); + ret = flex_spi_do_op(sc, LUT_FLASH_CMD_WRITE_ENABLE, offset, NULL, + 0, DIR_READ); + if (ret != 0) { + device_printf(sc->dev, "ERROR: failed to enable writes\n"); + return (ret); + } + flex_spi_wait_for_flash(sc); + + /* per-sector write */ + while (size > 0) { + uint32_t sector_base = rounddown2(offset, sc->erasesize); + size_t size_in_sector = size; + + if (size_in_sector + offset > sector_base + sc->erasesize) + size_in_sector = sector_base + sc->erasesize - offset; + + /* Read sector */ + ret = flex_spi_read(sc, sector_base, sc->buf, sc->erasesize); + if (ret != 0) { + device_printf(sc->dev, "ERROR: failed to read sector %d\n", + sector_base); + goto exit; + } + + /* Erase sector */ + flex_spi_wait_for_flash(sc); + ret = flex_spi_do_op(sc, LUT_FLASH_CMD_SECTOR_ERASE, offset, NULL, + 0, DIR_READ); + if (ret != 0) { + device_printf(sc->dev, "ERROR: failed to erase sector %d\n", + sector_base); + goto exit; + } + + /* Update buffer with input data */ + memcpy(sc->buf + (offset - sector_base), data, size_in_sector); + + /* Write buffer back to the flash + * Up to 32 bytes per single request, request cannot spread + * across 256-byte page boundary + */ + for (ptr = 0; ptr < sc->erasesize; ptr += 32) { + flex_spi_wait_for_flash(sc); + ret = flex_spi_do_op(sc, LUT_FLASH_CMD_PAGE_PROGRAM, + sector_base + ptr, (void*)(sc->buf + ptr), 32, DIR_WRITE); + if (ret != 0) { + device_printf(sc->dev, "ERROR: failed to write address %ld\n", + sector_base + ptr); + goto exit; + } + } + + /* update pointers */ + size = size - size_in_sector; + offset = offset + size; + } + + flex_spi_wait_for_flash(sc); + ret = flex_spi_do_op(sc, LUT_FLASH_CMD_WRITE_DISABLE, offset, (void*)sc->buf, + 0, DIR_READ); + if (ret != 0) { + device_printf(sc->dev, "ERROR: failed to disable writes\n"); + goto exit; + } + flex_spi_wait_for_flash(sc); + +exit: + + return (ret); +} + +static int +flex_spi_default_setup(struct flex_spi_softc *sc) +{ + int ret, i; + uint32_t reg; + + /* Default clock speed */ + ret = flex_spi_clk_setup(sc, SPI_DEFAULT_CLK_RATE); + if (ret) + return (ret); + + /* Reset the module */ + /* w1c register, wait unit clear */ + reg = read_reg(sc, FSPI_MCR0); + reg |= FSPI_MCR0_SWRST; + write_reg(sc, FSPI_MCR0, reg); + ret = reg_read_poll_tout(sc, FSPI_MCR0, FSPI_MCR0_SWRST, 1000, POLL_TOUT, 0); + if (ret != 0) { + device_printf(sc->dev, "time out waiting for reset"); + return (ret); + } + + /* Disable the module */ + write_reg(sc, FSPI_MCR0, FSPI_MCR0_MDIS); + + /* Reset the DLL register to default value */ + write_reg(sc, FSPI_DLLACR, FSPI_DLLACR_OVRDEN); + write_reg(sc, FSPI_DLLBCR, FSPI_DLLBCR_OVRDEN); + + /* enable module */ + write_reg(sc, FSPI_MCR0, FSPI_MCR0_AHB_TIMEOUT(0xFF) | + FSPI_MCR0_IP_TIMEOUT(0xFF) | (uint32_t) FSPI_MCR0_OCTCOMB_EN); + + /* + * Disable same device enable bit and configure all slave devices + * independently. + */ + reg = read_reg(sc, FSPI_MCR2); + reg = reg & ~(FSPI_MCR2_SAMEDEVICEEN); + write_reg(sc, FSPI_MCR2, reg); + + /* AHB configuration for access buffer 0~7. */ + for (i = 0; i < 7; i++) + write_reg(sc, FSPI_AHBRX_BUF0CR0 + 4 * i, 0); + + /* + * Set ADATSZ with the maximum AHB buffer size to improve the read + * performance. + */ + write_reg(sc, FSPI_AHBRX_BUF7CR0, (2048 / 8 | + FSPI_AHBRXBUF0CR7_PREF)); + + /* prefetch and no start address alignment limitation */ + write_reg(sc, FSPI_AHBCR, FSPI_AHBCR_PREF_EN | FSPI_AHBCR_RDADDROPT); + + /* AHB Read - Set lut sequence ID for all CS. */ + flex_spi_prepare_ahb_lut(sc); + write_reg(sc, FSPI_FLSHA1CR2, AHB_LUT_ID); + write_reg(sc, FSPI_FLSHA2CR2, AHB_LUT_ID); + write_reg(sc, FSPI_FLSHB1CR2, AHB_LUT_ID); + write_reg(sc, FSPI_FLSHB2CR2, AHB_LUT_ID); + + /* disable interrupts */ + write_reg(sc, FSPI_INTEN, 0); + + return (0); +} + +static int +flex_spi_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, flex_spi_compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "NXP FlexSPI Flash"); + return (BUS_PROBE_SPECIFIC); +} + +static int +flex_spi_attach(device_t dev) +{ + struct flex_spi_softc *sc; + phandle_t node; + int rid; + uint32_t reg; + + node = ofw_bus_get_node(dev); + sc = device_get_softc(dev); + sc->dev = dev; + + mtx_init(&sc->disk_mtx, "flex_spi_DISK", "QSPI disk mtx", MTX_DEF); + + /* Get memory resources. */ + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + + rid = 1; + sc->ahb_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE | RF_SHAREABLE); + + if (sc->mem_res == NULL || sc->ahb_mem_res == NULL) { + device_printf(dev, "could not allocate resources\n"); + flex_spi_detach(dev); + return (ENOMEM); + } + + /* Get clocks */ + if ((clk_get_by_ofw_name(dev, node, "fspi_en", &sc->fspi_clk_en) != 0) + || (clk_get_freq(sc->fspi_clk_en, &sc->fspi_clk_en_hz) != 0)) { + device_printf(dev, "could not get fspi_en clock\n"); + flex_spi_detach(dev); + return (EINVAL); + } + if ((clk_get_by_ofw_name(dev, node, "fspi", &sc->fspi_clk) != 0) + || (clk_get_freq(sc->fspi_clk, &sc->fspi_clk_hz) != 0)) { + device_printf(dev, "could not get fspi clock\n"); + flex_spi_detach(dev); + return (EINVAL); + } + + /* Enable clocks */ + if (clk_enable(sc->fspi_clk_en) != 0 || + clk_enable(sc->fspi_clk) != 0) { + device_printf(dev, "could not enable clocks\n"); + flex_spi_detach(dev); + return (EINVAL); + } + + /* Clear potential interrupts */ + reg = read_reg(sc, FSPI_INTR); + if (reg) + write_reg(sc, FSPI_INTR, reg); + + /* Default setup */ + if (flex_spi_default_setup(sc) != 0) { + device_printf(sc->dev, "Unable to initialize defaults\n"); + flex_spi_detach(dev); + return (ENXIO); + } + + /* Identify attached Flash */ + if(flex_spi_identify(sc) != 0) { + device_printf(sc->dev, "Unable to identify Flash\n"); + flex_spi_detach(dev); + return (ENXIO); + } + + if (flex_spi_clk_setup(sc, sc->fspi_max_clk) != 0) { + device_printf(sc->dev, "Unable to set up SPI max clock\n"); + flex_spi_detach(dev); + return (ENXIO); + } + + sc->buf = malloc(sc->erasesize, SECTOR_BUFFER, M_WAITOK); + if (sc->buf == NULL) { + device_printf(sc->dev, "Unable to set up allocate internal buffer\n"); + flex_spi_detach(dev); + return (ENOMEM); + } + + /* Move it to per-flash */ + sc->disk = disk_alloc(); + sc->disk->d_open = flex_spi_open; + sc->disk->d_close = flex_spi_close; + sc->disk->d_strategy = flex_spi_strategy; + sc->disk->d_getattr = flex_spi_getattr; + sc->disk->d_ioctl = flex_spi_ioctl; + sc->disk->d_name = "flash/qspi"; + sc->disk->d_drv1 = sc; + /* the most that can fit in a single spi transaction */ + sc->disk->d_maxsize = DFLTPHYS; + sc->disk->d_sectorsize = FLASH_SECTORSIZE; + sc->disk->d_unit = device_get_unit(sc->dev); + sc->disk->d_dump = NULL; + + sc->disk->d_mediasize = sc->sectorsize * sc->sectorcount; + sc->disk->d_stripesize = sc->erasesize; + + bioq_init(&sc->bio_queue); + sc->taskstate = TSTATE_RUNNING; + kproc_create(&flex_spi_task, sc, &sc->p, 0, 0, "task: qspi flash"); + disk_create(sc->disk, DISK_VERSION); + + return (0); +} + +static int +flex_spi_detach(device_t dev) +{ + struct flex_spi_softc *sc; + int err; + + sc = device_get_softc(dev); + err = 0; + + mtx_lock(&sc->disk_mtx); + if (sc->taskstate == TSTATE_RUNNING) { + sc->taskstate = TSTATE_STOPPING; + wakeup(sc->disk); + while (err == 0 && sc->taskstate != TSTATE_STOPPED) { + err = mtx_sleep(sc->disk, &sc->disk_mtx, 0, "flex_spi", + hz * 3); + if (err != 0) { + sc->taskstate = TSTATE_RUNNING; + device_printf(sc->dev, + "Failed to stop queue task\n"); + } + } + } + + mtx_unlock(&sc->disk_mtx); + mtx_destroy(&sc->disk_mtx); + + if (err == 0 && sc->taskstate == TSTATE_STOPPED) { + disk_destroy(sc->disk); + bioq_flush(&sc->bio_queue, NULL, ENXIO); + } + + /* Disable hardware. */ + + /* Release memory resource. */ + if (sc->mem_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem_res), sc->mem_res); + + if (sc->ahb_mem_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->ahb_mem_res), sc->ahb_mem_res); + + /* Disable clocks */ + if (sc->fspi_clk_en_hz) + clk_disable(sc->fspi_clk_en); + if (sc->fspi_clk_hz) + clk_disable(sc->fspi_clk); + + free(sc->buf, SECTOR_BUFFER); + + return (err); +} + +static int +flex_spi_open(struct disk *dp) +{ + + return (0); +} + +static int +flex_spi_close(struct disk *dp) +{ + + return (0); +} + +static int +flex_spi_ioctl(struct disk *dp, u_long cmd, void *data, int fflag, + struct thread *td) +{ + + return (ENOTSUP); +} + +static void +flex_spi_strategy(struct bio *bp) +{ + struct flex_spi_softc *sc; + + sc = (struct flex_spi_softc *)bp->bio_disk->d_drv1; + mtx_lock(&sc->disk_mtx); + bioq_disksort(&sc->bio_queue, bp); + mtx_unlock(&sc->disk_mtx); + wakeup(sc->disk); +} + +static int +flex_spi_getattr(struct bio *bp) +{ + struct flex_spi_softc *sc; + device_t dev; + + if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL) { + return (ENXIO); + } + + sc = bp->bio_disk->d_drv1; + dev = sc->dev; + + if (strcmp(bp->bio_attribute, "SPI::device") != 0) { + return (-1); + } + + if (bp->bio_length != sizeof(dev)) { + return (EFAULT); + } + + bcopy(&dev, bp->bio_data, sizeof(dev)); + + return (0); +} + +static void +flex_spi_task(void *arg) +{ + struct flex_spi_softc *sc; *** 447 LINES SKIPPED *** From nobody Tue Nov 30 06:18:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ABD9418C3EEA; Tue, 30 Nov 2021 06:18: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 4J3Br0279Mz4xbj; Tue, 30 Nov 2021 06:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 28CAB11602; Tue, 30 Nov 2021 06:18: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 1AU6IuXL028302; Tue, 30 Nov 2021 06:18:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU6IuDC028301; Tue, 30 Nov 2021 06:18:56 GMT (envelope-from git) Date: Tue, 30 Nov 2021 06:18:56 GMT Message-Id: <202111300618.1AU6IuDC028301@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: b4aa9cb21752 - main - tcp(4): Fix a typo in a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4aa9cb2175221d31ce06cf91bd9a6b34ebe868e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638253136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WLKYKG+vDraJrdTbnou9SVI+kbnvxWimJrsKkuRy/so=; b=Fnn7/OIOKnRmhBFV7T3dW2Lw9ggsMuqdBbQyUb5xB+B/t/ORCzRWzIp9XmiRYoZnQ1Rsj8 gSYXl4HTGycFBrhwh5dBJF3tIR2J2P0VhH87JwjnRRLtK5xvZKnlXpS+U3CSnPwHIa9YET ohmgoPi11KWX028dPVm27sMIIyiEOA611DL+xCI7DK3mNQC2VTErhf89Q3bdVlWKnwHzVJ Aipaopsxfom/AujBlalS51sscT5OEexobCrOAY+y2xTcEgMPUJxWpglHUfKyu4vWAGu+XU cnlCPw9IMXKo3Jhc98n29fkdYD0nYPxqA5dqhoqMLkeGY7rPfH6hLmFkbOnQ8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638253136; a=rsa-sha256; cv=none; b=JIcWrcL35Eqp609UpWLQRUdttTjwtT6riQQRpx8J+pFC3sZ+AlRe/KRgUBA9WycquJhYV5 +X3W1DwI8gEuEWQdRlZiUVEv1dkpbXyT47Y/Mp0iO5NFyWbl2KJB310/U33bC4eMt4DX0W g3AgXd5J0TUhLEMuuhyDsJHtulILSQLSg79CMpjSPRlEP64qwQOu1qmxgiVSs6wDvnX9Au mOgvk2sf8jVrb82HMG0NKrGUUhkdwtkXXRYFYHbG99pYlO5D7HMTrM661j7y/hei/efqLi C1PZK3I4CPcXYzC6grg1CnlDbeM1UXr+323WPLWupbmmTKNflLjyAArcCENE3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b4aa9cb2175221d31ce06cf91bd9a6b34ebe868e commit b4aa9cb2175221d31ce06cf91bd9a6b34ebe868e Author: Gordon Bergling AuthorDate: 2021-11-30 06:17:30 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 06:17:30 +0000 tcp(4): Fix a typo in a sysctl description - s/entires/entries/ MFC after: 3 days --- sys/netinet/tcp_hostcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 6d05bfc667e7..1d1d9375393b 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -192,7 +192,7 @@ SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, prune, CTLFLAG_VNET | CTLFLAG_RW, SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, purge, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_hostcache.purgeall), 0, - "Expire all entires on next purge run"); + "Expire all entries on next purge run"); SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, list, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, From nobody Tue Nov 30 06:25:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E66E718C7236; Tue, 30 Nov 2021 06:25: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 4J3Bzd40LXz50cv; Tue, 30 Nov 2021 06:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65A231159E; Tue, 30 Nov 2021 06:25: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 1AU6PXNm041148; Tue, 30 Nov 2021 06:25:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU6PXB9041147; Tue, 30 Nov 2021 06:25:33 GMT (envelope-from git) Date: Tue, 30 Nov 2021 06:25:33 GMT Message-Id: <202111300625.1AU6PXB9041147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 3cf59750eb3e - main - netinet6: Fix a typo in a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cf59750eb3e9d548235ecef34fffd275b6d9463 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638253533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xtyH/npGGvDH5l5Uv2t4TtFrI4S3M4lrO3mN+sh3uQM=; b=FQGXgbAKhObn/+BjMKH0o0ehO40EO7UUZvY9R6FffJBAHSpo3mSVg26vpVGO8HYGY/8PML iF2mEc7ap8TGBF8h/NShU65o8Tped0x7uT2Qjst1Klep6lkhuMqyp2P5Fq+ZLu1e5GV70m L2Ip4faKtuKI3YKtCAxyN/4dcLM/KbmIEvO2CGCxlJ6QR86O2Cd3Jcm76Z0KoMQ/Xluq7z M/b2yVe0Ya2a4HC+YvObtgvqUA3dhZSlMmdkW+C4WuZFH1oX4OzT1hMrqaM2FwRxAsjU5+ HYfu+FasreZPUJYZnpaeweSnzjs9WlmGRz+MTt1q3KglKqLqp2BQ7G95pAsa6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638253533; a=rsa-sha256; cv=none; b=fL/TGwcszm3Tuvyzd2lBGpjxvMOqIJpIz/cIMvLKAvqtBHzGDRlRSOoOQlqAydnFP++/sR yPWITWn4eNyw/jCSMjdr6GQQkUbjacklQRcHL1oXEoXvHYD3oPTuJnPJHCZIbuYYeiduj8 8QGEvk7UpYSIUlQzCmOnUWKWw0fjdZ5+Y/TKBGLpBLAYiA2yKDwnndIfaZTOMX7GAzfcix RDIlZ3TzFQg9f+IHI7bWN+ypEg341CI3ZP+tceqEXX/yQNQ/Ewif0855M/q5UBZZJJb50m jdO+xYBB3exUl+jURMFxLqRkOIC9f9S9Ji71hKgSIsSnV6eaB4D6NTnVq7cPWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3cf59750eb3e9d548235ecef34fffd275b6d9463 commit 3cf59750eb3e9d548235ecef34fffd275b6d9463 Author: Gordon Bergling AuthorDate: 2021-11-30 06:24:44 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 06:24:44 +0000 netinet6: Fix a typo in a sysctl description - remove a double 'a' MFC after: 3 days --- sys/netinet6/frag6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index 222bd157fddd..e0857d3af3e8 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -179,7 +179,7 @@ frag6_set_bucketsize(void) SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGS, maxfrags, CTLFLAG_RW, &ip6_maxfrags, 0, "Maximum allowed number of outstanding IPv6 packet fragments. " - "A value of 0 means no fragmented packets will be accepted, while a " + "A value of 0 means no fragmented packets will be accepted, while " "a value of -1 means no limit"); static int From nobody Tue Nov 30 06:29:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 10EA818AAE34; Tue, 30 Nov 2021 06:29: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 4J3C405k5nz52cY; Tue, 30 Nov 2021 06:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0B9B1125C; Tue, 30 Nov 2021 06:29: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 1AU6TKYe041500; Tue, 30 Nov 2021 06:29:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU6TKlV041499; Tue, 30 Nov 2021 06:29:20 GMT (envelope-from git) Date: Tue, 30 Nov 2021 06:29:20 GMT Message-Id: <202111300629.1AU6TKlV041499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: b6f4818a7ee4 - main - vfs: Fix a typo in a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6f4818a7ee41a4f81f8fd68a2c9820ebf65bd1d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638253760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8hg7gB8+MgvBqgauXGkzuVGBD+okUUuVfBcTCCjTLQ=; b=H6BxsoUIOHFlKYAOoTvzErKv5KRc4u3HdWLTv8XnCXawUjCmRHmhznunJkqpN6HvzxXH4h FfD5l3oZjF4Xv9UGB221ljZvZStmcE4WnpqEn/8LNM8FbcQpMWjHrMZgW0jlObLZLCX6qB nTdgbV1EzVLG5NM7nlm8GDUeI3ZIPS0gSsvlBD2uBpVj5o2rL31iuqgEUSkxIf2gQk/aFF Xq6XEHyZ7jk9MwtAfT71p93CB4uCgGm1ZSS3djfUI/6KS1xISTSFBA33oCew2ZiTZR3Dvp M6t6UoalZJPIU6EBrDVm6ehLt7SpoR0CXOqveNRVZj2yVN2oIWx1G4h0DVYNMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638253760; a=rsa-sha256; cv=none; b=QkEF1h8cXG/5FVv2Lr3w/05rn+BLtyBN25jC0ZfGNwXBnrLgBG4dORsVbUIs85Nf4rEYoV jDXWdtAJN9e3M7QAGbriWdy70p0VODreudbqPN28gUaqltFhxGux67ITBLczjTsdMthiww piGJo5HPnK1SSm9SgghRfq7XA4aThcriGuzQv9Uz0ZA4hl0oSPkXddzVowZp+c7WkGZni/ FXsbIjsO6q7c3UZlGFl7GXS099htPGjju4rA+bFC8AKBEy5SuRMqfHGlZ5ZtmU9tL/AX8Z 0oLdRxDllYjwSqGFmjbgpZJvWJVl/iPw59GOfVTdRqcW30XjhVnORIhhNlQD0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b6f4818a7ee41a4f81f8fd68a2c9820ebf65bd1d commit b6f4818a7ee41a4f81f8fd68a2c9820ebf65bd1d Author: Gordon Bergling AuthorDate: 2021-11-30 06:28:40 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 06:28:40 +0000 vfs: Fix a typo in a sysctl description - s/dependecies/dependencies/ MFC after: 3 days --- sys/kern/vfs_bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 8d6eac800caf..61fe9a6e2bfd 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3494,7 +3494,7 @@ buf_daemon() static int flushwithdeps = 0; SYSCTL_INT(_vfs, OID_AUTO, flushwithdeps, CTLFLAG_RW | CTLFLAG_STATS, &flushwithdeps, 0, - "Number of buffers flushed with dependecies that require rollbacks"); + "Number of buffers flushed with dependencies that require rollbacks"); static int flushbufqueues(struct vnode *lvp, struct bufdomain *bd, int target, From nobody Tue Nov 30 08:57:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9D53918AA5F3; Tue, 30 Nov 2021 08:57: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 4J3GLV6qCgz4ZJX; Tue, 30 Nov 2021 08:57:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBDAE13839; Tue, 30 Nov 2021 08:57: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 1AU8v6Z1040005; Tue, 30 Nov 2021 08:57:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU8v6mZ040004; Tue, 30 Nov 2021 08:57:06 GMT (envelope-from git) Date: Tue, 30 Nov 2021 08:57:06 GMT Message-Id: <202111300857.1AU8v6mZ040004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Juraj Lutter Subject: git: aaa4cd7f3c93 - main - Makefile.inc1: Silence an error in make 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: otis X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aaa4cd7f3c933950582dfb4f0eac23a200dafe53 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638262627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w+qlC59wsSY6oc4InbeYlXjIJGbH/KGmv8rbDrKEKis=; b=lQwUZtFC3Z558oc+flxkI7d1JchWFrpyqLOwnvxIV10J+Xc3PxkqEWhIUgpCqRwt6NULOt haYQ0Wv0E2JxpQiYx9zF80+U1/ZO6WA0MJqUlA1Lb3s3LIHHVxIp5d48NacVUdXmGRTOpt Z86sGwCeL3bJFqZhLHpNzglFF2dUNxy17WDu4ibdP5UJ19Dy0HVuvicS05BLcYiC/5Q1b2 5gQDPYh048hOqqoIAyZAbKNaZSMVxrrZwOiLSW88QEEZ4oUWZLGLe9+EJV7HcQn3bkWlL7 c9YS66o3jjAJxUIHptnXjBCbMHh5JAo4CVLhakcwfj0gPlxPYw5uw2Iw2fE7eQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638262627; a=rsa-sha256; cv=none; b=qi6oJQPhhfzL5+kT6F+mN6n7VlmQVJY2wAN5ob061ZyL6qg4tWpFNV87hEsAS4+WQ51VG4 +J/HmFzZletB/xfyYcYdKFg9C6EB2eGJc3q/I2pmhDG1++4emeh10w3w6wSHlbs726+U1i LMRnhiXIRh/EnIdoLsysORSrCzI3ZJy2Eb6i26nizLlB52xXyaImgzLkvuDbc2nsk72G6s 3DP4mzVymydNgr7wi2JQkAU0J1EXSucju3PywXVKhPuoOcJj62TZEMxAnSnB8hkrB8OcYi pm0dhZbUkTRdryfh0PhjYFhgxJvXhM6FrJ57kA4h0pGtYS1yo5MQoMlaCdU7AA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by otis (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=aaa4cd7f3c933950582dfb4f0eac23a200dafe53 commit aaa4cd7f3c933950582dfb4f0eac23a200dafe53 Author: Juraj Lutter AuthorDate: 2021-11-28 20:44:13 +0000 Commit: Juraj Lutter CommitDate: 2021-11-30 08:53:20 +0000 Makefile.inc1: Silence an error in make packages Silence an error in "packages" target, like: eval: /usr/src: Permission denied on systems without subversion present. Reviewed by: emaste Approved by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33153 --- Makefile.inc1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index e3b46b3e40bc..f0d0483e41d4 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -503,11 +503,13 @@ SVNVERSION_CMD?=${_D}/svnliteversion . endif . endfor .endif +.if defined(SVNVERSION_CMD) && !empty(SVNVERSION_CMD) _VCS_REVISION?= $$(eval ${SVNVERSION_CMD} ${SRCDIR}) . if !empty(_VCS_REVISION) VCS_REVISION= $$(echo r${_VCS_REVISION}) -. endif .export VCS_REVISION +. endif +.endif .endif .if !defined(GIT_CMD) || empty(GIT_CMD) From nobody Tue Nov 30 09:22:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 88D8B18B6EDF; Tue, 30 Nov 2021 09:22: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 4J3GwG1wS2z4jvq; Tue, 30 Nov 2021 09:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21DD613F01; Tue, 30 Nov 2021 09:22: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 1AU9MswQ079942; Tue, 30 Nov 2021 09:22:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU9Msea079941; Tue, 30 Nov 2021 09:22:54 GMT (envelope-from git) Date: Tue, 30 Nov 2021 09:22:54 GMT Message-Id: <202111300922.1AU9Msea079941@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 27c4abc7cde0 - main - inet(3): Fix two typos in sysctl descriptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27c4abc7cde0be8f9fdd8ac7725e9910b0cbf5d4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638264174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SaqjQVUeyHo3YoZlxCU/Cne1cGLJq1K+twb/hQFPRKc=; b=s8XFO0UFzCvP3swAyYUalFdio3HjKAq5kvLn18EJ8FzqSuNyQLzUqx0YUHH4d8cvEsqCTL SauhH/OVkaM4rrzsPzLaOMEElCQbb2kJ+zhX72UXQN/iKSumR+0bM2ZHtpeAzVR59cTKpj Z/4m69ALIwslODCMwzk6sLDXuwrCgsxyWCHiWpbM1CjLkHABiB6aen93qF/kf4BZR3O1Mf Fhi9AaS02Gg9NUntj2dwqYdftRfQb3Y9aVUIbaz0JwtF8jcRuKaNFIukBDxh4Qi3bsvh4X 0zuFtZBJKmIdGSwsNrPjZYSVmEVpLHUjDb/WUUu5IZ+mZ1cIdn141I3pqc2sBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638264174; a=rsa-sha256; cv=none; b=mM1/Ig8YtBrsYg6FMazFX8HFsV5PvhBoWTVhDZZKUE6xJergFW02qD/YHD8U7KeCYJbv+k xFYsgy6q5smfbtbzukWHOqilTCtKJc0oqSbataYxHj0c6nQfolAioXTypk89aW14eujs1l VGgMUwQXZ974J2nIkWmZXs4UqUbNgYuFJD+jzDBaDAUXqz+H0VzAqnDObKSnxG/yeIXdi1 oWaAQCp30OMcYyo7dYEkP4QTUB3Gt42PMnUM9IecIMV51q2Wwxk1wXkWHfYlEWQtc/Apur uhRyN0kWoOrFuCtUStLTtismGMYj2drFtK6mhDxQ9dhHqPWtKDSstWa1XS2dtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=27c4abc7cde0be8f9fdd8ac7725e9910b0cbf5d4 commit 27c4abc7cde0be8f9fdd8ac7725e9910b0cbf5d4 Author: Gordon Bergling AuthorDate: 2021-11-30 09:21:47 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 09:21:47 +0000 inet(3): Fix two typos in sysctl descriptions - s/sequental/sequential/ MFC after: 3 days --- 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 b8b5c6fbdcd5..9dd2aee11bf0 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -216,11 +216,11 @@ SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomized, SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomcps, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ipport_randomcps), 0, "Maximum number of random port " - "allocations before switching to a sequental one"); + "allocations before switching to a sequential one"); SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomtime, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ipport_randomtime), 0, - "Minimum time to keep sequental port " + "Minimum time to keep sequential port " "allocation before switching to a random one"); #ifdef RATELIMIT From nobody Tue Nov 30 09:27:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1535C18BA67E; Tue, 30 Nov 2021 09:27:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3H1R5qzDz4m4s; Tue, 30 Nov 2021 09:27:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4A7213D97; Tue, 30 Nov 2021 09:27: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 1AU9RNSd080359; Tue, 30 Nov 2021 09:27:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU9RNZR080358; Tue, 30 Nov 2021 09:27:23 GMT (envelope-from git) Date: Tue, 30 Nov 2021 09:27:23 GMT Message-Id: <202111300927.1AU9RNZR080358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 5f8ccf651528 - main - nvme(4): Correct a typo in a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f8ccf6515288fd98896eaf0511eedd654cd3530 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638264443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BR+XwMslpl3RGhuK6fLq+THb6Q9qPg6CbobYv3SxEN0=; b=j9YyI28vXuXah5xdpyTu2Nj4CDymr973Hs0B7ysu5x/Kb46/ztrVgZoVvWL5gBQSaFq6SE fxGxZ0aFreIA6XlKPLC4BL+NlcenXfzLARlFBisEsr2U45AHEQZCi//tuQjqWcbaYC7nW5 eNHqb7MKg2Lb/BTFBTc5AJaXnbcM440VYI9wTXhktb1klh7Ctv0E3HJjVD9bVqrCQH7VnU Rpxg6xOuwOFABtgZDpRyAz3PjQH2l9U9GqVuZuJeMXT2ojBBaW0U+btOZ3OAywcfYq9qVE FzF8awiRQFkHrR+hSvuOysCPCR9C1c58hD4VCBFbMKJaa+PN5j3VbESvFezoFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638264443; a=rsa-sha256; cv=none; b=u4ENNVScKVF9DxCjclQR6Q8vPbE2S/WzYvbPIiW51rIBQO3LgPiOVy5rmPNnUoUpSKSeNg Lzk+UcWdRzQ1Z/18o1SSWzM9PSxRUL0w01ZLhSetMMfhlDIztPZwDBNX4Uo6mqhTzsNlat 0KeJ2HCslJXjq7bNleDi4MOst2pJIbGxuwLRza08SoJEATdpxD6vRsfi/7WTiXWLeUIVtw MVqRboyMDzmTj9dh5/mx3TtMwpB2P9gE+HaewCATJnrWxUxgOAb7Vislnh+UtHTzt4PE3O DX64gHiW8gvgYRWx2MVMCSsllQhlx4Y3Crizmm6XuGrr7Puj9ruqd3w5v+16nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5f8ccf6515288fd98896eaf0511eedd654cd3530 commit 5f8ccf6515288fd98896eaf0511eedd654cd3530 Author: Gordon Bergling AuthorDate: 2021-11-30 09:26:25 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 09:26:25 +0000 nvme(4): Correct a typo in a sysctl description - s/printting/printing/ MFC after: 3 days --- sys/dev/nvme/nvme_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index cfcc814f44d2..4367a21861b3 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -50,7 +50,7 @@ SYSCTL_INT(_hw_nvme, OID_AUTO, use_nvd, CTLFLAG_RDTUN, &nvme_use_nvd, 1, "1 = Create NVD devices, 0 = Create NDA devices"); SYSCTL_BOOL(_hw_nvme, OID_AUTO, verbose_cmd_dump, CTLFLAG_RWTUN, &nvme_verbose_cmd_dump, 0, - "enable verbose command printting when a command fails"); + "enable verbose command printing when a command fails"); static void nvme_dump_queue(struct nvme_qpair *qpair) From nobody Tue Nov 30 09:42:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ED00018C0BD4; Tue, 30 Nov 2021 09:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3HLc4z99z4qQl; Tue, 30 Nov 2021 09:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BCDC13DDC; Tue, 30 Nov 2021 09:42: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 1AU9gGUC005944; Tue, 30 Nov 2021 09:42:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU9gGwR005913; Tue, 30 Nov 2021 09:42:16 GMT (envelope-from git) Date: Tue, 30 Nov 2021 09:42:16 GMT Message-Id: <202111300942.1AU9gGwR005913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: b15a632c418f - main - if_hn: Fix a few typos in comments and a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b15a632c418f6532fe7c3002b4085c61b1e278b0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638265336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4d2Z1Sk0Rs9EOpkcHzpU5BZWxRjRUYwgbn9O5Ju5Zw8=; b=AWaZF1keK4Q/i/AyTwFXrL2rq3EeZWZYi+f7ImYCnAsGHVa3r2IV0aCQyQb/LDsX3bDE06 aId4W89PR+p5uVxuGP7aIbZHDkY/v3iDaSePgo/DGcGeM8+VOibSblh/WwVDmChZvv8pJY F8uB6Qt0nWJ4XHUdVzscyrBYZuHl8YhPLzOMBCj0gj8m1s+7aoh4RgqHJZ93CszxRd4a5z meqnN2dD6tcJ3c+8cqAXZiNeWKkvopFqzcAQOSAZ6E5ZVJOZQgQB/RDFLHT0+VqBHQT12R bbpQbzFEttpeevW4meBCEpVwGOkWBMmFiGehcMR8aRnAG/73iyOtgc2LDe+jnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638265336; a=rsa-sha256; cv=none; b=hWyrMCfQZhYKKo0iFJvjuSQ45QkRSERMLIXVp2EB9EUhJ5JRHSYQwa9MGoPdMp3d659t1n 2IPSZ4vJnZlqIq9V5vORTHow4cg3J628O/P4sU1dLF+8lCa6WjTt2elWE/rrrl2DrRHD8r gvcZpj0lQGMTh/0zdQXPYPuDxrgcLdyGMcpNryz4Gj8UJ45jhXGLUFOq1A2N9KHmVr75So /K40iSKEP86HfU9MUlzpuZFu66nGvPAB/2rheTBnRyhz7kA3TMeHJdSbimQLr1ZE/JcAMr JeYJZrKNIGZKr8r4ZK0xkl+SRuicnzbioAwfgWqxHUUBng4z1ns0eScrduZSrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b15a632c418f6532fe7c3002b4085c61b1e278b0 commit b15a632c418f6532fe7c3002b4085c61b1e278b0 Author: Gordon Bergling AuthorDate: 2021-11-30 09:35:14 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 09:35:14 +0000 if_hn: Fix a few typos in comments and a sysctl description - s/segement/segment/ MFC after: 3 days --- sys/dev/hyperv/netvsc/if_hn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index 0ec398bed670..d562a937ecad 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -457,11 +457,11 @@ static void hn_start_txeof_taskfunc(void *, int); SYSCTL_NODE(_hw, OID_AUTO, hn, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Hyper-V network interface"); -/* Trust tcp segements verification on host side. */ +/* Trust tcp segment verification on host side. */ static int hn_trust_hosttcp = 1; SYSCTL_INT(_hw_hn, OID_AUTO, trust_hosttcp, CTLFLAG_RDTUN, &hn_trust_hosttcp, 0, - "Trust tcp segement verification on host side, " + "Trust tcp segment verification on host side, " "when csum info is missing (global setting)"); /* Trust udp datagrams verification on host side. */ @@ -5116,7 +5116,7 @@ hn_create_rx_data(struct hn_softc *sc, int ring_cnt) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "trust_hosttcp", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, HN_TRUST_HCSUM_TCP, hn_trust_hcsum_sysctl, "I", - "Trust tcp segement verification on host side, " + "Trust tcp segment verification on host side, " "when csum info is missing"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "trust_hostudp", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, HN_TRUST_HCSUM_UDP, From nobody Tue Nov 30 09:42:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3F0F218C0EA0; Tue, 30 Nov 2021 09:42: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 4J3HLd5ln6z4qCy; Tue, 30 Nov 2021 09:42:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A386714180; Tue, 30 Nov 2021 09:42: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 1AU9gHHB006732; Tue, 30 Nov 2021 09:42:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU9gHKJ006731; Tue, 30 Nov 2021 09:42:17 GMT (envelope-from git) Date: Tue, 30 Nov 2021 09:42:17 GMT Message-Id: <202111300942.1AU9gHKJ006731@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 54c1a65736ec - main - ficl: Fix a typo in a comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54c1a65736ec012b583ade1d53c477e182c574e4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638265337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O5G+F7xJQl99ZhrlyZjmEBXZ2WhgVi8HbwUTuvcH0QM=; b=iS46BcXaYSL5Eqn4VJbSwXKfIHqPKE5QAtN+t79v215jtVBijVAhSJP9RrWds6l0TKPlW+ +ehZ9ThOCjSk3dbj4jk2HdHAGxuloFK1Y/qOtXLQNk2mNMSzCMvFlnJXYSBUl4IZWTkDwo gNZO7x67W76GwUGq+KGE4NUWHXAAj3pLJZe6Dac/ulREtUfIwTv7/r2QOD4fEFtQy316L7 1P+KnJyEcUoMn8HBKeyNNQK94hIcqGmxrxQs1E9miv7naiDqnuDIgxKzuXG8Uq+9npONJm J1LHtmMBWE2f/z94/LsJkmWxUu81jTJLQSwIxrZGn5gYly2YKLijbK9UTiXn+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638265337; a=rsa-sha256; cv=none; b=gRpCaKjLAG/0QQdpZFFy4gFtxpbkmB5aWG/CJ9yHi7JBIp0UODtELkQeOj1xVVRPp2lkGG dEE88cNrhzZAOjDTBfzzcOV82/OtlQ4DMOGJT04Q/sR8CKPe5c6zXLa34pgpbYKwqjyhB8 20LSP+S0eOZOyASH7oInb95IOplOeC2y1UP7QxS31dkfFX2OcDIebjTOs8/9jsVLbSH2FS oz60e73mOgW29xsp1p8Iwkdjol/0roQmsy5ssWZRnAeWf0XA0k0RKmVV00C0ON0QjG7Z/i MC+SvrT2Z/rPS2yA/RdOFfomozW55ZjiU5vh8t3ADqBk6gFVRMKVMEy2fuyr1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=54c1a65736ec012b583ade1d53c477e182c574e4 commit 54c1a65736ec012b583ade1d53c477e182c574e4 Author: Gordon Bergling AuthorDate: 2021-11-30 09:36:29 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 09:36:29 +0000 ficl: Fix a typo in a comment - s/segement/segment/ MFC after: 3 days --- stand/ficl/float.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/ficl/float.c b/stand/ficl/float.c index b6cda150df8a..dfd1456c8dac 100644 --- a/stand/ficl/float.c +++ b/stand/ficl/float.c @@ -810,7 +810,7 @@ static void ToF(FICL_VM *pVM) /************************************************************************** F l o a t P a r s e S t a t e -** Enum to determine the current segement of a floating point number +** Enum to determine the current segment of a floating point number ** being parsed. **************************************************************************/ #define NUMISNEG 1 From nobody Tue Nov 30 09:42:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1D8ED18C0BE1; Tue, 30 Nov 2021 09:42:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3HLg2gcYz4q76; Tue, 30 Nov 2021 09:42:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DBCFF1403E; Tue, 30 Nov 2021 09:42: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 1AU9gI6C006756; Tue, 30 Nov 2021 09:42:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU9gIng006755; Tue, 30 Nov 2021 09:42:18 GMT (envelope-from git) Date: Tue, 30 Nov 2021 09:42:18 GMT Message-Id: <202111300942.1AU9gIng006755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 1dadeab36762 - main - netinet: Fix a common typo in source code comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1dadeab36762c26f92f60bc43b1bf3854aa13d88 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638265339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uWjZaXs+I8qVPronkXIWsxzoo4BAZ4RBUkhmJgX/3q0=; b=LDK9tKp9VqAqbSNtm/mCQijtN75NVq9Qm5StN52YJfH3VhUTVOkXP7z+4W6IvCadT16xc6 p4sJzFBiMok3g6DVMNorsHMucIhPbsEoAYNTgvjCxftXm18/tuMMYX7tQ7ax6+A5IhwXSz mm4lRtHa1pzl/IC+B1MN6n0ssLIgT/u+Z8My0HyV0/TgtHhWAIP4Ry9fPxSLp33XeaGlRc LrRSuDR7/9qJ32M1DeR6sSpbgle9kI0OURT78uJv3n2Hj95cRBtoO7FR6v3zw+mPnDWky/ xbwZqwQ22v2tTKk7fHuHy2yoQaL94+Hi8enqIvWniOac0HJPMqx71flg8qo2eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638265339; a=rsa-sha256; cv=none; b=o3aeGQkxz8cdZR4Rr7VH8b/COxgpB6w4vO3E8iCtUlqlpOTsOY4337zPgGqxUQfESiehRt 8sMySfdRg/9+qEUyXM6SLzaOTWKhDkXoFqXjnoLYl5acNF7mgleYlrcUEtr1JlOafpqCZM ISCDx/O1x0+LkiHY6OEsZo9qyMgM4YLoYAF+NLlkCSdoxCcrRkADGQAWMruIiwDT5/Gujy xI6xMd7gAofDdsOtR70q7Fid5r5nJ70W3n3aLP0bP48r1mqHSh9KZi6C6uKNTVJ4nknyXs GG/wIJm5Gonp8tVXoJA4Jlt1DjeUmp8A2gwoI/sLNTfzK8B3mwjNSi21sObSNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1dadeab36762c26f92f60bc43b1bf3854aa13d88 commit 1dadeab36762c26f92f60bc43b1bf3854aa13d88 Author: Gordon Bergling AuthorDate: 2021-11-30 09:37:20 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 09:37:20 +0000 netinet: Fix a common typo in source code comments - s/segement/segment/ MFC after: 3 days --- sys/netinet/tcp_lro.c | 2 +- sys/netinet/tcp_stacks/bbr.c | 2 +- sys/netinet/tcp_stacks/rack.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index ea23ad75994d..08556009b8c4 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -1030,7 +1030,7 @@ again: } if ((th->th_flags & ~(TH_ACK | TH_PUSH)) != 0) { /* - * Make sure that previously seen segements/ACKs are delivered + * Make sure that previously seen segments/ACKs are delivered * before this segment, e.g. FIN. */ le->m_head->m_nextpkt = m->m_nextpkt; diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 718f4ddc2a56..eb64a28f8565 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -309,7 +309,7 @@ int32_t bbr_sends_full_iwnd = 1; * * To implement BBR and RACK the original TCP stack was first decomposed * into a functional state machine with individual states - * for each of the possible TCP connection states. The do_segement + * for each of the possible TCP connection states. The do_segment * functions role in life is to mandate the connection supports SACK * initially and then assure that the RACK state matches the conenction * state before calling the states do_segment function. Data processing diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 30c8e18f2adb..a17e598f6477 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -173,7 +173,7 @@ struct sysctl_oid *rack_sysctl_root; * * To implement RACK the original TCP stack was first decomposed * into a functional state machine with individual states - * for each of the possible TCP connection states. The do_segement + * for each of the possible TCP connection states. The do_segment * functions role in life is to mandate the connection supports SACK * initially and then assure that the RACK state matches the conenction * state before calling the states do_segment function. Each From nobody Tue Nov 30 09:42:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 45CD618C0EBF; Tue, 30 Nov 2021 09:42:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3HLj1zRmz4qR2; Tue, 30 Nov 2021 09:42:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F321F13FE6; Tue, 30 Nov 2021 09:42: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 1AU9gJ9x006780; Tue, 30 Nov 2021 09:42:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU9gJoI006779; Tue, 30 Nov 2021 09:42:19 GMT (envelope-from git) Date: Tue, 30 Nov 2021 09:42:19 GMT Message-Id: <202111300942.1AU9gJoI006779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: c8ca80e22381 - main - elf(3): Fix a typo in a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8ca80e22381e68f7cc23e8822f3ef5e6a68c3c0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638265341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kygFJfX7jR+RM2luc5ovtBt2ImVWc/J7/aWau+HlKH8=; b=LU8nlu2qHGv4hwCp4fvXnczZPLBVsoOz8m5xm2vanafExAnJ0teULl4FhMRBZk44VVtCVk hxpfcOcvV/KuLXYvBZTB1uJdk5fJ2KUvuvbUj9Vt1g8Pcnla6vG236SiUkB6wFIEKufZR5 tiiyuMHlHgRbFj3Xkd2XipI242Fow/kNuk/TY3LqBKQY3f6yZROYRrE2ZeusutmjnYtcAX R+Ky49QfMPWjVwhTjcoOpP2MGCdk0sb7Bhnw4t165SZuDV+YTvYe432Q+6ueZnyNKUGxYg VTRUOY3XQw8DHD1p+5SVXindyi3VtUrqfRFjnwYUZsdtm8138Ru+7bbDF1mEng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638265341; a=rsa-sha256; cv=none; b=kXu8bMuSPZR36lMVBf/BI4M8o+OWwrpMhRTnmkYF+coLwzfWLayZN5nC+4KviBK64ed16c mA20AAgpTdwOopyrUx8PF7T8j+OSY3WsBsoZclr4QDCWpHmbNOJNXu7YISPdOtnKvapVU2 Z15/m/As7nwwbsidJKClMUXBJwmDMPaGNgyq85dYxo+3vSV8iqHXI/ppSiMbdhLnfnRLKW hZqiDQ4j4jlTO3z1xAVDpPwK34wDSAGwd9avqpP8dTTB7CHOFjmBtCMEkAh2uy+wehJZIU JDW858zRLKh7EBCyABXRxyvREU4M4xt9XRtzsyJDt1SrEUJ7hZMNtZKI8p9Dbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c8ca80e22381e68f7cc23e8822f3ef5e6a68c3c0 commit c8ca80e22381e68f7cc23e8822f3ef5e6a68c3c0 Author: Gordon Bergling AuthorDate: 2021-11-30 09:38:34 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 09:38:34 +0000 elf(3): Fix a typo in a sysctl description - s/segement/segment/ MFC after: 3 days --- usr.bin/gcore/elfcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/gcore/elfcore.c b/usr.bin/gcore/elfcore.c index d936aa023e79..9c5be76cfd7c 100644 --- a/usr.bin/gcore/elfcore.c +++ b/usr.bin/gcore/elfcore.c @@ -516,7 +516,7 @@ elf_puthdr(int efd, pid_t pid, struct map_entry *map, void *hdr, size_t hdrsize, */ phdr = (Elf_Phdr *)((char *)hdr + ehdr->e_phoff); - /* The note segement. */ + /* The note segment. */ phdr->p_type = PT_NOTE; phdr->p_offset = hdrsize; phdr->p_vaddr = 0; From nobody Tue Nov 30 09:42:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 821BF18C0C68; Tue, 30 Nov 2021 09:42:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3HLj5DFBz4qJt; Tue, 30 Nov 2021 09:42:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2309313DDF; Tue, 30 Nov 2021 09:42: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 1AU9gLbh006811; Tue, 30 Nov 2021 09:42:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU9gKBI006810; Tue, 30 Nov 2021 09:42:21 GMT (envelope-from git) Date: Tue, 30 Nov 2021 09:42:21 GMT Message-Id: <202111300942.1AU9gKBI006810@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: e3080a9cca1b - main - xen(4): Fix two typos in source code comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3080a9cca1b94ded20b42b653b97e49306d94d2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638265341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OJbNeMJYqJzcMCk+wubpKUk45373QY7jr1+zLavCeVM=; b=lQn3lcfajJnI3SSwg9Hb3K2AMSepd/HjDsPm0l5+wFdAoPrHfWBIuvaXCH9VqTMIi9x76j /oADQKDOoV/L6nYPCDrdF8A6HmW7kAXCHqe7ZdZtl85rv1uBfXyQM79tFJ5JcaLisIYl0o IcBi3aG3bwYFZbqWApLewO4QYhkkcQwYKEQn3DMlyuJp+AH2qasJ3MthpUS43/RnyV+Uu0 IylGdNAh/TUtXQZmZw9Ply0UZQq672BAad6hCAXr3HcgZk9xzzgPdScN4LdXVQH5od7D0H Ap1MOjrue9x8Vd+Lv5r3Ev/JYl0Mo8pwnGCf6vDPiPZxl2luB2b3W1MOUzGLiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638265341; a=rsa-sha256; cv=none; b=Q7Gwyf2aqMUzP637eWOiIoKTYSI1PcMuqi4zWzt9xQo0x2MAbdBvag+OITDTeatMiBqugH t3on+UsLD7GaAeVmjCE2GcjT3FQa40g+snOMLFjArODi8Qdm+mBSvNMYQm17L7wrKGf1B8 DNzPZfK9dsYkJkP1yw3zKpc19TcC9BLsz7G9uvj1LGB2wvC38Zr8rvjx6+USw+5Jg4dnCe ldqpPyQV5teLYdn27k2F7hKtIajyrMXJqSleNfP3vpL5JjK1eDLzQNVO0/8cJgvaUgKG9K ddlfgbyBZnvpdfV0xIJ4Ym2KbCfXFf38pta6O8/2Wj1L2ogwKxj68zUIDRRXiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e3080a9cca1b94ded20b42b653b97e49306d94d2 commit e3080a9cca1b94ded20b42b653b97e49306d94d2 Author: Gordon Bergling AuthorDate: 2021-11-30 09:39:42 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 09:39:42 +0000 xen(4): Fix two typos in source code comments - s/segement/segment/ MFC after: 3 days --- sys/dev/xen/blkfront/block.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/xen/blkfront/block.h b/sys/dev/xen/blkfront/block.h index b48139659b51..5ec43ff71bc8 100644 --- a/sys/dev/xen/blkfront/block.h +++ b/sys/dev/xen/blkfront/block.h @@ -40,7 +40,7 @@ * \note This calculation assumes that all but the first and last segments * of the I/O are fully utilized. * - * \note We reserve a segement from the maximum supported by the transport to + * \note We reserve a segment from the maximum supported by the transport to * guarantee we can handle an unaligned transfer without the need to * use a bounce buffer. */ @@ -54,7 +54,7 @@ * \note This calculation assumes that all but the first and last segments * of the I/O are fully utilized. * - * \note We reserve a segement to guarantee we can handle an unaligned + * \note We reserve a segment to guarantee we can handle an unaligned * transfer without the need to use a bounce buffer. */ #define XBD_SIZE_TO_SEGS(size) \ From nobody Tue Nov 30 09:42:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 589F118C100D; Tue, 30 Nov 2021 09:42: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 4J3HLk45PXz4q9Y; Tue, 30 Nov 2021 09:42:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D8B813C71; Tue, 30 Nov 2021 09:42: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 1AU9gMIM006835; Tue, 30 Nov 2021 09:42:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU9gMMX006834; Tue, 30 Nov 2021 09:42:22 GMT (envelope-from git) Date: Tue, 30 Nov 2021 09:42:22 GMT Message-Id: <202111300942.1AU9gMMX006834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: ddeb702f7b29 - main - mpr(4): Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddeb702f7b29d967f86ae705b5604c4fa81bb908 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638265343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0FaVZaPDdLlBS0u4h/yUbRNNy42qZaqTMTLPqNAA2O4=; b=ks61MvcfLv4/yQpSpIf/1r/ixYtGUZax2P0INej6HoYiGqQ7RyKu4uv1IQqA/Uglm3iFwk WQnqkuGwXA5JHA5cumAYJ00qznAYayavzwsdvjkYPAErm5D4pXKgJBU9kxB0t86fEfgkfI u6NF040i1K2HQwXIEhzsbKs/g/YaAubQXqqbFS+4g4bSNvlwSEMt/v7ONqjTs+MC7k8cW3 kKzjl3TODlj4BM4TadpBgyiL6Eg3dL1Xq9XjulSlZWtwBsGjotp8wAKRmTa97ymra87mx5 K+Xxh5DfeqsyHHgHaDDjn3sQyTP2HAV/Y2KYngSO8tQlantJNCzLVURaljWC9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638265343; a=rsa-sha256; cv=none; b=ABURIkTLxBjlBz6vp3qbYQPCfFVmN5j8C6Rrx7uBGw0Nq24h+Qjld2cvuIybEyotoOZ7wA N7UcxDG4ti7q3IhnpM/OANjlmovDIaRLcA69rPQ7OkeEcrtRmCEziqZ3gMZACiMTJwft50 Kyy/+8+37uMlcFg0mPGoGCjjHAalfboZODjyKvEXzG2IFSaqlYaCx4lumJp+AyFUNMFX78 0Fg8olBZhmwYYUIsZxvHmmzIgb5g3hh4tbskSIipu7kJ5GZKPT0BRmhkOadMHkfWraabeV ULCercuoF7EuAFototVmyt1Dhx/HnoonCzwqVkPHrmjuzAKZJqzgULlKjO2niQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ddeb702f7b29d967f86ae705b5604c4fa81bb908 commit ddeb702f7b29d967f86ae705b5604c4fa81bb908 Author: Gordon Bergling AuthorDate: 2021-11-30 09:40:50 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 09:40:50 +0000 mpr(4): Fix a typo in a source code comment - s/segement/segment/ MFC after: 3 days --- sys/dev/mpr/mpr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 796f74c2547b..3de4b1050fa7 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -3402,7 +3402,7 @@ mpr_add_chain(struct mpr_command *cm, int segsleft) rem_segs = 0; if (cm->cm_sglsize < (sgc_size * segsleft)) { /* - * rem_segs is the number of segements remaining after the + * rem_segs is the number of segment remaining after the * segments that will go into the current frame. Since it is * known that at least one more frame is required, account for * the chain element. To know if more than one more frame is From nobody Tue Nov 30 09:42:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3FC6318C1024; Tue, 30 Nov 2021 09:42:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3HLl6tnqz4qct; Tue, 30 Nov 2021 09:42:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6246513DE1; Tue, 30 Nov 2021 09:42: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 1AU9gNMw006859; Tue, 30 Nov 2021 09:42:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU9gN6D006858; Tue, 30 Nov 2021 09:42:23 GMT (envelope-from git) Date: Tue, 30 Nov 2021 09:42:23 GMT Message-Id: <202111300942.1AU9gN6D006858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 1b0602f2db94 - main - mips: Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b0602f2db94a4789da33302fbadfe5a57454277 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638265344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9Y6aARXiLD2AtF1PdbGTGflncm15AQy5J/bGv0VNbI=; b=pfDrGkJrMsdAD280vRc/QFOH27qBQZYn7RvnzALYSYpIfl2RNwfPVUVtMVSp7aOM1H1ZqV 6loksVzV7Ds735PMookUgHDQJlyaBOTjaK9sU0llooWa1XVq9Bzhi+Fw7HF3hzbSWm21sq 8F1B5YQs3eYw/CHuWVx4DVT4A4nmVX8ESpgoaCb0iF7vrPgXxWZfxh6EFceTbQqZGtqadP /ikBPu8Bvncu5DuQDGrQXU0eYn+dFdJEFfC3I8zAPVC9UJxW9sLgRoBeD+wEo222FjmNb8 fb18z0Gc3KRfUoMp+eRBuEGdZP33KmSiIqn+AeJ0I6q1zlsoHLPWSn3ck/ySEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638265344; a=rsa-sha256; cv=none; b=kfy8DkafuHKlOzNXumL/af+sfeBC9ecn3FWgFppcYYoK/3drx9xvODHFEo0YDD2mRZSpGZ nmM0Pwzg+LJ+3taThdExrBYlYf9Rh57DsNM6NmkClZe3kJVCqlBURlZ89VjXWwXVMmzbkA +Ln1TIJ74v/iZ1TIF9+3tsknqLrc1pkToYsDRafflizcO29nfBnVMgC98d8CmUeltWcRCc RXt+FUFFAB0pkk8gcbk1pg80lNHDDEffMd4UYQ7bD5cF8oLivdwoVCLIMZf4ZCbx4KOKkd tX7ekfeUcDDzW+GHf3/xIBIcXVG328U15egU/QgZcApMh7jRmmsK9mFUAV7ChA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1b0602f2db94a4789da33302fbadfe5a57454277 commit 1b0602f2db94a4789da33302fbadfe5a57454277 Author: Gordon Bergling AuthorDate: 2021-11-30 09:41:46 +0000 Commit: Gordon Bergling CommitDate: 2021-11-30 09:41:46 +0000 mips: Fix a typo in a source code comment - s/segement/segment/ MFC after: 3 days --- sys/mips/mips/elf_trampoline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/mips/mips/elf_trampoline.c b/sys/mips/mips/elf_trampoline.c index 0794de6713d3..dafd24bd4d25 100644 --- a/sys/mips/mips/elf_trampoline.c +++ b/sys/mips/mips/elf_trampoline.c @@ -98,7 +98,7 @@ bzero(void *addr, size_t count) #define mkptr(x) ((void *)(intptr_t)(int)(x)) /* - * Relocate PT_LOAD segements of kernel ELF image to their respective + * Relocate PT_LOAD segments of kernel ELF image to their respective * virtual addresses and return entry point */ void * From nobody Tue Nov 30 10:32:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1CFAA18B1B5D; Tue, 30 Nov 2021 10:32: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 4J3JSn5QcYz3PKG; Tue, 30 Nov 2021 10:32:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9793514D96; Tue, 30 Nov 2021 10:32: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 1AUAWfqL073107; Tue, 30 Nov 2021 10:32:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUAWfal073106; Tue, 30 Nov 2021 10:32:41 GMT (envelope-from git) Date: Tue, 30 Nov 2021 10:32:41 GMT Message-Id: <202111301032.1AUAWfal073106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: d11e9de955ea - stable/13 - Hyper-V: vPCI: Prepopulate device bars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d11e9de955ea01fe01dce58c7eb090fe0352bced Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638268361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=juo8mqk6YsVgLmtI7I+t2FwamdscCRpki2Ol/WgzeG0=; b=kiAPWMCjSIzcs31yrz7VGXuaez/awppmVrBa2i5z1teMx3Qb4myDsI/XkzXQS5l1d70Z7B BZYWgjWIyBAvRhGdQJeVzEWXhU1+WK4BBKypu7F6yL9/XutLRPni0ENRzcOJDaL4PHuRFV ZuuVMmRUQoV4AjEFhREFAATc0xVBECguXceifwZQMw8FU3VWoxsx5Lbzky6835HsV+583v 3ton82s6M79Nv55mWCuE/1VpGq0FJ7n8IKsb5RDUlRVlfhhDOiipo/Y1XwzxgFmjeAcumV p4Fv6VT2S9eu8Heh8ETlZ82iSOpbobEENxrKcdmYTbnO7tplQE3EQaLtgxnGTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638268361; a=rsa-sha256; cv=none; b=WqyKTnvv+i5EIeYBRMYk/Son+8VXdxZ0brtK+8xg/Uz/DL5m/RPSMh+jfu83Y6UeJBZ8wH 60ZgR+BGqWOxGnMeqG/lf20ltheyMU+347DYX/o0tBmqCcl9vO/VapH7bCZK4BEOhYeCmZ 5m8k2Ab09TNIfh5AxJtVx5x7lUjZTv7OkoOWBlbTRBmz9rj4Lv1Vgx2H1orwxnqnKE/Zrv fRPi8ATWRmcy+A+qZzcma6tDF8gfy3cBq1nbOowfQTVU7gbxpsssHa3bV88i5aEAMtzawB L01CF1q3GBB1Jyy6UlpneOS7EQB57aTqfPsvNJWTFbz03EB+6NYhtbFulgu93w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=d11e9de955ea01fe01dce58c7eb090fe0352bced commit d11e9de955ea01fe01dce58c7eb090fe0352bced Author: Wei Hu AuthorDate: 2021-11-27 06:42:34 +0000 Commit: Wei Hu CommitDate: 2021-11-30 07:43:32 +0000 Hyper-V: vPCI: Prepopulate device bars In recent Hyper-V releases on Windows Server 2022, vPCI code does not initialize the last 4 bit of device bar registers. This behavior change could result weird problems cuasing PCI code failure when configuring bars. Just write all 1's to those bars whose probed values are not the same as current read ones. This seems to make Hyper-V vPCI and pci_write_bar() to cooperate correctly on these releases. Reported by: khng@freebsd.org Tested by: khng@freebsd.org MFC after: 2 weeks Sponsored by: Microsoft (cherry picked from commit 75412a521f60d4b0393c730ffb284e7c6ff9d2de) --- sys/dev/hyperv/pcib/vmbus_pcib.c | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index 72e430c946db..c7df32044678 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -1356,6 +1356,47 @@ _hv_pcifront_write_config(struct hv_pci_dev *hpdev, int where, int size, } } +/* + * The vPCI in some Hyper-V releases do not initialize the last 4 + * bit of BAR registers. This could result weird problems causing PCI + * code fail to configure BAR correctly. + * + * Just write all 1's to those BARs whose probed values are not zero. + * This seems to make the Hyper-V vPCI and pci_write_bar() to cooperate + * correctly. + */ + +static void +vmbus_pcib_prepopulate_bars(struct hv_pcibus *hbus) +{ + struct hv_pci_dev *hpdev; + int i; + + mtx_lock(&hbus->device_list_lock); + TAILQ_FOREACH(hpdev, &hbus->children, link) { + for (i = 0; i < 6; i++) { + /* Ignore empty bar */ + if (hpdev->probed_bar[i] == 0) + continue; + + uint32_t bar_val = 0; + + _hv_pcifront_read_config(hpdev, PCIR_BAR(i), + 4, &bar_val); + + if (hpdev->probed_bar[i] != bar_val) { + if (bootverbose) + printf("vmbus_pcib: initialize bar %d " + "by writing all 1s\n", i); + + _hv_pcifront_write_config(hpdev, PCIR_BAR(i), + 4, 0xffffffff); + } + } + } + mtx_unlock(&hbus->device_list_lock); +} + static void vmbus_pcib_set_detaching(void *arg, int pending __unused) { @@ -1479,6 +1520,8 @@ vmbus_pcib_attach(device_t dev) if (ret) goto vmbus_close; + vmbus_pcib_prepopulate_bars(hbus); + hbus->pci_bus = device_add_child(dev, "pci", -1); if (!hbus->pci_bus) { device_printf(dev, "failed to create pci bus\n"); From nobody Tue Nov 30 10:36:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3E15E18B468F; Tue, 30 Nov 2021 10:36:48 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mail.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 4J3JYW4Dhkz3QnX; Tue, 30 Nov 2021 10:36:47 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1638268599; 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=WnHzSwvS7vgNngK+j8T207hVByxcWKAsBOaYaEEVHno=; b=AlfAvfGeQUtGY8w3EPM9udLpXfNS0zNSJxiUYwwLbrpTBM/RUkPDxhUOMKrccDJ7qQtAcT ZHytAxXb7zLM6rSfoQDNgveEnUNbjT5P33UhMTF5lNE+3b2HFQWMI6DNYr0N4Yj3bIka82 SUC+SosqbutpeK5YzwW7efO8Ly8lSpU= Received: from skull.home.blih.net (lfbn-idf2-1-1163-183.w90-92.abo.wanadoo.fr [90.92.222.183]) by mx.blih.net (OpenSMTPD) with ESMTPSA id a6bcb01f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 30 Nov 2021 10:36:39 +0000 (UTC) Date: Tue, 30 Nov 2021 11:36:36 +0100 From: Emmanuel Vadot To: Wei Hu Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: d11e9de955ea - stable/13 - Hyper-V: vPCI: Prepopulate device bars Message-Id: <20211130113636.5b2d51dca869da19b32e47b7@bidouilliste.com> In-Reply-To: <202111301032.1AUAWfal073106@gitrepo.freebsd.org> References: <202111301032.1AUAWfal073106@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-Rspamd-Queue-Id: 4J3JYW4Dhkz3QnX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Tue, 30 Nov 2021 10:32:41 GMT Wei Hu wrote: > The branch stable/13 has been updated by whu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d11e9de955ea01fe01dce58c7eb090fe0352bced > > commit d11e9de955ea01fe01dce58c7eb090fe0352bced > Author: Wei Hu > AuthorDate: 2021-11-27 06:42:34 +0000 > Commit: Wei Hu > CommitDate: 2021-11-30 07:43:32 +0000 > > Hyper-V: vPCI: Prepopulate device bars > > In recent Hyper-V releases on Windows Server 2022, vPCI code does not > initialize the last 4 bit of device bar registers. This behavior change > could result weird problems cuasing PCI code failure when configuring > bars. > > Just write all 1's to those bars whose probed values are not the same > as current read ones. This seems to make Hyper-V vPCI and > pci_write_bar() to cooperate correctly on these releases. > > Reported by: khng@freebsd.org > Tested by: khng@freebsd.org > MFC after: 2 weeks Looks more 3 days to me. Also kib@ asked you a question for this commit, it would be more polite to answer him instead of mfc this 3 days after. Cheers, > Sponsored by: Microsoft > > (cherry picked from commit 75412a521f60d4b0393c730ffb284e7c6ff9d2de) > --- > sys/dev/hyperv/pcib/vmbus_pcib.c | 43 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 43 insertions(+) > > diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c > index 72e430c946db..c7df32044678 100644 > --- a/sys/dev/hyperv/pcib/vmbus_pcib.c > +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c > @@ -1356,6 +1356,47 @@ _hv_pcifront_write_config(struct hv_pci_dev *hpdev, int where, int size, > } > } > > +/* > + * The vPCI in some Hyper-V releases do not initialize the last 4 > + * bit of BAR registers. This could result weird problems causing PCI > + * code fail to configure BAR correctly. > + * > + * Just write all 1's to those BARs whose probed values are not zero. > + * This seems to make the Hyper-V vPCI and pci_write_bar() to cooperate > + * correctly. > + */ > + > +static void > +vmbus_pcib_prepopulate_bars(struct hv_pcibus *hbus) > +{ > + struct hv_pci_dev *hpdev; > + int i; > + > + mtx_lock(&hbus->device_list_lock); > + TAILQ_FOREACH(hpdev, &hbus->children, link) { > + for (i = 0; i < 6; i++) { > + /* Ignore empty bar */ > + if (hpdev->probed_bar[i] == 0) > + continue; > + > + uint32_t bar_val = 0; > + > + _hv_pcifront_read_config(hpdev, PCIR_BAR(i), > + 4, &bar_val); > + > + if (hpdev->probed_bar[i] != bar_val) { > + if (bootverbose) > + printf("vmbus_pcib: initialize bar %d " > + "by writing all 1s\n", i); > + > + _hv_pcifront_write_config(hpdev, PCIR_BAR(i), > + 4, 0xffffffff); > + } > + } > + } > + mtx_unlock(&hbus->device_list_lock); > +} > + > static void > vmbus_pcib_set_detaching(void *arg, int pending __unused) > { > @@ -1479,6 +1520,8 @@ vmbus_pcib_attach(device_t dev) > if (ret) > goto vmbus_close; > > + vmbus_pcib_prepopulate_bars(hbus); > + > hbus->pci_bus = device_add_child(dev, "pci", -1); > if (!hbus->pci_bus) { > device_printf(dev, "failed to create pci bus\n"); -- Emmanuel Vadot From nobody Tue Nov 30 13:30:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BBFAF18A811E for ; Tue, 30 Nov 2021 13:30:51 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3NQM1VsMz3psS for ; Tue, 30 Nov 2021 13:30:51 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f41.google.com with SMTP id p3-20020a05600c1d8300b003334fab53afso19527862wms.3 for ; Tue, 30 Nov 2021 05:30:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Vrs3UU+puIu7RYtm2wNo5vR+q0jtPuQBdozZ+R4FvRc=; b=Fxu9FXhaFBatnligcNEGO9fNfE0wqkmPvEGL9/u+olymicXy0RvpNC1bN6058DbcsU QLeJN5OH7ijtCF0mRsefqGvRHVyHHo4YSkL8juJmGZ9+gssbfsHzlL3vtOGdWQbXx1xt xgjlUZ4KV1NgRrQwD36JgTQfCEVw5BLTySDkaZazs2+gjNjhKaKiiKPKaPXVYDUeozMj zZ/Gnl1bITFWSy+jvyzH4ezD146JFziyUDbhiADkLpZI44Qj5RUVYxt0PWbCHX6v9YOO Ps8pF6guXWuZA2arAE8i5vWOU+20YEemVJxQqpRBNiJ6+Wl0ZawnQVVPc4UhJsjDiU9M gNkQ== X-Gm-Message-State: AOAM533aSwlFEoDo3UAvz+vtqceCAU2sDKhwqMOO1/NWRCkX3zC3ALwb KSRrbZIrOiFSIqUXW+hXZPFb9A== X-Google-Smtp-Source: ABdhPJx/79ZFhfKMd0q5XwGi8909WNUHMDxcYMypno/Xbb03PE0OOvUoVJNtL6TzEAZJIuyKmSRHCw== X-Received: by 2002:a05:600c:19cc:: with SMTP id u12mr5116937wmq.24.1638279043360; Tue, 30 Nov 2021 05:30:43 -0800 (PST) Received: from smtpclient.apple (global-5-141.nat-2.net.cam.ac.uk. [131.111.5.141]) by smtp.gmail.com with ESMTPSA id q8sm16277783wrx.71.2021.11.30.05.30.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Nov 2021 05:30:43 -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 14.0 \(3654.120.0.1.13\)) Subject: Re: git: ae92ace05fd4 - main - Per-thread stack canary on arm64 From: Jessica Clarke In-Reply-To: <202111261451.1AQEpJ7Y040922@gitrepo.freebsd.org> Date: Tue, 30 Nov 2021 13:30:40 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202111261451.1AQEpJ7Y040922@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4J3NQM1VsMz3psS X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.41 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-0.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(1.00)[0.999]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.41:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.41:from]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 26 Nov 2021, at 14:51, Andrew Turner wrote: >=20 > The branch main has been updated by andrew: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dae92ace05fd4fcf64e3bb787951578f6= 55b1fa5f >=20 > commit ae92ace05fd4fcf64e3bb787951578f655b1fa5f > Author: Andrew Turner > AuthorDate: 2021-11-22 15:20:51 +0000 > Commit: Andrew Turner > CommitDate: 2021-11-26 14:44:00 +0000 >=20 > Per-thread stack canary on arm64 >=20 > With the update to llvm 13 we are able to tell the compiler it can = find > the SSP canary relative to the register that holds the userspace = stack > pointer. As this is unused in most of the kernel it can be used = here > to point to a per-thread SSP canary. >=20 > As the kernel could be built with an old toolchain, e.g. when = upgrading > from 13, add a warning that the options was enabled but the = compiler > doesn't support it to both the build and kernel boot. >=20 > Discussed with: emaste > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D33079 > --- > sys/arm64/arm64/exception.S | 7 +++++++ > sys/arm64/arm64/genassym.c | 1 + > sys/arm64/arm64/locore.S | 14 ++++++++++++++ > sys/arm64/arm64/machdep.c | 22 ++++++++++++++++++++++ > sys/arm64/arm64/pmap.c | 4 ++++ > sys/arm64/arm64/vm_machdep.c | 10 ++++++++++ > sys/arm64/conf/std.arm64 | 1 + > sys/arm64/include/proc.h | 1 + > sys/conf/Makefile.arm64 | 14 ++++++++++++++ > sys/conf/options.arm64 | 4 ++++ > 10 files changed, 78 insertions(+) >=20 > diff --git a/sys/arm64/arm64/exception.S b/sys/arm64/arm64/exception.S > index 22f6b7ce6145..d81bbce0efc7 100644 > --- a/sys/arm64/arm64/exception.S > +++ b/sys/arm64/arm64/exception.S > @@ -66,6 +66,13 @@ __FBSDID("$FreeBSD$"); > mrs x18, tpidr_el1 > add x29, sp, #(TF_SIZE) > .if \el =3D=3D 0 > +#if defined(PERTHREAD_SSP) > + /* Load the SSP canary to sp_el0 */ > + ldr x1, [x18, #(PC_CURTHREAD)] > + add x1, x1, #(TD_MD_CANARY) > + msr sp_el0, x1 > +#endif > + > /* Apply the SSBD (CVE-2018-3639) workaround if needed */ > ldr x1, [x18, #PC_SSBD] > cbz x1, 1f > diff --git a/sys/arm64/arm64/genassym.c b/sys/arm64/arm64/genassym.c > index 1575a0158dec..8e3ddc48317b 100644 > --- a/sys/arm64/arm64/genassym.c > +++ b/sys/arm64/arm64/genassym.c > @@ -73,6 +73,7 @@ ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); > ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); > ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); > ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); > +ASSYM(TD_MD_CANARY, offsetof(struct thread, td_md.md_canary)); >=20 > ASSYM(TF_SIZE, sizeof(struct trapframe)); > ASSYM(TF_SP, offsetof(struct trapframe, tf_sp)); > diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S > index 92415aab1555..bc9a7271e93a 100644 > --- a/sys/arm64/arm64/locore.S > +++ b/sys/arm64/arm64/locore.S > @@ -116,6 +116,13 @@ virtdone: > cmp x15, x14 > b.lo 1b >=20 > +#if defined(PERTHREAD_SSP) > + /* Set sp_el0 to the boot canary for early per-thread SSP to = work */ > + adrp x15, boot_canary > + add x15, x15, :lo12:boot_canary > + msr sp_el0, x15 > +#endif > + > /* Backup the module pointer */ > mov x1, x0 >=20 > @@ -200,6 +207,13 @@ mp_virtdone: > ldr x4, [x4] > mov sp, x4 >=20 > +#if defined(PERTHREAD_SSP) > + /* Set sp_el0 to the boot canary for early per-thread SSP to = work */ > + adrp x15, boot_canary > + add x15, x15, :lo12:boot_canary > + msr sp_el0, x15 > +#endif > + > /* Load the kernel ttbr0 pagetable */ > msr ttbr0_el1, x27 > isb > diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c > index 59a634f4d30c..821d9ba19022 100644 > --- a/sys/arm64/arm64/machdep.c > +++ b/sys/arm64/arm64/machdep.c > @@ -109,6 +109,14 @@ enum arm64_bus arm64_bus_method =3D = ARM64_BUS_NONE; > */ > struct pcpu pcpu0; >=20 > +#if defined(PERTHREAD_SSP) > +/* > + * The boot SSP canary. Will be replaced with a per-thread canary = when > + * scheduling has started. > + */ > +uintptr_t boot_canary =3D 0x49a2d892bc05a0b1ul; Is it *really* a pointer? That sure looks like it=E2=80=99s really a = size_t or unsigned long. I doubt you=E2=80=99d want a capability on CHERI (well, = you=E2=80=99d turn the feature off because it=E2=80=99s a waste of time there, but = still). Jess From nobody Tue Nov 30 13:34:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A2E8918A893C; Tue, 30 Nov 2021 13:34: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 4J3NVM2yXxz3qkY; Tue, 30 Nov 2021 13:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 459A8172AE; Tue, 30 Nov 2021 13:34: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 1AUDYJqV014079; Tue, 30 Nov 2021 13:34:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUDYJEU014078; Tue, 30 Nov 2021 13:34:19 GMT (envelope-from git) Date: Tue, 30 Nov 2021 13:34:19 GMT Message-Id: <202111301334.1AUDYJEU014078@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 3d9d64aa1846 - main - kern_tc: unify timecounter to bintime delta 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: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d9d64aa1846217eac9229f8cba5cb6646a688b7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638279259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yOSP+9nsFJrMRNvRA/rt5Nt7HGwZFkdAUkw23zBCQgA=; b=UaBTbroxs6SzLaxhnsPX+3phwgX+e3v46t/S0Q4CMIv7A95edQXyJrTPdHy1xEw4AlQBK8 VN03Ca31QiBO6CXMICU4tC0ZlN2+sL1m6Nk21afiJyKBcbW3GKij2RKrTTqzpv+sl/IBIr +/V1OLervA1ZiEM0fORMOYWiWwHU2YMNRVpa6rYXEP7rpxVzWJbf+Huf7GNlVJysNHZSt8 eRkuldqNSU7t6E9AzC5NT5JNGIN3UNIOfRmcUfH9DFUkA1IsX1L9Vr6cWrbETySrPA/ZHG LsRJf6ALCc+DkH4NiT3kVmqzW5q5ct69i7LCw2HuhFbwFm3t6gmrVRiFfpo0aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638279259; a=rsa-sha256; cv=none; b=kNbtzcKUvTtS6+gsC+O1352LtEc02apMwtDEl4wdqSDFcHfZnNE+Kk5p47Xd8drAOiRIg6 GxDM0dXH4UiD2eRs/EPIHS21mpTGYBo7VjYHWGyGrCV+dywVvtcy4Nyg5qSqwi0YWAKnke IC0CItUKJ/SmiN6RjZvnVPqkOz9w9908Yv9MVuw7/Qt5fknNlGHecoM72548QpgmlmjB4c +sPOhENNvsIUZXKv2slKZRAiXQ87OCemloZaA0E2jjf+KXbZaOaGwZBLTVAI7sHupxfOAd rSG6Ba05rz4ne/W1UtdFd3jlq4kStP/o780ruspZmJHD0t7WaVby8lE86Pt0rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=3d9d64aa1846217eac9229f8cba5cb6646a688b7 commit 3d9d64aa1846217eac9229f8cba5cb6646a688b7 Author: Andriy Gapon AuthorDate: 2021-11-30 13:23:23 +0000 Commit: Andriy Gapon CommitDate: 2021-11-30 13:23:23 +0000 kern_tc: unify timecounter to bintime delta conversion There are two places where we convert from a timecounter delta to a bintime delta: tc_windup and bintime_off. Both functions use the same calculations when the timecounter delta is small. But for a large delta (greater than approximately an equivalent of 1 second) the calculations were different. Both functions use approximate calculations based on th_scale that avoid division. Both produce values slightly greater than a true value, calculated with division by tc_frequency, would be. tc_windup is slightly more accurate, so its result is closer to the true value and, thus, smaller than bintime_off result. As a consequence there can be a jump back in time when time hands are switched after a long period of time (a large delta). Just before the switch the time would be calculated with a large delta from th_offset_count in bintime_off. tc_windup does the switch using its own calculations of a new th_offset using the large delta. As explained earlier, the new th_offset may end up being less than the previously produced binuptime. So, for a period of time new binuptime values may be "back in time" comparing to values just before the switch. Such a jump must never happen. All the code assumes that the uptime is monotonically nondecreasing and some code works incorrectly when that assumption is broken. For example, we have observed sleepq_timeout() ignoring a timeout when the sbinuptime value obtained by the callout code was greater than the expiration value, but the sbinuptime obtained in sleepq_timeout() was less than it. In that case the target thread would never get woken up. The unified calculations should ensure the monotonic property of the uptime. The problem is quite rare as normally tc_windup should be called HZ times per second (typically 1000 or 100). But it may happen in VMs on very busy hypervisors where a VM's virtual CPU may not get an execution time slot for a second or more. Reviewed by: kib MFC after: 2 weeks Sponsored by: Panzura LLC --- sys/kern/kern_tc.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index f041c5f547e0..01b4e8656090 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -213,6 +213,23 @@ tc_delta(struct timehands *th) tc->tc_counter_mask); } +static __inline void +bintime_add_tc_delta(struct bintime *bt, uint64_t scale, + uint64_t large_delta, uint64_t delta) +{ + uint64_t x; + + if (__predict_false(delta >= large_delta)) { + /* Avoid overflow for scale * delta. */ + x = (scale >> 32) * delta; + bt->sec += x >> 32; + bintime_addx(bt, x << 32); + bintime_addx(bt, (scale & 0xffffffff) * delta); + } else { + bintime_addx(bt, scale * delta); + } +} + /* * Functions for reading the time. We have to loop until we are sure that * the timehands that we operated on was not updated under our feet. See @@ -224,7 +241,7 @@ bintime_off(struct bintime *bt, u_int off) { struct timehands *th; struct bintime *btp; - uint64_t scale, x; + uint64_t scale; u_int delta, gen, large_delta; do { @@ -238,15 +255,7 @@ bintime_off(struct bintime *bt, u_int off) atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); - if (__predict_false(delta >= large_delta)) { - /* Avoid overflow for scale * delta. */ - x = (scale >> 32) * delta; - bt->sec += x >> 32; - bintime_addx(bt, x << 32); - bintime_addx(bt, (scale & 0xffffffff) * delta); - } else { - bintime_addx(bt, scale * delta); - } + bintime_add_tc_delta(bt, scale, large_delta, delta); } #define GETTHBINTIME(dst, member) \ do { \ @@ -1392,17 +1401,8 @@ tc_windup(struct bintime *new_boottimebin) #endif th->th_offset_count += delta; th->th_offset_count &= th->th_counter->tc_counter_mask; - while (delta > th->th_counter->tc_frequency) { - /* Eat complete unadjusted seconds. */ - delta -= th->th_counter->tc_frequency; - th->th_offset.sec++; - } - if ((delta > th->th_counter->tc_frequency / 2) && - (th->th_scale * delta < ((uint64_t)1 << 63))) { - /* The product th_scale * delta just barely overflows. */ - th->th_offset.sec++; - } - bintime_addx(&th->th_offset, th->th_scale * delta); + bintime_add_tc_delta(&th->th_offset, th->th_scale, + th->th_large_delta, delta); /* * Hardware latching timecounters may not generate interrupts on From nobody Tue Nov 30 14:23:16 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 63E2818C428C; Tue, 30 Nov 2021 14:23:48 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 4J3PbS1bfwz4hgs; Tue, 30 Nov 2021 14:23:48 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from [192.168.42.21] (cpc91232-cmbg18-2-0-cust554.5-4.cable.virginm.net [82.2.126.43]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 470994E659; Tue, 30 Nov 2021 14:23:17 +0000 (UTC) From: Andrew Turner Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_CD84F761-7372-4DCD-A649-4391169FF8E4" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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 12.4 \(3445.104.21\)) Subject: Re: git: ae92ace05fd4 - main - Per-thread stack canary on arm64 Date: Tue, 30 Nov 2021 14:23:16 +0000 In-Reply-To: Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Jessica Clarke References: <202111261451.1AQEpJ7Y040922@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3445.104.21) X-Rspamd-Queue-Id: 4J3PbS1bfwz4hgs X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_CD84F761-7372-4DCD-A649-4391169FF8E4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 30 Nov 2021, at 13:30, Jessica Clarke wrote: >=20 > On 26 Nov 2021, at 14:51, Andrew Turner > wrote: >>=20 >> The branch main has been updated by andrew: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dae92ace05fd4fcf64e3bb787951578f6= 55b1fa5f >>=20 >> commit ae92ace05fd4fcf64e3bb787951578f655b1fa5f >> Author: Andrew Turner >> AuthorDate: 2021-11-22 15:20:51 +0000 >> Commit: Andrew Turner >> CommitDate: 2021-11-26 14:44:00 +0000 >>=20 >> Per-thread stack canary on arm64 >>=20 >> With the update to llvm 13 we are able to tell the compiler it can = find >> the SSP canary relative to the register that holds the userspace = stack >> pointer. As this is unused in most of the kernel it can be used = here >> to point to a per-thread SSP canary. >>=20 >> As the kernel could be built with an old toolchain, e.g. when = upgrading >> from 13, add a warning that the options was enabled but the = compiler >> doesn't support it to both the build and kernel boot. >>=20 >> Discussed with: emaste >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D33079 >> --- >> sys/arm64/arm64/exception.S | 7 +++++++ >> sys/arm64/arm64/genassym.c | 1 + >> sys/arm64/arm64/locore.S | 14 ++++++++++++++ >> sys/arm64/arm64/machdep.c | 22 ++++++++++++++++++++++ >> sys/arm64/arm64/pmap.c | 4 ++++ >> sys/arm64/arm64/vm_machdep.c | 10 ++++++++++ >> sys/arm64/conf/std.arm64 | 1 + >> sys/arm64/include/proc.h | 1 + >> sys/conf/Makefile.arm64 | 14 ++++++++++++++ >> sys/conf/options.arm64 | 4 ++++ >> 10 files changed, 78 insertions(+) >>=20 >> diff --git a/sys/arm64/arm64/exception.S = b/sys/arm64/arm64/exception.S >> index 22f6b7ce6145..d81bbce0efc7 100644 >> --- a/sys/arm64/arm64/exception.S >> +++ b/sys/arm64/arm64/exception.S >> @@ -66,6 +66,13 @@ __FBSDID("$FreeBSD$"); >> mrs x18, tpidr_el1 >> add x29, sp, #(TF_SIZE) >> .if \el =3D=3D 0 >> +#if defined(PERTHREAD_SSP) >> + /* Load the SSP canary to sp_el0 */ >> + ldr x1, [x18, #(PC_CURTHREAD)] >> + add x1, x1, #(TD_MD_CANARY) >> + msr sp_el0, x1 >> +#endif >> + >> /* Apply the SSBD (CVE-2018-3639) workaround if needed */ >> ldr x1, [x18, #PC_SSBD] >> cbz x1, 1f >> diff --git a/sys/arm64/arm64/genassym.c b/sys/arm64/arm64/genassym.c >> index 1575a0158dec..8e3ddc48317b 100644 >> --- a/sys/arm64/arm64/genassym.c >> +++ b/sys/arm64/arm64/genassym.c >> @@ -73,6 +73,7 @@ ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); >> ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); >> ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); >> ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); >> +ASSYM(TD_MD_CANARY, offsetof(struct thread, td_md.md_canary)); >>=20 >> ASSYM(TF_SIZE, sizeof(struct trapframe)); >> ASSYM(TF_SP, offsetof(struct trapframe, tf_sp)); >> diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S >> index 92415aab1555..bc9a7271e93a 100644 >> --- a/sys/arm64/arm64/locore.S >> +++ b/sys/arm64/arm64/locore.S >> @@ -116,6 +116,13 @@ virtdone: >> cmp x15, x14 >> b.lo 1b >>=20 >> +#if defined(PERTHREAD_SSP) >> + /* Set sp_el0 to the boot canary for early per-thread SSP to = work */ >> + adrp x15, boot_canary >> + add x15, x15, :lo12:boot_canary >> + msr sp_el0, x15 >> +#endif >> + >> /* Backup the module pointer */ >> mov x1, x0 >>=20 >> @@ -200,6 +207,13 @@ mp_virtdone: >> ldr x4, [x4] >> mov sp, x4 >>=20 >> +#if defined(PERTHREAD_SSP) >> + /* Set sp_el0 to the boot canary for early per-thread SSP to = work */ >> + adrp x15, boot_canary >> + add x15, x15, :lo12:boot_canary >> + msr sp_el0, x15 >> +#endif >> + >> /* Load the kernel ttbr0 pagetable */ >> msr ttbr0_el1, x27 >> isb >> diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c >> index 59a634f4d30c..821d9ba19022 100644 >> --- a/sys/arm64/arm64/machdep.c >> +++ b/sys/arm64/arm64/machdep.c >> @@ -109,6 +109,14 @@ enum arm64_bus arm64_bus_method =3D = ARM64_BUS_NONE; >> */ >> struct pcpu pcpu0; >>=20 >> +#if defined(PERTHREAD_SSP) >> +/* >> + * The boot SSP canary. Will be replaced with a per-thread canary = when >> + * scheduling has started. >> + */ >> +uintptr_t boot_canary =3D 0x49a2d892bc05a0b1ul; >=20 > Is it *really* a pointer? That sure looks like it=E2=80=99s really a = size_t or > unsigned long. I doubt you=E2=80=99d want a capability on CHERI (well, = you=E2=80=99d > turn the feature off because it=E2=80=99s a waste of time there, but = still). >=20 > Jess It=E2=80=99s a uintptr_t in glibc. It=E2=80=99s also sitting beside = other pointers (the return address, etc) so any wasted space on the = stack would be from the size increase, not due to padding for alignment. Andrew --Apple-Mail=_CD84F761-7372-4DCD-A649-4391169FF8E4-- From nobody Tue Nov 30 14:31:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2AAB618C737E; Tue, 30 Nov 2021 14:31: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 4J3PmN69Cjz4kb0; Tue, 30 Nov 2021 14:31:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B48F417CC6; Tue, 30 Nov 2021 14:31: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 1AUEVWV4090801; Tue, 30 Nov 2021 14:31:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUEVWqg090800; Tue, 30 Nov 2021 14:31:32 GMT (envelope-from git) Date: Tue, 30 Nov 2021 14:31:32 GMT Message-Id: <202111301431.1AUEVWqg090800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: b394e16ef0b5 - main - fw_stub: fix -Wunused-but-set-variable for firmware 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/main X-Git-Reftype: branch X-Git-Commit: b394e16ef0b5ad0da5e029bcdd3a01e361724d8d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638282692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9TXQ4Yf8sleM5DF15JefuSgmYxviatlQrO4Gbirm59w=; b=B4Fzy/4p2Znv/sl4821M/i1xRpyynIeZuZ4eH/cwdVc/MXBUnYUxr6aAh2pL4DcN08vwys inEPkAAqL0gHTrtF3jUAxoTKnjgkvHxn+GBf0L5/kmZjGTnhmMwmRtQA9L1LDB7+RkcYpR 1JngrWkAe/nnZXgcaHEj+eV8ERNozr2kvBQ4MrflSzYyoA7Pq3PYK2Mk4we3rDy5tgAmfT vF2m/ViZ5YLGvOiSP04QVrWs2/tq+QQ/kAIyBrWWPy8me0Bz6F4vf31qYV2QkKlqqzTcY3 SYVJ7KdAdGaVbL3lDeQ9voVk75e39UgyFII9U2lVYdya5/mBq4zEhSkWDlWohg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638282692; a=rsa-sha256; cv=none; b=KURPhyFFkmlLghLQztvpeFzy+UvDwikuil5Yon0aAUW/m2xopeH20Z3J1YXZzLVo2nQWLw vMIAeiaUNzZiGdf7eGFFizwA0mwHf6WMtzDP1vNR3artBVsgslov+r4lP8YwNLjjeu0YzU UuRovP3ftWf08wsvIl4qPRP4Z/eptHZwdBUNsZfFRJq1eHyvAeuk8hE9qvmZSzGP/hkTTy s1yf3SDLMxhPZZvs1xgNKwhGv9ZUZ9COtYC5UiSrzOsxLPSgL0fJNMiKjRzUgEPK13rv2o 3a0cow6XJ6pnDNvquoYanNpleSB57hNpA9hW0KXqy4soM++H28P7qHFEGVGGpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b394e16ef0b5ad0da5e029bcdd3a01e361724d8d commit b394e16ef0b5ad0da5e029bcdd3a01e361724d8d Author: Bjoern A. Zeeb AuthorDate: 2021-11-30 14:23:18 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-30 14:23:18 +0000 fw_stub: fix -Wunused-but-set-variable for firmware files In case we are only embedding a single firmware image the variable "parent" gets set but never used. Add checks for the number of files for it and only print it out if we are exceeding the single file count. This fixes -Wunused-but-set-variable warnings for the majority of firmware files in the tree. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks --- sys/tools/fw_stub.awk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/tools/fw_stub.awk b/sys/tools/fw_stub.awk index 807c51b6190b..94975687f4e2 100644 --- a/sys/tools/fw_stub.awk +++ b/sys/tools/fw_stub.awk @@ -151,8 +151,10 @@ for (file_i = 0; file_i < num_files; file_i++) { printc("\nstatic int\n"\ modname "_fw_modevent(module_t mod, int type, void *unused)\ {\ - const struct firmware *fp, *parent;\ - int error;\ + const struct firmware *fp;"); +if (num_files > 1) + printc("\tconst struct firmware *parent;"); +printc("\tint error;\ switch (type) {\ case MOD_LOAD:\n"); @@ -187,7 +189,7 @@ for (file_i = 0; file_i < num_files; file_i++) { printc("\t\tif (fp == NULL)"); printc("\t\t\tgoto fail_" file_i ";"); - if (file_i == 0) + if (file_i == 0 && num_files > 1) printc("\t\tparent = fp;"); } From nobody Tue Nov 30 14:31:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 30A9A18C8019 for ; Tue, 30 Nov 2021 14:31:59 +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 4J3Pmt6zjYz4lNb for ; Tue, 30 Nov 2021 14:31:58 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f48.google.com with SMTP id l16so44863975wrp.11 for ; Tue, 30 Nov 2021 06:31:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=66uzPuuaXclY7Sm+HxCaeWVPOGO/n0SAQaWYRc9UtU4=; b=SG5pJymtyAuTH+Uv6F3yuE+3Rh1l8D1TjydM359Gp5EPLjBofdMnq+3FAT9fJpys+0 3FQ+Pu/72jb2Wjt0bHd0woD/DQ9jBANOe5N9diTEHblcjKh7P4Oxq0Z/dBvjjIsWTwYX gH6pp0qVAGkWUkPRav69dHN2/2BKPKnCkx3gQ58dikZhZ5cLiocQ4s3V7KPvnX4DlB4n y0LhCvZuRDRjuBaaQzoaK3xAqP4MNKfKR1Iqz2ZUBx+6wrEVKL+j7hkCKLQFQCfIUPO+ cqSzM9Xm8bhSm5tUf4fnLPKuvGNGIQzqRyUuuNjnUv/uBbNwOFue46wHpV2O6R84n/bu uXrQ== X-Gm-Message-State: AOAM533hgmoWxdNurY9zKKEr4EKW7BEKX0aFFruWiXVussPKJF7+6t5L D2hk0s9qCvQQ0fKhtZAmf1NlfNa3OZuoxWwX X-Google-Smtp-Source: ABdhPJxXTVUNkpdwF8Tk5A/38risorkn7A2jErhVbz7ZPvGjRnkooa26amti0GJGiPCowXqDu+nhPw== X-Received: by 2002:a05:6000:128b:: with SMTP id f11mr40710965wrx.70.1638282712181; Tue, 30 Nov 2021 06:31:52 -0800 (PST) Received: from smtpclient.apple (global-5-141.nat-2.net.cam.ac.uk. [131.111.5.141]) by smtp.gmail.com with ESMTPSA id j18sm2921857wmq.44.2021.11.30.06.31.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Nov 2021 06:31:51 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: git: ae92ace05fd4 - main - Per-thread stack canary on arm64 From: Jessica Clarke In-Reply-To: Date: Tue, 30 Nov 2021 14:31:50 +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: <5975C2F0-B7F2-4115-8AF0-82BF3C8EC8E5@freebsd.org> References: <202111261451.1AQEpJ7Y040922@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4J3Pmt6zjYz4lNb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N > On 30 Nov 2021, at 14:23, Andrew Turner wrote: >=20 >=20 >=20 >> On 30 Nov 2021, at 13:30, Jessica Clarke wrote: >>=20 >> On 26 Nov 2021, at 14:51, Andrew Turner wrote: >>>=20 >>> The branch main has been updated by andrew: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dae92ace05fd4fcf64e3bb787951578f6= 55b1fa5f >>>=20 >>> commit ae92ace05fd4fcf64e3bb787951578f655b1fa5f >>> Author: Andrew Turner >>> AuthorDate: 2021-11-22 15:20:51 +0000 >>> Commit: Andrew Turner >>> CommitDate: 2021-11-26 14:44:00 +0000 >>>=20 >>> Per-thread stack canary on arm64 >>>=20 >>> With the update to llvm 13 we are able to tell the compiler it can = find >>> the SSP canary relative to the register that holds the userspace = stack >>> pointer. As this is unused in most of the kernel it can be used = here >>> to point to a per-thread SSP canary. >>>=20 >>> As the kernel could be built with an old toolchain, e.g. when = upgrading >>> from 13, add a warning that the options was enabled but the = compiler >>> doesn't support it to both the build and kernel boot. >>>=20 >>> Discussed with: emaste >>> Sponsored by: The FreeBSD Foundation >>> Differential Revision: https://reviews.freebsd.org/D33079 >>> --- >>> sys/arm64/arm64/exception.S | 7 +++++++ >>> sys/arm64/arm64/genassym.c | 1 + >>> sys/arm64/arm64/locore.S | 14 ++++++++++++++ >>> sys/arm64/arm64/machdep.c | 22 ++++++++++++++++++++++ >>> sys/arm64/arm64/pmap.c | 4 ++++ >>> sys/arm64/arm64/vm_machdep.c | 10 ++++++++++ >>> sys/arm64/conf/std.arm64 | 1 + >>> sys/arm64/include/proc.h | 1 + >>> sys/conf/Makefile.arm64 | 14 ++++++++++++++ >>> sys/conf/options.arm64 | 4 ++++ >>> 10 files changed, 78 insertions(+) >>>=20 >>> diff --git a/sys/arm64/arm64/exception.S = b/sys/arm64/arm64/exception.S >>> index 22f6b7ce6145..d81bbce0efc7 100644 >>> --- a/sys/arm64/arm64/exception.S >>> +++ b/sys/arm64/arm64/exception.S >>> @@ -66,6 +66,13 @@ __FBSDID("$FreeBSD$"); >>> mrs x18, tpidr_el1 >>> add x29, sp, #(TF_SIZE) >>> .if \el =3D=3D 0 >>> +#if defined(PERTHREAD_SSP) >>> + /* Load the SSP canary to sp_el0 */ >>> + ldr x1, [x18, #(PC_CURTHREAD)] >>> + add x1, x1, #(TD_MD_CANARY) >>> + msr sp_el0, x1 >>> +#endif >>> + >>> /* Apply the SSBD (CVE-2018-3639) workaround if needed */ >>> ldr x1, [x18, #PC_SSBD] >>> cbz x1, 1f >>> diff --git a/sys/arm64/arm64/genassym.c b/sys/arm64/arm64/genassym.c >>> index 1575a0158dec..8e3ddc48317b 100644 >>> --- a/sys/arm64/arm64/genassym.c >>> +++ b/sys/arm64/arm64/genassym.c >>> @@ -73,6 +73,7 @@ ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); >>> ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); >>> ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); >>> ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); >>> +ASSYM(TD_MD_CANARY, offsetof(struct thread, td_md.md_canary)); >>>=20 >>> ASSYM(TF_SIZE, sizeof(struct trapframe)); >>> ASSYM(TF_SP, offsetof(struct trapframe, tf_sp)); >>> diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S >>> index 92415aab1555..bc9a7271e93a 100644 >>> --- a/sys/arm64/arm64/locore.S >>> +++ b/sys/arm64/arm64/locore.S >>> @@ -116,6 +116,13 @@ virtdone: >>> cmp x15, x14 >>> b.lo 1b >>>=20 >>> +#if defined(PERTHREAD_SSP) >>> + /* Set sp_el0 to the boot canary for early per-thread SSP to = work */ >>> + adrp x15, boot_canary >>> + add x15, x15, :lo12:boot_canary >>> + msr sp_el0, x15 >>> +#endif >>> + >>> /* Backup the module pointer */ >>> mov x1, x0 >>>=20 >>> @@ -200,6 +207,13 @@ mp_virtdone: >>> ldr x4, [x4] >>> mov sp, x4 >>>=20 >>> +#if defined(PERTHREAD_SSP) >>> + /* Set sp_el0 to the boot canary for early per-thread SSP to = work */ >>> + adrp x15, boot_canary >>> + add x15, x15, :lo12:boot_canary >>> + msr sp_el0, x15 >>> +#endif >>> + >>> /* Load the kernel ttbr0 pagetable */ >>> msr ttbr0_el1, x27 >>> isb >>> diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c >>> index 59a634f4d30c..821d9ba19022 100644 >>> --- a/sys/arm64/arm64/machdep.c >>> +++ b/sys/arm64/arm64/machdep.c >>> @@ -109,6 +109,14 @@ enum arm64_bus arm64_bus_method =3D = ARM64_BUS_NONE; >>> */ >>> struct pcpu pcpu0; >>>=20 >>> +#if defined(PERTHREAD_SSP) >>> +/* >>> + * The boot SSP canary. Will be replaced with a per-thread canary = when >>> + * scheduling has started. >>> + */ >>> +uintptr_t boot_canary =3D 0x49a2d892bc05a0b1ul; >>=20 >> Is it *really* a pointer? That sure looks like it=E2=80=99s really a = size_t or >> unsigned long. I doubt you=E2=80=99d want a capability on CHERI = (well, you=E2=80=99d >> turn the feature off because it=E2=80=99s a waste of time there, but = still). >>=20 >> Jess >=20 > It=E2=80=99s a uintptr_t in glibc. It=E2=80=99s also sitting beside = other pointers (the return address, etc) so any wasted space on the = stack would be from the size increase, not due to padding for alignment. Just because space gets wasted on the stack doesn=E2=80=99t mean it=E2=80=99= s a uintptr_t, and GNU code is hardly known for its correct use of integer-vs-pointer types. In CHERI-LLVM the stack protector (if you use the hidden option to allow using it) is an integer, not a pointer, and only of size 32/64 bits. Loading 64 bits from a uintptr_t on a 64-bit little-endian CHERI architecture happens to be ok, but it=E2=80=99s conceptually the wrong thing, and on big-endian CHERI would load the metadata half of the value which, being null-derived, would always be 0 no matter the value of the integer address part. So, no, this should be size_t or (unsigned) long. Jess From nobody Tue Nov 30 15:16:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BDC3B18B659B; Tue, 30 Nov 2021 15:16: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 4J3Qm21ZDJz3J5Q; Tue, 30 Nov 2021 15:16:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F34E185D6; Tue, 30 Nov 2021 15:16: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 1AUFGH3e048210; Tue, 30 Nov 2021 15:16:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUFGHQw048209; Tue, 30 Nov 2021 15:16:17 GMT (envelope-from git) Date: Tue, 30 Nov 2021 15:16:17 GMT Message-Id: <202111301516.1AUFGHQw048209@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: 8bc792b3845e - main - i386: take pcb and fpu area into account in GET_STACK_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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8bc792b3845ecf64145fda7964a7b5cc54dea777 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638285378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=urA1qLyuf+d7u5z1HDDu3Zp6f2R7zPuWQTRfCgOyHCU=; b=DR+ESbSjZUMgZgCY/0fEyMVFiGoH/YSmh4yeHByqjSQBqg6xSn5qG5eWsbgw/w8nB7XxEK GbMMFA0iZpttV+7xfyXFCAATEnjKKKmusZUYNTtqJLh3Mupt3yjQ0NYWDF/hp49uGzReeG fMHvAuY+NIsQwzM3DCh3CDSVzeTJ99xUEQ6Ti6XABijR88sMTnY9SObW9345RkuRH8PA+m iYqGRFCGaP7ceKgakL65N4LpLLxO5hvgFLZgkgJla4I1je5RwR3FjeOJN4jojhS9TLzAD7 j54T50Dt/H3sAQBhkqNixXUkfXewKHSRUTNJtRpPxQaGiViup/AnJ7wxYavN5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638285378; a=rsa-sha256; cv=none; b=p6rPfsMFqubX2Mpmg4cTuX+0rXIMXkyJlGqNqcRW5G7zK9EcnHXOuzRKOREIySigXmbiir gnFsNnAT0m7YsqXw1RS1UZMObz2VXRVOvu+ZcfFcOeEEmntdVf7Q2kyaekobnI6USuk50t Ae+uYulJNgl9YH39kbt/aC3EwDSq+sMEt9+YauDvOEvuhOtVA0rvbITDIJOPnBVCUd26AJ H/BrqWO2yQZ/poAxEptaRXu/EQImw8sHMNe1AYKNu52etITbZYJws3bvtd5Z00vR0YKtxa k+puJ/44U7XfwHbCnCAc2l05WEQOG1L47lQeKWmQTE/5r8e5MjI7UkG3F2Z4rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8bc792b3845ecf64145fda7964a7b5cc54dea777 commit 8bc792b3845ecf64145fda7964a7b5cc54dea777 Author: Mitchell Horne AuthorDate: 2021-11-25 15:54:33 +0000 Commit: Mitchell Horne CommitDate: 2021-11-30 15:03:46 +0000 i386: take pcb and fpu area into account in GET_STACK_USAGE On this platform, the pcb and FPU save area are allocated from the top of each kernel stack, so they should be excluded from the calculation of the total and used stack sizes. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32581 --- sys/i386/include/proc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/i386/include/proc.h b/sys/i386/include/proc.h index 76e1ac611474..26149a6640cd 100644 --- a/sys/i386/include/proc.h +++ b/sys/i386/include/proc.h @@ -71,13 +71,13 @@ struct syscall_args { #ifdef _KERNEL +#include + /* Get the current kernel thread stack usage. */ #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ - (total) = td->td_kstack_pages * PAGE_SIZE; \ - (used) = (char *)td->td_kstack + \ - td->td_kstack_pages * PAGE_SIZE - \ - (char *)&td; \ + (total) = (vm_offset_t)get_pcb_td(td) - td->td_kstack; \ + (used) = (vm_offset_t)get_pcb_td(td) - (vm_offset_t)&td; \ } while (0) void set_user_ldt(struct mdproc *); From nobody Tue Nov 30 15:16:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F20FD18B654C; Tue, 30 Nov 2021 15:16: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 4J3Qm31SyTz3J5d; Tue, 30 Nov 2021 15:16:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 126C4183D3; Tue, 30 Nov 2021 15:16: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 1AUFGJfK048234; Tue, 30 Nov 2021 15:16:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUFGJG2048233; Tue, 30 Nov 2021 15:16:19 GMT (envelope-from git) Date: Tue, 30 Nov 2021 15:16:19 GMT Message-Id: <202111301516.1AUFGJG2048233@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: b02908b051c8 - main - arm64, powerpc: fix calculation of 'used' in GET_STACK_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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b02908b051c897117ebbc3dcb55848383b17c435 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638285379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=agvHzUFKI2c+RkZfg8Zn+1D1WsjQWHahDr+x0gNSrhY=; b=vgeY1/s6mboM6MxZYHddfj61hBjmDBPFjvTtr6GUXlDh41St7/bTFyBGbrJNU6IQHm6bl9 AyosHYwwkpJy9/pT5ZQktAVsl5NClIG6Trgq73jL+wBDUZLlqNsTktIGjMkU/f1U4AM4q7 g9gzLI6MLOM4M+38FQMkBb5Ujlt53Wt3UPQ9erlH0jL+czuvIv9KiEPxsLx04IXX1mFSVv HsWpE3VM29nthEg8IpFxE/2DEDd4DyPZs5Uf4uXXfb+z11yXsziQiALOlMayK9Je2Sz2oh 6lbCjrtwxM3nqOJcoGgexzo8BzH1p/UFTASEIrF5FE5IUMPItdY34oK1qD6OBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638285379; a=rsa-sha256; cv=none; b=wTgOVTisW0JWCrmfs9pcWTtJOC1RCXYg14oDaPDTW3E3nDL9+n1YzjSC/9uS4O2kTTV/9l KOI6ezxHXiPC2lDGu8HknnRmnTdHs20w8ruNmG/DoLp+9xR55eMnUzTK/yUpuEJdP3T517 qI0pqTYl0WXtLJj4HIZC3wqqPJgRVqo/5NyVs94Z+Lm+BpaNDDIgKZgHAMwcdPXAtpJoP8 KOLBmpSPiBRYuOnjMKV1Ddv+luh7S/bIgaZPkmIfq6I7qKBI2RqyHK2A5tMYnbIq891Ro6 V+VPLC43XgGWLoStwarlQ5P5j0TeB9DImmW8PDJqTPWpKvWG6Ezalzqr+7pJ9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b02908b051c897117ebbc3dcb55848383b17c435 commit b02908b051c897117ebbc3dcb55848383b17c435 Author: Mitchell Horne AuthorDate: 2021-11-30 15:15:44 +0000 Commit: Mitchell Horne CommitDate: 2021-11-30 15:15:44 +0000 arm64, powerpc: fix calculation of 'used' in GET_STACK_USAGE We do not consider the space reserved for the pcb to be part of the total kstack size, so it should not be included in the calculation of the used stack size. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/arm64/include/proc.h | 4 +--- sys/powerpc/include/proc.h | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/arm64/include/proc.h b/sys/arm64/include/proc.h index 43200fd115fc..95485483084a 100644 --- a/sys/arm64/include/proc.h +++ b/sys/arm64/include/proc.h @@ -62,9 +62,7 @@ struct syscall_args { #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ - (used) = (char *)td->td_kstack + \ - td->td_kstack_pages * PAGE_SIZE - \ - (char *)&td; \ + (used) = td->td_kstack + (total) - (vm_offset_t)&td; \ } while (0) #endif diff --git a/sys/powerpc/include/proc.h b/sys/powerpc/include/proc.h index aac4e66b39fc..1dd52895bb9e 100644 --- a/sys/powerpc/include/proc.h +++ b/sys/powerpc/include/proc.h @@ -75,9 +75,7 @@ struct syscall_args { #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ - (used) = (char *)td->td_kstack + \ - td->td_kstack_pages * PAGE_SIZE - \ - (char *)&td; \ + (used) = td->td_kstack + (total) - (vm_offset_t)&td; \ } while (0) #endif From nobody Tue Nov 30 15:16:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3AB9A18B662B; Tue, 30 Nov 2021 15:16: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 4J3Qm45RLHz3J5k; Tue, 30 Nov 2021 15:16:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3EE051853A; Tue, 30 Nov 2021 15:16: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 1AUFGKNP048258; Tue, 30 Nov 2021 15:16:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUFGKmh048257; Tue, 30 Nov 2021 15:16:20 GMT (envelope-from git) Date: Tue, 30 Nov 2021 15:16:20 GMT Message-Id: <202111301516.1AUFGKmh048257@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: 0d2224733e97 - main - Implement GET_STACK_USAGE on remaining archs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0d2224733e970aaa67a4e1af7b340044adda92f6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638285380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uxonYALWCs3Pn0+SAcgBHLvECJCvIscfBqLcEI6hg2k=; b=J+wzeI+Ked1QO3SmJUwuBAS2Q9cssxtsKD38PYqR9i0K7fUd1z99MErcsaCsR8YaCpyCuv brBNWin+VIBVOmjzFOaoob1c4IOuJyuwirZ8GcbNr/8feuvSWBtQtDGvgPQa5uoEn2SvmI aQOy/rCQVJECY13GG6FbCoVOk/b2j7GqYdVtdHeoaQVgYKTEGDsOhNlz+ZD27lx/3OKB9p 6+lRy8/pYtZpP0fwqExJ7RZQtxq908eX6Z1dw14OS3ZFFwlh91W28QrfnLmw9HsPQPe/RS a42OB9EdFUsSFyu+Tc89iojOV2lt+lerZ4GgVFypv99Fm0/LNW3N06KvmhNHWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638285380; a=rsa-sha256; cv=none; b=iRlDOg5gLYNv/HYxpVtiXFHQl+5eYZk3YtaQJBQnEYACcxEyfXdeQOHbjvD1Ow6SwreoOH HNtD1wkxZlSrBKj11P8P9hZzW2n8K+P/yQ9onRI55oUi6iWt4sn54zqXATMibuscoZz9Ix nvKDAJ03tykHp4uR6iydrtrqX3p5+JDgZ+PsyaqL9OCMPFJPU5Yrc8g8iWbosnGciq/5WC Xh7cIZGUDx5VFC/AJdoa/1Kpr9iD/CFwxNi51XqtizuqMCC6QwwUpdksQa97F+r2x1uUha xH5rrN/Tv4Ts4BJPEsa+4UMlDNkDoNF1+8ZclfcwjJGbyEGToYSUWMaBQAoYpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0d2224733e970aaa67a4e1af7b340044adda92f6 commit 0d2224733e970aaa67a4e1af7b340044adda92f6 Author: Mitchell Horne AuthorDate: 2021-11-25 16:01:11 +0000 Commit: Mitchell Horne CommitDate: 2021-11-30 15:15:56 +0000 Implement GET_STACK_USAGE on remaining archs This definition enables callers to estimate remaining space on the kstack, and take action on it. Notably, it enables optimizations in the GEOM and netgraph subsystems to directly dispatch work items when there is sufficient stack space, rather than queuing them for a worker thread. Implement it for riscv, arm, and mips. Remove the #ifdefs, so it will not go unimplemented elsewhere. PR: 259157 Reviewed by: mav, kib, markj (previous version) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32580 --- sys/arm/include/proc.h | 11 +++++++++++ sys/geom/geom_io.c | 8 -------- sys/mips/include/proc.h | 11 +++++++++++ sys/netgraph/ng_base.c | 3 +-- sys/riscv/include/proc.h | 11 +++++++++++ 5 files changed, 34 insertions(+), 10 deletions(-) diff --git a/sys/arm/include/proc.h b/sys/arm/include/proc.h index 641b42280045..5b3b9286363d 100644 --- a/sys/arm/include/proc.h +++ b/sys/arm/include/proc.h @@ -72,4 +72,15 @@ struct syscall_args { register_t args[MAXARGS]; } __aligned(8); +#ifdef _KERNEL +#include + +/* Get the current kernel thread stack usage. */ +#define GET_STACK_USAGE(total, used) do { \ + struct thread *td = curthread; \ + (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ + (used) = td->td_kstack + (total) - (vm_offset_t)&td; \ +} while (0) + +#endif /* _KERNEL */ #endif /* !_MACHINE_PROC_H_ */ diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index f32a3dc52f93..ce7f6c867388 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -559,7 +559,6 @@ g_io_request(struct bio *bp, struct g_consumer *cp) atomic_add_int(&cp->nstart, 1); #endif -#ifdef GET_STACK_USAGE direct = (cp->flags & G_CF_DIRECT_SEND) != 0 && (pp->flags & G_PF_DIRECT_RECEIVE) != 0 && !g_is_geom_thread(curthread) && @@ -573,9 +572,6 @@ g_io_request(struct bio *bp, struct g_consumer *cp) if (su * 2 > st) direct = 0; } -#else - direct = 0; -#endif if (direct) { error = g_io_check(bp); @@ -655,7 +651,6 @@ g_io_deliver(struct bio *bp, int error) bp->bio_bcount = bp->bio_length; bp->bio_resid = bp->bio_bcount - bp->bio_completed; -#ifdef GET_STACK_USAGE direct = (pp->flags & G_PF_DIRECT_SEND) && (cp->flags & G_CF_DIRECT_RECEIVE) && !g_is_geom_thread(curthread); @@ -666,9 +661,6 @@ g_io_deliver(struct bio *bp, int error) if (su * 2 > st) direct = 0; } -#else - direct = 0; -#endif /* * The statistics collection is lockless, as such, but we diff --git a/sys/mips/include/proc.h b/sys/mips/include/proc.h index 29d832a162e6..5c8bc9d934e0 100644 --- a/sys/mips/include/proc.h +++ b/sys/mips/include/proc.h @@ -96,4 +96,15 @@ struct syscall_args { #define KINFO_PROC_SIZE 816 #endif +#ifdef _KERNEL +#include + +/* Get the current kernel thread stack usage. */ +#define GET_STACK_USAGE(total, used) do { \ + struct thread *td = curthread; \ + (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ + (used) = td->td_kstack + (total) - (vm_offset_t)&td; \ +} while (0) + +#endif /* _KERNEL */ #endif /* !_MACHINE_PROC_H_ */ diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index 655761c2f897..0d64000ee1f5 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -2281,7 +2281,7 @@ ng_snd_item(item_p item, int flags) queue = 1; } else { queue = 0; -#ifdef GET_STACK_USAGE + /* * Most of netgraph nodes have small stack consumption and * for them 25% of free stack space is more than enough. @@ -2296,7 +2296,6 @@ ng_snd_item(item_p item, int flags) ((node->nd_flags & NGF_HI_STACK) || (hook && (hook->hk_flags & HK_HI_STACK))))) queue = 1; -#endif } if (queue) { diff --git a/sys/riscv/include/proc.h b/sys/riscv/include/proc.h index 1c6c8d2919b5..e4ca08574bee 100644 --- a/sys/riscv/include/proc.h +++ b/sys/riscv/include/proc.h @@ -53,4 +53,15 @@ struct syscall_args { register_t args[MAXARGS]; }; +#ifdef _KERNEL +#include + +/* Get the current kernel thread stack usage. */ +#define GET_STACK_USAGE(total, used) do { \ + struct thread *td = curthread; \ + (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ + (used) = td->td_kstack + (total) - (vm_offset_t)&td; \ +} while (0) + +#endif /* _KERNEL */ #endif /* !_MACHINE_PROC_H_ */ From nobody Tue Nov 30 16:14:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D3CE818B3A16; Tue, 30 Nov 2021 16:14:34 +0000 (UTC) (envelope-from kevans@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 4J3S3G3Tjbz3rtM; Tue, 30 Nov 2021 16:14:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 52DC667C1; Tue, 30 Nov 2021 16:14:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f182.google.com with SMTP id q64so27360165qkd.5; Tue, 30 Nov 2021 08:14:34 -0800 (PST) X-Gm-Message-State: AOAM5301wQTn18z/8VKmOKGndYkRHZl8pfbb1ETmr7WvBH2EY9I80fqG ZjjJOb0ej7jqOVDDzPLCtatc+y0WNZYG5pqeaCA= X-Google-Smtp-Source: ABdhPJxdZTHe+0xXp+y+CnS50sT7NPGpomErsRUHB2gTXo/v9mTpRaXAKYKQYstPGzB4o6O3Pyd5HWM/O/v/DDGrw0g= X-Received: by 2002:a37:b944:: with SMTP id j65mr186133qkf.708.1638288873877; Tue, 30 Nov 2021 08:14:33 -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: <202111301334.1AUDYJEU014078@gitrepo.freebsd.org> In-Reply-To: <202111301334.1AUDYJEU014078@gitrepo.freebsd.org> From: Kyle Evans Date: Tue, 30 Nov 2021 10:14:22 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 3d9d64aa1846 - main - kern_tc: unify timecounter to bintime delta conversion To: Andriy Gapon Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638288874; 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=5cnt50EVX0CW6w/kCWTmhE4iPfCuAKuSRanbSKNKyJQ=; b=k8wXMerJzKBFj36GsJcGwAygWgxaC131Wwx0asho4bjKd0Xns1QVDhVBRVzr1hNV6DGB7J q945S1Xa4BSx/fraUzrglGsYSHn526L8i4eWtcyd/M8i7XLnXmfODBdQ+n9O1+/ki/7Iqr O3dvzfVFWR8L0vh9sQFQ7CIqCH4/+9Ovj6lkHrAp0vosSWUMornrNzuJljztgcQLtt/e0P PL9MOPl4qCeC9mYMpLSiDFgFg5r4zYUTYCpAL0JdAHWhpkQ72K9y+P/xPSxnEukN0Gmb4H 1nAQTZwQjRQmJ1aDk0BEkNjNhYFTGtU5mFbtmhP5eZaw8XNhVL/pYDcp6HvZCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638288874; a=rsa-sha256; cv=none; b=eH9gNkmzlOk/+RVBLIalExwowwFX4UgvmNaedqJ/5nP0zJ9a138TosoS3LVIlTx3jFoH/y mfsG00aU0NWIjyZXEmlB0eW8qCp2BzNKVrxVpo706YKmfcipD9E6fnjwhpcPFhWnVgvK6X hk9l1pA6NHLb2kivxLqTGV4vL2Beea48Zd+9bveL+opLdRwhqJmSrYiapdbjDS2Ly435eM /rc3bA9p1D27zWiJ3I2EuGwK6/spKi+LZzRrvNZHeMNxjzgWQiUCn7Fgt5ysS++OC+YPQP 9cZlXtzWMM0rCMLs3EHO2OELQcOnrOjsGz5Um9R1nbdZeYXG8RxVbggsRy9KPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Tue, Nov 30, 2021 at 7:34 AM Andriy Gapon wrote: > > The branch main has been updated by avg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3d9d64aa1846217eac9229f8cba5cb6646a688b7 > > commit 3d9d64aa1846217eac9229f8cba5cb6646a688b7 > Author: Andriy Gapon > AuthorDate: 2021-11-30 13:23:23 +0000 > Commit: Andriy Gapon > CommitDate: 2021-11-30 13:23:23 +0000 > > kern_tc: unify timecounter to bintime delta conversion > > There are two places where we convert from a timecounter delta to > a bintime delta: tc_windup and bintime_off. > Both functions use the same calculations when the timecounter delta is > small. But for a large delta (greater than approximately an equivalent > of 1 second) the calculations were different. Both functions use > approximate calculations based on th_scale that avoid division. Both > produce values slightly greater than a true value, calculated with > division by tc_frequency, would be. tc_windup is slightly more > accurate, so its result is closer to the true value and, thus, smaller > than bintime_off result. > > As a consequence there can be a jump back in time when time hands are > switched after a long period of time (a large delta). Just before the > switch the time would be calculated with a large delta from > th_offset_count in bintime_off. tc_windup does the switch using its own > calculations of a new th_offset using the large delta. As explained > earlier, the new th_offset may end up being less than the previously > produced binuptime. So, for a period of time new binuptime values may > be "back in time" comparing to values just before the switch. > > Such a jump must never happen. All the code assumes that the uptime is > monotonically nondecreasing and some code works incorrectly when that > assumption is broken. For example, we have observed sleepq_timeout() > ignoring a timeout when the sbinuptime value obtained by the callout > code was greater than the expiration value, but the sbinuptime obtained > in sleepq_timeout() was less than it. In that case the target thread > would never get woken up. > > The unified calculations should ensure the monotonic property of the > uptime. > > The problem is quite rare as normally tc_windup should be called HZ > times per second (typically 1000 or 100). But it may happen in VMs on > very busy hypervisors where a VM's virtual CPU may not get an execution > time slot for a second or more. > I wonder if this helps explain the behavior we saw when enabling TSC on VirtualBox guests. Threads doing small ~1 second or less sleeps would start to miss their wakeups, so we'd consistently see, e.g., shutdown issues after applying a high loading while we're waiting for bufdaemon threads. From nobody Tue Nov 30 17:08:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5107618CDD63; Tue, 30 Nov 2021 17:08:17 +0000 (UTC) (envelope-from avg@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 4J3TFF0R4Qz4gJH; Tue, 30 Nov 2021 17:08:17 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4CBEB7846; Tue, 30 Nov 2021 17:08:16 +0000 (UTC) (envelope-from avg@freebsd.org) Message-ID: <69d4804d-1d94-7757-5c93-0d062f9c31c0@FreeBSD.org> Date: Tue, 30 Nov 2021 19:08:08 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.3.0 From: Andriy Gapon Subject: Re: git: 3d9d64aa1846 - main - kern_tc: unify timecounter to bintime delta conversion Content-Language: en-US To: Kyle Evans Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202111301334.1AUDYJEU014078@gitrepo.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638292097; 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=zLRxYFUzZlAAFShGctbdXY3v3ALZn03qmIKRlizpDsE=; b=xEYJUzOGnhxkc5IWmzsnuIdu+11VS0aQKU7VEIzzfozZEnEFdfnD6+0WgMI69hHrQPP95f oz7ZYxmmWrX4S3zKGfTQjcOJqhV2VW1SSflWFFrau+DgjEn0pvgadyjbrWcEgFLW82Plmo v1CxMJ/G4uzHbEWXl8OV/VWeDCMWU4yWeDp5yArenGTgCEwCuM3VKM4RzBXfu0GFLACqBY QT5aojeCbXOrAHd+d3l6HILMWwn1Ddri+9zfNA8YaPDBQi59r7qrAb66YPrR9DlqQZHYb8 UDLjmcvIAmTm5s8W+lYBgj63L5wCRBU69oR4G8gWmB1gaFTXVHI/m/AFesQS7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638292097; a=rsa-sha256; cv=none; b=OH5umLSC3PqitvAEzCNKaUfNnlVeXM206tE5jjf4WJL1v6D8+HbOEe3HVXch3BA1yRAKMG ul3c5C12K0JJ6pi+Z2KXeyAlSgGjIxG2UJPpOIAAcpWu/A9xn6x6+E1sGISS/5KSFINLuM E838uBzlJb9jJBk55ke38cp3OTlVpjVreAboS2WE9/ztP4I+AOkPGE7zNv17A8Et4SjXII HRRN25AlwfPg2L0Gj2f1S4+c5SdV6Q4pXbgAjknLGJmtsWzAFIEBclwbuFz4ui7qt4oEba nTZfBiHZiEzbIF6+YbvCe7SRD+/ZjVkB2w9zsN6DDPfdIF6vmdqz8Get6ohqsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 30/11/2021 18:14, Kyle Evans wrote: > I wonder if this helps explain the behavior we saw when enabling TSC > on VirtualBox guests. Threads doing small ~1 second or less sleeps > would start to miss their wakeups, so we'd consistently see, e.g., > shutdown issues after applying a high loading while we're waiting for > bufdaemon threads. It very well may be the case. The reason I arrived at this change is that we also sometimes saw the same problem but on VMWware. That prompted me to add some diagnostic code to sleepqueue to turn those missed wakeups into panics. As kib pointed out, mav recently made a change that would mask the problem as a side effect: https://cgit.FreeBSD.org/src/commit/?id=6df1359e5542f69179c142be1ea099d447e273d1 But I wanted to fix the root cause anyway. -- Andriy Gapon From nobody Tue Nov 30 17:31:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0759B18B2812 for ; Tue, 30 Nov 2021 17:31: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 4J3Tm85Dsvz4qDl; Tue, 30 Nov 2021 17:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A21119F7C; Tue, 30 Nov 2021 17:31: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 1AUHVao9033196; Tue, 30 Nov 2021 17:31:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUHVaqm033195; Tue, 30 Nov 2021 17:31:36 GMT (envelope-from git) Date: Tue, 30 Nov 2021 17:31:36 GMT Message-Id: <202111301731.1AUHVaqm033195@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: 6f49f5cdde1c..23aff1240891 - vendor/bc - 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: se X-Git-Repository: src X-Git-Refname: refs/heads/vendor/bc X-Git-Reftype: branch X-Git-Commit: 23aff1240891b4ba4bb000345824ca0b87b9b3e3 X-Git-Oldrev: 6f49f5cdde1c62c4e5a743e895f3afe592b5c0e5 X-Git-Newrev: 23aff1240891b4ba4bb000345824ca0b87b9b3e3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638293496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s8i6ikQy+us3mwItsfvit26f6zc8bu0L9OWse9Hedzs=; b=GN04zbHlcStnJlxCYohoqZvoV6Ln1AsYgGE3jM/zfCkzb1YgR43VxQTUK3/LsLKCh1izac 7pfsQB/tJEirKY/MlJnktqlw7TVNkgCkLdMOto0sEzEhgDOU1gx33V3N01gKv7t7C4jHFa bGZI633lQkAgrzTbFCXkgIIkTTCa/fp0Qy4cwgvsDzp8Z5OtquAIE3sLRgLS4pukqT7qFm E88hqPGsm9XTVyQOeBmyrumatBb5U0y3NlKUr1grlyzVKuC+oRh+FMgmGYp9PAY8FsLxI4 /lr/QSakQwLhCCY53T2qvsH/OEgBsvnPYlY/KY2IYuNsc7kb5mpvO3YfA7KpYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638293496; a=rsa-sha256; cv=none; b=Qzlwoft6VmKXyxHygBkOj4vIiOwniOEej5C8yEEBASpeMBS8+2b2kpNubOrtKqV6pJzti5 1zWpPkq9TBFnvCIGoDKUZODaisiA/sNDCgOYuNladHZpkqG+E9dcKDhB45PhA0WesfV4Jn DToF2hbr3yiNeTTYpsDUCE2JEs0DRkWYE3Xl9+VK+EZ/6rUtuSWpspdqoEFhEloJ7roGbR +CO7neYbHWIjQKbDtY8CbLmXgWKHsbLAcPXZhXYV6LCGpe7GMYkVErkztq7Q6c20KBU1nS 9ZlAZzDO9tSvpNZcCsMplcsk4nWeQd7aCbzLH/nocMedqD6zHhu7AbqUoGpD3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch vendor/bc has been updated by se: URL: https://cgit.FreeBSD.org/src/log/?id=6f49f5cdde1c..23aff1240891 23aff1240891 vendor/bc: import release 5.2.0 From nobody Tue Nov 30 17:31:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0757618B24E3 for ; Tue, 30 Nov 2021 17:31: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 4J3Tm85Wdhz4qBQ; Tue, 30 Nov 2021 17:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E7ED1A377; Tue, 30 Nov 2021 17:31: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 1AUHVasn033224; Tue, 30 Nov 2021 17:31:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUHVaTE033223; Tue, 30 Nov 2021 17:31:36 GMT (envelope-from git) Date: Tue, 30 Nov 2021 17:31:36 GMT Message-Id: <202111301731.1AUHVaTE033223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: c759df539bae - Create tag vendor/bc/5.2.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: se X-Git-Repository: src X-Git-Refname: refs/tags/vendor/bc/5.2.0 X-Git-Reftype: annotated tag X-Git-Commit: c759df539bae55188a11e5171b4aa0a0149741cb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638293496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+HNPYepoSXVssALzOzG/5LYkb7YtrziAZFwr82rHiY=; b=mo3kWPoFtPDIZNjLfjRJFiVsRbB8Wrrrg3N4aTzEfaTAtZyl1lDWZTWbiyEFzbJE/+yQy9 r8/jsMOgik1FdeIBp+CHKFgrSdJN9m7HeUl7+4HJy4szAVRQlvxw3K4pjd5QYBwHGd+iGf 8i9JO9iEoQdLIVUd87Ky01NrIdN7WfN0X5CfO6TzrBViQTgFIPyLkgZlg6wTMCNFmYe5+m 5qwaEu74NZ/AGFSKkpchYknlf07avrENwX+CpHjRgDlOgjXe/tdWBHJjsfJV8sbabmhoBh RTOkFUcufaE7JiLE91aXrM8RljpI8BGEwdvi8c/LKQkj3xbCXm6Hn23sBNPSdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638293496; a=rsa-sha256; cv=none; b=kHPSPgTyS/NCfS6Z9oRScTGFoRDWKY949YrHGegVv/4EAK2Y8r1xstt3EJuWR7fUHjzjNH KuSa2+oekp/WVot7JJziP0Mk7ph7DEthoxA6KTHcfXS9PtpBy/XLYXO4C4S+mtKufMLyk7 kVXnnKvvlmWws1C5t+bLbtMN+CR5tuh1+THLmm0H5ORHjomMP0l2/mQ6AayljEbbkJ7kW2 lM6Eo5COfosyqjZDwq0O3WwP57SBtq5TyEdHQ3977xTNshWulRNNX1Xp0MBTbgkoR0kclP NA/tV/EymGR3YWeO2kvr2l/bR/30nuIcz+GdauBGceEnYEgt7+cYONztxTtbow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/bc/5.2.0 has been created by se: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/bc/5.2.0 tag vendor/bc/5.2.0 Tagger: Stefan Eßer TaggerDate: 2021-11-30 17:30:44 +0000 vendor/bc: tag import of version 5.2.0 commit 23aff1240891b4ba4bb000345824ca0b87b9b3e3 Author: Stefan Eßer AuthorDate: 2021-11-30 17:26:22 +0000 Commit: Stefan Eßer CommitDate: 2021-11-30 17:26:22 +0000 vendor/bc: import release 5.2.0 This version is imported only for documentary purposes since it does not contain any changes that are relevant for the FreeBSD base system. From nobody Tue Nov 30 17:35:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8486518B5E68 for ; Tue, 30 Nov 2021 17: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 4J3Ts81sRCz4sG0; Tue, 30 Nov 2021 17:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 163A71A627; Tue, 30 Nov 2021 17: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 1AUHZtZV034408; Tue, 30 Nov 2021 17:35:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUHZtF9034407; Tue, 30 Nov 2021 17:35:55 GMT (envelope-from git) Date: Tue, 30 Nov 2021 17:35:55 GMT Message-Id: <202111301735.1AUHZtF9034407@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: 23aff1240891..e63540eed295 - vendor/bc - 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: se X-Git-Repository: src X-Git-Refname: refs/heads/vendor/bc X-Git-Reftype: branch X-Git-Commit: e63540eed295749528548c2e3a90f5a6e57275c8 X-Git-Oldrev: 23aff1240891b4ba4bb000345824ca0b87b9b3e3 X-Git-Newrev: e63540eed295749528548c2e3a90f5a6e57275c8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638293756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wN0jPEZqIEoPiDqs9jtnzglUAEhHDdJMEuxD9Yr/BiM=; b=RC2EJoValnfDesFeYomJloFZxyW+8+2Tiaz9OUsi7vetC8ajARTIELtMLN7Qe7B55Ls0rZ opsjo/TIO5Wmv1LHNXl/fMlW2iD9I5P/RngU2g/RB8mwaZQRKKSzOj6+bmrDHSCATpKfLX Wj4E0wgWt/uoncq+dMKj50yRFnXIR1m8YQpbDqA/34YVzVAF2Pp6ywFJbBNVy2VEqe0j4w L0Sk4sx9HJi6WStYFlNzMA7d+9M1MEl7K/oRSM6SH4nAtgfE6Tb+U0cmBEu+UYY21NOCLw Q01MjgONA1hmUr8bg3/a/NpSoLCf0KGnZb9bR/s7WJl8qf9xsw/7UgqXGjy4Lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638293756; a=rsa-sha256; cv=none; b=csaEf0O+ukktbNyDgE39sXnQ9PGkxA41Wx9WMGGNzyLXtIAGJW7BAWUen5ahNezo10qcqA RjM5Nop4sfn+zkerH86D+CUopZ9npg4tmTnHR33Xs6QqJkwxNHL71bUhNiXVKRoRHj8tkm B/auqtmhjIdV24cRYzNDmLxKfpmnFRFeRU9HvBuFG3RKzBB/ami6hJhmt5gsK3jA2ymZwJ adJcX6es91kjUzKNzsjgdOqPG7Wz5gfBgb8UWnpI0SaWYn5Ho9whsTSX0eQ+FjWrJCmcF7 M7htZqywNOiPFbs0p9NCYLCndM+t/FXHvJizP+ZU/N1iV+ytt47ZfKAQwkz9jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch vendor/bc has been updated by se: URL: https://cgit.FreeBSD.org/src/log/?id=23aff1240891..e63540eed295 e63540eed295 vendor/bc: import release 5.2.1 From nobody Tue Nov 30 17:35:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8A8A318B5ED8 for ; Tue, 30 Nov 2021 17: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 4J3Ts82Ctrz4s9K; Tue, 30 Nov 2021 17:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CABC1A3FB; Tue, 30 Nov 2021 17: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 1AUHZu5p034438; Tue, 30 Nov 2021 17: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 1AUHZuIb034437; Tue, 30 Nov 2021 17:35:56 GMT (envelope-from git) Date: Tue, 30 Nov 2021 17:35:56 GMT Message-Id: <202111301735.1AUHZuIb034437@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: eed89d3900f8 - Create tag vendor/bc/5.2.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: se X-Git-Repository: src X-Git-Refname: refs/tags/vendor/bc/5.2.1 X-Git-Reftype: annotated tag X-Git-Commit: eed89d3900f8aeacf57235eef6259a7efd2352db Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638293756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YhKAQHL/7b0OyJ72xaSEWZBMKUrltAKgvMvm9j5S2rA=; b=H9hPdrMQxhym2JVoYLhARRZgwvOO2niK40ewe4X5aXYYCfckp82OVR/nAgyutXVApbhGB3 6MD5b97HKpYO3t3HUbM4igdEc7TGvPdU67vpPTr153tsoS6qerJ6VpDdR+pqffvQ7QNVtF wSzCfXnICC7aaFCmHGeDZZs5V4zaUnnVj3nqn73Y48Uhbc+scvIwcRYO567SMBGzyUJJib 1gl9uH/+osLgGE/f1F8s+qIyNWESSgvgPlgqpDgLgie3MR5oSVO7oiL9x6ubFhMADrhkpf NxwvfJ+unc9m4QEEdor7oM6fKBFayFheqY0JztBXwEXLUUtx0+AtP4ppFy8hvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638293756; a=rsa-sha256; cv=none; b=tG1jKe16ZEt//qgthLvhzhQenPRSNH9g3OfESOxZGAbxK08vThhPoZa23Sin+8RpuFrgn3 x0PIb4UlEt3p9WU5YMU0nI3fFUqOuNr2KTapLw8wwgkc5n/QHJr1xmBShJolOiEdeoRYf+ LtNaa+s+eyrvEWfU6+p5zlIDSyNKmTTO85YKmBQ7MgGNj4osIdlQWTVzyn4Lelr9eYj9jo O6hQ0WRdFO7HPegVqqSz0rlkSaoYxclTkB5IO2L14NFI/555J9DUTaCLUEEpLIJFja0J/U pNg9xvFtvV8HVVQGJJPpW9nx7Keg6SWIdEtT8dp7GH7stKvmc4ewqj5jFOoEQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/bc/5.2.1 has been created by se: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/bc/5.2.1 tag vendor/bc/5.2.1 Tagger: Stefan Eßer TaggerDate: 2021-11-30 17:35:29 +0000 vendor/bc: tag import of version 5.2.1 commit e63540eed295749528548c2e3a90f5a6e57275c8 Author: Stefan Eßer AuthorDate: 2021-11-30 17:33:40 +0000 Commit: Stefan Eßer CommitDate: 2021-11-30 17:33:40 +0000 vendor/bc: import release 5.2.1 This release fixes two parse bugs when in POSIX standard mode. One of these bugs was due to a quirk of the POSIX grammar, and the other was because bc was too strict. From nobody Tue Nov 30 17:36:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6156E18B648B; Tue, 30 Nov 2021 17:36: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 4J3TsV0Bh5z4sKG; Tue, 30 Nov 2021 17:36:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D089D1A3FC; Tue, 30 Nov 2021 17:36: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 1AUHaDw3034580; Tue, 30 Nov 2021 17:36:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUHaD75034579; Tue, 30 Nov 2021 17:36:13 GMT (envelope-from git) Date: Tue, 30 Nov 2021 17:36:13 GMT Message-Id: <202111301736.1AUHaD75034579@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: 439da7f06dce - main - if_stf: KASAN fix List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 439da7f06dcea5af17e7d5b3b4784e54207194ac Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638293774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RNFKg5HlAPfQEfDdP6C8xsK1l+C+nYWaEZowy+495Cg=; b=iMjHK/pc83Qf+sbZsVEQPajDPAOz1IsJmwAgSdBDos9pxeAX6EpIanB34BDf4CY0z2eALJ M3X0eBczZ3o7koWnp8//LFApRsdjyLE6e2PT0NXhez/bhbw+ly88fbwEXmlcI77GAM0oJV BGSfXUpFdeD6PKIRbPsLiXb7JCgTjvpcm0lVEZHfWbD15CUkmumqgm4DpFK9JmgL74iDPj n7qkAiCJIBq7v/RvC6STsRlfyayT2YQPD6cC/8QKl3IFyPuL8N9xdK4veuCWfRz4y27OOM fh/pishOdQEZZH2EOWFcG2LBeoxI1OGvJDtHWAKUzbADBBNHUzEMtjoqsi2Nng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638293774; a=rsa-sha256; cv=none; b=FqEWBvpkX9R9WT7k9o+ZO4TUwjePfXYGgoTE8PntUYRxLE2vv2FDH4W3F5O2JlLPJQts6l wsjEJ7ECdpP/AT2BwK9xihzEsqMPE8gl8lmnlTB8HY22T7FB6KeIBoePsdTLAczn9FT/Yi 4kkRyt1zp2/NJ3eQzYd8RauMecDXHjWklnAcJLDCMhqzx97x821+eKkw2qYqiaXhirBI6g 4gQEvRUk2DBBB6dmy9rsSjyO4mIOj/sz0MM+4070Z6XI1cyy34HYyOX9bmNrXunzZZOq1/ iwWmwfJfZ/Dtznf/ThkDUjPE0E+uDBg2g9GhEE04Ukh4XKXNxHPibUHzKT1Vpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=439da7f06dcea5af17e7d5b3b4784e54207194ac commit 439da7f06dcea5af17e7d5b3b4784e54207194ac Author: Kristof Provost AuthorDate: 2021-11-30 15:30:22 +0000 Commit: Kristof Provost CommitDate: 2021-11-30 16:35:15 +0000 if_stf: KASAN fix In in_stf_input() we grabbed a pointer to the IPv4 header and later did an m_pullup() before we look at the IPv6 header. However, m_pullup() could rearrange the mbuf chain and potentially invalidate the pointer to the IPv4 header. Avoid this issue by copying the IP header rather than getting a pointer to it. Reported by: markj, Jenkins (KASAN job) Reviewed by: markj MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33192 --- sys/net/if_stf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index 7807c6ebe7e9..51ea0a61ae0d 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -727,7 +727,7 @@ static int in_stf_input(struct mbuf *m, int off, int proto, void *arg) { struct stf_softc *sc = arg; - struct ip *ip; + struct ip ip; struct ip6_hdr *ip6; u_int8_t otos, itos; struct ifnet *ifp; @@ -743,7 +743,7 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) return (IPPROTO_DONE); } - ip = mtod(m, struct ip *); + m_copydata(m, 0, sizeof(struct ip), (caddr_t)&ip); if (sc == NULL || (STF2IFP(sc)->if_flags & IFF_UP) == 0) { m_freem(m); SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); @@ -760,14 +760,14 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) * perform sanity check against outer src/dst. * for source, perform ingress filter as well. */ - if (stf_checkaddr4(sc, &ip->ip_dst, NULL) < 0 || - stf_checkaddr4(sc, &ip->ip_src, m->m_pkthdr.rcvif) < 0) { + if (stf_checkaddr4(sc, &ip.ip_dst, NULL) < 0 || + stf_checkaddr4(sc, &ip.ip_src, m->m_pkthdr.rcvif) < 0) { m_freem(m); SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); } - otos = ip->ip_tos; + otos = ip.ip_tos; m_adj(m, off); if (m->m_len < sizeof(*ip6)) { @@ -795,8 +795,8 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) * reject packets with private address range. * (requirement from RFC3056 section 2 1st paragraph) */ - if ((IN6_IS_ADDR_6TO4(&ip6->ip6_src) && isrfc1918addr(&ip->ip_src)) || - (IN6_IS_ADDR_6TO4(&ip6->ip6_dst) && isrfc1918addr(&ip->ip_dst))) { + if ((IN6_IS_ADDR_6TO4(&ip6->ip6_src) && isrfc1918addr(&ip.ip_src)) || + (IN6_IS_ADDR_6TO4(&ip6->ip6_dst) && isrfc1918addr(&ip.ip_dst))) { m_freem(m); SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__); return (IPPROTO_DONE); From nobody Tue Nov 30 17:45:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 523DD18BA387; Tue, 30 Nov 2021 17:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3V4B6f10z3Bmm; Tue, 30 Nov 2021 17:45:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF6121AA1E; Tue, 30 Nov 2021 17:45: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 1AUHjUoS048272; Tue, 30 Nov 2021 17:45:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUHjULo048271; Tue, 30 Nov 2021 17:45:30 GMT (envelope-from git) Date: Tue, 30 Nov 2021 17:45:30 GMT Message-Id: <202111301745.1AUHjULo048271@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 E=C3=9Fer?= Subject: git: 10041e99a0c2 - main - contrib/bc: merge version 5.2.1 from vendor branch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 10041e99a0c29c9f99c4148fc173bb12dd26aa8d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638294330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+8l3On0ylvBrNm3V9Rw+gW/AKeAQdzHRwMZlO7y72S8=; b=Ac0tcm+fjEJn25IGGeMokEcsH3hsoahDyLKfcZdnAeemsLEv9180si2WUGcAmyDjBXa8rK AZmMzPOOkD5N6mWqz6a2BoZHaBj8sXra6z5EU8JAc0JLF/d5vwAxw7r09kIz9mZE0kqovB nGkikYQZHO7WfhZQVGMTHywSuQC2yU5/MfoycoyKZDq/VbGFd4VrsTzFU0GKAI1JcbgVqR MNoPGwSPGbEp7cGmIIyBontkfBkYFmdSs/OllACU0SM5U1A2hogThsLEPkzoFCTL6ZF2Qc jkQuupEnLfrx+hrhrc10FieOuu0KPzkTFlltws8DS0toL2RzFMJ/OhR913HG6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638294330; a=rsa-sha256; cv=none; b=yBDkrhHO8kX6vAxuKhMCzWZ+oZEXNNp9qlseZ2AZl2nWXHk6FB4d3mhzQ3QyMMG6In2Jys S6LKmbq4Gl7+Gkd0yNngGzLcVH1kQVElSUgpx93m42wPw3B6udT5pB0dsys1JQYeprTo6M LQYNLL7STumGauAmDdFn8gYOLGAnTA+R1Y2T/HvLHIrbb194Q9ZTuWLkpyTmNuZ8Wi6iY7 TuPxX8RaNV8qbgzYhq6mErk+4AtpLMVyMe8TzgeAROP01hs94sgShnPDtaKqg6H+nQZUD6 vIkUHvVtnmmXdFJ396CKcBWbY9MVdUAA+KI3Zq89PyGJSmDgnJ6z7WFa2LWzyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=10041e99a0c29c9f99c4148fc173bb12dd26aa8d commit 10041e99a0c29c9f99c4148fc173bb12dd26aa8d Merge: 439da7f06dce e63540eed295 Author: Stefan Eßer AuthorDate: 2021-11-30 17:40:32 +0000 Commit: Stefan Eßer CommitDate: 2021-11-30 17:40:32 +0000 contrib/bc: merge version 5.2.1 from vendor branch Merge commit 'e63540eed295749528548c2e3a90f5a6e57275c8' contrib/bc/Makefile.in | 204 +++++++++++++++++++-------------- contrib/bc/NEWS.md | 20 ++++ contrib/bc/README.md | 60 +++++++--- contrib/bc/bcl.pc.in | 8 ++ contrib/bc/configure.sh | 200 ++++++++++++++++++++++++-------- contrib/bc/gen/bc_help.txt | 7 ++ contrib/bc/gen/dc_help.txt | 7 ++ contrib/bc/include/status.h | 12 ++ contrib/bc/include/version.h | 2 +- contrib/bc/include/vm.h | 6 + contrib/bc/locales/de_DE.ISO8859-1.msg | 10 +- contrib/bc/locales/de_DE.UTF-8.msg | 10 +- contrib/bc/locales/en_US.msg | 10 +- contrib/bc/locales/es_ES.ISO8859-1.msg | 10 +- contrib/bc/locales/es_ES.UTF-8.msg | 10 +- contrib/bc/locales/fr_FR.ISO8859-1.msg | 10 +- contrib/bc/locales/fr_FR.UTF-8.msg | 10 +- contrib/bc/locales/ja_JP.UTF-8.msg | 10 +- contrib/bc/locales/ja_JP.eucJP.msg | 10 +- contrib/bc/locales/nl_NL.ISO8859-1.msg | 10 +- contrib/bc/locales/nl_NL.UTF-8.msg | 10 +- contrib/bc/locales/pl_PL.ISO8859-2.msg | 10 +- contrib/bc/locales/pl_PL.UTF-8.msg | 10 +- contrib/bc/locales/pt_PT.ISO8859-1.msg | 10 +- contrib/bc/locales/pt_PT.UTF-8.msg | 10 +- contrib/bc/locales/ru_RU.CP1251.msg | 10 +- contrib/bc/locales/ru_RU.CP866.msg | 10 +- contrib/bc/locales/ru_RU.ISO8859-5.msg | 10 +- contrib/bc/locales/ru_RU.KOI8-R.msg | 10 +- contrib/bc/locales/ru_RU.UTF-8.msg | 10 +- contrib/bc/locales/zh_CN.GB18030.msg | 10 +- contrib/bc/locales/zh_CN.GB2312.msg | 10 +- contrib/bc/locales/zh_CN.GBK.msg | 10 +- contrib/bc/locales/zh_CN.UTF-8.msg | 10 +- contrib/bc/locales/zh_CN.eucCN.msg | 10 +- contrib/bc/manuals/bc/A.1 | 13 +++ contrib/bc/manuals/bc/A.1.md | 11 ++ contrib/bc/manuals/bc/E.1 | 13 +++ contrib/bc/manuals/bc/E.1.md | 11 ++ contrib/bc/manuals/bc/EH.1 | 13 +++ contrib/bc/manuals/bc/EH.1.md | 11 ++ contrib/bc/manuals/bc/EHN.1 | 13 +++ contrib/bc/manuals/bc/EHN.1.md | 11 ++ contrib/bc/manuals/bc/EN.1 | 13 +++ contrib/bc/manuals/bc/EN.1.md | 11 ++ contrib/bc/manuals/bc/H.1 | 13 +++ contrib/bc/manuals/bc/H.1.md | 11 ++ contrib/bc/manuals/bc/HN.1 | 13 +++ contrib/bc/manuals/bc/HN.1.md | 11 ++ contrib/bc/manuals/bc/N.1 | 13 +++ contrib/bc/manuals/bc/N.1.md | 11 ++ contrib/bc/manuals/build.md | 17 +++ contrib/bc/manuals/dc/A.1 | 13 +++ contrib/bc/manuals/dc/A.1.md | 11 ++ contrib/bc/manuals/dc/E.1 | 13 +++ contrib/bc/manuals/dc/E.1.md | 11 ++ contrib/bc/manuals/dc/EH.1 | 13 +++ contrib/bc/manuals/dc/EH.1.md | 11 ++ contrib/bc/manuals/dc/EHN.1 | 13 +++ contrib/bc/manuals/dc/EHN.1.md | 11 ++ contrib/bc/manuals/dc/EN.1 | 13 +++ contrib/bc/manuals/dc/EN.1.md | 11 ++ contrib/bc/manuals/dc/H.1 | 13 +++ contrib/bc/manuals/dc/H.1.md | 11 ++ contrib/bc/manuals/dc/HN.1 | 13 +++ contrib/bc/manuals/dc/HN.1.md | 11 ++ contrib/bc/manuals/dc/N.1 | 13 +++ contrib/bc/manuals/dc/N.1.md | 11 ++ contrib/bc/scripts/exec-install.sh | 9 +- contrib/bc/scripts/karatsuba.py | 7 +- contrib/bc/src/args.c | 2 + contrib/bc/src/bc_lex.c | 2 + contrib/bc/src/bc_parse.c | 49 +++++--- contrib/bc/src/data.c | 3 +- contrib/bc/src/dc_lex.c | 2 + contrib/bc/src/dc_parse.c | 5 +- contrib/bc/src/file.c | 37 +++++- contrib/bc/src/history.c | 95 +++++++++++---- contrib/bc/src/lex.c | 17 ++- contrib/bc/src/library.c | 18 ++- contrib/bc/src/opt.c | 2 +- contrib/bc/src/parse.c | 14 +-- contrib/bc/src/program.c | 53 ++++++++- contrib/bc/src/rand.c | 11 +- contrib/bc/src/read.c | 4 + contrib/bc/src/vm.c | 68 +++++++---- contrib/bc/tests/bc/all.txt | 1 + contrib/bc/tests/bc/misc8.txt | 8 ++ contrib/bc/tests/bc/misc8_results.txt | 3 + contrib/bc/tests/bc/posix_errors.txt | 1 + contrib/bc/tests/bc/timeconst.sh | 1 - contrib/bc/tests/history.py | 3 +- contrib/bc/tests/history.sh | 2 +- contrib/bc/vs/bc.vcxproj | 8 +- 94 files changed, 1241 insertions(+), 361 deletions(-) diff --cc contrib/bc/README.md index c46d66b7e3ea,000000000000..259ab923bfc4 mode 100644,000000..100644 --- a/contrib/bc/README.md +++ b/contrib/bc/README.md @@@ -1,419 -1,0 +1,441 @@@ +# `bc` + +***WARNING: This project has moved to [https://git.yzena.com/][20] for [these +reasons][21], though GitHub will remain a mirror.*** + +This is an implementation of the [POSIX `bc` calculator][12] that implements +[GNU `bc`][1] extensions, as well as the period (`.`) extension for the BSD +flavor of `bc`. + +For more information, see this `bc`'s full manual. + +This `bc` also includes an implementation of `dc` in the same binary, accessible +via a symbolic link, which implements all FreeBSD and GNU extensions. (If a +standalone `dc` binary is desired, `bc` can be copied and renamed to `dc`.) The +`!` command is omitted; I believe this poses security concerns and that such +functionality is unnecessary. + +For more information, see the `dc`'s full manual. + +This `bc` also provides `bc`'s math as a library with C bindings, called `bcl`. + +For more information, see the full manual for `bcl`. + +## License + +This `bc` is Free and Open Source Software (FOSS). It is offered under the BSD +2-clause License. Full license text may be found in the [`LICENSE.md`][4] file. + +## Prerequisites + +This `bc` only requires either: + +1. Windows 10 or later, or +2. A C99-compatible compiler and a (mostly) POSIX 2008-compatible system with + the XSI (X/Open System Interfaces) option group. + +Since POSIX 2008 with XSI requires the existence of a C99 compiler as `c99`, any +POSIX and XSI-compatible system will have everything needed. + +POSIX-compatible systems that are known to work: + +* Linux +* FreeBSD +* OpenBSD +* NetBSD +* Mac OSX +* Solaris* (as long as the Solaris version supports POSIX 2008) +* AIX +* HP-UX* (except for history) + +In addition, there is compatibility code to make this `bc` work on Windows. + +Please submit bug reports if this `bc` does not build out of the box on any +system. + +## Build + +This `bc` should build unmodified on any POSIX-compliant system or on Windows +starting with Windows 10 (though earlier versions may work). + - For more complex build requirements than the ones below, see the - [build manual][5]. ++For more complex build requirements than the ones below, see the [build ++manual][5]. + +### Windows + +There is no guarantee that this `bc` will work on any version of Windows earlier +than Windows 10 (I cannot test on earlier versions), but it is guaranteed to +work on Windows 10 at least. + +Also, if building with MSBuild, the MSBuild bundled with Visual Studio is +required. + +**Note**: Unlike the POSIX-compatible platforms, only one build configuration is +supported on Windows: extra math and prompt enabled, history and NLS (locale +support) disabled, with both calculators built. + +#### `bc` + - To build `bc`, you can open the `bc.sln` file in Visual Studio, select the ++To build `bc`, you can open the `vs/bc.sln` file in Visual Studio, select the +configuration, and build. + +You can also build using MSBuild with the following from the root directory: + +``` - msbuild -property:Configuration= bc.sln ++msbuild -property:Configuration= vs/bc.sln +``` + +where `` is either one of `Debug` or `Release`. + ++On Windows, the calculators are built as `vs/bin///bc.exe` and ++`vs/bin///dc.exe`, where `` can be either `Win32` or ++`x64`, and `` can be `Debug` or `Release`. ++ ++**Note**: On Windows, `dc.exe` is just copied from `bc.exe`; it is not linked. ++Patches are welcome for a way to do that. ++ +#### `bcl` (Library) + - To build the library, you can open the `bcl.sln` file in Visual Studio, select - the configuration, and build. ++To build the library, you can open the `vs/bcl.sln` file in Visual Studio, ++select the configuration, and build. + +You can also build using MSBuild with the following from the root directory: + +``` - msbuild -property:Configuration= bcl.sln ++msbuild -property:Configuration= vs/bcl.sln +``` + - where `` is either one of `Debug` or `Release`. ++where `` is either one of `Debug`, `ReleaseMD`, or `ReleaseMT`. ++ ++On Windows, the library is built as `vs/lib///bcl.lib`, where ++`` can be either `Win32` or `x64`, and `` can be `Debug`, ++`ReleaseMD`, or `ReleaseMT`. + +### POSIX-Compatible Systems + +On POSIX-compatible systems, `bc` is built as `bin/bc` and `dc` is built as - `bin/dc` by default. On Windows, they are built as `Release/bc/bc.exe` and - `Release/bc/dc.exe`. - - **Note**: On Windows, `dc.exe` is just copied from `bc.exe`; it is not linked. - Patches are welcome for a way to do that. ++`bin/dc` by default. + +#### Default + +For the default build with optimization, use the following commands in the root +directory: + +``` +./configure.sh -O3 +make +``` + +#### One Calculator + +To only build `bc`, use the following commands: + +``` +./configure.sh --disable-dc +make +``` + +To only build `dc`, use the following commands: + +``` +./configure.sh --disable-bc +make +``` + +#### Debug + +For debug builds, use the following commands in the root directory: + +``` +./configure.sh -g +make +``` + +#### Install + +To install, use the following command: + +``` +make install +``` + +By default, `bc` and `dc` will be installed in `/usr/local`. For installing in +other locations, use the `PREFIX` environment variable when running +`configure.sh` or pass the `--prefix=` option to `configure.sh`. See the +[build manual][5], or run `./configure.sh --help`, for more details. + +#### Library + +This `bc` does provide a way to build a math library with C bindings. This is +done by the `-a` or `--library` options to `configure.sh`: + +``` +./configure.sh -a +``` + +When building the library, the executables are not built. For more information, +see the [build manual][5]. + +The library API can be found in [`manuals/bcl.3.md`][26] or `man bcl` once the +library is installed. + +The library is built as `bin/libbcl.a` on POSIX-compatible systems or as +`Release/bcl/bcl.lib` on Windows. + +#### Package and Distro Maintainers + ++This section is for package and distro maintainers. ++ ++##### Out-of-Source Builds ++ ++Out-of-source builds are supported; just call `configure.sh` from the directory ++where the actual build will happen. ++ ++For example, if the source is in `bc`, the build should happen in `build`, then ++call `configure.sh` and `make` like so: ++ ++``` ++../bc/configure.sh ++make ++``` ++ ++***WARNING***: The path to `configure.sh` from the build directory must not have ++spaces because `make` does not support target names with spaces. ++ +##### Recommended Compiler + +When I ran benchmarks with my `bc` compiled under `clang`, it performed much +better than when compiled under `gcc`. I recommend compiling this `bc` with +`clang`. + +I also recommend building this `bc` with C11 if you can because `bc` will detect +a C11 compiler and add `_Noreturn` to any relevant function(s). + +##### Recommended Optimizations + +I wrote this `bc` with Separation of Concerns, which means that there are many +small functions that could be inlined. However, they are often called across +file boundaries, and the default optimizer can only look at the current file, +which means that they are not inlined. + +Thus, because of the way this `bc` is built, it will automatically be slower +than other `bc` implementations when running scripts with no math. (My `bc`'s +math is *much* faster, so any non-trivial script should run faster in my `bc`.) + +Some, or all, of the difference can be made up with the right optimizations. The +optimizations I recommend are: + +1. `-O3` +2. `-flto` (link-time optimization) + +in that order. + +Link-time optimization, in particular, speeds up the `bc` a lot. This is because +when link-time optimization is turned on, the optimizer can look across files +and inline *much* more heavily. + +However, I recommend ***NOT*** using `-march=native`. Doing so will reduce this +`bc`'s performance, at least when building with link-time optimization. See the +[benchmarks][19] for more details. + +##### Stripping Binaries + +By default, non-debug binaries are stripped, but stripping can be disabled with +the `-T` option to `configure.sh`. + +##### Using This `bc` as an Alternative + +If this `bc` is packaged as an alternative to an already existing `bc` package, +it is possible to rename it in the build to prevent name collision. To prepend +to the name, just run the following: + +``` +EXECPREFIX= ./configure.sh +``` + +To append to the name, just run the following: + +``` +EXECSUFFIX= ./configure.sh +``` + +If a package maintainer wishes to add both a prefix and a suffix, that is +allowed. + +**Note**: The suggested name (and package name) when `bc` is not available is +`bc-gh`. + +##### Karatsuba Number + +Package and distro maintainers have one tool at their disposal to build this +`bc` in the optimal configuration: `scripts/karatsuba.py`. + +This script is not a compile-time or runtime prerequisite; it is for package and +distro maintainers to run once when a package is being created. It finds the +optimal Karatsuba number (see the [algorithms manual][7] for more information) +for the machine that it is running on. + +The easiest way to run this script is with `make karatsuba`. + +If desired, maintainers can also skip running this script because there is a +sane default for the Karatsuba number. + +## Status + +This `bc` is robust. + +It is well-tested, fuzzed, and fully standards-compliant (though not certified) +with POSIX `bc`. The math has been tested with 40+ million random problems, so +it is as correct as I can make it. + +This `bc` can be used as a drop-in replacement for any existing `bc`. This `bc` +is also compatible with MinGW toolchains, though history is not supported on +Windows. + +In addition, this `bc` is considered complete; i.e., there will be no more +releases with additional features. However, it *is* actively maintained, so if +any bugs are found, they will be fixed in new releases. Also, additional +translations will also be added as they are provided. + +### Development + +If I (Gavin D. Howard) get [hit by a bus][27] and future programmers need to +handle work themselves, the best place to start is the [Development manual][28]. + +## Vim Syntax + +I have developed (using other people's code to start) [`vim` syntax files][17] +for this `bc` and `dc`, including the extensions. + +## `bc` Libs + +I have gathered some excellent [`bc` and `dc` libraries][18]. These libraries +may prove useful to any serious users. + +## Comparison to GNU `bc` + +This `bc` compares favorably to GNU `bc`. + +* This `bc` builds natively on Windows. +* It has more extensions, which make this `bc` more useful for scripting. +* This `bc` is a bit more POSIX compliant. +* It has a much less buggy parser. The GNU `bc` will give parse errors for what + is actually valid `bc` code, or should be. For example, putting an `else` on + a new line after a brace can cause GNU `bc` to give a parse error. +* This `bc` has fewer crashes. +* GNU `bc` calculates the wrong number of significant digits for `length(x)`. +* GNU `bc` will sometimes print numbers incorrectly. For example, when running + it on the file `tests/bc/power.txt` in this repo, GNU `bc` gets all the right + answers, but it fails to wrap the numbers at the proper place when outputting + to a file. +* This `bc` is faster. (See [Performance](#performance).) + +### Performance + +Because this `bc` packs more than `1` decimal digit per hardware integer, this +`bc` is faster than GNU `bc` and can be *much* faster. Full benchmarks can be +found at [manuals/benchmarks.md][19]. + +There is one instance where this `bc` is slower: if scripts are light on math. +This is because this `bc`'s intepreter is slightly slower than GNU `bc`, but +that is because it is more robust. See the [benchmarks][19]. + +## Algorithms + +To see what algorithms this `bc` uses, see the [algorithms manual][7]. + +## Locales + +Currently, there is no locale support on Windows. + +Additionally, this `bc` only has support for English (and US English), French, +German, Portuguese, Dutch, Polish, Russian, Japanese, and Chinese locales. +Patches are welcome for translations; use the existing `*.msg` files in +`locales/` as a starting point. + +In addition, patches for improvements are welcome; the last two messages in +Portuguese were made with Google Translate, and the Dutch, Polish, Russian, +Japanese, and Chinese locales were all generated with [DeepL][22]. + +The message files provided assume that locales apply to all regions where a +language is used, but this might not be true for, e.g., `fr_CA` and `fr_CH`. +Any corrections or a confirmation that the current texts are acceptable for +those regions would be appreciated, too. + +## Other Projects + +Other projects based on this bc are: + +* [busybox `bc`][8]. The busybox maintainers have made their own changes, so any + bugs in the busybox `bc` should be reported to them. + +* [toybox `bc`][9]. The maintainer has also made his own changes, so bugs in the + toybox `bc` should be reported there. + +* [FreeBSD `bc`][23]. While the `bc` in FreeBSD is kept up-to-date, it is better + to [report bugs there][24], as well as [submit patches][25], and the + maintainers of the package will contact me if necessary. + +## Language + +This `bc` is written in pure ISO C99, using POSIX 2008 APIs with custom Windows +compatibility code. + +## Commit Messages + +This `bc` uses the commit message guidelines laid out in [this blog post][10]. + +## Semantic Versioning + +This `bc` uses [semantic versioning][11]. + +## Contents + +Items labeled with `(maintainer use only)` are not included in release source +tarballs. + +Files: + + .gitignore The git ignore file (maintainer use only). + .gitattributes The git attributes file (maintainer use only). - bc.sln The Visual Studio solution file for bc. - bc.vcxproj The Visual Studio project file for bc. - bc.vcxproj.filters The Visual Studio filters file for bc. - bcl.sln The Visual Studio solution file for bcl. - bcl.vcxproj The Visual Studio project file for bcl. - bcl.vcxproj.filters The Visual Studio filters file for bcl. ++ bcl.pc.in A template pkg-config file for bcl. + configure A symlink to configure.sh to make packaging easier. + configure.sh The configure script. + LICENSE.md A Markdown form of the BSD 2-clause License. + Makefile.in The Makefile template. ++ NEWS.md The changelog. + NOTICE.md List of contributors and copyright owners. + RELEASE.md A checklist for making a release (maintainer use only). + +Folders: + + gen The bc math library, help texts, and code to generate C source. + include All header files. + locales Locale files, in .msg format. Patches welcome for translations. + manuals Manuals for both programs. + src All source code. + scripts A bunch of shell scripts to help with development and building. + tests All tests. ++ vs Files needed for the build on Windows. + +[1]: https://www.gnu.org/software/bc/ +[4]: ./LICENSE.md +[5]: ./manuals/build.md +[7]: ./manuals/algorithms.md +[8]: https://git.busybox.net/busybox/tree/miscutils/bc.c +[9]: https://github.com/landley/toybox/blob/master/toys/pending/bc.c +[10]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[11]: http://semver.org/ +[12]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html +[17]: https://git.yzena.com/gavin/vim-bc +[18]: https://git.yzena.com/gavin/bc_libs +[19]: ./manuals/benchmarks.md +[20]: https://git.yzena.com/gavin/bc +[21]: https://gavinhoward.com/2020/04/i-am-moving-away-from-github/ +[22]: https://www.deepl.com/translator +[23]: https://cgit.freebsd.org/src/tree/contrib/bc +[24]: https://bugs.freebsd.org/ +[25]: https://reviews.freebsd.org/ +[26]: ./manuals/bcl.3.md +[27]: https://en.wikipedia.org/wiki/Bus_factor +[28]: ./manuals/development.md diff --cc contrib/bc/bcl.pc.in index 000000000000,f440eeca950f..f440eeca950f mode 000000,100644..100644 --- a/contrib/bc/bcl.pc.in +++ b/contrib/bc/bcl.pc.in diff --cc contrib/bc/tests/bc/misc8.txt index 000000000000,8bef63316ef8..8bef63316ef8 mode 000000,100644..100644 --- a/contrib/bc/tests/bc/misc8.txt +++ b/contrib/bc/tests/bc/misc8.txt diff --cc contrib/bc/tests/bc/misc8_results.txt index 000000000000,daee0f1b2fbf..daee0f1b2fbf mode 000000,100644..100644 --- a/contrib/bc/tests/bc/misc8_results.txt +++ b/contrib/bc/tests/bc/misc8_results.txt From nobody Tue Nov 30 18:12:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4B34118C7FAE; Tue, 30 Nov 2021 18:12: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 4J3Vgb0DpYz3Mj1; Tue, 30 Nov 2021 18:12:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D25791AF44; Tue, 30 Nov 2021 18:12: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 1AUICgjq088429; Tue, 30 Nov 2021 18:12:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUICgqZ088428; Tue, 30 Nov 2021 18:12:42 GMT (envelope-from git) Date: Tue, 30 Nov 2021 18:12:42 GMT Message-Id: <202111301812.1AUICgqZ088428@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: 943c446629e3 - main - Revert "libc: Some enhancements to syslog(3)" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 943c446629e33739d3f72795069a5c944e8f329e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638295963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O7JOSCwYAXDVUgW7vlNjI8MzN6Py84Hf/kwSBAjnJRk=; b=FfP55uwmx2XKjeGxk+XL+MJHfo3cCmTvMzdGsZTLEWg5qkeJGn2zlucgB8up9Qo70CGrf1 qkq2D2WH5yBZSe5JN9TrcKnPBGsXltTbcN6zopFRzmGqV32ppJuvkglUb0ylcnQNZ3qxZs tWwsGkPIJCEhJa9x7cuVvlcBSuNHepHzIJ9JWfgH/cBly67LLpakIBnrZvEWlPhXcGwusk KC1mliWCeXAYTvl1rH/hYFFLSjeB1i7TX/MS19zw5prpqjUzjrYSCPLmupMlBz4W6tjJta u+73x9QKR9x8pcXzC0YZKQ5gjidwTGSTcz3Lw2OgdpaZdqXgI2iN0D5rqhHRaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638295963; a=rsa-sha256; cv=none; b=C5GmeA62iGksPzzARSIRqTRO/GFGlDQ3mZU4xlmzkr0pnoh2E7/XapgH4aiG0ev2lQiLe5 GgoCzTpFVEzHsLUlItMjeY+6ycLjBcwc2qhhdhEgv44GQN4LJst4bVN52KQaayT821YIkI 38SqM2Jo3RcjwXt4FWXRHh5g5R3Og8myRY3poWPMG1Upu4SZXp1PytFfA6lcGeGfHwADn5 9jJypL3UpRQFfMUI+TPCHjLl7kKzzzPXcQymwvhF/x8ZFxu/FuNRHIrLxYlx4deD83C4bC YDV5c+5sBhiC5m0GFwv4rV4tJlmmBsl91E/Y7EuFE0nYHNL7Gopu3dWac2E0Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=943c446629e33739d3f72795069a5c944e8f329e commit 943c446629e33739d3f72795069a5c944e8f329e Author: Alan Somers AuthorDate: 2021-11-30 17:06:25 +0000 Commit: Alan Somers CommitDate: 2021-11-30 18:11:43 +0000 Revert "libc: Some enhancements to syslog(3)" This reverts commit 2886c93d1bca231260ebc01d4205743ca781f3c7. The original commit has two problems: * It sets SO_SNDBUF to be as large as MAXLINE. But for unix domain sockets, the send buffer is bypassed. Packets go directly to the peer's receive buffer, so setting and querying SO_SNDBUF is ineffective. To ensure that the socket can accept messages of a certain size, it would be necessary to add a SO_PEERRCVBUF socket option that could query the connected peer's receive buffer size. * It sets MAXLINE to 8 kB, which is larger than the default sockbuf size of 4 kB. That's ok for the builtin syslogd, which sets its recvbuf to 80 kB, but not ok for alternative sysloggers, like rsyslogd, which use the default size. As a consequence, writing messages of more than 4 kB with syslog() as a non-root user while running rsyslogd would cause the logging application to spin indefinitely within syslog(). PR: 260126 MFC: 2 weeks Sponsored by: Axcient Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D33199 --- lib/libc/gen/syslog.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c index 797c7389d1a2..19d44db0075a 100644 --- a/lib/libc/gen/syslog.c +++ b/lib/libc/gen/syslog.c @@ -57,9 +57,6 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -/* Maximum number of characters of syslog message */ -#define MAXLINE 8192 - static int LogFile = -1; /* fd for log */ static int status; /* connection status */ static int opened; /* have done openlog() */ @@ -144,7 +141,7 @@ vsyslog1(int pri, const char *fmt, va_list ap) char ch, *p; long tz_offset; int cnt, fd, saved_errno; - char hostname[MAXHOSTNAMELEN], *stdp, tbuf[MAXLINE], fmt_cpy[MAXLINE], + char hostname[MAXHOSTNAMELEN], *stdp, tbuf[2048], fmt_cpy[1024], errstr[64], tz_sign; FILE *fp, *fmt_fp; struct bufcookie tbuf_cookie; @@ -399,19 +396,9 @@ connectlog(void) struct sockaddr_un SyslogAddr; /* AF_UNIX address of local logger */ if (LogFile == -1) { - socklen_t len; - if ((LogFile = _socket(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0)) == -1) return; - if (_getsockopt(LogFile, SOL_SOCKET, SO_SNDBUF, &len, - &(socklen_t){sizeof(len)}) == 0) { - if (len < MAXLINE) { - len = MAXLINE; - (void)_setsockopt(LogFile, SOL_SOCKET, SO_SNDBUF, - &len, sizeof(len)); - } - } } if (LogFile != -1 && status == NOCONN) { SyslogAddr.sun_len = sizeof(SyslogAddr); From nobody Tue Nov 30 18:42:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DD7C118B8F6C; Tue, 30 Nov 2021 18:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3WLG4SDnz3nDg; Tue, 30 Nov 2021 18:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 78D5F1B80C; Tue, 30 Nov 2021 18:42: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 1AUIgk2a027968; Tue, 30 Nov 2021 18:42:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUIgkBA027967; Tue, 30 Nov 2021 18:42:46 GMT (envelope-from git) Date: Tue, 30 Nov 2021 18:42:46 GMT Message-Id: <202111301842.1AUIgkBA027967@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: 1b9344add475 - main - OptionalObsoleteFiles: remove GCC remnants List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1b9344add475179e4ee6b13f25def6f44799a929 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638297766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XeHtnHmGXi2DEAaj3gWJ9O5nMrZvJZ8BY6feC/hXXjE=; b=tj2qmGqsCQg+JSR59Cl2rlInt1+cMwMInkeFJXmIjYB+0QJczNx433trYaKvJ/Mt33xHjO hfzaKCSIAKaj+wlw9x8Fr//08u9vNzaKy0E/ijiPpJRCR1F877a6mcn/HN3rQ80rYTAz47 /8J+r2s+oIDmkVHLWkPq1pi+1REuk0BnvIJ3BrjddLzYDMNW0DxCECZdratEj5XLFO8ygl PPVq+fswey/TTVgDvyXpQa9GgmztM9Fc/6TvWHOjpdpb7mC353y7cOkved2LWv4WSJEE3s VNPUrkK5NSbKtu031vfq6p5MOBb4PvPnebUD7/6smQU8VTdWLQ9FYeNGM5+oUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638297766; a=rsa-sha256; cv=none; b=U0ZqBPB0fbp54GxpDs2bk0cUQ/SBFVQHcuq/WohEPWA3Aw7cd/pSrR7s0uZ1TxKn7ACrvw l5awOCi0kAV/bevvUXnNUGJxZOMn0XJcNU4QJS/4A3FcLcDOjU0TGbmYqWvaTuLNZvnUIx 2bZLTFWrk15HnJKNEPxy9R4DKGxDr/xkaEFmQW/A+yPujAxgDvxOhz59MKDnPihEbbPYkw +jE7Lnh6RruAcVBIHPUrowpYfwvO7UNafT8nAADmUDRv06wDOG478IBGYiqsYSwziVWPww vp4qRbPHbq59jggEZTBL+Qxwqrt14Pp2I9Tg8INEK3xlxldAzwkz/WGEaVeTYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1b9344add475179e4ee6b13f25def6f44799a929 commit 1b9344add475179e4ee6b13f25def6f44799a929 Author: Ed Maste AuthorDate: 2021-11-30 18:39:21 +0000 Commit: Ed Maste CommitDate: 2021-11-30 18:41:41 +0000 OptionalObsoleteFiles: remove GCC remnants g++ and cc1plus were GCC components that are already removed unconditionally in ObsoleteFiles.inc. Reported by: jhb (in review D33108) Fixes: 57f804675e65 ("remove GCC 4.2.1 build infrastructure") Sponsored by: The FreeBSD Foundation --- tools/build/mk/OptionalObsoleteFiles.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index f09029ef9b7c..155c4fc82db6 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1644,8 +1644,6 @@ OLD_DIRS+=usr/include/fs/cuse .if ${MK_CXX} == no OLD_FILES+=usr/bin/CC OLD_FILES+=usr/bin/c++ -OLD_FILES+=usr/bin/g++ -OLD_FILES+=usr/libexec/cc1plus .endif .if ${MK_DEBUG_FILES} == no From nobody Tue Nov 30 21:14:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D146118A8BDA; Tue, 30 Nov 2021 21:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3Zhw4963z3L8X; Tue, 30 Nov 2021 21:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EE391D61A; Tue, 30 Nov 2021 21:14: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 1AULE8jm028596; Tue, 30 Nov 2021 21:14:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AULE8P0028595; Tue, 30 Nov 2021 21:14:08 GMT (envelope-from git) Date: Tue, 30 Nov 2021 21:14:08 GMT Message-Id: <202111302114.1AULE8P0028595@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: d893d9e94d71 - main - xen/dev: 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d893d9e94d71b6bd0a401ebf3d61b13bf89bb315 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638306848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u5V1au4FIU8eFLYeGIfi80mds3JWoXfxAjjN4eN9LnU=; b=hguXa7SwPz0W35Ht1ibBRiLv5/iWbEuGljgdaVKuvMb5YPVUEQ1/M0rhoGJnQxyCHRPIFY B4s4OW9+73MKJHUGYrSSrl4uyYsiXEdYTJp9XRkMzEeKuAqdk636m8XwPyeKmydwb35CnA rnG3BpJc0BmDamCwNovxPv2g9Ql0hgKgV/Ckx/bCZ1qXBj9NPBhgtR6wmIz5jb7B5bG1nI uBrh1rkt+o3dlQxyfJgJCHiGKJp1gx1nrW6qi9dKWzW/lIU+yH7NST3WyGziTAuko4p+Z9 fo6JvPK+eWJKvFufxLKoEcdeFQcGmIybc5Hr8hFTpYoDaYU/Q0ab/l2CINEdNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638306848; a=rsa-sha256; cv=none; b=tyvUHsIHHAZUberOWi84BNBZmK1A/0ibvcTDqZaotq560TRyYzIYaGQQUPA/KmoVJbIQSm nUX9hgKj6E7FyBJLpxk2d7zshR+sJ4qfpVJDRvapqanNOnqmzs+kEDer6DhVm4+U/GUVmy pzT9MyVp56vUbprGFcsYDCyR8Bvp7qsW5aSguvawAzIMmwIUqnXHrgzQBWld8QRL+GZnO0 5Abq8seWyHNzk6xuQnBigYy29XeR54Zw6KO7vBo4UYxfpR0iur5aWgSn3W/Ek5d2p2Hb/x 5mm1fjTfxsk0b/IoaWmnytDYX2yU5FtWw6GqtQ7XO+Sb8Hptq5ElDteCcARnuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d893d9e94d71b6bd0a401ebf3d61b13bf89bb315 commit d893d9e94d71b6bd0a401ebf3d61b13bf89bb315 Author: Elliott Mitchell AuthorDate: 2021-10-08 21:43:26 +0000 Commit: Mitchell Horne CommitDate: 2021-11-30 21:11:57 +0000 xen/dev: remove write-only variable This was found while looking for driver_filter_t functions which got the trap frame from the argument. This particular instance it isn't even used, so remove now lest someone else get to it first. Reviewed by: mhorne --- sys/dev/xen/debug/debug.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/xen/debug/debug.c b/sys/dev/xen/debug/debug.c index ec4585e64c62..c4562c02ed03 100644 --- a/sys/dev/xen/debug/debug.c +++ b/sys/dev/xen/debug/debug.c @@ -69,13 +69,11 @@ extern void stack_capture(struct stack *st, register_t rbp); static int -xendebug_filter(void *arg) +xendebug_filter(void *arg __unused) { #if defined(STACK) && defined(DDB) struct stack st; - struct trapframe *frame; - frame = arg; stack_zero(&st); stack_save(&st); From nobody Tue Nov 30 21:31:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BEE0C18B058A; Tue, 30 Nov 2021 21:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3b4f6zQSz3PrL; Tue, 30 Nov 2021 21:31:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CACC51DB82; Tue, 30 Nov 2021 21:31: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 1AULVEVg051083; Tue, 30 Nov 2021 21:31:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AULVEwM051082; Tue, 30 Nov 2021 21:31:14 GMT (envelope-from git) Date: Tue, 30 Nov 2021 21:31:14 GMT Message-Id: <202111302131.1AULVEwM051082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: c508b0818b24 - main - iichid(4): Perform acknowledgement of I2C device interrupt after RESET command List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c508b0818b245ea136d6538d68868cb3541f8f8f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638307875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MyVLcAq30eLPTqHgEwE1gdd0XCL/tWgaBMs2SI3RNX0=; b=rxNbiU8fIGmljcMsgIPurDPwlYYAWmgdotWlWx+KyjmN0nNswOgEvvOcGZ0sqbJggbj/Oi cNhxvB4HWH+AW7hJxfKMBvnbpQ8oWPuTCZ7dLClqoD7F2l50Qw7XFSn4EeJX8YXg5hqhZP BVk6y+4KMF6hbuslgEblSn0z3XqwN4SSAMhyaMitydXJoCKLx2cqELhmHFNuN/GlJmceHa L+poKs51NErK6xHlYtyHkJPDCm+ZWNkWKlgilh8wLswyp0+W/Qd1oh9zCEvfc9MYrNIX9x OoCEkEj9hWfXPkCcQr1NIKBoNB1nQ0/+9aNSmsc3cVyEVJ0yeBzoNHI0b6E+ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638307875; a=rsa-sha256; cv=none; b=Usu9RTpxdozzUORoSzERKRfl7v+6GhIjMSFkNzBY4cu5he6I4hop1juaweJ9tN/wXbMsmA evKolBaXjDMIQY1nVWB+KvY4I/PZyy/Kgqcrm4zH34l9YK0akK6jwfboQehIuJ86fncM8s IS7y3Rj5mXr1gk25IDdfxgS+CDeSrEw8PWD3QwPqzO7BONxPEMcUjEqudzU+DK3gcUT6Ec jyOUUJLSIgVgWjrr+HsUxaXacLkwySkqkEoBFGk1QX3tOj9J9jgfeQPMb4DV+VVmpZu6PA fKaEnPXpieR/gqVoAuZkeRbUkibH4c3DszaukaSiBnd5g2AopRF5d9FTKqEWPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=c508b0818b245ea136d6538d68868cb3541f8f8f commit c508b0818b245ea136d6538d68868cb3541f8f8f Author: Vladimir Kondratyev AuthorDate: 2021-11-30 21:29:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-11-30 21:29:50 +0000 iichid(4): Perform acknowledgement of I2C device interrupt after RESET command in sampling mode to workaround firmware bug. This fixes reboot or poweroff on frame.work laptops after first touch. Reported by: many PR: 259230 MFC after: 1 week Tested by: kevans, markj --- sys/dev/iicbus/iichid.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index d95ffb8add88..a36ed9bb8538 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -1134,6 +1134,11 @@ iichid_attach(device_t dev) &sc->sampling_hysteresis, 0, "number of missing samples before enabling of slow mode"); hid_add_dynamic_quirk(&sc->hw, HQ_IICHID_SAMPLING); + + if (sc->sampling_rate_slow >= 0) { + pause("iichid", (hz + 999) / 1000); + (void)iichid_cmd_read(sc, NULL, 0, NULL); + } #endif /* IICHID_SAMPLING */ child = device_add_child(dev, "hidbus", -1); From nobody Tue Nov 30 21:35:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 42E2818B26D9; Tue, 30 Nov 2021 21:35:31 +0000 (UTC) (envelope-from kevans@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 4J3b9Z6fwfz3h8p; Tue, 30 Nov 2021 21:35:30 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id BEAD793ED; Tue, 30 Nov 2021 21:35:30 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f178.google.com with SMTP id de30so28541755qkb.0; Tue, 30 Nov 2021 13:35:30 -0800 (PST) X-Gm-Message-State: AOAM533GPoOgZdlccIQeh6RJA7oAr77FucJZZFQY85YJyalr12byAipV mIxkD4uiRcMHWTxzHx7DCxBMvtSFkNqKEV2BbiM= X-Google-Smtp-Source: ABdhPJxCfFGTNUuKfOm+pApaABKH6jHelwfwAjqKiZiqM7mmSxe8K3aXSEreaxQ04W5Z0Q43naV8/rwitFUjlerS4yA= X-Received: by 2002:a37:b944:: with SMTP id j65mr2141046qkf.708.1638308130154; Tue, 30 Nov 2021 13:35:30 -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: <202111301334.1AUDYJEU014078@gitrepo.freebsd.org> <69d4804d-1d94-7757-5c93-0d062f9c31c0@FreeBSD.org> In-Reply-To: <69d4804d-1d94-7757-5c93-0d062f9c31c0@FreeBSD.org> From: Kyle Evans Date: Tue, 30 Nov 2021 15:35:18 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 3d9d64aa1846 - main - kern_tc: unify timecounter to bintime delta conversion To: Andriy Gapon Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638308131; 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=EoxAoeAxKwC2t61ujl5hC4/jw8GONvAweFPSZzPGfWQ=; b=IFbTHdiUQ27E1nkjLNUc+FbKAlLA0m38FF7KAkIpQimTEkTW6+48ZG+dis3nBUL7CXf+Ne 3iMxfNkze2mmcCW2jayosx9zIOl96u6Y5g4Ldq2SZ8czzpawnXBOePIU6FT0gTofaMsj/4 w7Uv7/cAct7Y4NB0HuvScvWiArnMFf0pKpUoUZDiEldp76zHisDjfnYkAInQyhSbZ2a6Ag 4MWChjmitYfe+YSIhp6cSu6SJFR0IjO2df47G6PdCV7GtdxVdrpC6yp6VQ0TJ0SU5ZR6xI AvfHnuY6Uy6WEyd77se7hJ5q/yK/s+Y7pFMeyTWnTp4oGLUa/DTLsmyrxci+Ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638308131; a=rsa-sha256; cv=none; b=jvg3AKfIAS60S2n5uvQyl4bkGyRFQy1zLBVvigA0fCeDhzHuQr9eIzNRqGP26PDl6k8rbs IIrUEPLt0zwkRL8xrus8WI2dSaNpB0LeLw9tQ3LwOFrXExBOwt+2BIqOUzbYBFZ9grWQsR 1GxVzu8/ChYQz90HmAXQSVKXQ9CXDqsNBO0HOLd4YVTJsgjiENPaSM76JfeNpTKZ09qDzZ vpxDt9Ih6kwhW02wfEb5tgeKWYUlQfc9KEiXNQFR5oWq+AN5Is1+PQQL5BEfqYmjIrq9On 8O55xsgPU9wdcfsdx0U0i5axV3/Fu9fS36beqkPXK9fp/3FU9aPYv6VEuvpC0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Tue, Nov 30, 2021 at 11:08 AM Andriy Gapon wrote: > > On 30/11/2021 18:14, Kyle Evans wrote: > > I wonder if this helps explain the behavior we saw when enabling TSC > > on VirtualBox guests. Threads doing small ~1 second or less sleeps > > would start to miss their wakeups, so we'd consistently see, e.g., > > shutdown issues after applying a high loading while we're waiting for > > bufdaemon threads. > > It very well may be the case. > The reason I arrived at this change is that we also sometimes saw the same > problem but on VMWware. That prompted me to add some diagnostic code to > sleepqueue to turn those missed wakeups into panics. > > As kib pointed out, mav recently made a change that would mask the problem as a > side effect: > https://cgit.FreeBSD.org/src/commit/?id=6df1359e5542f69179c142be1ea099d447e273d1 > But I wanted to fix the root cause anyway. > Ok, cool, thanks! I'll do some re-testing under VirtualBox and see if we can just revert this entirely: https://cgit.freebsd.org/src/commit/sys/x86/x86/tsc.c?id=8cc15b0dfc2f3299 Thanks, Kyle Evans From nobody Tue Nov 30 21:43:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BA48A18B6219; Tue, 30 Nov 2021 21:43: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 4J3bLD3WQ6z3kws; Tue, 30 Nov 2021 21:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F0531DBAB; Tue, 30 Nov 2021 21: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 1AULh0rO068290; Tue, 30 Nov 2021 21: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 1AULh031068289; Tue, 30 Nov 2021 21:43:00 GMT (envelope-from git) Date: Tue, 30 Nov 2021 21:43:00 GMT Message-Id: <202111302143.1AULh031068289@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: 3846662dab2c - main - cam: Initialize wired to 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3846662dab2c46a0d1e4532c4b7f7e317cab8883 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638308580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ANs8pUINZlI6hUd45ihENEpjtVi4xVJAS3yQ3a/Co9c=; b=R6var+MecBDlMfiqXeu6CGikZ1sieGROP/wiJb5n/EkQyIEuurAsNdFkwqALGiEcZ/1pKT MzZjsyNPDndzrpqdTmuR5QbrM5LpXWLLO0/gG2WOXRG613k0bgHLZcrMCPBjXEwCYQHgbO 14pMgc5HF5i7m7ksVRtogBL+3Paokv7CFKNAC/wSLVOiss4HOy8m6ORTbyAYbmp6uNIT7/ UisODdBIJAG4nocnaY7wjPkI5wpKlKNqyXTmNyPBtOjqY7Iq5m5N96GcofihW/jri0W7RO Q0IqcFqcn2VVn2r/sxPHcpNufH7iqUyLuFDe/KDM2OMjYbRlm4PMEks3B2kUew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638308580; a=rsa-sha256; cv=none; b=MqwydqAoH3uNSDW8AtRHM8fsufiTlL4F53Q6ILun20/Yigmp8IB660CGmjmLe+98oKEZ9l OYycSCo2+ahxp4giyCwMYB0eMF8iHH/9E9jLbVWkc38qpVVKrZPqFfDqhxK7UmPe50sPWs a72iU8uxlkpSCcwo2s8hRaSDWIQiXxH1ify728OwmzO6gXdOWcQ514GStsHOgLzJa0567v A8rnUhdy/L4eecxet95WJjsZucG5TiLei7wNke7dY2VUN+AZIoXlMecX5JzGACHGg5C0qo H7xwin+Lf+RiEdrZ+7GVQ73MzZd/KszlLUZ7z5Umksde44CX+7OLCITKMPKvrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3846662dab2c46a0d1e4532c4b7f7e317cab8883 commit 3846662dab2c46a0d1e4532c4b7f7e317cab8883 Author: Warner Losh AuthorDate: 2021-11-30 21:14:55 +0000 Commit: Warner Losh CommitDate: 2021-11-30 21:40:30 +0000 cam: Initialize wired to false As part of converting the code to a while loop, the unconditional initialization of wired to false was lost. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D33163 --- sys/cam/cam_periph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 54fe9a0ef40c..1203ac2d9b21 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -600,7 +600,7 @@ static u_int camperiphunit(struct periph_driver *p_drv, path_id_t pathid, target_id_t target, lun_id_t lun, const char *sn) { - bool wired; + bool wired = false; u_int unit; int i, val, dunit; const char *dname, *strval; From nobody Tue Nov 30 21:47:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7857118B905F; Tue, 30 Nov 2021 21:47: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 4J3bR21YdXz3m9G; Tue, 30 Nov 2021 21:47:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11C8B1DD5B; Tue, 30 Nov 2021 21:47: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 1AULl9Qc068725; Tue, 30 Nov 2021 21:47:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AULl9V9068724; Tue, 30 Nov 2021 21:47:09 GMT (envelope-from git) Date: Tue, 30 Nov 2021 21:47:09 GMT Message-Id: <202111302147.1AULl9V9068724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 1097f2f40d08 - stable/13 - evdev: Add parentheses around '-' expression in operand of '&'. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1097f2f40d08f661cfbc84755570987f09feac71 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638308830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FONdN/JNMyQC1ZzapJf67rTozn8OgpMF5DPtONOHCkA=; b=t6eALI0v7hYqSYkR3ul0nAVFOM1XlF6X+BQVZnEOylbY71R8mwxf6chw1ln9FUdA3mx6uL dQYoAs5AfBeSRysrnvr2Vdokyyvj6VKGDHveWs0si+jXi1S9w1AMWTso9ZLY+TIeA1j1mO IqvCcbABKTjY6y0306s7Bf3wK6wLPezxiu3Plo/wJjkgOc2Br7GlqOMUQehWPmRzf7QRZi 6uefb90qcO3E5Bf+F660gdoseYKyqLWKMoVaotvo1lieljL3TdvGBeS5G45ztns94awBJQ NvSjP7guoqHLtIp9bLjG3gMyp716NPpLrDDa8t2h6OeKPrnWJpt458tu+6V4vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638308830; a=rsa-sha256; cv=none; b=KFY9acm8EOYp9c/mTqyk21rjyWOGYo7vp0C93cR+v00Sow5k3hLWKbBbBDz5XyTNBNBZm7 nJDkOaSyso1c/otEqQyJLTGNjXH1P0zyISbfmbwiHt/y/X+8G4bCwuNftoQ/LY4omcjivQ FR+JVoq2QI9JjJb9mFlyjoh6clYHy3Hf+YbKa/wFvYGn1snzsZHkw556H8EsjlYzzef42k GAYI16+mEJuQc+9R/mDWUcOJl7I1JecB8Rt/+RdpIqUKQ/IuNLH3olicj/1QYnL8R0ljnJ CDLiRJdUyJdVLO1UspeHvVIb9cq9djoQCAY+m1dnJ1EZKOOczXKWReoW1mme2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=1097f2f40d08f661cfbc84755570987f09feac71 commit 1097f2f40d08f661cfbc84755570987f09feac71 Author: John Baldwin AuthorDate: 2021-09-15 16:03:18 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-11-30 21:45:30 +0000 evdev: Add parentheses around '-' expression in operand of '&'. This fixes a -Wparentheses error with GCC 9. Reviewed by: wulf Differential Revision: https://reviews.freebsd.org/D31947 (cherry picked from commit d99c87c8d54a02a229cbeaa19ec8784b1d5afbb9) --- sys/dev/evdev/evdev_mt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/evdev/evdev_mt.c b/sys/dev/evdev/evdev_mt.c index 3030a60e098a..6eb263838a61 100644 --- a/sys/dev/evdev/evdev_mt.c +++ b/sys/dev/evdev/evdev_mt.c @@ -100,7 +100,7 @@ static void evdev_mt_replay_events(struct evdev_dev *); static inline int ffc_slot(struct evdev_dev *evdev, slotset_t slots) { - return (ffs(~slots & (2U << MAXIMAL_MT_SLOT(evdev)) - 1) - 1); + return (ffs(~slots & ((2U << MAXIMAL_MT_SLOT(evdev)) - 1)) - 1); } void From nobody Tue Nov 30 21:50:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B74EE18B935F; Tue, 30 Nov 2021 21:50:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3bVR3NGJz3mgl; Tue, 30 Nov 2021 21:50:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 558841DD61; Tue, 30 Nov 2021 21:50: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 1AULo7PB071663; Tue, 30 Nov 2021 21:50:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AULo7S8071660; Tue, 30 Nov 2021 21:50:07 GMT (envelope-from git) Date: Tue, 30 Nov 2021 21:50:07 GMT Message-Id: <202111302150.1AULo7S8071660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Tuffli Subject: git: d8c1d7b6526c - main - bhyve blockif: fix blockif_candelete with Capsicum List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chuck X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8c1d7b6526c7063304cd1e938d12dec137454e2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638309007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8mNuOYZG35x949e0/KgVQo1wnFhaUc+SBmWDAXjJQPA=; b=kFB5FF3wkxMf8+IQaNm+9Eb5Xtw7MtBzkIVi3XMaTlzhrzLUohOeBYNGrAxlvGJxnIm7oE 2zJuVbBq7+tFOHe9Fk1oYG006fYGoKP2IJ9dtxBp1jqKaJSq6Z7AF4RE1Jpm4qnIFHGB9I W+CCfWzBGYeLeQu0AxY+kcdx9f802ecNRM/pEZDmrW50RY23CYV+V3lKS4h9WEzSTq9kwV ihJ2jkgJTYFpKn68Zg9cWKxBQQl6LYmtZmfb1cs2V3e+xGi1Lmp9L0I0Tu6GWyqhFRMCNW c6Envr5HDd/one1Bf29NFHqkL9ZbSCXM6GymjznNBejI1D+gpqgvYTkx8eDchg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638309007; a=rsa-sha256; cv=none; b=VyCVduwp2uyVsIkTb3+vkfnpfoy+tUVUXfdOLKsrrDe3QEfdyjt/uzygbrWgZQN99fS06Z cWAhJ9z5coixzpsjIPdi2+7lTEpriHDl38FaTkRxFWYZQDAQqyglc+658+lmO76Z974lRo i/O2XIodQSFEXlQ+ddQCzbrDTWd5Z3S31ch7CJG3e+yHM0Fm6/cbkUNzx29hHsc+ZOst+d pAhKbkpXuZ/e/bZx/F/1/WglzlrbyQXvokFjj1VcxcNCrjSYPSA5x5cL3oYXY/A9BA9w47 DF6oTzinlT/mWgexR6Hd61SXV3GyZx5Wwc+Q5x2yf0uFW8P1cL/o3n6WupPF9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=d8c1d7b6526c7063304cd1e938d12dec137454e2 commit d8c1d7b6526c7063304cd1e938d12dec137454e2 Author: Chuck Tuffli AuthorDate: 2021-12-01 05:07:32 +0000 Commit: Chuck Tuffli CommitDate: 2021-12-01 05:49:34 +0000 bhyve blockif: fix blockif_candelete with Capsicum NVMe conformance tests for the Format command failed if the backing-storage for the bhyve device was a file instead of a Zvol. The tests (and the specification) expect a Format to destroy all previously written data. The bhyve NVMe emulation implements this by trimming / deallocating all data from the backing-storage. The blockif_candelete() function indicated the file did not support deallocation (i.e. fpathconf(..., _PC_DEALLOC_PRESENT) returned FALSE) even though the kernel supported file hole punching. This occurs on builds with Capsicum enabled because blockif did not allow the fpathconf(2) right. Fix is to add CAP_FPATHCONF to the cap_rights_init(3) call. PR: 260081 Reviewed by: allanjude, markj, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33203 --- usr.sbin/bhyve/block_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/block_if.c b/usr.sbin/bhyve/block_if.c index 9d7371bec50f..d9813f30037f 100644 --- a/usr.sbin/bhyve/block_if.c +++ b/usr.sbin/bhyve/block_if.c @@ -548,7 +548,7 @@ blockif_open(nvlist_t *nvl, const char *ident) #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_FSYNC, CAP_IOCTL, CAP_READ, CAP_SEEK, - CAP_WRITE, CAP_FSTAT, CAP_EVENT); + CAP_WRITE, CAP_FSTAT, CAP_EVENT, CAP_FPATHCONF); if (ro) cap_rights_clear(&rights, CAP_FSYNC, CAP_WRITE); From nobody Tue Nov 30 22:06:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 30FDC182306B; Tue, 30 Nov 2021 22:06: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 4J3bs55t42z3ttV; Tue, 30 Nov 2021 22:06:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA83F1E115; Tue, 30 Nov 2021 22:06: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 1AUM6HMF096129; Tue, 30 Nov 2021 22:06:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUM6HhQ096128; Tue, 30 Nov 2021 22:06:17 GMT (envelope-from git) Date: Tue, 30 Nov 2021 22:06:17 GMT Message-Id: <202111302206.1AUM6HhQ096128@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: 08e781915363 - main - Make device_busy/unbusy work w/o Giant held List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 08e781915363f98f4318a864b3b5a52bd99424c6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638309977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YCFroQ5J0+9tiyHVoZa9af84Xue6+MLhc0rZQ6NhbDs=; b=kXF1+/JYpUIxzJUvMDO5/hN7yZa1+t0AkRCh45bmyWHfe9D/WUbd3dF7FYsmscP6tMN2bs lzQYRy/aK3V3b7Lf7h/VCissi04XTmMPXG1CjSv8Q9q/9X8O6XSpDrJS2sBwP9obDVhRTu UgrNWSMsP353Q3XAtXvE1pYgOycc+OGS52ZE0COlgI/LqnCEPOAh2jScIA2ZpYOKYoc4yf hKyJl6ueQJQ7OuaOxMl+e8YTPmtSUbH9j6wxaL6NPYTuvUXyAX0E6isSQR2ECl7wG29pF/ CQPdovrP9r/tjdgnbiSnY03DqtLOlbtkj/Qj/LcSCDLC8YHjU4awbSG9nv0iYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638309977; a=rsa-sha256; cv=none; b=eFYbaKJUpmkzXiAn0RsWjPzd0F+/2NfJxxoqEbpRYXCmmoutuov/qTxq2vADJaCMz1HMuN M3MFCSsoFX2MJnEACixT4518HFMFIW0UjBguNIjqpueaqfqiNjOCelbW3K21niSErLKKLL DTzRGMCB1wJQqsDrOaAOFybQWk0wz12OPNWpUqZsZNy4kNGs54IizmOIGZ+9GHOzKO6Xxk oN4lWt0DlF7p+ajyN439/4H8xCeXxFIA/7qINbrw1/kbd7Hm39Y5uCy4MiOVuZSualiy/D dMoAOjIEMTkTXTfcDFsHd0FA/ras6hzawn3jW4f4iBHhBh7g1IIG/uUa9ae0pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=08e781915363f98f4318a864b3b5a52bd99424c6 commit 08e781915363f98f4318a864b3b5a52bd99424c6 Author: Warner Losh AuthorDate: 2021-11-30 22:03:26 +0000 Commit: Warner Losh CommitDate: 2021-11-30 22:03:26 +0000 Make device_busy/unbusy work w/o Giant held The vast majority of the busy/unbusy users in the tree don't acquire Giant before calling device_busy/unbusy. However, if multiple threads are opening a file, say, that causes the device to busy/unbusy, then we can race to the root marking things busy. Create a new device_busy_locked and device_unbusy_locked that are the current implemntations of device_busy and device_unbusy. Make device_busy and unbusy acquire Giant before calling the _locked versrions. Since we never sleep in the busy/unbusy path, Giant's single threaded semantics suffice to keep this safe. Sponsored by: Netflix Reviewed by: hselasky, jhb Differential Revision: https://reviews.freebsd.org/D26284 --- sys/dev/drm2/drm_fops.c | 6 ------ sys/dev/gpio/gpiopps.c | 9 ++------- sys/dev/pccard/pccard.c | 2 +- sys/kern/subr_bus.c | 41 +++++++++++++++++------------------------ sys/sys/bus.h | 1 - 5 files changed, 20 insertions(+), 39 deletions(-) diff --git a/sys/dev/drm2/drm_fops.c b/sys/dev/drm2/drm_fops.c index 3b3be06345e5..0c8b71759292 100644 --- a/sys/dev/drm2/drm_fops.c +++ b/sys/dev/drm2/drm_fops.c @@ -157,9 +157,7 @@ int drm_open(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p) return 0; err_undo: - mtx_lock(&Giant); /* FIXME: Giant required? */ device_unbusy(dev->dev); - mtx_unlock(&Giant); dev->open_count--; sx_xunlock(&drm_global_mutex); return -retcode; @@ -273,9 +271,7 @@ static int drm_open_helper(struct cdev *kdev, int flags, int fmt, list_add(&priv->lhead, &dev->filelist); DRM_UNLOCK(dev); - mtx_lock(&Giant); /* FIXME: Giant required? */ device_busy(dev->dev); - mtx_unlock(&Giant); ret = devfs_set_cdevpriv(priv, drm_release); if (ret != 0) @@ -453,9 +449,7 @@ void drm_release(void *data) */ atomic_inc(&dev->counts[_DRM_STAT_CLOSES]); - mtx_lock(&Giant); device_unbusy(dev->dev); - mtx_unlock(&Giant); if (!--dev->open_count) { if (atomic_read(&dev->ioctl_count)) { DRM_ERROR("Device busy: %d\n", diff --git a/sys/dev/gpio/gpiopps.c b/sys/dev/gpio/gpiopps.c index 4700acf19bcd..741bfa4498a6 100644 --- a/sys/dev/gpio/gpiopps.c +++ b/sys/dev/gpio/gpiopps.c @@ -73,9 +73,7 @@ gpiopps_open(struct cdev *dev, int flags, int fmt, struct thread *td) /* We can't be unloaded while open, so mark ourselves BUSY. */ mtx_lock(&sc->pps_mtx); - if (device_get_state(sc->dev) < DS_BUSY) { - device_busy(sc->dev); - } + device_busy(sc->dev); mtx_unlock(&sc->pps_mtx); return 0; @@ -86,10 +84,6 @@ gpiopps_close(struct cdev *dev, int flags, int fmt, struct thread *td) { struct pps_softc *sc = dev->si_drv1; - /* - * Un-busy on last close. We rely on the vfs counting stuff to only call - * this routine on last-close, so we don't need any open-count logic. - */ mtx_lock(&sc->pps_mtx); device_unbusy(sc->dev); mtx_unlock(&sc->pps_mtx); @@ -113,6 +107,7 @@ gpiopps_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thre static struct cdevsw pps_cdevsw = { .d_version = D_VERSION, + .d_flags = D_TRACKCLOSE, .d_open = gpiopps_open, .d_close = gpiopps_close, .d_ioctl = gpiopps_ioctl, diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 8f19eb84725c..48d2e6973a38 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -342,7 +342,7 @@ pccard_detach_card(device_t dev) if (pf->dev == NULL) continue; state = device_get_state(pf->dev); - if (state == DS_ATTACHED || state == DS_BUSY) + if (state == DS_ATTACHED) device_detach(pf->dev); if (pf->cfe != NULL) pccard_function_disable(pf); diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 09072e1a23de..ab7de881d57d 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -140,7 +141,7 @@ struct _device { int unit; /**< current unit number */ char* nameunit; /**< name+unit e.g. foodev0 */ char* desc; /**< driver specific description */ - int busy; /**< count of calls to device_busy() */ + u_int busy; /**< count of calls to device_busy() */ device_state_t state; /**< current device state */ uint32_t devflags; /**< api level flags for device_get_flags() */ u_int flags; /**< internal device flags */ @@ -2634,13 +2635,13 @@ device_disable(device_t dev) void device_busy(device_t dev) { - if (dev->state < DS_ATTACHING) - panic("device_busy: called for unattached device"); - if (dev->busy == 0 && dev->parent) + + /* + * Mark the device as busy, recursively up the tree if this busy count + * goes 0->1. + */ + if (refcount_acquire(&dev->busy) == 0 && dev->parent != NULL) device_busy(dev->parent); - dev->busy++; - if (dev->state == DS_ATTACHED) - dev->state = DS_BUSY; } /** @@ -2649,17 +2650,12 @@ device_busy(device_t dev) void device_unbusy(device_t dev) { - if (dev->busy != 0 && dev->state != DS_BUSY && - dev->state != DS_ATTACHING) - panic("device_unbusy: called for non-busy device %s", - device_get_nameunit(dev)); - dev->busy--; - if (dev->busy == 0) { - if (dev->parent) - device_unbusy(dev->parent); - if (dev->state == DS_BUSY) - dev->state = DS_ATTACHED; - } + + /* + * Mark the device as unbsy, recursively if this is the last busy count. + */ + if (refcount_release(&dev->busy) && dev->parent != NULL) + device_unbusy(dev->parent); } /** @@ -3004,10 +3000,7 @@ device_attach(device_t dev) attachentropy = (uint16_t)(get_cyclecount() - attachtime); random_harvest_direct(&attachentropy, sizeof(attachentropy), RANDOM_ATTACH); device_sysctl_update(dev); - if (dev->busy) - dev->state = DS_BUSY; - else - dev->state = DS_ATTACHED; + dev->state = DS_ATTACHED; dev->flags &= ~DF_DONENOMATCH; EVENTHANDLER_DIRECT_INVOKE(device_attach, dev); devadded(dev); @@ -3038,7 +3031,7 @@ device_detach(device_t dev) GIANT_REQUIRED; PDEBUG(("%s", DEVICENAME(dev))); - if (dev->state == DS_BUSY) + if (dev->busy > 0) return (EBUSY); if (dev->state == DS_ATTACHING) { device_printf(dev, "device in attaching state! Deferring detach.\n"); @@ -3090,7 +3083,7 @@ int device_quiesce(device_t dev) { PDEBUG(("%s", DEVICENAME(dev))); - if (dev->state == DS_BUSY) + if (dev->busy > 0) return (EBUSY); if (dev->state != DS_ATTACHED) return (0); diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 0942b7246ae4..4a1afa864c2f 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -58,7 +58,6 @@ typedef enum device_state { DS_ALIVE = 20, /**< @brief probe succeeded */ DS_ATTACHING = 25, /**< @brief currently attaching */ DS_ATTACHED = 30, /**< @brief attach method called */ - DS_BUSY = 40 /**< @brief device is open */ } device_state_t; /** From nobody Tue Nov 30 22:21:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D936F18A27DF; Tue, 30 Nov 2021 22:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3cB749Hsz4SVY; Tue, 30 Nov 2021 22:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F9C31E4CF; Tue, 30 Nov 2021 22:21: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 1AUML3Xo017837; Tue, 30 Nov 2021 22:21:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUML3xS017836; Tue, 30 Nov 2021 22:21:03 GMT (envelope-from git) Date: Tue, 30 Nov 2021 22:21:03 GMT Message-Id: <202111302221.1AUML3xS017836@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: 25c49c426c6b - main - Revert "Make device_busy/unbusy work w/o Giant held" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 25c49c426c6b6067f7374fae39fb38333cd11e0c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638310863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bd36ILyr5EbAqOoj9u04Au2BzC+jtNzC8O8NUlcbs8s=; b=r4sdCDywY78iNWhyW/ai7efVW7QqKqdVCWInRnNgPxObo8LkzqCl7N2FEYt6XbW+OUEpac EB5IT6VaufS3USYwhILd6dRTmcIKK/FGoZBlfvqCfw/wXTGMgj8vBxQfLRo+0c4pgpc31X 71K0B7emh/HX3dA+imCBhuUvrOtjedBVWgYQ8eJ7Dj30/EMcS9nLqU4Mvcs5bSMvbrUDm7 LL4aUuPNZFxHICdVJnqymjSyXB6m+GbJI7VZrW1NJQTUeLCaRhXc3egNTPzAKtvQGHeapA uFcg/2RZvIJFCq6zOvMpxFxreQ3xjHURrsQpKozVjJO9NSEYUHrC9tLBDQ2i+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638310863; a=rsa-sha256; cv=none; b=EnMrm4vWRvmrd8wodJheryHXEM6a+Qtp7G/C0q+eIdM9i3F6uvoEcRtA1V5KzIKGDMn3n7 okOOWjfhxtPaeashDpPCqwKWwzdAiYH1OJqRZHkIrVU4AUCcc492os5OPJVcjVU4G4liSz 90z5F50bh7qpZQyJZlfIRh6dgAyHNfFTXXJqljVpZ/Htk6gQ/dTEDPUc/6H0WpIXE/WB61 xQqMV/uoeaoNI8irZjB557snPQ7ZdGwFmKP4ILlHMPQ+Cqzz25qD8jiznBDhlJ0BWd2tb2 TbrOIwN67Q+NttAhReqT/v/0TDteB8VXlUV1F/m53eg2cI10wKqeB80/am1khA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=25c49c426c6b6067f7374fae39fb38333cd11e0c commit 25c49c426c6b6067f7374fae39fb38333cd11e0c Author: Warner Losh AuthorDate: 2021-11-30 22:12:22 +0000 Commit: Warner Losh CommitDate: 2021-11-30 22:17:07 +0000 Revert "Make device_busy/unbusy work w/o Giant held" This reverts commit 08e781915363f98f4318a864b3b5a52bd99424c6. Commit message was for a very old version of the patch. Will re-commit with the right one since it's so bad. There's no locked versions of it...that code was reworked to use refcnt APIs. Noticed by: jhb, jtrc27 Sponsored by: Netflix --- sys/dev/drm2/drm_fops.c | 6 ++++++ sys/dev/gpio/gpiopps.c | 9 +++++++-- sys/dev/pccard/pccard.c | 2 +- sys/kern/subr_bus.c | 41 ++++++++++++++++++++++++----------------- sys/sys/bus.h | 1 + 5 files changed, 39 insertions(+), 20 deletions(-) diff --git a/sys/dev/drm2/drm_fops.c b/sys/dev/drm2/drm_fops.c index 0c8b71759292..3b3be06345e5 100644 --- a/sys/dev/drm2/drm_fops.c +++ b/sys/dev/drm2/drm_fops.c @@ -157,7 +157,9 @@ int drm_open(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p) return 0; err_undo: + mtx_lock(&Giant); /* FIXME: Giant required? */ device_unbusy(dev->dev); + mtx_unlock(&Giant); dev->open_count--; sx_xunlock(&drm_global_mutex); return -retcode; @@ -271,7 +273,9 @@ static int drm_open_helper(struct cdev *kdev, int flags, int fmt, list_add(&priv->lhead, &dev->filelist); DRM_UNLOCK(dev); + mtx_lock(&Giant); /* FIXME: Giant required? */ device_busy(dev->dev); + mtx_unlock(&Giant); ret = devfs_set_cdevpriv(priv, drm_release); if (ret != 0) @@ -449,7 +453,9 @@ void drm_release(void *data) */ atomic_inc(&dev->counts[_DRM_STAT_CLOSES]); + mtx_lock(&Giant); device_unbusy(dev->dev); + mtx_unlock(&Giant); if (!--dev->open_count) { if (atomic_read(&dev->ioctl_count)) { DRM_ERROR("Device busy: %d\n", diff --git a/sys/dev/gpio/gpiopps.c b/sys/dev/gpio/gpiopps.c index 741bfa4498a6..4700acf19bcd 100644 --- a/sys/dev/gpio/gpiopps.c +++ b/sys/dev/gpio/gpiopps.c @@ -73,7 +73,9 @@ gpiopps_open(struct cdev *dev, int flags, int fmt, struct thread *td) /* We can't be unloaded while open, so mark ourselves BUSY. */ mtx_lock(&sc->pps_mtx); - device_busy(sc->dev); + if (device_get_state(sc->dev) < DS_BUSY) { + device_busy(sc->dev); + } mtx_unlock(&sc->pps_mtx); return 0; @@ -84,6 +86,10 @@ gpiopps_close(struct cdev *dev, int flags, int fmt, struct thread *td) { struct pps_softc *sc = dev->si_drv1; + /* + * Un-busy on last close. We rely on the vfs counting stuff to only call + * this routine on last-close, so we don't need any open-count logic. + */ mtx_lock(&sc->pps_mtx); device_unbusy(sc->dev); mtx_unlock(&sc->pps_mtx); @@ -107,7 +113,6 @@ gpiopps_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thre static struct cdevsw pps_cdevsw = { .d_version = D_VERSION, - .d_flags = D_TRACKCLOSE, .d_open = gpiopps_open, .d_close = gpiopps_close, .d_ioctl = gpiopps_ioctl, diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 48d2e6973a38..8f19eb84725c 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -342,7 +342,7 @@ pccard_detach_card(device_t dev) if (pf->dev == NULL) continue; state = device_get_state(pf->dev); - if (state == DS_ATTACHED) + if (state == DS_ATTACHED || state == DS_BUSY) device_detach(pf->dev); if (pf->cfe != NULL) pccard_function_disable(pf); diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index ab7de881d57d..09072e1a23de 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -141,7 +140,7 @@ struct _device { int unit; /**< current unit number */ char* nameunit; /**< name+unit e.g. foodev0 */ char* desc; /**< driver specific description */ - u_int busy; /**< count of calls to device_busy() */ + int busy; /**< count of calls to device_busy() */ device_state_t state; /**< current device state */ uint32_t devflags; /**< api level flags for device_get_flags() */ u_int flags; /**< internal device flags */ @@ -2635,13 +2634,13 @@ device_disable(device_t dev) void device_busy(device_t dev) { - - /* - * Mark the device as busy, recursively up the tree if this busy count - * goes 0->1. - */ - if (refcount_acquire(&dev->busy) == 0 && dev->parent != NULL) + if (dev->state < DS_ATTACHING) + panic("device_busy: called for unattached device"); + if (dev->busy == 0 && dev->parent) device_busy(dev->parent); + dev->busy++; + if (dev->state == DS_ATTACHED) + dev->state = DS_BUSY; } /** @@ -2650,12 +2649,17 @@ device_busy(device_t dev) void device_unbusy(device_t dev) { - - /* - * Mark the device as unbsy, recursively if this is the last busy count. - */ - if (refcount_release(&dev->busy) && dev->parent != NULL) - device_unbusy(dev->parent); + if (dev->busy != 0 && dev->state != DS_BUSY && + dev->state != DS_ATTACHING) + panic("device_unbusy: called for non-busy device %s", + device_get_nameunit(dev)); + dev->busy--; + if (dev->busy == 0) { + if (dev->parent) + device_unbusy(dev->parent); + if (dev->state == DS_BUSY) + dev->state = DS_ATTACHED; + } } /** @@ -3000,7 +3004,10 @@ device_attach(device_t dev) attachentropy = (uint16_t)(get_cyclecount() - attachtime); random_harvest_direct(&attachentropy, sizeof(attachentropy), RANDOM_ATTACH); device_sysctl_update(dev); - dev->state = DS_ATTACHED; + if (dev->busy) + dev->state = DS_BUSY; + else + dev->state = DS_ATTACHED; dev->flags &= ~DF_DONENOMATCH; EVENTHANDLER_DIRECT_INVOKE(device_attach, dev); devadded(dev); @@ -3031,7 +3038,7 @@ device_detach(device_t dev) GIANT_REQUIRED; PDEBUG(("%s", DEVICENAME(dev))); - if (dev->busy > 0) + if (dev->state == DS_BUSY) return (EBUSY); if (dev->state == DS_ATTACHING) { device_printf(dev, "device in attaching state! Deferring detach.\n"); @@ -3083,7 +3090,7 @@ int device_quiesce(device_t dev) { PDEBUG(("%s", DEVICENAME(dev))); - if (dev->busy > 0) + if (dev->state == DS_BUSY) return (EBUSY); if (dev->state != DS_ATTACHED) return (0); diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 4a1afa864c2f..0942b7246ae4 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -58,6 +58,7 @@ typedef enum device_state { DS_ALIVE = 20, /**< @brief probe succeeded */ DS_ATTACHING = 25, /**< @brief currently attaching */ DS_ATTACHED = 30, /**< @brief attach method called */ + DS_BUSY = 40 /**< @brief device is open */ } device_state_t; /** From nobody Tue Nov 30 22:21:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1F56618A28CF; Tue, 30 Nov 2021 22:21:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3cB85F5pz4SVc; Tue, 30 Nov 2021 22:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 954AB1E3BC; Tue, 30 Nov 2021 22:21: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 1AUML41h017861; Tue, 30 Nov 2021 22:21:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUML4IA017860; Tue, 30 Nov 2021 22:21:04 GMT (envelope-from git) Date: Tue, 30 Nov 2021 22:21:04 GMT Message-Id: <202111302221.1AUML4IA017860@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: 1c7d15b03071 - main - Make device_busy/unbusy work w/o Giant held List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1c7d15b030718d9d8cc70916fe3216a19f30896b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638310864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vVy2s7pq9PPiUfbVXP+2iuhrwzIYN53wuXxrcir+zSA=; b=SC3nho4js6RnaP35i51Ejp3lNljBS46xwS/k3M2UwMcoiiTOGCLMaMbuj5pMEJ4kmsfv0O 13yuNoSUt6cJ0Lfr7a2mHgm6aBTOFr1LosDhY397+XZ7Km7Cgj0WjSGEGFyLSMBBE/BbEG m7Z2Nzxiucy2sL3rjpJ4X3u8s9rR7qveCZ8iVAIkOv1nR77/66rJhDowSvmMM6FcLVlN4f 1VwV9OpBZPtd1NjgWKef6O0xgdkpe/J6WOKLZn7FSXaGOvxDXNyEdWX5PN9w8AnwOMCuys SpNoBDdJyXVnknaCRbdAWcvNQuNZivXTDcS7kjqFYLx9/tDckTVhUVWR8n6u6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638310864; a=rsa-sha256; cv=none; b=FbaaQuT+ATSS6Yl9wYeSEeQeYx5SBgoIyz+hu+iE3gPce1iUi5V7M2G6PcM+96f7QTvZlc PUCIm4ja4YkAbberMhOjpy9oRZLJR88dv6Wio8Nw1B/5wsxC2B02uOiQuJyCTp97zxKK7q NMt1oF7JvMxuJYrqN77GfIhcjE2YaTvHdi9Kxr7T6MmZa9hdDBbNglsBQKZFp1+EJT92ZY Q2daqo6XECtlJVZzAc2z9GOyf/V/FZFkapNbst/ocl3S2OmuojwTvtaFPLjp6CL9W9uASg 7CCVKEHjKEm9Mm8L0sHzw81rix1FW5V62H+oAAljjHJOUGsJtXeszF3Sg4SkKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1c7d15b030718d9d8cc70916fe3216a19f30896b commit 1c7d15b030718d9d8cc70916fe3216a19f30896b Author: Warner Losh AuthorDate: 2021-11-30 22:03:26 +0000 Commit: Warner Losh CommitDate: 2021-11-30 22:18:01 +0000 Make device_busy/unbusy work w/o Giant held The vast majority of the busy/unbusy users in the tree don't acquire Giant before calling device_busy/unbusy. However, if multiple threads are opening a file, say, that causes the device to busy/unbusy, then we can race to the root marking things busy. Move to using a reference count to keep track of how many times a device_t has been made busy. Use that count to make the same decisions that we'd make with the old device state. Note: gpiopps.c uses D_TRACKCLOSE. Others do as well. However, there's a known race with closes that will be corrected for all the drivers that do this in a future commit. Sponsored by: Netflix Reviewed by: hselasky, jhb Differential Revision: https://reviews.freebsd.org/D26284 --- sys/dev/drm2/drm_fops.c | 6 ------ sys/dev/gpio/gpiopps.c | 9 ++------- sys/dev/pccard/pccard.c | 2 +- sys/kern/subr_bus.c | 41 +++++++++++++++++------------------------ sys/sys/bus.h | 1 - 5 files changed, 20 insertions(+), 39 deletions(-) diff --git a/sys/dev/drm2/drm_fops.c b/sys/dev/drm2/drm_fops.c index 3b3be06345e5..0c8b71759292 100644 --- a/sys/dev/drm2/drm_fops.c +++ b/sys/dev/drm2/drm_fops.c @@ -157,9 +157,7 @@ int drm_open(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p) return 0; err_undo: - mtx_lock(&Giant); /* FIXME: Giant required? */ device_unbusy(dev->dev); - mtx_unlock(&Giant); dev->open_count--; sx_xunlock(&drm_global_mutex); return -retcode; @@ -273,9 +271,7 @@ static int drm_open_helper(struct cdev *kdev, int flags, int fmt, list_add(&priv->lhead, &dev->filelist); DRM_UNLOCK(dev); - mtx_lock(&Giant); /* FIXME: Giant required? */ device_busy(dev->dev); - mtx_unlock(&Giant); ret = devfs_set_cdevpriv(priv, drm_release); if (ret != 0) @@ -453,9 +449,7 @@ void drm_release(void *data) */ atomic_inc(&dev->counts[_DRM_STAT_CLOSES]); - mtx_lock(&Giant); device_unbusy(dev->dev); - mtx_unlock(&Giant); if (!--dev->open_count) { if (atomic_read(&dev->ioctl_count)) { DRM_ERROR("Device busy: %d\n", diff --git a/sys/dev/gpio/gpiopps.c b/sys/dev/gpio/gpiopps.c index 4700acf19bcd..741bfa4498a6 100644 --- a/sys/dev/gpio/gpiopps.c +++ b/sys/dev/gpio/gpiopps.c @@ -73,9 +73,7 @@ gpiopps_open(struct cdev *dev, int flags, int fmt, struct thread *td) /* We can't be unloaded while open, so mark ourselves BUSY. */ mtx_lock(&sc->pps_mtx); - if (device_get_state(sc->dev) < DS_BUSY) { - device_busy(sc->dev); - } + device_busy(sc->dev); mtx_unlock(&sc->pps_mtx); return 0; @@ -86,10 +84,6 @@ gpiopps_close(struct cdev *dev, int flags, int fmt, struct thread *td) { struct pps_softc *sc = dev->si_drv1; - /* - * Un-busy on last close. We rely on the vfs counting stuff to only call - * this routine on last-close, so we don't need any open-count logic. - */ mtx_lock(&sc->pps_mtx); device_unbusy(sc->dev); mtx_unlock(&sc->pps_mtx); @@ -113,6 +107,7 @@ gpiopps_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thre static struct cdevsw pps_cdevsw = { .d_version = D_VERSION, + .d_flags = D_TRACKCLOSE, .d_open = gpiopps_open, .d_close = gpiopps_close, .d_ioctl = gpiopps_ioctl, diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 8f19eb84725c..48d2e6973a38 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -342,7 +342,7 @@ pccard_detach_card(device_t dev) if (pf->dev == NULL) continue; state = device_get_state(pf->dev); - if (state == DS_ATTACHED || state == DS_BUSY) + if (state == DS_ATTACHED) device_detach(pf->dev); if (pf->cfe != NULL) pccard_function_disable(pf); diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 09072e1a23de..ab7de881d57d 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -140,7 +141,7 @@ struct _device { int unit; /**< current unit number */ char* nameunit; /**< name+unit e.g. foodev0 */ char* desc; /**< driver specific description */ - int busy; /**< count of calls to device_busy() */ + u_int busy; /**< count of calls to device_busy() */ device_state_t state; /**< current device state */ uint32_t devflags; /**< api level flags for device_get_flags() */ u_int flags; /**< internal device flags */ @@ -2634,13 +2635,13 @@ device_disable(device_t dev) void device_busy(device_t dev) { - if (dev->state < DS_ATTACHING) - panic("device_busy: called for unattached device"); - if (dev->busy == 0 && dev->parent) + + /* + * Mark the device as busy, recursively up the tree if this busy count + * goes 0->1. + */ + if (refcount_acquire(&dev->busy) == 0 && dev->parent != NULL) device_busy(dev->parent); - dev->busy++; - if (dev->state == DS_ATTACHED) - dev->state = DS_BUSY; } /** @@ -2649,17 +2650,12 @@ device_busy(device_t dev) void device_unbusy(device_t dev) { - if (dev->busy != 0 && dev->state != DS_BUSY && - dev->state != DS_ATTACHING) - panic("device_unbusy: called for non-busy device %s", - device_get_nameunit(dev)); - dev->busy--; - if (dev->busy == 0) { - if (dev->parent) - device_unbusy(dev->parent); - if (dev->state == DS_BUSY) - dev->state = DS_ATTACHED; - } + + /* + * Mark the device as unbsy, recursively if this is the last busy count. + */ + if (refcount_release(&dev->busy) && dev->parent != NULL) + device_unbusy(dev->parent); } /** @@ -3004,10 +3000,7 @@ device_attach(device_t dev) attachentropy = (uint16_t)(get_cyclecount() - attachtime); random_harvest_direct(&attachentropy, sizeof(attachentropy), RANDOM_ATTACH); device_sysctl_update(dev); - if (dev->busy) - dev->state = DS_BUSY; - else - dev->state = DS_ATTACHED; + dev->state = DS_ATTACHED; dev->flags &= ~DF_DONENOMATCH; EVENTHANDLER_DIRECT_INVOKE(device_attach, dev); devadded(dev); @@ -3038,7 +3031,7 @@ device_detach(device_t dev) GIANT_REQUIRED; PDEBUG(("%s", DEVICENAME(dev))); - if (dev->state == DS_BUSY) + if (dev->busy > 0) return (EBUSY); if (dev->state == DS_ATTACHING) { device_printf(dev, "device in attaching state! Deferring detach.\n"); @@ -3090,7 +3083,7 @@ int device_quiesce(device_t dev) { PDEBUG(("%s", DEVICENAME(dev))); - if (dev->state == DS_BUSY) + if (dev->busy > 0) return (EBUSY); if (dev->state != DS_ATTACHED) return (0); diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 0942b7246ae4..4a1afa864c2f 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -58,7 +58,6 @@ typedef enum device_state { DS_ALIVE = 20, /**< @brief probe succeeded */ DS_ATTACHING = 25, /**< @brief currently attaching */ DS_ATTACHED = 30, /**< @brief attach method called */ - DS_BUSY = 40 /**< @brief device is open */ } device_state_t; /** From nobody Tue Nov 30 22:46:17 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B631218B09D8; Tue, 30 Nov 2021 22:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3clG1XVQz4dCV; Tue, 30 Nov 2021 22:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 061DB1E547; Tue, 30 Nov 2021 22:46: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 1AUMkHBu049022; Tue, 30 Nov 2021 22:46:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUMkHIw049021; Tue, 30 Nov 2021 22:46:17 GMT (envelope-from git) Date: Tue, 30 Nov 2021 22:46:17 GMT Message-Id: <202111302246.1AUMkHIw049021@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 7af8903bf31f - stable/13 - ktls.4: fix openssl-devel port 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: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7af8903bf31f7d58ec00399df2cbbb6ea4846123 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638312378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h09+SPA53t5+6ZkDD+qI1bY+8T6XL439FeafvsmL9+0=; b=kwmzSXey6TIJZ3lYQeeMSLPXTsCaiPqszQ+4CRT8L1JZ6r0hQsnw5/XyHvlyBWBtyOhiwC o7llxEPX7OLQYcFSyCTqu8YsA+IexdGqYzrWRecq6NDlM5ex7erBHPcsrT2BpX075519ha uU1WFZ9JrpCxgbMrqaVIeSR7YF0kYlj/ve8vpyGB0yijxS0keT+QulPNZFcSC8YCCa134i w830yfegAalmcD2vPLIHc1jb2lqYB/f69OHPrNzLRVU1IfDqRRPOho3OdfmpIXpLdbaG67 TvJjjlTF5mVN9g14d/7pAgo1laU1IVJs6KnXkqODjj8FZf7zDIStBfNAKXTOQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638312378; a=rsa-sha256; cv=none; b=YI8hqzQk8LzDWsPqa/5pCJt+ZVDWRZIk8ACN3nCiwPfrWUeRV6v5kiWtDFYzli30Hb+Zyz 2fUSsyBRTOlLGZDTIJbSFRyB97ZQ2HG4BU8xhYbMQa5HPWp+X7ZXlFzw/xNgNSwvmATRZf 2WGvyQterGjT8bOHNSvWa1rkObpKj6u0nyjYupm2e7ac9/UGR+teN/xY0nUBxauNbePM5v XGHV7HJgqwAVwk7qpfsQG5rqQcO/5PRubLHBhms07g7otngGDYJQxJ/uxfkt17nHuyy1Bx iNBkm3OCvBsByeLJn/Bdu9tjC2BArzEnG5EKV7+4B/0pGksq6ysAtF0frYQFHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by osa (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7af8903bf31f7d58ec00399df2cbbb6ea4846123 commit 7af8903bf31f7d58ec00399df2cbbb6ea4846123 Author: Sergey A. Osokin AuthorDate: 2021-11-12 14:31:48 +0000 Commit: Sergey A. Osokin CommitDate: 2021-11-30 22:45:44 +0000 ktls.4: fix openssl-devel port name PR: 259630 (cherry picked from commit b39a93b18ef17dcb1897186b1f01999337b9f8b9) --- share/man/man4/ktls.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/ktls.4 b/share/man/man4/ktls.4 index 648eeaedfa6a..5e7ed1590aa9 100644 --- a/share/man/man4/ktls.4 +++ b/share/man/man4/ktls.4 @@ -232,7 +232,7 @@ mode. OpenSSL 3.0 and later include support for .Nm . The -.Fa devel/openssl +.Fa security/openssl-devel port may also be built with support for .Nm by enabling the From nobody Tue Nov 30 23:51:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 86D3A18B155C; Tue, 30 Nov 2021 23:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3fBy0PQvz3H2r; Tue, 30 Nov 2021 23:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2FFA1F6D1; Tue, 30 Nov 2021 23:51: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 1AUNprDO041551; Tue, 30 Nov 2021 23:51:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AUNprTg041550; Tue, 30 Nov 2021 23:51:53 GMT (envelope-from git) Date: Tue, 30 Nov 2021 23:51:53 GMT Message-Id: <202111302351.1AUNprTg041550@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: cbe9faa50b19 - main - Remove DS_BUSY case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cbe9faa50b198a6a97416893a7e17090131341ff Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638316314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PRqY0FRCgHtdBJ2YQgptrjMdXcascOrJXZJaMQLyxTU=; b=Mkq1gY+P9ZTQQ/fCxwquYK00FvidBFUxGKkJOvTgZ4CvlcIR7ObsvIBoIBMkOa94147pRc 7LXhqFo+054rUkSjk84UOFqjWfELcYlUY+HPMtTIE4TZWKCuLed8tdGbyZ5SagDocUf6x4 3FynPvI9Yz/T01L+QWKMoW5i7W+pIq4Uab2AbcroH79rbpgEcwi9jYpRuApfwAazFNoy57 deZhSNdv9GMqpcj2NTCPWBiSxgqZBWU/FwLSZmWsUNM/4xjLzKqZoyLfZ/dn4Yqj/Ou7Dm R6an4giRrgJLhfHPXdUV1IwdLAPZtcWDeyoKf6oTFafacAq51E+vGUcTeqt4jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638316314; a=rsa-sha256; cv=none; b=EoYhx0ep3TTUu4SxOSrQUkgQlb0DJtPDHuJxrGCApghl5pwAplJrwjgw47AKXHO2XYNJFp H9ARcutjyEMMY8Cz/MvzqKlC4qATkaC8OAcBfgqaA7NYOdtovW/sbe6t+8ZYjrywg8+MYZ MrUh3IiwugC3j89/yVLo9yXf1S4on+JdAKK0kYaOoGiRk4XvyjQe5TpHcEpUQOpOXIFnUd 9Ro9NAVb9Dz+fYzmzPhjCmYQZx/NGyWQV2efIcZk3rJvv9fy+fAk7SjtRD+frLoFxstd1T ODk34CbAbriiTLASBL+xgmgKysi5bJjI7hJpfTNXUHaevzGRTglDDZzDBhd1Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cbe9faa50b198a6a97416893a7e17090131341ff commit cbe9faa50b198a6a97416893a7e17090131341ff Author: Warner Losh AuthorDate: 2021-11-30 23:35:48 +0000 Commit: Warner Losh CommitDate: 2021-11-30 23:35:48 +0000 Remove DS_BUSY case DS_BUSY is no longer a device state. Remove it from here. Sponsored by: Netflix --- usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c index a360898e6785..70d2cf6998ee 100644 --- a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c +++ b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c @@ -356,7 +356,6 @@ device_get_status(struct devinfo_dev *dev) case DS_NOTPRESENT: /* not probed or probe failed */ return (DS_DOWN); case DS_ATTACHED: /* attach method called */ - case DS_BUSY: /* device is open */ return (DS_RUNNING); default: return (DS_UNKNOWN); From nobody Wed Dec 1 01:08:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EEDB318ADFF4; Wed, 1 Dec 2021 01:08: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 4J3gv855y8z3sxQ; Wed, 1 Dec 2021 01:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F23120860; Wed, 1 Dec 2021 01:08: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 1B118KUm035645; Wed, 1 Dec 2021 01:08:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B118Kg1035644; Wed, 1 Dec 2021 01:08:20 GMT (envelope-from git) Date: Wed, 1 Dec 2021 01:08:20 GMT Message-Id: <202112010108.1B118Kg1035644@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: 998529e5941a - stable/13 - ldconfig: remove a comment which is another remnant of a.out support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 998529e5941a20bcc300304e79afd10680cc0892 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638320900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MHQstwz5lZ3ST1ybvuStJpM0RE2MauW2j5IDeakKzkg=; b=ZA4Wlg1woFfdi/YAdgjeu58nHFeCMSUnZbfgQJ/izdC7HTc+lZHHBbn55KzJrx3SJQb1Ig D7M8eV2ylhHLl1LDLmcwgFnnmVW2gQhmvRYx7wEQOvOBN8bPrzAy+IFwncshiI1umtFPuE +rqslUrR7qc8N6g88zQ0KtgURAMKvCEFtEWU6s8UKSL8XGcyWg5MSjnLfz9WQ1oTV+PwUV I0RGNt0ybwXzY/IfMOmcTXf7jiPpaBt7ImjuOeLEPKEZcKGzeOGxQCiURH87jG8Gg0ohPP 1KoRMUCWI1karwG/Iqtzl6TFG6B2DNln3Kw7PyeODjVhB7V5rduaVPr7u98BwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638320900; a=rsa-sha256; cv=none; b=isc0VUBR6fFm/lzUCTYQm704WaTbk6Y16HtjaDpy1gksN8QaAcpIT/qa+mtAYatnBwKA5h Q+ntjj5FzSc6p9LI3hhznYTX7gXzdaUUldhgJcahHe7aWWJfeLZYYykA/hwbI+HeKVtdXQ aF38MK6BLnsMEVYQXXGzBM4/WvTkSp03cJjgzGIRBFhCCetCM59bKcOrQuKcKcJQhks6rq B5VqQasJ/3T5B+OKla+9q4hauD0D4sjtq6yiDzGCnrqvBisjmGWk15wVZvK+lJx+kkmpxD ZIR1t/ySXJDbyi/ZzVyK8Sd/509DvhW7X9MqbEURxh9E/birl1La/qK4O91QtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=998529e5941a20bcc300304e79afd10680cc0892 commit 998529e5941a20bcc300304e79afd10680cc0892 Author: Konstantin Belousov AuthorDate: 2021-11-24 20:44:20 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-01 01:07:18 +0000 ldconfig: remove a comment which is another remnant of a.out support (cherry picked from commit 83511ce5c473406e0661247e40971be28e218684) --- sbin/ldconfig/ldconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index d0c6c9802a52..389cbb6101b5 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -102,7 +102,7 @@ main(int argc, char **argv) } if (is_soft) - hints_file = _PATH_ELFSOFT_HINTS; /* Never will have a.out softfloat */ + hints_file = _PATH_ELFSOFT_HINTS; else if (is_32) hints_file = _PATH_ELF32_HINTS; else From nobody Wed Dec 1 01:08:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5DF3018AE121; Wed, 1 Dec 2021 01:08: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 4J3gv96Dbrz3sxT; Wed, 1 Dec 2021 01:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1B022065C; Wed, 1 Dec 2021 01:08: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 1B118LoN035669; Wed, 1 Dec 2021 01:08:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B118LxO035668; Wed, 1 Dec 2021 01:08:21 GMT (envelope-from git) Date: Wed, 1 Dec 2021 01:08:21 GMT Message-Id: <202112010108.1B118LxO035668@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: 00558493b73c - stable/13 - ldconfig: start of cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 00558493b73c27d88556d8e41c0db5276e995b32 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638320901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/NZogFe4TO7DTlGR5YuuTRDzArHUyRASZY/7sgoqT3A=; b=O7Vcar7xO+E4s5FtSdmIfGJtqI13Qgte98BxzIWeWhu/+/1fcsxGg0iHILIfqXn31d+G1X mpTBlLUrwjW5m4L8VUG3iTy/qUUAtg332Yhj18gI9wmNe9fAU10AmIdK5OBv903jGHcFuF 2lP3IYWBpkqJHbfP1tdNIruNK3xVZhAgr/FXNEdYEC05fqacUl39l+ETEXpMpXZbX7VR0Y CT7J2C8IKmbPVocnuxNJEowSsRluTbspUpZV1Ao5ZQgqkfDXx0190SysZDunSOjyeQnABz IR4qQa2/VDW5BZLGqhbIU2KrZVKM2oD478CW1RXyrzMS7Hh54op7cIfhNMd5GA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638320901; a=rsa-sha256; cv=none; b=stTjIGB5pB9r7WwfLplog/wcZrF0/R6ximIwZHGIiw+jZ8AAWiIK4pJmzNuhWweLM5d7ZT Rjn2+8rg6+i2sOJztX9HsCdpDApPxQ+Yhk0Rwcin5VdyK8etAzSPweAFgtI/k0/2vyUQgz VVqdSNw3SEalQE0DVtHXhGWAD4Rc0xcBiqiBZNSEsEdMzNZ89546Tjpt42rqGsUSN8RGvF DN+cfqOFlL/BlB090QnnoCtUlafLNcHCJT9WwmaQkI83HwwFRY3cs8BqKfyKDbcSc3H2jR 6W6Nbn3wzBKptxdgnPZeTNCeyWwyzUgBwwA1x7gfX6j0Ti3NqQJkU1FHh5z1oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=00558493b73c27d88556d8e41c0db5276e995b32 commit 00558493b73c27d88556d8e41c0db5276e995b32 Author: Konstantin Belousov AuthorDate: 2021-11-19 03:35:50 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-01 01:07:19 +0000 ldconfig: start of cleanup (cherry picked from commit 3f2c6f5598410b7233b0acd1c804a0473fa1e9fa) --- sbin/ldconfig/elfhints.c | 19 ++++++++--------- sbin/ldconfig/ldconfig.c | 55 +++++++++++++++++------------------------------- sbin/ldconfig/ldconfig.h | 5 +++-- 3 files changed, 31 insertions(+), 48 deletions(-) diff --git a/sbin/ldconfig/elfhints.c b/sbin/ldconfig/elfhints.c index bbedac64b3ff..81236feec5ca 100644 --- a/sbin/ldconfig/elfhints.c +++ b/sbin/ldconfig/elfhints.c @@ -48,17 +48,17 @@ #define MAXDIRS 1024 /* Maximum directories in path */ #define MAXFILESIZE (16*1024) /* Maximum hints file size */ -static void add_dir(const char *, const char *, int); +static void add_dir(const char *, const char *, bool); static void read_dirs_from_file(const char *, const char *); -static void read_elf_hints(const char *, int); +static void read_elf_hints(const char *, bool); static void write_elf_hints(const char *); static const char *dirs[MAXDIRS]; static int ndirs; -int insecure; +bool insecure; static void -add_dir(const char *hintsfile, const char *name, int trusted) +add_dir(const char *hintsfile, const char *name, bool trusted) { struct stat stbuf; int i; @@ -186,7 +186,7 @@ read_dirs_from_file(const char *hintsfile, const char *listfile) } static void -read_elf_hints(const char *hintsfile, int must_exist) +read_elf_hints(const char *hintsfile, bool must_exist) { int fd; struct stat s; @@ -231,15 +231,14 @@ read_elf_hints(const char *hintsfile, int must_exist) } void -update_elf_hints(const char *hintsfile, int argc, char **argv, int merge) +update_elf_hints(const char *hintsfile, int argc, char **argv, bool merge) { - int i; + struct stat s; + int i; if (merge) - read_elf_hints(hintsfile, 0); + read_elf_hints(hintsfile, false); for (i = 0; i < argc; i++) { - struct stat s; - if (stat(argv[i], &s) == -1) warn("warning: %s", argv[i]); else if (S_ISREG(s.st_mode)) diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 389cbb6101b5..3f623d6f38b1 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -30,11 +30,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include @@ -46,6 +41,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -53,34 +49,20 @@ static const char rcsid[] = #include "ldconfig.h" -#if DEBUG -/* test */ -#undef _PATH_ELF_HINTS -#define _PATH_ELF_HINTS "./ld-elf.so.hints" -#endif - #define _PATH_LD32_HINTS "/var/run/ld32.so.hints" #define _PATH_ELF32_HINTS "/var/run/ld-elf32.so.hints" #define _PATH_ELFSOFT_HINTS "/var/run/ld-elf-soft.so.hints" -#undef major -#undef minor - -static int verbose; -static int nostd; -static int justread; -static int merge; -static int rescan; -static const char *hints_file; - -static void usage(void); +static void usage(void); int main(int argc, char **argv) { - int c; - int is_32 = 0; - int is_soft = 0; + const char *hints_file; + int c; + bool is_32, is_soft, justread, merge, nostd, rescan, verbose; + + is_32 = is_soft = justread = merge = nostd = rescan = verbose = false; while (argc > 1) { if (strcmp(argv[1], "-aout") == 0) { @@ -89,11 +71,11 @@ main(int argc, char **argv) argc--; argv++; } else if (strcmp(argv[1], "-32") == 0) { - is_32 = 1; + is_32 = true; argc--; argv++; } else if (strcmp(argv[1], "-soft") == 0) { - is_soft = 1; + is_soft = true; argc--; argv++; } else { @@ -108,29 +90,29 @@ main(int argc, char **argv) else hints_file = _PATH_ELF_HINTS; if (argc == 1) - rescan = 1; + rescan = true; else while((c = getopt(argc, argv, "Rf:imrsv")) != -1) { switch (c) { case 'R': - rescan = 1; + rescan = true; break; case 'f': hints_file = optarg; break; case 'i': - insecure = 1; + insecure = true; break; case 'm': - merge = 1; + merge = true; break; case 'r': - justread = 1; + justread = true; break; case 's': - nostd = 1; + nostd = true; break; case 'v': - verbose = 1; + verbose = true; break; default: usage(); @@ -143,13 +125,14 @@ main(int argc, char **argv) else update_elf_hints(hints_file, argc - optind, argv + optind, merge || rescan); - return 0; + exit(0); } static void usage(void) { fprintf(stderr, - "usage: ldconfig [-32] [-elf] [-Rimrsv] [-f hints_file] [directory | file ...]\n"); + "usage: ldconfig [-32] [-elf] [-Rimrsv] [-f hints_file] " + "[directory | file ...]\n"); exit(1); } diff --git a/sbin/ldconfig/ldconfig.h b/sbin/ldconfig/ldconfig.h index 9b278255ac07..8aff4e6a5ef2 100644 --- a/sbin/ldconfig/ldconfig.h +++ b/sbin/ldconfig/ldconfig.h @@ -32,12 +32,13 @@ #define LDCONFIG_H 1 #include +#include -extern int insecure; /* -i flag, needed here for elfhints.c */ +extern bool insecure; /* -i flag, needed here for elfhints.c */ __BEGIN_DECLS void list_elf_hints(const char *); -void update_elf_hints(const char *, int, char **, int); +void update_elf_hints(const char *, int, char **, bool); __END_DECLS #endif From nobody Wed Dec 1 01:08:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BDFCA18AE129; Wed, 1 Dec 2021 01:08: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 4J3gvC0DYKz3sqS; Wed, 1 Dec 2021 01:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7CAD205D7; Wed, 1 Dec 2021 01:08: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 1B118MK3035697; Wed, 1 Dec 2021 01:08:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B118Mjs035696; Wed, 1 Dec 2021 01:08:22 GMT (envelope-from git) Date: Wed, 1 Dec 2021 01:08:22 GMT Message-Id: <202112010108.1B118Mjs035696@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: 46e032b0b123 - stable/13 - ldconfig(8): nostd/-s does nothing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 46e032b0b123eee2c1ff896dfc474b7c9cf86ab7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638320903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bl1nnj/r3FLvXz5hwDfdwMhEB+79wMeSvsmIdNd41II=; b=PTM4caQ1rDbjLfKEoEj6hDxMi+xoGXoMRoq65kIZG/zvMc7ZjXkAesiYTzOwtc5LfEkN0P LaqtsMEomS+JFIku/Svvc3qUiECosN1kWyjSW0HVaowWUXLnUJx6H92GuwvEJheex86RKb YA0iwEt04ydNOYf/kJBIGawyNIff6K2M2KJQpbakyjZa2OV7a8XGB9aPTUYSs8fZ4RD1GW k/Re+bwSxj7pUUG5Q3xsTY2f5R2z48PJOZY5n8xFaEQK8cT1SIRMyFR/zSfnOm9xu64ecw hZ1rk9AAxkOZRhRlhJng4hwYljE23pViw+u5OSyBGAPBZ+ffEF3B8rGwy+rwVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638320903; a=rsa-sha256; cv=none; b=dMBoel2ZO4Jb/NRhmEN+8dyceH5GaZNSVrBA2wqhsp+uz63fHViSwYXmpI3BgKRbu+DnQY mctG7GDtuSwMKOxGBxX9i+XN6lmVPXN0zpEdvlp/1Lrn6pEbLMd9cg27n/tuC5I4sIZfET JSviiUP5RhjBeP+9gosHw7UlL7uECeIBKqKYT9i3Lx97uQ15sihYm3R9yub0wQHt3hDiTJ 0hFKgc6kBDnwRfQ+qvpeg+UP3GCU1agzWCtvSlJAZT3o51zEGTZkgBmSh++2RgoaN1Vibh xI9v1RQ6xUG+PsjHWI55apO1GjnlIpC7frob7PNWJmiFkd/vv5aq2c3cif270Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=46e032b0b123eee2c1ff896dfc474b7c9cf86ab7 commit 46e032b0b123eee2c1ff896dfc474b7c9cf86ab7 Author: Konstantin Belousov AuthorDate: 2021-11-19 05:21:21 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-01 01:07:19 +0000 ldconfig(8): nostd/-s does nothing (cherry picked from commit b828161d123bec894bc5a320ef26d6afc9b13ae8) --- sbin/ldconfig/ldconfig.8 | 6 +----- sbin/ldconfig/ldconfig.c | 8 ++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sbin/ldconfig/ldconfig.8 b/sbin/ldconfig/ldconfig.8 index 63e2271b7cd5..7718f018bc70 100644 --- a/sbin/ldconfig/ldconfig.8 +++ b/sbin/ldconfig/ldconfig.8 @@ -43,7 +43,7 @@ .Sh SYNOPSIS .Nm .Op Fl 32 -.Op Fl Rimrsv +.Op Fl Rimrv .Op Fl f Ar hints_file .Op Ar directory | Ar .Sh DESCRIPTION @@ -128,10 +128,6 @@ on the standard output. The hints file is not modified. .Pp Scan and print all libraries found on the directories list. -.It Fl s -Do not scan the built-in system directory -.Pq Dq /usr/lib -for shared libraries. .It Fl v Switch on verbose mode. .El diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 3f623d6f38b1..777895936834 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -60,9 +60,9 @@ main(int argc, char **argv) { const char *hints_file; int c; - bool is_32, is_soft, justread, merge, nostd, rescan, verbose; + bool is_32, is_soft, justread, merge, rescan, verbose; - is_32 = is_soft = justread = merge = nostd = rescan = verbose = false; + is_32 = is_soft = justread = merge = rescan = verbose = false; while (argc > 1) { if (strcmp(argv[1], "-aout") == 0) { @@ -109,7 +109,7 @@ main(int argc, char **argv) justread = true; break; case 's': - nostd = true; + /* was nostd */ break; case 'v': verbose = true; @@ -132,7 +132,7 @@ static void usage(void) { fprintf(stderr, - "usage: ldconfig [-32] [-elf] [-Rimrsv] [-f hints_file] " + "usage: ldconfig [-32] [-elf] [-Rimrv] [-f hints_file] " "[directory | file ...]\n"); exit(1); } From nobody Wed Dec 1 01:08:23 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4A82818AE37C; Wed, 1 Dec 2021 01:08: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 4J3gvD22ydz3swr; Wed, 1 Dec 2021 01:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04D46208A6; Wed, 1 Dec 2021 01:08: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 1B118NZE035723; Wed, 1 Dec 2021 01:08:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B118Nve035722; Wed, 1 Dec 2021 01:08:23 GMT (envelope-from git) Date: Wed, 1 Dec 2021 01:08:23 GMT Message-Id: <202112010108.1B118Nve035722@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: a95dbfaa3d7c - stable/13 - rtld_paths.h: Provide _PATH_ELF32_HINTS string, unconditionally List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a95dbfaa3d7c4b4eed89026487c0ad7a2e4f68a3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638320904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grnE+rXFvTlmULhOjiMNBf+KP1hF1ibZ/NHt0XOAQnQ=; b=TlFlsB/sVo/WJ7eODjddQO9TN+ZmkuPKSRbCK89wDfUCfC7wTeV6fZDuRlx6J3bK58iLc+ 0x+kGl2eoAql7TUSZSt8VySn28gbc5hP5ub+UnMzUSZgWMTYKLt94Lw40Ov0kfgZaDepAP dNql6xCP5RdY9l836Og4+TiMeS2PeZvc1JmR8WrR1SQd9KKKj+T8/a1sE1RUBKfAnuciGS FVXdFiFBUCXSWMSlXfoC1xvL1VZAGMY6bkNQIWUm642ZMpay6ZEf84trUCCCwAahzWWP6T 87nsPzieq0RjJd3cvnyGJdITIxR7vVrzvo9ZSgkzjGU6gFVvAkgyXpFru2LI0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638320904; a=rsa-sha256; cv=none; b=h+3g44xvM2319i6DqFnBMsF18WQcPV3867zQ5AcLUJU9NtKpPi/E5mea+njqplvtpimvhv mffWRy7UOoYIV54B9xFBHiv2mtwiOU85/OBWtmFUVuiqMDQSNVaXO6355IUVBKDt9gm0oe jKDdc0rGZV/iNBgno1ZWczebxJsnQHBS2+9wDp3fQmYmt9vY1dwxXyH9kyAxHX1SKm+C1a Wmd+5W3MYsNduQQ1V6rcDRKCuSuIzHjIa82q8QHuQBVFUl+Wa/UwBUPog2130p9jcrErxc Um48u7sWv0Z6PLulqnkHzEwZF+9WaaZ5E1BK/V/ffabYKlwSd/znLPZN/o6OFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a95dbfaa3d7c4b4eed89026487c0ad7a2e4f68a3 commit a95dbfaa3d7c4b4eed89026487c0ad7a2e4f68a3 Author: Konstantin Belousov AuthorDate: 2021-11-19 03:44:33 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-01 01:07:19 +0000 rtld_paths.h: Provide _PATH_ELF32_HINTS string, unconditionally (cherry picked from commit f340188625d4e0e4db850becb0a9b25448053e10) --- libexec/rtld-elf/rtld_paths.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld_paths.h b/libexec/rtld-elf/rtld_paths.h index 4ce423ce6dbb..6ead517e8feb 100644 --- a/libexec/rtld-elf/rtld_paths.h +++ b/libexec/rtld-elf/rtld_paths.h @@ -35,8 +35,12 @@ #define _COMPAT32_BASENAME_RTLD "ld-elf32.so.1" #endif +#ifndef _PATH_ELF32_HINTS +#define _PATH_ELF32_HINTS "/var/run/ld-elf32.so.hints" +#endif + #ifdef COMPAT_32BIT -#define _PATH_ELF_HINTS "/var/run/ld-elf32.so.hints" +#define _PATH_ELF_HINTS _PATH_ELF32_HINTS #define _PATH_LIBMAP_CONF "/etc/libmap32.conf" #define _BASENAME_RTLD _COMPAT32_BASENAME_RTLD #define STANDARD_LIBRARY_PATH "/lib32:/usr/lib32" From nobody Wed Dec 1 01:08:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6670718AE588; Wed, 1 Dec 2021 01:08: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 4J3gvF5VRcz3swx; Wed, 1 Dec 2021 01:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1FC542073A; Wed, 1 Dec 2021 01:08: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 1B118OwU035747; Wed, 1 Dec 2021 01:08:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B118OI8035746; Wed, 1 Dec 2021 01:08:24 GMT (envelope-from git) Date: Wed, 1 Dec 2021 01:08:24 GMT Message-Id: <202112010108.1B118OI8035746@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: a2a905f4d02b - stable/13 - ldconfig: use libexec/rtld-elf/rtld_paths.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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a2a905f4d02b9592a8126c73f2eb4d3949265659 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638320906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QCq+d2tk+VGkpVndWiMpB9MU06eIRQI/Z0EPITdhjO8=; b=IOis8IdXSdZhYWy4UcEXMc4vkVMZaDvSJC01Zeb48yhV+s7DuQHYuRxn2HjFIVJ00HRu9d tPV1krfH1gXGhxo2AXk154TeTdbjuThMed8mWj0pKNWbEnHPQ7sAxSsTC6eCn51vEg+SxH 7KcEdSfvsnYr4rw3HDlMlH7LkKvTt7boqMt1en215PsExVK0e9kcTTkFsudr6DewNV6rYP EnEwHg2gZ1u6KfVyi8GvTTXxMTWt7UX/nEToWzhUUOYTvIe/Delcp/PtVvlW9tRpGqyofu RgOVwBx4tasAkC0VCIYlSsKkBnq/U9B4BD+h9RGHmypwX3NRnwiVUsKIhJ7qdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638320906; a=rsa-sha256; cv=none; b=Fxin9rwx5jRjox1OAOm0yvgEUM7KC9zGpZaEnMF8et3WijZxW0baC1WBj43sentEQ+bZGc RTI/JR1Etf6OJ8TF4wv/LJlG6j6hBnuKCDihV4LnIaQFtx9ZiQAcfb9/62keklscay5Cvn 4Gb/QMrqJq4Xf59Q3qFUIfAPy7PS/vWfyQHu5TCpzUT9GlJEJvnVJ+g88+xsrLfABxNdiD 2Lr3PUqWN3g6Gv6dsBRWFlHC7r8jECTgMNAd95H/FFR1p+kBksWnlIRCyUw68mlT0od7xt o30O5PmwtUZYvywHoCQj5e39ftZq1t1hXl+IaInXmNwKavkn7JPNzNfNN6uNbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a2a905f4d02b9592a8126c73f2eb4d3949265659 commit a2a905f4d02b9592a8126c73f2eb4d3949265659 Author: Konstantin Belousov AuthorDate: 2021-11-19 03:45:31 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-01 01:07:19 +0000 ldconfig: use libexec/rtld-elf/rtld_paths.h (cherry picked from commit af9115870670f508c11b3d173bcff5116d8ef320) --- sbin/ldconfig/Makefile | 1 + sbin/ldconfig/ldconfig.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sbin/ldconfig/Makefile b/sbin/ldconfig/Makefile index 2ead668578f6..070c2c3d6901 100644 --- a/sbin/ldconfig/Makefile +++ b/sbin/ldconfig/Makefile @@ -3,6 +3,7 @@ PACKAGE=runtime PROG= ldconfig SRCS= elfhints.c ldconfig.c +CFLAGS+= -I${SRCTOP}/libexec/rtld-elf MAN= ldconfig.8 .include diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 777895936834..288c22813121 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -48,6 +48,7 @@ #include #include "ldconfig.h" +#include "rtld_paths.h" #define _PATH_LD32_HINTS "/var/run/ld32.so.hints" #define _PATH_ELF32_HINTS "/var/run/ld-elf32.so.hints" @@ -84,7 +85,7 @@ main(int argc, char **argv) } if (is_soft) - hints_file = _PATH_ELFSOFT_HINTS; + hints_file = _PATH_SOFT_ELF_HINTS; else if (is_32) hints_file = _PATH_ELF32_HINTS; else From nobody Wed Dec 1 01:08:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2048F18AE16B; Wed, 1 Dec 2021 01:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3gvG3MLSz3sqg; Wed, 1 Dec 2021 01:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DD8A2065D; Wed, 1 Dec 2021 01:08: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 1B118QA0035771; Wed, 1 Dec 2021 01:08:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B118QBd035770; Wed, 1 Dec 2021 01:08:26 GMT (envelope-from git) Date: Wed, 1 Dec 2021 01:08:26 GMT Message-Id: <202112010108.1B118QBd035770@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: 0619dbdfde6d - stable/13 - ldconfig(8): check for no-args command line after options are parsed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0619dbdfde6d05ac99265ff0b0944468788678dd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638320906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/m1/jCpN7VvyYzi2EoKwytdWuWhm0WyRWQG7LiUYZ9E=; b=BN9u6+jAbTkMaKYaVM2WVwUHVT07ITG/5selX18AqvyVaIRb/i1CQJSXsfs0TuDoPwjZ5X biOM0Gc6yz0f93ooe/QKbevEBtR6dBOmzo9iEzpysDvGtqvpkH0SY8yQLGcmiN8vt9ghOJ pBVPNWMAL2KiD15CPMm2YNol6tKPYapUkLI5WvdFq4GBE7+6pUYwQoCx4WgxA5OqBmD/aH sKz/0uJxuI3L3Y5PJHZ/50h0AQPQrj10kcxhhz/FsU717Yc7vxCdi2txs7QwiV4J6z+oqt 2TSA5OQl4HA61gnLrqlTlYqLY5FDG72fv3xQgVbqP50d5QUc1dFjH0xnAfmilw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638320906; a=rsa-sha256; cv=none; b=NcnnpSf+5A56j+7QzljE1GDp417GeXksZftkvjG5J+kVY1GqnqOIGuJ3J/W7kKQ+z4gS5K yHM2+3NvqpvrKiqrC2EhbBnznoE7wfbOqItCjjbtUQ3Otr6/yBzepyl4HEit6LfuztA3+V swfCm+TD4EDpJXg04XDH5kgekBw4tsG0Ocea/JgGEPBem42fzDFGkcsBBOOAuw407pZYVL sMiAPBTw9qWk8aMPV1Nw3TG5wuboIayyZEnjGHR7mrtyiV5EO61d3Y4hpjtpvJeaNMxlt+ JAnSFRkG1OPNgR0TkrF2RPvhMInsNhnBeoK/ra7hSdUwTS/RxlxS5T1LvBM/tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0619dbdfde6d05ac99265ff0b0944468788678dd commit 0619dbdfde6d05ac99265ff0b0944468788678dd Author: Konstantin Belousov AuthorDate: 2021-11-19 04:07:58 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-01 01:07:19 +0000 ldconfig(8): check for no-args command line after options are parsed (cherry picked from commit 3ede04c78c7c726ed79a39d22c65a58d0ecc5d00) --- sbin/ldconfig/ldconfig.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 288c22813121..b039412a648b 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -90,9 +90,7 @@ main(int argc, char **argv) hints_file = _PATH_ELF32_HINTS; else hints_file = _PATH_ELF_HINTS; - if (argc == 1) - rescan = true; - else while((c = getopt(argc, argv, "Rf:imrsv")) != -1) { + while((c = getopt(argc, argv, "Rf:imrsv")) != -1) { switch (c) { case 'R': rescan = true; @@ -121,11 +119,14 @@ main(int argc, char **argv) } } - if (justread) + if (justread) { list_elf_hints(hints_file); - else + } else { + if (argc == optind) + rescan = true; update_elf_hints(hints_file, argc - optind, argv + optind, merge || rescan); + } exit(0); } From nobody Wed Dec 1 06:39:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 771FC18AE012; Wed, 1 Dec 2021 06:39:09 +0000 (UTC) (envelope-from avg@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 4J3qDs1Hhbz4qNB; Wed, 1 Dec 2021 06:39:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 6B0B6D06B; Wed, 1 Dec 2021 06:39:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: <3c211281-ce4a-3d99-ab45-4d8a6fbdbe55@FreeBSD.org> Date: Wed, 1 Dec 2021 08:39:05 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.3.0 Subject: Re: git: d3a8f98acbf5 - main - Make CPU children explicitly share parent unit numbers. Content-Language: en-US To: Alexander Motin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202109250332.18P3W9UM008783@gitrepo.freebsd.org> From: Andriy Gapon In-Reply-To: <202109250332.18P3W9UM008783@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638340749; h=from:from:reply-to:subject: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=ZrRJfVFc5uuDmziJTrSjvJsQGfBJZbZGycFW6WvHZ64=; b=mNfhas3N9ADTn1ce3UYazntJruvcZiGrTIf1bqDbRhyXw/lrjLn1MDqhLnTkH8q5kEO6U7 xPktUqlZbBlllKwVmsXBhx9xGEeGO3smZS4wDQKo+HGqSnyW5WyHfffiJcUWRdxIolzjLk VM7OmJWF4q12iRFUuGmc2UxX6cKQReiGcCzqXmMImxuOia5KAeDvfq/PAadOGiQ5M2xhkI pTgrscmpFLJtVZi+Vo4OhLFaAi0udY5lC3U8gIVvCbnaiaDzIGeAIDlpunDrxaNwDC0EXq 6sck2NS9QYEZadcAYhc4zSUrqJzDfueMaEiYQkAdBPlIox35zdrJZR13syQfXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638340749; a=rsa-sha256; cv=none; b=MZ+v+d7Cn7fSelZRhfZE4ZgxCQA/NcRoSKfZx8keGxP+gx9p45Ju9rvquWfEhlJPUeBH4T P+OXS6a8ANRYccjPP3NoUMA0xPiH4xkQYj3Z5AACVlHE6nW9YKQWwyNZh3Iyg6D8aZit0M R/K9kTZRhAsobn3HZinDICkLeihtD/GSRSNQzQQ2uQFBilSdh054wndOgjQMVs8ujIVcXD xYWhFIXubukYv3lwFH5zFu2l/7K6KqFR+Z4GV9ARQ3vmEE+XGFArFRjIngTTHQfw9sDgyY JaKVmS9MMZD1orD5ulqcnaeAW+zif5euGHfV5Qa0+fMWlbpF6ApUSPjtugukcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 25/09/2021 06:32, Alexander Motin wrote: > The branch main has been updated by mav: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d3a8f98acbf51e728411f10c5f179a30b9ca683c > > commit d3a8f98acbf51e728411f10c5f179a30b9ca683c > Author: Alexander Motin > AuthorDate: 2021-09-25 03:25:46 +0000 > Commit: Alexander Motin > CommitDate: 2021-09-25 03:31:51 +0000 > > Make CPU children explicitly share parent unit numbers. > > Before this device unit number match was coincidental and broke if I > disabled some CPU device(s). Aside of cosmetics, for some drivers > (may be considered broken) it caused talking to wrong CPUs. > --- > sys/dev/acpica/acpi_perf.c | 3 ++- > sys/dev/acpica/acpi_throttle.c | 3 ++- > sys/dev/amdtemp/amdtemp.c | 3 ++- It seems that the amdtemp part of this change broke creation of dev.cpu.0.temperature sysctl node on my (old hardware) system. I have 4 cores and amdtemp attaches under hostb4: cpu0 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P001 acpi_perf0 acpi_throttle0 hwpstate0 cpufreq0 cpu1 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P002 acpi_perf1 hwpstate1 cpu2 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P003 acpi_perf2 hwpstate2 cpu3 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P004 acpi_perf3 hwpstate3 ... pcib0 pnpinfo _HID=PNP0A03 _UID=0 _CID=none at handle=\_SB_.PCI0 pci0 ... hostb4 pnpinfo vendor=0x1022 device=0x1203 subvendor=0x0000 subdevice=0x0000 class=0x060000 at slot=24 function=3 dbsf=pci0:0:24:3 amdtemp4 As you can see amdtemp attaches in a different sub-tree from cpus and its parent's unit number does not have any relation to any processor. -- Andriy Gapon From nobody Wed Dec 1 07:49:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6156918A46D3; Wed, 1 Dec 2021 07:49:34 +0000 (UTC) (envelope-from avg@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 4J3rp60kCgz56X8; Wed, 1 Dec 2021 07:49:34 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 578F4E654; Wed, 1 Dec 2021 07:49:33 +0000 (UTC) (envelope-from avg@freebsd.org) Message-ID: <0b0a702b-4cc9-77ee-231e-6db8121af817@FreeBSD.org> Date: Wed, 1 Dec 2021 09:49:30 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.3.0 From: Andriy Gapon Subject: Re: git: 3d9d64aa1846 - main - kern_tc: unify timecounter to bintime delta conversion Content-Language: en-US To: Kyle Evans References: <202111301334.1AUDYJEU014078@gitrepo.freebsd.org> <69d4804d-1d94-7757-5c93-0d062f9c31c0@FreeBSD.org> Cc: src-committers@freebsd.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@freebsd.org In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638344974; 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=GbkPIgxqADIpzPCSj+qYIqrRMWfERCFpu4yDblwRDQY=; b=pz8+5mwwgoT8wngFaL9oOCSmOkdv42YCAzD59ouYvLZUh13lGseQCh8M7LseFAJ1EKOuhl YvTn0fEmoQDMwISiK6Tlpmy1V6HsOL6uOKPFOJOxjjHWv8RBv68gLWPFcAwCXLI2e+pAxq aV1DLToudMfoyz96Wh7sff4cYGJ4FT+zorF28AOEhICKJsuuLWC/bjf9tTd1L6PupZEXDc CN0O/UFiacbJrUmJUcRYpYlfV3iIppHztfFNLQm9d8LhIPC6eVHoYWXWohbOMuvc7quAO8 KBUV5Gm321h7IFQFY1Q8TMwYwSiDo+pIikQ7NlE5HMOSf0EKMk2nXoDxeOrycQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638344974; a=rsa-sha256; cv=none; b=VRcjqDXloaaLXc/G4oAP/b/nLTKgV8xKC7OIjlUoX41O8erlc/LLi+vZ6jtBicmoM/5DME ULQgG97Ra7k6O6fHAltlVsSEns2Ec5PbgO4D+GAXn1qEbUyra1QQdkGFkYZJIkx5ZeAawg cOsu/+MvYip2j8GdSYu/v5CRD0BEAzTnev8MdcluXAJJw6nX4XZiJz50AA8cjv5jFNg6ja 3FJQCGW62DQ8iBoQbmsad1X6o0pQwCa5B31WqTCwxz3E1syR9wImHrdskRAVxytXM01z1t sapGT+IBTrwxVlVIRSTcI5GmeT1JdvMPPZ8Dc63pwxk4bV3zP8HlgBCckyCzlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 30/11/2021 23:35, Kyle Evans wrote: > On Tue, Nov 30, 2021 at 11:08 AM Andriy Gapon wrote: >> >> On 30/11/2021 18:14, Kyle Evans wrote: >>> I wonder if this helps explain the behavior we saw when enabling TSC >>> on VirtualBox guests. Threads doing small ~1 second or less sleeps >>> would start to miss their wakeups, so we'd consistently see, e.g., >>> shutdown issues after applying a high loading while we're waiting for >>> bufdaemon threads. >> >> It very well may be the case. >> The reason I arrived at this change is that we also sometimes saw the same >> problem but on VMWware. That prompted me to add some diagnostic code to >> sleepqueue to turn those missed wakeups into panics. >> >> As kib pointed out, mav recently made a change that would mask the problem as a >> side effect: >> https://cgit.FreeBSD.org/src/commit/?id=6df1359e5542f69179c142be1ea099d447e273d1 >> But I wanted to fix the root cause anyway. >> > > Ok, cool, thanks! > > I'll do some re-testing under VirtualBox and see if we can just revert > this entirely: https://cgit.freebsd.org/src/commit/sys/x86/x86/tsc.c?id=8cc15b0dfc2f3299 That would be an interesting test. Just a thought that there could be other problems with VirtualBox. When I debugged the problem with VMWare, changing timecounters did not help because, in hindsight, the issue was not specific to any particular one. So, perhaps the VirtualBox TSC wraps around too fast or can jump erratically, etc. -- Andriy Gapon From nobody Wed Dec 1 08:20:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AECDD18B36F1; Wed, 1 Dec 2021 08:20: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 4J3sTn3BqCz3Gws; Wed, 1 Dec 2021 08:20:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DADE264A8; Wed, 1 Dec 2021 08:20: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 1B18KTBh015170; Wed, 1 Dec 2021 08:20:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B18KTUN015169; Wed, 1 Dec 2021 08:20:29 GMT (envelope-from git) Date: Wed, 1 Dec 2021 08:20:29 GMT Message-Id: <202112010820.1B18KTUN015169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: a01b8859cbde - main - sctp: cleanup, no functional change intended. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a01b8859cbde9f2ded7b58a024d8fb46ada596bb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638346829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YLoyNw7hG+JRyIRmAwVIHs6i4+AJJQzYeWQCVBgLnjg=; b=U4nD+5WUjl+KbGwVxRQ8U+A3YDhcD7bawZqHivxx3e5U4TaeCIfHiebx6tOQ/5uPIPamgN FLWOtbEZUz70cNM00l+ojkvdacsFdcQLvnncoY0rCBgwpIa5mPEgx0V+st0QSY+z7911fM nUuQQZxekrNGLqSXkG+phMUYnihTJ05/udLkWeo9BYY//WyIzoNSYIPpJCEbXCpwNAgb5h 1tmuMARmwKZU2+iX5NMg9ISq7zp2Xqlvp9idI8jV2nZCjhQbx54JMhbwevIhtg2I0xhYY3 +ZZt/+0SOxf5vSoUMzHE1KTlCMWWULTHBld+R1C/X04PAFt3GWaQF+iPsyLZuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638346829; a=rsa-sha256; cv=none; b=FiVSGFL3OUv5ETT4T+s+kQB0G/ttG7P2NLOWCLPBGYGzMdd58S9DnlEDXQMJea6Rn6TXe7 spr1cGiju4Trv/akXmvhQCptgCdoWmPwgwaUvnt7ILdiF69Tlf4Q60iqBzzINyOOe/B68Q PxbKbW1Dh+wD/jKlkInaMHRl2IQBgBVQ49T0tnarOC58a6Tr0+NmQAsyZUDEZMwUpdB4/p HqTXRNySb8n8EX+xDuvqipMrqrOCH8TZC+/pIH5EnCTRrcvBvNanz20tmb5RfbNxSOn79X KzcYFSADTsV0E1oGO4UvE6LZdASCTyyu9zChso1RYlPVMKcG+kBXETZXhYkPiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=a01b8859cbde9f2ded7b58a024d8fb46ada596bb commit a01b8859cbde9f2ded7b58a024d8fb46ada596bb Author: Michael Tuexen AuthorDate: 2021-12-01 08:19:40 +0000 Commit: Michael Tuexen CommitDate: 2021-12-01 08:19:40 +0000 sctp: cleanup, no functional change intended. MFC after: 1 week --- sys/netinet/sctp_usrreq.c | 59 ++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index b2d23bffb9fd..dae35c566d4e 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -1228,7 +1228,7 @@ sctp_fill_up_addresses(struct sctp_inpcb *inp, size_t limit, struct sockaddr *addr) { - size_t size = 0; + size_t size; SCTP_IPI_ADDR_RLOCK(); /* fill up addresses for the endpoint's default vrf */ @@ -1238,17 +1238,17 @@ sctp_fill_up_addresses(struct sctp_inpcb *inp, return (size); } -static int -sctp_count_max_addresses_vrf(struct sctp_inpcb *inp, uint32_t vrf_id) +static size_t +sctp_max_size_addresses_vrf(struct sctp_inpcb *inp, uint32_t vrf_id) { - int cnt = 0; - struct sctp_vrf *vrf = NULL; + struct sctp_vrf *vrf; + size_t size; /* - * In both sub-set bound an bound_all cases we return the MAXIMUM - * number of addresses that you COULD get. In reality the sub-set - * bound may have an exclusion list for a given TCB OR in the - * bound-all case a TCB may NOT include the loopback or other + * In both sub-set bound an bound_all cases we return the size of + * the maximum number of addresses that you could get. In reality + * the sub-set bound may have an exclusion list for a given TCB or + * in the bound-all case a TCB may NOT include the loopback or other * addresses as well. */ SCTP_IPI_ADDR_LOCK_ASSERT(); @@ -1256,6 +1256,7 @@ sctp_count_max_addresses_vrf(struct sctp_inpcb *inp, uint32_t vrf_id) if (vrf == NULL) { return (0); } + size = 0; if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) { struct sctp_ifn *sctp_ifn; struct sctp_ifa *sctp_ifa; @@ -1268,17 +1269,17 @@ sctp_count_max_addresses_vrf(struct sctp_inpcb *inp, uint32_t vrf_id) case AF_INET: #ifdef INET6 if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_NEEDS_MAPPED_V4)) - cnt += sizeof(struct sockaddr_in6); + size += sizeof(struct sockaddr_in6); else - cnt += sizeof(struct sockaddr_in); + size += sizeof(struct sockaddr_in); #else - cnt += sizeof(struct sockaddr_in); + size += sizeof(struct sockaddr_in); #endif break; #endif #ifdef INET6 case AF_INET6: - cnt += sizeof(struct sockaddr_in6); + size += sizeof(struct sockaddr_in6); break; #endif default: @@ -1295,17 +1296,17 @@ sctp_count_max_addresses_vrf(struct sctp_inpcb *inp, uint32_t vrf_id) case AF_INET: #ifdef INET6 if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_NEEDS_MAPPED_V4)) - cnt += sizeof(struct sockaddr_in6); + size += sizeof(struct sockaddr_in6); else - cnt += sizeof(struct sockaddr_in); + size += sizeof(struct sockaddr_in); #else - cnt += sizeof(struct sockaddr_in); + size += sizeof(struct sockaddr_in); #endif break; #endif #ifdef INET6 case AF_INET6: - cnt += sizeof(struct sockaddr_in6); + size += sizeof(struct sockaddr_in6); break; #endif default: @@ -1313,19 +1314,19 @@ sctp_count_max_addresses_vrf(struct sctp_inpcb *inp, uint32_t vrf_id) } } } - return (cnt); + return (size); } -static int -sctp_count_max_addresses(struct sctp_inpcb *inp) +static size_t +sctp_max_size_addresses(struct sctp_inpcb *inp) { - int cnt = 0; + size_t size; SCTP_IPI_ADDR_RLOCK(); - /* count addresses for the endpoint's default VRF */ - cnt = sctp_count_max_addresses_vrf(inp, inp->def_vrf_id); + /* Maximum size of all addresses for the endpoint's default VRF */ + size = sctp_max_size_addresses_vrf(inp, inp->def_vrf_id); SCTP_IPI_ADDR_RUNLOCK(); - return (cnt); + return (size); } static int @@ -2140,7 +2141,7 @@ flags_out: SCTP_CHECK_AND_CAST(value, optval, uint32_t, *optsize); SCTP_INP_RLOCK(inp); - *value = sctp_count_max_addresses(inp); + *value = (uint32_t)sctp_max_size_addresses(inp); SCTP_INP_RUNLOCK(inp); *optsize = sizeof(uint32_t); break; @@ -2148,14 +2149,14 @@ flags_out: case SCTP_GET_REMOTE_ADDR_SIZE: { uint32_t *value; - size_t size; struct sctp_nets *net; + size_t size; SCTP_CHECK_AND_CAST(value, optval, uint32_t, *optsize); /* FIXME MT: change to sctp_assoc_value? */ SCTP_FIND_STCB(inp, stcb, (sctp_assoc_t)*value); - if (stcb) { + if (stcb != NULL) { size = 0; /* Count the sizes */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { @@ -2205,7 +2206,7 @@ flags_out: SCTP_CHECK_AND_CAST(saddr, optval, struct sctp_getaddresses, *optsize); SCTP_FIND_STCB(inp, stcb, saddr->sget_assoc_id); - if (stcb) { + if (stcb != NULL) { left = *optsize - offsetof(struct sctp_getaddresses, addr); *optsize = offsetof(struct sctp_getaddresses, addr); addr = &saddr->addr[0].sa; @@ -2276,7 +2277,7 @@ flags_out: limit = *optsize - offsetof(struct sctp_getaddresses, addr); actual = sctp_fill_up_addresses(inp, stcb, limit, &saddr->addr[0].sa); - if (stcb) { + if (stcb != NULL) { SCTP_TCB_UNLOCK(stcb); } *optsize = offsetof(struct sctp_getaddresses, addr) + actual; From nobody Wed Dec 1 09:16:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 23E5218A430D; Wed, 1 Dec 2021 09: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 4J3tkm27gyz3mKG; Wed, 1 Dec 2021 09:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1679227194; Wed, 1 Dec 2021 09: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 1B19GlMp086920; Wed, 1 Dec 2021 09: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 1B19GlEG086919; Wed, 1 Dec 2021 09:16:47 GMT (envelope-from git) Date: Wed, 1 Dec 2021 09:16:47 GMT Message-Id: <202112010916.1B19GlEG086919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: dabd8bf9145a - main - libc sctp: fix sctp_getladdrs() for 64-bit BE platforms List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dabd8bf9145a0a7255473a482e2ccf31919c3089 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638350208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4kwX1OINUPdUfDUzHPtjq6ugUqFfV8zfDdRBAbG3Hwk=; b=cwEnq4K+xv6TnKoU1Gx+V/BsOmj4TU21dOzIuHmeKqrAr81Z96YKoyrh8hMnHOyQVJ49V+ j7v8HBKASdW/DPG1qE+G5cF8AB29wHCbUn9fGT6f+mk0dHj2WvfnkmH6A38qHCHWB3MiTP RFg+VMuNlDNeSt2vDQmlpSeXvH6zEHjp8tfjgNGp4ywoeqnvSpWtME3jtza9HkuYHPpxR8 Bupjd8gpmR2m+j1dCmQ/BTpukXOrobRuyZswhAysnv3cCe7b6AKPKhTlBKlKtnlpjdfL1L xKKwXqYvzw3VCtpluQnFMdPf/TvfvE5TBu22+3ORzJUOdTiVotbCU3L24uLO5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638350208; a=rsa-sha256; cv=none; b=tcnl0QRn8Ri7miPU7zLtcqMB/1NnjKl9a7UH0MMgV91sH7USdBv2tK9uv6CROozupnfasv IsUjg8QckJkapzz4yM8XIhJ8HnDgCT4KrspLCuQbRB9Ip+A7j0MdkvyVDxpC2KQ2S6AgCW TM+S5dX/wixKNbqCYe0L5E/9guUpZLerFw2/7Ma2/lwSd+6TDQ5aQDvURjrpvsHAyBjoLE Q47dXsdzO3+uNT8Mck0My38A6i2r9RD0+MURwR156aM3l2fJzcDHmqUzD+jd3wLsUcjg38 9EIBACYkeNVbZbiCLiIiLHZlg0EP5roa19cHjSKarAi2lTuApJmly9mSmZEudw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=dabd8bf9145a0a7255473a482e2ccf31919c3089 commit dabd8bf9145a0a7255473a482e2ccf31919c3089 Author: Michael Tuexen AuthorDate: 2021-12-01 09:13:20 +0000 Commit: Michael Tuexen CommitDate: 2021-12-01 09:13:20 +0000 libc sctp: fix sctp_getladdrs() for 64-bit BE platforms When calling getsockopt() with SCTP_GET_LOCAL_ADDR_SIZE, use a pointer to a 32-bit variable, since this is what the kernel expects. While there, do some cleanups. MFC after: 1 week --- lib/libc/net/sctp_sys_calls.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c index 66a0f6adac3a..5acb957c3d3f 100644 --- a/lib/libc/net/sctp_sys_calls.c +++ b/lib/libc/net/sctp_sys_calls.c @@ -391,23 +391,23 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) { struct sctp_getaddresses *addrs; struct sockaddr *sa; - sctp_assoc_t asoc; caddr_t lim; socklen_t opt_len; + uint32_t size_of_addresses; int cnt; if (raddrs == NULL) { errno = EFAULT; return (-1); } - asoc = id; - opt_len = (socklen_t)sizeof(sctp_assoc_t); + /* When calling getsockopt(), the value contains the assoc_id. */ + size_of_addresses = (uint32_t)id; + opt_len = (socklen_t)sizeof(uint32_t); if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_REMOTE_ADDR_SIZE, - &asoc, &opt_len) != 0) { + &size_of_addresses, &opt_len) != 0) { return (-1); } - /* size required is returned in 'asoc' */ - opt_len = (socklen_t)((size_t)asoc + sizeof(struct sctp_getaddresses)); + opt_len = (socklen_t)((size_t)size_of_addresses + sizeof(struct sctp_getaddresses)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { errno = ENOMEM; @@ -446,10 +446,10 @@ int sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) { struct sctp_getaddresses *addrs; - caddr_t lim; struct sockaddr *sa; - size_t size_of_addresses; + caddr_t lim; socklen_t opt_len; + uint32_t size_of_addresses; int cnt; if (raddrs == NULL) { @@ -457,7 +457,7 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) return (-1); } size_of_addresses = 0; - opt_len = (socklen_t)sizeof(int); + opt_len = (socklen_t)sizeof(uint32_t); if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDR_SIZE, &size_of_addresses, &opt_len) != 0) { errno = ENOMEM; @@ -467,7 +467,7 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) errno = ENOTCONN; return (-1); } - opt_len = (socklen_t)(size_of_addresses + sizeof(struct sctp_getaddresses)); + opt_len = (socklen_t)((size_t)size_of_addresses + sizeof(struct sctp_getaddresses)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { errno = ENOMEM; From nobody Wed Dec 1 10:16:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8D3E018BE7E8; Wed, 1 Dec 2021 10:16: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 4J3w3k2HFVz4Whq; Wed, 1 Dec 2021 10:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A69D279E6; Wed, 1 Dec 2021 10:16: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 1B1AGYLc067119; Wed, 1 Dec 2021 10:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1AGYUY067118; Wed, 1 Dec 2021 10:16:34 GMT (envelope-from git) Date: Wed, 1 Dec 2021 10:16:34 GMT Message-Id: <202112011016.1B1AGYUY067118@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 6e9309bd3b04 - main - libc sctp: improve error reporting of sctp_getladdrs() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e9309bd3b04501b69593900a14e01114c7f2404 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638353794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=up+G0k2K8pe+ClnS5yTtaUbumpuSlZX0gB74TnxfteI=; b=aipGHyO7V8BPpaYM+Ir6SLOLhdvrQnskfsQZh8pJME8prJMLuDcGc5EZAVE3fNswJFzpgh rxK9qu7TYxWS9LAcMrD1ggc/fNlSPU9VaQyyn6GVu3ZNxHth/uC8vw4bisNcV020ZU6G7B 80dd8BIi0dmMiuASqHHz/1MTP5ndciTlo/i0yRnoNEvkHr+/13ezLEQtK+0ysvKk4vwW0D EikczEoQ3UEsznTwOlARZQrJjkWw1QcQV3BS1gLNNzNwJd/EN6shxXpyW9rqYONpqmTtGf vFMqNfB9bVl3Ea0vBR5YmFCSbO8YyyPXD19w48gm44EYNQOsPMzQf5D2MnSrkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638353794; a=rsa-sha256; cv=none; b=ceZD4KTMTpv7BWJH+7cfyUd+Arz12uViUdVNDuUaCZIdywpWNqSLPF2mLo1PuERNLTlXgP CgMFQdv+5ADVqdbPGZPKcGFNaJF5k9ewp0rkklw+Wzfi0P7jl5PjVcc2lYuTGZp+7aI3AP 05SDoWxm9iexdBpkzEOPvggsCH/YNNP/KCmB2wiw/v+I0TkBqw5GLBYO4246pFjx053Ztg m/64EVxyjIayJ5ikZ9Rty+n27lLL0F72Upt9vvQLcy8JVTAcu8f2k7zX+pk156LT1Pqc7b qE7Yzz4QqpO3P0fEXmE+in/GYe5+hIi6dM095fWW6ETS/YuXM5FqwwkifjGFAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6e9309bd3b04501b69593900a14e01114c7f2404 commit 6e9309bd3b04501b69593900a14e01114c7f2404 Author: Michael Tuexen AuthorDate: 2021-12-01 10:14:36 +0000 Commit: Michael Tuexen CommitDate: 2021-12-01 10:14:36 +0000 libc sctp: improve error reporting of sctp_getladdrs() Do not hide errno from getsockopt() called internally. MFC after: 1 week --- lib/libc/net/sctp_sys_calls.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c index 5acb957c3d3f..3249eeaa4c4e 100644 --- a/lib/libc/net/sctp_sys_calls.c +++ b/lib/libc/net/sctp_sys_calls.c @@ -460,7 +460,6 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) opt_len = (socklen_t)sizeof(uint32_t); if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDR_SIZE, &size_of_addresses, &opt_len) != 0) { - errno = ENOMEM; return (-1); } if (size_of_addresses == 0) { @@ -478,7 +477,6 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDRESSES, addrs, &opt_len) != 0) { free(addrs); - errno = ENOMEM; return (-1); } *raddrs = &addrs->addr[0].sa; From nobody Wed Dec 1 12:48:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D4B3518BA2CB; Wed, 1 Dec 2021 12:48: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 4J3zR34GByz3jsY; Wed, 1 Dec 2021 12:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 720781CC9; Wed, 1 Dec 2021 12:48: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 1B1CmVW7065809; Wed, 1 Dec 2021 12:48:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1CmVJU065808; Wed, 1 Dec 2021 12:48:31 GMT (envelope-from git) Date: Wed, 1 Dec 2021 12:48:31 GMT Message-Id: <202112011248.1B1CmVJU065808@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: aa5664c0f53b - stable/13 - safexcel: Fix -Wunused-but-set-variable warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: aa5664c0f53b60915ad1400c4614af9b248223ab Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638362911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HuRLUjfs/iv4S2tIkYyYO/OVlnzih9Ki+UFmcAgZZMs=; b=M2OlnSwrA7+uLI0h+0Z+Nh6QMsiAfwYG76QcpIpCL4GKIqfRpyc6SnqDs2XIhlJSh4v8Tz WNmRg4Z5F6VgdDb/H31ZDrCTeN99wwO9Fo41e2xXh4qXVHo0WbKNQQZQ2gNjIMCs8+JnOx qTxjNluK0LykHOyjioW0yt0e91wNGYIO6ULoajsm/R/MNnMXcutNt5ZSkw8TBxPlola0Zb p1LQI5TuA7DqoOcYv2h8K37ls7wc7FScv3XdiFpc6Gl5AoLbGN2QFjZHpsGs7NW/XVVQ37 IgjudwLNFIkD2jkJAvdyj1P6bNIMVSTKv2csTvU8mG7PXJFxfEMscggpIqZBAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638362911; a=rsa-sha256; cv=none; b=h8m1ffavskJUNX2CIvTzHiJ4J5V3SZXjWMF2MbarkLTfjwKV4j+IW4zQGT30TEyRtLy8d4 8e1q+vmryf1NlLYrsEFzwsIjrLnVfuHESEfIQLhD4dgSwkN+5UzXaGepiWc+dSsipaGDlc UO5hDOsJamc7P5AYaUZlmPkuUQ9yklMMrwnAMVYNFYCADtqxEFVkqF5ieTUdGc5hRFVstV LJ6YhfCDZa5RtWge3xf6VXJEx0NZCzQvHrhfv5DxGIpmZlik433olRPR643UR/eBWsdQKY OAC8Ue8GaWCMOlnZhMRWG4JTQV/2Pm597s7WCnFA13EyDia1Q1xVqJSxGbLeRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aa5664c0f53b60915ad1400c4614af9b248223ab commit aa5664c0f53b60915ad1400c4614af9b248223ab Author: Mark Johnston AuthorDate: 2021-11-24 18:30:39 +0000 Commit: Mark Johnston CommitDate: 2021-12-01 12:40:49 +0000 safexcel: Fix -Wunused-but-set-variable warnings Sponsored by: The FreeBSD Foundation (cherry picked from commit 60c95f316374fdd383f70b50e98ad097460accf3) --- sys/dev/safexcel/safexcel.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/dev/safexcel/safexcel.c b/sys/dev/safexcel/safexcel.c index 6095787330c1..242f1bcfb90a 100644 --- a/sys/dev/safexcel/safexcel.c +++ b/sys/dev/safexcel/safexcel.c @@ -168,7 +168,7 @@ safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) struct safexcel_res_descr *rdesc; struct safexcel_request *req; struct safexcel_ring *ring; - uint32_t blocked, error, i, ncdescs, nrdescs, nreqs; + uint32_t blocked, error, i, nrdescs, nreqs; blocked = 0; ring = &sc->sc_ring[ringidx]; @@ -194,7 +194,7 @@ safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) bus_dmamap_sync(ring->dma_atok.tag, ring->dma_atok.map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - ncdescs = nrdescs = 0; + nrdescs = 0; for (i = 0; i < nreqs; i++) { req = safexcel_next_request(ring); @@ -203,7 +203,6 @@ safexcel_rdr_intr(struct safexcel_softc *sc, int ringidx) bus_dmamap_sync(ring->data_dtag, req->dmap, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - ncdescs += req->cdescs; while (req->cdescs-- > 0) { cdesc = safexcel_cmd_descr_next(&ring->cdr); KASSERT(cdesc != NULL, @@ -306,7 +305,6 @@ static int safexcel_configure(struct safexcel_softc *sc) { uint32_t i, mask, pemask, reg; - device_t dev; if (sc->sc_type == 197) { sc->sc_offsets = eip197_regs_offset; @@ -316,8 +314,6 @@ safexcel_configure(struct safexcel_softc *sc) pemask = EIP97_N_PES_MASK; } - dev = sc->sc_dev; - /* Scan for valid ring interrupt controllers. */ for (i = 0; i < SAFEXCEL_MAX_RING_AIC; i++) { reg = SAFEXCEL_READ(sc, SAFEXCEL_HIA_AIC_R(sc) + @@ -1625,12 +1621,10 @@ static void safexcel_instr_eta(struct safexcel_request *req, struct safexcel_instr *instr, struct safexcel_cmd_descr *cdesc) { - const struct crypto_session_params *csp; struct cryptop *crp; struct safexcel_instr *start; crp = req->crp; - csp = crypto_get_params(crp->crp_session); start = instr; /* Insert the AAD. */ @@ -2452,9 +2446,7 @@ safexcel_newsession(device_t dev, crypto_session_t cses, const struct crypto_session_params *csp) { struct safexcel_session *sess; - struct safexcel_softc *sc; - sc = device_get_softc(dev); sess = crypto_get_driver_session(cses); sess->cses = cses; @@ -2533,7 +2525,6 @@ safexcel_newsession(device_t dev, crypto_session_t cses, static int safexcel_process(device_t dev, struct cryptop *crp, int hint) { - const struct crypto_session_params *csp; struct safexcel_request *req; struct safexcel_ring *ring; struct safexcel_session *sess; @@ -2542,7 +2533,6 @@ safexcel_process(device_t dev, struct cryptop *crp, int hint) sc = device_get_softc(dev); sess = crypto_get_driver_session(crp->crp_session); - csp = crypto_get_params(crp->crp_session); if (__predict_false(crypto_buffer_len(&crp->crp_buf) > SAFEXCEL_MAX_REQUEST_SIZE)) { From nobody Wed Dec 1 12:48:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1F9B818BA405; Wed, 1 Dec 2021 12:48: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 4J3zR45Ttjz3jmg; Wed, 1 Dec 2021 12:48:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D9EC1E8E; Wed, 1 Dec 2021 12:48: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 1B1CmWj8065839; Wed, 1 Dec 2021 12:48:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1CmWud065838; Wed, 1 Dec 2021 12:48:32 GMT (envelope-from git) Date: Wed, 1 Dec 2021 12:48:32 GMT Message-Id: <202112011248.1B1CmWud065838@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: bc7bc3bdf95f - stable/13 - netinet: Remove in_cksum_update() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: bc7bc3bdf95f29d72479cf8c3c858d257f12e327 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638362912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oOQEh8gIxAkEDjPHUvYMWxdFRLr27Zr4eZX9QZiRIpk=; b=g2ZTS0/umRk38LM2Fm3CYKVSp9qiuKv+f5LIQ4E5G/OJepUIaC38S1A3MVIAVm+a5vPscG pNqsK7U1EZds07zCvy7FsklC+rDt3SlOssIe/sdDR73R645aTl2loM1FMBArxh2s/MsVGs QzzlpKb1xAIFw361qNdkiPqbrleW7Uk9xqi0stno0wVoIS0OCwJ0FvXYqtsm85kbjrDdNo tAv3GWZiGukOWqj0TMLsQACz25syKMsNI5lOMPCVSzgNcE067qDhcfEyJgVdqIUIPvRoyF aapoyc1r1oUIBdZcJ67vSM1YFAUtODRMTeeVBkvVrvvygdmWmnoqQqgi7zbDkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638362912; a=rsa-sha256; cv=none; b=pGUqXZfSVr0DVf44k0L6jX+cRXdG1Txcb0+iocF2C/OUkpkoaKoEl6I9y1mzRVfaM38rIz slfERkml1cYUlzeee3XIIkGIz2dduGm8CFT6r9wBoKlFJxXis5Gq37f5WPF3+kTIAXPSB4 M0V8bcwshAwsFWK1MHCVqO+W1v1DQq49Wvl+i3ZR4ifmr4MQcRTS3Kgoj8IWzXLXwKoUUD JhL3b1/tFK1gplmDkw0QUZJzyuwm8oI84xSHyMyRTgKqoFIbv7o3MBdN27iSj+XIgUo5I6 YwZLfR9y31zWjevfLalWRPmO6zM+CCud5H71uxf/06UiNJNOyn++FLGYliV2Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bc7bc3bdf95f29d72479cf8c3c858d257f12e327 commit bc7bc3bdf95f29d72479cf8c3c858d257f12e327 Author: Mark Johnston AuthorDate: 2021-11-24 18:15:40 +0000 Commit: Mark Johnston CommitDate: 2021-12-01 12:41:55 +0000 netinet: Remove in_cksum_update() It was never implemented on powerpc or riscv and appears to have been unused since it was added in 1998. No functional change intended. Reviewed by: kp, glebius, cy Sponsored by: The FreeBSD Foundation (cherry picked from commit 09100f936be0684aa8caef441b96345960fd9c72) --- sys/amd64/include/in_cksum.h | 29 ----------------------------- sys/i386/include/in_cksum.h | 19 ------------------- sys/mips/include/in_cksum.h | 29 ----------------------------- sys/powerpc/include/in_cksum.h | 29 ----------------------------- 4 files changed, 106 deletions(-) diff --git a/sys/amd64/include/in_cksum.h b/sys/amd64/include/in_cksum.h index 79d30cafbc90..89ff1097f369 100644 --- a/sys/amd64/include/in_cksum.h +++ b/sys/amd64/include/in_cksum.h @@ -45,35 +45,6 @@ #define in_cksum(m, len) in_cksum_skip(m, len, 0) -#if defined(IPVERSION) && (IPVERSION == 4) -/* - * It it useful to have an Internet checksum routine which is inlineable - * and optimized specifically for the task of computing IP header checksums - * in the normal case (where there are no options and the header length is - * therefore always exactly five 32-bit words. - */ -#ifdef __CC_SUPPORTS___INLINE - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} - -#else - -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif -#endif - #ifdef _KERNEL #if defined(IPVERSION) && (IPVERSION == 4) u_int in_cksum_hdr(const struct ip *ip); diff --git a/sys/i386/include/in_cksum.h b/sys/i386/include/in_cksum.h index 87c18ec4066d..a8214e97cd9a 100644 --- a/sys/i386/include/in_cksum.h +++ b/sys/i386/include/in_cksum.h @@ -83,14 +83,6 @@ in_cksum_hdr(const struct ip *ip) return ~sum & 0xffff; } - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} #endif static __inline u_short @@ -123,17 +115,6 @@ in_pseudo(u_int sum, u_int b, u_int c) sum -= 0xffff; return (sum); } - -#else -#if defined(IPVERSION) && (IPVERSION == 4) -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif #endif #ifdef _KERNEL diff --git a/sys/mips/include/in_cksum.h b/sys/mips/include/in_cksum.h index d55b838b42ed..580fb9c024f8 100644 --- a/sys/mips/include/in_cksum.h +++ b/sys/mips/include/in_cksum.h @@ -42,35 +42,6 @@ #define in_cksum(m, len) in_cksum_skip(m, len, 0) -#if defined(IPVERSION) && (IPVERSION == 4) -/* - * It it useful to have an Internet checksum routine which is inlineable - * and optimized specifically for the task of computing IP header checksums - * in the normal case (where there are no options and the header length is - * therefore always exactly five 32-bit words. - */ -#ifdef __CC_SUPPORTS___INLINE - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} - -#else - -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif -#endif - #ifdef _KERNEL #if defined(IPVERSION) && (IPVERSION == 4) u_int in_cksum_hdr(const struct ip *ip); diff --git a/sys/powerpc/include/in_cksum.h b/sys/powerpc/include/in_cksum.h index fd34e13d3822..7407b4ad7104 100644 --- a/sys/powerpc/include/in_cksum.h +++ b/sys/powerpc/include/in_cksum.h @@ -41,35 +41,6 @@ #define in_cksum(m, len) in_cksum_skip(m, len, 0) -#if defined(IPVERSION) && (IPVERSION == 4) -/* - * It it useful to have an Internet checksum routine which is inlineable - * and optimized specifically for the task of computing IP header checksums - * in the normal case (where there are no options and the header length is - * therefore always exactly five 32-bit words. - */ -#ifdef __CC_SUPPORTS___INLINE - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} - -#else - -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif -#endif - #ifdef _KERNEL #if defined(IPVERSION) && (IPVERSION == 4) u_int in_cksum_hdr(const struct ip *ip); From nobody Wed Dec 1 12:48:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4001218BA2DA; Wed, 1 Dec 2021 12:48: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 4J3zR61Blgz3jqF; Wed, 1 Dec 2021 12:48:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE3851C5D; Wed, 1 Dec 2021 12:48: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 1B1CmXHT065866; Wed, 1 Dec 2021 12:48:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1CmX8D065865; Wed, 1 Dec 2021 12:48:33 GMT (envelope-from git) Date: Wed, 1 Dec 2021 12:48:33 GMT Message-Id: <202112011248.1B1CmX8D065865@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: 6c5409c5d6c7 - stable/13 - natd: Remove uneeded in_cksum.h 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6c5409c5d6c7e018c5f16df47a700a557568dc5d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638362914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YFeXicHo9vwUr6TTz6rBwlxjDG63YMpASa9a+rc90dg=; b=YMf1bfw6DYRnlMRmS4EEEzj9fyqyeIOYJzKzkSnhSOuNHLLG6Z39qX013WxruolKnVa4YQ i+1nqsst5dHDqxSRnaQxmRiHbZ3nM/Br8d0rR0h2aVd5DenHRAAzOg1jhXK+gDhwQvRdsC vjSJwTok8IaOTaob88CsjlUxC55lFCDGtYPZTmepT/AJv2Nj4UYYYk9aZztuZHeqeggo9/ oM0DZuHd3z35ifjRyqnXuqiATKjdEB5RNAqTjZhvd+YT1dvd4wyGmToSFEJRdnvJHjzvGY aK8Vmn/wxHXTqa+f7Raowik5yA0Ehg2VhtLchBMZN5VA6k7g3xcd5ghJZuvurQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638362914; a=rsa-sha256; cv=none; b=HKhhGdBv6A8iyu9kywmIeoly+s/ozbugJQZaYqcO9fIBqG1S4+M3YpCa8xvZH/7MEm330C ZzG/1Rfd5Cm4KapomJ2HNXrlnMCZ4N9eU6rfcrCZS5EkOj5BmHdRPFqpqyQAtSQhxXPgAN zto5s9bHBSlLq/S8F9aHz/B07gXhU9EkZPel+PTG3Lj7utl3C9Vfc9XK/PpEoMn0DJmI6C mVfALxhJFrYacBmzVriQ8DFHqiEz3Cl0X0aqmojeo6lPqHzPp/5qO8s7kQp1UpErCcN/ak Z1PxeNOEziU+akylnWoDbVnPdirf7oIjTRrcvaTgto+oB4RU6ohi2wUlIr/phw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6c5409c5d6c7e018c5f16df47a700a557568dc5d commit 6c5409c5d6c7e018c5f16df47a700a557568dc5d Author: Mark Johnston AuthorDate: 2021-11-24 18:30:28 +0000 Commit: Mark Johnston CommitDate: 2021-12-01 12:42:13 +0000 natd: Remove uneeded in_cksum.h includes Sponsored by: The FreeBSD Foundation (cherry picked from commit 517373f7230207e60e4561bc44c8b3c44acea963) --- sbin/natd/icmp.c | 1 - sbin/natd/natd.c | 1 - 2 files changed, 2 deletions(-) diff --git a/sbin/natd/icmp.c b/sbin/natd/icmp.c index 1509b965f4b8..f85457ac4773 100644 --- a/sbin/natd/icmp.c +++ b/sbin/natd/icmp.c @@ -30,7 +30,6 @@ #include #include #include -#include #include diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c index 268850c0a95a..402c430dfdfd 100644 --- a/sbin/natd/natd.c +++ b/sbin/natd/natd.c @@ -24,7 +24,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From nobody Wed Dec 1 12:48:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 28F4818BA341; Wed, 1 Dec 2021 12:48:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3zR70rZzz3jf2; Wed, 1 Dec 2021 12:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E02181CCA; Wed, 1 Dec 2021 12:48: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 1B1CmYpK065899; Wed, 1 Dec 2021 12:48:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1CmYVa065898; Wed, 1 Dec 2021 12:48:34 GMT (envelope-from git) Date: Wed, 1 Dec 2021 12:48:34 GMT Message-Id: <202112011248.1B1CmYVa065898@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: 53e965ff94c3 - stable/13 - netinet: Remove in_cksum.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: 53e965ff94c3a420e9b240920dc1eb742515b664 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638362915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GHYyWiNmcZdhpMkclM5kDecLlb40i8ZlMtBj/Y6lwHI=; b=x43tkq00RjcvDEHs1dK57aGBN+XDnkB82XV4m8qQtDQhy2AnEy5Y69CfxE5SW30WaksgRE nVsTbHjwNyM94DE3sU6IXIpeqbsPA0FzFqnh8gow/A4MyA9MQnXrdGuF0TlA/zL0n2DqYh HH7Zxo4qmlWqGsp+tKwJum2P2t10X2f6655GIx7+lSsLVsq5ZfhNsM8jWvj/yLKkoyhNeu T5ZK1J2awArGSim9x4jmEVZVG9r9XGTA8omuRRBSKLSMygProH/eFYcchn5FSFNyxy595P 36KYjbeECFpUEkqaeVqau9HgNQRrPARhxOi9AvMS80THJgQllixPe1eX7ieauQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638362915; a=rsa-sha256; cv=none; b=q2DJyJuvYZPZbf7bowxJgbc35HbAl8mQsTsbpoAslayakJXjNt+PvFwz2PNuAfYbHofaPa 4YZLwA4o/TYipsya1zbvDWSXFGrWO1DmPfSPq/3Xowa2zrmf/Wy2p42XTY41sJeUSc6QDg bUognRsGSQ0kotnWvUToJ7zQe/UcGoJRS1FN0AKTfXjDIngsCk0Qz7qBjorcIcLiOCPu7j oQ40SUF1sZSjyarjsdVwhLaJc7/92NSLojLaF3S+W5x2NMGjfLIYE2x/lw5wELbNt+lm22 Do1qZS4EdVabseh98XJQI3PCFbNFqt40wySZGpNCwjD7fFRbPElsyrNPtD3oww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=53e965ff94c3a420e9b240920dc1eb742515b664 commit 53e965ff94c3a420e9b240920dc1eb742515b664 Author: Mark Johnston AuthorDate: 2021-11-24 18:19:34 +0000 Commit: Mark Johnston CommitDate: 2021-12-01 12:42:26 +0000 netinet: Remove in_cksum.c It does not get compiled into the kernel. No functional change inteneded. Reviewed by: kp, glebius, cy Sponsored by: The FreeBSD Foundation (cherry picked from commit 5195bcc2126b302802643f5204d1030e5893fb62) --- sys/netinet/in_cksum.c | 148 ------------------------------------------------- 1 file changed, 148 deletions(-) diff --git a/sys/netinet/in_cksum.c b/sys/netinet/in_cksum.c deleted file mode 100644 index 64a69760dab7..000000000000 --- a/sys/netinet/in_cksum.c +++ /dev/null @@ -1,148 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1988, 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93 - */ - -#include -__FBSDID("$FreeBSD$"); - -#include -#include - -/* - * Checksum routine for Internet Protocol family headers (Portable Version). - * - * This routine is very heavily used in the network - * code and should be modified for each CPU to be as fast as possible. - */ - -#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x) -#define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);} - -int -in_cksum(struct mbuf *m, int len) -{ - u_short *w; - int sum = 0; - int mlen = 0; - int byte_swapped = 0; - - union { - char c[2]; - u_short s; - } s_util; - union { - u_short s[2]; - long l; - } l_util; - - for (;m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - w = mtod(m, u_short *); - if (mlen == -1) { - /* - * The first byte of this mbuf is the continuation - * of a word spanning between this mbuf and the - * last mbuf. - * - * s_util.c[0] is already saved when scanning previous - * mbuf. - */ - s_util.c[1] = *(char *)w; - sum += s_util.s; - w = (u_short *)((char *)w + 1); - mlen = m->m_len - 1; - len--; - } else - mlen = m->m_len; - if (len < mlen) - mlen = len; - len -= mlen; - /* - * Force to even boundary. - */ - if ((1 & (uintptr_t) w) && (mlen > 0)) { - REDUCE; - sum <<= 8; - s_util.c[0] = *(u_char *)w; - w = (u_short *)((char *)w + 1); - mlen--; - byte_swapped = 1; - } - /* - * Unroll the loop to make overhead from - * branches &c small. - */ - while ((mlen -= 32) >= 0) { - sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; - sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7]; - sum += w[8]; sum += w[9]; sum += w[10]; sum += w[11]; - sum += w[12]; sum += w[13]; sum += w[14]; sum += w[15]; - w += 16; - } - mlen += 32; - while ((mlen -= 8) >= 0) { - sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; - w += 4; - } - mlen += 8; - if (mlen == 0 && byte_swapped == 0) - continue; - REDUCE; - while ((mlen -= 2) >= 0) { - sum += *w++; - } - if (byte_swapped) { - REDUCE; - sum <<= 8; - byte_swapped = 0; - if (mlen == -1) { - s_util.c[1] = *(char *)w; - sum += s_util.s; - mlen = 0; - } else - mlen = -1; - } else if (mlen == -1) - s_util.c[0] = *(char *)w; - } - if (len) - printf("cksum: out of data\n"); - if (mlen == -1) { - /* The last mbuf has odd # of bytes. Follow the - standard (the odd byte may be shifted left by 8 bits - or not as determined by endian-ness of the machine) */ - s_util.c[1] = 0; - sum += s_util.s; - } - REDUCE; - return (~sum & 0xffff); -} From nobody Wed Dec 1 12:48:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5155118BA3B5; Wed, 1 Dec 2021 12:48: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 4J3zR81j1dz3jcW; Wed, 1 Dec 2021 12:48:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B0AE1564; Wed, 1 Dec 2021 12:48: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 1B1CmZfA065923; Wed, 1 Dec 2021 12:48:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1CmZQC065922; Wed, 1 Dec 2021 12:48:35 GMT (envelope-from git) Date: Wed, 1 Dec 2021 12:48:35 GMT Message-Id: <202112011248.1B1CmZQC065922@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: 1d250ec70748 - stable/13 - netinet: Deduplicate most in_cksum() implementations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1d250ec70748f9efb4d52d93bdd71eff6de057ee Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638362916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0kSulYIRyH6/Y8DFtNtvY//FLQzsp42HryGTHEp920c=; b=QXZxeR9qjHIKwr7ild17BBW5KVAcEaiYWYGzAL7uQz2huCwvswMpom3WwTPKmaicJHqOpV DZLqKUg51W9wMc1g4XW4nND4ZRR6RZoJ7Cy6CNyuv29n9J85t1k81yFzxVMfnI8I8ViJvR A7QvdcBJb7lw/ph1cIuTnFoZyuQyJKareLii7eCWeuDh19k58CtWt8yeI7UXp3j/Xji9/j QUZ8Thu5KHaVjj2O5Rf5xThOZ4VX55xX9ZBIDLJUwJ7BZUXspz7nkOF9mMSwMU+iClAFon RBferW1nCNdNjk/U+IbKveK6yn9B8rdkWv0BQQebD5CHwmw+brGEm6PYfZ1bAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638362916; a=rsa-sha256; cv=none; b=JjYFEG5q5EEzoo02G3KPI1paU7SOcpYYhR+B69zBTrAu4pp21fJ6Bz0If+qUU0OrOAnIOo Hro7ZuomA/CN6FDhFENCMfN6QuWYRLkK5d9xrJ4Oavue2gpklU3/qglpeKb1K7WpgDqqRF mtYoEZhe+HHtdiiMFdSlMJslOsBVqP6WPeqTQHsn9oXMlUa4hpWk9f7bTNPw6Pkm4m40g+ hvMHpYNZQhT4JdUscLXc3lXhDWlxS7ajQ5oI0po4M6FWuQMaKgEIxPKkVlpjDeiPHjbBxZ lSMZ26IKESTS0yrUedZD0Yb/1SBE9gswzHlLLyiI77IxPAOviBPiNl1qlVgTZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1d250ec70748f9efb4d52d93bdd71eff6de057ee commit 1d250ec70748f9efb4d52d93bdd71eff6de057ee Author: Mark Johnston AuthorDate: 2021-11-24 18:19:44 +0000 Commit: Mark Johnston CommitDate: 2021-12-01 12:42:43 +0000 netinet: Deduplicate most in_cksum() implementations in_cksum() and related routines are implemented separately for each platform, but only i386 and arm have optimized versions. Other platforms' copies of in_cksum.c are identical except for style differences and support for big-endian CPUs. Deduplicate the implementations for the rest of the platforms. This will make it easier to implement in_cksum() for unmapped mbufs. On arm and i386, define HAVE_MD_IN_CKSUM to mean that the MI implementation is not to be compiled. No functional change intended. Reviewed by: kp, glebius Sponsored by: The FreeBSD Foundation (cherry picked from commit ecbbe831445a4b94279e5932828d60076e4ca444) --- sys/amd64/amd64/in_cksum.c | 243 ---------------------- sys/arm/arm/{in_cksum.c => in_cksum_machdep.c} | 0 sys/arm/include/in_cksum.h | 3 + sys/arm64/arm64/in_cksum.c | 241 --------------------- sys/conf/files | 1 + sys/conf/files.amd64 | 1 - sys/conf/files.arm | 2 +- sys/conf/files.arm64 | 1 - sys/conf/files.i386 | 2 +- sys/conf/files.mips | 1 - sys/conf/files.powerpc | 1 - sys/conf/files.riscv | 1 - sys/i386/i386/{in_cksum.c => in_cksum_machdep.c} | 0 sys/i386/include/in_cksum.h | 3 + sys/{mips/mips => netinet}/in_cksum.c | 7 + sys/powerpc/powerpc/in_cksum.c | 253 ----------------------- sys/riscv/riscv/in_cksum.c | 243 ---------------------- 17 files changed, 16 insertions(+), 987 deletions(-) diff --git a/sys/amd64/amd64/in_cksum.c b/sys/amd64/amd64/in_cksum.c deleted file mode 100644 index 30e90f043cc3..000000000000 --- a/sys/amd64/amd64/in_cksum.c +++ /dev/null @@ -1,243 +0,0 @@ -/* $NetBSD: in_cksum.c,v 1.7 1997/09/02 13:18:15 thorpej Exp $ */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 1988, 1992, 1993 - * The Regents of the University of California. All rights reserved. - * Copyright (c) 1996 - * Matt Thomas - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93 - */ - -#include /* RCS ID & Copyright macro defns */ -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include - -/* - * Checksum routine for Internet Protocol family headers - * (Portable Alpha version). - * - * This routine is very heavily used in the network - * code and should be modified for each CPU to be as fast as possible. - */ - -#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x) -#define REDUCE32 \ - { \ - q_util.q = sum; \ - sum = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - } -#define REDUCE16 \ - { \ - q_util.q = sum; \ - l_util.l = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - sum = l_util.s[0] + l_util.s[1]; \ - ADDCARRY(sum); \ - } - -static const u_int32_t in_masks[] = { - /*0 bytes*/ /*1 byte*/ /*2 bytes*/ /*3 bytes*/ - 0x00000000, 0x000000FF, 0x0000FFFF, 0x00FFFFFF, /* offset 0 */ - 0x00000000, 0x0000FF00, 0x00FFFF00, 0xFFFFFF00, /* offset 1 */ - 0x00000000, 0x00FF0000, 0xFFFF0000, 0xFFFF0000, /* offset 2 */ - 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, /* offset 3 */ -}; - -union l_util { - u_int16_t s[2]; - u_int32_t l; -}; -union q_util { - u_int16_t s[4]; - u_int32_t l[2]; - u_int64_t q; -}; - -static u_int64_t -in_cksumdata(const void *buf, int len) -{ - const u_int32_t *lw = (const u_int32_t *) buf; - u_int64_t sum = 0; - u_int64_t prefilled; - int offset; - union q_util q_util; - - if ((3 & (long) lw) == 0 && len == 20) { - sum = (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3] + lw[4]; - REDUCE32; - return sum; - } - - if ((offset = 3 & (long) lw) != 0) { - const u_int32_t *masks = in_masks + (offset << 2); - lw = (u_int32_t *) (((long) lw) - offset); - sum = *lw++ & masks[len >= 3 ? 3 : len]; - len -= 4 - offset; - if (len <= 0) { - REDUCE32; - return sum; - } - } -#if 0 - /* - * Force to cache line boundary. - */ - offset = 32 - (0x1f & (long) lw); - if (offset < 32 && len > offset) { - len -= offset; - if (4 & offset) { - sum += (u_int64_t) lw[0]; - lw += 1; - } - if (8 & offset) { - sum += (u_int64_t) lw[0] + lw[1]; - lw += 2; - } - if (16 & offset) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - } -#endif - /* - * access prefilling to start load of next cache line. - * then add current cache line - * save result of prefilling for loop iteration. - */ - prefilled = lw[0]; - while ((len -= 32) >= 4) { - u_int64_t prefilling = lw[8]; - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - prefilled = prefilling; - } - if (len >= 0) { - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - } else { - len += 32; - } - while ((len -= 16) >= 0) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - len += 16; - while ((len -= 4) >= 0) { - sum += (u_int64_t) *lw++; - } - len += 4; - if (len > 0) - sum += (u_int64_t) (in_masks[len] & *lw); - REDUCE32; - return sum; -} - -u_short -in_addword(u_short a, u_short b) -{ - u_int64_t sum = a + b; - - ADDCARRY(sum); - return (sum); -} - -u_short -in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c) -{ - u_int64_t sum; - union q_util q_util; - union l_util l_util; - - sum = (u_int64_t) a + b + c; - REDUCE16; - return (sum); -} - -u_short -in_cksum_skip(struct mbuf *m, int len, int skip) -{ - u_int64_t sum = 0; - int mlen = 0; - int clen = 0; - caddr_t addr; - union q_util q_util; - union l_util l_util; - - len -= skip; - for (; skip && m; m = m->m_next) { - if (m->m_len > skip) { - mlen = m->m_len - skip; - addr = mtod(m, caddr_t) + skip; - goto skip_start; - } else { - skip -= m->m_len; - } - } - - for (; m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - mlen = m->m_len; - addr = mtod(m, caddr_t); -skip_start: - if (len < mlen) - mlen = len; - if ((clen ^ (long) addr) & 1) - sum += in_cksumdata(addr, mlen) << 8; - else - sum += in_cksumdata(addr, mlen); - - clen += mlen; - len -= mlen; - } - REDUCE16; - return (~sum & 0xffff); -} - -u_int in_cksum_hdr(const struct ip *ip) -{ - u_int64_t sum = in_cksumdata(ip, sizeof(struct ip)); - union q_util q_util; - union l_util l_util; - REDUCE16; - return (~sum & 0xffff); -} diff --git a/sys/arm/arm/in_cksum.c b/sys/arm/arm/in_cksum_machdep.c similarity index 100% rename from sys/arm/arm/in_cksum.c rename to sys/arm/arm/in_cksum_machdep.c diff --git a/sys/arm/include/in_cksum.h b/sys/arm/include/in_cksum.h index a75433830d73..352d46f07e7b 100644 --- a/sys/arm/include/in_cksum.h +++ b/sys/arm/include/in_cksum.h @@ -40,6 +40,9 @@ #include #ifdef _KERNEL + +#define HAVE_MD_IN_CKSUM + u_short in_cksum(struct mbuf *m, int len); u_short in_addword(u_short sum, u_short b); u_short in_cksum_skip(struct mbuf *m, int len, int skip); diff --git a/sys/arm64/arm64/in_cksum.c b/sys/arm64/arm64/in_cksum.c deleted file mode 100644 index ae02e91d9203..000000000000 --- a/sys/arm64/arm64/in_cksum.c +++ /dev/null @@ -1,241 +0,0 @@ -/* $NetBSD: in_cksum.c,v 1.7 1997/09/02 13:18:15 thorpej Exp $ */ - -/*- - * Copyright (c) 1988, 1992, 1993 - * The Regents of the University of California. All rights reserved. - * Copyright (c) 1996 - * Matt Thomas - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93 - */ - -#include /* RCS ID & Copyright macro defns */ -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include - -/* - * Checksum routine for Internet Protocol family headers - * (Portable Alpha version). - * - * This routine is very heavily used in the network - * code and should be modified for each CPU to be as fast as possible. - */ - -#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x) -#define REDUCE32 \ - { \ - q_util.q = sum; \ - sum = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - } -#define REDUCE16 \ - { \ - q_util.q = sum; \ - l_util.l = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - sum = l_util.s[0] + l_util.s[1]; \ - ADDCARRY(sum); \ - } - -static const u_int32_t in_masks[] = { - /*0 bytes*/ /*1 byte*/ /*2 bytes*/ /*3 bytes*/ - 0x00000000, 0x000000FF, 0x0000FFFF, 0x00FFFFFF, /* offset 0 */ - 0x00000000, 0x0000FF00, 0x00FFFF00, 0xFFFFFF00, /* offset 1 */ - 0x00000000, 0x00FF0000, 0xFFFF0000, 0xFFFF0000, /* offset 2 */ - 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, /* offset 3 */ -}; - -union l_util { - u_int16_t s[2]; - u_int32_t l; -}; -union q_util { - u_int16_t s[4]; - u_int32_t l[2]; - u_int64_t q; -}; - -static u_int64_t -in_cksumdata(const void *buf, int len) -{ - const u_int32_t *lw = (const u_int32_t *) buf; - u_int64_t sum = 0; - u_int64_t prefilled; - int offset; - union q_util q_util; - - if ((3 & (long) lw) == 0 && len == 20) { - sum = (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3] + lw[4]; - REDUCE32; - return sum; - } - - if ((offset = 3 & (long) lw) != 0) { - const u_int32_t *masks = in_masks + (offset << 2); - lw = (u_int32_t *) (((long) lw) - offset); - sum = *lw++ & masks[len >= 3 ? 3 : len]; - len -= 4 - offset; - if (len <= 0) { - REDUCE32; - return sum; - } - } -#if 0 - /* - * Force to cache line boundary. - */ - offset = 32 - (0x1f & (long) lw); - if (offset < 32 && len > offset) { - len -= offset; - if (4 & offset) { - sum += (u_int64_t) lw[0]; - lw += 1; - } - if (8 & offset) { - sum += (u_int64_t) lw[0] + lw[1]; - lw += 2; - } - if (16 & offset) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - } -#endif - /* - * access prefilling to start load of next cache line. - * then add current cache line - * save result of prefilling for loop iteration. - */ - prefilled = lw[0]; - while ((len -= 32) >= 4) { - u_int64_t prefilling = lw[8]; - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - prefilled = prefilling; - } - if (len >= 0) { - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - } else { - len += 32; - } - while ((len -= 16) >= 0) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - len += 16; - while ((len -= 4) >= 0) { - sum += (u_int64_t) *lw++; - } - len += 4; - if (len > 0) - sum += (u_int64_t) (in_masks[len] & *lw); - REDUCE32; - return sum; -} - -u_short -in_addword(u_short a, u_short b) -{ - u_int64_t sum = a + b; - - ADDCARRY(sum); - return (sum); -} - -u_short -in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c) -{ - u_int64_t sum; - union q_util q_util; - union l_util l_util; - - sum = (u_int64_t) a + b + c; - REDUCE16; - return (sum); -} - -u_short -in_cksum_skip(struct mbuf *m, int len, int skip) -{ - u_int64_t sum = 0; - int mlen = 0; - int clen = 0; - caddr_t addr; - union q_util q_util; - union l_util l_util; - - len -= skip; - for (; skip && m; m = m->m_next) { - if (m->m_len > skip) { - mlen = m->m_len - skip; - addr = mtod(m, caddr_t) + skip; - goto skip_start; - } else { - skip -= m->m_len; - } - } - - for (; m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - mlen = m->m_len; - addr = mtod(m, caddr_t); -skip_start: - if (len < mlen) - mlen = len; - if ((clen ^ (long) addr) & 1) - sum += in_cksumdata(addr, mlen) << 8; - else - sum += in_cksumdata(addr, mlen); - - clen += mlen; - len -= mlen; - } - REDUCE16; - return (~sum & 0xffff); -} - -u_int in_cksum_hdr(const struct ip *ip) -{ - u_int64_t sum = in_cksumdata(ip, sizeof(struct ip)); - union q_util q_util; - union l_util l_util; - REDUCE16; - return (~sum & 0xffff); -} diff --git a/sys/conf/files b/sys/conf/files index 3dc1caf8b53a..abfc1f9101ae 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4363,6 +4363,7 @@ netinet/accf_http.c optional accept_filter_http inet netinet/if_ether.c optional inet ether netinet/igmp.c optional inet netinet/in.c optional inet +netinet/in_cksum.c optional inet | inet6 netinet/in_debug.c optional inet ddb netinet/in_kdtrace.c optional inet | inet6 netinet/ip_carp.c optional inet carp | inet6 carp diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index bf2213eec68c..633d9125398c 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -110,7 +110,6 @@ amd64/amd64/exception.S standard amd64/amd64/exec_machdep.c standard amd64/amd64/fpu.c standard amd64/amd64/gdb_machdep.c optional gdb -amd64/amd64/in_cksum.c optional inet | inet6 amd64/amd64/initcpu.c standard amd64/amd64/io.c optional io amd64/amd64/locore.S standard no-obj diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 69437d21e880..6f535f57b07e 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -34,8 +34,8 @@ arm/arm/generic_timer.c optional generic_timer arm/arm/gic.c optional gic arm/arm/gic_fdt.c optional gic fdt arm/arm/identcpu-v6.c standard -arm/arm/in_cksum.c optional inet | inet6 arm/arm/in_cksum_arm.S optional inet | inet6 +arm/arm/in_cksum_machdep.c optional inet | inet6 kern/subr_intr.c standard arm/arm/locore.S standard no-obj arm/arm/hypervisor-stub.S standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 84fd0c7858ff..c855d908bfc9 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -56,7 +56,6 @@ arm64/arm64/gic_v3.c standard arm64/arm64/gic_v3_acpi.c optional acpi arm64/arm64/gic_v3_fdt.c optional fdt arm64/arm64/identcpu.c standard -arm64/arm64/in_cksum.c optional inet | inet6 arm64/arm64/locore.S standard no-obj arm64/arm64/machdep.c standard arm64/arm64/machdep_boot.c standard diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 7beb3f21292c..8da7a15a5b63 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -173,7 +173,7 @@ i386/i386/elf_machdep.c standard i386/i386/exception.s standard i386/i386/gdb_machdep.c optional gdb i386/i386/geode.c optional cpu_geode -i386/i386/in_cksum.c optional inet | inet6 +i386/i386/in_cksum_machdep.c optional inet | inet6 i386/i386/initcpu.c standard i386/i386/io.c optional io i386/i386/k6_mem.c optional mem diff --git a/sys/conf/files.mips b/sys/conf/files.mips index 7ee5b0019bd7..70eb44d0165d 100644 --- a/sys/conf/files.mips +++ b/sys/conf/files.mips @@ -20,7 +20,6 @@ mips/mips/exception.S standard mips/mips/fp.S standard mips/mips/freebsd32_machdep.c optional compat_freebsd32 mips/mips/gdb_machdep.c standard -mips/mips/in_cksum.c optional inet mips/mips/libkern_machdep.c standard mips/mips/locore.S standard no-obj mips/mips/machdep.c standard diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 347abee153d2..c8de9f5fa7a8 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -255,7 +255,6 @@ powerpc/powerpc/elf64_machdep.c optional powerpc64 | powerpc64le powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c standard powerpc/powerpc/gdb_machdep.c optional gdb -powerpc/powerpc/in_cksum.c optional inet | inet6 powerpc/powerpc/interrupt.c standard powerpc/powerpc/intr_machdep.c standard powerpc/powerpc/iommu_if.m standard diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv index 222a00956c17..1b03a8840109 100644 --- a/sys/conf/files.riscv +++ b/sys/conf/files.riscv @@ -48,7 +48,6 @@ riscv/riscv/elf_machdep.c standard riscv/riscv/exception.S standard riscv/riscv/exec_machdep.c standard riscv/riscv/intr_machdep.c standard -riscv/riscv/in_cksum.c optional inet | inet6 riscv/riscv/identcpu.c standard riscv/riscv/locore.S standard no-obj riscv/riscv/machdep.c standard diff --git a/sys/i386/i386/in_cksum.c b/sys/i386/i386/in_cksum_machdep.c similarity index 100% rename from sys/i386/i386/in_cksum.c rename to sys/i386/i386/in_cksum_machdep.c diff --git a/sys/i386/include/in_cksum.h b/sys/i386/include/in_cksum.h index a8214e97cd9a..6b9c62942561 100644 --- a/sys/i386/include/in_cksum.h +++ b/sys/i386/include/in_cksum.h @@ -118,6 +118,9 @@ in_pseudo(u_int sum, u_int b, u_int c) #endif #ifdef _KERNEL + +#define HAVE_MD_IN_CKSUM + #if !defined(__GNUCLIKE_ASM) #if defined(IPVERSION) && (IPVERSION == 4) u_int in_cksum_hdr(const struct ip *ip); diff --git a/sys/mips/mips/in_cksum.c b/sys/netinet/in_cksum.c similarity index 98% rename from sys/mips/mips/in_cksum.c rename to sys/netinet/in_cksum.c index 8f9a2d9de106..581950c8afa4 100644 --- a/sys/mips/mips/in_cksum.c +++ b/sys/netinet/in_cksum.c @@ -48,6 +48,11 @@ __FBSDID("$FreeBSD$"); #include #include +/* + * These implementations may be overridden on a per-platform basis. + */ +#ifndef HAVE_MD_IN_CKSUM + /* * Checksum routine for Internet Protocol family headers * (Portable Alpha version). @@ -248,3 +253,5 @@ u_int in_cksum_hdr(const struct ip *ip) REDUCE16; return (~sum & 0xffff); } + +#endif /* !HAVE_MD_IN_CKSUM */ diff --git a/sys/powerpc/powerpc/in_cksum.c b/sys/powerpc/powerpc/in_cksum.c deleted file mode 100644 index 906dc7e8d9a3..000000000000 --- a/sys/powerpc/powerpc/in_cksum.c +++ /dev/null @@ -1,253 +0,0 @@ -/* $FreeBSD$ */ -/* $NetBSD: in_cksum.c,v 1.7 1997/09/02 13:18:15 thorpej Exp $ */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 1988, 1992, 1993 - * The Regents of the University of California. All rights reserved. - * Copyright (c) 1996 - * Matt Thomas - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * @(#)in_cksum.c 8.1 (Berkeley) 6/10/93 - */ - -#include /* RCS ID & Copyright macro defns */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Checksum routine for Internet Protocol family headers - * (Portable Alpha version). - * - * This routine is very heavily used in the network - * code and should be modified for each CPU to be as fast as possible. - */ - -#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x) -#define REDUCE32 \ - { \ - q_util.q = sum; \ - sum = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - } -#define REDUCE16 \ - { \ - q_util.q = sum; \ - l_util.l = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \ - sum = l_util.s[0] + l_util.s[1]; \ - ADDCARRY(sum); \ - } - -static const u_int32_t in_masks[] = { -#if _BYTE_ORDER == _LITTLE_ENDIAN - /*0 bytes*/ /*1 byte*/ /*2 bytes*/ /*3 bytes*/ - 0x00000000, 0x000000FF, 0x0000FFFF, 0x00FFFFFF, /* offset 0 */ - 0x00000000, 0x0000FF00, 0x00FFFF00, 0xFFFFFF00, /* offset 1 */ - 0x00000000, 0x00FF0000, 0xFFFF0000, 0xFFFF0000, /* offset 2 */ - 0x00000000, 0xFF000000, 0xFF000000, 0xFF000000, /* offset 3 */ -#else - /*0 bytes*/ /*1 byte*/ /*2 bytes*/ /*3 bytes*/ - 0x00000000, 0xFF000000, 0xFFFF0000, 0xFFFFFF00, /* offset 0 */ - 0x00000000, 0x00FF0000, 0x00FFFF00, 0x00FFFFFF, /* offset 1 */ - 0x00000000, 0x0000FF00, 0x0000FFFF, 0x0000FFFF, /* offset 2 */ - 0x00000000, 0x000000FF, 0x000000FF, 0x000000FF, /* offset 3 */ -#endif -}; - -union l_util { - u_int16_t s[2]; - u_int32_t l; -}; -union q_util { - u_int16_t s[4]; - u_int32_t l[2]; - u_int64_t q; -}; - -static u_int64_t -in_cksumdata(const void *buf, int len) -{ - const u_int32_t *lw = (const u_int32_t *) buf; - u_int64_t sum = 0; - u_int64_t prefilled; - int offset; - union q_util q_util; - - if ((3 & (long) lw) == 0 && len == 20) { - sum = (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3] + lw[4]; - REDUCE32; - return sum; - } - - if ((offset = 3 & (long) lw) != 0) { - const u_int32_t *masks = in_masks + (offset << 2); - lw = (u_int32_t *) (((long) lw) - offset); - sum = *lw++ & masks[len >= 3 ? 3 : len]; - len -= 4 - offset; - if (len <= 0) { - REDUCE32; - return sum; - } - } -#if 0 - /* - * Force to cache line boundary. - */ - offset = 32 - (0x1f & (long) lw); - if (offset < 32 && len > offset) { - len -= offset; - if (4 & offset) { - sum += (u_int64_t) lw[0]; - lw += 1; - } - if (8 & offset) { - sum += (u_int64_t) lw[0] + lw[1]; - lw += 2; - } - if (16 & offset) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - } -#endif - /* - * access prefilling to start load of next cache line. - * then add current cache line - * save result of prefilling for loop iteration. - */ - prefilled = lw[0]; - while ((len -= 32) >= 4) { - u_int64_t prefilling = lw[8]; - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - prefilled = prefilling; - } - if (len >= 0) { - sum += prefilled + lw[1] + lw[2] + lw[3] - + lw[4] + lw[5] + lw[6] + lw[7]; - lw += 8; - } else { - len += 32; - } - while ((len -= 16) >= 0) { - sum += (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3]; - lw += 4; - } - len += 16; - while ((len -= 4) >= 0) { - sum += (u_int64_t) *lw++; - } - len += 4; - if (len > 0) - sum += (u_int64_t) (in_masks[len] & *lw); - REDUCE32; - return sum; -} - -u_short -in_addword(u_short a, u_short b) -{ - u_int64_t sum = a + b; - - ADDCARRY(sum); - return (sum); -} - -u_short -in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c) -{ - u_int64_t sum; - union q_util q_util; - union l_util l_util; - - sum = (u_int64_t) a + b + c; - REDUCE16; - return (sum); -} - -u_short -in_cksum_skip(struct mbuf *m, int len, int skip) -{ - u_int64_t sum = 0; - int mlen = 0; - int clen = 0; - caddr_t addr; - union q_util q_util; - union l_util l_util; - - len -= skip; - for (; skip && m; m = m->m_next) { - if (m->m_len > skip) { - mlen = m->m_len - skip; - addr = mtod(m, caddr_t) + skip; - goto skip_start; - } else { - skip -= m->m_len; - } - } - - for (; m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - mlen = m->m_len; - addr = mtod(m, caddr_t); -skip_start: - if (len < mlen) - mlen = len; - - if ((clen ^ (long) addr) & 1) - sum += in_cksumdata(addr, mlen) << 8; - else - sum += in_cksumdata(addr, mlen); - - clen += mlen; - len -= mlen; - } - REDUCE16; - return (~sum & 0xffff); -} - -u_int in_cksum_hdr(const struct ip *ip) -{ - u_int64_t sum = in_cksumdata(ip, sizeof(struct ip)); - union q_util q_util; - union l_util l_util; - REDUCE16; - return (~sum & 0xffff); -} diff --git a/sys/riscv/riscv/in_cksum.c b/sys/riscv/riscv/in_cksum.c deleted file mode 100644 index 30e90f043cc3..000000000000 --- a/sys/riscv/riscv/in_cksum.c +++ /dev/null @@ -1,243 +0,0 @@ -/* $NetBSD: in_cksum.c,v 1.7 1997/09/02 13:18:15 thorpej Exp $ */ - -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 1988, 1992, 1993 - * The Regents of the University of California. All rights reserved. - * Copyright (c) 1996 - * Matt Thomas - * - * 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. *** 225 LINES SKIPPED *** From nobody Wed Dec 1 12:48:37 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E55EA18BA2F3; Wed, 1 Dec 2021 12:48: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 4J3zRB0wrvz3jsv; Wed, 1 Dec 2021 12:48:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 295011CCB; Wed, 1 Dec 2021 12:48: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 1B1CmbIs065947; Wed, 1 Dec 2021 12:48:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1CmbWs065946; Wed, 1 Dec 2021 12:48:37 GMT (envelope-from git) Date: Wed, 1 Dec 2021 12:48:37 GMT Message-Id: <202112011248.1B1CmbWs065946@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: dfd5240189ca - stable/13 - netinet: Implement in_cksum_skip() using m_apply() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: dfd5240189ca024b268e53df2f0a3076df57b240 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638362919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mDJO7VAiijOT99SXK5CThttoeB0sjP2PM2WLwjAoZcs=; b=nE+XSH3YmEjiEetZhSD9rY2roTCqjXZctl0gFR+FI/dqP6DistYlFzPFnctkQLTS1bOQa8 cxhLL9wGYNKITStZwYp8d02yVE+D9buGPQN0l4AfTAYxLW9ZWSnVy0PAUWxK1QZTU0EGmx 2s9jw4//GOEXTwH8ubG68I35+3XPpBLNUf8s3IPf9RbOAluPJZCf8pnxTbROACvMxDeU5h 4917Z3nHRnXBk5isolOM53u0VQbTG/FVXrz4OH2iDiURM7AlRh2uoTXvrHAmQx5sA/l2xv kWIXGVtAU06PwfFmISKjVoye+1jqHIhYg2h4PDoz/U/MH7aYS7akyXQ5ieJOxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638362919; a=rsa-sha256; cv=none; b=sZhaTfC9QE+VH6CjaqWL/ObvTuOi+O4N/Yd/7B/+lnYH3jOTJCuwpKS+x4OcZRLk1BBqvo 7NpO17KDOkTWgILvkSl8R1+8j/4AIvldFS5UGwUY7FGhkkZKQpY8H+PNhFYLqzNJERPlgb 869MsKjEIWelk3kRg3tfBTwqQIYT6GsGMW3uIPUozVHDWBp+Z4JgXehijukxRD9CE4Dqb0 ZJV+b/ZIsguBeunfUOJZ6Blj6lU6cB0nVfSa0fl7/k94GG246wKTeFBgwZHQ502wjBP8sY q4XmTgWusn8JdlTIKm9d11N2IGT93UKSUuirCV6/xFA63zW9WYuUVMiQKHk5Eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dfd5240189ca024b268e53df2f0a3076df57b240 commit dfd5240189ca024b268e53df2f0a3076df57b240 Author: Mark Johnston AuthorDate: 2021-11-24 18:19:54 +0000 Commit: Mark Johnston CommitDate: 2021-12-01 12:43:03 +0000 netinet: Implement in_cksum_skip() using m_apply() This allows it to work with unmapped mbufs. In particular, in_cksum_skip() calls no longer need to be preceded by calls to mb_unmapped_to_ext() to avoid a page fault. PR: 259645 Reviewed by: gallatin, glebius, jhb Sponsored by: The FreeBSD Foundation (cherry picked from commit 0d9c3423f59bb305301f5a5bc7c8f5daf7b7aa52) --- sys/netinet/in_cksum.c | 63 +++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/sys/netinet/in_cksum.c b/sys/netinet/in_cksum.c index 581950c8afa4..98317d4dac4a 100644 --- a/sys/netinet/in_cksum.c +++ b/sys/netinet/in_cksum.c @@ -49,7 +49,9 @@ __FBSDID("$FreeBSD$"); #include /* - * These implementations may be overridden on a per-platform basis. + * These implementations may be overridden on a per-platform basis. On + * platforms with a direct map, the implementation of in_cksum() must handle + * unmapped mbufs. */ #ifndef HAVE_MD_IN_CKSUM @@ -203,44 +205,43 @@ in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c) return (sum); } +struct cksum_skip_partial_args { + uint64_t csum; + int clen; +}; + +static int +in_cksum_skip_partial(void *arg, void *data, u_int len) +{ + struct cksum_skip_partial_args *a; + + a = arg; + if (((uintptr_t)data ^ a->clen) & 1) + a->csum += in_cksumdata(data, len) << 8; + else + a->csum += in_cksumdata(data, len); + a->clen += len; + return (0); +} + u_short in_cksum_skip(struct mbuf *m, int len, int skip) { - u_int64_t sum = 0; - int mlen = 0; - int clen = 0; - caddr_t addr; + struct cksum_skip_partial_args a; union q_util q_util; union l_util l_util; + uint64_t sum; len -= skip; - for (; skip && m; m = m->m_next) { - if (m->m_len > skip) { - mlen = m->m_len - skip; - addr = mtod(m, caddr_t) + skip; - goto skip_start; - } else { - skip -= m->m_len; - } - } - - for (; m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - mlen = m->m_len; - addr = mtod(m, caddr_t); -skip_start: - if (len < mlen) - mlen = len; - - if ((clen ^ (uintptr_t) addr) & 1) - sum += in_cksumdata(addr, mlen) << 8; - else - sum += in_cksumdata(addr, mlen); - clen += mlen; - len -= mlen; - } + /* + * The use of m_apply() allows this routine to operate on unmapped + * mbufs. + */ + a.csum = 0; + a.clen = 0; + (void)m_apply(m, skip, len, in_cksum_skip_partial, &a); + sum = a.csum; REDUCE16; return (~sum & 0xffff); } From nobody Wed Dec 1 12:48:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DF4FE18BA2FE; Wed, 1 Dec 2021 12:48: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 4J3zRC2WyMz3jfK; Wed, 1 Dec 2021 12:48:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B82D18FF; Wed, 1 Dec 2021 12:48: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 1B1Cmccg065974; Wed, 1 Dec 2021 12:48:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Cmc7r065972; Wed, 1 Dec 2021 12:48:38 GMT (envelope-from git) Date: Wed, 1 Dec 2021 12:48:38 GMT Message-Id: <202112011248.1B1Cmc7r065972@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: f763c81c95bb - stable/13 - netinet: Remove unneeded mb_unmapped_to_ext() calls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f763c81c95bb5b68a11b12c9716ba2ee2b5d08fa Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638362919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3rLaBg1XzmtYsHOLaTcr2FJN5Oz3/de/p8QRBh28RDA=; b=p3W2Y3L4Y1XnkqudljdpobgCKlajGgO1FhkINVlWkrvWSS6xALGOZAnFaUCOBDdcLFFV5/ HfPSkiTYBUf27wjyNyJ8N211QPQjpgRtEZvSWUI1gjc8HHRmMuOpAuhF6JxV9pzrcWwrZ7 i+lMx9oGNnny/rGGFO33aqxS388YLhJIua6ZG9kA9hz/jqNa1+rntt9gZAVONIK0CsU2Wu quWPlu7Rj6OT551iBzjlnZW0BHjOwuCoMH70nHI6y0Ch6c4Dv+jdIFWk8ByBL+gK8kfKy8 OoK1izWXP2WS2J15Df5nKn8XJ+wba6glh/dBI8RGBVPEaozWUwjCyxK3smM3uQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638362919; a=rsa-sha256; cv=none; b=UeUordXsRXmQyZlpAaRFCcZvibWYVaIzzdG4qgfViHx8BbdU7xwyFNx7Hr/CkbRem8s+eZ x2MeS67chVRVYHzIz12+n74NF6pr8QVtbej8I8nN0aB+3fy/fFiWCMqpO5cH0GqMrlL0xy KaiJIfRkaTK285vWXD33oLhDGz2JyiGWm9E5Je5j1bxyYVktvScMRzxPyTIjoxBjyM10q7 Jo7lgd85DoNyA+/p1ybN2D6VFisDGSYHsbMQaJ5FDAi7/5qP6LF2odXbTa5pgSTMmi1mcV madIpnYlxpTgKxyyWggPo7Kqabj3vTF745gEDjYDfSLdtiMOymKj0i0f2IbDfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f763c81c95bb5b68a11b12c9716ba2ee2b5d08fa commit f763c81c95bb5b68a11b12c9716ba2ee2b5d08fa Author: Mark Johnston AuthorDate: 2021-11-24 18:20:09 +0000 Commit: Mark Johnston CommitDate: 2021-12-01 12:43:18 +0000 netinet: Remove unneeded mb_unmapped_to_ext() calls in_cksum_skip() now handles unmapped mbufs on platforms where they're permitted. Reviewed by: glebius, jhb Sponsored by: The FreeBSD Foundation (cherry picked from commit 44775b163bfa902ea96658343e852062e2e67a8e) --- sys/netinet/ip_divert.c | 6 ---- sys/netinet/ip_output.c | 21 ++++------- sys/netinet6/ip6_output.c | 62 ++++++++++++++------------------ sys/netipsec/ipsec_output.c | 12 ------- sys/netpfil/ipfw/nat64/nat64_translate.c | 10 ------ sys/netpfil/pf/pf.c | 6 ---- 6 files changed, 32 insertions(+), 85 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 936e216e0926..ab9f0c4febc6 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -212,9 +212,6 @@ divert_packet(struct mbuf *m, bool incoming) /* Delayed checksums are currently not compatible with divert. */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - m = mb_unmapped_to_ext(m); - if (m == NULL) - return; in_delayed_cksum(m); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } @@ -226,9 +223,6 @@ divert_packet(struct mbuf *m, bool incoming) #endif #ifdef INET6 if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) - return; in6_delayed_cksum(m, m->m_pkthdr.len - sizeof(struct ip6_hdr), sizeof(struct ip6_hdr)); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 4acec2bb877c..a011c28441bd 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -730,23 +730,20 @@ sendit: } } - m->m_pkthdr.csum_flags |= CSUM_IP; - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { + /* Ensure the packet data is mapped if the interface requires it. */ + if ((ifp->if_capenable & IFCAP_MEXTPG) == 0) { m = mb_unmapped_to_ext(m); if (m == NULL) { IPSTAT_INC(ips_odropped); error = ENOBUFS; goto bad; } + } + + m->m_pkthdr.csum_flags |= CSUM_IP; + if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { in_delayed_cksum(m); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; - } else if ((ifp->if_capenable & IFCAP_MEXTPG) == 0) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSTAT_INC(ips_odropped); - error = ENOBUFS; - goto bad; - } } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { @@ -891,12 +888,6 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, * fragmented packets, then do it here. */ if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) { - error = ENOBUFS; - IPSTAT_INC(ips_odropped); - goto done; - } in_delayed_cksum(m0); m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 2b49a9f7c351..209169dbdabd 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -212,42 +212,26 @@ in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset) *(u_short *)mtodo(m, offset) = csum; } -static int +static void ip6_output_delayed_csum(struct mbuf *m, struct ifnet *ifp, int csum_flags, - int plen, int optlen, bool frag) + int plen, int optlen) { KASSERT((plen >= optlen), ("%s:%d: plen %d < optlen %d, m %p, ifp %p " - "csum_flags %#x frag %d\n", - __func__, __LINE__, plen, optlen, m, ifp, csum_flags, frag)); + "csum_flags %#x", + __func__, __LINE__, plen, optlen, m, ifp, csum_flags)); - if ((csum_flags & CSUM_DELAY_DATA_IPV6) || -#if defined(SCTP) || defined(SCTP_SUPPORT) - (csum_flags & CSUM_SCTP_IPV6) || -#endif - (!frag && (ifp->if_capenable & IFCAP_MEXTPG) == 0)) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - if (frag) - in6_ifstat_inc(ifp, ifs6_out_fragfail); - else - IP6STAT_INC(ip6s_odropped); - return (ENOBUFS); - } - if (csum_flags & CSUM_DELAY_DATA_IPV6) { - in6_delayed_cksum(m, plen - optlen, - sizeof(struct ip6_hdr) + optlen); - m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; - } + if (csum_flags & CSUM_DELAY_DATA_IPV6) { + in6_delayed_cksum(m, plen - optlen, + sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; + } #if defined(SCTP) || defined(SCTP_SUPPORT) - if (csum_flags & CSUM_SCTP_IPV6) { - sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); - m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; - } -#endif + if (csum_flags & CSUM_SCTP_IPV6) { + sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; } - - return (0); +#endif } int @@ -1104,6 +1088,16 @@ nonh6lookup: passout: if (vlan_pcp > -1) EVL_APPLY_PRI(m, vlan_pcp); + + /* Ensure the packet data is mapped if the interface requires it. */ + if ((ifp->if_capenable & IFCAP_MEXTPG) == 0) { + m = mb_unmapped_to_ext(m); + if (m == NULL) { + IP6STAT_INC(ip6s_odropped); + return (ENOBUFS); + } + } + /* * Send the packet to the outgoing interface. * If necessary, do IPv6 fragmentation before sending. @@ -1136,9 +1130,7 @@ passout: * XXX-BZ Need a framework to know when the NIC can handle it, even * with ext. hdrs. */ - error = ip6_output_delayed_csum(m, ifp, sw_csum, plen, optlen, false); - if (error != 0) - goto bad; + ip6_output_delayed_csum(m, ifp, sw_csum, plen, optlen); /* XXX-BZ m->m_pkthdr.csum_flags &= ~ifp->if_hwassist; */ tlen = m->m_pkthdr.len; @@ -1217,10 +1209,8 @@ passout: * fragmented packets, then do it here. * XXX-BZ handle the hw offloading case. Need flags. */ - error = ip6_output_delayed_csum(m, ifp, m->m_pkthdr.csum_flags, - plen, optlen, true); - if (error != 0) - goto bad; + ip6_output_delayed_csum(m, ifp, m->m_pkthdr.csum_flags, plen, + optlen); /* * Change the next header field of the last header in the diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index a2deef95cdb5..99855e7209de 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -323,12 +323,6 @@ ipsec4_common_output(struct mbuf *m, struct inpcb *inp, int forwarding) * this is done in the normal processing path. */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSECSTAT_INC(ips_out_nomem); - key_freesp(&sp); - return (ENOBUFS); - } in_delayed_cksum(m); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } @@ -624,12 +618,6 @@ ipsec6_common_output(struct mbuf *m, struct inpcb *inp, int forwarding) * this is done in the normal processing path. */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSEC6STAT_INC(ips_out_nomem); - key_freesp(&sp); - return (ENOBUFS); - } in6_delayed_cksum(m, m->m_pkthdr.len - sizeof(struct ip6_hdr), sizeof(struct ip6_hdr)); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; diff --git a/sys/netpfil/ipfw/nat64/nat64_translate.c b/sys/netpfil/ipfw/nat64/nat64_translate.c index aa6f47656d9d..fecc8ff334d2 100644 --- a/sys/netpfil/ipfw/nat64/nat64_translate.c +++ b/sys/netpfil/ipfw/nat64/nat64_translate.c @@ -1292,11 +1292,6 @@ nat64_do_handle_ip4(struct mbuf *m, struct in6_addr *saddr, /* Handle delayed checksums if needed. */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - NAT64STAT_INC(&cfg->stats, nomem); - return (NAT64RETURN); - } in_delayed_cksum(m); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } @@ -1674,11 +1669,6 @@ nat64_do_handle_ip6(struct mbuf *m, uint32_t aaddr, uint16_t aport, /* Handle delayed checksums if needed. */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - NAT64STAT_INC(&cfg->stats, nomem); - return (NAT64RETURN); - } in6_delayed_cksum(m, plen, hlen); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; } diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 84db11d2f0ef..1e6911c16f73 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5968,9 +5968,6 @@ pf_route(struct mbuf **m, struct pf_krule *r, int dir, struct ifnet *oifp, /* Copied from FreeBSD 10.0-CURRENT ip_output. */ m0->m_pkthdr.csum_flags |= CSUM_IP; if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) - goto done; in_delayed_cksum(m0); m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } @@ -6157,9 +6154,6 @@ pf_route6(struct mbuf **m, struct pf_krule *r, int dir, struct ifnet *oifp, if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6 & ~ifp->if_hwassist) { uint32_t plen = m0->m_pkthdr.len - sizeof(*ip6); - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) - goto done; in6_delayed_cksum(m0, plen, sizeof(struct ip6_hdr)); m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; } From nobody Wed Dec 1 14:05:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2253C18BEE88; Wed, 1 Dec 2021 14:05: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 4J417K5xcvz4dtL; Wed, 1 Dec 2021 14:05:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC2E327F8; Wed, 1 Dec 2021 14:05: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 1B1E51Sb072861; Wed, 1 Dec 2021 14:05:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1E51ck072860; Wed, 1 Dec 2021 14:05:01 GMT (envelope-from git) Date: Wed, 1 Dec 2021 14:05:01 GMT Message-Id: <202112011405.1B1E51ck072860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 13c196a41e26 - main - sctp: improve handling of assoc ids in socket options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13c196a41e2604e6f9a4484b997279b82173dc40 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638367501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7dtGewV2jGVh7Amw8PVXAwuC6j/fVQL7dzJcLD2Ung=; b=gKvolpYxOx8sqPRR+FWxuiykhziTpUtunoO73FBLHtMUj35KCYvMVAMmFLcNPnmvcjXSVM 6MeuXw4lIY7T7HeJGF/EubY4HsGRgeE1/B3wJSlwsFCs0c3XEn2HfMJqnGo3x9PntSAVHu WknmAOqdGrg1EtOWoZqTsXFrmW72Vo7m877p516Ke+Y0blVycUaMzTksoVql8WC333N/u6 FVfqVgwGU0hr8JYDyws90PN4v8cEuuHxz0J4+YQe2zxkTvPaRk8GWrAkRpdfl3XmGrhXGT 24nVFcgf5CJCbDGhDyKC7enhJbMv0EMkRvqDiipFLe+bzkacRX7yf7BADGTMMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638367501; a=rsa-sha256; cv=none; b=HiQGfD3UgYEo2JD6hENQRiCJ9ArUJH8kWwfwv595x/B44HU1iWW6XOuk8DL7NK+Uq8HSpI yHOuAmmaxXQxdv0PZdkI0aE6hc5Ym5JkkvT1t4bdfZK92hjhNFfoPo7X2+F7hKFAlp7WDc znbhqgabtdhqnoeAHph3xCcmeVwN8b2DUNwS6ORKPo8NYCxNzVU+LPG4wKTPMX/BFNgkXd hDUh//9eG9QXZdfEAT9v96zf3GZufqfLDtDI3DUYdmpTgr/abenaq8VQWzUFhj62REM16v D+OeHcShVvAdn+qcAJRpM4ooUj0TuABO7hBsk/KL0C54y7w4dBn9a/ge+tnb/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=13c196a41e2604e6f9a4484b997279b82173dc40 commit 13c196a41e2604e6f9a4484b997279b82173dc40 Author: Michael Tuexen AuthorDate: 2021-12-01 13:54:55 +0000 Commit: Michael Tuexen CommitDate: 2021-12-01 13:54:55 +0000 sctp: improve handling of assoc ids in socket options For socket options related to local and remote addresses providing generic association ids does not make sense. Report EINVAL in this case. MFC after: 1 week --- sys/netinet/sctp_usrreq.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index dae35c566d4e..c5c45a2f2072 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -2187,8 +2187,13 @@ flags_out: *value = (uint32_t)size; *optsize = sizeof(uint32_t); } else { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOTCONN); - error = ENOTCONN; + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((sctp_assoc_t)*value <= SCTP_ALL_ASSOC)) { + error = EINVAL; + } else { + error = ENOENT; + } + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, error); } break; } @@ -2262,8 +2267,13 @@ flags_out: } SCTP_TCB_UNLOCK(stcb); } else { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOENT); - error = ENOENT; + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (saddr->sget_assoc_id <= SCTP_ALL_ASSOC)) { + error = EINVAL; + } else { + error = ENOENT; + } + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, error); } break; } @@ -2275,12 +2285,18 @@ flags_out: SCTP_CHECK_AND_CAST(saddr, optval, struct sctp_getaddresses, *optsize); SCTP_FIND_STCB(inp, stcb, saddr->sget_assoc_id); - limit = *optsize - offsetof(struct sctp_getaddresses, addr); - actual = sctp_fill_up_addresses(inp, stcb, limit, &saddr->addr[0].sa); + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((saddr->sget_assoc_id == SCTP_CURRENT_ASSOC) || + (saddr->sget_assoc_id == SCTP_ALL_ASSOC))) { + error = EINVAL; + } else { + limit = *optsize - offsetof(struct sctp_getaddresses, addr); + actual = sctp_fill_up_addresses(inp, stcb, limit, &saddr->addr[0].sa); + *optsize = offsetof(struct sctp_getaddresses, addr) + actual; + } if (stcb != NULL) { SCTP_TCB_UNLOCK(stcb); } - *optsize = offsetof(struct sctp_getaddresses, addr) + actual; break; } case SCTP_PEER_ADDR_PARAMS: From nobody Wed Dec 1 14:23:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7FCB518C7D3F; Wed, 1 Dec 2021 14:23:37 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (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 4J41Xn2fQQz4lZ9; Wed, 1 Dec 2021 14:23:37 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-qk1-x736.google.com with SMTP id i9so31081662qki.3; Wed, 01 Dec 2021 06:23:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hWbq/IDEOLeNA+9wFv8ZygnV8U/vaADXvFAMKygzlGE=; b=RtSO9DIJdBthCkFqCA6FsJqciPGsa3OJnngfYR4ruGfUcjrtW/36PnVpOPLgeIZa7A VVuheGEsH5W9yWdqmgmewOhw0BW3tD3pWvdI0hgnnxSjEoS2Qr0zHTQ+Azfp4iUfYjNH pRNhW9rQEZaKr9/79sSmDSRpVfTqfjsaHPuBxJm34gXmPmKT3IQmU8fS1Q4y5+lIejpd ISJZEZAJG8ZG6QE6c0aV2d6n2W5neITtJIdy1vO1ZmoI4Xzg7zNWYGhHf66Jf3Ttgzo+ HC06MgYRQt56b+BwvTCUycGOHzj7Orpo5O0+OFoTEpNGuk5ieDaCSuFpp4KDQybKvg9i yLHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hWbq/IDEOLeNA+9wFv8ZygnV8U/vaADXvFAMKygzlGE=; b=SjD+tJTa9Cmhuzn253LiQYg/thdLljhN34yqy9Q2tiXOrrwb/ac9E6eHksHAwZOOQd 982hjxYKxonkT9bqtO0UtSF9nZnfwe4WJrB6vloNOp6S394jRKIDsCA8OGbVKH+CVMKI jioRz3/ieEHhEKcP2I3bMQxGMd43/vlDN4Et5shWF/rlfCAv7wlZWmAmJUMfycsdgAKq 4FFuEmgvIJCUlfQcvwFS3rpGMz8XgXvUSRm7rbOeSLU19a+py6lOYyciWOc8jFmhnhET oHGb6oOyPXTubJF0FvMOdIZkuVGD9V7vqRZGUVvURLAaF1LQLbshSyyvpzms9xXoaPwD 3r2Q== X-Gm-Message-State: AOAM533DzgRI1akaBRFll9kwXemoauZyu5urMUdsKkglqYjYCcNfpwQ5 VyZPNEEnQsMDS/Kh3DOCnA2sQho7h4k= X-Google-Smtp-Source: ABdhPJzLRaN4F00YyrSAH2mfjrQxa5oFGYCu66ln35TzgGEncO8aBb42E/7nBraq5ccJA9X5OFR9JA== X-Received: by 2002:a05:620a:1423:: with SMTP id k3mr6542172qkj.248.1638368610826; Wed, 01 Dec 2021 06:23:30 -0800 (PST) Received: from mavoffice.ixsystems.com ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id o20sm12709658qkp.114.2021.12.01.06.23.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Dec 2021 06:23:30 -0800 (PST) Sender: Alexander Motin Subject: Re: git: d3a8f98acbf5 - main - Make CPU children explicitly share parent unit numbers. To: Andriy Gapon , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202109250332.18P3W9UM008783@gitrepo.freebsd.org> <3c211281-ce4a-3d99-ab45-4d8a6fbdbe55@FreeBSD.org> From: Alexander Motin Message-ID: Date: Wed, 1 Dec 2021 09:23:29 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.13.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 In-Reply-To: <3c211281-ce4a-3d99-ab45-4d8a6fbdbe55@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4J41Xn2fQQz4lZ9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi Andriy, On 01.12.2021 01:39, Andriy Gapon wrote: > On 25/09/2021 06:32, Alexander Motin wrote: >> The branch main has been updated by mav: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=d3a8f98acbf51e728411f10c5f179a30b9ca683c >> >> >> commit d3a8f98acbf51e728411f10c5f179a30b9ca683c >> Author:     Alexander Motin >> AuthorDate: 2021-09-25 03:25:46 +0000 >> Commit:     Alexander Motin >> CommitDate: 2021-09-25 03:31:51 +0000 >> >>      Make CPU children explicitly share parent unit numbers. >>           Before this device unit number match was coincidental and >> broke if I >>      disabled some CPU device(s).  Aside of cosmetics, for some drivers >>      (may be considered broken) it caused talking to wrong CPUs. >> --- >>   sys/dev/acpica/acpi_perf.c       | 3 ++- >>   sys/dev/acpica/acpi_throttle.c   | 3 ++- >>   sys/dev/amdtemp/amdtemp.c        | 3 ++- > > It seems that the amdtemp part of this change broke creation of > dev.cpu.0.temperature sysctl node on my (old hardware) system. > > I have 4 cores and amdtemp attaches under hostb4: >     cpu0 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P001 >       acpi_perf0 >       acpi_throttle0 >       hwpstate0 >       cpufreq0 >     cpu1 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P002 >       acpi_perf1 >       hwpstate1 >     cpu2 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P003 >       acpi_perf2 >       hwpstate2 >     cpu3 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P004 >       acpi_perf3 >       hwpstate3 > ... >     pcib0 pnpinfo _HID=PNP0A03 _UID=0 _CID=none at handle=\_SB_.PCI0 >       pci0 > ... >         hostb4 pnpinfo vendor=0x1022 device=0x1203 subvendor=0x0000 > subdevice=0x0000 class=0x060000 at slot=24 function=3 dbsf=pci0:0:24:3 >           amdtemp4 > > > As you can see amdtemp attaches in a different sub-tree from cpus and > its parent's unit number does not have any relation to any processor. It seems you are right about the parent. But I see that the driver does care about its unit number when adding sysctls to CPUs. I am not sure that default sequential numbering is working by more than coincidence. -- Alexander Motin From nobody Wed Dec 1 14:28:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1033218C9158; Wed, 1 Dec 2021 14:28:39 +0000 (UTC) (envelope-from avg@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 4J41fZ5SYVz4mbs; Wed, 1 Dec 2021 14:28:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 05E6821FA0; Wed, 1 Dec 2021 14:28:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: <56188d19-f5da-9590-5d96-d47ad1abf6eb@FreeBSD.org> Date: Wed, 1 Dec 2021 16:28:34 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.3.0 From: Andriy Gapon Subject: Re: git: d3a8f98acbf5 - main - Make CPU children explicitly share parent unit numbers. Content-Language: en-US To: Alexander Motin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202109250332.18P3W9UM008783@gitrepo.freebsd.org> <3c211281-ce4a-3d99-ab45-4d8a6fbdbe55@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638368918; h=from:from:reply-to:subject: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=pZ1BwgTWDK1LgMl4lEf937dUCFXHBfYIxLch9Xy/EHk=; b=G/Sb3EEHbSGoYSOzlEMt+2A8av6JFDLHUTqDKhpBk8Ncha/8fm/3AhNHtXYr6TQL8aR0Fb IzihkWTzwHRqZYutrdPxD2eLphNJKW+tePpBDV1M+3TD8bVioJgJUGrakq8bBP3U+HzLrL Z2wGEI4VcRqqBeMd3C54SMgNsipRw2iLAbNjm5b13q2W1rWgb/X3gNRqJi+TCJlbORn2N4 owouDWeWuAPReQlWjmIh8MMnoyfkxmfGQwRqxTnwDrFFNPDc8TUBq1L2Tyv39NI4zLTXva Bl5ScVMY0SEMUOuQ9U1A/yWXW+WitO1lK4chWm95xGtnlt0m2lfjji9xzbhq1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638368918; a=rsa-sha256; cv=none; b=ypj3wlaNn6PAAwwtRmPOCHs0h3MpNFV8UO9mZkWA9o+dIjL2QauF/dwUrlD6HvVkZjJmmK DCn1faxDWSVtdPlvCSXwTlJWYe/Oz5yl+ZLPDfmJ7lKwLDnPogpVpDKT6R2sV2CsmOd/xD 91pt1Xecgg2tycXrx7m+r0IuGGNglHRHUMCCV4+DBXe0v1KLIchYzHMkjRuv1LC13VQc/p QzHY+gtJyQlxLzcZa7/Q1iJq2rSm81FKkmXF7lMe8Tz32YYS2nXxbr1vQgiXIUhFkw1X8v fk87knu4LF/xZ9O4q614k85OYVAQJNbaFBjZgYcFz4eKHIEPlrBEyN+LJBysiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 01/12/2021 16:23, Alexander Motin wrote: > Hi Andriy, > > On 01.12.2021 01:39, Andriy Gapon wrote: >> On 25/09/2021 06:32, Alexander Motin wrote: >>> The branch main has been updated by mav: >>> >>> URL: >>> https://cgit.FreeBSD.org/src/commit/?id=d3a8f98acbf51e728411f10c5f179a30b9ca683c >>> >>> >>> commit d3a8f98acbf51e728411f10c5f179a30b9ca683c >>> Author:     Alexander Motin >>> AuthorDate: 2021-09-25 03:25:46 +0000 >>> Commit:     Alexander Motin >>> CommitDate: 2021-09-25 03:31:51 +0000 >>> >>>      Make CPU children explicitly share parent unit numbers. >>>           Before this device unit number match was coincidental and >>> broke if I >>>      disabled some CPU device(s).  Aside of cosmetics, for some drivers >>>      (may be considered broken) it caused talking to wrong CPUs. >>> --- >>>   sys/dev/acpica/acpi_perf.c       | 3 ++- >>>   sys/dev/acpica/acpi_throttle.c   | 3 ++- >>>   sys/dev/amdtemp/amdtemp.c        | 3 ++- >> >> It seems that the amdtemp part of this change broke creation of >> dev.cpu.0.temperature sysctl node on my (old hardware) system. >> >> I have 4 cores and amdtemp attaches under hostb4: >>     cpu0 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P001 >>       acpi_perf0 >>       acpi_throttle0 >>       hwpstate0 >>       cpufreq0 >>     cpu1 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P002 >>       acpi_perf1 >>       hwpstate1 >>     cpu2 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P003 >>       acpi_perf2 >>       hwpstate2 >>     cpu3 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P004 >>       acpi_perf3 >>       hwpstate3 >> ... >>     pcib0 pnpinfo _HID=PNP0A03 _UID=0 _CID=none at handle=\_SB_.PCI0 >>       pci0 >> ... >>         hostb4 pnpinfo vendor=0x1022 device=0x1203 subvendor=0x0000 >> subdevice=0x0000 class=0x060000 at slot=24 function=3 dbsf=pci0:0:24:3 >>           amdtemp4 >> >> >> As you can see amdtemp attaches in a different sub-tree from cpus and >> its parent's unit number does not have any relation to any processor. > > It seems you are right about the parent. But I see that the driver does > care about its unit number when adding sysctls to CPUs. I am not sure > that default sequential numbering is working by more than coincidence. Well, on this kind of (consumer) hardware there is only one instance of amdtemp and it used to have a unit number of zero. And there's always CPU #0. So, it was a perfect match, even if by accident. I am not sure how that worked on multi-socket systems with hardware from that generation (AMD family 10h). -- Andriy Gapon From nobody Wed Dec 1 14:58:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2C0C518A6496; Wed, 1 Dec 2021 14:59: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 4J42Kb5xkPz4vWd; Wed, 1 Dec 2021 14:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC7313AE2; Wed, 1 Dec 2021 14:58: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 1B1EwxeN039073; Wed, 1 Dec 2021 14:58:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1EwxAH039072; Wed, 1 Dec 2021 14:58:59 GMT (envelope-from git) Date: Wed, 1 Dec 2021 14:58:59 GMT Message-Id: <202112011458.1B1EwxAH039072@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: 73d41cc73085 - main - if_epair: Also mark the flag of pair b with IFF_KNOWSEPOCH List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 73d41cc730858aa1fe273c36f3653afd16791091 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638370739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pjoZRtJNwMjiAZxVz0jGtuBMETaVb/BW6iqhFLSCT1E=; b=fOT2hWq8rPioRcFVlLzKx9Z3QMU2hBF2o0EDuZovxvZnHlzvlToLmjZPzxtRcCQY8SZuFn Db5tDYDB05nGIV0b4MYkHE7KNXCqq3Cvyqlh8pUz3hgeATzCN4UBP0XPfJrPr8kLfQBGcp d+9H57ehfqP1Sv02XaoQDNwuIAHXVI1urZXuWMY0sYURmwE1gDMslwYh+kBsPMaEygv53Q r/RchuY71GJJkMd0pSHMdihxlFeiEB7yuQ57fLdqfZ35llxQrZingkd3eYyKi82fSutRLF XxJLBs+zaxoplxSJYrU3IddTQIo2pjfzK2oSf1u/vFj6vE8JffZbH+CMLHH9Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638370739; a=rsa-sha256; cv=none; b=mS3BhxXNBRNhY23K0ciHb4rsDGjKtmxxBwgfpQkrqtq1k6snyoxQkZ7pK2A+jz++L7w4mF sRzwRXlDPiPS5oJ78FqZ6VFa9OHIsdMFMLMry2J9Kk895ojXbDsvU/DHz1UDZrmVqwXj68 nFDuqSu57kxScOAYAMmh67ByW8KJQLT2IDTkmKwDYze+S5BCqR2N1vanX4C5d4sSm+Y3St UuN6SJuhptZfI8HQgcbghJgkZecPOGBQW1Ai24TS7yP0RpczvZdnQA4CKV70ZUXB+bfS6b sre1Y2e5gq0EX0neJ9a9LmjiMZvIRmMFcSyH+4PkhXJmpVLoLksZlVeG42UIgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=73d41cc730858aa1fe273c36f3653afd16791091 commit 73d41cc730858aa1fe273c36f3653afd16791091 Author: Zhenlei Huang AuthorDate: 2021-12-01 14:54:23 +0000 Commit: Kristof Provost CommitDate: 2021-12-01 14:54:23 +0000 if_epair: Also mark the flag of pair b with IFF_KNOWSEPOCH Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33210 --- sys/net/if_epair.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 699d74ee4fb4..ff20107307ff 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -629,6 +629,7 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) ifp->if_dname = epairname; ifp->if_dunit = unit; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_flags |= IFF_KNOWSEPOCH; ifp->if_capabilities = IFCAP_VLAN_MTU; ifp->if_capenable = IFCAP_VLAN_MTU; ifp->if_start = epair_start; From nobody Wed Dec 1 15:15:14 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2EA7818AF34E; Wed, 1 Dec 2021 15:15: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 4J42hL1wxSz3H38; Wed, 1 Dec 2021 15:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B6834187; Wed, 1 Dec 2021 15:15: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 1B1FFEJ6066161; Wed, 1 Dec 2021 15:15:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1FFEZU066160; Wed, 1 Dec 2021 15:15:14 GMT (envelope-from git) Date: Wed, 1 Dec 2021 15:15:14 GMT Message-Id: <202112011515.1B1FFEZU066160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 629b5e87ed82 - main - Add an arm64 sha512 feature 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 629b5e87ed82aa428be1abbe51b80fa338fa839a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638371714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7WrEfWdzrpbubZCNDxlIkuBZbNso4UFPhkrCvC3Qc0=; b=Cdzf9J7kOKqy6QHIgZPooVA882tKdNoukxxJiWivWhypPHPpqZTWcKZNyx8XABU1Oc78du lQ9zxauwSaig6FJE+1H/qtTprT9R6YA7BIZOKMwo9ac7Q4/hGh/0+Kk/E8AZjnfg1GJ2Wr Q26cDOi+8h8oCU91HZoYtURt0KLpk+Fo5qPjkV/NS+kRi8DnVy0lpNepRi+WHVOeD3DmZb W9BELD7PURrfsL4EFh1FXjveDwzURooQjMUVasDjcCNWZW++qpDttVWstQfmRQtTlManKH qILKEYpuPGLe711foiJUeNxPb0H6PLwsOrVOlcvd0jqohZhd0xLzCYYqKaQU7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638371714; a=rsa-sha256; cv=none; b=LlnKY/Ay4X0qI7KCEufCnjr6WFA8YWKnfXyAbmcYwlIrWjJNf8tiES4IjRSUbPODw9zRqm 8SN6uB74u7pIldIsG3eJxYHFKPNKYngA/11SXJiIL8dt5BdNR7EbpCn2Zxt4jzEwQexo0s qd6oXktoDFECTuIFEWLbDpsbuQx4NHf7ES2CrZzu5fMPauq+PpHeHueqn96v1kc5BEEsJw n9tSnIRIRZlhtuavPG+gS2kElCm7RFf5OLA6yFKScQ/ds/HwRwUzc/bYmtXRd3J0C0CD1p /EgE4nPFpMEjlv65kDOw7Tl4iiKzbuNp1vG/LXPIjIzhHw6906Rv7q5CYcI6mQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=629b5e87ed82aa428be1abbe51b80fa338fa839a commit 629b5e87ed82aa428be1abbe51b80fa338fa839a Author: Andrew Turner AuthorDate: 2021-11-29 17:21:31 +0000 Commit: Andrew Turner CommitDate: 2021-12-01 15:14:57 +0000 Add an arm64 sha512 feature check This is only available in recent toolchains. Check for it so we can use it in libmd. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33166 --- share/mk/bsd.compiler.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index c58eb114f4b8..4a1472c6bfab 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -25,6 +25,7 @@ # - retpoline: supports the retpoline speculative execution vulnerability # mitigation. # - init-all: supports stack variable initialization. +# - aarch64-sha512: supports the AArch64 sha512 intrinsic functions. # # When bootstrapping on macOS, 'apple-clang' will be set in COMPILER_FEATURES # to differentiate Apple's version of Clang. Apple Clang uses a different @@ -255,6 +256,13 @@ ${X_}COMPILER_FEATURES+= compressed-debug ${X_}COMPILER_FEATURES+= fileprefixmap .endif +.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 130000) || \ + (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 90000) +# AArch64 sha512 intrinsics are supported (and have been tested) in +# clang 13 and gcc 9. +${X_}COMPILER_FEATURES+= aarch64-sha512 +.endif + .else # Use CC's values X_COMPILER_TYPE= ${COMPILER_TYPE} From nobody Wed Dec 1 15:25:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 22B1418B2E50; Wed, 1 Dec 2021 15:25: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 4J42vl62Trz3KCk; Wed, 1 Dec 2021 15:25:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEF6044C1; Wed, 1 Dec 2021 15:25: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 1B1FP75J079386; Wed, 1 Dec 2021 15:25:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1FP7R2079385; Wed, 1 Dec 2021 15:25:07 GMT (envelope-from git) Date: Wed, 1 Dec 2021 15:25:07 GMT Message-Id: <202112011525.1B1FP7R2079385@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 071966e874ed - main - libc sctp: fix sctp_getladdrs() when reporting no addresses List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 071966e874ed472bdac031b7e89d08bacf8bbbc4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638372307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=quUJ9v2kjsEa3OeQIjbkY+1Aqedfa5+22zmpbS9hY0Q=; b=IwDLrLulrfpgbx6vq6S1u+sA/y8spw/yES3yb5y/5jG034pWiY7j6PYCtVz9QuMClqLnbM QyCJj53BapzecTZjOj1gNdoBe69NHEcePf64IYdNPf6FD0Xjrj8GC1DeTDaLdXxTlpXNgz 8G57z8vuVukvkmVGe/7ObPEaOjC7YlmZmhvJ1CWiNW+juHjGqhCeWH13+mxkcy2ljC8dki 1tj++hsBv633vC/oglRTW+8vnEDuMSXukNjFvK/TjZht0NDQBG3FMe+gM0/Pa7Z9G4UoZm FKII99cZtMFho9jGj/Mgt1flv0PxncZrvjUY4ZqhcMeOrsxfrOqEA59TN++szg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638372307; a=rsa-sha256; cv=none; b=BZ0WHkZdz3US5YXOzq5MdMgb5yeapA0xbR20ay3iWTvN4HCmDLYHLKB6DXbt4DemCvzpWO SKt722DKUhPyrxLaXcOR02hkB4gk0rOQuN+iTHrJNciHBvmUVNh0EUmCveGq4Vh4fZHE3c FJ3r0biRcWWnIimoye7/K3nLrqHcomZGGYsVTfYjPvVBgNxjhWtYgSPba/7oIvqcLHAhXV yvgXRF4RgnJ3GqJJ7cPkYaA7r0/GOWSMb/bfSkOhX8J5HUAkU4+ehDta36HALttYwIIIMK ZBOK63obfw6lT1yEk3AXoVOwPdVtmV5rvS93iaozOp+F6CAT9Pq/sgs+p3k8bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=071966e874ed472bdac031b7e89d08bacf8bbbc4 commit 071966e874ed472bdac031b7e89d08bacf8bbbc4 Author: Michael Tuexen AuthorDate: 2021-12-01 15:20:17 +0000 Commit: Michael Tuexen CommitDate: 2021-12-01 15:25:01 +0000 libc sctp: fix sctp_getladdrs() when reporting no addresses Section 9.5 of RFC 6458 (SCTP Socket API) requires that sctp_getladdrs() returns 0 in case the socket is unbound. This is the cause of reporting 0 addresses. So don't indicate an error, just report this case as required. PR: 260117 MFC after: 1 week --- lib/libc/net/sctp_sys_calls.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c index 3249eeaa4c4e..615b14ede5aa 100644 --- a/lib/libc/net/sctp_sys_calls.c +++ b/lib/libc/net/sctp_sys_calls.c @@ -462,10 +462,6 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) &size_of_addresses, &opt_len) != 0) { return (-1); } - if (size_of_addresses == 0) { - errno = ENOTCONN; - return (-1); - } opt_len = (socklen_t)((size_t)size_of_addresses + sizeof(struct sctp_getaddresses)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { @@ -479,6 +475,10 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) free(addrs); return (-1); } + if (size_of_addresses == 0) { + free(addrs); + return (0); + } *raddrs = &addrs->addr[0].sa; cnt = 0; sa = &addrs->addr[0].sa; From nobody Wed Dec 1 16:09:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5118218AF4DA for ; Wed, 1 Dec 2021 16: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 4J43vJ0KS9z3mfX; Wed, 1 Dec 2021 16:09:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB4784C4C; Wed, 1 Dec 2021 16: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 1B1G9lqt033305; Wed, 1 Dec 2021 16: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 1B1G9l56033304; Wed, 1 Dec 2021 16:09:47 GMT (envelope-from git) Date: Wed, 1 Dec 2021 16:09:47 GMT Message-Id: <202112011609.1B1G9l56033304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: 246ce92092fc - Create tag vendor/wpa/g14ab4a816 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/tags/vendor/wpa/g14ab4a816 X-Git-Reftype: annotated tag X-Git-Commit: 246ce92092fc2b0cc6e850f04065d149024901fa Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638374988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p8O8wPXWb0DU/FNbprEMdtZu6GR6CFbQmDIxJTDRwcE=; b=jDnWcNnIGo/i+hoSZYCfbs8l+H2KO6OJWjwRLN6NpEKwlwZ/xJx05rwl3adh6EztZjqt/w X5rFBmjZAu0AHGzXslKSh8quZkBafZCYkkcUcS/YYbmJle5g9NHkxyB5xucSHAk+o4MaVQ XASCVDkMddL7zjDA4wuL8miikjaJTxtmSVXZxve8TvhMzohSKLubpo4D/2oum2KgxQYui2 JvNGm36GJNfqBFo+6+W5lGDggYSaFlsqwFYx0+7ncpN+5Kc7sN8C1ZdGiXSo2DckTzIGvJ UrqpOGyB15sWs8H/UKnxArhOepF6GB1KHK5nt6AR4muxFw1Xw50omEUbm4rEGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638374988; a=rsa-sha256; cv=none; b=vkudEnbLuX7QHpDTCoaZnGQgdkA0OIc+ng0FxJr+4gHb32unGPSGwBNdd2DWh2JC9qlLLO HHtiSyf9VPydHq4oBuXcspRBkPO4KVNwmsw37NcyMxvO5jLvFMRxleO0Rh+y6+gyeoJ9gp KYL1X5wh8ixukUeTHg7Ayg4Fpq6lnJRyHWt9NEf56MIH1BRJJm5ky4HDOUXyGI7UO567vu PhDwcsgepWfUsxqf9ip0r2r6G4QYq6eELkG3UrFvDADYK3Xk3ILaHCs7Rw2JypG18Yrb+L PquOwR596irfiFzY+1DUtvQHSyXBdH635t+ranwR1DgXNqNEwoBNSizMeahaVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/wpa/g14ab4a816 has been created by cy: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/wpa/g14ab4a816 tag vendor/wpa/g14ab4a816 Tagger: Cy Schubert TaggerDate: 2021-12-01 16:08:22 +0000 wpa: Tag wpa_supplicant/hostapd commit 14ab4a816 This is the November update to vendor/wpa committed upstream 2021-11-26. commit 56f32b0e4cc24d58cae7613188c0b2dcf5ca4a94 Author: Cy Schubert AuthorDate: 2021-12-01 16:06:47 +0000 Commit: Cy Schubert CommitDate: 2021-12-01 16:06:47 +0000 wpa: Import wpa_supplicant/hostapd commit 14ab4a816 This is the November update to vendor/wpa committed upstream 2021-11-26. From nobody Wed Dec 1 16:09:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5115A18AF598 for ; Wed, 1 Dec 2021 16: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 4J43vJ0Qtfz3mTP; Wed, 1 Dec 2021 16:09:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1D4F4C4B; Wed, 1 Dec 2021 16: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 1B1G9lCj033280; Wed, 1 Dec 2021 16: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 1B1G9lH6033279; Wed, 1 Dec 2021 16:09:47 GMT (envelope-from git) Date: Wed, 1 Dec 2021 16:09:47 GMT Message-Id: <202112011609.1B1G9lH6033279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: 2f6c3ea9600b..56f32b0e4cc2 - vendor/wpa - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/vendor/wpa X-Git-Reftype: branch X-Git-Commit: 56f32b0e4cc24d58cae7613188c0b2dcf5ca4a94 X-Git-Oldrev: 2f6c3ea9600b494d24cac5a38c1cea0ac192245e X-Git-Newrev: 56f32b0e4cc24d58cae7613188c0b2dcf5ca4a94 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638374988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+/2wmtpJSOBBIPRbWPFIdiRO1SfPjPHxcOodBVLk+nQ=; b=Ly/eJfR0v5NdSTxL5BoNhwSstJGffzfnx8nQU6t00egCBolVbwQfR/SVhsarh4jhtuqZwp ie5tzW49C6JS9Tj+4rNXbqHY9GCKNvS4f2wbFoua378svnPJgqPJmhhu39aGIfkXxSxLGm CPWe+cPHxW48c8PN9y7ya2jh5GkZtsXLdn2IiFN8qOI9zg592aQQYlee118u0PpYVYcZKQ iZ9krYoxlOzf3oA2Bq2TMFIW/Y+X0JCS1wMt6/2kF8kHPFW5oqAEQwLtBSvoR9nAAGY/ER qbfitwwKAHUeX+5c8hoixD4OXWKDbMtZIWRpaewtz36RjthbqZ6DhJ+bBcpZ6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638374988; a=rsa-sha256; cv=none; b=KchQXy1H3zslNrNtItM02UNyFgCpaEY1alL2tXbG3v3kKiiuTvvHdEWAK1ov+UrHW1FMNv 3hm+JSIMQU+PX8X0XudaKxm1Xv9O3iHJrstp08LHJZU+v7Rxys7moDEv0q3h9qV75Pz2TS 8DJWbpej8cdeDkS9RjsY0Zy5gvnGrsEkCung1M76AnJXCKjY7TmOUZ2ram7vmIsjmONx8k CTjCAtXQduHX/buEFiAOfloE1VqMgtwCdTKL1qomS0vbm1UJ/2BjBk5TtA7FaAA4pNUJCh f6eTnWAk+hN0v/cxsNZzcPpwhW2ayqC0LFQ569MNpHvv71iIKcjwBeHsYufFVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch vendor/wpa has been updated by cy: URL: https://cgit.FreeBSD.org/src/log/?id=2f6c3ea9600b..56f32b0e4cc2 56f32b0e4cc2 wpa: Import wpa_supplicant/hostapd commit 14ab4a816 From nobody Wed Dec 1 17:10:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3C5CD18CB32B; Wed, 1 Dec 2021 17:10: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 4J45Dq6v4wz4dV6; Wed, 1 Dec 2021 17:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC66F5947; Wed, 1 Dec 2021 17:10: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 1B1HA3MZ015779; Wed, 1 Dec 2021 17:10:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1HA3W0015776; Wed, 1 Dec 2021 17:10:03 GMT (envelope-from git) Date: Wed, 1 Dec 2021 17:10:03 GMT Message-Id: <202112011710.1B1HA3W0015776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 2b0a7984fec9 - stable/13 - if_stf: enable use in vnet jails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2b0a7984fec96d86b0467c0bd6b513451e59f7e3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638378604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ilnPUF81MvGsknoU9mHiG4O5khsapS2jJvWUrs/8nE=; b=Pra2oxE9kFn41TR/qE7URD8bXAw4W0lQsgk/Wz49LZpgMQyyluXlTVKO4LiZU8Fu1BJHOS Xe7dHHhBzLkmVwtSfy+5bZ4plQshZWZMFQfoizz7M/3RcZWYKfbAkb6dGNu9NAXkBurQOn jN2QRAXUzyVi/IZZrRUHdq+X/sgGRIjpvi6bxtEL+4jYdQXM6Y47k0acIXQoyrX52Wz2yh y3lzFvu7QkXGOXBeO49+Dk5Qke9STDtxA1wMO1qV6M8ZjArJFq+jyIr4jBQte/7qG2h1JI Z7vOANVa6PK8QGyByB62KdxMktILm1kSiua6QvH/S4mFqg8d+H31srytlqgcGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638378604; a=rsa-sha256; cv=none; b=liZeCT4bMUDoDhdBtbeuXTKPGlVHwVxFyIxZehvDZtBQOFKKDCdiNjRsciuqxmuUZh4wFe un3hSPVSja+a1BuhCLXvV6oVCZidzTFtVpCn15cGqP2dPqm03YluxumXf/WI27SIFVBk1/ Fb6TX0PBtBXfoe1CiV+QAVfuJrnW4tghXWvNP9TWKPt58ipn5uWUDmVHN6P8O74zfyQjk1 ifE50xVqSMDbqFED4PCP3fOer0nUV87mXkDQgjaCRUy/hVmH9qI4aHOWXZi6QWoVyPcyLw hs51Ykg3iYkvt/37hzNzHb4eOYNk+BQHoa6oflNiYisyobF1Xu/bwRRlXqfjmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2b0a7984fec96d86b0467c0bd6b513451e59f7e3 commit 2b0a7984fec96d86b0467c0bd6b513451e59f7e3 Author: Kristof Provost AuthorDate: 2021-11-05 11:01:37 +0000 Commit: Kristof Provost CommitDate: 2021-12-01 15:53:19 +0000 if_stf: enable use in vnet jails The cloner must be per-vnet so that cloned interfaces get destroyed when the vnet goes away. Otherwise we fail assertions in vnet_if_uninit(): panic: vnet_if_uninit:475 tailq &V_ifnet=0xfffffe01665fe070 not empty cpuid = 19 time = 1636107064 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe015d0cac60 vpanic() at vpanic+0x187/frame 0xfffffe015d0cacc0 panic() at panic+0x43/frame 0xfffffe015d0cad20 vnet_if_uninit() at vnet_if_uninit+0x7b/frame 0xfffffe015d0cad30 vnet_destroy() at vnet_destroy+0x170/frame 0xfffffe015d0cad60 prison_deref() at prison_deref+0x9b0/frame 0xfffffe015d0cadd0 sys_jail_remove() at sys_jail_remove+0x119/frame 0xfffffe015d0cae00 amd64_syscall() at amd64_syscall+0x12e/frame 0xfffffe015d0caf30 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe015d0caf30 --- syscall (508, FreeBSD ELF64, sys_jail_remove), rip = 0x8011e920a, rsp = 0x7fffffffe788, rbp = 0x7fffffffe810 --- KDB: enter: panic MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32849 (cherry picked from commit 8e45fed3aefd00ff544efce8fedeba5e099d3d01) --- sys/net/if_stf.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index 40f8a6f3a30a..a53e3ec01dc1 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -170,7 +170,8 @@ static int stf_ioctl(struct ifnet *, u_long, caddr_t); static int stf_clone_match(struct if_clone *, const char *); static int stf_clone_create(struct if_clone *, char *, size_t, caddr_t); static int stf_clone_destroy(struct if_clone *, struct ifnet *); -static struct if_clone *stf_cloner; +VNET_DEFINE_STATIC(struct if_clone *, stf_cloner); +#define V_stf_cloner VNET(stf_cloner) static const struct encap_config ipv4_encap_cfg = { .proto = IPPROTO_IPV6, @@ -282,17 +283,33 @@ stf_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) return (0); } +static void +vnet_stf_init(const void *unused __unused) +{ + V_stf_cloner = if_clone_advanced(stfname, 0, stf_clone_match, + stf_clone_create, stf_clone_destroy); +} +VNET_SYSINIT(vnet_stf_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_stf_init, NULL); + +static void +vnet_stf_uninit(const void *unused __unused) +{ + if_clone_detach(V_stf_cloner); + V_stf_cloner = NULL; +} +VNET_SYSUNINIT(vnet_stf_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_stf_uninit, + NULL); + static int stfmodevent(module_t mod, int type, void *data) { switch (type) { case MOD_LOAD: - stf_cloner = if_clone_advanced(stfname, 0, stf_clone_match, - stf_clone_create, stf_clone_destroy); + /* Done in vnet_stf_init() */ break; case MOD_UNLOAD: - if_clone_detach(stf_cloner); + /* Done in vnet_stf_uninit() */ break; default: return (EOPNOTSUPP); From nobody Wed Dec 1 17:10:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7195418CB415; Wed, 1 Dec 2021 17:10: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 4J45Ds0QbRz4dKY; Wed, 1 Dec 2021 17:10:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0EDC584A; Wed, 1 Dec 2021 17:10: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 1B1HA4Xf016010; Wed, 1 Dec 2021 17:10:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1HA4kT016006; Wed, 1 Dec 2021 17:10:04 GMT (envelope-from git) Date: Wed, 1 Dec 2021 17:10:04 GMT Message-Id: <202112011710.1B1HA4kT016006@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 563b1596fca2 - stable/13 - if_stf: style(9) pass List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 563b1596fca2b3dc3787011dbc217079b14afb75 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638378605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CQZoc3xCXcpDZqf17ThGp9hX9nj3k2iD+F29Rd0Y0gk=; b=qyWOvJCim+rLPFjDVL6J0CHzK1Zy7aAuFND4gbP4N06M0iHvJ/SeiRrFt6tlufiN0wNt+7 Eopvg0e6ru86+BfzBljzcJOQxCVzLiDpzNAfOCzFByJANp+bEtXVpW+wwRJ2DFqvgep/u3 1V+uZfE2Jy0cpuQ/7J65lRIPkH5Lx2wk0HTBUkKv9IALg/80qetg3AULCh70v9Z/AuQ3mT OrXpQrOx+9TJ4TsyQjp3O1eQIuOhYRHf51Ub5+qxNtJzzZTLtcvbwF44O1w3ZHG074aOfK kvkMHkCDFlrBAGRwvE3uNA95lWbdXgIgAILNX9DT83yTUCrohQJaaWi3WnLIYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638378605; a=rsa-sha256; cv=none; b=IhzpgqOyMfDTAbIkWpTUtoVRjVqO6uZFRiDQMY9x8mq39OlDPgd6Mwka7fdVvpl/Fhrikh k8RhpAhuM1B+PEX18pko+xszICsJzAxPquinzsqEegTKyy0bf3td9QvN/C9g58NF/caooQ /pi5tyY9ReXhoqSRQwxMur0QT9b9zuH5YV6cc2cJXyUBy6V8swW/JbG+GAGarNXGUjfMi2 vzPKWXntsv7qEjdgvCe1xrwyaIPJNZW9R69A64OdYIXnPuNRLAbgNCUzjrcmAExwsap3WI 1o8irLNkDvbdYBRMLPlPDNeNy6s08UIIWPAMFELpfsN1ToV44U2bz4ttbRiCmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=563b1596fca2b3dc3787011dbc217079b14afb75 commit 563b1596fca2b3dc3787011dbc217079b14afb75 Author: Kristof Provost AuthorDate: 2021-11-05 10:20:16 +0000 Commit: Kristof Provost CommitDate: 2021-12-01 15:53:19 +0000 if_stf: style(9) pass As stated in style(9): "Values in return statements should be enclosed in parentheses." MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32848 (cherry picked from commit 3576121c8b1fcaa31b3a45ea52ff83f7c5855266) --- sys/net/if_stf.c | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index a53e3ec01dc1..d5ffdeabdf53 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -336,22 +336,22 @@ stf_encapcheck(const struct mbuf *m, int off, int proto, void *arg) sc = (struct stf_softc *)arg; if (sc == NULL) - return 0; + return (0); if ((STF2IFP(sc)->if_flags & IFF_UP) == 0) - return 0; + return (0); /* IFF_LINK0 means "no decapsulation" */ if ((STF2IFP(sc)->if_flags & IFF_LINK0) != 0) - return 0; + return (0); if (proto != IPPROTO_IPV6) - return 0; + return (0); m_copydata(m, 0, sizeof(ip), (caddr_t)&ip); if (ip.ip_v != 4) - return 0; + return (0); if (stf_getsrcifa6(STF2IFP(sc), &addr6, &mask6) != 0) return (0); @@ -362,7 +362,7 @@ stf_encapcheck(const struct mbuf *m, int off, int proto, void *arg) * success on: dst = 10.1.1.1, ia6->ia_addr = 2002:0a01:0101:... */ if (bcmp(GET_V4(&addr6), &ip.ip_dst, sizeof(ip.ip_dst)) != 0) - return 0; + return (0); /* * check if IPv4 src matches the IPv4 address derived from the @@ -377,10 +377,10 @@ stf_encapcheck(const struct mbuf *m, int off, int proto, void *arg) b = ip.ip_src; b.s_addr &= mask.s_addr; if (a.s_addr != b.s_addr) - return 0; + return (0); /* stf interface makes single side match only */ - return 32; + return (32); } static int @@ -450,7 +450,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, if ((ifp->if_flags & IFF_UP) == 0) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return ENETDOWN; + return (ENETDOWN); } /* @@ -461,14 +461,14 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, if (stf_getsrcifa6(ifp, &addr6, &mask6) != 0) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return ENETDOWN; + return (ENETDOWN); } if (m->m_len < sizeof(*ip6)) { m = m_pullup(m, sizeof(*ip6)); if (!m) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return ENOBUFS; + return (ENOBUFS); } } ip6 = mtod(m, struct ip6_hdr *); @@ -486,7 +486,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, else { m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return ENETUNREACH; + return (ENETUNREACH); } bcopy(ptr, &in4, sizeof(in4)); @@ -505,7 +505,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, M_PREPEND(m, sizeof(struct ip), M_NOWAIT); if (m == NULL) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return ENOBUFS; + return (ENOBUFS); } ip = mtod(m, struct ip *); @@ -525,7 +525,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); error = ip_output(m, NULL, NULL, 0, NULL, NULL); - return error; + return (error); } static int @@ -539,9 +539,9 @@ isrfc1918addr(struct in_addr *in) (ntohl(in->s_addr) & 0xff000000) >> 24 == 10 || (ntohl(in->s_addr) & 0xfff00000) >> 16 == 172 * 256 + 16 || (ntohl(in->s_addr) & 0xffff0000) >> 16 == 192 * 256 + 168)) - return 1; + return (1); - return 0; + return (0); } static int @@ -555,10 +555,10 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp) * 224.0.0.0/4 0.0.0.0/8 127.0.0.0/8 255.0.0.0/8 */ if (IN_MULTICAST(ntohl(in->s_addr))) - return -1; + return (-1); switch ((ntohl(in->s_addr) & 0xff000000) >> 24) { case 0: case 127: case 255: - return -1; + return (-1); } /* @@ -566,7 +566,7 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp) * (requirement from RFC3056 section 2 1st paragraph) */ if (isrfc1918addr(in)) - return -1; + return (-1); /* * reject packets with broadcast @@ -577,7 +577,7 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp) continue; if (in->s_addr == ia4->ia_broadaddr.sin_addr.s_addr) { IN_IFADDR_RUNLOCK(&in_ifa_tracker); - return -1; + return (-1); } } IN_IFADDR_RUNLOCK(&in_ifa_tracker); @@ -597,7 +597,7 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp) return (-1); } - return 0; + return (0); } static int @@ -609,7 +609,7 @@ stf_checkaddr6(struct stf_softc *sc, struct in6_addr *in6, struct ifnet *inifp) if (IN6_IS_ADDR_6TO4(in6)) { struct in_addr in4; bcopy(GET_V4(in6), &in4, sizeof(in4)); - return stf_checkaddr4(sc, &in4, inifp); + return (stf_checkaddr4(sc, &in4, inifp)); } /* @@ -619,9 +619,9 @@ stf_checkaddr6(struct stf_softc *sc, struct in6_addr *in6, struct ifnet *inifp) * (2) to be safe against future ip6_input change. */ if (IN6_IS_ADDR_V4COMPAT(in6) || IN6_IS_ADDR_V4MAPPED(in6)) - return -1; + return (-1); - return 0; + return (0); } static int @@ -775,5 +775,5 @@ stf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; } - return error; + return (error); } From nobody Wed Dec 1 17:10:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0D1E318CB2ED; Wed, 1 Dec 2021 17:10: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 4J45Ds3v90z4d9k; Wed, 1 Dec 2021 17:10:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 403BA5B87; Wed, 1 Dec 2021 17:10: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 1B1HA50X016138; Wed, 1 Dec 2021 17:10:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1HA5fb016135; Wed, 1 Dec 2021 17:10:05 GMT (envelope-from git) Date: Wed, 1 Dec 2021 17:10:05 GMT Message-Id: <202112011710.1B1HA5fb016135@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: e66cd95ea544 - stable/12 - if_stf: enable use in vnet jails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e66cd95ea5442fa0c3373e654f4833cb1cc61caf Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638378605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dNqpQLIiDZPg161wmch3zOQZUmm65cosmyi909pQ3sc=; b=AWZLyWSmDMbjaMlHM+atDTFNBRebLbr3bEGmsPXh5vtRHCAiUwmnOch36JLpm8YoQvKSij lNgIv0iPIdsiCz9g2zwKL2cyQJdtC63DVRvMa6FH9ZuRfDEKQIqcgDihUKEXNNJXF/7C+b OasLbJrewop9DISiSbYx5vAjumvcoz/ZiSes/Z5hGaObm+G/EB49spCWhuRCkiWp9T13Ch sNsv1UE4TgUhEKVudfNk+z+oIdDGOhbW8pUcrSNKOMTP+CE/O6zmri8nDlGgSkH81SBLtI i5AY3Ezo7FGqmPM884Bh4uywYlgnj1dwLM4Z7uZLRmXly3CEqFNQMoatcv5kkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638378605; a=rsa-sha256; cv=none; b=s62pcWg0B91sgJ1DOTFhFE5nOhqIE19aXQIwMgehrPMoyB5Pv28sxHraGa7p48p+v/EBef twtXxfaVfWcQkwjFmaD3tTSwHGhiK3EJMqdDAUnO3wFKIIK4JPvAOPlOaHSofkmv8Qf/Z1 TejEwaK/7hrJsDBRdonNgtCq6udwW4xDQwpnj+JXO52cS2REGCYV45zLhDmgBxlXzOMxnq PbKfSDlwFVEsOhr7RbQNdgpIrgzrwKL4sFQaA7JrGJEu608ahuZ8BcvVk1jolqKMs/PSXs ACJF1nEtUV5ec6mjEazgKImuCyHOr1KRtI28EUdpjxtM7vPExUF1KxFgM+KGrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e66cd95ea5442fa0c3373e654f4833cb1cc61caf commit e66cd95ea5442fa0c3373e654f4833cb1cc61caf Author: Kristof Provost AuthorDate: 2021-11-05 11:01:37 +0000 Commit: Kristof Provost CommitDate: 2021-11-30 07:41:04 +0000 if_stf: enable use in vnet jails The cloner must be per-vnet so that cloned interfaces get destroyed when the vnet goes away. Otherwise we fail assertions in vnet_if_uninit(): panic: vnet_if_uninit:475 tailq &V_ifnet=0xfffffe01665fe070 not empty cpuid = 19 time = 1636107064 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe015d0cac60 vpanic() at vpanic+0x187/frame 0xfffffe015d0cacc0 panic() at panic+0x43/frame 0xfffffe015d0cad20 vnet_if_uninit() at vnet_if_uninit+0x7b/frame 0xfffffe015d0cad30 vnet_destroy() at vnet_destroy+0x170/frame 0xfffffe015d0cad60 prison_deref() at prison_deref+0x9b0/frame 0xfffffe015d0cadd0 sys_jail_remove() at sys_jail_remove+0x119/frame 0xfffffe015d0cae00 amd64_syscall() at amd64_syscall+0x12e/frame 0xfffffe015d0caf30 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe015d0caf30 --- syscall (508, FreeBSD ELF64, sys_jail_remove), rip = 0x8011e920a, rsp = 0x7fffffffe788, rbp = 0x7fffffffe810 --- KDB: enter: panic MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32849 (cherry picked from commit 8e45fed3aefd00ff544efce8fedeba5e099d3d01) --- sys/net/if_stf.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index 225bd30b6bd3..f9abe4c6a630 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -168,7 +168,8 @@ static int stf_ioctl(struct ifnet *, u_long, caddr_t); static int stf_clone_match(struct if_clone *, const char *); static int stf_clone_create(struct if_clone *, char *, size_t, caddr_t); static int stf_clone_destroy(struct if_clone *, struct ifnet *); -static struct if_clone *stf_cloner; +VNET_DEFINE_STATIC(struct if_clone *, stf_cloner); +#define V_stf_cloner VNET(stf_cloner) static const struct encap_config ipv4_encap_cfg = { .proto = IPPROTO_IPV6, @@ -280,17 +281,33 @@ stf_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) return (0); } +static void +vnet_stf_init(const void *unused __unused) +{ + V_stf_cloner = if_clone_advanced(stfname, 0, stf_clone_match, + stf_clone_create, stf_clone_destroy); +} +VNET_SYSINIT(vnet_stf_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_stf_init, NULL); + +static void +vnet_stf_uninit(const void *unused __unused) +{ + if_clone_detach(V_stf_cloner); + V_stf_cloner = NULL; +} +VNET_SYSUNINIT(vnet_stf_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_stf_uninit, + NULL); + static int stfmodevent(module_t mod, int type, void *data) { switch (type) { case MOD_LOAD: - stf_cloner = if_clone_advanced(stfname, 0, stf_clone_match, - stf_clone_create, stf_clone_destroy); + /* Done in vnet_stf_init() */ break; case MOD_UNLOAD: - if_clone_detach(stf_cloner); + /* Done in vnet_stf_uninit() */ break; default: return (EOPNOTSUPP); From nobody Wed Dec 1 17:10:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 56E6918CB494; Wed, 1 Dec 2021 17:10: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 4J45Dt2MKvz4dS6; Wed, 1 Dec 2021 17:10:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E80F5B0C; Wed, 1 Dec 2021 17:10: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 1B1HA54Y016297; Wed, 1 Dec 2021 17:10:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1HA5a0016295; Wed, 1 Dec 2021 17:10:05 GMT (envelope-from git) Date: Wed, 1 Dec 2021 17:10:05 GMT Message-Id: <202112011710.1B1HA5a0016295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: a40b76511844 - stable/13 - net tests: basic if_stf 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a40b7651184478c18508cb676706465bacf1b773 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638378606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2jkJIR5h7HGnDL/O477NN/1TQmwK8k1eZOOozSsU4Ak=; b=TwrAgfMm4TDk6xQPlpSLh+u/HM+H2VDrtqCfp84u5h7DzTS1B07q2fijwe/czqSCNLY31j 1k2MvDpp7muDof6mi1LhhZfW2Q4Dw+oKP4686UmEbc61LHm6e+00AGHrbZmOcwMPebkemh YqZCWH8LbN609DzBVUFCtgFLmkWPqypmLNXPvM7ctlkZZNLQlcF3gfxmzCDsU9yHBVIs0O 5yKrrkpqajG9J6hmwFuOGuHzx88YPfqGgnCJpRf1acS4zb4KBDaKWlaKb7hRFKf2lv1Xzn bgczZkoFaLUtyfu0UKc8364iZmaJuuaflpTuTYCDlnJsFxuGVCm2LbbbnYeLag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638378606; a=rsa-sha256; cv=none; b=ZpeaXGWWb3xebBI9QTLrYd+3XHP7RPLLZz1g0+7osrMvE7ofi9m/ykVB8YYqE9HS6wkSxc PHnNmRpvITPF7hhqZJTsbS6ssvGfLUXXuFLRJUR22hzGHNaDms0Rbt8vlx9ntfqkxU+kww R13v6SlBxj31pm6RIzUByy2GxF/rWlcj0vOnn9w/WoDySpRHYvjE4cMhYbPbAVHb2QHsm0 hlDiYIi8+W/iNf5tvFBjjaTZcTBsM6Pv3+pznHLGZRjuLOkCYcaDKp1y4gn+79IEvxm0vH lJC4l9pjhDF6KTBkqdXaSD46osGk8kHlLfCWBBYUlOjEOB2tXlmFkzk99oG3pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a40b7651184478c18508cb676706465bacf1b773 commit a40b7651184478c18508cb676706465bacf1b773 Author: Kristof Provost AuthorDate: 2021-11-05 14:20:19 +0000 Commit: Kristof Provost CommitDate: 2021-12-01 15:53:19 +0000 net tests: basic if_stf test Test the 6to4 code. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32850 (cherry picked from commit eb5e0755f7496d1328d572b4d181c70b39152f08) --- tests/sys/net/Makefile | 1 + tests/sys/net/if_stf.sh | 84 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/tests/sys/net/Makefile b/tests/sys/net/Makefile index 9ff2b8c775b5..0eed6cf734fa 100644 --- a/tests/sys/net/Makefile +++ b/tests/sys/net/Makefile @@ -11,6 +11,7 @@ TEST_METADATA.if_bridge_test+= required_programs="python" ATF_TESTS_SH+= if_clone_test ATF_TESTS_SH+= if_gif ATF_TESTS_SH+= if_lagg_test +ATF_TESTS_SH+= if_stf ATF_TESTS_SH+= if_tun_test ATF_TESTS_SH+= if_vlan diff --git a/tests/sys/net/if_stf.sh b/tests/sys/net/if_stf.sh new file mode 100644 index 000000000000..f3ed2d744c7c --- /dev/null +++ b/tests/sys/net/if_stf.sh @@ -0,0 +1,84 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/../common/vnet.subr + +atf_test_case "6to4" "cleanup" +6to4_head() +{ + atf_set descr 'Test 6to4' + atf_set require.user root +} + +6to4_body() +{ + vnet_init + if ! kldstat -q -m if_stf; then + atf_skip "This test requires if_stf" + fi + if ! kldstat -q -m if_gif; then + atf_skip "This test requires if_stf" + fi + + epair=$(vnet_mkepair) + + vnet_mkjail relay ${epair}a + jexec relay ifconfig lo0 inet6 2001:db8::1/64 up + jexec relay ifconfig ${epair}a 192.0.2.1/24 up + # Simple gif to terminate 6to4 + gif=$(jexec relay ifconfig gif create) + jexec relay ifconfig $gif inet6 2002:c000:0201::1/64 up + jexec relay ifconfig $gif tunnel 192.0.2.1 192.0.2.2 + jexec relay route -6 add default -interface $gif + + vnet_mkjail client ${epair}b + jexec client ifconfig ${epair}b 192.0.2.2/24 up + stf=$(jexec client ifconfig stf create) + jexec client ifconfig $stf inet6 2002:c000:0202::1/32 up + jexec client route -6 add default 2002:c000:0201::1 + + # Sanity check + atf_check -s exit:0 -o ignore \ + jexec client ping -c 1 192.0.2.1 + # 6to4 direct + atf_check -s exit:0 -o ignore \ + jexec client ping6 -c 1 2002:c000:0201::1 + + # "Wider internet" + atf_check -s exit:0 -o ignore \ + jexec client ping6 -c 1 2001:db8::1 +} + +6to4_cleanup() +{ + vnet_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "6to4" +} From nobody Wed Dec 1 17:10:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BB48C18CB1E4; Wed, 1 Dec 2021 17:10: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 4J45Dt5kQVz4dVJ; Wed, 1 Dec 2021 17:10:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53095584B; Wed, 1 Dec 2021 17:10: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 1B1HA6cd016372; Wed, 1 Dec 2021 17:10:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1HA6No016369; Wed, 1 Dec 2021 17:10:06 GMT (envelope-from git) Date: Wed, 1 Dec 2021 17:10:06 GMT Message-Id: <202112011710.1B1HA6No016369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 9684452504f9 - stable/12 - if_stf: style(9) pass List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 9684452504f94d197eefcd1f2e24ac4d03922d4b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638378606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rGdcXA54NecUalGbpPK+Yu8L0T/WmiFu0QQhvIXlCnE=; b=Vs9YAIz5j9DJ5XnuLAFr4VlCm2Mo/QMrvi8XoZE4jVdJ7wKXorsNmkPIzUv8JK9ZRZQPlW V4TmCBlwmwCroFoujgEq7pur96KccGn3i1N6IROBWJhclGRuP9BlPqNT5H7CJcrMhvFYn/ z+T14DHuc3w0q+GPAm/albQGgtkKyQBDOnPl+khXGtn+0kzJ5b8a/9T62DPHzHECBJXDXo o7sby4OAqpDvz08JvQoJFgY7JssgKq09tFKo+ImcmVYki/G10SEeuQTurK3kNV4OUyvrSp pImBQdkoqg6mPPOItsb1GHBaB0vQZPmHgEENpaWTXCUDa9drDO8vcaXKQxN2Ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638378606; a=rsa-sha256; cv=none; b=TALlLhLOsBhMJndyAMVebGy1oHloP9frIYG74bv5qH7iY685eWuTHSksXmd0jYll+sTwrn 6ZPkMSP0OeqoT/rivVr6uZ9oT1dY1Y7Ncm3lxNnDa0OaWlp0DFLXmUtPzJ9DnmfYSmqVBW rCaPAD1vvTL0gxL0VSte0ikLIuCv1j3c7rTqBMjzUsfPeyYzUbCdeBuP3p5+kfegr46Cum BJ+vwNDXKYoErjx9GhP4RUQvLeqGBkHNTpZzg9eTO/NKYFg+xwPRvC7u0dUApozWEPZVJB UCmdzsq56rCPqllgSAVPW2kO/k5GzELn/Rg0q8qo5E+6dIQF2uXJnhFbHC5+8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9684452504f94d197eefcd1f2e24ac4d03922d4b commit 9684452504f94d197eefcd1f2e24ac4d03922d4b Author: Kristof Provost AuthorDate: 2021-11-05 10:20:16 +0000 Commit: Kristof Provost CommitDate: 2021-11-30 07:41:28 +0000 if_stf: style(9) pass As stated in style(9): "Values in return statements should be enclosed in parentheses." MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32848 (cherry picked from commit 3576121c8b1fcaa31b3a45ea52ff83f7c5855266) --- sys/net/if_stf.c | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index f9abe4c6a630..098099052264 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -334,22 +334,22 @@ stf_encapcheck(const struct mbuf *m, int off, int proto, void *arg) sc = (struct stf_softc *)arg; if (sc == NULL) - return 0; + return (0); if ((STF2IFP(sc)->if_flags & IFF_UP) == 0) - return 0; + return (0); /* IFF_LINK0 means "no decapsulation" */ if ((STF2IFP(sc)->if_flags & IFF_LINK0) != 0) - return 0; + return (0); if (proto != IPPROTO_IPV6) - return 0; + return (0); m_copydata(m, 0, sizeof(ip), (caddr_t)&ip); if (ip.ip_v != 4) - return 0; + return (0); if (stf_getsrcifa6(STF2IFP(sc), &addr6, &mask6) != 0) return (0); @@ -360,7 +360,7 @@ stf_encapcheck(const struct mbuf *m, int off, int proto, void *arg) * success on: dst = 10.1.1.1, ia6->ia_addr = 2002:0a01:0101:... */ if (bcmp(GET_V4(&addr6), &ip.ip_dst, sizeof(ip.ip_dst)) != 0) - return 0; + return (0); /* * check if IPv4 src matches the IPv4 address derived from the @@ -375,10 +375,10 @@ stf_encapcheck(const struct mbuf *m, int off, int proto, void *arg) b = ip.ip_src; b.s_addr &= mask.s_addr; if (a.s_addr != b.s_addr) - return 0; + return (0); /* stf interface makes single side match only */ - return 32; + return (32); } static int @@ -449,7 +449,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, if ((ifp->if_flags & IFF_UP) == 0) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return ENETDOWN; + return (ENETDOWN); } /* @@ -460,14 +460,14 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, if (stf_getsrcifa6(ifp, &addr6, &mask6) != 0) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return ENETDOWN; + return (ENETDOWN); } if (m->m_len < sizeof(*ip6)) { m = m_pullup(m, sizeof(*ip6)); if (!m) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return ENOBUFS; + return (ENOBUFS); } } ip6 = mtod(m, struct ip6_hdr *); @@ -485,7 +485,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, else { m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return ENETUNREACH; + return (ENETUNREACH); } bcopy(ptr, &in4, sizeof(in4)); @@ -504,7 +504,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, M_PREPEND(m, sizeof(struct ip), M_NOWAIT); if (m == NULL) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - return ENOBUFS; + return (ENOBUFS); } ip = mtod(m, struct ip *); @@ -524,7 +524,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); error = ip_output(m, NULL, NULL, 0, NULL, NULL); - return error; + return (error); } static int @@ -538,9 +538,9 @@ isrfc1918addr(struct in_addr *in) (ntohl(in->s_addr) & 0xff000000) >> 24 == 10 || (ntohl(in->s_addr) & 0xfff00000) >> 16 == 172 * 256 + 16 || (ntohl(in->s_addr) & 0xffff0000) >> 16 == 192 * 256 + 168)) - return 1; + return (1); - return 0; + return (0); } static int @@ -554,10 +554,10 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp) * 224.0.0.0/4 0.0.0.0/8 127.0.0.0/8 255.0.0.0/8 */ if (IN_MULTICAST(ntohl(in->s_addr))) - return -1; + return (-1); switch ((ntohl(in->s_addr) & 0xff000000) >> 24) { case 0: case 127: case 255: - return -1; + return (-1); } /* @@ -565,7 +565,7 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp) * (requirement from RFC3056 section 2 1st paragraph) */ if (isrfc1918addr(in)) - return -1; + return (-1); /* * reject packets with broadcast @@ -576,7 +576,7 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp) continue; if (in->s_addr == ia4->ia_broadaddr.sin_addr.s_addr) { IN_IFADDR_RUNLOCK(&in_ifa_tracker); - return -1; + return (-1); } } IN_IFADDR_RUNLOCK(&in_ifa_tracker); @@ -594,7 +594,7 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp) return (-1); } - return 0; + return (0); } static int @@ -606,7 +606,7 @@ stf_checkaddr6(struct stf_softc *sc, struct in6_addr *in6, struct ifnet *inifp) if (IN6_IS_ADDR_6TO4(in6)) { struct in_addr in4; bcopy(GET_V4(in6), &in4, sizeof(in4)); - return stf_checkaddr4(sc, &in4, inifp); + return (stf_checkaddr4(sc, &in4, inifp)); } /* @@ -616,9 +616,9 @@ stf_checkaddr6(struct stf_softc *sc, struct in6_addr *in6, struct ifnet *inifp) * (2) to be safe against future ip6_input change. */ if (IN6_IS_ADDR_V4COMPAT(in6) || IN6_IS_ADDR_V4MAPPED(in6)) - return -1; + return (-1); - return 0; + return (0); } static int @@ -770,5 +770,5 @@ stf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; } - return error; + return (error); } From nobody Wed Dec 1 17:10:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C802B18CB1F6; Wed, 1 Dec 2021 17:10: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 4J45Dw1Hrzz4dN1; Wed, 1 Dec 2021 17:10:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 689805A20; Wed, 1 Dec 2021 17:10: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 1B1HA73O016608; Wed, 1 Dec 2021 17:10:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1HA7vS016605; Wed, 1 Dec 2021 17:10:07 GMT (envelope-from git) Date: Wed, 1 Dec 2021 17:10:07 GMT Message-Id: <202112011710.1B1HA7vS016605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 118090989817 - stable/12 - net tests: basic if_stf 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 118090989817bfe9e3c3c8d68d70484a4999ce6b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638378608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ea2q2+DPI5RjlU0rq6MDnUbW9crzI1gQ1anomsjt8jw=; b=pFTJYOBK5EJ2LGSLO8puC8kNb24vSblQLfnFFkGLi+XRFpUh6M2vsJSDod4+EJmeWNcn/S MDmCRFzP/ezuwgeAX1cArFjs8f8v4ywVQtvx0+sLUzmb0LgrCkWLF3uImcIZrlH/nb1AxD 5yJy/x69TdkyXdJwZ/MI/sZMuMl+p4jQfAoRm58YY8QZe+1ZoXG4U9C3/jlSYaecKf+wOT A5ooN1g2CafY3SsH1If7qE2HMOk3gt9OStePHNQixTQVszzyVF6O3JCibUjmlRHehgJCDE /P+DmDslQD9dpeYz9GmNOBYqekqV/3W3dVSt0Td5+99QTVmJP8K2+sJwmno40A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638378608; a=rsa-sha256; cv=none; b=G1BtlV9jWpnnBPjcGpHScwSdQ9P3LBEYZfYuJLtKsdSOGetB+CpzU1D/XwUjL/3gAynqZD 6NmrosxzNmJP6F0fjxFA9eoIP0r8qg/Bfv6uxW4jmyL9umBh7Dwk9f8a7XqENuq4uZkAAj QaVPrNnEQknfBc7WgpHvVxCJld7UTnGOax+UCi9ybahzYtqvb6jHdK0VqBn+gsFB7rATV1 AQVmUvJVoGLBsWM/6td7Zr5gYQ3pJU0HpmcBDj+ueebYDxrCevQ8+PIFh6ZWGGM88423oJ kR0csnhcXky7ywq7RiOGUIzAKBsuBGcfyNtvWqJPB/ffMv8ZdL5s3e79G12OPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=118090989817bfe9e3c3c8d68d70484a4999ce6b commit 118090989817bfe9e3c3c8d68d70484a4999ce6b Author: Kristof Provost AuthorDate: 2021-11-05 14:20:19 +0000 Commit: Kristof Provost CommitDate: 2021-12-01 12:43:25 +0000 net tests: basic if_stf test Test the 6to4 code. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32850 (cherry picked from commit eb5e0755f7496d1328d572b4d181c70b39152f08) --- tests/sys/net/Makefile | 1 + tests/sys/net/if_stf.sh | 84 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/tests/sys/net/Makefile b/tests/sys/net/Makefile index 7340688286cc..ca50f6cbcd76 100644 --- a/tests/sys/net/Makefile +++ b/tests/sys/net/Makefile @@ -10,6 +10,7 @@ ATF_TESTS_SH+= if_bridge_test ATF_TESTS_SH+= if_clone_test ATF_TESTS_SH+= if_gif ATF_TESTS_SH+= if_lagg_test +ATF_TESTS_SH+= if_stf ATF_TESTS_SH+= if_tun_test ATF_TESTS_SH+= if_vlan diff --git a/tests/sys/net/if_stf.sh b/tests/sys/net/if_stf.sh new file mode 100644 index 000000000000..af53f7bdb5dd --- /dev/null +++ b/tests/sys/net/if_stf.sh @@ -0,0 +1,84 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/../common/vnet.subr + +atf_test_case "6to4" "cleanup" +6to4_head() +{ + atf_set descr 'Test 6to4' + atf_set require.user root +} + +6to4_body() +{ + vnet_init + if ! kldstat -q -m if_stf; then + atf_skip "This test requires if_stf" + fi + if ! kldstat -q -m if_gif; then + atf_skip "This test requires if_stf" + fi + + epair=$(vnet_mkepair) + + vnet_mkjail relay ${epair}a + jexec relay ifconfig lo0 inet6 2001:db8::1/64 up + jexec relay ifconfig ${epair}a 192.0.2.1/24 up + # Simple gif to terminate 6to4 + gif=$(jexec relay ifconfig gif create) + jexec relay ifconfig $gif inet6 2002:c000:0201::1/64 up no_dad + jexec relay ifconfig $gif tunnel 192.0.2.1 192.0.2.2 + jexec relay route -6 add default -interface $gif + + vnet_mkjail client ${epair}b + jexec client ifconfig ${epair}b 192.0.2.2/24 up + stf=$(jexec client ifconfig stf create) + jexec client ifconfig $stf inet6 2002:c000:0202::1/32 up no_dad + jexec client route -6 add default 2002:c000:0201::1 + + # Sanity check + atf_check -s exit:0 -o ignore \ + jexec client ping -c 1 192.0.2.1 + # 6to4 direct + atf_check -s exit:0 -o ignore \ + jexec client ping6 -c 1 2002:c000:0201::1 + + # "Wider internet" + atf_check -s exit:0 -o ignore \ + jexec client ping6 -c 1 2001:db8::1 +} + +6to4_cleanup() +{ + vnet_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "6to4" +} From nobody Wed Dec 1 17:10:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EC5A118CB433; Wed, 1 Dec 2021 17:10: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 4J45Dw4sLpz4dXL; Wed, 1 Dec 2021 17:10:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CC285A21; Wed, 1 Dec 2021 17:10: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 1B1HA8To016770; Wed, 1 Dec 2021 17:10:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1HA8jA016768; Wed, 1 Dec 2021 17:10:08 GMT (envelope-from git) Date: Wed, 1 Dec 2021 17:10:08 GMT Message-Id: <202112011710.1B1HA8jA016768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 10199101997b - stable/13 - pf tests: Test PR259689 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 10199101997bdc352a74998dc7a39a24f5d722c4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638378609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MGSNCkyCQcl22yur1KA56Sj13Kq7aZUHLxPYLQBBrFQ=; b=jHYAuCSuAhcDQFyWmNLsxDNlPpnL8pRLHI7tFv7dU0a63ew7Y5A4r+TALU+LnJu98DONJF OfVvBr23Qc17sDpUH8OVm3Vy1UgjOweDfy3uUgYB5eqSBk2+e/T0y/u3abaGNZTnZ25Q2Q gJNRbstbzYN6ovZKWGkxq8BABH6G7IVKdTd5R3/PD4/TPM6MSwqg61iwMZ6W2hTkjVItiY Tr6hBpmTOHJ9ZJSAwqXBW+avAptVzkf56HV36WUT6LcH5p/Zd5wqrMhIHGQYjUZ9lEKZIZ LVeD/yXw8rVGplEes0SX8lrIEsig2wNXRBDikwHLuKFK1683cu9DN1nW59Mwtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638378609; a=rsa-sha256; cv=none; b=maM3acKTfd3XFSTTRggW2hQPzZ1yFfRWXx212v12NozbD/0lJ99XjwAM4Xhq/P3u2cepFO LV5GwswjjQONFKKSWjYV4zIe8P6rmuCP4W3WSpaY9thQj9AaLWOAtXjaA82fs9Fm8ZScQm 3Oc/vBRroZoKYj6Uvm58niCjnj4vRgpF08znhJgnemCxyqLkNomqHgXO8o8T4A228BlpX9 2VGpVXtus8gbyLPmi5Nr3AQBu67t4uaZ2h6XLlc8/ey4iet2mSLoZPVtiaTyUHL2tjSyAz DKSvXnriA2Doa/RtjbRl36IHtodpXOnuuWcQs4F39ir8CViJRKiUYwX1T0kTow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=10199101997bdc352a74998dc7a39a24f5d722c4 commit 10199101997bdc352a74998dc7a39a24f5d722c4 Author: Kristof Provost AuthorDate: 2021-11-08 12:28:43 +0000 Commit: Kristof Provost CommitDate: 2021-12-01 15:53:20 +0000 pf tests: Test PR259689 We didn't populate dyncnt/tblcnt, so `pfctl -sr -vv` might not have the table element count. PR: 259689 MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32893 (cherry picked from commit 2de49deeca0b1377664dee2cd0a43ee7cf6b4bc4) --- lib/libpfctl/libpfctl.c | 2 +- tests/sys/netpfil/pf/table.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 6613708b183c..9252f64969bb 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -294,7 +294,7 @@ pf_nvaddr_wrap_to_addr_wrap(const nvlist_t *nvl, struct pf_addr_wrap *addr) if (addr->type == PF_ADDR_DYNIFTL) { strlcpy(addr->v.ifname, nvlist_get_string(nvl, "ifname"), IFNAMSIZ); - addr->p.dyncnt = nvlist_get_number(nvl, "dynctl"); + addr->p.dyncnt = nvlist_get_number(nvl, "dyncnt"); } if (addr->type == PF_ADDR_TABLE) { strlcpy(addr->v.tblname, nvlist_get_string(nvl, "tblname"), diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh index 379b715e767a..692d622bd86a 100644 --- a/tests/sys/netpfil/pf/table.sh +++ b/tests/sys/netpfil/pf/table.sh @@ -214,6 +214,34 @@ automatic_cleanup() pft_cleanup } +atf_test_case "pr259689" "cleanup" +pr259689_head() +{ + atf_set descr 'Test PR 259689' + atf_set require.user root +} + +pr259689_body() +{ + pft_init + + vnet_mkjail alcatraz + jexec alcatraz pfctl -e + + pft_set_rules alcatraz \ + "pass in" \ + "block in inet from { 1.1.1.1, 1.1.1.2, 2.2.2.2, 2.2.2.3, 4.4.4.4, 4.4.4.5 }" + + atf_check -o match:'block drop in inet from <__automatic_.*:6> to any' \ + -e ignore \ + jexec alcatraz pfctl -sr -vv +} + +pr259689_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4_counters" @@ -221,4 +249,5 @@ atf_init_test_cases() atf_add_test_case "pr251414" atf_add_test_case "network" atf_add_test_case "automatic" + atf_add_test_case "pr259689" } From nobody Wed Dec 1 17:10:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EFFDD18CB434; Wed, 1 Dec 2021 17:10: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 4J45Dv56hmz4dPv; Wed, 1 Dec 2021 17:10:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F4AF584C; Wed, 1 Dec 2021 17:10: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 1B1HA6iY016533; Wed, 1 Dec 2021 17:10:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1HA6MQ016531; Wed, 1 Dec 2021 17:10:06 GMT (envelope-from git) Date: Wed, 1 Dec 2021 17:10:06 GMT Message-Id: <202112011710.1B1HA6MQ016531@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 525205b5d2f1 - stable/13 - pf: ensure we populate dyncnt/tblcnt in struct pf_addr_wrap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 525205b5d2f12b85c84cf060b5e42d5472e31501 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638378608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z+Y1ojJ6uItlQoI2gpIN/shXU8OGuSWAR39tjROZZBE=; b=vg0P+6DMhEQS0dJxpF3eZbpvuBPF5dkfHIeFYVJafhY5YA34Wj72fCWcs6AmVFb7Za+dIP RvIX/K9NZ6xPEEewQK5mVyPD5kfMzURiiiS/T3QK+B9xwoG7Avda9ItHuv7aEy6GRRAwYl DzfQuDaUv947v5YaXe76mSU82z8q1ykHYjS6r3NpzC9oH7CcTN2ebMKI0XRHL3uhyjqBE1 zBH4fuRvAG2xzVHVeFB+wul5oZ2vUmHXwRj1NDMbN0nHXua9dJkROMOYnSZzDo5Zo3FIjz 1gShabyB3zZacMryHDsIKeBaUc4LwNiAcrtnOqqYBYAAJM6pfOLhZIObV+vcqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638378608; a=rsa-sha256; cv=none; b=YZ6an2OKKla8Tk/rJvtFdmU6hXSRu2L4xE4ftcxUiD9jtQe+PCqXB/QgpJd9TH8GQLfagn cpRdXgWreVUCdagDNEESMy2TL6M7YDqpIWDDsIEngP/i61HgIYq+O8S/8umP5ywrrhNRQb 2OZEDIDWIxauzieKEA0difMTolEOC+5eBqa01MrdlL6jvKqYZpRtgEHAppvwZUb5S26FoA KnpNE6RdWuVLWG+RzZe2P3DSf72Pd0qZshGRfnWWs/Kd+OOT5xHjt06K/BA2os2DOtKd8u dJlDbbW3IhoCSKHZxyksMl5PKGNs8ANveiGc7r+Ese7uJpMpMV+rLsB5dEKdzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=525205b5d2f12b85c84cf060b5e42d5472e31501 commit 525205b5d2f12b85c84cf060b5e42d5472e31501 Author: Kristof Provost AuthorDate: 2021-11-08 12:25:20 +0000 Commit: Kristof Provost CommitDate: 2021-12-01 15:53:19 +0000 pf: ensure we populate dyncnt/tblcnt in struct pf_addr_wrap PR: 259689 MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32892 (cherry picked from commit 218a8a491c4980dcc941908f9505d37e7f052868) --- lib/libpfctl/libpfctl.c | 10 ++++++++-- sys/netpfil/pf/pf_nv.c | 21 +++++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 96f5ea620f4d..6613708b183c 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -287,14 +287,20 @@ pfctl_nv_add_addr_wrap(nvlist_t *nvparent, const char *name, static void pf_nvaddr_wrap_to_addr_wrap(const nvlist_t *nvl, struct pf_addr_wrap *addr) { + bzero(addr, sizeof(*addr)); + addr->type = nvlist_get_number(nvl, "type"); addr->iflags = nvlist_get_number(nvl, "iflags"); - if (addr->type == PF_ADDR_DYNIFTL) + if (addr->type == PF_ADDR_DYNIFTL) { strlcpy(addr->v.ifname, nvlist_get_string(nvl, "ifname"), IFNAMSIZ); - if (addr->type == PF_ADDR_TABLE) + addr->p.dyncnt = nvlist_get_number(nvl, "dynctl"); + } + if (addr->type == PF_ADDR_TABLE) { strlcpy(addr->v.tblname, nvlist_get_string(nvl, "tblname"), PF_TABLE_NAME_SIZE); + addr->p.tblcnt = nvlist_get_number(nvl, "tblcnt"); + } pf_nvaddr_to_addr(nvlist_get_nvlist(nvl, "addr"), &addr->v.a.addr); pf_nvaddr_to_addr(nvlist_get_nvlist(nvl, "mask"), &addr->v.a.mask); diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c index b6676be645d7..573544972952 100644 --- a/sys/netpfil/pf/pf_nv.c +++ b/sys/netpfil/pf/pf_nv.c @@ -327,6 +327,8 @@ pf_addr_wrap_to_nvaddr_wrap(const struct pf_addr_wrap *addr) { nvlist_t *nvl; nvlist_t *tmp; + uint64_t num; + struct pfr_ktable *kt; nvl = nvlist_create(0); if (nvl == NULL) @@ -334,10 +336,25 @@ pf_addr_wrap_to_nvaddr_wrap(const struct pf_addr_wrap *addr) nvlist_add_number(nvl, "type", addr->type); nvlist_add_number(nvl, "iflags", addr->iflags); - if (addr->type == PF_ADDR_DYNIFTL) + if (addr->type == PF_ADDR_DYNIFTL) { nvlist_add_string(nvl, "ifname", addr->v.ifname); - if (addr->type == PF_ADDR_TABLE) + num = 0; + if (addr->p.dyn != NULL) + num = addr->p.dyn->pfid_acnt4 + + addr->p.dyn->pfid_acnt6; + nvlist_add_number(nvl, "dyncnt", num); + } + if (addr->type == PF_ADDR_TABLE) { nvlist_add_string(nvl, "tblname", addr->v.tblname); + num = -1; + kt = addr->p.tbl; + if ((kt->pfrkt_flags & PFR_TFLAG_ACTIVE) && + kt->pfrkt_root != NULL) + kt = kt->pfrkt_root; + if (kt->pfrkt_flags & PFR_TFLAG_ACTIVE) + num = kt->pfrkt_cnt; + nvlist_add_number(nvl, "tblcnt", num); + } tmp = pf_addr_to_nvaddr(&addr->v.a.addr); if (tmp == NULL) From nobody Wed Dec 1 17:10:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6487818CB439; Wed, 1 Dec 2021 17:10: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 4J45Dx2yvzz4dSL; Wed, 1 Dec 2021 17:10:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7266B5A22; Wed, 1 Dec 2021 17:10: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 1B1HA8Ys016844; Wed, 1 Dec 2021 17:10:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1HA80i016841; Wed, 1 Dec 2021 17:10:08 GMT (envelope-from git) Date: Wed, 1 Dec 2021 17:10:08 GMT Message-Id: <202112011710.1B1HA80i016841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 73ef1f7462e9 - stable/12 - pf: ensure we populate dyncnt/tblcnt in struct pf_addr_wrap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 73ef1f7462e95f12747a6ff33c0cbb2bc4f848b7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638378609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iHQo3swApf5+F/PVRkqGWirT+hqQE5ESd/gRHuZV/+4=; b=ShFAQLHvcT4I/okUjAYgBLdiK4tDV8WAg7hc/xDfiZX7wYB+8So9ckCs6hEVsAJyREhoWV FCcWodlW5ETp+GkOO6qDCiTlf8ziRZSiyVSpg6BYe3K/9o6ia74eLHsAz1wNys8gYtATP5 FQXeIAq4lwgJqk+OaJxdwGL3QUNtNSKZCXM/ERlNjCQwK2uhtMDP0OLLRjJZlGKuVj1hnL cht6RBFl+DXfeS/2gkLf8HlnPGpqJhn7ug81dI7tisdLBPbrQT/97Can3NmIRNlxmDvJFN M293Oragm40j5Z+kJIwciGGDa7zXb72SwR5k4HaypaA5v3sst3/KswdbN6TN+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638378609; a=rsa-sha256; cv=none; b=t1xDq+LdvOfyC+ZSkJjZ5CnyMVFGJAwiyDRmhkl+0OGmt2/jwHXshbxFM4cMgAZjytc/xy 6eN2nXimRpJqlr0bCAJ4Umlg8SDyBIiy0x4Jn9bZzFhauHAqFU3nIUxiOu9TqEhtYYlkbn cMEFHG4jCXBr/1eqPOgPAdIGAoaxln3Vvtx7pOYgH84/IHSQL6IWIakc/fDsKZoGPWHBZj xB9DTXypP3Ja9dBiWz4+ywGnaO8+AGh3t+DQOkpt5s0EmWS2pdQrR67Jazn0EOW6gMA9UN YT3OG6yRNSVgUN/y2hJo8Iztz6I0GTJZl1IBX72L89TAfISWiWUOVF4oIKqRwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=73ef1f7462e95f12747a6ff33c0cbb2bc4f848b7 commit 73ef1f7462e95f12747a6ff33c0cbb2bc4f848b7 Author: Kristof Provost AuthorDate: 2021-11-08 12:25:20 +0000 Commit: Kristof Provost CommitDate: 2021-12-01 12:43:25 +0000 pf: ensure we populate dyncnt/tblcnt in struct pf_addr_wrap PR: 259689 MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32892 (cherry picked from commit 218a8a491c4980dcc941908f9505d37e7f052868) --- lib/libpfctl/libpfctl.c | 10 ++++++++-- sys/netpfil/pf/pf_nv.c | 21 +++++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 96f5ea620f4d..6613708b183c 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -287,14 +287,20 @@ pfctl_nv_add_addr_wrap(nvlist_t *nvparent, const char *name, static void pf_nvaddr_wrap_to_addr_wrap(const nvlist_t *nvl, struct pf_addr_wrap *addr) { + bzero(addr, sizeof(*addr)); + addr->type = nvlist_get_number(nvl, "type"); addr->iflags = nvlist_get_number(nvl, "iflags"); - if (addr->type == PF_ADDR_DYNIFTL) + if (addr->type == PF_ADDR_DYNIFTL) { strlcpy(addr->v.ifname, nvlist_get_string(nvl, "ifname"), IFNAMSIZ); - if (addr->type == PF_ADDR_TABLE) + addr->p.dyncnt = nvlist_get_number(nvl, "dynctl"); + } + if (addr->type == PF_ADDR_TABLE) { strlcpy(addr->v.tblname, nvlist_get_string(nvl, "tblname"), PF_TABLE_NAME_SIZE); + addr->p.tblcnt = nvlist_get_number(nvl, "tblcnt"); + } pf_nvaddr_to_addr(nvlist_get_nvlist(nvl, "addr"), &addr->v.a.addr); pf_nvaddr_to_addr(nvlist_get_nvlist(nvl, "mask"), &addr->v.a.mask); diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c index b6676be645d7..573544972952 100644 --- a/sys/netpfil/pf/pf_nv.c +++ b/sys/netpfil/pf/pf_nv.c @@ -327,6 +327,8 @@ pf_addr_wrap_to_nvaddr_wrap(const struct pf_addr_wrap *addr) { nvlist_t *nvl; nvlist_t *tmp; + uint64_t num; + struct pfr_ktable *kt; nvl = nvlist_create(0); if (nvl == NULL) @@ -334,10 +336,25 @@ pf_addr_wrap_to_nvaddr_wrap(const struct pf_addr_wrap *addr) nvlist_add_number(nvl, "type", addr->type); nvlist_add_number(nvl, "iflags", addr->iflags); - if (addr->type == PF_ADDR_DYNIFTL) + if (addr->type == PF_ADDR_DYNIFTL) { nvlist_add_string(nvl, "ifname", addr->v.ifname); - if (addr->type == PF_ADDR_TABLE) + num = 0; + if (addr->p.dyn != NULL) + num = addr->p.dyn->pfid_acnt4 + + addr->p.dyn->pfid_acnt6; + nvlist_add_number(nvl, "dyncnt", num); + } + if (addr->type == PF_ADDR_TABLE) { nvlist_add_string(nvl, "tblname", addr->v.tblname); + num = -1; + kt = addr->p.tbl; + if ((kt->pfrkt_flags & PFR_TFLAG_ACTIVE) && + kt->pfrkt_root != NULL) + kt = kt->pfrkt_root; + if (kt->pfrkt_flags & PFR_TFLAG_ACTIVE) + num = kt->pfrkt_cnt; + nvlist_add_number(nvl, "tblcnt", num); + } tmp = pf_addr_to_nvaddr(&addr->v.a.addr); if (tmp == NULL) From nobody Wed Dec 1 17:10:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 402D518CB593; Wed, 1 Dec 2021 17:10: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 4J45Dy450Kz4dNB; Wed, 1 Dec 2021 17:10:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CE795B0F; Wed, 1 Dec 2021 17:10: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 1B1HA92Z017108; Wed, 1 Dec 2021 17:10:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1HA9k7017105; Wed, 1 Dec 2021 17:10:09 GMT (envelope-from git) Date: Wed, 1 Dec 2021 17:10:09 GMT Message-Id: <202112011710.1B1HA9k7017105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 407930b9f9bb - stable/12 - pf tests: Test PR259689 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 407930b9f9bbfc10164677ed0732e867a871a513 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638378610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=amtP3prWdg2fdioZLTDQLgJ701LUHtEDpO1TZdYdOlw=; b=Y6+kS+2G5EIUK3gU4qWvW+u2UozfOWzisXo9wbOjxj2dQDsw/QxmpJW8NDGiRzG8khLP6V eCR9cFCh/HuH6OGUiX9aqpIZDpmQgIakT37/7EWn5cmk40bLfGKGUrZKVRsj3bAPzgVGRd xneen5ulz50xdSJfACV27Ib9FEmu/T1cb2Np8pvQE9a1FLfdBQXgn2e7f1+8R37RmiD5ey 46O76gVk5EDi2YOJTU3bdJVnqi5gMKISxHmgqNcYYElkyUNTRWWl+fst9S6irdeWUAHV4V kJxQ04uMPNsltJCt6ejLLXL7MTwrr9YDcLl36AuB76s7oRbXz2XrdPSnaQP0KA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638378610; a=rsa-sha256; cv=none; b=petTMSinyuwSb5uYQSrLscfNrqldO8qs4SIXwrAANHTVpwxoDn8nWMiCJ2cbB0Iub0QMTK GgpLoo8WyZmpyB+/MYJ3aPHYw2sL79oglhjvHmS4gw89RCDgUHCQ+mW2Aoi/vaPsnyLVgJ XRRapVvKD9RXFegsFfpT03pAapnrC+oEH8mYCZkLzrYFH6/G3Tqnvd+BOAV9V5e41nMZ5+ ph6mfGU6ot2j5445TL6Y9Sx8kaAE9IqdzkOUCk3w1mxe/rfZYgsmxcRzgDbDaCfJelKfhF sSVys2nW6UMub8Ab+x3Dt8KX+4SZeO3cyzp/ywY/MdOsgBQKcfYo2A8HIEo9nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=407930b9f9bbfc10164677ed0732e867a871a513 commit 407930b9f9bbfc10164677ed0732e867a871a513 Author: Kristof Provost AuthorDate: 2021-11-08 12:28:43 +0000 Commit: Kristof Provost CommitDate: 2021-12-01 12:43:25 +0000 pf tests: Test PR259689 We didn't populate dyncnt/tblcnt, so `pfctl -sr -vv` might not have the table element count. PR: 259689 MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D32893 (cherry picked from commit 2de49deeca0b1377664dee2cd0a43ee7cf6b4bc4) --- lib/libpfctl/libpfctl.c | 2 +- tests/sys/netpfil/pf/table.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 6613708b183c..9252f64969bb 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -294,7 +294,7 @@ pf_nvaddr_wrap_to_addr_wrap(const nvlist_t *nvl, struct pf_addr_wrap *addr) if (addr->type == PF_ADDR_DYNIFTL) { strlcpy(addr->v.ifname, nvlist_get_string(nvl, "ifname"), IFNAMSIZ); - addr->p.dyncnt = nvlist_get_number(nvl, "dynctl"); + addr->p.dyncnt = nvlist_get_number(nvl, "dyncnt"); } if (addr->type == PF_ADDR_TABLE) { strlcpy(addr->v.tblname, nvlist_get_string(nvl, "tblname"), diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh index ff2a68b81224..41ff4e3da84e 100644 --- a/tests/sys/netpfil/pf/table.sh +++ b/tests/sys/netpfil/pf/table.sh @@ -214,6 +214,34 @@ automatic_cleanup() pft_cleanup } +atf_test_case "pr259689" "cleanup" +pr259689_head() +{ + atf_set descr 'Test PR 259689' + atf_set require.user root +} + +pr259689_body() +{ + pft_init + + vnet_mkjail alcatraz + jexec alcatraz pfctl -e + + pft_set_rules alcatraz \ + "pass in" \ + "block in inet from { 1.1.1.1, 1.1.1.2, 2.2.2.2, 2.2.2.3, 4.4.4.4, 4.4.4.5 }" + + atf_check -o match:'block drop in inet from <__automatic_.*:6> to any' \ + -e ignore \ + jexec alcatraz pfctl -sr -vv +} + +pr259689_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4_counters" @@ -221,4 +249,5 @@ atf_init_test_cases() atf_add_test_case "pr251414" atf_add_test_case "network" atf_add_test_case "automatic" + atf_add_test_case "pr259689" } From nobody Wed Dec 1 18:06:38 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6155C18BEA83; Wed, 1 Dec 2021 18:06: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 4J46V70khBz3Cwl; Wed, 1 Dec 2021 18:06:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5FFA66D1; Wed, 1 Dec 2021 18:06: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 1B1I6c7l094463; Wed, 1 Dec 2021 18:06:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1I6cQM094462; Wed, 1 Dec 2021 18:06:38 GMT (envelope-from git) Date: Wed, 1 Dec 2021 18:06:38 GMT Message-Id: <202112011806.1B1I6cQM094462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 94a72c5ac428 - main - amdtemp: Revert related part of "Make CPU children" commit. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94a72c5ac4285b2940e5d2c7e53d21c84023defc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638381999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=spnAlEvbmr93XjVwbcmxxtkxvGIm0luLg3vgsE/HKH4=; b=sEhXmzDC0FVgTF3k4DU9lLVqf9V/KohFmRs3klsvpqitJ1/OjnDuZ0IdayNKOVL887/D4v kOXVyjytsxMFA2hI1CsDSKacxxAlIXuFReaDcZhbkm9Cpg3mFNRM6iKDxKVloKVVWHF9yx arqJLdDq9Dmus3Jm33IBT+Q84wMItn4GnTq62wXwCo8PajWNtIeycmw9SecC6gA7hrhWEF 3d6KFYuSXcZvRRwlYpieix4tyVr8+W9L0QD4LuhVJro8wWbXbOPMqKGaU6AMwmJEI4fIbO JZ4pKWg3Vl8NTa1nKqRzkwHxX2aMwwQZW6wqqyelDbVR4DWB1sCZLqWIYfRKew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638381999; a=rsa-sha256; cv=none; b=xIIWsQte1BnfBS2rhSM9/aeGpU2lOyUSQAKVpjwdJn7rgcoGHAE29LOiKj2h7+mE8hMDzc RO7OkeT2KraBMth4f7A76aaw9TWaoYsHgHC4Z/VauMAvKjk3OVVhzKP5TopXTaYxSQcSnm SGnr8LXtYBWz3LKEAUXf3V1jmxQvXEAA/I9yg31SFxCgW+CfOUU0qdQvSyVZs+hsTUkCPs 3p37XcxaZhpRl9jpYpGQZ32/CX9LaybTOruajyYsl8k7muDFrF8usD7xB5C+vdAfbLXQqt 8hRPkuPsfOF5+zF3xzopbpUxxNjsJsKEUZDtV/OgP2HKrB+yTS1RfG/hnmdNzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=94a72c5ac4285b2940e5d2c7e53d21c84023defc commit 94a72c5ac4285b2940e5d2c7e53d21c84023defc Author: Alexander Motin AuthorDate: 2021-12-01 18:00:17 +0000 Commit: Alexander Motin CommitDate: 2021-12-01 18:04:31 +0000 amdtemp: Revert related part of "Make CPU children" commit. While it still looks like previous code worked by coincidence, this change broke things even more instead of fixing. Reported by: avg@ MFC after: 1 week --- sys/dev/amdtemp/amdtemp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c index c1d696d070a5..21227a47c513 100644 --- a/sys/dev/amdtemp/amdtemp.c +++ b/sys/dev/amdtemp/amdtemp.c @@ -263,8 +263,7 @@ amdtemp_identify(driver_t *driver, device_t parent) return; if (amdtemp_match(parent, NULL)) { - child = device_add_child(parent, "amdtemp", - device_get_unit(parent)); + child = device_add_child(parent, "amdtemp", -1); if (child == NULL) device_printf(parent, "add amdtemp child failed\n"); } From nobody Wed Dec 1 18:59:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 77D3018B6452; Wed, 1 Dec 2021 18:59: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 4J47fd0mS1z3kcL; Wed, 1 Dec 2021 18:59:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E9E9F7243; Wed, 1 Dec 2021 18:59: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 1B1Ix4qX060363; Wed, 1 Dec 2021 18:59:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Ix4lQ060362; Wed, 1 Dec 2021 18:59:04 GMT (envelope-from git) Date: Wed, 1 Dec 2021 18:59:04 GMT Message-Id: <202112011859.1B1Ix4lQ060362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: a027f2ab422c - stable/12 - mprutil: add big endian 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a027f2ab422c12f3f7bf9d1a519ada6b2b881e8a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638385145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ULjpM+ewMsqSM9ifvueYJ2FP8mDve+F26pROcbWtT0M=; b=WZdv8rpnPtX6BC6nNZlB1mAq+G1unquIIqXSGLfivXY1SkKtTSAgTc5bNAa+2Zn8ye2gBY Nj6eJ1chbYWjulzqFLU6XfsC4HoysBu4uqx32D+6NMqVa8E7VSijXK2Jqgo/PwADIYe9su gA/jQmG1sQDlVRJd4xPYX0qg3hDs/lwSMKPMBOmliGitHlrS++XsDLXnFvjHrapr0T2FOp bHtG0udxhQXwVwZF1QwAGnOohymGNiD/svwufmZVYicFG8BGfna7T2sp/U5K0wWFzu0ZHD gcdDN+cUSdIG/Re1ERn/Xb1MdVGv4qmGsWp2NQdZPYIjh17Jbsyy4cihD5zsrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638385145; a=rsa-sha256; cv=none; b=dVSWnaCLUfBqomj/oXeo3m2GfIJ4oahsgZu3F27YC5nu2P2K0MsB87rfFo9R+HxkkWnN/m 6zWiT++M+xTUItxdt4M5AV2Uss3grBmd7vJsVS17VRkrRAWrKMT+8vXKE/Ytllc93T1oZc QUvZdVikA+Li55U1oP0gUJzlTtR3Q6Y9gD/1l/FEsoek5htDfG39gG9yJk478yiJz2yzDF Th/mxxZx3EZKW2ag7yVOAhDC6oE96iYnoaZHCWkAgnsNzhvSxf2KhWL8WcSEnsvvAZUVzW Q2yH5qCVZy5QD5MPkGuBECRRheauwY2tUNw2O3IcOllbJgNd+krDj24bZEnKTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=a027f2ab422c12f3f7bf9d1a519ada6b2b881e8a commit a027f2ab422c12f3f7bf9d1a519ada6b2b881e8a Author: Alfredo Dal'Ava Junior AuthorDate: 2021-04-17 01:01:38 +0000 Commit: Alexander Motin CommitDate: 2021-12-01 18:24:28 +0000 mprutil: add big endian support This fix mprutil on big endian platforms, as follow up of D25785. Flash operations are still not working, such as MPI2_FUNCTION_FW_UPLOAD failing due to timeout. Firmware version used during tests: 16.00.01.00 Submitted by: Andre Fernando da Silva Reviewed by: luporl, Sreekanth Reddy (by e-mail) Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26040 (cherry picked from commit fc9780fd41e7b29db04e9cb843cb5034b88ae662) --- usr.sbin/mpsutil/mps_cmd.c | 61 +++++++++++++++++++++++++++++++++++--------- usr.sbin/mpsutil/mps_flash.c | 9 ++++--- usr.sbin/mpsutil/mps_show.c | 59 +++++++++++++++++++++--------------------- usr.sbin/mpsutil/mps_slot.c | 4 ++- usr.sbin/mpsutil/mpsutil.8 | 3 +++ 5 files changed, 90 insertions(+), 46 deletions(-) diff --git a/usr.sbin/mpsutil/mps_cmd.c b/usr.sbin/mpsutil/mps_cmd.c index edde180bf99d..51a0e77822d9 100644 --- a/usr.sbin/mpsutil/mps_cmd.c +++ b/usr.sbin/mpsutil/mps_cmd.c @@ -47,6 +47,7 @@ __RCSID("$FreeBSD$"); #endif #include #include +#include #include #include @@ -245,6 +246,8 @@ struct mprs_btdh_mapping { uint16_t Reserved; }; +static void adjust_iocfacts_endianness(MPI2_IOC_FACTS_REPLY *facts); + const char * mps_ioc_status(U16 IOCStatus) { @@ -300,7 +303,7 @@ mps_set_slot_status(int fd, U16 handle, U16 slot, U32 status) NULL, 0, NULL, 0, 30) != 0) return (errno); - if (!IOC_STATUS_SUCCESS(reply.IOCStatus)) + if (!IOC_STATUS_SUCCESS(le16toh(reply.IOCStatus))) return (EIO); return (0); } @@ -323,7 +326,7 @@ mps_read_config_page_header(int fd, U8 PageType, U8 PageNumber, U32 PageAddress, NULL, 0, NULL, 0, 30)) return (errno); - if (!IOC_STATUS_SUCCESS(reply.IOCStatus)) { + if (!IOC_STATUS_SUCCESS(le16toh(reply.IOCStatus))) { if (IOCStatus != NULL) *IOCStatus = reply.IOCStatus; return (EIO); @@ -346,15 +349,15 @@ mps_read_ext_config_page_header(int fd, U8 ExtPageType, U8 PageNumber, U32 PageA req.Header.PageType = MPI2_CONFIG_PAGETYPE_EXTENDED; req.ExtPageType = ExtPageType; req.Header.PageNumber = PageNumber; - req.PageAddress = PageAddress; + req.PageAddress = htole32(PageAddress); if (mps_pass_command(fd, &req, sizeof(req), &reply, sizeof(reply), NULL, 0, NULL, 0, 30)) return (errno); - if (!IOC_STATUS_SUCCESS(reply.IOCStatus)) { + if (!IOC_STATUS_SUCCESS(le16toh(reply.IOCStatus))) { if (IOCStatus != NULL) - *IOCStatus = reply.IOCStatus; + *IOCStatus = le16toh(reply.IOCStatus); return (EIO); } if ((header == NULL) || (ExtPageLength == NULL)) @@ -385,7 +388,7 @@ mps_read_config_page(int fd, U8 PageType, U8 PageNumber, U32 PageAddress, bzero(&req, sizeof(req)); req.Function = MPI2_FUNCTION_CONFIG; req.Action = MPI2_CONFIG_ACTION_PAGE_READ_CURRENT; - req.PageAddress = PageAddress; + req.PageAddress = htole32(PageAddress); req.Header = header; if (req.Header.PageLength == 0) req.Header.PageLength = 4; @@ -399,6 +402,7 @@ mps_read_config_page(int fd, U8 PageType, U8 PageNumber, U32 PageAddress, errno = error; return (NULL); } + reply.IOCStatus = le16toh(reply.IOCStatus); if (!IOC_STATUS_SUCCESS(reply.IOCStatus)) { if (IOCStatus != NULL) *IOCStatus = reply.IOCStatus; @@ -436,14 +440,14 @@ mps_read_extended_config_page(int fd, U8 ExtPageType, U8 PageVersion, bzero(&req, sizeof(req)); req.Function = MPI2_FUNCTION_CONFIG; req.Action = MPI2_CONFIG_ACTION_PAGE_READ_CURRENT; - req.PageAddress = PageAddress; + req.PageAddress = htole32(PageAddress); req.Header = header; if (pagelen == 0) - pagelen = 4; + pagelen = htole16(4); req.ExtPageLength = pagelen; req.ExtPageType = ExtPageType; - len = pagelen * 4; + len = le16toh(pagelen) * 4; buf = malloc(len); if (mps_pass_command(fd, &req, sizeof(req), &reply, sizeof(reply), buf, len, NULL, 0, 30)) { @@ -452,6 +456,7 @@ mps_read_extended_config_page(int fd, U8 ExtPageType, U8 PageVersion, errno = error; return (NULL); } + reply.IOCStatus = le16toh(reply.IOCStatus); if (!IOC_STATUS_SUCCESS(reply.IOCStatus)) { if (IOCStatus != NULL) *IOCStatus = reply.IOCStatus; @@ -475,7 +480,7 @@ mps_firmware_send(int fd, unsigned char *fw, uint32_t len, bool bios) bzero(&reply, sizeof(reply)); req.Function = MPI2_FUNCTION_FW_DOWNLOAD; req.ImageType = bios ? MPI2_FW_DOWNLOAD_ITYPE_BIOS : MPI2_FW_DOWNLOAD_ITYPE_FW; - req.TotalImageSize = len; + req.TotalImageSize = htole32(len); req.MsgFlags = MPI2_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT; if (mps_user_command(fd, &req, sizeof(req), &reply, sizeof(reply), @@ -506,7 +511,7 @@ mps_firmware_get(int fd, unsigned char **firmware, bool bios) return (-1); } - size = reply.ActualImageSize; + size = le32toh(reply.ActualImageSize); *firmware = calloc(size, sizeof(unsigned char)); if (*firmware == NULL) { warn("calloc"); @@ -575,6 +580,7 @@ mps_read_config_page(int fd, U8 PageType, U8 PageNumber, U32 PageAddress, errno = error; return (NULL); } + req.ioc_status = le16toh(req.ioc_status); if (!IOC_STATUS_SUCCESS(req.ioc_status)) { if (IOCStatus != NULL) *IOCStatus = req.ioc_status; @@ -602,9 +608,10 @@ mps_read_extended_config_page(int fd, U8 ExtPageType, U8 PageVersion, req.header.PageVersion = PageVersion; req.header.PageNumber = PageNumber; req.header.ExtPageType = ExtPageType; - req.page_address = PageAddress; + req.page_address = htole32(PageAddress); if (ioctl(fd, MPSIO_READ_EXT_CFG_HEADER, &req) < 0) return (NULL); + req.ioc_status = le16toh(req.ioc_status); if (!IOC_STATUS_SUCCESS(req.ioc_status)) { if (IOCStatus != NULL) *IOCStatus = req.ioc_status; @@ -624,6 +631,7 @@ mps_read_extended_config_page(int fd, U8 ExtPageType, U8 PageVersion, errno = error; return (NULL); } + req.ioc_status = le16toh(req.ioc_status); if (!IOC_STATUS_SUCCESS(req.ioc_status)) { if (IOCStatus != NULL) *IOCStatus = req.ioc_status; @@ -752,6 +760,35 @@ mps_get_iocfacts(int fd) errno = EINVAL; return (NULL); } + adjust_iocfacts_endianness(facts); return (facts); } +static void +adjust_iocfacts_endianness(MPI2_IOC_FACTS_REPLY *facts) +{ + facts->MsgVersion = le16toh(facts->MsgVersion); + facts->HeaderVersion = le16toh(facts->HeaderVersion); + facts->Reserved1 = le16toh(facts->Reserved1); + facts->IOCExceptions = le16toh(facts->IOCExceptions); + facts->IOCStatus = le16toh(facts->IOCStatus); + facts->IOCLogInfo = le32toh(facts->IOCLogInfo); + facts->RequestCredit = le16toh(facts->RequestCredit); + facts->ProductID = le16toh(facts->ProductID); + facts->IOCCapabilities = le32toh(facts->IOCCapabilities); + facts->IOCRequestFrameSize = + le16toh(facts->IOCRequestFrameSize); + facts->FWVersion.Word = le32toh(facts->FWVersion.Word); + facts->MaxInitiators = le16toh(facts->MaxInitiators); + facts->MaxTargets = le16toh(facts->MaxTargets); + facts->MaxSasExpanders = le16toh(facts->MaxSasExpanders); + facts->MaxEnclosures = le16toh(facts->MaxEnclosures); + facts->ProtocolFlags = le16toh(facts->ProtocolFlags); + facts->HighPriorityCredit = le16toh(facts->HighPriorityCredit); + facts->MaxReplyDescriptorPostQueueDepth = + le16toh(facts->MaxReplyDescriptorPostQueueDepth); + facts->MaxDevHandle = le16toh(facts->MaxDevHandle); + facts->MaxPersistentEntries = + le16toh(facts->MaxPersistentEntries); + facts->MinDevHandle = le16toh(facts->MinDevHandle); +} diff --git a/usr.sbin/mpsutil/mps_flash.c b/usr.sbin/mpsutil/mps_flash.c index 22beaae79bb0..a0cc4a877b7d 100644 --- a/usr.sbin/mpsutil/mps_flash.c +++ b/usr.sbin/mpsutil/mps_flash.c @@ -29,6 +29,7 @@ __RCSID("$FreeBSD$"); #include #include #include +#include #include #include @@ -203,21 +204,21 @@ flash_update(int argc, char **argv) } } else { fwheader = (MPI2_FW_IMAGE_HEADER *)mem; - if (fwheader->VendorID != MPI2_MFGPAGE_VENDORID_LSI) { + if (le16toh(fwheader->VendorID) != MPI2_MFGPAGE_VENDORID_LSI) { warnx("Invalid firmware:"); warnx(" Expected Vendor ID: %04x", MPI2_MFGPAGE_VENDORID_LSI); - warnx(" Image Vendor ID: %04x", fwheader->VendorID); + warnx(" Image Vendor ID: %04x", le16toh(fwheader->VendorID)); munmap(mem, st.st_size); close(fd); free(facts); return (1); } - if (fwheader->ProductID != facts->ProductID) { + if (le16toh(fwheader->ProductID) != facts->ProductID) { warnx("Invalid image:"); warnx(" Expected Product ID: %04x", facts->ProductID); - warnx(" Image Product ID: %04x", fwheader->ProductID); + warnx(" Image Product ID: %04x", le16toh(fwheader->ProductID)); munmap(mem, st.st_size); close(fd); free(facts); diff --git a/usr.sbin/mpsutil/mps_show.c b/usr.sbin/mpsutil/mps_show.c index 814b22ab6f69..3985b3558a90 100644 --- a/usr.sbin/mpsutil/mps_show.c +++ b/usr.sbin/mpsutil/mps_show.c @@ -36,6 +36,7 @@ __RCSID("$FreeBSD$"); #include #include +#include #include #include #include @@ -111,7 +112,7 @@ show_adapter(int ac, char **av) warn("Failed to get BIOS page 3 info"); return (error); } - v = bios3->BiosVersion; + v = le32toh(bios3->BiosVersion); printf(" BIOS Revision: %d.%02d.%02d.%02d\n", ((v & 0xff000000) >> 24), ((v &0xff0000) >> 16), ((v & 0xff00) >> 8), (v & 0xff)); @@ -206,12 +207,12 @@ show_adapter(int ac, char **av) minspeed = get_device_speed(phy1->MaxMinLinkRate); maxspeed = get_device_speed(phy1->MaxMinLinkRate >> 4); - type = get_device_type(phy0->ControllerPhyDeviceInfo); + type = get_device_type(le32toh(phy0->ControllerPhyDeviceInfo)); - if (phy0->AttachedDevHandle != 0) { - snprintf(devhandle, 5, "%04x", phy0->AttachedDevHandle); + if (le16toh(phy0->AttachedDevHandle) != 0) { + snprintf(devhandle, 5, "%04x", le16toh(phy0->AttachedDevHandle)); snprintf(ctrlhandle, 5, "%04x", - phy0->ControllerDevHandle); + le16toh(phy0->ControllerDevHandle)); speed = get_device_speed(phy0->NegotiatedLinkRate); } else { snprintf(devhandle, 5, " "); @@ -545,7 +546,7 @@ show_devices(int ac, char **av) close(fd); return (error); } - handle = device->DevHandle; + handle = le16toh(device->DevHandle); if (device->ParentDevHandle == 0x0) { free(device); @@ -564,7 +565,7 @@ show_devices(int ac, char **av) else snprintf(bt, sizeof(bt), "%02d %02d", bus, target); - type = get_device_type(device->DeviceInfo); + type = get_device_type(le32toh(device->DeviceInfo)); if (device->PhyNum < nphys) { phydata = &sas0->PhyData[device->PhyNum]; @@ -576,7 +577,7 @@ show_devices(int ac, char **av) MPI2_SAS_EXPAND_PGAD_FORM_HNDL_PHY_NUM | (device->PhyNum << MPI2_SAS_EXPAND_PGAD_PHYNUM_SHIFT) | - device->ParentDevHandle, &IOCStatus); + le16toh(device->ParentDevHandle), &IOCStatus); if (exp1 == NULL) { if (IOCStatus != MPI2_IOCSTATUS_CONFIG_INVALID_PAGE) { error = errno; @@ -595,19 +596,19 @@ show_devices(int ac, char **av) speed = " "; if (device->EnclosureHandle != 0) { - snprintf(enchandle, 5, "%04x", device->EnclosureHandle); - snprintf(slot, 3, "%02d", device->Slot); + snprintf(enchandle, 5, "%04x", le16toh(device->EnclosureHandle)); + snprintf(slot, 3, "%02d", le16toh(device->Slot)); } else { snprintf(enchandle, 5, " "); snprintf(slot, 3, " "); } printf("%-10s", bt); - snprintf(buf, sizeof(buf), "%08x%08x", device->SASAddress.High, - device->SASAddress.Low); + snprintf(buf, sizeof(buf), "%08x%08x", le32toh(device->SASAddress.High), + le32toh(device->SASAddress.Low)); printf("%-17s", buf); - snprintf(buf, sizeof(buf), "%04x", device->DevHandle); + snprintf(buf, sizeof(buf), "%04x", le16toh(device->DevHandle)); printf("%-8s", buf); - snprintf(buf, sizeof(buf), "%04x", device->ParentDevHandle); + snprintf(buf, sizeof(buf), "%04x", le16toh(device->ParentDevHandle)); printf("%-10s", buf); printf("%-14s%-6s%-5s%-6s%d\n", type, speed, enchandle, slot, device->MaxPortConnections); @@ -651,16 +652,16 @@ show_enclosures(int ac, char **av) close(fd); return (error); } - type = get_enc_type(enc->Flags, &issep); + type = get_enc_type(le16toh(enc->Flags), &issep); if (issep == 0) snprintf(sepstr, 5, " "); else - snprintf(sepstr, 5, "%04x", enc->SEPDevHandle); + snprintf(sepstr, 5, "%04x", le16toh(enc->SEPDevHandle)); printf(" %.2d %08x%08x %s %04x %s\n", - enc->NumSlots, enc->EnclosureLogicalID.High, - enc->EnclosureLogicalID.Low, sepstr, enc->EnclosureHandle, + le16toh(enc->NumSlots), le32toh(enc->EnclosureLogicalID.High), + le32toh(enc->EnclosureLogicalID.Low), sepstr, le16toh(enc->EnclosureHandle), type); - handle = enc->EnclosureHandle; + handle = le16toh(enc->EnclosureHandle); free(enc); } printf("\n"); @@ -704,19 +705,19 @@ show_expanders(int ac, char **av) } nphys = exp0->NumPhys; - handle = exp0->DevHandle; + handle = le16toh(exp0->DevHandle); if (exp0->EnclosureHandle == 0x00) snprintf(enchandle, 5, " "); else - snprintf(enchandle, 5, "%04d", exp0->EnclosureHandle); + snprintf(enchandle, 5, "%04d", le16toh(exp0->EnclosureHandle)); if (exp0->ParentDevHandle == 0x0) snprintf(parent, 5, " "); else - snprintf(parent, 5, "%04x", exp0->ParentDevHandle); + snprintf(parent, 5, "%04x", le16toh(exp0->ParentDevHandle)); printf(" %02d %08x%08x %04x %s %s %d\n", - exp0->NumPhys, exp0->SASAddress.High, exp0->SASAddress.Low, - exp0->DevHandle, parent, enchandle, exp0->SASLevel); + exp0->NumPhys, le32toh(exp0->SASAddress.High), le32toh(exp0->SASAddress.Low), + le16toh(exp0->DevHandle), parent, enchandle, exp0->SASLevel); printf("\n"); printf(" Phy RemotePhy DevHandle Speed Min Max Device\n"); @@ -733,8 +734,8 @@ show_expanders(int ac, char **av) warn("Error retrieving expander pg 1"); continue; } - type = get_device_type(exp1->AttachedDeviceInfo); - if ((exp1->AttachedDeviceInfo &0x7) == 0) { + type = get_device_type(le32toh(exp1->AttachedDeviceInfo)); + if ((le32toh(exp1->AttachedDeviceInfo) &0x7) == 0) { speed = " "; snprintf(rphy, 3, " "); snprintf(rhandle, 5, " "); @@ -744,7 +745,7 @@ show_expanders(int ac, char **av) snprintf(rphy, 3, "%02d", exp1->AttachedPhyIdentifier); snprintf(rhandle, 5, "%04x", - exp1->AttachedDevHandle); + le16toh(exp1->AttachedDevHandle)); } min = get_device_speed(exp1->HwLinkRate); max = get_device_speed(exp1->HwLinkRate >> 4); @@ -787,7 +788,7 @@ show_cfgpage(int ac, char **av) switch (ac) { case 4: - addr = (uint32_t)strtoul(av[3], NULL, 0); + addr = htole32((uint32_t)strtoul(av[3], NULL, 0)); case 3: num = (uint8_t)strtoul(av[2], NULL, 0); case 2: @@ -814,7 +815,7 @@ show_cfgpage(int ac, char **av) if (page >= 0x10) { ehdr = data; - len = ehdr->ExtPageLength * 4; + len = le16toh(ehdr->ExtPageLength) * 4; page = ehdr->ExtPageType; attrs = ehdr->PageType >> 4; } else { diff --git a/usr.sbin/mpsutil/mps_slot.c b/usr.sbin/mpsutil/mps_slot.c index 1879d699067a..bb4a7324c461 100644 --- a/usr.sbin/mpsutil/mps_slot.c +++ b/usr.sbin/mpsutil/mps_slot.c @@ -31,6 +31,7 @@ __RCSID("$FreeBSD$"); #include #include #include +#include #include #include @@ -99,7 +100,8 @@ slot_set(int argc, char **argv) return (error); } - if (mps_set_slot_status(fd, handle, slot, status) != 0) { + if (mps_set_slot_status(fd, htole16(handle), htole16(slot), + htole32(status)) != 0) { warnx("Failed to set status"); close(fd); return (1); diff --git a/usr.sbin/mpsutil/mpsutil.8 b/usr.sbin/mpsutil/mpsutil.8 index 7bd6728d49de..e7c2fda8f84e 100644 --- a/usr.sbin/mpsutil/mpsutil.8 +++ b/usr.sbin/mpsutil/mpsutil.8 @@ -169,3 +169,6 @@ The .Nm utility first appeared in .Fx 11.0 . +.Sh TODO +Flash operations (save/update) are not supported on big-endian architectures. +.Pp From nobody Wed Dec 1 18:59:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D6C1318B675C; Wed, 1 Dec 2021 18:59: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 4J47ff1HNTz3kT3; Wed, 1 Dec 2021 18:59:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 079DD71A3; Wed, 1 Dec 2021 18:59: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 1B1Ix5Iv060390; Wed, 1 Dec 2021 18:59:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Ix5J5060389; Wed, 1 Dec 2021 18:59:05 GMT (envelope-from git) Date: Wed, 1 Dec 2021 18:59:05 GMT Message-Id: <202112011859.1B1Ix5J5060389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 6cc44223cb67 - stable/12 - mpr: big-endian 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6cc44223cb6717795afdac4348bbe7e2a968a07d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638385146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGV85kDxAIFhW/TYsLYDmD+eRxpPmwDVnqvM4fAHDzk=; b=k4k2F0IsKJb8g0YKqLCL9YRUVOK1y66kll++AfEAq9wQQPzh2gZ9ZO6+TkuMHe50uWiD9n JK0at8IAY1i6GstLS/6oGaC3MxAw4FsI/i5K6fubhv2HHDQNHjeSfSzWHaMtIQqFEainYM +GpAaQcRcc5r2jF9XWOmLKrsfclHQ4cNZHS9rlTp1ZH8VAeGPlQ0NBb1KdYbw93RyahV12 377CMsuoP/dRyJ/VZNPjKmTeCtungvun8iyUAvjYV4BwYjU6jxHuRqZ+ytnTov/bSxIwuL bdqNJFT3+YwaDsEv8Uj2FOCk/UW1j/0AW02NinB/31dIvFdzJaFKwmG+1qZa1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638385146; a=rsa-sha256; cv=none; b=dKVLFgSUx2SXhNYorcu30ruH7C4nk2JOgxXKBVUhHbbiniIQlFz+0I0+qv+XIsNSV2gMcN dKROdhg0aoDUQlLMVP0yIPstK+VgEeXjZ21M1n3nmhxeyQ0O/7tz7CGhzXc6TGeI9JF4qe Nh3oSaec8gT5NweO1r5dauIW8OhS/5+SCp7gSSQCryReQ2GwznRlL/CvXuInZhEGSZpL5f zNvFEx7yAoH+0GMKk90G0Oo9MRD21hS9EVHW3yJrMKCNiK7ilI/sojM9p1qWpuWhey+ui3 hZEeuSPm24sg1JFHkD1olW2n4DAKv4RLUo8ST/etWtCZQT/o4T8DVH9Djl/m8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=6cc44223cb6717795afdac4348bbe7e2a968a07d commit 6cc44223cb6717795afdac4348bbe7e2a968a07d Author: Alfredo Dal'Ava Junior AuthorDate: 2021-03-02 14:05:15 +0000 Commit: Alexander Motin CommitDate: 2021-12-01 18:42:58 +0000 mpr: big-endian support This fixes mpr driver on big-endian devices. Tested on powerpc64 and powerpc64le targets using a SAS9300-8i card (LSISAS3008 pci vendor=0x1000 device=0x0097) Submitted by: Andre Fernando da Silva Reviewed by: luporl, alfredo, Sreekanth Reddy (by email) Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25785 (cherry picked from commit 71900a794da046ad5322caae2774aed5b3d361b9) --- sys/dev/mpr/mpr.c | 75 ++++++++++++++++++++++++++++++++++------------- sys/dev/mpr/mpr_config.c | 16 +++++----- sys/dev/mpr/mpr_mapping.c | 4 +-- sys/dev/mpr/mpr_sas.c | 14 +++++---- sys/dev/mpr/mpr_sas_lsi.c | 21 +++++++------ sys/dev/mpr/mpr_table.c | 66 ++++++++++++++++++++--------------------- sys/dev/mpr/mprvar.h | 4 +++ 7 files changed, 119 insertions(+), 81 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 18300fedec6b..6e52efe0d8a4 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -111,6 +111,7 @@ static int mpr_wait_db_ack(struct mpr_softc *sc, int timeout, int sleep_flag); static int mpr_debug_sysctl(SYSCTL_HANDLER_ARGS); static int mpr_dump_reqs(SYSCTL_HANDLER_ARGS); static void mpr_parse_debug(struct mpr_softc *sc, char *list); +static void adjust_iocfacts_endianness(MPI2_IOC_FACTS_REPLY *facts); SYSCTL_NODE(_hw, OID_AUTO, mpr, CTLFLAG_RD, 0, "MPR Driver Parameters"); @@ -416,7 +417,7 @@ mpr_resize_queues(struct mpr_softc *sc) * the size of an IEEE Simple SGE. */ if (sc->facts->MsgVersion >= MPI2_VERSION_02_05) { - chain_seg_size = htole16(sc->facts->IOCMaxChainSegmentSize); + chain_seg_size = sc->facts->IOCMaxChainSegmentSize; if (chain_seg_size == 0) chain_seg_size = MPR_DEFAULT_CHAIN_SEG_SIZE; sc->chain_frame_size = chain_seg_size * @@ -1055,15 +1056,21 @@ mpr_request_sync(struct mpr_softc *sc, void *req, MPI2_DEFAULT_REPLY *reply, mpr_dprint(sc, MPR_FAULT, "Timeout reading doorbell 0\n"); return (ENXIO); } + + /* + * If in a BE platform, swap bytes using le16toh to not + * disturb 8 bit field neighbors in destination structure + * pointed by data16. + */ data16[0] = - mpr_regread(sc, MPI2_DOORBELL_OFFSET) & MPI2_DOORBELL_DATA_MASK; + le16toh(mpr_regread(sc, MPI2_DOORBELL_OFFSET)) & MPI2_DOORBELL_DATA_MASK; mpr_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); if (mpr_wait_db_int(sc) != 0) { mpr_dprint(sc, MPR_FAULT, "Timeout reading doorbell 1\n"); return (ENXIO); } data16[1] = - mpr_regread(sc, MPI2_DOORBELL_OFFSET) & MPI2_DOORBELL_DATA_MASK; + le16toh(mpr_regread(sc, MPI2_DOORBELL_OFFSET)) & MPI2_DOORBELL_DATA_MASK; mpr_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); /* Number of 32bit words in the message */ @@ -1088,7 +1095,7 @@ mpr_request_sync(struct mpr_softc *sc, void *req, MPI2_DEFAULT_REPLY *reply, "Timeout reading doorbell %d\n", i); return (ENXIO); } - data16[i] = mpr_regread(sc, MPI2_DOORBELL_OFFSET) & + data16[i] = le16toh(mpr_regread(sc, MPI2_DOORBELL_OFFSET)) & MPI2_DOORBELL_DATA_MASK; mpr_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); } @@ -1143,9 +1150,8 @@ mpr_enqueue_request(struct mpr_softc *sc, struct mpr_command *cm) mpr_regwrite(sc, MPI26_ATOMIC_REQUEST_DESCRIPTOR_POST_OFFSET, rd.u.low); } else { - rd.u.low = cm->cm_desc.Words.Low; - rd.u.high = cm->cm_desc.Words.High; - rd.word = htole64(rd.word); + rd.u.low = htole32(cm->cm_desc.Words.Low); + rd.u.high = htole32(cm->cm_desc.Words.High); mpr_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_LOW_OFFSET, rd.u.low); mpr_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_HIGH_OFFSET, @@ -1153,6 +1159,36 @@ mpr_enqueue_request(struct mpr_softc *sc, struct mpr_command *cm) } } +/* + * Ioc facts are read in 16 bit words and and stored with le16toh, + * this takes care of proper U8 fields endianness in + * MPI2_IOC_FACTS_REPLY, but we still need to swap back U16 fields. + */ +static void +adjust_iocfacts_endianness(MPI2_IOC_FACTS_REPLY *facts) +{ + facts->HeaderVersion = le16toh(facts->HeaderVersion); + facts->Reserved1 = le16toh(facts->Reserved1); + facts->IOCExceptions = le16toh(facts->IOCExceptions); + facts->IOCStatus = le16toh(facts->IOCStatus); + facts->IOCLogInfo = le32toh(facts->IOCLogInfo); + facts->RequestCredit = le16toh(facts->RequestCredit); + facts->ProductID = le16toh(facts->ProductID); + facts->IOCCapabilities = le32toh(facts->IOCCapabilities); + facts->IOCRequestFrameSize = le16toh(facts->IOCRequestFrameSize); + facts->IOCMaxChainSegmentSize = le16toh(facts->IOCMaxChainSegmentSize); + facts->MaxInitiators = le16toh(facts->MaxInitiators); + facts->MaxTargets = le16toh(facts->MaxTargets); + facts->MaxSasExpanders = le16toh(facts->MaxSasExpanders); + facts->MaxEnclosures = le16toh(facts->MaxEnclosures); + facts->ProtocolFlags = le16toh(facts->ProtocolFlags); + facts->HighPriorityCredit = le16toh(facts->HighPriorityCredit); + facts->MaxReplyDescriptorPostQueueDepth = le16toh(facts->MaxReplyDescriptorPostQueueDepth); + facts->MaxDevHandle = le16toh(facts->MaxDevHandle); + facts->MaxPersistentEntries = le16toh(facts->MaxPersistentEntries); + facts->MinDevHandle = le16toh(facts->MinDevHandle); +} + /* * Just the FACTS, ma'am. */ @@ -1174,6 +1210,9 @@ mpr_get_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) request.Function = MPI2_FUNCTION_IOC_FACTS; error = mpr_request_sync(sc, &request, reply, req_sz, reply_sz, 5); + adjust_iocfacts_endianness(facts); + mpr_dprint(sc, MPR_TRACE, "facts->IOCCapabilities 0x%x\n", facts->IOCCapabilities); + mpr_dprint(sc, MPR_INIT, "%s exit, error= %d\n", __func__, error); return (error); } @@ -1232,10 +1271,10 @@ mpr_send_iocinit(struct mpr_softc *sc) init.HostPageSize = HOST_PAGE_SIZE_4K; error = mpr_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); - if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) + if ((le16toh(reply.IOCStatus) & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) error = ENXIO; - mpr_dprint(sc, MPR_INIT, "IOCInit status= 0x%x\n", reply.IOCStatus); + mpr_dprint(sc, MPR_INIT, "IOCInit status= 0x%x\n", le16toh(reply.IOCStatus)); mpr_dprint(sc, MPR_INIT, "%s exit\n", __func__); return (error); } @@ -1568,7 +1607,7 @@ mpr_alloc_requests(struct mpr_softc *sc) cm->cm_req_busaddr = sc->req_busaddr + i * sc->reqframesz; cm->cm_sense = &sc->sense_frames[i]; cm->cm_sense_busaddr = sc->sense_busaddr + i * MPR_SENSE_LEN; - cm->cm_desc.Default.SMID = i; + cm->cm_desc.Default.SMID = htole16(i); cm->cm_sc = sc; cm->cm_state = MPR_CM_STATE_BUSY; TAILQ_INIT(&cm->cm_chain_list); @@ -1691,7 +1730,7 @@ mpr_init_queues(struct mpr_softc *sc) * Initialize all of the free queue entries. */ for (i = 0; i < sc->fqdepth; i++) { - sc->free_queue[i] = sc->reply_busaddr + (i * sc->replyframesz); + sc->free_queue[i] = htole32(sc->reply_busaddr + (i * sc->replyframesz)); } sc->replyfreeindex = sc->num_replies; @@ -2756,7 +2795,8 @@ mpr_update_events(struct mpr_softc *sc, struct mpr_event_handle *handle, bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -2810,7 +2850,8 @@ mpr_reregister_events(struct mpr_softc *sc) bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -3483,8 +3524,6 @@ mpr_push_sge(struct mpr_command *cm, MPI2_SGE_SIMPLE64 *sge, size_t len, /* Endian Safe code */ sge_flags = sge->FlagsLength; sge->FlagsLength = htole32(sge_flags); - sge->Address.High = htole32(sge->Address.High); - sge->Address.Low = htole32(sge->Address.Low); bcopy(sge, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); } @@ -3511,8 +3550,6 @@ mpr_push_sge(struct mpr_command *cm, MPI2_SGE_SIMPLE64 *sge, size_t len, /* Endian Safe code */ sge_flags = sge->FlagsLength; sge->FlagsLength = htole32(sge_flags); - sge->Address.High = htole32(sge->Address.High); - sge->Address.Low = htole32(sge->Address.Low); bcopy(sge, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); return (0); @@ -3571,8 +3608,6 @@ mpr_push_ieee_sge(struct mpr_command *cm, void *sgep, int segsleft) /* Endian Safe code */ sge_length = sge->Length; sge->Length = htole32(sge_length); - sge->Address.High = htole32(sge->Address.High); - sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, ieee_sge_size); cm->cm_sge = (MPI25_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + @@ -3590,8 +3625,6 @@ mpr_push_ieee_sge(struct mpr_command *cm, void *sgep, int segsleft) /* Endian Safe code */ sge_length = sge->Length; sge->Length = htole32(sge_length); - sge->Address.High = htole32(sge->Address.High); - sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, ieee_sge_size); cm->cm_sge = (MPI25_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + ieee_sge_size); diff --git a/sys/dev/mpr/mpr_config.c b/sys/dev/mpr/mpr_config.c index 80c8a189b433..96b6031a534b 100644 --- a/sys/dev/mpr/mpr_config.c +++ b/sys/dev/mpr/mpr_config.c @@ -142,7 +142,7 @@ mpr_config_get_ioc_pg8(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->Header.PageNumber = 8; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->Header.PageLength = mpi_reply->Header.PageLength; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -274,7 +274,7 @@ mpr_config_get_iounit_pg8(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->Header.PageNumber = 8; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->Header.PageLength = mpi_reply->Header.PageLength; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -406,7 +406,7 @@ mpr_config_get_man_pg11(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->Header.PageNumber = 11; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->Header.PageLength = mpi_reply->Header.PageLength; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -602,7 +602,7 @@ mpr_config_get_dpm_pg0(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->PageAddress = sc->max_dpm_entries << MPI2_DPM_PGAD_ENTRY_COUNT_SHIFT; request->ExtPageLength = mpi_reply->ExtPageLength; - cm->cm_length = le16toh(request->ExtPageLength) * 4; + cm->cm_length = le16toh(request->ExtPageLength) * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -1282,7 +1282,7 @@ mpr_config_get_bios_pg3(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->Header.PageNumber = 3; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->Header.PageLength = mpi_reply->Header.PageLength; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -1414,7 +1414,7 @@ mpr_config_get_raid_volume_pg0(struct mpr_softc *sc, Mpi2ConfigReply_t request->Header.PageLength = mpi_reply->Header.PageLength; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->PageAddress = page_address; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -1546,7 +1546,7 @@ mpr_config_get_raid_volume_pg1(struct mpr_softc *sc, Mpi2ConfigReply_t request->Header.PageLength = mpi_reply->Header.PageLength; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->PageAddress = htole32(form | handle); - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -1704,7 +1704,7 @@ mpr_config_get_raid_pd_pg0(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->Header.PageLength = mpi_reply->Header.PageLength; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->PageAddress = page_address; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; diff --git a/sys/dev/mpr/mpr_mapping.c b/sys/dev/mpr/mpr_mapping.c index 47d82063c128..9af67b6250f3 100644 --- a/sys/dev/mpr/mpr_mapping.c +++ b/sys/dev/mpr/mpr_mapping.c @@ -2572,7 +2572,7 @@ mpr_mapping_initialize(struct mpr_softc *sc) sc->pending_map_events = 0; sc->num_enc_table_entries = 0; sc->num_rsvd_entries = 0; - sc->max_dpm_entries = sc->ioc_pg8.MaxPersistentEntries; + sc->max_dpm_entries = le16toh(sc->ioc_pg8.MaxPersistentEntries); sc->is_dpm_enable = (sc->max_dpm_entries) ? 1 : 0; sc->track_mapping_events = 0; @@ -2586,7 +2586,7 @@ mpr_mapping_initialize(struct mpr_softc *sc) if (ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_RESERVED_TARGETID_0) sc->num_rsvd_entries = 1; - volume_mapping_flags = sc->ioc_pg8.IRVolumeMappingFlags & + volume_mapping_flags = le16toh(sc->ioc_pg8.IRVolumeMappingFlags) & MPI2_IOCPAGE8_IRFLAGS_MASK_VOLUME_MAPPING_MODE; if (sc->ir_firmware && (volume_mapping_flags == MPI2_IOCPAGE8_IRFLAGS_LOW_VOLUME_MAPPING)) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index d3147a7e3f4d..2fb20ebcd9d7 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -2130,7 +2130,7 @@ mprsas_action_scsiio(struct mprsas_softc *sassc, union ccb *ccb) } if ((lun != NULL) && (lun->eedp_formatted)) { - req->EEDPBlockSize = htole16(lun->eedp_block_size); + req->EEDPBlockSize = htole32(lun->eedp_block_size); eedp_flags |= (MPI2_SCSIIO_EEDPFLAGS_INC_PRI_REFTAG | MPI2_SCSIIO_EEDPFLAGS_CHECK_REFTAG | MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD); @@ -2501,10 +2501,6 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm) target_id_t target_id; MPR_FUNCTRACE(sc); - mpr_dprint(sc, MPR_TRACE, - "cm %p SMID %u ccb %p reply %p outstanding %u\n", cm, - cm->cm_desc.Default.SMID, cm->cm_ccb, cm->cm_reply, - cm->cm_targ->outstanding); callout_stop(&cm->cm_callout); mtx_assert(&sc->mpr_mtx, MA_OWNED); @@ -2514,6 +2510,12 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm) csio = &ccb->csio; target_id = csio->ccb_h.target_id; rep = (MPI2_SCSI_IO_REPLY *)cm->cm_reply; + mpr_dprint(sc, MPR_TRACE, + "cm %p SMID %u ccb %p reply %p outstanding %u csio->scsi_status 0x%x," + "csio->dxfer_len 0x%x, csio->msg_le 0x%xn\n", cm, + cm->cm_desc.Default.SMID, cm->cm_ccb, cm->cm_reply, + cm->cm_targ->outstanding, csio->scsi_status, + csio->dxfer_len, csio->msg_len); /* * XXX KDM if the chain allocation fails, does it matter if we do * the sync and unload here? It is simpler to do it in every case, @@ -3892,7 +3894,7 @@ mprsas_portenable_complete(struct mpr_softc *sc, struct mpr_command *cm) reply = (MPI2_PORT_ENABLE_REPLY *)cm->cm_reply; if (reply == NULL) mpr_dprint(sc, MPR_FAULT, "Portenable NULL reply\n"); - else if (le16toh(reply->IOCStatus & MPI2_IOCSTATUS_MASK) != + else if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) mpr_dprint(sc, MPR_FAULT, "Portenable failed\n"); diff --git a/sys/dev/mpr/mpr_sas_lsi.c b/sys/dev/mpr/mpr_sas_lsi.c index 5e7da7d2e096..7bb72509e67e 100644 --- a/sys/dev/mpr/mpr_sas_lsi.c +++ b/sys/dev/mpr/mpr_sas_lsi.c @@ -160,11 +160,11 @@ mprsas_evt_handler(struct mpr_softc *sc, uintptr_t data, } bcopy(event->EventData, fw_event->event_data, sz); - fw_event->event = event->Event; - if ((event->Event == MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST || - event->Event == MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST || - event->Event == MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE || - event->Event == MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST) && + fw_event->event = le16toh(event->Event); + if ((fw_event->event == MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST || + fw_event->event == MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST || + fw_event->event == MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE || + fw_event->event == MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST) && sc->track_mapping_events) sc->pending_map_events++; @@ -173,9 +173,9 @@ mprsas_evt_handler(struct mpr_softc *sc, uintptr_t data, * are processed. Increment the startup_refcount and decrement it after * events are processed. */ - if ((event->Event == MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST || - event->Event == MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST || - event->Event == MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST) && + if ((fw_event->event == MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST || + fw_event->event == MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST || + fw_event->event == MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST) && sc->wait_for_port_enable) mprsas_startup_increment(sc->sassc); @@ -868,9 +868,8 @@ mprsas_add_device(struct mpr_softc *sc, u16 handle, u8 linkrate) parent_devinfo = le32toh(parent_config_page.DeviceInfo); } } - /* TODO Check proper endianness */ - sas_address = config_page.SASAddress.High; - sas_address = (sas_address << 32) | config_page.SASAddress.Low; + sas_address = htole32(config_page.SASAddress.High); + sas_address = (sas_address << 32) | htole32(config_page.SASAddress.Low); mpr_dprint(sc, MPR_MAPPING, "Handle 0x%04x SAS Address from SAS device " "page0 = %jx\n", handle, sas_address); diff --git a/sys/dev/mpr/mpr_table.c b/sys/dev/mpr/mpr_table.c index a1bddf1a3065..79088fe8204e 100644 --- a/sys/dev/mpr/mpr_table.c +++ b/sys/dev/mpr/mpr_table.c @@ -316,7 +316,7 @@ mpr_print_portfacts(struct mpr_softc *sc, MPI2_PORT_FACTS_REPLY *facts) MPR_PRINTFIELD_START(sc, "PortFacts"); MPR_PRINTFIELD(sc, facts, PortNumber, %d); MPR_PRINTFIELD(sc, facts, PortType, 0x%x); - MPR_PRINTFIELD(sc, facts, MaxPostedCmdBuffers, %d); + MPR_PRINTFIELD_16(sc, facts, MaxPostedCmdBuffers, %d); } void @@ -324,33 +324,33 @@ mpr_print_evt_generic(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event { MPR_PRINTFIELD_START(sc, "EventReply"); - MPR_PRINTFIELD(sc, event, EventDataLength, %d); + MPR_PRINTFIELD_16(sc, event, EventDataLength, %d); MPR_PRINTFIELD(sc, event, AckRequired, %d); mpr_print_field(sc, "Event: %s (0x%x)\n", - mpr_describe_table(mpr_event_names, event->Event), event->Event); - MPR_PRINTFIELD(sc, event, EventContext, 0x%x); + mpr_describe_table(mpr_event_names, le16toh(event->Event)), le16toh(event->Event)); + MPR_PRINTFIELD_32(sc, event, EventContext, 0x%x); } void mpr_print_sasdev0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) { MPR_PRINTFIELD_START(sc, "SAS Device Page 0"); - MPR_PRINTFIELD(sc, buf, Slot, %d); - MPR_PRINTFIELD(sc, buf, EnclosureHandle, 0x%x); + MPR_PRINTFIELD_16(sc, buf, Slot, %d); + MPR_PRINTFIELD_16(sc, buf, EnclosureHandle, 0x%x); mpr_print_field(sc, "SASAddress: 0x%jx\n", mpr_to_u64(&buf->SASAddress)); - MPR_PRINTFIELD(sc, buf, ParentDevHandle, 0x%x); + MPR_PRINTFIELD_16(sc, buf, ParentDevHandle, 0x%x); MPR_PRINTFIELD(sc, buf, PhyNum, %d); MPR_PRINTFIELD(sc, buf, AccessStatus, 0x%x); - MPR_PRINTFIELD(sc, buf, DevHandle, 0x%x); + MPR_PRINTFIELD_16(sc, buf, DevHandle, 0x%x); MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, 0x%x); MPR_PRINTFIELD(sc, buf, ZoneGroup, %d); - mpr_print_field(sc, "DeviceInfo: %b,%s\n", buf->DeviceInfo, + mpr_print_field(sc, "DeviceInfo: %b,%s\n", le32toh(buf->DeviceInfo), "\20" "\4SataHost" "\5SmpInit" "\6StpInit" "\7SspInit" "\10SataDev" "\11SmpTarg" "\12StpTarg" "\13SspTarg" "\14Direct" "\15LsiDev" "\16AtapiDev" "\17SepDev", mpr_describe_table(mpr_sasdev0_devtype, buf->DeviceInfo & 0x03)); - MPR_PRINTFIELD(sc, buf, Flags, 0x%x); + MPR_PRINTFIELD_16(sc, buf, Flags, 0x%x); MPR_PRINTFIELD(sc, buf, PhysicalPort, %d); MPR_PRINTFIELD(sc, buf, MaxPortConnections, %d); mpr_print_field(sc, "DeviceName: 0x%jx\n", @@ -366,7 +366,7 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) mpr_print_evt_generic(sc, event); - switch(event->Event) { + switch(le16toh(event->Event)) { case MPI2_EVENT_SAS_DISCOVERY: { MPI2_EVENT_DATA_SAS_DISCOVERY *data; @@ -378,7 +378,7 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) mpr_describe_table(mpr_sasdisc_reason, data->ReasonCode)); MPR_PRINTFIELD(sc, data, PhysicalPort, %d); mpr_print_field(sc, "DiscoveryStatus: %b\n", - data->DiscoveryStatus, "\20" + le32toh(data->DiscoveryStatus), "\20" "\1Loop" "\2UnaddressableDev" "\3DupSasAddr" "\5SmpTimeout" "\6ExpRouteFull" "\7RouteIndexError" "\10SmpFailed" "\11SmpCrcError" "\12SubSubLink" "\13TableTableLink" @@ -397,8 +397,8 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) data = (MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST *) &event->EventData; - MPR_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); - MPR_PRINTFIELD(sc, data, ExpanderDevHandle, 0x%x); + MPR_PRINTFIELD_16(sc, data, EnclosureHandle, 0x%x); + MPR_PRINTFIELD_16(sc, data, ExpanderDevHandle, 0x%x); MPR_PRINTFIELD(sc, data, NumPhys, %d); MPR_PRINTFIELD(sc, data, NumEntries, %d); MPR_PRINTFIELD(sc, data, StartPhyNum, %d); @@ -411,7 +411,7 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) phynum = data->StartPhyNum + i; mpr_print_field(sc, "PHY[%d].AttachedDevHandle: 0x%04x\n", phynum, - phy->AttachedDevHandle); + le16toh(phy->AttachedDevHandle)); mpr_print_field(sc, "PHY[%d].LinkRate: %s (0x%x)\n", phynum, mpr_describe_table(mpr_linkrate_names, @@ -428,13 +428,13 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) data = (MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE *) &event->EventData; - MPR_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); + MPR_PRINTFIELD_16(sc, data, EnclosureHandle, 0x%x); mpr_print_field(sc, "ReasonCode: %s\n", mpr_describe_table(mpr_sastopo_exp, data->ReasonCode)); MPR_PRINTFIELD(sc, data, PhysicalPort, %d); - MPR_PRINTFIELD(sc, data, NumSlots, %d); - MPR_PRINTFIELD(sc, data, StartSlot, %d); - MPR_PRINTFIELD(sc, data, PhyBits, 0x%x); + MPR_PRINTFIELD_16(sc, data, NumSlots, %d); + MPR_PRINTFIELD_16(sc, data, StartSlot, %d); + MPR_PRINTFIELD_32(sc, data, PhyBits, 0x%x); break; } case MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE: @@ -443,12 +443,12 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) data = (MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *) &event->EventData; - MPR_PRINTFIELD(sc, data, TaskTag, 0x%x); + MPR_PRINTFIELD_16(sc, data, TaskTag, 0x%x); mpr_print_field(sc, "ReasonCode: %s\n", mpr_describe_table(mpr_sasdev_reason, data->ReasonCode)); MPR_PRINTFIELD(sc, data, ASC, 0x%x); MPR_PRINTFIELD(sc, data, ASCQ, 0x%x); - MPR_PRINTFIELD(sc, data, DevHandle, 0x%x); + MPR_PRINTFIELD_16(sc, data, DevHandle, 0x%x); mpr_print_field(sc, "SASAddress: 0x%jx\n", mpr_to_u64(&data->SASAddress)); break; @@ -476,24 +476,24 @@ mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) MPR_PRINTFIELD(sc, buf, PhysicalPort, %d); MPR_PRINTFIELD(sc, buf, NumPhys, %d); MPR_PRINTFIELD(sc, buf, Phy, %d); - MPR_PRINTFIELD(sc, buf, NumTableEntriesProgrammed, %d); + MPR_PRINTFIELD_16(sc, buf, NumTableEntriesProgrammed, %d); mpr_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); mpr_print_field(sc, "HwLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, (buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); - MPR_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); + MPR_PRINTFIELD_16(sc, buf, AttachedDevHandle, 0x%04x); mpr_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, - (buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); + (le32toh(buf->PhyInfo) >> 16) & 0xf), le32toh(buf->PhyInfo)); mpr_print_field(sc, "AttachedDeviceInfo: %b,%s\n", - buf->AttachedDeviceInfo, "\20" "\4SATAhost" "\5SMPinit" "\6STPinit" + le32toh(buf->AttachedDeviceInfo), "\20" "\4SATAhost" "\5SMPinit" "\6STPinit" "\7SSPinit" "\10SATAdev" "\11SMPtarg" "\12STPtarg" "\13SSPtarg" "\14Direct" "\15LSIdev" "\16ATAPIdev" "\17SEPdev", mpr_describe_table(mpr_sasdev0_devtype, - buf->AttachedDeviceInfo & 0x03)); - MPR_PRINTFIELD(sc, buf, ExpanderDevHandle, 0x%04x); + le32toh(buf->AttachedDeviceInfo) & 0x03)); + MPR_PRINTFIELD_16(sc, buf, ExpanderDevHandle, 0x%04x); MPR_PRINTFIELD(sc, buf, ChangeCount, %d); mpr_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, @@ -501,10 +501,10 @@ mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) MPR_PRINTFIELD(sc, buf, PhyIdentifier, %d); MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); MPR_PRINTFIELD(sc, buf, DiscoveryInfo, 0x%x); - MPR_PRINTFIELD(sc, buf, AttachedPhyInfo, 0x%x); + MPR_PRINTFIELD_32(sc, buf, AttachedPhyInfo, 0x%x); mpr_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, - buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); + le32toh(buf->AttachedPhyInfo) & 0xf), le32toh(buf->AttachedPhyInfo)); MPR_PRINTFIELD(sc, buf, ZoneGroup, %d); MPR_PRINTFIELD(sc, buf, SelfConfigStatus, 0x%x); } @@ -513,12 +513,12 @@ void mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) { MPR_PRINTFIELD_START(sc, "SAS PHY Page 0"); - MPR_PRINTFIELD(sc, buf, OwnerDevHandle, 0x%04x); - MPR_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); + MPR_PRINTFIELD_16(sc, buf, OwnerDevHandle, 0x%04x); + MPR_PRINTFIELD_16(sc, buf, AttachedDevHandle, 0x%04x); MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); mpr_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, - buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); + le32toh(buf->AttachedPhyInfo) & 0xf), le32toh(buf->AttachedPhyInfo)); mpr_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); @@ -529,7 +529,7 @@ mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) MPR_PRINTFIELD(sc, buf, Flags, 0x%x); mpr_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, - (buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); + (le32toh(buf->PhyInfo) >> 16) & 0xf), le32toh(buf->PhyInfo)); mpr_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); diff --git a/sys/dev/mpr/mprvar.h b/sys/dev/mpr/mprvar.h index 08216ff54d1d..f8e479b2fbc8 100644 --- a/sys/dev/mpr/mprvar.h +++ b/sys/dev/mpr/mprvar.h @@ -760,6 +760,10 @@ do { \ mpr_printf((sc), tag "\n") #define MPR_PRINTFIELD(sc, facts, attr, fmt) \ mpr_print_field((sc), #attr ": " #fmt "\n", (facts)->attr) +#define MPR_PRINTFIELD_16(sc, facts, attr, fmt) \ + mpr_print_field((sc), #attr ": " #fmt "\n", le16toh((facts)->attr)) +#define MPR_PRINTFIELD_32(sc, facts, attr, fmt) \ + mpr_print_field((sc), #attr ": " #fmt "\n", le32toh((facts)->attr)) static __inline void mpr_from_u64(uint64_t data, U64 *mpr) From nobody Wed Dec 1 18:59:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CEB6118B647F; Wed, 1 Dec 2021 18:59: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 4J47fg3N20z3kfx; Wed, 1 Dec 2021 18:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 304ED71A4; Wed, 1 Dec 2021 18:59: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 1B1Ix7w5060414; Wed, 1 Dec 2021 18:59:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Ix7GY060413; Wed, 1 Dec 2021 18:59:07 GMT (envelope-from git) Date: Wed, 1 Dec 2021 18:59:07 GMT Message-Id: <202112011859.1B1Ix7GY060413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 9d98b001a8c5 - stable/12 - Remove unused wrappers around kproc_create() and kproc_exit(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 9d98b001a8c5dad3735796e22ad0e4e776c91d4e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638385148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ShYpRfqh6PPWmqIim6YeQCDsy0DcvohPYfJpX/ONlsQ=; b=OBPxtWdn7U1m8sK7nEDNhGkXzVkdF6l2qNkeRPnLG6mp+tuBLpKirG/t6NqO4FSayy9TJr 4aC0lFU/0sHYke0gVs0tfeYBlWaa6uTWpP/M4qRCccsIFw0wDPRM55I8jQq7yY0K24ZJ0G BCmh7PaSFnQSRzRHAN/aTyGHU7ezRcu5UEclDKQJpSLFwW9ZzlTuTqzQLO9GEBgpetR/lI Nl3FtnES4xaZnGR/KKqxDijVfFmbJJU9/yAKJXHcxHkV5oCN9hfHB/6sedctfH61V2WaUa 51hnf5KWWMI7dBD77CI/tZF5cpiyw4lZxYwMDL+eQe1cQwrZpMFCORwV2mnJDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638385148; a=rsa-sha256; cv=none; b=MPp3QKx1vN4Gi2D2OKs3dy7CJ0C0UJZb7hZ0n7X2hJN0biGroHaIqLrwOazpbAqIFfeLWI uvOauQtu8KvCwfQSPJi11FW2wWoZSyoKDmXmSRheh4HsH3/P6SQ2gF4MhlvFkuEQs+p4aW eUvylBKnuZGqfzOv3DB30Rw6L168Lkj7bo1lHFulTLKTwLTYxhQbsnTqmj0JP8iTCF48tS GNUiNgrokQSPgIMXhNbdsIAlqaH/wHs71VbJQLXQD5qzJAkIIPlS+4pZKBO7oOuo4vIHXG u7z52ro2VedKXbG3ZQORVTKG0PqhD3VUJZC+L6+ae9+WDfmXK/0UyKfYxInlYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=9d98b001a8c5dad3735796e22ad0e4e776c91d4e commit 9d98b001a8c5dad3735796e22ad0e4e776c91d4e Author: John Baldwin AuthorDate: 2021-03-12 17:47:58 +0000 Commit: Alexander Motin CommitDate: 2021-12-01 18:46:48 +0000 Remove unused wrappers around kproc_create() and kproc_exit(). Reviewed by: imp, kib MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D29205 (cherry picked from commit 645b15e558dc102ff70a6332b1d0b0aa733fd2bb) --- sys/dev/mpr/mprvar.h | 10 ---------- sys/dev/mps/mpsvar.h | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/sys/dev/mpr/mprvar.h b/sys/dev/mpr/mprvar.h index f8e479b2fbc8..8eb9379d8cff 100644 --- a/sys/dev/mpr/mprvar.h +++ b/sys/dev/mpr/mprvar.h @@ -909,16 +909,6 @@ int mprsas_send_reset(struct mpr_softc *sc, struct mpr_command *tm, SYSCTL_DECL(_hw_mpr); /* Compatibility shims for different OS versions */ -#if __FreeBSD_version >= 800001 -#define mpr_kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mpr_kproc_exit(arg) kproc_exit(arg) -#else -#define mpr_kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mpr_kproc_exit(arg) kthread_exit(arg) -#endif - #if defined(CAM_PRIORITY_XPT) #define MPR_PRIORITY_XPT CAM_PRIORITY_XPT #else diff --git a/sys/dev/mps/mpsvar.h b/sys/dev/mps/mpsvar.h index 6800ef468757..bb0087bf0346 100644 --- a/sys/dev/mps/mpsvar.h +++ b/sys/dev/mps/mpsvar.h @@ -827,16 +827,6 @@ int mpssas_send_reset(struct mps_softc *sc, struct mps_command *tm, SYSCTL_DECL(_hw_mps); /* Compatibility shims for different OS versions */ -#if __FreeBSD_version >= 800001 -#define mps_kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mps_kproc_exit(arg) kproc_exit(arg) -#else -#define mps_kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mps_kproc_exit(arg) kthread_exit(arg) -#endif - #if defined(CAM_PRIORITY_XPT) #define MPS_PRIORITY_XPT CAM_PRIORITY_XPT #else From nobody Wed Dec 1 18:59:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AAB0718B6921; Wed, 1 Dec 2021 18:59: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 4J47fj0DhBz3kjr; Wed, 1 Dec 2021 18:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E23172B2; Wed, 1 Dec 2021 18:59: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 1B1Ix8t8060438; Wed, 1 Dec 2021 18:59:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Ix8HM060437; Wed, 1 Dec 2021 18:59:08 GMT (envelope-from git) Date: Wed, 1 Dec 2021 18:59:08 GMT Message-Id: <202112011859.1B1Ix8HM060437@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 9d842d84f49a - stable/12 - mpr/mps(4): Make device mapping some more robust. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 9d842d84f49af6d4aacaea694dcaea4173522684 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638385149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g5S9RYPEiSLPOc4BDZjPI3ujsB9jy6SCruz2bDUCuUM=; b=OhPL7krut48zsPUaEAjpYcOso460SUczl5NY1ZCbXeB2PeDSqu8niTG1QIp9U0qu57j7vs UUfdkKY0aZW/ehWB0kt8Al8VgxIY8kVx+lG+0hyFauulTpqsZ6pJzWCW37//ZPYa6QKDw/ FZF8t+IUYgFK/ZW61AHOfLanXGHmEfCzAjEB9HlsKqB2cfLb8efUHYB4/HgylwKebPTzbS faecr4TFO3QyGYXyACS63+e9c+rPJmWYaALR/35cpueFW6ZSgI0jOj+8ngbLHeBF3HF1iP AF1zdxDn258GVPpfbmkbvN6JbyzP/UOOrwqmY4CrJehB6vomSt45RpOth1hnVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638385149; a=rsa-sha256; cv=none; b=oLmLKWVA8prdSVb53NvR+BaN340rinhvFkxS/CTQmm0ck9yJ60DCiBP9LUeXiMQmSw9wXn xj/nR8zqgIaRe8N0nztVfOl+geVzf83Z+wh9aS1DtA9bWMD9tf+ZeqDAYj74BUKvpzNamh XyGeWPk+bjTDjcmzFs0W3IxZdRNeAVBOmhx9htAzZ2FHmyz+uG8HYHyAg9RjuhJWpP3xto 6VV4Pa6mQeyb6IZpQf+f5FNMrkbx4+NBLzGD7DfmykKNBabBvuhlrEU5XkjBCEVlNYk6Kp TAsN4xA5AR266/YJJVhHvPPh6mbDq0E259+m139QBdnUfioN9gE7pvznK1cdAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=9d842d84f49af6d4aacaea694dcaea4173522684 commit 9d842d84f49af6d4aacaea694dcaea4173522684 Author: Alexander Motin AuthorDate: 2021-04-24 03:18:01 +0000 Commit: Alexander Motin CommitDate: 2021-12-01 18:51:24 +0000 mpr/mps(4): Make device mapping some more robust. Allow new enclosure to replace previously existing one if there is no completely unused table entry, same as it is done for devices. If we can not process DPM due to corruption -- wipe it and restart from scratch. Otherwise I don't see a way to recover persistence if something go wrong and there is no BIOS to recover it for us. Together this solves a problem that appeared when 9300-8i firmware update to 16.00.10.00 somehow switched its mapping mode from Device Persistence to Enclosure/Slot without wiping the DPM table. It made HBA completely unusable, since overflowed and conflicting mapping table was unable to map any of enclosures and so devices. Also while there make some enclosure mapping errors more informative. MFC after: 1 month Sponsored by: iXsystems, Inc. (cherry picked from commit b99419aee49e2cc53747730be4d0ec4f9b330eb2) --- sys/dev/mpr/mpr_mapping.c | 71 ++++++++++++++++++++++++++++++----------------- sys/dev/mps/mps_mapping.c | 39 +++++++++++++++++--------- 2 files changed, 71 insertions(+), 39 deletions(-) diff --git a/sys/dev/mpr/mpr_mapping.c b/sys/dev/mpr/mpr_mapping.c index 9af67b6250f3..eed59ff38de1 100644 --- a/sys/dev/mpr/mpr_mapping.c +++ b/sys/dev/mpr/mpr_mapping.c @@ -1214,9 +1214,10 @@ _mapping_get_dev_info(struct mpr_softc *sc, phy_change->is_processed = 1; mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " "failed to add the device with handle " - "0x%04x because the enclosure is not in " - "the mapping table\n", __func__, - phy_change->dev_handle); + "0x%04x because enclosure handle 0x%04x " + "is not in the mapping table\n", __func__, + phy_change->dev_handle, + topo_change->enc_handle); continue; } if (!((phy_change->device_info & @@ -1369,9 +1370,10 @@ _mapping_get_pcie_dev_info(struct mpr_softc *sc, port_change->is_processed = 1; mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " "failed to add the device with handle " - "0x%04x because the enclosure is not in " - "the mapping table\n", __func__, - port_change->dev_handle); + "0x%04x because enclosure handle 0x%04x " + "is not in the mapping table\n", __func__, + port_change->dev_handle, + topo_change->enc_handle); continue; } if (!(port_change->device_info & @@ -1610,9 +1612,10 @@ _mapping_add_new_device(struct mpr_softc *sc, phy_change->is_processed = 1; mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " "failed to add the device with handle " - "0x%04x because the enclosure is not in " - "the mapping table\n", __func__, - phy_change->dev_handle); + "0x%04x because enclosure handle 0x%04x " + "is not in the mapping table\n", __func__, + phy_change->dev_handle, + topo_change->enc_handle); continue; } @@ -1867,9 +1870,10 @@ _mapping_add_new_pcie_device(struct mpr_softc *sc, port_change->is_processed = 1; mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " "failed to add the device with handle " - "0x%04x because the enclosure is not in " - "the mapping table\n", __func__, - port_change->dev_handle); + "0x%04x because enclosure handle 0x%04x " + "is not in the mapping table\n", __func__, + port_change->dev_handle, + topo_change->enc_handle); continue; } @@ -2208,7 +2212,7 @@ mpr_mapping_free_memory(struct mpr_softc *sc) free(sc->dpm_pg0, M_MPR); } -static bool +static void _mapping_process_dpm_pg0(struct mpr_softc *sc) { u8 missing_cnt, enc_idx; @@ -2335,8 +2339,8 @@ _mapping_process_dpm_pg0(struct mpr_softc *sc) MPR_DPM_BAD_IDX) { mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: Conflict in mapping table for " - " enclosure %d\n", __func__, - enc_idx); + "enclosure %d device %d\n", + __func__, enc_idx, map_idx); goto fail; } physical_id = @@ -2376,20 +2380,26 @@ _mapping_process_dpm_pg0(struct mpr_softc *sc) mt_entry->device_info = MPR_DEV_RESERVED; } } /*close the loop for DPM table */ - return (true); + return; fail: + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " + "Wiping DPM to start from scratch\n", __func__); + dpm_entry = (Mpi2DriverMap0Entry_t *) ((uint8_t *) sc->dpm_pg0 + + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); + bzero(dpm_entry, sizeof(Mpi2DriverMap0Entry_t) * sc->max_dpm_entries); for (entry_num = 0; entry_num < sc->max_dpm_entries; entry_num++) { + sc->dpm_flush_entry[entry_num] = 1; sc->dpm_entry_used[entry_num] = 0; /* * for IR firmware, it may be necessary to wipe out * sc->mapping_table volumes tooi */ } + _mapping_flush_dpm_pages(sc); for (enc_idx = 0; enc_idx < sc->num_enc_table_entries; enc_idx++) _mapping_clear_enc_entry(sc->enclosure_table + enc_idx); sc->num_enc_table_entries = 0; - return (false); } /* @@ -2629,10 +2639,8 @@ retry_read_dpm: } } - if (sc->is_dpm_enable) { - if (!_mapping_process_dpm_pg0(sc)) - sc->is_dpm_enable = 0; - } + if (sc->is_dpm_enable) + _mapping_process_dpm_pg0(sc); if (! sc->is_dpm_enable) { mpr_dprint(sc, MPR_MAPPING, "%s: DPM processing is disabled. " "Device mappings will not persist across reboots or " @@ -2828,14 +2836,24 @@ mpr_mapping_enclosure_dev_status_change_event(struct mpr_softc *sc, * and the enclosure has enough space in the Mapping * Table to map its devices. */ - enc_idx = sc->num_enc_table_entries; - if (enc_idx >= sc->max_enclosures) { + if (sc->num_enc_table_entries < sc->max_enclosures) { + enc_idx = sc->num_enc_table_entries; + sc->num_enc_table_entries++; + } else { + enc_idx = _mapping_get_high_missing_et_idx(sc); + if (enc_idx != MPR_ENCTABLE_BAD_IDX) { + et_entry = &sc->enclosure_table[enc_idx]; + _mapping_add_to_removal_table(sc, + et_entry->dpm_entry_num); + _mapping_clear_enc_entry(et_entry); + } + } + if (enc_idx == MPR_ENCTABLE_BAD_IDX) { mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " "Enclosure cannot be added to mapping " "table because it's full.\n", __func__); goto out; } - sc->num_enc_table_entries++; et_entry = &sc->enclosure_table[enc_idx]; et_entry->enc_handle = le16toh(event_data-> EnclosureHandle); @@ -2862,8 +2880,9 @@ mpr_mapping_enclosure_dev_status_change_event(struct mpr_softc *sc, le16toh(event_data->EnclosureHandle)); if (enc_idx == MPR_ENCTABLE_BAD_IDX) { mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: Cannot " - "unmap enclosure %d because it has already been " - "deleted.\n", __func__, enc_idx); + "unmap enclosure with handle 0x%04x because it " + "has already been deleted.\n", __func__, + le16toh(event_data->EnclosureHandle)); goto out; } et_entry = &sc->enclosure_table[enc_idx]; diff --git a/sys/dev/mps/mps_mapping.c b/sys/dev/mps/mps_mapping.c index 9330288acd06..d2f761568dac 100644 --- a/sys/dev/mps/mps_mapping.c +++ b/sys/dev/mps/mps_mapping.c @@ -1176,9 +1176,10 @@ _mapping_get_dev_info(struct mps_softc *sc, phy_change->is_processed = 1; mps_dprint(sc, MPS_ERROR | MPS_MAPPING, "%s: " "failed to add the device with handle " - "0x%04x because the enclosure is not in " - "the mapping table\n", __func__, - phy_change->dev_handle); + "0x%04x because enclosure handle 0x%04x " + "is not in the mapping table\n", __func__, + phy_change->dev_handle, + topo_change->enc_handle); continue; } if (!((phy_change->device_info & @@ -1421,9 +1422,10 @@ _mapping_add_new_device(struct mps_softc *sc, phy_change->is_processed = 1; mps_dprint(sc, MPS_ERROR | MPS_MAPPING, "%s: " "failed to add the device with handle " - "0x%04x because the enclosure is not in " - "the mapping table\n", __func__, - phy_change->dev_handle); + "0x%04x because enclosure handle 0x%04x " + "is not in the mapping table\n", __func__, + phy_change->dev_handle, + topo_change->enc_handle); continue; } @@ -1887,8 +1889,8 @@ _mapping_process_dpm_pg0(struct mps_softc *sc) MPS_DPM_BAD_IDX) { mps_dprint(sc, MPS_ERROR | MPS_MAPPING, "%s: Conflict in mapping table for " - " enclosure %d\n", __func__, - enc_idx); + "enclosure %d device %d\n", + __func__, enc_idx, map_idx); break; } physical_id = @@ -2364,14 +2366,24 @@ mps_mapping_enclosure_dev_status_change_event(struct mps_softc *sc, * and the enclosure has enough space in the Mapping * Table to map its devices. */ - enc_idx = sc->num_enc_table_entries; - if (enc_idx >= sc->max_enclosures) { + if (sc->num_enc_table_entries < sc->max_enclosures) { + enc_idx = sc->num_enc_table_entries; + sc->num_enc_table_entries++; + } else { + enc_idx = _mapping_get_high_missing_et_idx(sc); + if (enc_idx != MPS_ENCTABLE_BAD_IDX) { + et_entry = &sc->enclosure_table[enc_idx]; + _mapping_add_to_removal_table(sc, + et_entry->dpm_entry_num); + _mapping_clear_enc_entry(et_entry); + } + } + if (enc_idx == MPS_ENCTABLE_BAD_IDX) { mps_dprint(sc, MPS_ERROR | MPS_MAPPING, "%s: " "Enclosure cannot be added to mapping " "table because it's full.\n", __func__); goto out; } - sc->num_enc_table_entries++; et_entry = &sc->enclosure_table[enc_idx]; et_entry->enc_handle = le16toh(event_data-> EnclosureHandle); @@ -2398,8 +2410,9 @@ mps_mapping_enclosure_dev_status_change_event(struct mps_softc *sc, le16toh(event_data->EnclosureHandle)); if (enc_idx == MPS_ENCTABLE_BAD_IDX) { mps_dprint(sc, MPS_ERROR | MPS_MAPPING, "%s: Cannot " - "unmap enclosure %d because it has already been " - "deleted.\n", __func__, enc_idx); + "unmap enclosure with handle 0x%04x because it " + "has already been deleted.\n", __func__, + le16toh(event_data->EnclosureHandle)); goto out; } et_entry = &sc->enclosure_table[enc_idx]; From nobody Wed Dec 1 18:59:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7E56A18B67E5; Wed, 1 Dec 2021 18:59: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 4J47fj6HsKz3kTP; Wed, 1 Dec 2021 18:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 735077406; Wed, 1 Dec 2021 18:59: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 1B1Ix9FY060462; Wed, 1 Dec 2021 18:59:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Ix9s8060461; Wed, 1 Dec 2021 18:59:09 GMT (envelope-from git) Date: Wed, 1 Dec 2021 18:59:09 GMT Message-Id: <202112011859.1B1Ix9s8060461@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: a1e06684e708 - stable/12 - mpr, mps: clear CCBs 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a1e06684e708cca9eba2c3978c20a9552a55283f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638385152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2/HyNmFTVtG0XHYJKyDHGm78SHUzH72hfXSEZBP1RHM=; b=g/EUlwScrAp5zz9aBBPizNXuJA1lBq5fJFCYuYSb0FnReO6Kai2JP40podUxTWsbA6T9TU LwY5YQ5pFqpW3U8znOcfORoIj2JN+SeciXD1xKFSfq9027M6YW+LOIBrzIj1CWV0yDKpqH vRXBEH2doCZMWk5obBJtvesfBJ7qPbl+TGHWAQIZhCpLcR5no0iUObeJQdCPsqbNq7Ihof gH9fuPOJLEjmtgYqsSxJpzWIaoNRRFbtzrtwmDdcQCGB41tRDfJ2+S9HzzLJL+5Kgh7X47 JUpX0cPeUkEHU27ZQCILMKIBEICNoPWP1Dr8XOLC/pI45zAp3a3W0EVoywcWuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638385152; a=rsa-sha256; cv=none; b=KVym7IZJrNGw/EXem9q7SF8A7oBAqlREmqHKp6dZ0RgB0Ij6P+EdI/bQqTAN8qHVVpj3cO bvcDO2Gr8qmz/fC1c0DQk36Hddl5BLSZBUhPwTylkTYoGuZfHrr4Ub5DkNmX6VYX/ES311 saNSZXoe3pxAwe8orZEl1RKaKLc/Q/I0CQe1qtP7t/HIfuMT9d0r6KNHcSavtQ1ct9YmNy TvqRRhROAPsFHskYwDcKm/qcjKAm4TZiizFL7e7TNUNnxjjZ+q/05PTQFJvh5NhQTAVUI4 DSqn3w96bDN2T2NisvKGdT4nUbJd2YVodaoHnMg/Y+8yszoZyneHhArgkzhWew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=a1e06684e708cca9eba2c3978c20a9552a55283f commit a1e06684e708cca9eba2c3978c20a9552a55283f Author: Edward Tomasz Napierala AuthorDate: 2021-05-21 06:42:08 +0000 Commit: Alexander Motin CommitDate: 2021-12-01 18:52:36 +0000 mpr, mps: clear CCBs allocated on the stack Reviewed By: imp Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D30301 (cherry picked from commit 7608b98c4394590840a53d2b38b908582253de32) --- sys/dev/mpr/mpr_sas.c | 1 + sys/dev/mps/mps_sas.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index 2fb20ebcd9d7..4d8f4ebe1673 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -3545,6 +3545,7 @@ mprsas_async(void *callback_arg, uint32_t code, struct cam_path *path, } bzero(&rcap_buf, sizeof(rcap_buf)); + bzero(&cdai, sizeof(cdai)); xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL); cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.ccb_h.flags = CAM_DIR_IN; diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index 5ba5e87137e1..ad80b0471622 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -3244,6 +3244,7 @@ mpssas_async(void *callback_arg, uint32_t code, struct cam_path *path, } bzero(&rcap_buf, sizeof(rcap_buf)); + bzero(&cdai, sizeof(cdai)); xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL); cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.ccb_h.flags = CAM_DIR_IN; From nobody Wed Dec 1 19:14:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4043418BE4F3; Wed, 1 Dec 2021 19:14: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 4J480d5FrTz3qh0; Wed, 1 Dec 2021 19:14:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 948027800; Wed, 1 Dec 2021 19:14: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 1B1JEfBV087866; Wed, 1 Dec 2021 19:14:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1JEfc3087865; Wed, 1 Dec 2021 19:14:41 GMT (envelope-from git) Date: Wed, 1 Dec 2021 19:14:41 GMT Message-Id: <202112011914.1B1JEfc3087865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 83a103ec429a - main - libc sctp: improve conformance of sctp_getpaddrs() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83a103ec429a6dd862a73857ebeeff863a41a34d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638386081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hj6oAO8pkaL/naNqz7jwbrdv5TIlKyLXd6U8CZ2hHLY=; b=c1Mm98UDZi2O0tHha5ZXoqL6Bc8yRKW1Q7Owrs7j8IhcUzIUkhFTXVud5Yz5Jn76PR45WQ xGLaAz68Qlmo7y9ig4+XZtAYtP66xsskuQ6sK5hLbXYxelPKqGuEhp1Yooa3r/Sv2rgM43 j7tBQfWHhLzvnk9o/O+I8IAkyzvadkN7bHBn/G6Uim49TVdZiS9nKLt14HiOVvXkwE8fgF /h5ng8bkLwPoJBnfn7xmM4PrAEU95QK6n20ywKgsBsoOF5+lb/EgfXrWz4YXDDKWTHm0C5 +eDYCwxAYSKRUFz3/S7EgPxQ+oHcZAfhBLd1Qr/eRlwwp1Lsdo4xMh6Qs1vTSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638386081; a=rsa-sha256; cv=none; b=Hw/imGwqtycDe6TgDScd/Dho+LgXy5qIzBpvkvXx7xgBgq37iNucB/ClFG3q9UXaxxKC+c o3R4uULKEb25GX7XsB9Mwz1IocAOdHkbX7skrOzaq5D++jLa5YmWQD/blaEm5doapUjbMG 8hdIEp8CkGGhiydtiKIxoxDc5AQVkv/96sIXUeEdtSxc2KBqwgXUPaNHzhoL8grgtm2wVw ww6gmLo1zAQ1gYPyegp1jNvd4iSRxDITjo1AFYEwgxIIP/BGSQKQ75vq+c8vrEhPv3Dz2U eQ7Ghwzcz23C6JluE12na+yB3f/93VnzSSIEBTa293jLMQCiGSE4Wy5y/310mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=83a103ec429a6dd862a73857ebeeff863a41a34d commit 83a103ec429a6dd862a73857ebeeff863a41a34d Author: Michael Tuexen AuthorDate: 2021-12-01 18:47:50 +0000 Commit: Michael Tuexen CommitDate: 2021-12-01 18:50:26 +0000 libc sctp: improve conformance of sctp_getpaddrs() When there is no association, don't return -1 and indicate ENOENT, but return 0 instead. This is specified in RFC 6458. PR: 260117 MFC after: 1 week --- lib/libc/net/sctp_sys_calls.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c index 615b14ede5aa..7c3652ff5d3c 100644 --- a/lib/libc/net/sctp_sys_calls.c +++ b/lib/libc/net/sctp_sys_calls.c @@ -405,7 +405,11 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) opt_len = (socklen_t)sizeof(uint32_t); if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_REMOTE_ADDR_SIZE, &size_of_addresses, &opt_len) != 0) { - return (-1); + if (errno == ENOENT) { + return (0); + } else { + return (-1); + } } opt_len = (socklen_t)((size_t)size_of_addresses + sizeof(struct sctp_getaddresses)); addrs = calloc(1, (size_t)opt_len); From nobody Wed Dec 1 19:41:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ADEE918C99FD; Wed, 1 Dec 2021 19:41: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 4J48by2zY1z4SYH; Wed, 1 Dec 2021 19:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 463E87C95; Wed, 1 Dec 2021 19:41: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 1B1Jfo0i024075; Wed, 1 Dec 2021 19:41:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Jfo3I024074; Wed, 1 Dec 2021 19:41:50 GMT (envelope-from git) Date: Wed, 1 Dec 2021 19:41:50 GMT Message-Id: <202112011941.1B1Jfo3I024074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: 060c97abb019 - stable/13 - powerpc64: make autoboot possible on powernv machines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 060c97abb0192568ca6807d39ed822593c3f1459 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638387710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KEhzpZrF5PwE0/1CispvaYzV5zy/rLpsCEI49Y/RJtk=; b=DRDNlhLsUeitDy9B3IKOxIG1SECnrpKc7koaxjo/vomfTaZQetOma7f4gCRXPGMBmtDi/h bdrWEpgUp5qUvXj/N133sx2tnlXv/C5uFiTCYUOOZPMKyoKbPOcrHuHcwd96ERGtJ8buZ9 n5R6z0tBmMooriL1NNpCcHrxe9o/w1O4xQCCO9RKVHPjYGnXGrWtbaPalR/pwQIm2mriu/ p0txfJabpoyQ8uzMTFwVWXptJls2ybx88LnbeL1BWgPN31lgJl9yycwdMuUl7+x2kWgADc +VvM6/+OQoj8ZN9CrpM8LQOrFMf5cIW5bPxNiUGyBxuUE+7yA1n3NYGi0PYUeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638387710; a=rsa-sha256; cv=none; b=NWJRRh9qrw6l+JeYrbH2rzqTYyljBjddpysvUsaa/REr3DBLdTfE8CSh6VPqKFS2Rm4oT4 Dlg2sDafIV4VFVNvNRiKRRCFLGHgfb6B6zdyxaZxrG7iRxYBfJhBnVfFFBp2qJ1XS85c1q ylwRiZHR5qZtwG9zujDM8Q8EculuA1Pz1RLh3LbLbI7J3kJEy6yv/iKScAnPuG54pHvkVy 1AsxXxKiggTwC4WGT6D03d9KHY7J7R/tFrWy/x69zAqv9vIX1PtVWOS3YWOea96XHmOhce W8tbuNPT/jLQGSpKvqRC3PJvVblyIPFX1m9T+NiykDIm22NYWjcsC6rt88u6PA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=060c97abb0192568ca6807d39ed822593c3f1459 commit 060c97abb0192568ca6807d39ed822593c3f1459 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-11-26 00:02:53 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-12-01 22:41:49 +0000 powerpc64: make autoboot possible on powernv machines It's required to specify a default boot option in order to make petitboot's autoboot feature work. Tested on Raptor Blackbird Reviewed by: imp, luporl MFC after: 2 days Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D32838 (cherry picked from commit b6644f529ca4c13975727c5625415fcc30c60af6) --- usr.sbin/bsdinstall/scripts/bootconfig | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index c0a0ff4f77ee..c5218b10a271 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -27,6 +27,9 @@ # # $FreeBSD$ + +FREEBSD_BOOTLABEL="FreeBSD" + BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 @@ -41,8 +44,10 @@ if [ `uname -m` == powerpc ]; then platform=`sysctl -n hw.platform` if [ "$platform" == ps3 -o "$platform" == powernv ]; then rootpart=$(awk '{ if($2 == "/") printf("%s:%s\n", $3, $1); }' $PATH_FSTAB) + kboot_conf=$BSDINSTALL_CHROOT/boot/etc/kboot.conf mkdir -p $BSDINSTALL_CHROOT/boot/etc/ - echo FreeBSD=\'/kernel/kernel kernelname=/boot/kernel/kernel vfs.root.mountfrom=${rootpart}\' > $BSDINSTALL_CHROOT/boot/etc/kboot.conf + echo default=$FREEBSD_BOOTLABEL > $kboot_conf + echo $FREEBSD_BOOTLABEL=\'/kernel/kernel kernelname=/boot/kernel/kernel vfs.root.mountfrom=${rootpart}\' >> $kboot_conf fi fi @@ -81,11 +86,9 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${BOOTNAME}" fi - bootlabel="FreeBSD" - if [ "$BSDINSTALL_CONFIGCURRENT" ]; then f_dprintf "Creating UEFI boot entry" - efibootmgr --create --activate --label "$bootlabel" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null fi f_dprintf "Finished configuring ESP" From nobody Wed Dec 1 19:41:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2EA0918C9EBF; Wed, 1 Dec 2021 19:41: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 4J48bz4MZ8z4SYK; Wed, 1 Dec 2021 19:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72996797D; Wed, 1 Dec 2021 19:41: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 1B1JfpmH024106; Wed, 1 Dec 2021 19:41:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1JfpCj024105; Wed, 1 Dec 2021 19:41:51 GMT (envelope-from git) Date: Wed, 1 Dec 2021 19:41:51 GMT Message-Id: <202112011941.1B1JfpCj024105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: 5cee383b87f5 - stable/13 - powerpc64le: add LINT64LE kernel config List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5cee383b87f5aa86912e6cf3158d74af4bb912f1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638387711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=56+OjafOpQUVHX1wjBL+xmCHwwQfmg1jgvJyCYXRJkQ=; b=gO9ywrfnOZqrzya2dr+TAWqZGF+ntcXA3xJQ5nRtqY78eKEjyCRY4fMOwikQTzEbPpVIja 8sulGO3H6gTlwVxISlRsmq5JE7AJJ+jPoCxS0NKoEdcT72Sr01PlMA3d2Ynt3F06G+38Qc ElIYVFE0acKhR8eYpN4WR7L83cEU3PWpXt2exIksXdziDWVAdhJqgHxtUiMUFWk/IXzkd8 W9pvud3gQgpyNhxXXc9QhR0Z4VkPVWZn722lbs4WIfLgy2xEbcIeo6eo/xby7RNEhgdh7V Xl3p/I3xdl7+3uaTO8edL9fyyiJpsWDG5eBhXMVm0PltBFAn9CRsGRJvXETnnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638387711; a=rsa-sha256; cv=none; b=eL40qkpcakN+9nCHXLiuXtI4NXXdh5NwDFSIXXfXZWnCO3dEubKtkTUqKaOdqlS5S3CaWg kvv5aai4t9os3q6LhqaZDOn/yKr1sj4UrOzUZKGo/RlKoUlxghZRUalWUleCRrljDQh3ii txdp4WGjpy6QeL6qAZGhHge+Kfpx2eTbB2sFuX0XCU93iOrJpYaxWcTLG+5oNeaHLgpMhB 7I0KQVFqghzjW0EgOU8k9ac+vIKqA30qUFrRulRW2SfLu4SRtIfsaVhxn1a6lvFinujpW4 fmUfN1wjHdonFrYCv2IwlCs3eoPKwWp+4JQf/MRDU3+qnjjZWN4ff9Cmj6Y6pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=5cee383b87f5aa86912e6cf3158d74af4bb912f1 commit 5cee383b87f5aa86912e6cf3158d74af4bb912f1 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-11-29 15:08:26 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-12-01 22:42:14 +0000 powerpc64le: add LINT64LE kernel config Add configuration file to be used by "FreeBSD--powerpc64le-LINT" CI/Jenkins job Reviewed by: lwhsu MFC after: 2 days Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D33136 (cherry picked from commit e671037b3c49734566e7e0af74ba1a64f45b77a2) --- sys/powerpc/conf/LINT64LE | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/powerpc/conf/LINT64LE b/sys/powerpc/conf/LINT64LE new file mode 100644 index 000000000000..9c9a417dd9d7 --- /dev/null +++ b/sys/powerpc/conf/LINT64LE @@ -0,0 +1,5 @@ +# $FreeBSD$ + +include "../../conf/NOTES" +include NOTES +machine powerpc powerpc64le From nobody Wed Dec 1 21:09:09 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A5E5118C953B; Wed, 1 Dec 2021 21:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4BXj2TrHz4vnw; Wed, 1 Dec 2021 21:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3559310FBD; Wed, 1 Dec 2021 21:09: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 1B1L99o6034288; Wed, 1 Dec 2021 21:09:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1L99ou034287; Wed, 1 Dec 2021 21:09:09 GMT (envelope-from git) Date: Wed, 1 Dec 2021 21:09:09 GMT Message-Id: <202112012109.1B1L99ou034287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vincenzo Maffione Subject: git: d91559564dc6 - main - e1000: remove unused ifp backpointer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vmaffione X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d91559564dc647846479824340bdf94b7cf98c05 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638392949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lg5GzV/qSLLVb7BNTmkYNtU7a3Zi23OAuNB9euwlZZc=; b=BLcVMqk504ugOs/0RyZSd2tlMkbbgmmqgftvoeyfJfhwmtGow9KhKQ+gwM/42xdB3BKbuO wFGEdnXIAUHg1ca7RhsUQqekXa1Rz2P5aTcomQPIlOIswFeQ2HFdoiW6PM28+1ci/yzTbC Hqv4bOh5/F08M+t9EgA8WMADCMVumfIfWXf7rA8/VSy4l4r/gWBIdzW5/bO+l1gvq2a/SM olt2j8qIc6wvKa1JIEOUFUnHj/eC+Ox3QdAoLqUNZSqT2ziYD61VGRZ+6vmR5FFnYy3/E1 YLvruAvFRlw7spp7R4QpIcJZEtAMij73L4ZhONMa1q/6qyieuy0+Pb0LQpc9NA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638392949; a=rsa-sha256; cv=none; b=WCS6QOCpFh0pV2MpcUB6UB8ltjjxWb502Jcef+WIxBQobSnsAYuWcwcLMBWS41WhHXOmRm Iheo95x2+jZ+h6sK7GHLY/K3EMMqfP+rKJiNPyEQEOxQSIkcFaHcPwPI85GJMKWg7SJEK7 vvAJZNUYXGQ7tk5gvD+C53s1NZqRCrI9gMEEoguq84JhUNP6GXMj72SVouCoF58hVI7ldi D87SJwHINjeyifZ2Tb+ngpsm9ehYLKfbyyEflvqQCwAVVbFUxUAELEIBQ0+tzOwBok7Og/ KkXU1A5BFBkK/MqYM0zDvQqbytk+obdbue4UwBx1npT9C2iOpvf6j1BNRJd8Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=d91559564dc647846479824340bdf94b7cf98c05 commit d91559564dc647846479824340bdf94b7cf98c05 Author: Vincenzo Maffione AuthorDate: 2021-11-29 21:28:26 +0000 Commit: Vincenzo Maffione CommitDate: 2021-12-01 21:08:31 +0000 e1000: remove unused ifp backpointer The ifp (struct ifnet) backpointer in the e1000 private ifnet data is not used anymore since the iflib transition. Remove it so that developers are not tempted to use it and get a NULL pointer dereference. Reviewed by: markj, kbowling, erj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33157 --- sys/dev/e1000/if_em.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index 33ba22a88552..ed5a88013f5b 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -439,7 +439,6 @@ struct em_rx_queue { /* Our softc structure */ struct e1000_softc { - struct ifnet *ifp; struct e1000_hw hw; if_softc_ctx_t shared; From nobody Wed Dec 1 21:13:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C357118CBDB7; Wed, 1 Dec 2021 21:13: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 4J4BdB3L3Mz3DCj; Wed, 1 Dec 2021 21:13:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53BAB1129E; Wed, 1 Dec 2021 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 1B1LD2gZ046858; Wed, 1 Dec 2021 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 1B1LD2Rk046857; Wed, 1 Dec 2021 21:13:02 GMT (envelope-from git) Date: Wed, 1 Dec 2021 21:13:02 GMT Message-Id: <202112012113.1B1LD2Rk046857@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vincenzo Maffione Subject: git: d0633af7658f - main - em: skip rxcsum offload processing when disabled List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vmaffione X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0633af7658fe02bc1af8639ef6dbb0d029c1b65 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638393182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vpYwzKF0JrbZNhOgnZZR9ZQPIYVQhWYLuJ2ALG9aiCY=; b=BCxbMxYrikNucojhAUp4iApe1MXPNC0QsygLG17WC4nfJcbsnKKOfuKhwGhsfKTqQeEeP+ AZgPNm4BJf5QzZ6qQv9U6OoxYqq8Yd/GquyHyNKGf9/95FD8yeJtcsFTbSEMsKvsho20+K 0U6Kn+uT34nf/S1vT8Vgk5OVRga2kxvvzHmdKo4yBs8MBR5be97cIo3xpSo2WB85tqm3gr sZPGxxLwObfhNyHD3oYMQUFwDyHZqvD73sCv74VaSe3dsTiK31MybPq6MNxcOFZ3mWDgDY NXbG/ih7pvWbKq53XD61ZNCPQz/3dkX5Lc+6c9pokb9yEVqXHyuvpvECnqfN7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638393182; a=rsa-sha256; cv=none; b=TjbvMIRBrAvDor0/1eyEfo5dj0slNL2WuT/DbCa0QZu3rEImpDEE+2rm63ZEJENZy46ZEd 05KnGIaCvljGb5AepQTNhoT9dmCNNxS/0NMdmYyqOxpRGnHXvBkuj22qluSATttHJnsWCZ 2MgE4SWT30Bh/4pbq1gyJWHjb7l19TQvNuxBcyfrIgpYplRBLZljpQWMj1bu8FdVjiqExn hPdjVYkLTd4bWK7c1RjZlzyqLr6ZjiDHfCKUneXX6BnnwTOhrxMlNmy+fKxmGJsBFd80C2 rhhMiI/BUHIAOr2f7m6OBn5V5JRhcQr0yBHyjN9h9u9UPlmjuy4TAYTVDczlZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=d0633af7658fe02bc1af8639ef6dbb0d029c1b65 commit d0633af7658fe02bc1af8639ef6dbb0d029c1b65 Author: Vincenzo Maffione AuthorDate: 2021-12-01 21:10:46 +0000 Commit: Vincenzo Maffione CommitDate: 2021-12-01 21:10:46 +0000 em: skip rxcsum offload processing when disabled Similarly to the other Intel drivers, don't try to process RX checksum offloads when this feature (IFCAP_RXCSUM) is disabled. Reviewed by: gallatin, kbowling, erj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33155 --- sys/dev/e1000/em_txrx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index 6ac66a9011f4..1f1c13c9a099 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -706,7 +706,8 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) i++; } while (!eop); - em_receive_checksum(staterr, staterr >> 24, ri); + if (if_getcapenable(ri->iri_ifp) & IFCAP_RXCSUM) + em_receive_checksum(staterr, staterr >> 24, ri); if (staterr & E1000_RXD_STAT_VP) { vtag = le16toh(rxd->wb.upper.vlan); From nobody Wed Dec 1 21:45:40 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0D1D418B33C4; Wed, 1 Dec 2021 21:45: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 4J4CLr5Rd0z3PTl; Wed, 1 Dec 2021 21:45:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9618311273; Wed, 1 Dec 2021 21:45: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 1B1LjewT086907; Wed, 1 Dec 2021 21:45:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1LjeXa086905; Wed, 1 Dec 2021 21:45:40 GMT (envelope-from git) Date: Wed, 1 Dec 2021 21:45:40 GMT Message-Id: <202112012145.1B1LjeXa086905@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: f7ea22e21153 - main - OptionalObsoleteFiles: move /usr/bin/CC to MK_TOOLCHAIN section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f7ea22e2115329b7a4f2c6620e59e644f509a4ca Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638395140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PccELxn3BW+2OcWoXutNlFQE1KMghhiqksOvRcYgOZo=; b=GdnYWuJjPIAqNF+kGKeRClPvFyZ3NHGk9ehr5nPRCrjG6judvY6y8SR6mI+4LugHh5dTPJ eP+7hCLV3kNLaIOdeLoriOl2gv552UREAq9q03WAVi6kq6Qa5MSr7w0gqVjrDPfGEzTMzR fBLU5EZG/e3iiA2UWIuduo/W8IjPsXPrmxrP1DRhRi/GMrBee2zhnystSnkjNkzdBLskB4 vYzWTZGqHgd2HIhNtjVkSVFCSjNVkS9Wyec/SX9uMA+qPHsaTbikPbVSQPSYnD9d4W5f4j mahUmJ/18ATIC45IixteTxYxLiwTrmGbO7FS7E6LEySL7J7taxNCx0yBljO8ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638395140; a=rsa-sha256; cv=none; b=pjH3F7Dqc3zaRJ7CWXow2Kxl/GJn7o9OwLRJcUFaXCuYZsoQqYQE73icbe4pFFNOzxKG4A xN43t/YBOVIsc3whRZghZf+q5M66kxXMSNnpwfBY8xTniNQlNcXSG9hXltLQzyuimvgxa1 tIA04VF3z57ClU6JyOQMvfbnJBd3ouvv6ldw/TPH+l7LKEOAIY8oqwZn+g72hlhBdMYppt zC2fr8TUmcBlV1nOH3ei1+p/At04TbfHpnf540dOmf3TnmiUanw86su0emw/taOhXkADGW /RepM7mkgDDz4dqqcG/FwUod91qfeLD7G5P4vuS9q8vxMYungZu9tkZACISCFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f7ea22e2115329b7a4f2c6620e59e644f509a4ca commit f7ea22e2115329b7a4f2c6620e59e644f509a4ca Author: Ed Maste AuthorDate: 2021-12-01 21:38:10 +0000 Commit: Ed Maste CommitDate: 2021-12-01 21:43:44 +0000 OptionalObsoleteFiles: move /usr/bin/CC to MK_TOOLCHAIN section /usr/bin/CC is installed by usr.bin/clang/clang/Makefile, as with /usr/bin/cc, /usr/bin/cpp, etc., and is not controlled by MK_CXX. Move it to the same section as those tools. (It may be that these should all be under MK_TOOLCHAIN == no || MK_CLANG_IS_CC == no, but that seems like unnecessary complexity.) Sponsored by: The FreeBSD Foundation --- tools/build/mk/OptionalObsoleteFiles.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 155c4fc82db6..d7531e188985 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1642,7 +1642,6 @@ OLD_DIRS+=usr/include/fs/cuse # devd(8) not listed here on purpose .if ${MK_CXX} == no -OLD_FILES+=usr/bin/CC OLD_FILES+=usr/bin/c++ .endif @@ -8898,6 +8897,7 @@ OLD_FILES+=usr/share/man/man8/tftpd.8.gz .endif .if ${MK_TOOLCHAIN} == no +OLD_FILES+=usr/bin/CC OLD_FILES+=usr/bin/addr2line OLD_FILES+=usr/bin/as OLD_FILES+=usr/bin/byacc From nobody Wed Dec 1 21:50:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D5F5218B4D8C; Wed, 1 Dec 2021 21:50: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 4J4CRr35Nbz3Qfx; Wed, 1 Dec 2021 21:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42C3A119DA; Wed, 1 Dec 2021 21:50: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 1B1Lo0tQ087443; Wed, 1 Dec 2021 21:50:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Lo0ex087431; Wed, 1 Dec 2021 21:50:00 GMT (envelope-from git) Date: Wed, 1 Dec 2021 21:50:00 GMT Message-Id: <202112012150.1B1Lo0ex087431@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: 33d0be8a923a - main - nfsd: Do not try to cache a reply for NFSERR_BADSLOT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 33d0be8a923a840ec0724d50815890c5ffe0e884 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638395400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5zJtIZ5bJAoMjjdWMBXI4E6k+WBwNHbV0DdpCX49dMw=; b=YhCfobShpwujmS1dshwIP2WR2GeSI6s8+HP+hEmrDLJUzh95k7VKup9pdbylFu1xTT8l9h qFITLhERK3LRcK9Ptq0jwmp2ZNHCCJDSReWXX5i/tLLDHTr71u2v/C5QK+zJhtYoIOqXSy E5KyeXmDs0ogDoqI/IhpccYAlwQPJW3C6vpYelSwlV6wZ06xiX1VFzkvoAWIDCGMBbZdSj ee3OoSYE6y7JFURDCOYEp5GpJonHXa7wbIP1mOzM2wNjIFDZHVEFYO9p8UKszIglCIbp37 O5GtyHU6iAkgnEBJjxC95cbZiaSCrRihFqBZDikL+ysQhk07MqWMuITOtUbBfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638395400; a=rsa-sha256; cv=none; b=lVfq6jDbNIaxcpBFmaYokpLqwdEVVSGBw+Nuq1XJDfVyGzipSm7qkvQjmG933ngLt1769E K1xtjc1LJUPJsaM+UhbrZt5ABOxAwLKgZOATnRFF+UphPI+mahKzYkOeeUfeXm1EyXRltp EbNKeBfhAse9piHqG9nRL+LbKDjTStxQ54MMnEZfLTvP96o18HBUxCHy/5yHS4J9gRuv2i vZ5sRXTrakCqBG+AZPzv24jaE7nScH6Yotbp5r4g0bb/qo2uDvVllpd9QSJyENzQD214OK 1JJNP2aP2dtkAR+xxtDOQH5UKGF2/K5rKbYdyc1AzubbKrWaAvL7LbnDHI63qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=33d0be8a923a840ec0724d50815890c5ffe0e884 commit 33d0be8a923a840ec0724d50815890c5ffe0e884 Author: Rick Macklem AuthorDate: 2021-12-01 21:46:41 +0000 Commit: Rick Macklem CommitDate: 2021-12-01 21:46:41 +0000 nfsd: Do not try to cache a reply for NFSERR_BADSLOT When nfsrv_checksequence() replies NFSERR_BADSLOT, the value of nd_slotid is not valid. As such, the reply cannot be cached in the session. Do not set ND_HASSEQUENCE for this case. Reported by: rtm@lcs.mit.edu Tested by: rtm@lcs.mit.edu PR: 260076 MFC after: 2 weeks --- sys/fs/nfsserver/nfs_nfsdserv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 445ef2ad9e2b..e5ccbfe7fc37 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -4566,9 +4566,10 @@ nfsrvd_sequence(struct nfsrv_descript *nd, __unused int isdgram, cache_this = 1; else cache_this = 0; - nd->nd_flag |= ND_HASSEQUENCE; nd->nd_repstat = nfsrv_checksequence(nd, sequenceid, &highest_slotid, &target_highest_slotid, cache_this, &sflags, p); + if (nd->nd_repstat != NFSERR_BADSLOT) + nd->nd_flag |= ND_HASSEQUENCE; if (nd->nd_repstat == 0) { NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID); NFSBCOPY(nd->nd_sessionid, tl, NFSX_V4SESSIONID); From nobody Wed Dec 1 21:58:45 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C1ED018B9A99; Wed, 1 Dec 2021 21:58: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 4J4Cdx3hVvz3kgP; Wed, 1 Dec 2021 21:58:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50AB911868; Wed, 1 Dec 2021 21:58: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 1B1LwjLJ000928; Wed, 1 Dec 2021 21:58:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1LwjFV000927; Wed, 1 Dec 2021 21:58:45 GMT (envelope-from git) Date: Wed, 1 Dec 2021 21:58:45 GMT Message-Id: <202112012158.1B1LwjFV000927@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: fd020f197d6a - main - nfsd: Sanity check the ACL attribute List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: fd020f197d6ac481d36171ea69fe555eb911d673 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638395925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MEBm+Fl9ByQzKqVnGOZpkVjQy+3y5mjSsaJYcZ+rdq8=; b=OVakt5rIp3+bd4zCEhJApX7wNwkiwe1clfd2wnF+YeK02odCot2fUMqjSdRPDdE0nbCjYJ 0L2eee/OXDtfUs3PFgj9EhHKvWYGmgmbzaL70y+FUXjSBLPaBe4HwNPcLX9MfdnwgkKpB/ /ufB8oA+E+FfHZ/Nf9skAjegogVipLBqV+aeSTFgMeg7fWeKU/ZydhT3YhsoxHGCgwnRrR 1G0ptl1GsX2pFN346suSbmjVzimBoYSfLpuLeOViXZUW2f2aPO4zeJDFTY3vnYJIg4YKpw 1cMtCpj+D4e4nQwr2h+1+bpk+aobi4WMSHIH4MO7aVOW+JmKCuil0rsywLvj2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638395925; a=rsa-sha256; cv=none; b=lCNNX1UVSHo2dOr8i5ltHSnEp86sMh1zDNlUXj+wQy6eWFOJhvWiK/ITVIrbeJ5dCvgCha DLZ4CG0Y9lNiJZ3CEYe/YZjz7vckczSmL9El2qLC8K3BmTcWZ8LD1qsTO/hn6of13ECC39 s/vYLlCoTy5rnt2pe+Oght9hsIbm8okB7rvPVKl1sUE04B+OIQbAtfvx88SdgRKG9Tpz5v LWFXfbCzq91y/lgYcY0bAVXuBCv4QgIz77Lne3xZGx+wkLqYYOUVrzRVMXTxq6AdJHnifY ljGoHTb64QvQsZgWUSm8a9zC55W0Rz2wLFP6Ck94hMEaKdvOtuxoIg338yqxfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=fd020f197d6ac481d36171ea69fe555eb911d673 commit fd020f197d6ac481d36171ea69fe555eb911d673 Author: Rick Macklem AuthorDate: 2021-12-01 21:55:17 +0000 Commit: Rick Macklem CommitDate: 2021-12-01 21:55:17 +0000 nfsd: Sanity check the ACL attribute When an ACL is presented to the NFSv4 server in Setattr or Verify, parsing of the ACL assumed a sane acecnt and sane sizes for the "who" strings. This patch adds sanity checks for these. The patch also fixes handling of an error return from nfsrv_dissectacl() for one broken case. Reported by: rtm@lcs.mit.edu Tested by: rtm@lcs.mit.edu PR: 260111 MFC after: 2 weeks --- sys/fs/nfs/nfs_commonacl.c | 6 +++++- sys/fs/nfs/nfs_commonsubs.c | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonacl.c b/sys/fs/nfs/nfs_commonacl.c index 99a67edc044d..19492675e731 100644 --- a/sys/fs/nfs/nfs_commonacl.c +++ b/sys/fs/nfs/nfs_commonacl.c @@ -58,7 +58,11 @@ nfsrv_dissectace(struct nfsrv_descript *nd, struct acl_entry *acep, flag = fxdr_unsigned(u_int32_t, *tl++); mask = fxdr_unsigned(u_int32_t, *tl++); len = fxdr_unsigned(int, *tl); - if (len < 0) { + /* + * The RFCs do not specify a limit to the length of the "who", but + * NFSV4_OPAQUELIMIT (1024) should be sufficient. + */ + if (len < 0 || len > NFSV4_OPAQUELIMIT) { error = NFSERR_BADXDR; goto nfsmout; } else if (len == 0) { diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 910f10eb1b4a..d882d248ef7f 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -1107,6 +1107,14 @@ nfsrv_dissectacl(struct nfsrv_descript *nd, NFSACL_T *aclp, int *aclerrp, NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); aclsize = NFSX_UNSIGNED; acecnt = fxdr_unsigned(int, *tl); + /* + * The RFCs do not define a fixed limit to the number of ACEs in + * an ACL, but 10240 should be more than sufficient. + */ + if (acecnt < 0 || acecnt > 10240) { + error = NFSERR_BADXDR; + goto nfsmout; + } if (acecnt > ACL_MAX_ENTRIES) aceerr = NFSERR_ATTRNOTSUPP; if (nfsrv_useacl == 0) @@ -1492,6 +1500,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, } else { error = nfsrv_dissectacl(nd, NULL, &aceerr, &cnt, p); + if (error) + goto nfsmout; *retcmpp = NFSERR_ATTRNOTSUPP; } } From nobody Wed Dec 1 22:05:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D5B8918BC9F9; Wed, 1 Dec 2021 22:05: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 4J4CnW3hzZz3mxy; Wed, 1 Dec 2021 22:05:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5EECD11F4D; Wed, 1 Dec 2021 22:05: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 1B1M5JFq014615; Wed, 1 Dec 2021 22:05:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1M5Jco014614; Wed, 1 Dec 2021 22:05:19 GMT (envelope-from git) Date: Wed, 1 Dec 2021 22:05:19 GMT Message-Id: <202112012205.1B1M5Jco014614@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 2cd26a286a9e - stable/13 - nfsd: Add a new rc variable nfs_server_maxio List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2cd26a286a9e6339a3c6782a7101cbbd5d166666 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638396319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZ//AE9OVL58fBGZYSiy1LZE0AZo1nGjs2XpryZ16P4=; b=jdThU3gyDjWlrxPV/g37VP8HsAuJW4hsP+hnh7mnAwTjUwEu+tGPjE9UxfytDu10Bi39c+ 74Vb5ZGysqE7u+D9YpCb3vqN59A86irmBWORI7xlWJk0kWWkV1tVB/PCuCGNqy67dlW0U/ ssl0t63UjbxL3TzTBckjuYPeY/EVYg89fRHMZ0mJm1gCs8PbRGiyJ7WR0yz+O07UsUgQxO l8x9zM66a9lmNlDrQtD9P9WIofAVyHtnZs+RujhA4nvhRTWorUPtWqc66Mife6foHO9vJ3 N+rJqoVseiprpbW2Dyw//P+FuI7ojUEAX5R6ovtPC9AxixvKcyRSsocUsn0XZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638396319; a=rsa-sha256; cv=none; b=l/eO7VNTWh402haEzBCQ1UFyQVHyHUtAnkEz7GRiwgWBOlklt3o5lyCk94m5lBfRMecrpK eU3KtpoDn+pujxHz6Al6o8+UFoeDZ0dJzT9VliMn9Dq3dUxrUnPpaKnyJcKkOnSHA0Qb6p oxxcw9z3wyuapv8tC+qanXSP2/UA7BykiEIAxT3HVRSMKAtvYsR7foEeqf/JiKytSm9L6r fTAw+hqPFsFCPc4s/x8N0OdPsieHVGboh1CDxrWtnK4QoSolZPKrrB5hK8+oKDRFD3Uy9a QhURjKmCu7eU481EbZnJy2Z+DwsBVh0DGStKcf0oNHAnjvlSrXt0QrGdbdrVZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=2cd26a286a9e6339a3c6782a7101cbbd5d166666 commit 2cd26a286a9e6339a3c6782a7101cbbd5d166666 Author: Rick Macklem AuthorDate: 2021-11-17 00:02:53 +0000 Commit: Rick Macklem CommitDate: 2021-12-01 22:01:57 +0000 nfsd: Add a new rc variable nfs_server_maxio Since vfs.nfsd.srvmaxio can only be set when nfsd.ko is loaded, but nfsd is not running, setting it in /etc/sysctl.conf is not feasible when "options NFSD" was not specified for the kernel. This patch adds a new rc variable nfs_server_maxio, which sets vfs.nfsd.srvmaxio at the correct time. rc.conf.5 will be patched separately. (cherry picked from commit 5509bad74e44eed3b9d54fbd74d3752b88428147) --- libexec/rc/rc.conf | 1 + libexec/rc/rc.d/nfsd | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index e4fc9a1d75fe..9336a9d91004 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -360,6 +360,7 @@ nfs_access_cache="60" # Client cache timeout in seconds nfs_server_enable="NO" # This host is an NFS server (or NO). nfs_server_flags="-u -t" # Flags to nfsd (if enabled). nfs_server_managegids="NO" # The NFS server maps gids for AUTH_SYS (or NO). +nfs_server_maxio="131072" # Maximum I/O size for the nfsd. mountd_enable="NO" # Run mountd (or NO). mountd_flags="-r -S" # Flags to mountd (if NFS server enabled). weak_mountd_authentication="NO" # Allow non-root mount requests to be served. diff --git a/libexec/rc/rc.d/nfsd b/libexec/rc/rc.d/nfsd index 1d0689b3beb7..b746cf7cea9d 100755 --- a/libexec/rc/rc.d/nfsd +++ b/libexec/rc/rc.d/nfsd @@ -28,6 +28,12 @@ nfsd_precmd() # oids are available. load_kld nfsd || return 1 + if [ -n "${nfs_server_maxio}" ]; then + if ! sysctl vfs.nfsd.srvmaxio=${nfs_server_maxio} >/dev/null; then + warn "Failed to set server max I/O" + fi + fi + if checkyesno nfs_reserved_port_only; then echo 'NFS on reserved port only=YES' sysctl vfs.nfsd.nfs_privport=1 > /dev/null From nobody Wed Dec 1 22:46:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 625A218B2644; Wed, 1 Dec 2021 22:46: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 4J4DhT0DVwz4Xkm; Wed, 1 Dec 2021 22:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5E151223E; Wed, 1 Dec 2021 22:46: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 1B1Mk0U5067471; Wed, 1 Dec 2021 22:46:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Mk0mO067470; Wed, 1 Dec 2021 22:46:00 GMT (envelope-from git) Date: Wed, 1 Dec 2021 22:46:00 GMT Message-Id: <202112012246.1B1Mk0mO067470@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: f31398c536bb - main - Prune leftovers from cloudabi(4), ng_h4(4), and sppp(4) removals. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f31398c536bb37c0ffd4c925acf4b601666358a4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638398761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0G0C2fndDbwNPfRlIycPjcHm/Yew2Kwe3PxYk9BiOJk=; b=Hc9NfavTSVf1I6pD5CAOFnYjet4OJkDqRB5mQNFXj1aKP1zyXiKWEPV0q1bFfQP5bI19E1 R3C/ZAQAXNACPsoVy2ehoDnP7UmGYs0pbsXkHPpsB9GMOJvyQwnlQwhEf88gbQoc722omz QJkG8XNwHqiSysAncNTUJXiHyqW12DYigoLZ36enbZjKmuin5eSr4nZpLTMtX2xKyvRQ96 C4CS2uSDMKaoHo79HxwM0AXV1rQxpBF2/KNQ6WyvSO/UO8cMPRZ3cKOeuh5OzuBhOY8OmV qz+FV2mpBwBvTvJOa74IeJ/IYC/647LJwP0o1yW5vohrV+cpzJ/v+caUondMNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638398761; a=rsa-sha256; cv=none; b=e1la3iznHe4kIbl9jJZ6kon6AD6YRhpG9BfSKB+dGlUY2U+iaqGuE/aOo9hJgcMFIRq08l qQnXCyMZaPXRZEQF4TBlQl9usqRPE2hnhmhylGKJIbSqBCGwczszrwIJbLs7joWgM89piT x9UyT0BHtrtnrr7OQYSmxtnY71W0Hi4NsVvFOudKPxyS+aiXR0IHWIHfeHX4IR8uAWNHqa chKGHCimRDcxnK2MjkBTh3zc80lvpi1PcwaaVV0iEZ9or7M1qooRIXlt25lJ5vSVh1C+NJ nux5v7nBCNzC+fe49T78P94ltRdTFAVqW9c6n+wy0lASc2QYekA2IKvSyIZN6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f31398c536bb37c0ffd4c925acf4b601666358a4 commit f31398c536bb37c0ffd4c925acf4b601666358a4 Author: John Baldwin AuthorDate: 2021-12-01 22:14:58 +0000 Commit: John Baldwin CommitDate: 2021-12-01 22:14:58 +0000 Prune leftovers from cloudabi(4), ng_h4(4), and sppp(4) removals. Reported by: Mark Millard --- ObsoleteFiles.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index ac84263ab1b7..dd81e88e3c89 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -504,6 +504,8 @@ OLD_FILES+=usr/share/man/man4/iscsi_initiator.4.gz OLD_FILES+=usr/share/man/man8/iscontrol.8.gz # 20211022 +OLD_FILES+=etc/rc.d/sppp +OLD_FILES+=rescue/spppcontrol OLD_FILES+=sbin/spppcontrol .if ${TARGET_ARCH} == "i386" OLD_FILES+=usr/include/machine/cserial.h @@ -519,6 +521,7 @@ OLD_FILES+=usr/sbin/hcseriald OLD_FILES+=usr/share/man/man8/hcseriald.8.gz # 20210929: Remove ng_h4 +OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_h4.h OLD_FILES+=usr/share/man/man4/ng_h4.4.gz # 20210923: rename boot(9) to kern_reboot(9) @@ -526,6 +529,8 @@ OLD_FILES+=usr/share/man/man9/boot.9.gz # 20210921: remove cloudabi OLD_FILES+=usr/share/man/man4/cloudabi.4.gz +OLD_FILES+=usr/share/man/man4/cloudabi32.4.gz +OLD_FILES+=usr/share/man/man4/cloudabi64.4.gz # 20210906: stop installing {llvm,clang,lldb}-tblgen OLD_FILES+=usr/bin/llvm-tblgen From nobody Wed Dec 1 22:46:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 565CE18B2747; Wed, 1 Dec 2021 22:46: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 4J4DhV04pnz4Y0Z; Wed, 1 Dec 2021 22:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D0DF612476; Wed, 1 Dec 2021 22:46: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 1B1Mk1DL067495; Wed, 1 Dec 2021 22:46:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Mk11A067494; Wed, 1 Dec 2021 22:46:01 GMT (envelope-from git) Date: Wed, 1 Dec 2021 22:46:01 GMT Message-Id: <202112012246.1B1Mk11A067494@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: 22375931e46f - main - Remove sparc64 lastcomm/sa 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22375931e46f469f77f5e94462073aa34076d654 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638398762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HldgfS8TDtN2jwM8gb8FqaHB/V7MSz+dR3nEGqXKyno=; b=MBfekFhwTptYl677ZvrB60II/NeboeM2+7HUWi5rL5rLV2Ighs4nfVzDeOQwW8s1jq1p14 WiaoOYfWmIyQ4KkMJkb1Mpzna0IXA90ChUMGd8+cpstYsEcSABDFXmiURGeMdV4ghWXERa eeOy9Li9QT2/+2KFa2hI3Dp9/1GvAQC3mzlCqiwl5LkOflEPYqsObBxov6cdM5M7/Hw5bE 2QRM/nkidL/unnMzg3yu/DRM47l6Bt0Sx1SgeI3+VwuDmXrh3xiN6v7sRP66haaS7B7kEP /kUyb0Xb7IO8gjyD+tnwGh/WrGktWpDNBeiJeFXqg3Mz1bl0BG+qBbd86TgMjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638398762; a=rsa-sha256; cv=none; b=dR+iIHxAIs6cP5roCjnylAjcES7jpKzJBqUMBni3LzpAGgCHqlC++TT14C65sK7PzfjSQu 43TpFDsWGiRnQnkaT48142hXofWMtRfFY62b1HAFQNMvfXvyEGb6Tb3mmSvEy3RTmV+c8d uTlaL74kQWv1u8YYLjn5lftnamRVGGKfVVr0GofoFKBZMsi2M27l+n3MpnzMq2fxSjc9Bf eFQyo07cJUpAN2EQmdQOlzzyua/g2Y803fwf2ChRhdPGsMYtIPxT7C3egL+WjMcJab7/Vo b86/Y9uU2nRffXSLpKnAG2fZIJNoc7j3v7YCoI/dxuY2dSyRqBX/SWfEpUH3bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=22375931e46f469f77f5e94462073aa34076d654 commit 22375931e46f469f77f5e94462073aa34076d654 Author: John Baldwin AuthorDate: 2021-12-01 22:14:58 +0000 Commit: John Baldwin CommitDate: 2021-12-01 22:14:58 +0000 Remove sparc64 lastcomm/sa tests. Reported by: Mark Millard Fixes: d6dffbae9662 lastcomm/sa: Remove sparc64 tests, they aren't needed. --- ObsoleteFiles.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index dd81e88e3c89..984437f481fd 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -516,6 +516,20 @@ OLD_FILES+=usr/share/man/man4/ng_sppp.4.gz OLD_FILES+=usr/share/man/man4/sppp.4.gz OLD_FILES+=usr/share/man/man8/spppcontrol.8.gz +# 20211004: Removed sparc64 tests for lastcomm/sa +OLD_FILES+=usr/tests/usr.bin/lastcomm/v1-sparc64-acct.in +OLD_FILES+=usr/tests/usr.bin/lastcomm/v1-sparc64.out +OLD_FILES+=usr/tests/usr.bin/lastcomm/v2-sparc64-acct.in +OLD_FILES+=usr/tests/usr.bin/lastcomm/v2-sparc64.out +OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-sav.in +OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-sav.out +OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-u.out +OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-usr.in +OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-usr.out +OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-sav.in +OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-u.out +OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-usr.in + # 20210929: OLD_FILES+=usr/sbin/hcseriald OLD_FILES+=usr/share/man/man8/hcseriald.8.gz From nobody Wed Dec 1 22:46:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DC45C18B2824; Wed, 1 Dec 2021 22:46: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 4J4DhW53LHz4XmT; Wed, 1 Dec 2021 22:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0394412527; Wed, 1 Dec 2021 22:46: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 1B1Mk2Gh067526; Wed, 1 Dec 2021 22:46:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Mk2Wq067525; Wed, 1 Dec 2021 22:46:02 GMT (envelope-from git) Date: Wed, 1 Dec 2021 22:46:02 GMT Message-Id: <202112012246.1B1Mk2Wq067525@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: 99188582cc9b - main - Add various profiled libraries missing from the WITHOUT_PROFILE list. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99188582cc9bf37acf1653ad4a0c2b51666d7107 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638398764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bgp60/IjNHJiFqLGxirKnc31iZZooWGK/oBIJ0RfbUc=; b=bi/UIksjpFPPGKxiFBYJvnTT5nLOJTfOgX/9vSuanTmX6qe7eXY1XmxsE9QKCu08UpAW35 d2oHHv7r6ffrnsLlbloYkq8Ze2u7N9TIs+kfaRdV1fJ3tq1TdgpRmGap6/Ec6IDfX02bHc zonBVNvWtoQxPnuiTru0sN+1jYU9XWzVUY0zmFysGejf/O+ZmBMS1v6DgKNl9MdaOqBjty 6Kn6eI9kwQzCTDO0oQIydY9KDqW8oPY2Tx/Z389QtSglhxWFsMpQfmJ/RaFg2d9JXaTgV+ jX9ViGmUSnpR9iSG/r0/IYpnNPni3gVGOpS3qRdduk328ovCXwndJWEP94viNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638398764; a=rsa-sha256; cv=none; b=RcG3BacNu5UlLiq/rI+2AdzZ9MjJ6sPmltd5v6QI7bAd/4iZTO2/AOiMZcA0dqMTmOqzOQ T1Tx52tsWxQ7B43l5mvXZg0f8ssxoBl3S3YQeG0NWy0SyNJR2LeRc7jvaU30sjNvEEZpSV 6R81keBZDiRdmW33ZvyGUxo/K/OhZLWfLw6C/reXTAu7xvFctEb6Y6eKWMoHffqQnq8qzu +KKDJ96+LMTSO6SqGjsAXXwtpnf4I6yzYj4eBMEdOxpdCfo6pl1UYTdZA5XjQcr3aIehQe sDdwCPlbI7zR8Fd40uTthS/U81tK/y9dH03hoK6ZXdiM2WmfdrU2n9eR/cyPOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=99188582cc9bf37acf1653ad4a0c2b51666d7107 commit 99188582cc9bf37acf1653ad4a0c2b51666d7107 Author: John Baldwin AuthorDate: 2021-12-01 22:22:29 +0000 Commit: John Baldwin CommitDate: 2021-12-01 22:22:29 +0000 Add various profiled libraries missing from the WITHOUT_PROFILE list. Reported by: Mark Millard --- tools/build/mk/OptionalObsoleteFiles.inc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index d7531e188985..09e09b6a0d9c 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -7462,6 +7462,7 @@ OLD_FILES+=usr/share/man/man8/pppctl.8.gz .if ${MK_PROFILE} == no OLD_FILES+=usr/lib/lib80211_p.a +OLD_FILES+=usr/lib/lib9p_p.a OLD_FILES+=usr/lib/libBlocksRuntime_p.a OLD_FILES+=usr/lib/libalias_dummy_p.a OLD_FILES+=usr/lib/libalias_ftp_p.a @@ -7528,6 +7529,8 @@ OLD_FILES+=usr/lib/libheimntlm_p.a OLD_FILES+=usr/lib/libheimsqlite_p.a OLD_FILES+=usr/lib/libhistory_p.a OLD_FILES+=usr/lib/libhx509_p.a +OLD_FILES+=usr/lib/libicp_p.a +OLD_FILES+=usr/lib/libicp_rescue_p.a OLD_FILES+=usr/lib/libipsec_p.a OLD_FILES+=usr/lib/libipt_p.a OLD_FILES+=usr/lib/libjail_p.a @@ -7553,6 +7556,7 @@ OLD_FILES+=usr/lib/libmt_p.a OLD_FILES+=usr/lib/libncurses_p.a OLD_FILES+=usr/lib/libncursesw_p.a OLD_FILES+=usr/lib/libnetgraph_p.a +OLD_FILES+=usr/lib/libnetmap_p.a OLD_FILES+=usr/lib/libngatm_p.a OLD_FILES+=usr/lib/libnv_p.a OLD_FILES+=usr/lib/libnvpair_p.a @@ -7564,9 +7568,17 @@ OLD_FILES+=usr/lib/libpathconv_p.a OLD_FILES+=usr/lib/libpcap_p.a OLD_FILES+=usr/lib/libpjdlog_p.a OLD_FILES+=usr/lib/libpmc_p.a +OLD_FILES+=usr/lib/libprivateatf-c++_p.a +OLD_FILES+=usr/lib/libprivateatf-c_p.a +OLD_FILES+=usr/lib/libprivateauditd_p.a OLD_FILES+=usr/lib/libprivatebsdstat_p.a OLD_FILES+=usr/lib/libprivatedevdctl_p.a OLD_FILES+=usr/lib/libprivateevent_p.a +OLD_FILES+=usr/lib/libprivateevent1_p.a +OLD_FILES+=usr/lib/libprivategmock_main_p.a +OLD_FILES+=usr/lib/libprivategmock_p.a +OLD_FILES+=usr/lib/libprivategtest_main_p.a +OLD_FILES+=usr/lib/libprivategtest_p.a OLD_FILES+=usr/lib/libprivateheimipcc_p.a OLD_FILES+=usr/lib/libprivateheimipcs_p.a OLD_FILES+=usr/lib/libprivateifconfig_p.a @@ -7589,7 +7601,9 @@ OLD_FILES+=usr/lib/librtld_db_p.a OLD_FILES+=usr/lib/libsbuf_p.a OLD_FILES+=usr/lib/libsdp_p.a OLD_FILES+=usr/lib/libsmb_p.a +OLD_FILES+=usr/lib/libspl_p.a OLD_FILES+=usr/lib/libssl_p.a +OLD_FILES+=usr/lib/libstats_p.a OLD_FILES+=usr/lib/libstdbuf_p.a OLD_FILES+=usr/lib/libstdc++_p.a OLD_FILES+=usr/lib/libstdthreads_p.a @@ -7604,6 +7618,7 @@ OLD_FILES+=usr/lib/libthr_p.a OLD_FILES+=usr/lib/libthread_db_p.a OLD_FILES+=usr/lib/libtinfo_p.a OLD_FILES+=usr/lib/libtinfow_p.a +OLD_FILES+=usr/lib/libtpool_p.a OLD_FILES+=usr/lib/libufs_p.a OLD_FILES+=usr/lib/libugidfw_p.a OLD_FILES+=usr/lib/libulog_p.a @@ -7623,6 +7638,8 @@ OLD_FILES+=usr/lib/libypclnt_p.a OLD_FILES+=usr/lib/libz_p.a OLD_FILES+=usr/lib/libzfs_core_p.a OLD_FILES+=usr/lib/libzfs_p.a +OLD_FILES+=usr/lib/libzfsbootenv_p.a +OLD_FILES+=usr/lib/libzutil_p.a OLD_FILES+=usr/lib/libprivateldns_p.a OLD_FILES+=usr/lib/libprivatessh_p.a .endif From nobody Wed Dec 1 22:46:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6CBB318B2889; Wed, 1 Dec 2021 22:46: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 4J4DhX41fGz4Y07; Wed, 1 Dec 2021 22:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C6E3122EB; Wed, 1 Dec 2021 22:46: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 1B1Mk4kJ067550; Wed, 1 Dec 2021 22:46:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Mk3eC067549; Wed, 1 Dec 2021 22:46:03 GMT (envelope-from git) Date: Wed, 1 Dec 2021 22:46:03 GMT Message-Id: <202112012246.1B1Mk3eC067549@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: 07c2b29b6ed8 - main - Trim a couple of duplicate entries from WITHOUT_PROFILE. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 07c2b29b6ed805bade2751a53274bb3dd3d20edd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638398765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ouRehM7vd6i5TvJa59hnv/gERUgXnKH7Fhhu147+7IU=; b=xPpFNnhmco0P+MUyHGFaO11agHauHV1d16x8RFVJN92Mi8ZRU9voyTpGIWCN/i/glI+/j9 NdGIhEGhmmAb5x1c1lpZTK0Tfey/nDb+d0WD5R6/UjTPWcP1omazFRa1NaKb2vG7OG9MS/ WhoKe0Ocpmostem1HQJtsTn+NhnVR8FTbPmK4ryr0rTJhgDMx8A1GPHC4IoAW0pb3W+80W J9uLjJfP43VDuxtkdr/wa6kxRZLgUOokAExTjW6E+ngax2Rbyo4OUunJAOxZFbZbaBhDut TzqYmS+BXQbRpVQ93OI96T/T3NM7Ezk3QjkweyqukngOGaopwsLOdr4lh3+0Iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638398765; a=rsa-sha256; cv=none; b=nnQBaleKsyY01rRiQ1vbWIWv8xKFDPAGKOykBL3fo+qPxWL6dhbwEKcNCExCV1Dbf8adWk 3pKAvVLbXuiLwXgxgZlaeqCZJN7xfY9PYSqzRwvzMQ3IJCigAl9tYYNBplXApABiCat9tR t/st5uchI1MJ8llC528STvlDBl1gwuzmfK1gAiwkuwfJsF2oix2hIOpNZyqgr/PLAKI9xS k7p2U23LhqaacRN8Shjr7qDBvC91xetr3Xo/vrSRVZmORIQFZo3hfmZrZDGPBjdkTwGsJ3 sqw65Hf/Mpt7oRFXC8Mo6JTf13bt9epnd3U5hOjFOlcZSa7pvPakY/YOxtk9Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=07c2b29b6ed805bade2751a53274bb3dd3d20edd commit 07c2b29b6ed805bade2751a53274bb3dd3d20edd Author: John Baldwin AuthorDate: 2021-12-01 22:23:31 +0000 Commit: John Baldwin CommitDate: 2021-12-01 22:23:31 +0000 Trim a couple of duplicate entries from WITHOUT_PROFILE. --- tools/build/mk/OptionalObsoleteFiles.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 09e09b6a0d9c..98899681c7a2 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -7640,8 +7640,6 @@ OLD_FILES+=usr/lib/libzfs_core_p.a OLD_FILES+=usr/lib/libzfs_p.a OLD_FILES+=usr/lib/libzfsbootenv_p.a OLD_FILES+=usr/lib/libzutil_p.a -OLD_FILES+=usr/lib/libprivateldns_p.a -OLD_FILES+=usr/lib/libprivatessh_p.a .endif .if ${MK_QUOTAS} == no From nobody Wed Dec 1 22:46:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 15F5618B2998; Wed, 1 Dec 2021 22:46: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 4J4DhZ325Gz4XlD; Wed, 1 Dec 2021 22:46:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E0E912781; Wed, 1 Dec 2021 22:46: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 1B1Mk5iv067574; Wed, 1 Dec 2021 22:46:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Mk5IM067573; Wed, 1 Dec 2021 22:46:05 GMT (envelope-from git) Date: Wed, 1 Dec 2021 22:46:05 GMT Message-Id: <202112012246.1B1Mk5IM067573@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: 610d908f8a6a - main - Add lib32 entries for WITHOUT_PROFILE. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 610d908f8a6a2c152bf45dfaf1ada119c513c04b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638398767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DEaxfgPh80RZEl2aguRMmj8RhUACuSYEKM23RIkXzmI=; b=oP7TKmHZ3IuaCURnWsYVwE3AQdvyrNZO24NKK3CJKtvMtxbipPu7pJKo+rXCr4WOLRjx3c LSoGBqdvrxoJ9tx0Bra1PZYZ4ioRvCx3brio5tY0Ap5CLxgR09z6oPqU9HKHIa6j3dBgq/ ZiVmEKeF795mgU8eRBNjBtLa1+TW6/1vBgXJlFxaukKBFvcSmNIbxeXxn4TEZjGgWAkXyt VPQM5rYqoNvoA/HFVsl84Lb9eIXu1B4OMbnASAnyPUqWUbP+H+p5Kf4O6mV53noByGgl3S 7tk8HHIupDD/n8riqDPySGy+OUbhfSNS76cpGW7aWvc0OcKlWSKrp4UxeVF65w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638398767; a=rsa-sha256; cv=none; b=PanBxVR3G2Twn7EY7mHG9JaiTrdNqTpk7LKKG0nDQyPUcZhmc7o19Z9t8wuaSd2FefMFsr aQhud8ut1hHXr2Amtq1hCDkzZIvjTRLUtEuihPlFXyGCO//JbslAGFLqjy92+Ooaerz6jo RKWodIuQyDQL4hHrLnKYqHBbtHXM8Yeg+E9BlgvYXp+TxZXeC5rAe2PJIhu8yTCNJcySgi hy/dwOCDoHsqHW+N1pRNpYI6lxrSC9iMCeX7T88R8lGFQGUB5FtDCRulkwc/1SIHXfbed9 iHb/YC9wKaHiI6VJezq/XWeRhecJ7ZCKPob4uGy5qN27YdGAu4CG9g1fZNLOrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=610d908f8a6a2c152bf45dfaf1ada119c513c04b commit 610d908f8a6a2c152bf45dfaf1ada119c513c04b Author: John Baldwin AuthorDate: 2021-12-01 22:25:37 +0000 Commit: John Baldwin CommitDate: 2021-12-01 22:25:37 +0000 Add lib32 entries for WITHOUT_PROFILE. Reported by: Mark Millard --- tools/build/mk/OptionalObsoleteFiles.inc | 179 +++++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 98899681c7a2..4082492f0fe7 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -7640,6 +7640,185 @@ OLD_FILES+=usr/lib/libzfs_core_p.a OLD_FILES+=usr/lib/libzfs_p.a OLD_FILES+=usr/lib/libzfsbootenv_p.a OLD_FILES+=usr/lib/libzutil_p.a +OLD_FILES+=usr/lib32/lib80211_p.a +OLD_FILES+=usr/lib32/lib9p_p.a +OLD_FILES+=usr/lib32/libBlocksRuntime_p.a +OLD_FILES+=usr/lib32/libalias_dummy_p.a +OLD_FILES+=usr/lib32/libalias_ftp_p.a +OLD_FILES+=usr/lib32/libalias_irc_p.a +OLD_FILES+=usr/lib32/libalias_nbt_p.a +OLD_FILES+=usr/lib32/libalias_p.a +OLD_FILES+=usr/lib32/libalias_pptp_p.a +OLD_FILES+=usr/lib32/libalias_skinny_p.a +OLD_FILES+=usr/lib32/libalias_smedia_p.a +OLD_FILES+=usr/lib32/libarchive_p.a +OLD_FILES+=usr/lib32/libasn1_p.a +OLD_FILES+=usr/lib32/libauditd_p.a +OLD_FILES+=usr/lib32/libavl_p.a +OLD_FILES+=usr/lib32/libbe_p.a +OLD_FILES+=usr/lib32/libbegemot_p.a +OLD_FILES+=usr/lib32/libblacklist_p.a +OLD_FILES+=usr/lib32/libbluetooth_p.a +OLD_FILES+=usr/lib32/libbsdxml_p.a +OLD_FILES+=usr/lib32/libbsm_p.a +OLD_FILES+=usr/lib32/libbsnmp_p.a +OLD_FILES+=usr/lib32/libbz2_p.a +OLD_FILES+=usr/lib32/libc++_p.a +OLD_FILES+=usr/lib32/libc_p.a +OLD_FILES+=usr/lib32/libcalendar_p.a +OLD_FILES+=usr/lib32/libcam_p.a +OLD_FILES+=usr/lib32/libcom_err_p.a +OLD_FILES+=usr/lib32/libcompat_p.a +OLD_FILES+=usr/lib32/libcompiler_rt_p.a +OLD_FILES+=usr/lib32/libcrypt_p.a +OLD_FILES+=usr/lib32/libcrypto_p.a +OLD_FILES+=usr/lib32/libctf_p.a +OLD_FILES+=usr/lib32/libcurses_p.a +OLD_FILES+=usr/lib32/libcursesw_p.a +OLD_FILES+=usr/lib32/libcuse_p.a +OLD_FILES+=usr/lib32/libcxxrt_p.a +OLD_FILES+=usr/lib32/libdevctl_p.a +OLD_FILES+=usr/lib32/libdevinfo_p.a +OLD_FILES+=usr/lib32/libdevstat_p.a +OLD_FILES+=usr/lib32/libdialog_p.a +OLD_FILES+=usr/lib32/libdl_p.a +OLD_FILES+=usr/lib32/libdpv_p.a +OLD_FILES+=usr/lib32/libdtrace_p.a +OLD_FILES+=usr/lib32/libdwarf_p.a +OLD_FILES+=usr/lib32/libedit_p.a +OLD_FILES+=usr/lib32/libefivar_p.a +OLD_FILES+=usr/lib32/libelf_p.a +OLD_FILES+=usr/lib32/libexecinfo_p.a +OLD_FILES+=usr/lib32/libfetch_p.a +OLD_FILES+=usr/lib32/libfigpar_p.a +OLD_FILES+=usr/lib32/libfl_p.a +OLD_FILES+=usr/lib32/libform_p.a +OLD_FILES+=usr/lib32/libformw_p.a +OLD_FILES+=usr/lib32/libgcc_eh_p.a +OLD_FILES+=usr/lib32/libgcc_p.a +OLD_FILES+=usr/lib32/libgeom_p.a +OLD_FILES+=usr/lib32/libgpio_p.a +OLD_FILES+=usr/lib32/libgssapi_krb5_p.a +OLD_FILES+=usr/lib32/libgssapi_ntlm_p.a +OLD_FILES+=usr/lib32/libgssapi_p.a +OLD_FILES+=usr/lib32/libgssapi_spnego_p.a +OLD_FILES+=usr/lib32/libhdb_p.a +OLD_FILES+=usr/lib32/libheimbase_p.a +OLD_FILES+=usr/lib32/libheimntlm_p.a +OLD_FILES+=usr/lib32/libheimsqlite_p.a +OLD_FILES+=usr/lib32/libhistory_p.a +OLD_FILES+=usr/lib32/libhx509_p.a +OLD_FILES+=usr/lib32/libicp_p.a +OLD_FILES+=usr/lib32/libicp_rescue_p.a +OLD_FILES+=usr/lib32/libipsec_p.a +OLD_FILES+=usr/lib32/libipt_p.a +OLD_FILES+=usr/lib32/libjail_p.a +OLD_FILES+=usr/lib32/libkadm5clnt_p.a +OLD_FILES+=usr/lib32/libkadm5srv_p.a +OLD_FILES+=usr/lib32/libkafs5_p.a +OLD_FILES+=usr/lib32/libkdc_p.a +OLD_FILES+=usr/lib32/libkiconv_p.a +OLD_FILES+=usr/lib32/libkrb5_p.a +OLD_FILES+=usr/lib32/libkvm_p.a +OLD_FILES+=usr/lib32/libl_p.a +OLD_FILES+=usr/lib32/libln_p.a +OLD_FILES+=usr/lib32/liblzma_p.a +OLD_FILES+=usr/lib32/libm_p.a +OLD_FILES+=usr/lib32/libmagic_p.a +OLD_FILES+=usr/lib32/libmd_p.a +OLD_FILES+=usr/lib32/libmemstat_p.a +OLD_FILES+=usr/lib32/libmenu_p.a +OLD_FILES+=usr/lib32/libmenuw_p.a +OLD_FILES+=usr/lib32/libmilter_p.a +OLD_FILES+=usr/lib32/libmp_p.a +OLD_FILES+=usr/lib32/libmt_p.a +OLD_FILES+=usr/lib32/libncurses_p.a +OLD_FILES+=usr/lib32/libncursesw_p.a +OLD_FILES+=usr/lib32/libnetgraph_p.a +OLD_FILES+=usr/lib32/libnetmap_p.a +OLD_FILES+=usr/lib32/libngatm_p.a +OLD_FILES+=usr/lib32/libnv_p.a +OLD_FILES+=usr/lib32/libnvpair_p.a +OLD_FILES+=usr/lib32/libopencsd_p.a +OLD_FILES+=usr/lib32/libopie_p.a +OLD_FILES+=usr/lib32/libpanel_p.a +OLD_FILES+=usr/lib32/libpanelw_p.a +OLD_FILES+=usr/lib32/libpathconv_p.a +OLD_FILES+=usr/lib32/libpcap_p.a +OLD_FILES+=usr/lib32/libpjdlog_p.a +OLD_FILES+=usr/lib32/libpmc_p.a +OLD_FILES+=usr/lib32/libprivateatf-c++_p.a +OLD_FILES+=usr/lib32/libprivateatf-c_p.a +OLD_FILES+=usr/lib32/libprivateauditd_p.a +OLD_FILES+=usr/lib32/libprivatebsdstat_p.a +OLD_FILES+=usr/lib32/libprivatedevdctl_p.a +OLD_FILES+=usr/lib32/libprivateevent_p.a +OLD_FILES+=usr/lib32/libprivateevent1_p.a +OLD_FILES+=usr/lib32/libprivategmock_main_p.a +OLD_FILES+=usr/lib32/libprivategmock_p.a +OLD_FILES+=usr/lib32/libprivategtest_main_p.a +OLD_FILES+=usr/lib32/libprivategtest_p.a +OLD_FILES+=usr/lib32/libprivateheimipcc_p.a +OLD_FILES+=usr/lib32/libprivateheimipcs_p.a +OLD_FILES+=usr/lib32/libprivateifconfig_p.a +OLD_FILES+=usr/lib32/libprivateldns_p.a +OLD_FILES+=usr/lib32/libprivatesqlite3_p.a +OLD_FILES+=usr/lib32/libprivatessh_p.a +OLD_FILES+=usr/lib32/libprivateucl_p.a +OLD_FILES+=usr/lib32/libprivateunbound_p.a +OLD_FILES+=usr/lib32/libprivatezstd_p.a +OLD_FILES+=usr/lib32/libproc_p.a +OLD_FILES+=usr/lib32/libprocstat_p.a +OLD_FILES+=usr/lib32/libpthread_p.a +OLD_FILES+=usr/lib32/libradius_p.a +OLD_FILES+=usr/lib32/libregex_p.a +OLD_FILES+=usr/lib32/libroken_p.a +OLD_FILES+=usr/lib32/librpcsvc_p.a +OLD_FILES+=usr/lib32/librss_p.a +OLD_FILES+=usr/lib32/librt_p.a +OLD_FILES+=usr/lib32/librtld_db_p.a +OLD_FILES+=usr/lib32/libsbuf_p.a +OLD_FILES+=usr/lib32/libsdp_p.a +OLD_FILES+=usr/lib32/libsmb_p.a +OLD_FILES+=usr/lib32/libspl_p.a +OLD_FILES+=usr/lib32/libssl_p.a +OLD_FILES+=usr/lib32/libstats_p.a +OLD_FILES+=usr/lib32/libstdbuf_p.a +OLD_FILES+=usr/lib32/libstdc++_p.a +OLD_FILES+=usr/lib32/libstdthreads_p.a +OLD_FILES+=usr/lib32/libsupc++_p.a +OLD_FILES+=usr/lib32/libsysdecode_p.a +OLD_FILES+=usr/lib32/libtacplus_p.a +OLD_FILES+=usr/lib32/libtermcap_p.a +OLD_FILES+=usr/lib32/libtermcapw_p.a +OLD_FILES+=usr/lib32/libtermlib_p.a +OLD_FILES+=usr/lib32/libtermlibw_p.a +OLD_FILES+=usr/lib32/libthr_p.a +OLD_FILES+=usr/lib32/libthread_db_p.a +OLD_FILES+=usr/lib32/libtinfo_p.a +OLD_FILES+=usr/lib32/libtinfow_p.a +OLD_FILES+=usr/lib32/libtpool_p.a +OLD_FILES+=usr/lib32/libufs_p.a +OLD_FILES+=usr/lib32/libugidfw_p.a +OLD_FILES+=usr/lib32/libulog_p.a +OLD_FILES+=usr/lib32/libumem_p.a +OLD_FILES+=usr/lib32/libusb_p.a +OLD_FILES+=usr/lib32/libusbhid_p.a +OLD_FILES+=usr/lib32/libutempter_p.a +OLD_FILES+=usr/lib32/libutil_p.a +OLD_FILES+=usr/lib32/libuutil_p.a +OLD_FILES+=usr/lib32/libvgl_p.a +OLD_FILES+=usr/lib32/libvmmapi_p.a +OLD_FILES+=usr/lib32/libwind_p.a +OLD_FILES+=usr/lib32/libwrap_p.a +OLD_FILES+=usr/lib32/libxo_p.a +OLD_FILES+=usr/lib32/liby_p.a +OLD_FILES+=usr/lib32/libypclnt_p.a +OLD_FILES+=usr/lib32/libz_p.a +OLD_FILES+=usr/lib32/libzfs_core_p.a +OLD_FILES+=usr/lib32/libzfs_p.a +OLD_FILES+=usr/lib32/libzfsbootenv_p.a +OLD_FILES+=usr/lib32/libzutil_p.a .endif .if ${MK_QUOTAS} == no From nobody Thu Dec 2 00:11:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 69D5A18B2258; Thu, 2 Dec 2021 00:11: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 4J4Gbb0B2Mz3HNC; Thu, 2 Dec 2021 00:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB0941356B; Thu, 2 Dec 2021 00:11: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 1B20BsDE087489; Thu, 2 Dec 2021 00:11:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B20BsCV087488; Thu, 2 Dec 2021 00:11:54 GMT (envelope-from git) Date: Thu, 2 Dec 2021 00:11:54 GMT Message-Id: <202112020011.1B20BsCV087488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 70cb68e7a00a - releng/12.3 - 12.3: update to -RELEASE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/releng/12.3 X-Git-Reftype: branch X-Git-Commit: 70cb68e7a00ac0310a2d0ca428c1d5018e6d39e1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638403915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEzYLHoJ6dYIzJ5BUCgWNA33X78MA6Z4/zh4pt7Auqg=; b=pndwFcBoWctxrzadaoUANAselMQJc5H3R/RRWCvTynxWWbwWI1o+oIHVKD8kO4sviqL/6F duJm9nEkK/DreMpEWjaakkWc/ffOiUIB4+8xMXKxGaAxGoM9TzBHRURD87gwRJqZqVp46W VaGL2B41SKkeAs+WG8rVKbI67UYq5XY0DdQ8PX5mV8azRv1xNEzPjUIkUTv9+ejN/dMwk8 18DlfLGbcW7v2Vk+eziD+LYvBavphplsuLeVBrMm8HKUnTDoe5FSf9oGnYhx/OmI05KbXf +T6o6x0dugiW3R0xIpon+bUvNUqUhtmdwDEWurCYYw8ubkoNcO42FZ93m9Zx7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638403915; a=rsa-sha256; cv=none; b=eoVqj1em+85IyGbxFWsRRw13SXXOfzt8OGRfQN8FnMvJ86t+WQr4SS9imntz3xXN6ZuE8v g+Fhar11YFO3Q6lCdRnZcYz7OAto5ykGaKfvD32nC2tfS/KJkuIlnM9XSDgF4yuTiZlR/L mwnzotpIYB93P9SLyKFsAJmVQTFe1//xYclnJ+LDQNelqwHTZHHuTJkKqeGEeHQmYregaN kvztqZjpuc/99wWaV+AfLtHwkAtDTcHjI8n6GAQn3CY/e6dSH6O6k/Pevh7sYf5bcmNfQL ctomykSAYQDtImBLrrdvWSrCf9krLksAHI0yanoCI2fJtFB0m2NxYqsm5DairQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.3 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=70cb68e7a00ac0310a2d0ca428c1d5018e6d39e1 commit 70cb68e7a00ac0310a2d0ca428c1d5018e6d39e1 Author: Glen Barber AuthorDate: 2021-12-02 00:08:38 +0000 Commit: Glen Barber CommitDate: 2021-12-02 00:08:38 +0000 12.3: update to -RELEASE - Switch releng/12.3 from RC2 to RELEASE. - Add the anticipated 12.3-RELEASE date to UPDATING. - Set a static __FreeBSD_version. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate") --- UPDATING | 3 +++ lib/csu/common/crtbrand.c | 2 +- sys/conf/newvers.sh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/UPDATING b/UPDATING index 88a610e4705c..52e8aaecc102 100644 --- a/UPDATING +++ b/UPDATING @@ -17,6 +17,9 @@ 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. +20211206: + 12.3-RELEASE. + 20210730: Commit b69019c14cd8 removes pf's DIOCGETSTATESNV ioctl. As of be70c7a50d32 it is no longer used by userspace, but it does mean diff --git a/lib/csu/common/crtbrand.c b/lib/csu/common/crtbrand.c index f8fb0024db24..0dc3114b2fa7 100644 --- a/lib/csu/common/crtbrand.c +++ b/lib/csu/common/crtbrand.c @@ -65,7 +65,7 @@ static const struct { .descsz = sizeof(int32_t), .type = NT_FREEBSD_ABI_TAG, .name = NOTE_FREEBSD_VENDOR, - .desc = __FreeBSD_version + .desc = 1203000 }; static const struct { diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index e6ab77045930..c927b4b07864 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -49,7 +49,7 @@ TYPE="FreeBSD" REVISION="12.3" -BRANCH="RC2" +BRANCH="RELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Thu Dec 2 01:08:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2D78518AC1BD; Thu, 2 Dec 2021 01:08: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 4J4Hrw4hjWz3pbC; Thu, 2 Dec 2021 01:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82ABB14499; Thu, 2 Dec 2021 01:08: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 1B218WHT054853; Thu, 2 Dec 2021 01:08:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B218WaW054852; Thu, 2 Dec 2021 01:08:32 GMT (envelope-from git) Date: Thu, 2 Dec 2021 01:08:32 GMT Message-Id: <202112020108.1B218WaW054852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 23e8078bcc0f - stable/13 - rc.conf.5: Add entries for NFS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 23e8078bcc0fe59b2cf0de537db4887c7018aa79 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638407312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wo2I6Y58jAFOM6MIU+pfM0Izcy7wroe2bEVfycDQVGk=; b=JNQDior3/TBnsd/NJZa1mDYAsJ0STJ7LKN7RjMNhq1uwcLpV74nS9CqsY2WhWWRWdlsIBA rDP3pnUf/vGe/Q4ESP8yNiIZAHPduifNZYoq/azxzU/EvpCqtIt/Nd07ErA0b/5bWHzO2a h6eq7X0lbzVDWjeb6wNNSySopeeiGHzFGkf1UKw9DoI54zn+yAkrYHOahOnROub5Z32koZ sh/3B+f/45y6zobOs00/mJ7Y9SyQdIe3VF+3559bbqIsOWZnBdoemWheRmOrvMxh0zqkBQ 6aQK0mM7jN9kpz1u+XPOPALUxmc+hBwNpX8TnWevnRut3qREVjxExcX7ZxxNaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638407312; a=rsa-sha256; cv=none; b=Z9CCt8MgWbJ9NGnXI9C/qCSmF+J+Au9+FqcZmW5R71sKGGifa/9Z1BgL/KoCtANVvSNNR3 cCSzeZy455s+CVjIDKQc1j/rCAqOLCBjgNDWKQZButMiZSJvD7lL9qTRfgFvVkOETmbPte O7iSVcn/qwbIa9lPMHj1AeU1cPdfvl89n5KXIXRRNzXHnB1lK836A3yfjs0HHwIvpko/EU HW8WdTwMr9dTFpC8wlyXa11jVhHRocHXUxpqYZDHMg8bm0ySXZD1yeDdDd8B01NRPIIMGY DqQKFok8/i7vyDSSZMmSAHtwSojYxQ1JBIVOOx74/SjK0rIRP9PausLimlmsjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=23e8078bcc0fe59b2cf0de537db4887c7018aa79 commit 23e8078bcc0fe59b2cf0de537db4887c7018aa79 Author: Rick Macklem AuthorDate: 2021-11-18 15:59:34 +0000 Commit: Rick Macklem CommitDate: 2021-12-02 01:05:12 +0000 rc.conf.5: Add entries for NFS Entries for a few recently defined rc variables were missing from rc.conf.5. This patch adds those. It was not obvious to me what the ordering is, so I added them to the area where other nfsd related variables are. I can easily move them. I also replaced "are" with "is", since it seems to read better. This is a content change. (cherry picked from commit 9dae2d03bc644be38196cf76c55039af1a7c1ba6) --- share/man/man5/rc.conf.5 | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 96db269407cd..883937a619ee 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2021 +.Dd November 18, 2021 .Dt RC.CONF 5 .Os .Sh NAME @@ -2371,9 +2371,40 @@ is set to .Dq Li YES and .Va nfsv4_server_enable -are set to +is set to .Dq Li YES , enable the server for NFSv4 as well as NFSv2 and NFSv3. +.It Va nfsv4_server_only +.Pq Vt bool +If +.Va nfs_server_enable +is set to +.Dq Li YES +and +.Va nfsv4_server_only +is set to +.Dq Li YES , +enable the NFS server for NFSv4 only. +.It Va nfs_server_maxio +.Pq Vt int +value to set vfs.nfsd.srvmaxio to, which is the +maximum I/O size for the NFS server. +.It Va tlsclntd_enable +.Pq Vt bool +If set to +.Dq Li YES , +run the +.Xr rpc.tlsclntd 8 +daemon, which is needed for NFS-over-TLS NFS mounts. +.It Va tlsservd_enable +.Pq Vt bool +If set to +.Dq Li YES , +run the +.Xr rpc.tlsservd 8 +daemon, which is needed for the +.Xr nfsd 8 +to support NFS-over-TLS NFS mounts. .It Va nfsuserd_enable .Pq Vt bool If @@ -4649,6 +4680,8 @@ it will be made permanently active. .Xr routed 8 , .Xr rpc.lockd 8 , .Xr rpc.statd 8 , +.Xr rpc.tlsclntd 8 , +.Xr rpc.tlsservd 8 , .Xr rpcbind 8 , .Xr rwhod 8 , .Xr savecore 8 , From nobody Thu Dec 2 01:12:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4442F18AE701; Thu, 2 Dec 2021 01:12: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 4J4Hy26kHgz3rLP; Thu, 2 Dec 2021 01:12:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C733013EF9; Thu, 2 Dec 2021 01:12: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 1B21CwdE068140; Thu, 2 Dec 2021 01:12:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B21CwPb068139; Thu, 2 Dec 2021 01:12:58 GMT (envelope-from git) Date: Thu, 2 Dec 2021 01:12:58 GMT Message-Id: <202112020112.1B21CwPb068139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: afb6f8307494 - stable/13 - mountd: Fix handling of usernames that start with a digit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: afb6f83074944e3843bb171656af9f52ac9d4d98 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638407579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8g0hzJMII8yVc/LQU0LSgT2oBw2/0GxuAau+TmDe+as=; b=K6JYIqyJOCIEnnWufqNXTvBfzQaUzxttTqBC02MCvtycUUbMHnsdDULxU6LwlrUzo/6VRy YR4F4vlhrPLkt4WE+ufKNR6yp1UJbHStnYT+4zPPi2izX8jyk8YH0dwmrCJabusDiYnH52 kRcjcTOCPpe+61RXbFGp0FXhWCjomFJggaTN/pIYmbQUnhVk5f7XAH8PQGFaXJzqBUESD3 ss+S9wwGPxb/ATNLSD7FLk1ALjWBi2XXNz6LIj1pcMqqqI5QD86Yv25FOOVszpuEWIY9k+ Kx6aTorycLkKexwn18LCXFFXKWTjj8MumVEjCJkcpzvTPUW9AXUB8GUyRED7mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638407579; a=rsa-sha256; cv=none; b=yQX1z3mPYs85BSvkJLe/9PWxpjKp+kjyRI9DzW/65g+lSRWit2sqGiQKeJTGdFfU4iT/Bm /DfkWvQ4hVSG/8srVmDOMrRlDQiWud7xG9fMg2U0A6o9FH1zyUmKNt8IQUvh4L1TTitw/w 7QosF0+NhbLgLsZeefuOsjq1gbjB9p4mFNozIqho74HE7C4VgX/Ys8mwdLAd8IcsBJV0UB euydf34DX1mJUOjvoLevXTP1X8XmeifhrJCvOCvtKUspx3qrsPdQ1V2vT9XKY582eX/Xwj sPHBGbHJFY0T+tYTO0LEa/I8d1n8m2cF/aOr1oiJrXTirtQ8eCPoCTf6aOkKWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=afb6f83074944e3843bb171656af9f52ac9d4d98 commit afb6f83074944e3843bb171656af9f52ac9d4d98 Author: Rick Macklem AuthorDate: 2021-11-18 21:35:25 +0000 Commit: Rick Macklem CommitDate: 2021-12-02 01:08:35 +0000 mountd: Fix handling of usernames that start with a digit yocalebo_gmail.com submitted a patch for mountd.c that fixes the case where a username starts with a digit. Without this patch, the username that starts with a digit is misinterpreted as a numeric uid. With this patch, any string that does not entirely convert to a decimal number via strtoul() is considered a user/group name. (cherry picked from commit f4bf849bb894f4934b8df6c04a820dfa52e9576c) --- usr.sbin/mountd/mountd.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index c66ac13b3016..0c077b857d7e 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -3534,6 +3534,8 @@ parsecred(char *namelist, struct expcred *cr) struct group *gr; gid_t groups[NGROUPS_MAX + 1]; int ngroups; + unsigned long name_ul; + char *end = NULL; /* * Set up the unprivileged user. @@ -3548,10 +3550,11 @@ parsecred(char *namelist, struct expcred *cr) names = namelist; name = strsep_quote(&names, ":"); /* Bug? name could be NULL here */ - if (isdigit(*name) || *name == '-') - pw = getpwuid(atoi(name)); - else + name_ul = strtoul(name, &end, 10); + if (*end != '\0' || end == name) pw = getpwnam(name); + else + pw = getpwuid((uid_t)name_ul); /* * Credentials specified as those of a user. */ @@ -3573,8 +3576,9 @@ parsecred(char *namelist, struct expcred *cr) if (ngroups > 1 && groups[0] == groups[1]) { ngroups--; inpos = 2; - } else + } else { inpos = 1; + } if (ngroups > NGROUPS_MAX) ngroups = NGROUPS_MAX; if (ngroups > SMALLNGROUPS) @@ -3589,25 +3593,26 @@ parsecred(char *namelist, struct expcred *cr) * Explicit credential specified as a colon separated list: * uid:gid:gid:... */ - if (pw != NULL) + if (pw != NULL) { cr->cr_uid = pw->pw_uid; - else if (isdigit(*name) || *name == '-') - cr->cr_uid = atoi(name); - else { + } else if (*end != '\0' || end == name) { syslog(LOG_ERR, "unknown user: %s", name); return; + } else { + cr->cr_uid = name_ul; } cr->cr_ngroups = 0; while (names != NULL && *names != '\0' && cr->cr_ngroups < NGROUPS_MAX) { name = strsep_quote(&names, ":"); - if (isdigit(*name) || *name == '-') { - groups[cr->cr_ngroups++] = atoi(name); - } else { + name_ul = strtoul(name, &end, 10); + if (*end != '\0' || end == name) { if ((gr = getgrnam(name)) == NULL) { syslog(LOG_ERR, "unknown group: %s", name); continue; } groups[cr->cr_ngroups++] = gr->gr_gid; + } else { + groups[cr->cr_ngroups++] = name_ul; } } if (names != NULL && *names != '\0' && cr->cr_ngroups == NGROUPS_MAX) From nobody Thu Dec 2 02:31:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 98D1918ABEC0; Thu, 2 Dec 2021 02:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4Kj31tmLz4ng7; Thu, 2 Dec 2021 02:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22B7F15714; Thu, 2 Dec 2021 02:31: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 1B22Vp21073874; Thu, 2 Dec 2021 02:31:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B22VpQs073873; Thu, 2 Dec 2021 02:31:51 GMT (envelope-from git) Date: Thu, 2 Dec 2021 02:31:51 GMT Message-Id: <202112020231.1B22VpQs073873@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: 81c9a051ea35 - stable/13 - swap pager: lock vnode around VOP_CLOSE() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 81c9a051ea35ff784437ba780399447154d56cfa Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638412311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ACpMikHLSDl9xwT2m6qpXC221NDeFuEM84M4GikUvqQ=; b=xb4/HMEBHBv5EW4u5hj9pY3W2JAeTzIVLh45E+vIWAZj5Wyr/QlWmjqWo23LDGl8lhsGpI TecIMFrnH44/lsu5Tve8Bs9Kec2jrQTUITLHtfZ6CB1KFufH25MfrOg41dXYWLagoTd1bW DUGUYPb6QzWq9OoZ2sO45FQ2sMPvmoq1re2g8r4X/99MMQMy2SXC6HmaU0bkCwQz/yXZIO cNYodUqRKfUAjrqSEqGHbyeopKweRyuizNFumxoptp4lb1nDDb26xoIpM9mESL1jl5K84H QY2+BAlnbeDLN3j9SJAfWSNtEZNdK1A63b9UZxhgxPCJZOeiPcN7cu6bUpfUCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638412311; a=rsa-sha256; cv=none; b=PQ5OdN19dbZXubj3xHvYLXkft92bY8Zprif57kGJ8eNdO2E6F1xziNy3N01molytDKf3ru 73gfXTjxarYHI4ihvIxxfBiN3Pj/eLjlGJixehO5E6XVR8CQ6Q0yLpJqh0mGw9Y1FlLEQ7 +/I7uh06Cmw3c1Z5rq198trJAJLavPZt2reAz8kqmvjHtA/3MxCV2nmSv0flfMOAdulUPE ve5qVKhgK9RbHtg9+/Er+06O0jwY+P63e2KVJXwGduAbrFWSrhhidb1P9xZ0pd+Hlb+2qv aBWIAlwW1aq3gp+jDZZ4JOM8YWrCoZ9CVN4OMoJJu0w29MmXDmQN6H+OIVE2vA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=81c9a051ea35ff784437ba780399447154d56cfa commit 81c9a051ea35ff784437ba780399447154d56cfa Author: Konstantin Belousov AuthorDate: 2021-11-23 09:16:53 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-02 02:21:14 +0000 swap pager: lock vnode around VOP_CLOSE() (cherry picked from commit a6d04f34a4db6ff3fd5431ae10d4b877337fc138) --- sys/vm/swap_pager.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 6d64ff883966..38c225db51ee 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -3050,9 +3050,12 @@ swapdev_strategy(struct buf *bp, struct swdevt *sp) static void swapdev_close(struct thread *td, struct swdevt *sp) { + struct vnode *vp; - VOP_CLOSE(sp->sw_vp, FREAD | FWRITE, td->td_ucred, td); - vrele(sp->sw_vp); + vp = sp->sw_vp; + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + VOP_CLOSE(vp, FREAD | FWRITE, td->td_ucred, td); + vput(vp); } static int From nobody Thu Dec 2 02:31:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5A46418AC0A7; Thu, 2 Dec 2021 02:31: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 4J4Kj43GBgz4nZq; Thu, 2 Dec 2021 02:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49F5D1588C; Thu, 2 Dec 2021 02:31: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 1B22VqE0073898; Thu, 2 Dec 2021 02:31:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B22VqY2073897; Thu, 2 Dec 2021 02:31:52 GMT (envelope-from git) Date: Thu, 2 Dec 2021 02:31:52 GMT Message-Id: <202112020231.1B22VqY2073897@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: 4b2caeec43ea - stable/13 - swapon: extend the region where the swap vnode is locked List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4b2caeec43eabdb6331352ca9249abd5175f4838 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638412312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y95LN2XzDYYie4w2rFxa9B1Vmi6/8RylTAfTz3XpapU=; b=k3EIPlQ4wuitMvf+ZO7ez55JZ1aS3fjgElagw0fvWGwzV0Aemj13dTUTexxOToOxUwHIZa wz84iJEA8gGh2E+QIAH99KJgHz6AKexOkj6DUoFPvFlC6HYYWONQ7TWamOBbC04gwakbu2 SrCGNRgY0Dgq/V6w5WlqvDfzTR3NzQxTc/PakvR5eS6qBYro69Y34WQehkd914UB6j+ALS W+K6INPu1R7pDcn5b7ICLOqNz63kDGRXWgF/6SIweog/ncLCeT5ReKVuI7nwZvsy1VguzU eEUTWnHAFBvXJN0eq/o/kAIZP5cH3TUP6kL212h6c7VP6ZsVuReF9J08ItUM4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638412312; a=rsa-sha256; cv=none; b=VqrO3hQG1n/SFRAEY5kxNeh2zdTVHQaopKrFjfUDqd0gp+Xv45Iqvjgwb+rAe+A2YyTTWW YtwlRBnuyU1D8hCSREL0nApguiyzhZuDWSEy8E+VFiZewoT64mb5BoyLoS2JifQdxzfTGK oNhWqgA/fzo11jFtBuqYMwClEpntLkVi0N22DiHjym9rV/ufJxOlju6Qo8oSDGskvZipsJ WJ8TfeGk3CLF1tackkitEM9ak3YPm/pOQJjOJVJdIwAVDmyyeGb+Kg7/I5AgHzhk4LdKl9 FCzB/nDitzxalxWOOXFaqyBJcYleMJvACWeB2jo99dG78+NxRFi+8oZWwAYQvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4b2caeec43eabdb6331352ca9249abd5175f4838 commit 4b2caeec43eabdb6331352ca9249abd5175f4838 Author: Konstantin Belousov AuthorDate: 2021-11-24 03:06:02 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-02 02:21:14 +0000 swapon: extend the region where the swap vnode is locked (cherry picked from commit 6ddf41faa6f54738db9b3f313086974b6403d680) --- sys/vm/swap_pager.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 38c225db51ee..8363dce52683 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2360,8 +2360,8 @@ sys_swapon(struct thread *td, struct swapon_args *uap) goto done; } - NDINIT(&nd, LOOKUP, ISOPEN | FOLLOW | AUDITVNODE1, UIO_USERSPACE, - uap->name, td); + NDINIT(&nd, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, + UIO_USERSPACE, uap->name, td); error = namei(&nd); if (error) goto done; @@ -2381,8 +2381,10 @@ sys_swapon(struct thread *td, struct swapon_args *uap) error = swaponvp(td, vp, attr.va_size / DEV_BSIZE); } - if (error) - vrele(vp); + if (error != 0) + vput(vp); + else + VOP_UNLOCK(vp); done: sx_xunlock(&swdev_syscall_lock); return (error); @@ -3005,7 +3007,7 @@ swapongeom(struct vnode *vp) { int error; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + ASSERT_VOP_ELOCKED(vp, "swapongeom"); if (vp->v_type != VCHR || VN_IS_DOOMED(vp)) { error = ENOENT; } else { @@ -3013,7 +3015,6 @@ swapongeom(struct vnode *vp) error = swapongeom_locked(vp->v_rdev, vp); g_topology_unlock(); } - VOP_UNLOCK(vp); return (error); } @@ -3064,6 +3065,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) struct swdevt *sp; int error; + ASSERT_VOP_ELOCKED(vp, "swaponvp"); if (nblks == 0) return (ENXIO); mtx_lock(&sw_dev_mtx); @@ -3075,14 +3077,12 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) } mtx_unlock(&sw_dev_mtx); - (void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC error = mac_system_check_swapon(td->td_ucred, vp); if (error == 0) #endif error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td, NULL); - (void) VOP_UNLOCK(vp); - if (error) + if (error != 0) return (error); swaponsomething(vp, vp, nblks, swapdev_strategy, swapdev_close, From nobody Thu Dec 2 02:31:53 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A8CD318AC0AB; Thu, 2 Dec 2021 02:31: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 4J4Kj573ygz4nmB; Thu, 2 Dec 2021 02:31:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FF281583C; Thu, 2 Dec 2021 02:31: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 1B22VrRp073922; Thu, 2 Dec 2021 02:31:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B22Vrg6073921; Thu, 2 Dec 2021 02:31:53 GMT (envelope-from git) Date: Thu, 2 Dec 2021 02:31:53 GMT Message-Id: <202112020231.1B22Vrg6073921@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: 3a98b98be504 - stable/13 - swap_pager: lock vnode in swapdev_strategy() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3a98b98be504e5ba3faf0fdf58271681d9eee5a1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638412314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oH1G2R06zyJBPN3Ed9WlOTgkOMdxUW/Y23zCgnF1lIQ=; b=pbCsn8MLo1BEpjbkW9/wRgEQaQN9Shkminldgz++ousm3k5LOuCAfh4esLfJj41o+Ay/XN 009OKiQj4I9K78PJi8rbc6Izr2Ul3+CwpGa5ELafPwoBX8QLBQsLv0Q675JYwYTYYsWWO3 0GoVHcvKNUjMMSbHKJiiZ0Ov+Rb4I6bjtFjpIpXiVgvngcgmhW9NeZ6x4rBcb3dV5ZbLbx 2UQusDDg6ooxZK3Jl9/VRqNtD7mNYWQnZ8j+F023UN9FXQjaLnjB4IAHNqf5W/RtZTq7wl qoAXBrdnMLnOFF6J/K4TARnrdI/IzIO8LQHe4hPCzL4cR+kpgbungOjcXxzeSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638412314; a=rsa-sha256; cv=none; b=dttZga4u2PcndL89yTnF+cpDCSxcsYgwDSU7ZbFnNOBjJSzmqRpivRS779OTmgDW3Qd3BS Ap4xGGwoGsrfjZpxG4LVvdCtUnjHdt4YS6HaB4DenfkzBGpEnT6Y7R7TnEuznnmaakLuBh VrvKLjeIg7FNY3PFxdRKItbJ2W1TnwsIgluRkO8pVFoF051jn5AXeS0CJjkdSmK7vpSzfM W7Cwh66mXBp9d//se1LEPmJ9J7fCSyOC3sLgHcpKwxwFzSrEvsmlL2tTMULvnznmcgdSCd lST7IqqqFShQXja+AhiwrmeYoPcZ4qQ86RpS6YBXxCRNTrz6+JxPC09Om7Z+rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3a98b98be504e5ba3faf0fdf58271681d9eee5a1 commit 3a98b98be504e5ba3faf0fdf58271681d9eee5a1 Author: Konstantin Belousov AuthorDate: 2021-11-24 11:26:46 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-02 02:21:15 +0000 swap_pager: lock vnode in swapdev_strategy() (cherry picked from commit b19740f4ce7a542783f87de2fee48476a7801d86) --- sys/vm/swap_pager.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 8363dce52683..78533c9fb5e6 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -3036,16 +3036,19 @@ swapdev_strategy(struct buf *bp, struct swdevt *sp) vp2 = sp->sw_id; vhold(vp2); if (bp->b_iocmd == BIO_WRITE) { + vn_lock(vp2, LK_EXCLUSIVE | LK_RETRY); if (bp->b_bufobj) bufobj_wdrop(bp->b_bufobj); bufobj_wref(&vp2->v_bufobj); + } else { + vn_lock(vp2, LK_SHARED | LK_RETRY); } if (bp->b_bufobj != &vp2->v_bufobj) bp->b_bufobj = &vp2->v_bufobj; bp->b_vp = vp2; bp->b_iooffset = dbtob(bp->b_blkno); bstrategy(bp); - return; + VOP_UNLOCK(vp2); } static void From nobody Thu Dec 2 02:45:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DF2DA18B2C60; Thu, 2 Dec 2021 02: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 4J4L0z49LRz4sZF; Thu, 2 Dec 2021 02:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F72C158B7; Thu, 2 Dec 2021 02: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 1B22jdgf087238; Thu, 2 Dec 2021 02: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 1B22jd58087237; Thu, 2 Dec 2021 02:45:39 GMT (envelope-from git) Date: Thu, 2 Dec 2021 02:45:39 GMT Message-Id: <202112020245.1B22jd58087237@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: c3f345ae3c0f - main - OptionalObsoleteFiles.inc: remove MK_CXX rule for usr/bin/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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3f345ae3c0fac0684f83cff72ae23da18468777 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638413139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DbujuKwJdFbxAc7d9X2e6Wk0UVz37dYVrwOAs1VNswE=; b=cxIMsVazHg6HoXihLjkAMtD+nymasTIB+xgxni++XnZoVqnVdSvG/e1wpopmbEhL4x08XB J+nIyOm1gYMOC7qjs5NdKADnhjvHlbgwq2YSVSlwodScdF91Am+87YvlMjBom4AAor2dq3 Es8fOn6ZFJVU90lU1TcAFuwyRVaK4ovxlUUMSrJ+SyFm5QKTN9GAntAbTAgU2EXxWba3JV ByOgBetGNWh1JYS43mBL7SQR6Hbaop2zzBkTe6UVAehzs2iehFU5CYJBZD9YzsvbD96ZLm S7Y1XAdb7vh6VJTmA8caPTHVtUNGPjfptARxbmiFQy69kL80KU64guAYDOl4Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638413139; a=rsa-sha256; cv=none; b=ryQMx/w38bVrLdL5q/T8ubebS1RNp0qaVijTdv0WG0rFHoHi2Nc79nO3IxiYmZ1oXoDd8V hAWS8O9Af7oIzRS2Uhg823xIuuM44qAJpnrojPRjLjSexHsGEK1Y1l4ihjv3iO+gZ7x1AN VfTEIxNMxBdgdFG9AExHOhGA+hJKwGfd2lXyytV0rD83SBH7ZcZfR80WKEDAxgwf/4kmyc qwRHXFg+f1pxktZ0n3/QymGYs6RCjViOYw0iLG1lZ1s2SAi8sPfBlt9fYo8kQWGQqQIfVh QQfV6V9RUEzVq/ygknvk7kh/TnXofbfoLcX4n7pYVSB7WkEOyv0vSlwjW2041g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c3f345ae3c0fac0684f83cff72ae23da18468777 commit c3f345ae3c0fac0684f83cff72ae23da18468777 Author: Ed Maste AuthorDate: 2021-12-01 21:49:16 +0000 Commit: Ed Maste CommitDate: 2021-12-02 02:42:48 +0000 OptionalObsoleteFiles.inc: remove MK_CXX rule for usr/bin/c++ In fact MK_CXX does not control whether /usr/bin/c++ is built -- it is installed as a link to Clang (which is always a C/C++ compiler), and it already exists in OptionalObsoleteFiles under MK_TOOLCHAIN. Sponsored by: The FreeBSD Foundation --- tools/build/mk/OptionalObsoleteFiles.inc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 4082492f0fe7..e6b1b1909771 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1640,11 +1640,6 @@ OLD_FILES+=usr/share/man/man3/cuse_wait_and_process.3.gz OLD_DIRS+=usr/include/fs/cuse .endif -# devd(8) not listed here on purpose -.if ${MK_CXX} == no -OLD_FILES+=usr/bin/c++ -.endif - .if ${MK_DEBUG_FILES} == no .if exists(${DESTDIR}/usr/lib/debug) DEBUG_DIRS!=find ${DESTDIR}/usr/lib/debug -mindepth 1 \ From nobody Thu Dec 2 06:37:19 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E372A18AAC95; Thu, 2 Dec 2021 06:37: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 4J4R8H3wltz3FF7; Thu, 2 Dec 2021 06:37:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6201F18B97; Thu, 2 Dec 2021 06:37: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 1B26bJoe096260; Thu, 2 Dec 2021 06:37:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B26bJ4T096259; Thu, 2 Dec 2021 06:37:19 GMT (envelope-from git) Date: Thu, 2 Dec 2021 06:37:19 GMT Message-Id: <202112020637.1B26bJ4T096259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 34aa8c27cd06 - stable/13 - rk_spi: declare support for rk3328 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 34aa8c27cd06276d57323f130ed24962841e6a79 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638427039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fyN3GW5VbdSnzXSzm9nanmcWnDPJ7PxOzRtKkRiJRzE=; b=xNYb8h1IQBXYdUDZqXwac4n6NBWkI3G+1H5c73iQKbzccoz3tJHMl22S/ibDVoGCgOc1rV 1h34EqwaRNbV3FNswWRuVm05TMVpLyqzdr+CB8LW7smzz0HNu5BbEmx10z7NVXH2rNwP6w dTKT6P1xlZKi6Fvzs7OxUBO7tMWMvykpoR5jfAOc1vhRfX6NLJYx+yURutvmWFTM2K37Bz GqFlAkq2oM3u7No0Vcq2xa2HcshGoIvoqHSLp2nsoPO5a+VJqraDhn2ZPwwLIycsN6Y+Lf 2ohAV+ACzyreGieZHY8xk+gqRx73c9knyTeGFwtX/Mnst1Zznl2PjqA8tiF2bQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638427039; a=rsa-sha256; cv=none; b=Qph1U8f+eChQDfmntCWYdVA0Jiywx0a6AwiXbqfUa8lYyDNj7xn+xa2mVT26y5ESNpuAyf t0Wso9ZKM81uoAwngUVYj375H80jAZyjl5UvkR72JOPh5ZWl8hFqFPgaHGK/0mFwhiF3WR hqP/O/CJTo+Gf7pORTwDnrTZOJ2jtyQlul2CSWi8VHpBG5QD9SyXg7LKjdP0jxeUJdTHQc vVzH7FzFDbaN7os5KBlI6t5nJPaINpJyEQpHVI4WW4cw80EMV9s0/s12/7y50OEHOr7qx9 WWdJUAJPG5hokeeV4J1YOnL4n7/5EDfKjbubKjRZtymO0r65vFGH9NsiIuArDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=34aa8c27cd06276d57323f130ed24962841e6a79 commit 34aa8c27cd06276d57323f130ed24962841e6a79 Author: Andriy Gapon AuthorDate: 2021-11-25 21:12:11 +0000 Commit: Andriy Gapon CommitDate: 2021-12-02 06:36:46 +0000 rk_spi: declare support for rk3328 Tested on Rock64 using the onboard SPI flash. (cherry picked from commit 8c12ee5021e293c992a7b54215fda1edfbebaa25) --- sys/arm64/rockchip/rk_spi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm64/rockchip/rk_spi.c b/sys/arm64/rockchip/rk_spi.c index 13e3abb80085..4df1208f40aa 100644 --- a/sys/arm64/rockchip/rk_spi.c +++ b/sys/arm64/rockchip/rk_spi.c @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #define CS_MAX 1 static struct ofw_compat_data compat_data[] = { + { "rockchip,rk3328-spi", 1 }, { "rockchip,rk3399-spi", 1 }, { NULL, 0 } }; From nobody Thu Dec 2 09:00:28 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3D48E18CAB1C; Thu, 2 Dec 2021 09:00:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4VKS6dTfz4cK3; Thu, 2 Dec 2021 09:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3CED1A77A; Thu, 2 Dec 2021 09:00: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 1B290SsG091637; Thu, 2 Dec 2021 09:00:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B290SgE091636; Thu, 2 Dec 2021 09:00:28 GMT (envelope-from git) Date: Thu, 2 Dec 2021 09:00:28 GMT Message-Id: <202112020900.1B290SgE091636@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: efa5d3831b0f - main - sys/libkern.h: Add type conversion helpers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: efa5d3831b0f0938115436be78f173366330a2ca Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638435628; h=from:from:reply-to:subject:subject: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+OpxJF5Burq5Lzl86KlMN+rHDs2TQUvDjgsQ5nDo+k=; b=S1pcpZUZHZewv1HmxrwNRAwXLQCxsKPrtRqp4CEyptzHZYpN4WqTLikOrsA+GwzjFPadMR oxophEbWmrOO/Kz4G3ee2wgdQH7gwwzI83LBnIM7fULJzRW8uW0h7t4LLXC+Zw8oursSkB jvNJjyod1J/qgeMWOe2puRKkYUoNZ3KxXEnXOrqdnUWFlcMIvIMKP9CrwgZokK3TkxWIDf sCzi4SQWY/QQ+cqmFIPWCjHidCuHiuQYQsQinVm6XiiiwXTASAOKXkFslXGT3hbD53t3TV RoaLhKOiRQgAyaF+vLqfAwYp1o6WvQZ0J/1XEQ1qaUxPnqr+0aUYS3I2H0F+FA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638435628; a=rsa-sha256; cv=none; b=pkFzdEWcdUB1bteVo+Uixg0OUXStb1K/99mmNJOZOzhp6XaNkTj1lZnbJVMhFVvuKo/UdW o9VGxpxxJXQSNUhRWgJ2PmxgAsL463fl+HKGCRq38+pp3ZhhYx50W+hzXdN5Eud6rK8IpO JKBYHXzH2J/hFiHjtbBzvT0954YIOPY5bJyCgnjON8MhCvG5h7lhGVdEvFOqrP3BIxr850 1dbMXR+bzLWrwoDc9HK69xV75nIyvRj813dbt8yPsCWJg2bBlFUUq9ZyRUppNI6FKy9ddf w0QwOaK/OtxinDp1O7TKuRj0VeVNB6jF4pnLi512z5oXB6rVhlnMIqBZistVeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=efa5d3831b0f0938115436be78f173366330a2ca commit efa5d3831b0f0938115436be78f173366330a2ca Author: Hubert Mazur AuthorDate: 2021-11-26 09:20:04 +0000 Commit: Wojciech Macek CommitDate: 2021-12-02 08:18:48 +0000 sys/libkern.h: Add type conversion helpers Add helper functions for 32 and 64 bit unsigned to signed integers conversions. Reviewed by: Sponsored by: Alstom Obtained from: Semihalf Differential revision: https://reviews.freebsd.org/D33162 --- sys/sys/libkern.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index 147eba9bd1bd..41844fa7490e 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -226,6 +226,22 @@ rindex(const char *p, int ch) return (strrchr(p, ch)); } +static __inline int64_t +signed_extend64(uint64_t bitmap, int lsb, int width) +{ + + return ((int64_t)(bitmap << (63 - lsb - (width - 1)))) >> + (63 - (width - 1)); +} + +static __inline int32_t +signed_extend32(uint32_t bitmap, int lsb, int width) +{ + + return ((int32_t)(bitmap << (31 - lsb - (width - 1)))) >> + (31 - (width - 1)); +} + /* fnmatch() return values. */ #define FNM_NOMATCH 1 /* Match failed. */ From nobody Thu Dec 2 09:00:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8E9D918CA944; Thu, 2 Dec 2021 09:00: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 4J4VKV12QNz4cRs; Thu, 2 Dec 2021 09:00:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF8E71A7E7; Thu, 2 Dec 2021 09:00: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 1B290TGQ091664; Thu, 2 Dec 2021 09:00:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B290T6c091663; Thu, 2 Dec 2021 09:00:29 GMT (envelope-from git) Date: Thu, 2 Dec 2021 09:00:29 GMT Message-Id: <202112020900.1B290T6c091663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: f89f6f9581bd - main - TMP461: Add thermal sensor 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: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f89f6f9581bd00bc420ce9891e0d964d4c6cecb3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638435630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZta3fr0r4v26RYK1akx4ZIUA+yiQ1PBmMmZL4/d18Y=; b=ld8w47OuGJ84AR3UJXoQGoaO1tmcb4/af503CMneVwB4RvDG2Tmf+j6dj4E4S4cbwwen9u f1y2uEJBIShgIo02SGkYxM8UMS4tfWYgD9/NutbBPHD2dcEjbETaA9PsYArFsFBz/SREpr ZQ5VV1H50JO0bi7k3Ud599VqCFS1501r5gAQX3ipqGjNdkx4pm9ir8eNTO7FAUlbuFrFWf vqI8eHYPnac9mVu7I9jEeuc/4D9tYiwMMUfxwM2FtxGXohzBMctIE2xUslwYHkpPgYDF9Y 9InusfooqNskxQuv00fx5yY3Xqd5b3GkZIu/cz9lcMvvgNw4kT2JVDR+PFjcXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638435630; a=rsa-sha256; cv=none; b=U+VSECeik+LhquCivdFZ6cLXwni986tmAisOTWP0uccBiJ2Xi9t/nfnKrY6veKNrRjkNBF AYR0zwuOXtkujJWJ/TCV4Miq5Qeg3VJ0vc9ulGGAWzEsnlJoe50t288Rw29MMjG1C3eBId U+Slp4bCocaBBeC1C4IJahcMTvapiQ/0zcheJ+TzuSbSUskJ0pOGdTj/YhRrMTuWiG9cQx 6H0Acm77HMK4ftbQPzld+Ckamn4GPd42bvl7tynZLmJIrgZCT7Z7BV5SWOwGfef7on5fnA 6+gbzCE0lx3zPgBRqboZKjtkdK+ZvHe1dMCjoFqSgWwtw4ss3EP2Un35oCAbyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=f89f6f9581bd00bc420ce9891e0d964d4c6cecb3 commit f89f6f9581bd00bc420ce9891e0d964d4c6cecb3 Author: Hubert Mazur AuthorDate: 2021-11-26 09:26:06 +0000 Commit: Wojciech Macek CommitDate: 2021-12-02 08:18:48 +0000 TMP461: Add thermal sensor driver Add driver for TMP461 thermal sensor. Register new sysctl node of integer type for device. Read register and fill sysctl with valid temperature. Reviewed by: Sponsored by: Alstom Obtained from: Semihalf Differential revision: https://reviews.freebsd.org/D32818 --- sys/dev/iicbus/tmp461.c | 194 ++++++++++++++++++++++++++++++++++++++++ sys/modules/i2c/Makefile | 3 +- sys/modules/i2c/tmp461/Makefile | 7 ++ 3 files changed, 203 insertions(+), 1 deletion(-) diff --git a/sys/dev/iicbus/tmp461.c b/sys/dev/iicbus/tmp461.c new file mode 100644 index 000000000000..be5d547e91c1 --- /dev/null +++ b/sys/dev/iicbus/tmp461.c @@ -0,0 +1,194 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Alstom Group. + * Copyright (c) 2021 Semihalf. + * + * 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 ``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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#define BIT(x) (1UL << (x)) + +#define TMP461_LOCAL_TEMP_REG_MSB 0x0 +#define TMP461_LOCAL_TEMP_REG_LSB 0x15 +#define TMP461_GLOBAL_TEMP_REG_MSB 0x1 +#define TMP461_GLOBAL_TEMP_REG_LSB 0x10 +#define TMP461_CONFIG_REG 0x3 +#define TMP461_CONFIG_REG_TEMP_RANGE_BIT BIT(2) + +#define TMP461_EXTENDED_TEMP_MODIFIER 64 +/* 28.4 fixed point representation of 273.15f */ +#define TMP461_C_TO_K_FIX 4370 +#define TMP461_TEMP_LSB 0 + +static int tmp461_probe(device_t dev); +static int tmp461_attach(device_t dev); +static int tmp461_read_1(device_t dev, uint8_t reg, uint8_t *data); +static int tmp461_read_temp(device_t dev, int32_t *temp); +static int tmp461_detach(device_t dev); +static int tmp461_sensor_sysctl(SYSCTL_HANDLER_ARGS); +static int32_t tmp461_signed_extend32(uint32_t value, int sign_pos); + +static device_method_t tmp461_methods[] = { + DEVMETHOD(device_probe, tmp461_probe), + DEVMETHOD(device_attach, tmp461_attach), + DEVMETHOD(device_detach, tmp461_detach), + + DEVMETHOD_END +}; + +static driver_t tmp461_driver = { + "tmp461_dev", + tmp461_methods, + 0 +}; + +static devclass_t tmp461_devclass; + +static struct ofw_compat_data tmp461_compat_data[] = { + { "ti,tmp461", 1 }, + { NULL, 0 } +}; + +DRIVER_MODULE(tmp461, iicbus, tmp461_driver, tmp461_devclass, 0, 0); +IICBUS_FDT_PNP_INFO(tmp461_compat_data); + +static int +tmp461_attach(device_t dev) +{ + struct sysctl_oid *sensor_root_oid; + struct sysctl_ctx_list *ctx; + + ctx = device_get_sysctl_ctx(dev); + + sensor_root_oid = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), + OID_AUTO, "temperature", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "TMP 461 Thermal Sensor Information"); + if (sensor_root_oid == NULL) + return (ENXIO); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(sensor_root_oid), OID_AUTO, + "tmp461", CTLTYPE_INT | CTLFLAG_RD, dev, 0, + tmp461_sensor_sysctl, "IK0", "TMP461 Thermal Sensor"); + + return (0); +} + +static int +tmp461_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, tmp461_compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "TMP461 Thermal Sensor"); + + return (BUS_PROBE_GENERIC); +} + +static int +tmp461_detach(device_t dev) +{ + + return (0); +} + +static int +tmp461_read_1(device_t dev, uint8_t reg, uint8_t *data) +{ + int error; + + error = iicdev_readfrom(dev, reg, (void *) data, 1, IIC_WAIT); + if (error != 0) + device_printf(dev, "Failed to read from device\n"); + + return (error); +} + +static int +tmp461_read_temp(device_t dev, int32_t *temp) +{ + bool extended_mode; + uint8_t data; + int error; + + /* read temperature range */ + error = tmp461_read_1(dev, TMP461_CONFIG_REG, &data); + if (error != 0) + return (ENXIO); + + extended_mode = data & TMP461_CONFIG_REG_TEMP_RANGE_BIT; + + /* read temp MSB */ + error = tmp461_read_1(dev, TMP461_LOCAL_TEMP_REG_MSB, &data); + if (error != 0) + return (ENXIO); + + *temp = signed_extend32(data, TMP461_TEMP_LSB, 8) - + (extended_mode ? TMP461_EXTENDED_TEMP_MODIFIER : 0); + + error = tmp461_read_1(dev, TMP461_LOCAL_TEMP_REG_LSB, &data); + if (error != 0) + return (ENXIO); + + *temp = (((*temp << 4) | (data >> 4)) + TMP461_C_TO_K_FIX) >> 4; + + return (0); +} + +static int +tmp461_sensor_sysctl(SYSCTL_HANDLER_ARGS) +{ + device_t dev; + int32_t temp; + int error; + + dev = arg1; + + error = tmp461_read_temp(dev, &temp); + if (error != 0) + return (error); + + return (sysctl_handle_int(oidp, &temp, 0, req)); +} + diff --git a/sys/modules/i2c/Makefile b/sys/modules/i2c/Makefile index 31c348a63dbc..2f409773ead2 100644 --- a/sys/modules/i2c/Makefile +++ b/sys/modules/i2c/Makefile @@ -30,7 +30,8 @@ SUBDIR = \ .if !empty(OPT_FDT) SUBDIR += rx8803 \ - tca6416 + tca6416 \ + tmp461 .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ diff --git a/sys/modules/i2c/tmp461/Makefile b/sys/modules/i2c/tmp461/Makefile new file mode 100644 index 000000000000..ed41dbfa9e0e --- /dev/null +++ b/sys/modules/i2c/tmp461/Makefile @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/iicbus +KMOD = tmp461 +SRCS = tmp461.c bus_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h + +.include From nobody Thu Dec 2 09:54:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 58D4118BB741; Thu, 2 Dec 2021 09: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 4J4WX30Phkz4t8V; Thu, 2 Dec 2021 09:54:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1F131B0F1; Thu, 2 Dec 2021 09:54: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 1B29sgDI061354; Thu, 2 Dec 2021 09: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 1B29sggX061353; Thu, 2 Dec 2021 09:54:42 GMT (envelope-from git) Date: Thu, 2 Dec 2021 09:54:42 GMT Message-Id: <202112020954.1B29sggX061353@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: c937fb286fed - main - mlx5: Correct a typo in a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c937fb286fed530ec1777a6734a1841d6031875b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638438883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TYL3GPgD7HuONJNARpKb02lpbn5P6cVjvQsABJ8jbt0=; b=HRSWKDH77bplg1dJaUaoLxrr4OdVrpiubNkNClMHtEhhtZvoWBqy+NUXZAicgc48WJ4nZD c2LvP7fqP5JWi2x0SgM5TSZVwQNALWQ6zRoNLqYKzSmujWc0laKVEvrmWgrjTDEqaCC245 WCi/QxuQMMbIeSqz37uGXJik0/AC2PqhlFyT7HPqc2XXPSwUvcDeZwrcl9VqNwtVB6Swev 3VNZYtroDT2lAIsnkMkLTup+t247cQItx8t/rxBmc9IQWPBj3r3z1lsv5LNFPZed7rxYZi 8hrMo/cCzgxsQNDI7EqlW9/HUDJAwsxCKP/h/9yEGCQttkdpka240+6JXsonaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638438883; a=rsa-sha256; cv=none; b=nu2KadcY3Pr9pvhQq3igV+Z65kj286sqjDhO/vkcf27nVktaArhbZMOxdRAqruI4mY5j+c hCnCpB3xZ5T1sF7JL8+C7dCsE2mQQe0MOJxiMnZsnvtTOo48lIoybb6edCk3Vog/oH68js TcTI0Vjh4mu8B3JtKyQz7aJjy151D2zyT1RIM2vidttVi7rUFcRL6Yehetle/dSGK9JiRc e1S6Paw0m0sRt1+IbSXDfLE74f0pamsRCJjvQ3KjoP6zb8oy6dixbIQWHEoahHC4MScDzQ Ro8SrySK7gnm+eo+gvX3NvPpjEaar/UYeyWuS5SNV0QHXFwdoDfv1honF+CfIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c937fb286fed530ec1777a6734a1841d6031875b commit c937fb286fed530ec1777a6734a1841d6031875b Author: Gordon Bergling AuthorDate: 2021-12-02 09:51:18 +0000 Commit: Gordon Bergling CommitDate: 2021-12-02 09:51:18 +0000 mlx5: Correct a typo in a sysctl description - s/parameteres/parameters/ MFC after: 3 days --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index bf8c3c52a343..212bcf9711ea 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -1104,7 +1104,7 @@ static int mlx5e_fast_calibration = 1; static int mlx5e_normal_calibration = 30; static SYSCTL_NODE(_hw_mlx5, OID_AUTO, calibr, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, - "MLX5 timestamp calibration parameteres"); + "MLX5 timestamp calibration parameters"); SYSCTL_INT(_hw_mlx5_calibr, OID_AUTO, duration, CTLFLAG_RWTUN, &mlx5e_calibration_duration, 0, From nobody Thu Dec 2 09:54:43 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 92FF418BB6F9; Thu, 2 Dec 2021 09: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 4J4WX41hrWz4t6D; Thu, 2 Dec 2021 09:54:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 174251B448; Thu, 2 Dec 2021 09: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 1B29sh3g061378; Thu, 2 Dec 2021 09:54:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B29shpi061377; Thu, 2 Dec 2021 09:54:43 GMT (envelope-from git) Date: Thu, 2 Dec 2021 09:54:43 GMT Message-Id: <202112020954.1B29shpi061377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: fe96f62d61a5 - main - kern: Correct a typo in a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe96f62d61a537ec576d4c6ff8f8fd6c31570446 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638438884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bza4tmUhrEUqciC3RFAGuidJd6GNS96Di2BJqV2imfg=; b=yLtBo7g37+XCdLwwkxdY/Ey1vr/mYm0vU6zfSO8cZVAM/h8xcTqnxl1hnlvjWQAQ3yutPV 9Dyb49b6nchc5FrbyW4/pO1JK5tVRmm0XbxSnTxPaVxbKLMbUWqNTXSTgqSuqndYqSR8Bt 6MtS8KsXxHNxQakuS06yRnMNjx6IcL3JSCrGaHK1mFe7F7m0lM5iFcIaT+WZoWzAcAT1zj Xb6puozMWQ+seB+6T0UfyBoqlUAuihuD57FGnX46tLrlQN4OnHFtXednD0U0ZBrH6YOwNM k1jGA7mGo6RYZHyBoBW8PZ9FdNMjnzU61VH/v+0hWIXa+GlgWpGzMgjqjr3DAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638438884; a=rsa-sha256; cv=none; b=cFK8Ftum6vlB53yvH7jUrEpMOE63GWqRIyxl6KrhN72PxtyqeHrgUTshgCiRZJ4azYM2ef FVjUsxJQHI7m+y97MXJnSq1TQ6nhFGa267604dIj3jzYGyG43Jv9ugDVj62S9uA7TbemeP lZIcJS7RVZns9C1M2vV+pJIh3eB0G9ZGy5ZHDO6jdaA+kukdb1xMgO6ALM5PdWVs7oEqOp GWYQkBwFlp0d5aAlFDtXMJW6lSILUTndwBj0KDQ3PpHn3mix1HMM+ApL9Ew6ly9LxtYmHF uIq+hoxk0QIkMoK1fkQypcfMWCvN0JYkq8iCjroxV0wv469mIZXN6hlXTBti5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=fe96f62d61a537ec576d4c6ff8f8fd6c31570446 commit fe96f62d61a537ec576d4c6ff8f8fd6c31570446 Author: Gordon Bergling AuthorDate: 2021-12-02 09:54:15 +0000 Commit: Gordon Bergling CommitDate: 2021-12-02 09:54:15 +0000 kern: Correct a typo in a sysctl description - s/osbolete/obsolete/ MFC after: 3 days --- sys/kern/subr_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index ab7de881d57d..0cde2c781719 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -5977,7 +5977,7 @@ devctl2_init(void) */ static int obsolete_panic = 0; SYSCTL_INT(_debug, OID_AUTO, obsolete_panic, CTLFLAG_RWTUN, &obsolete_panic, 0, - "Panic when obsolete features are used (0 = never, 1 = if osbolete, " + "Panic when obsolete features are used (0 = never, 1 = if obsolete, " "2 = if deprecated)"); static void From nobody Thu Dec 2 11:15:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2593A18B8453; Thu, 2 Dec 2021 11:15: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 4J4YKN67xDz3KgS; Thu, 2 Dec 2021 11:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B29561C5F6; Thu, 2 Dec 2021 11:15: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 1B2BFaKo068631; Thu, 2 Dec 2021 11:15:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2BFa1v068630; Thu, 2 Dec 2021 11:15:36 GMT (envelope-from git) Date: Thu, 2 Dec 2021 11:15:36 GMT Message-Id: <202112021115.1B2BFa1v068630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: dcf2dfed26ed - main - tcp: unloading a module that is set to default should 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: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dcf2dfed26ed34602e17bee9318f0fde9429577e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638443736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IwM5LM1vxuEyfy5rgRTO7uk99HGSJUB61XvwbwlPej8=; b=JfSiNlZ6hzqQZkqTEB9/LVyOQTCG3GVCcSgVFlf6Iwiym4osUlKa9UGN3j9mf9Z1zB3WY0 P7D/PS+GbOPbEeR6EgkfSMCdC7NFQWrul658OsQED+UL6PLoDllPoOnhtJjfQSM+K+5oF+ 4C1XGtQWyCloTo+aeVmxdxgV/q7/4VSQYdY/5xe2SNuu/nEjS/R9xcTF16M+ZF0F6HLA8Q NxeHgzBHmH484aPKPpiygJ+ir8XZ2NS6cUHz1rKQEurU0VqEIPlsbvtGlv/+XKsS3SQuut 549k+ny6lx2QqOokeP1A2K2fk0ryLHBYHoT0oPTiOeBO8Zp/27/FDXm2/bfVOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638443736; a=rsa-sha256; cv=none; b=c+gAmlnbmnFced54PFa7trfvyy98BGLUfET5Lj5eIW6cmO/oGI1GW32bkn+NZC7L4Dyb/7 BsgA1uphNNvq9nanXpTTdzB2gxNtK9bA0CFrgMOKzUkrpxx2vaQM09+kdJTRg0FBTgFcWM 2SKtBlyKEGvHMa6W54HqvbHF8mVok7NIAoFqwuREMWCkmtCSIBzKDt0RCJYL3cGxxICYX4 6x4Zhq/00flS9sjE9ObBWfnqJL2fdIPVcQLMkoJDB52hAdum/7m174aZUyxfy7ax5Q80UF K1K9nOFGyE+LeP225sv8x1vLcaj6/ukuhIw3H9B+BmVWp2PDjnGBjYQW1bgVFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=dcf2dfed26ed34602e17bee9318f0fde9429577e commit dcf2dfed26ed34602e17bee9318f0fde9429577e Author: Randall Stewart AuthorDate: 2021-12-02 11:12:16 +0000 Commit: Randall Stewart CommitDate: 2021-12-02 11:12:16 +0000 tcp: unloading a module that is set to default should error. I just discovered that the return of the EBUSY error was incorrectly rigged so that you could unload a CC module that was set to default. Its supposed to be an EBUSY error. Make it so. Reviewed by: Michael Tuexen Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D33229 --- sys/netinet/cc/cc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netinet/cc/cc.c b/sys/netinet/cc/cc.c index b49e5940bc7e..bcda9276d4d9 100644 --- a/sys/netinet/cc/cc.c +++ b/sys/netinet/cc/cc.c @@ -246,14 +246,13 @@ cc_deregister_algo(struct cc_algo *remove_cc) STAILQ_FOREACH_SAFE(funcs, &cc_list, entries, tmpfuncs) { if (funcs == remove_cc) { if (cc_check_default(remove_cc)) { - err = EBUSY; - break; + CC_LIST_WUNLOCK(); + return(EBUSY); } - /* Add a temp flag to stop new adds to it */ - funcs->flags |= CC_MODULE_BEING_REMOVED; break; } } + remove_cc->flags |= CC_MODULE_BEING_REMOVED; CC_LIST_WUNLOCK(); err = tcp_ccalgounload(remove_cc); /* From nobody Thu Dec 2 12:20:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D4F4418B5A87; Thu, 2 Dec 2021 12:20:44 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (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 4J4ZmW6p8Xz3s6y; Thu, 2 Dec 2021 12:20:43 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ed1-f53.google.com with SMTP id r25so49114367edq.7; Thu, 02 Dec 2021 04:20:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to; bh=vwwwILNgNG0miEB3hAJI0xd3LKmkOtjJ8ouXHlXFv3E=; b=F2jNETHhnNUSOMXnKOSaLjxVqVCnIxFp5ummTnwDL79zJt7gegrXFvarnXaixV7OqG 5hWw0QoLpDPuRu0AB7cfztIAoIvNsmz2DDAlU4jq6EbMIFMZOBSk2kP0LZqKCOksuwja WYFkR1n/ePqWj6CptrrZgM41+ygHGJLrbRJ3/I6D5wLdjjiqy1G+c27ofGeP8rP3d05a qzu0JwtuCQCc98vDrc1NvgNduuzsvJ/phdg9JJE32V3cQ2jElv/G2CKFvB4kasqmrlz4 QszeEukzaOpXdfq6aRgoyaA1SUjfDiekWytDvFDgWXUj5Aitb72ac/bnjI1wh3bQOr1p XPMg== X-Gm-Message-State: AOAM530emWbauw2xz9PtqG525Txj8QBea/Hw0SRaQ6t/WUnd3+FFpCFe WzQblpQiQSPBO0vd2/Ld0m1MFaK8w5vH1g== X-Google-Smtp-Source: ABdhPJx3MYPaCz0YKJuA1b4Sea2QAnq6QgAhxjfupdl6CMXNULeZL8lyVwkutwN9XYtvbMkcGV6oPA== X-Received: by 2002:a17:907:7f1a:: with SMTP id qf26mr14795364ejc.543.1638447634583; Thu, 02 Dec 2021 04:20:34 -0800 (PST) Received: from [192.168.0.194] (ip5f5bf437.dynamic.kabel-deutschland.de. [95.91.244.55]) by smtp.gmail.com with ESMTPSA id e7sm2183699edk.3.2021.12.02.04.20.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Dec 2021 04:20:34 -0800 (PST) Content-Type: multipart/alternative; boundary="------------Jkz0a0o05yr6W0y0IcezIL06" Message-ID: Date: Thu, 2 Dec 2021 13:20:32 +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:91.0) Gecko/20100101 Thunderbird/91.3.0 Content-Language: en-US To: Warner Losh Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202111241528.1AOFSJdf038653@gitrepo.freebsd.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: Re: git: 169e06fa7852 - main - os-release: Quote variables as documented in the manual In-Reply-To: X-Rspamd-Queue-Id: 4J4ZmW6p8Xz3s6y X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.208.53 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-2.97 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.97)[-0.974]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.53:from]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.53:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[95.91.244.55:received] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------Jkz0a0o05yr6W0y0IcezIL06 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 24/11/2021 17:42, Warner Losh wrote: > On Wed, Nov 24, 2021 at 8:28 AM Mateusz Piotrowski <0mp@freebsd.org> wrote: > > URL: https://cgit.FreeBSD.org/src/commit/?id=169e06fa7852810f4ced2cce7a3c14ca9443bf39 > > > [...] > >     os-release: Quote variables as documented in the manual > >     Variables must be quoted if they contain non-alphanumeric characters. > >     Warner noted in the review that the lack of quoting causing problems >     here is rather an edge case. I believe that it's worth adding the quotes >     here anyway because this is what the specification says and there is no >     good reason not to follow it. > > > The only place it might be needed is for _version. Everything else can't > have troublesome characters. The manual does not say you have to > quote non-alphanumeric characters in variable assignment being my > main point. Certainly not the paths and URLs. That's just gratuitous > and not generally done in shell scripts (which I thought was a good > enough reason to not do it). I'd have preferred if that nuance had > been better reflected in the commit message since the change > itself won't break anything. It is not about the troublesome characters. From the perspective of sh(1) all those assignments were most likely fine as you said. This change is about the os-release(5) manual page. It says that:      •   Variable assignments must be included inside of double quotes if they          contain characters outside of A-Z, a-z and 0-9 The goal of this change was to stay consistent with the format specification. I'll make sure that my future commit messages for similar changes go through a review process as well. Often it's too easy to miss vital details for simple changes. Best, Mateusz --------------Jkz0a0o05yr6W0y0IcezIL06-- From nobody Thu Dec 2 12:26:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9FCE718B88EC; Thu, 2 Dec 2021 12: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 4J4Zv42fDXz3tfm; Thu, 2 Dec 2021 12:26:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35F5F1D2EC; Thu, 2 Dec 2021 12: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 1B2CQOGa061429; Thu, 2 Dec 2021 12: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 1B2CQO1C061428; Thu, 2 Dec 2021 12:26:24 GMT (envelope-from git) Date: Thu, 2 Dec 2021 12:26:24 GMT Message-Id: <202112021226.1B2CQO1C061428@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 156fbc648579 - main - git hooks: Remove MFH List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 156fbc64857904834a400d5947de47fd39426f0a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638447984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5clPXV63dajMryiqjUewqk3o/9vQjHDG+ZZ3IGINh7A=; b=PV1MhRWYS4woDe7mB8OBtCNYEm0/2qpwNIDiBw5cHfyHXcD7CDYikcT23NiIBS+Syq9C7D 6bZ0XCm+1QXT1juZWAsy6vSpYDzSdNhrE5yRAzasYTznh+LLOBSEKntPjGwVKJ+QFwNodw s2nqf/92DyfkiW41aCW2Q9lE/YmKnkRsjY5pr+dY/H0dbiEXVkIzzpqRudW38xFAQ45GzF Q00tm7qmryiSapRZUaYJipiUl4xVoyeMW4exFj7tfIqO1WU5B7s7FVQkGHMqCj6hUCuOBf 8crJIBHCrTfQO6G33OPmj0lifAkHJEb074B+54XtDGxVTHUahyoHsbSE17qOhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638447984; a=rsa-sha256; cv=none; b=xL0iCvKhBTrW1y1YQzA9t/2GDkpLlJUO8JZC4YAjWdUKChQJhqJX9PJ7vtEFX2Zvz60NH9 lUZc/Nj/lgL4O72j93q+NSVqj5XD3xQx9FOvaikJAd+aQQ9Ez4bgugrjPZNaZ5D+2388U3 WDM0ALcHW5+PJcoeeZ3SmIh1gb+k/X4alHPgTsuCgwsGx1OECClTIjK8vKumEhhh6bgKB1 PepvN9tGB8ZFYPJPLqBlYUr9p1tMLrHakeBWxsA4LQcDhn/8JrUgPjPgzEFdjJ5ABzMju/ 23nq/XCTCA04INscZ1hdQZdWGgcYXuYAGoINcBZatz3NvqHqGCCeDQf8hKOAFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=156fbc64857904834a400d5947de47fd39426f0a commit 156fbc64857904834a400d5947de47fd39426f0a Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-20 10:30:42 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-12-02 12:25:16 +0000 git hooks: Remove MFH The ports tree now has its own prepare-commit-msg Git hook, so there is not need to keep ports-specific metadata fields around in the src tree. Differential Revision: https://reviews.freebsd.org/D29860 --- tools/tools/git/hooks/prepare-commit-msg | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg index 761b4443cfd8..e8125f47eb33 100755 --- a/tools/tools/git/hooks/prepare-commit-msg +++ b/tools/tools/git/hooks/prepare-commit-msg @@ -50,7 +50,6 @@ $(awk '1;/^#$/{exit}' $1) # Obtained from: # Fixes: # MFC after: -# MFH: # Relnotes: # Security: # Sponsored by: From nobody Thu Dec 2 14:15:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 90AA518C1335; Thu, 2 Dec 2021 14:15: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 4J4dJt2F6Gz4skW; Thu, 2 Dec 2021 14:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D0801EE47; Thu, 2 Dec 2021 14:15: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 1B2EFQlp008840; Thu, 2 Dec 2021 14:15:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2EFQVp008839; Thu, 2 Dec 2021 14:15:26 GMT (envelope-from git) Date: Thu, 2 Dec 2021 14:15:26 GMT Message-Id: <202112021415.1B2EFQVp008839@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: 344c1bc6e643 - stable/13 - make_dev.9: Fix a typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 344c1bc6e643cf2b470c2ff8770057462f44c100 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638454526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+7uDpqqeS7aimvq0qZgrgpqg1u3/f8s+xSmCUe+iFCY=; b=YsET9zypRfjwa0mFp9s2wCLHa+y8sk01cEvqWpGJS3mQ7qx2DDfNye7Y0cYErQ0AwDhSSY PaTDtB8UCbEVtW52e03cY+HZdMveuI+omKND9zTg71H6+8phlhImi/E+GNWqV5Kx1CHnuo m9lQrTfzSAIUh5SqgcOVOaXOYg4S0YQ3WzzU6txfE5dbSsM9Ak5Xz9glRAQItsOUCeeXBs 25pc7szQPkRKyxLRzKLsj+WVjnow69Tp+/WrgOsjNaUZY+obStZwWczyYuMTggAfxsSsoW iuD+rkcBmdwlot8AfyREmm7n7cDdUqYdMWU5pw126vqy6ssreK0b1ibSpZUAXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638454526; a=rsa-sha256; cv=none; b=myblxEwhR/YiK+BbBRo6rh1CPafRzPwvLhS0bpcbZUWOiATf0wzysIyHNm8wug5PEmq2aU 3xcgxilWQfkYNeM4Ie8BzDViEyw8xZ9ueNxu2y0Cs/QKaNbztqhAc/3ShBjnYw+6LyTXe1 ZD1LKNjX6lZeNt2YXhFzX9Fk3VaPZVMlBlAhxOBVDc2yjX5pm/1SEf0/IUrsDDS1xGgF1j 8iddx4FF/lyi1rK3hh9DHVP4UGVOBiOe7x2bgXhjfZo1A9q7lHY97GQaC1Wg8jVuW8JAZe XZL1k/L+G/dW03n2DB20+MFkmKTBKKAGmZTpodxU/yyouKbllxIhrvFy7OYsrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=344c1bc6e643cf2b470c2ff8770057462f44c100 commit 344c1bc6e643cf2b470c2ff8770057462f44c100 Author: Mark Johnston AuthorDate: 2021-11-25 16:32:30 +0000 Commit: Mark Johnston CommitDate: 2021-12-02 14:15:01 +0000 make_dev.9: Fix a typo (cherry picked from commit cc7decfcf93be2a9e78923cc9782fd913f70b78e) --- share/man/man9/make_dev.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/make_dev.9 b/share/man/man9/make_dev.9 index fa186e649bd3..cd038a703616 100644 --- a/share/man/man9/make_dev.9 +++ b/share/man/man9/make_dev.9 @@ -292,7 +292,7 @@ prior to calling The .Fn make_dev_alias function is similar to -.Fn make_dev_alias +.Fn make_dev_alias_p but it returns the resulting aliasing .Ft *cdev and may not return an error. From nobody Thu Dec 2 14:15:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B9EE418C148D; Thu, 2 Dec 2021 14:15: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 4J4dJv2d3lz4sqX; Thu, 2 Dec 2021 14:15:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39E481ECA8; Thu, 2 Dec 2021 14:15: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 1B2EFRKF008865; Thu, 2 Dec 2021 14:15:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2EFRn7008864; Thu, 2 Dec 2021 14:15:27 GMT (envelope-from git) Date: Thu, 2 Dec 2021 14:15:27 GMT Message-Id: <202112021415.1B2EFRn7008864@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: 2e837779a7ef - stable/13 - link_elf_obj: Process global ifunc relocs after other global relocs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2e837779a7efe3cd315988de931257d980cc789c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638454527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rpECGlxPM0KimYPu5cJSYP+30tJabtIt1y1Et5EOtWI=; b=cuWBXroBLYbIw8UHxfLWaKZaqV75v1xDjLTlnosYX44xGFg1SlzqGx5GIU5XSab73kLDYM ATBl2U06L67zOoswN3dG/269u214hROPjyClK8kCN5NIvcFa43tuw+twavkVgJ56YNFesI 3ecysFTxvYIE5kRHWegxl1om6M8d6n8fB0g4FjjfK6bZGVBfLJI9yWnAd/K2VQlSxTJzNX nmDkDXgCFJiBr661RloeT4+xjnbhTaDA4cL4J5su3eKQPkvoDZ4WvdX1wlHTxLGhoIWr0h NDJpH1X5j1I4omDKp75QoPgBDVeh9PWDuRMuF5/lA1/AcAJi0PJAnU7TMqkIPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638454527; a=rsa-sha256; cv=none; b=TNt7k+TfnqkPWVb7gwPTFxz/5Qcah6iPWXSMuGaFAQWZLeb4kCgCoOoxU5UaUIFMOSx6GI Vsed2PfWZe2jwYziv6e8GJZReSB+tWZ/b+/yyQDEdJ3N81NM3ZRr8RzODH0g/FmuZpZP4E fj+vhXGiTMZT3Fe2Z7MXrzG31X6/EEPBi+Fqs/RZqwP4s10KnFNfjtr6m16nxqeVSYMAR7 oLCZZPHegAz+dn1hBlSxzZMIQ7Qpt4YP9Cic/XNTKZS2uN/AE+B86iYlbngfHUavxdmiOO uAH5FWJ35YKQogf4HTdTiEijCnsMkaWmm0uLjqzgEnt6DzX8dITu6yqHOOiDJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2e837779a7efe3cd315988de931257d980cc789c commit 2e837779a7efe3cd315988de931257d980cc789c Author: Mark Johnston AuthorDate: 2021-11-25 21:52:17 +0000 Commit: Mark Johnston CommitDate: 2021-12-02 14:15:15 +0000 link_elf_obj: Process global ifunc relocs after other global relocs This is needed to ensure that resolvers that reference global symbols return correct results. Reviewed by: kib Sponsored by: The FreeBSD Foundation (cherry picked from commit b11e6fd75b1bb9d337b0edab14d160ff65b11aae) --- sys/kern/link_elf_obj.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 5c6db11e1937..bafbd9f4c616 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -1321,7 +1321,7 @@ findbase(elf_file_t ef, int sec) } static int -relocate_file(elf_file_t ef) +relocate_file1(elf_file_t ef, bool ifuncs) { const Elf_Rel *rellim; const Elf_Rel *rel; @@ -1354,6 +1354,9 @@ relocate_file(elf_file_t ef) /* Local relocs are already done */ if (ELF_ST_BIND(sym->st_info) == STB_LOCAL) continue; + if ((ELF_ST_TYPE(sym->st_info) == STT_GNU_IFUNC || + elf_is_ifunc_reloc(rel->r_info)) != ifuncs) + continue; if (elf_reloc(&ef->lf, base, rel, ELF_RELOC_REL, elf_obj_lookup)) { symname = symbol_name(ef, rel->r_info); @@ -1386,6 +1389,9 @@ relocate_file(elf_file_t ef) /* Local relocs are already done */ if (ELF_ST_BIND(sym->st_info) == STB_LOCAL) continue; + if ((ELF_ST_TYPE(sym->st_info) == STT_GNU_IFUNC || + elf_is_ifunc_reloc(rela->r_info)) != ifuncs) + continue; if (elf_reloc(&ef->lf, base, rela, ELF_RELOC_RELA, elf_obj_lookup)) { symname = symbol_name(ef, rela->r_info); @@ -1406,6 +1412,17 @@ relocate_file(elf_file_t ef) return (0); } +static int +relocate_file(elf_file_t ef) +{ + int error; + + error = relocate_file1(ef, false); + if (error == 0) + error = relocate_file1(ef, true); + return (error); +} + static int link_elf_lookup_symbol(linker_file_t lf, const char *name, c_linker_sym_t *sym) { From nobody Thu Dec 2 14:15:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C2B9C18C1824; Thu, 2 Dec 2021 14:15: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 4J4dKP2dXHz4t7Z; Thu, 2 Dec 2021 14:15:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 184281EE85; Thu, 2 Dec 2021 14:15: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 1B2EFqcs009009; Thu, 2 Dec 2021 14:15:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2EFqOu009008; Thu, 2 Dec 2021 14:15:52 GMT (envelope-from git) Date: Thu, 2 Dec 2021 14:15:52 GMT Message-Id: <202112021415.1B2EFqOu009008@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: e0d7fe1a03d1 - stable/12 - link_elf_obj: Process global ifunc relocs after other global relocs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: e0d7fe1a03d17b3f6dc03e1079d103ce5a366feb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638454553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t95MnmWI2K8NaQzs1qwQsU8AA15aolDeoUyfLHHcdOE=; b=PEKmMjIlSFg6SklvgoHgNL7/h4j7sf89KF8Y5c+pPN4qxZQEUGOJXktUUFPOJ6goTO7+A5 OestcxQJSZncF+8rOCh2q2UPwCDjUgxkfbd+5/hvvxf/d3IUvopEFG2h0p7CQpADQDRjQA K72NxQQHF+JDmNYSGzFe5AH3D1oOUYvvZL6NMrOVVQOQj+0LCR6KeFvtaniUzOncIOjXSh tmc/FAnc4YotXkT202uqxMYGxKWfzro7bVg1Ubs9BH1MczrnrmX2ylsq/e+c/u15sqTHXF 1C9Ubz68W5LQ2L0/JGQNOH3zn3V32jsL27VE06piYYzHrsauqQLxkyHQJeuMMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638454553; a=rsa-sha256; cv=none; b=Ujqle8wIjmDdRV/z9W79cx131KohCxHERQpotwdE3Ai16slFC5rZ1nYMTmtoMGGCp1fYuY m4pR8APpA1g+/ZqBGrXgvpMwYg5QDKwJwgr19AGHrH3ppa9DmB85NiQUxfG4FUDGkSYqxl 87Xa0eH7qyKjCTME7dBqgHxm5eaL/p845MsXQbsQj6dX4m74874lwkSghL+Jel6hGw5xXM 2NLxGx1RE3524M/a9hR1Gx4mOWXgyQOyAmvqSk/hNc35vlun7X+zD3dHt0Fvx704v+T857 73CA06f78ASiY68R1/1eHFyvYchthmugKPXYYpHPFTvghXKV3oAZp9ockJEkzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e0d7fe1a03d17b3f6dc03e1079d103ce5a366feb commit e0d7fe1a03d17b3f6dc03e1079d103ce5a366feb Author: Mark Johnston AuthorDate: 2021-11-25 21:52:17 +0000 Commit: Mark Johnston CommitDate: 2021-12-02 14:15:42 +0000 link_elf_obj: Process global ifunc relocs after other global relocs This is needed to ensure that resolvers that reference global symbols return correct results. Reviewed by: kib Sponsored by: The FreeBSD Foundation (cherry picked from commit b11e6fd75b1bb9d337b0edab14d160ff65b11aae) --- sys/kern/link_elf_obj.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index c892c14833d6..5b79b0b4c17c 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -1244,7 +1244,7 @@ findbase(elf_file_t ef, int sec) } static int -relocate_file(elf_file_t ef) +relocate_file1(elf_file_t ef, bool ifuncs) { const Elf_Rel *rellim; const Elf_Rel *rel; @@ -1278,6 +1278,9 @@ relocate_file(elf_file_t ef) /* Local relocs are already done */ if (ELF_ST_BIND(sym->st_info) == STB_LOCAL) continue; + if ((ELF_ST_TYPE(sym->st_info) == STT_GNU_IFUNC || + elf_is_ifunc_reloc(rel->r_info)) != ifuncs) + continue; if (elf_reloc(&ef->lf, base, rel, ELF_RELOC_REL, elf_obj_lookup)) { symname = symbol_name(ef, rel->r_info); @@ -1310,6 +1313,9 @@ relocate_file(elf_file_t ef) /* Local relocs are already done */ if (ELF_ST_BIND(sym->st_info) == STB_LOCAL) continue; + if ((ELF_ST_TYPE(sym->st_info) == STT_GNU_IFUNC || + elf_is_ifunc_reloc(rela->r_info)) != ifuncs) + continue; if (elf_reloc(&ef->lf, base, rela, ELF_RELOC_RELA, elf_obj_lookup)) { symname = symbol_name(ef, rela->r_info); @@ -1330,6 +1336,17 @@ relocate_file(elf_file_t ef) return (0); } +static int +relocate_file(elf_file_t ef) +{ + int error; + + error = relocate_file1(ef, false); + if (error == 0) + error = relocate_file1(ef, true); + return (error); +} + static int link_elf_lookup_symbol(linker_file_t lf, const char *name, c_linker_sym_t *sym) { From nobody Thu Dec 2 14:52:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4051018AA731; Thu, 2 Dec 2021 14:52: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 4J4f7S73hcz3LZ7; Thu, 2 Dec 2021 14:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2EF71F375; Thu, 2 Dec 2021 14:52: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 1B2EqKf2061612; Thu, 2 Dec 2021 14:52:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2EqKP8061611; Thu, 2 Dec 2021 14:52:20 GMT (envelope-from git) Date: Thu, 2 Dec 2021 14:52:20 GMT Message-Id: <202112021452.1B2EqKP8061611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 9e89269ee7e5 - stable/13 - usb/u3g: Add support for Quectel EM05. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9e89269ee7e5f31aa60ae8c645821d4ca08f5ae6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638456741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9qHL1ON262trFhqQKYizGsLymeKk1oi77LOrpxXheMo=; b=MTN8Q0l9KGeG8B62PIgngF8HSjmSb+Gq3XhhTHVKW55+NnMO+nrtvTLpbzp4VwKW9WmLIY d79LPY3zjUsGpzudW9brog8KKtWwQkOrRIV+pVHO00uK4psNelmcKJibAtDCiVPbWxGBv9 kNHCCtKYnC883kODWUEBOXl5TsiwfaL9SDR9sYJ1PrQrrF/V+KDBxGiQJZt6HpTlhgAHGL saY3TSlAJU6HSGHOegHe2BvncKOJTzfusiPnrEGbzqLfUUPx9ujL/gUEhH7Me5l5wpuNar dZv6wEvPSZhHWAnI7gRu65Zjyo/1FeC/zHVSjQMFnWbRmJi7esFBorKpfkFLag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638456741; a=rsa-sha256; cv=none; b=NyRZ/qMLjvdTyVrRSAXMeQ12mwvhn5i6McfhAz3TvpFbmuCvacreMK3hWhFWvcPEceu8uf ATtzZMfcoDjirAbZItgJSMdpynnaeifIXSQPC+Oov9Ggw/1qqkoNfb6nEGlVmGlqKFZAxF kOyZMFfRLwJ9JxYObQB/R3AQkc21yCH3TiLugAb7RRe9/ok4miHNsrjZGg3+/eyFTaaKoC QvxVXY5GMg/qTalfgXUXVzcknLVt088DN45Uw238kZCZT1fIFII0ebO2lxsbfNUg01XAqD T7Y2+q7jzUB/7GMsXAJKo2E0rwLazTbSdBrtAl4yi4Y9rasjIKVgxNfs328Z0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=9e89269ee7e5f31aa60ae8c645821d4ca08f5ae6 commit 9e89269ee7e5f31aa60ae8c645821d4ca08f5ae6 Author: Hans Petter Selasky AuthorDate: 2021-11-25 14:27:50 +0000 Commit: Hans Petter Selasky CommitDate: 2021-12-02 14:51:46 +0000 usb/u3g: Add support for Quectel EM05. Pull Request: https://github.com/freebsd/freebsd-src/pull/565 Sponsored by: NVIDIA Networking (cherry picked from commit 0229172a65765392f566ae1cdc730615ab504e15) --- sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index fcff316d8d3a..33e6339be85d 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -496,6 +496,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(QUANTA, Q101, 0), U3G_DEV(QUANTA, Q111, 0), U3G_DEV(QUECTEL, EC25, 0), + U3G_DEV(QUECTEL, EM05, 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 b3cf80be01a4..383849f5a01d 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -3944,6 +3944,7 @@ product QUANTA RW6815R 0xf003 HP iPAQ rw6815 RNDIS /* Quectel products */ product QUECTEL EC25 0x0125 LTE modem +product QUECTEL EM05 0x0127 LTE modem /* Quickshot products */ product QUICKSHOT STRIKEPAD 0x6238 USB StrikePad From nobody Thu Dec 2 15:13:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 509C918B397E; Thu, 2 Dec 2021 15:13: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 4J4fbP1k3xz3R2W; Thu, 2 Dec 2021 15:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18B101FB0A; Thu, 2 Dec 2021 15:13: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 1B2FD4jF088734; Thu, 2 Dec 2021 15:13:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2FD40o088733; Thu, 2 Dec 2021 15:13:04 GMT (envelope-from git) Date: Thu, 2 Dec 2021 15:13:04 GMT Message-Id: <202112021513.1B2FD40o088733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 25d0ccbe1018 - main - bce(4): Fix a typo in a sysctl description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25d0ccbe1018814064d60432012bc2ef70054e58 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638457985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tCKyQSRxudWgFFLB0BXvQBotOCIh1R4iRozu2hfT5ak=; b=qoGs+dLKsmaiCqakIvfX559KBjqjA9XCjhjiLr+EySOUjALUr4iNk186CTVCL5qhRcKAuA DsfiCn31GNaDkNV6jmbgT9mp/Lom5c6M8Yq5xbVvOlQsjiCQOKimajqrKJlGhJstqcf8i9 CUi6TzQ2hkhliThBDrLt0F2r7X+Fw813qg4r1s5SdANqRLP1RKBfI2UWQyn9Tkqh/oR8s8 T4OasOPMg2rfgVA/S8xpwVlEENY2U5Cb/n7U1U/dhKxgmrbVadzpHZ39qLDRIjWAiE49vQ 0MKczS6OFkHaa3WD4xlU5pbriTIqr48VyTLV7omOJ8a+tSmRHuYqrHHm+H05Lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638457985; a=rsa-sha256; cv=none; b=N6v9MxvYSoW1TQuW17OOlOlPFRLJBwkEj9bBp24tlImFezjxAwVXiI11ULn+HwV4yULvA/ yY+lrS7hYQfL9oz8aJk6tKzY+XiPWMecG9mnQzE1iSXhn03Ap+FkWotJ/PNEf/x/lq1Y6J yItu6hLKrrm8ecJs/PR0B0PqwCj2c9CDT2wOMybFcvFuxn92+T054GLpes+Wfqu0rgVP3Y BAVtVND2sZ1+6xouAjQXbhF/MNComNsyQPmmAL9dk4QsQfZy/om1+RY/Q2oWgzItqbEvxU BNAzlIu2CoJUuREPLFmToJttQbubAdJTCW57BGAGI3CK05GvVsjGwlQmSQ5r1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=25d0ccbe1018814064d60432012bc2ef70054e58 commit 25d0ccbe1018814064d60432012bc2ef70054e58 Author: Gordon Bergling AuthorDate: 2021-12-02 15:12:34 +0000 Commit: Gordon Bergling CommitDate: 2021-12-02 15:12:34 +0000 bce(4): Fix a typo in a sysctl description - s/duirng/during/ MFC after: 3 days --- sys/dev/bce/if_bce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index 869d8f9fc40e..5bd8e3abf862 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -625,7 +625,7 @@ static int bce_rx_quick_cons_trip_int = DEFAULT_RX_QUICK_CONS_TRIP_INT; #endif SYSCTL_UINT(_hw_bce, OID_AUTO, rx_quick_cons_trip_int, CTLFLAG_RDTUN, &bce_rx_quick_cons_trip_int, 0, - "Receive BD trip point duirng interrupts"); + "Receive BD trip point during interrupts"); /* Allowable values are 1 ... 100 */ #ifdef BCE_DEBUG From nobody Thu Dec 2 16:36:41 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CC78D18BB351; Thu, 2 Dec 2021 16:36: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 4J4hRs43CHz4bY2; Thu, 2 Dec 2021 16:36:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C8A720A4A; Thu, 2 Dec 2021 16:36: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 1B2Gaf7V096010; Thu, 2 Dec 2021 16:36:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2Gafwb096009; Thu, 2 Dec 2021 16:36:41 GMT (envelope-from git) Date: Thu, 2 Dec 2021 16:36:41 GMT Message-Id: <202112021636.1B2Gafwb096009@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: 145a574fa1a9 - main - WITH_/WITHOUT_CXX: update description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 145a574fa1a9fa6732a7917778ed3185e990d1dd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638463001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jSEwB7Pik7YJGsJRT4uQBRLRi0qcTrQbpY3PmNKTE8A=; b=EXnBQqLKIytkzHjkUFHhndrcjPBEBO8XUzImgyIYKGorJKBHvQBwI8GslNBFjqWavdR904 9jeKWBzotTwNBejuyiXqvjgR+a+fXJ13n2iMZPQVxoFWwgIYrcJm46I77KprhfMaBnjCTg CZrAwmKitZ6bp0/ikgGdIQtboHlba0J0deZWHgmIWD5KmQoifddG3bw6P2LaoNRNfy8RK1 K0m8eacEUmrffHxLDZ2Q8mgWmFLJ7aCEmEyG3MBI0OLzNtgzBq6QGO3jVtk0xLMitMg+Dv 9jzoH5lM+IcI789dEItpDyiDJ9crhHeQTnNI358sb4PswS0aEgk2s1DOKH2ZWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638463001; a=rsa-sha256; cv=none; b=QbOJjG2KDJd8WZrLmCBwWVoMtZLNZ753g+8PQrud9ipJtRVILAadGSXGwuGkxsrFDjsH2/ aVWt+zMy+gl5XiTpDaU+aWj6zmMCYXb5ri4J89MobZnL2Gq8nHlH++vs+95ijl1ms37oQK tbsOmDzQM5+cli1lk44y4LiTP40Q0NtGba4tWhNYfYcZiKkii2mObVl2T5Hfqry+dV04GI 2Os5fcojxxdFvFJhGgN983ULXKR0PfaZDoso1UTTCVkt3sffDoDXL7M7+I6gFMZ0jr4zqr GUTa2VBe3qNBSGGJDIBFL5PzhQMqj5OS0WRKJaYZ6G21dNE0t5hs1TA2fpJcFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=145a574fa1a9fa6732a7917778ed3185e990d1dd commit 145a574fa1a9fa6732a7917778ed3185e990d1dd Author: Ed Maste AuthorDate: 2021-12-02 16:24:08 +0000 Commit: Ed Maste CommitDate: 2021-12-02 16:30:22 +0000 WITH_/WITHOUT_CXX: update description Contrary to the previous description WITHOUT_CXX does not disable /usr/bin/c++, which is just a link to Clang. We also no longer have gperf. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- tools/build/options/WITHOUT_CXX | 8 ++------ tools/build/options/WITH_CXX | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/tools/build/options/WITHOUT_CXX b/tools/build/options/WITHOUT_CXX index 6847ba0fc83f..a600bb03df27 100644 --- a/tools/build/options/WITHOUT_CXX +++ b/tools/build/options/WITHOUT_CXX @@ -1,8 +1,4 @@ .\" $FreeBSD$ -Do not build -.Xr c++ 1 -and related libraries. -It will also prevent building of -.Xr gperf 1 -and +Do not build C++ headers and runtime libraries. +It also prevents building binaries and libraries written in C++, including .Xr devd 8 . diff --git a/tools/build/options/WITH_CXX b/tools/build/options/WITH_CXX index cc9d7d312845..64d1b07b6f7f 100644 --- a/tools/build/options/WITH_CXX +++ b/tools/build/options/WITH_CXX @@ -1,4 +1,2 @@ .\" $FreeBSD$ -Build -.Xr c++ 1 -and related libraries. +Build C++ headers and runtime libraries. From nobody Thu Dec 2 16:36:42 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B520F18BB572; Thu, 2 Dec 2021 16:36:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4hRt6350z4bpR; Thu, 2 Dec 2021 16:36:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A231B20A4B; Thu, 2 Dec 2021 16:36: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 1B2GagHE096034; Thu, 2 Dec 2021 16:36:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2Gaglm096033; Thu, 2 Dec 2021 16:36:42 GMT (envelope-from git) Date: Thu, 2 Dec 2021 16:36:42 GMT Message-Id: <202112021636.1B2Gaglm096033@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: 24a41a520f58 - main - src.conf.5: regen after WITHOUT_CXX description update List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 24a41a520f5847ce2056bc2fa34977f07f5d4c74 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638463003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wHrQJiE1Bi2lVF7gaBADp96f/6kxvBdbA0j4Ndql6Tk=; b=Qo9IKm+PKGJVyeT9d78rgKnbyjfBcbOQ5hSkSRSoP/hDPB6ljthxoBXDLf3Jf+yBQazQ5Y 5SnbhvVuXzhTSr35j59jF1hMeBZcgG6igt1uj7u1cl24e8y2eBZ+71SF/Q85wnWejxupTJ 0wxftMB2RJXfd/uNfkv/rj1LpWKGbMTg2jjyNE/hGZ2jQB/wsb/XkYK7CjhtRZ2VvM6yde ECkxwzmRxqsSwp1fsZ/MqHRVJp9g554azNjI9CZKfMFWm9bHKPoFnGkbdkfyjvZjjaXxFy mYPBcZw781eM6E/+cg0dn+4IY3EieTV1Us1e8IYhO+BM9Miy4v9RgBLIBETHGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638463003; a=rsa-sha256; cv=none; b=BU1IEyGD4txEhmSdBUM5AgwGCGiFbocZn2nTGuYbN5V/mFCjHxX8nRiLor4g0Qw5ndxwHc IoBLhJAhlteoT+8ORCYRUbH+CLjBVH3ZKn7iG3kjMyfJHbv4R7wjpWysToewLRt1BUJ4GX 9lRz5w8wFropha2ngZOU96S3mpfARH7Q8a4BPa8jXRSVch05scGIoDT/Rw1+GhREmmbo9w FlZR6o54fz/mnsk8WymKvJEHlevarXpkLqA9Ixx/ZWEdF4vPZJKolYeDPwQve3ic0PBHF8 wozgxW+xF31rtUXF3SgocSvrZpMH5dEDRFCqeqsQCE7pBghRJOziMW3pMCBhTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=24a41a520f5847ce2056bc2fa34977f07f5d4c74 commit 24a41a520f5847ce2056bc2fa34977f07f5d4c74 Author: Ed Maste AuthorDate: 2021-12-02 16:34:24 +0000 Commit: Ed Maste CommitDate: 2021-12-02 16:34:24 +0000 src.conf.5: regen after WITHOUT_CXX description update --- share/man/man5/src.conf.5 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 44d57a3035d5..15458a004132 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd November 26, 2021 +.Dd December 2, 2021 .Dt SRC.CONF 5 .Os .Sh NAME @@ -471,12 +471,8 @@ Build This is a default setting on amd64/amd64, arm64/aarch64, i386/i386 and powerpc/powerpc64. .It Va WITHOUT_CXX -Do not build -.Xr c++ 1 -and related libraries. -It will also prevent building of -.Xr gperf 1 -and +Do not build C++ headers and runtime libraries. +It also prevents building binaries and libraries written in C++, including .Xr devd 8 . When set, it enforces these options: .Pp From nobody Thu Dec 2 18:46:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2CEEB18A8554; Thu, 2 Dec 2021 18:46: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 4J4lL951W4z3qBS; Thu, 2 Dec 2021 18:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83B5D22809; Thu, 2 Dec 2021 18:46: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 1B2IkvZe068556; Thu, 2 Dec 2021 18:46:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2Ikv3P068555; Thu, 2 Dec 2021 18:46:57 GMT (envelope-from git) Date: Thu, 2 Dec 2021 18:46:57 GMT Message-Id: <202112021846.1B2Ikv3P068555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bryan Drewery Subject: git: 8f82dc8dd3ff - main - hyperv: Flag hn and storvsc statistics with CTLFLAG_STATS. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bdrewery X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f82dc8dd3ffad550725f87ae69c0ad10fedf443 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638470817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GmfvVFvXZym/ZNFxBJckH9nwPHHyi7ReW7t/MMx0kY4=; b=Zu3R50dFd2zYudt6MDevWPkaW5M3jHxjN+ZO5+9R3GpKEArsPgEr6yxSa6uUW73I0PeKQw belhC/Iw+97+/ujEzJaDsuTj/QA3r+TNF3ZAN8nMcfoFcnovDTAiJsX+3ZkJZw5k/bklwC GLxY0mp0HzoX3e747HqbZZrCP8ONIcb7NIVDEh9Y2F1a1VI8j9o4oG0F5lWpF6bdNEQ1FX J2sPENhDUgUsY28z2IXIq/Xe1bntt+FnWmGqMDo9W0o+1JmJzKAFuJYTNILdtgPTaGeWnc BMWTwhnbnpBjGEAoeZUfH1stupjxzaHG2i89CDB0cyj4kz+9NxifFh8YhygTOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638470817; a=rsa-sha256; cv=none; b=gSl5wFIVeJ5rsTaXIOOubzMbGLnCdX7Up6qzHTwZ/WnQAkIb3fM5BiUdXZ3P4zj2Ft98h5 2a8PgzxYl/wf2VOva2D1tZsPILm0GE70L5OnvxtqGAZc8dsf28jeekKDJON20IzvNN9eqB VYekmjWvBGpTE9LZvmFcaR5K8dBn0DW2nbOF67+JtEUVaHYUOemHAF7kqJODJQCIEhzmhY sNwbAOatuto23Q6gGlEYxkHWJLjl8jkZrQTCfi62yhMINEw1ol5OnuoUsDlrXQKjyfL4zh tubWYL50HxpPFbcqvaCTUFG6LVaTeyIyHqYUurEu/RzVpqtkDlrxyij1uXCriA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bdrewery: URL: https://cgit.FreeBSD.org/src/commit/?id=8f82dc8dd3ffad550725f87ae69c0ad10fedf443 commit 8f82dc8dd3ffad550725f87ae69c0ad10fedf443 Author: Don Morris AuthorDate: 2021-04-30 18:33:00 +0000 Commit: Bryan Drewery CommitDate: 2021-12-02 18:46:36 +0000 hyperv: Flag hn and storvsc statistics with CTLFLAG_STATS. Reviewed by: vangyzen, whu, bdrewery Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D30060 --- sys/dev/hyperv/netvsc/if_hn.c | 49 ++++++++++++++----------- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c | 15 +++++--- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index d562a937ecad..de464662c2ef 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -5055,21 +5055,25 @@ hn_create_rx_data(struct hn_softc *sc, int ring_cnt) if (rxr->hn_rx_sysctl_tree != NULL) { SYSCTL_ADD_ULONG(ctx, SYSCTL_CHILDREN(rxr->hn_rx_sysctl_tree), - OID_AUTO, "packets", CTLFLAG_RW, - &rxr->hn_pkts, "# of packets received"); + OID_AUTO, "packets", + CTLFLAG_RW | CTLFLAG_STATS, &rxr->hn_pkts, + "# of packets received"); SYSCTL_ADD_ULONG(ctx, SYSCTL_CHILDREN(rxr->hn_rx_sysctl_tree), - OID_AUTO, "rss_pkts", CTLFLAG_RW, + OID_AUTO, "rss_pkts", + CTLFLAG_RW | CTLFLAG_STATS, &rxr->hn_rss_pkts, "# of packets w/ RSS info received"); SYSCTL_ADD_ULONG(ctx, SYSCTL_CHILDREN(rxr->hn_rx_sysctl_tree), - OID_AUTO, "rsc_pkts", CTLFLAG_RW, + OID_AUTO, "rsc_pkts", + CTLFLAG_RW | CTLFLAG_STATS, &rxr->hn_rsc_pkts, "# of RSC packets received"); SYSCTL_ADD_ULONG(ctx, SYSCTL_CHILDREN(rxr->hn_rx_sysctl_tree), - OID_AUTO, "rsc_drop", CTLFLAG_RW, + OID_AUTO, "rsc_drop", + CTLFLAG_RW | CTLFLAG_STATS, &rxr->hn_rsc_drop, "# of RSC fragments dropped"); SYSCTL_ADD_INT(ctx, @@ -5082,7 +5086,7 @@ hn_create_rx_data(struct hn_softc *sc, int ring_cnt) } SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "lro_queued", - CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS , sc, __offsetof(struct hn_rx_ring, hn_lro.lro_queued), #if __FreeBSD_version < 1100095 hn_rx_stat_int_sysctl, @@ -5091,7 +5095,7 @@ hn_create_rx_data(struct hn_softc *sc, int ring_cnt) #endif "LU", "LRO queued"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "lro_flushed", - CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS , sc, __offsetof(struct hn_rx_ring, hn_lro.lro_flushed), #if __FreeBSD_version < 1100095 hn_rx_stat_int_sysctl, @@ -5100,7 +5104,7 @@ hn_create_rx_data(struct hn_softc *sc, int ring_cnt) #endif "LU", "LRO flushed"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "lro_tried", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS , sc, __offsetof(struct hn_rx_ring, hn_lro_tried), hn_rx_stat_ulong_sysctl, "LU", "# of LRO tries"); #if __FreeBSD_version >= 1100099 @@ -5129,15 +5133,15 @@ hn_create_rx_data(struct hn_softc *sc, int ring_cnt) "Trust ip packet verification on host side, " "when csum info is missing"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "csum_ip", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS , sc, __offsetof(struct hn_rx_ring, hn_csum_ip), hn_rx_stat_ulong_sysctl, "LU", "RXCSUM IP"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "csum_tcp", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS , sc, __offsetof(struct hn_rx_ring, hn_csum_tcp), hn_rx_stat_ulong_sysctl, "LU", "RXCSUM TCP"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "csum_udp", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS , sc, __offsetof(struct hn_rx_ring, hn_csum_udp), hn_rx_stat_ulong_sysctl, "LU", "RXCSUM UDP"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "csum_trusted", @@ -5146,11 +5150,11 @@ hn_create_rx_data(struct hn_softc *sc, int ring_cnt) hn_rx_stat_ulong_sysctl, "LU", "# of packets that we trust host's csum verification"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "small_pkts", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS , sc, __offsetof(struct hn_rx_ring, hn_small_pkts), hn_rx_stat_ulong_sysctl, "LU", "# of small packets received"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rx_ack_failed", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS , sc, __offsetof(struct hn_rx_ring, hn_ack_failed), hn_rx_stat_ulong_sysctl, "LU", "# of RXBUF ack failures"); SYSCTL_ADD_INT(ctx, child, OID_AUTO, "rx_ring_cnt", @@ -5391,10 +5395,11 @@ hn_tx_ring_create(struct hn_softc *sc, int id) "over active"); } SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "packets", - CTLFLAG_RW, &txr->hn_pkts, + CTLFLAG_RW | CTLFLAG_STATS, &txr->hn_pkts, "# of packets transmitted"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "sends", - CTLFLAG_RW, &txr->hn_sends, "# of sends"); + CTLFLAG_RW | CTLFLAG_STATS, &txr->hn_sends, + "# of sends"); } } @@ -5517,32 +5522,32 @@ hn_create_tx_data(struct hn_softc *sc, int ring_cnt) } SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "no_txdescs", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS, sc, __offsetof(struct hn_tx_ring, hn_no_txdescs), hn_tx_stat_ulong_sysctl, "LU", "# of times short of TX descs"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "send_failed", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS, sc, __offsetof(struct hn_tx_ring, hn_send_failed), hn_tx_stat_ulong_sysctl, "LU", "# of hyper-v sending failure"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "txdma_failed", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS, sc, __offsetof(struct hn_tx_ring, hn_txdma_failed), hn_tx_stat_ulong_sysctl, "LU", "# of TX DMA failure"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "agg_flush_failed", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS, sc, __offsetof(struct hn_tx_ring, hn_flush_failed), hn_tx_stat_ulong_sysctl, "LU", "# of packet transmission aggregation flush failure"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tx_collapsed", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS, sc, __offsetof(struct hn_tx_ring, hn_tx_collapsed), hn_tx_stat_ulong_sysctl, "LU", "# of TX mbuf collapsed"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tx_chimney", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS, sc, __offsetof(struct hn_tx_ring, hn_tx_chimney), hn_tx_stat_ulong_sysctl, "LU", "# of chimney send"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tx_chimney_tried", - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE | CTLFLAG_STATS, sc, __offsetof(struct hn_tx_ring, hn_tx_chimney_tried), hn_tx_stat_ulong_sysctl, "LU", "# of chimney send tries"); SYSCTL_ADD_INT(ctx, child, OID_AUTO, "txdesc_cnt", diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c index 702308e26a1d..13e52ec1b6db 100644 --- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c @@ -1006,12 +1006,15 @@ storvsc_sysctl(device_t dev) ctx = device_get_sysctl_ctx(dev); child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); - SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "data_bio_cnt", CTLFLAG_RW, - &sc->sysctl_data.data_bio_cnt, "# of bio data block"); - SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "data_vaddr_cnt", CTLFLAG_RW, - &sc->sysctl_data.data_vaddr_cnt, "# of vaddr data block"); - SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "data_sg_cnt", CTLFLAG_RW, - &sc->sysctl_data.data_sg_cnt, "# of sg data block"); + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "data_bio_cnt", + CTLFLAG_RW | CTLFLAG_STATS, &sc->sysctl_data.data_bio_cnt, + "# of bio data block"); + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "data_vaddr_cnt", + CTLFLAG_RW | CTLFLAG_STATS, &sc->sysctl_data.data_vaddr_cnt, + "# of vaddr data block"); + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "data_sg_cnt", + CTLFLAG_RW | CTLFLAG_STATS, &sc->sysctl_data.data_sg_cnt, + "# of sg data block"); /* dev.storvsc.UNIT.channel */ ch_tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "channel", From nobody Thu Dec 2 18:49:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CB82A18A9505; Thu, 2 Dec 2021 18:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4lNb41B8z3rKM; Thu, 2 Dec 2021 18:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6986822655; Thu, 2 Dec 2021 18:49: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 1B2In327068853; Thu, 2 Dec 2021 18:49:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2In3Dm068852; Thu, 2 Dec 2021 18:49:03 GMT (envelope-from git) Date: Thu, 2 Dec 2021 18:49:03 GMT Message-Id: <202112021849.1B2In3Dm068852@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: 1cec1c5831b0 - main - Allow to compile RSS without PCBGROUP. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1cec1c5831b02307f8273ae6fa5b10470bfcee4b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638470943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O5Rj1r6ofgRaBGgs/NtuHduqGOyLmJvUxkeXmN0gY2U=; b=GGnHFHr0HRcoHYAhdle8YKYpJ5zgvEhkVcqw2Qz/pAXA3K5Ngwn8Gm3A8TDjHaJhlG20gp 0Zuk/SC4xnbNPqafdV/9jpJzg7HU5Dgtlp4PY0CBnPIpgXsgfECCghpY9wXZg9QgLbtFhY QsmB4pZAVb8nWgHVkEdqS3OiFBesRm8zzFWPC2DlKhl3zdimY3ymfbeEQbppaegEi/MQ7Z 031yve0f/lXWdEzcyC90B3FzUqZLmh0Ho/hALNOn1adciLh1Y3ke7phmTrSpRLuuU5aR5K k/BKW4NHOMslTODe6eylcSeb9BTeSZ5AU0MeN7fsORPJUmHOE6jwRTLeVZV5iQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638470943; a=rsa-sha256; cv=none; b=l2U6azr/FfDtGaEVvxYMycjzfAk/XWHtWa4TjtT2RE2FfWSJ+cxg9RPleFlUd+4eyUC9ug u1CthNE1olkF+J7/5LqGABTvjBh7kZbN7lUNGs5iG5t2b2g1SNRpyPqcg9IzuP86S8IOk7 xOUxpjHEKCP2Yem8PmlQCSIIzMH3klHfE6Aa2nOKOAyV5fqaofEgZcbxBJyh1m5lsR4Foi TcnCRYokOmGImFo+cjj0k1tyByX6a9Y4794g0vRQKHwJz9Fe8hvbFAL+L7cQFyk5qh+BK7 nTZR7L8g5Rv7Avvsn5+ACC5Z7VIWsAnsit1NSg7Amr8BOleycHACrCXlSp5hhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=1cec1c5831b02307f8273ae6fa5b10470bfcee4b commit 1cec1c5831b02307f8273ae6fa5b10470bfcee4b Author: Gleb Smirnoff AuthorDate: 2021-12-02 18:48:48 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-02 18:48:48 +0000 Allow to compile RSS without PCBGROUP. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33019 --- sys/net/rss_config.c | 4 ---- sys/netinet/in_rss.c | 4 ---- sys/netinet6/in6_rss.c | 4 ---- 3 files changed, 12 deletions(-) diff --git a/sys/net/rss_config.c b/sys/net/rss_config.c index 0b559307f1bb..5efa1ab3b5c1 100644 --- a/sys/net/rss_config.c +++ b/sys/net/rss_config.c @@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_pcbgroup.h" -#ifndef PCBGROUP -#error "options RSS depends on options PCBGROUP" -#endif - #include #include #include diff --git a/sys/netinet/in_rss.c b/sys/netinet/in_rss.c index 05659b97fe7c..76438a330bb5 100644 --- a/sys/netinet/in_rss.c +++ b/sys/netinet/in_rss.c @@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_pcbgroup.h" -#ifndef PCBGROUP -#error "options RSS depends on options PCBGROUP" -#endif - #include #include #include diff --git a/sys/netinet6/in6_rss.c b/sys/netinet6/in6_rss.c index 2b86d961515b..d3a8fdb8c2c4 100644 --- a/sys/netinet6/in6_rss.c +++ b/sys/netinet6/in6_rss.c @@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_pcbgroup.h" -#ifndef PCBGROUP -#error "options RSS depends on options PCBGROUP" -#endif - #include #include #include From nobody Thu Dec 2 18:49:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2A13518A950E; Thu, 2 Dec 2021 18:49: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 4J4lNc5zsdz3rFh; Thu, 2 Dec 2021 18:49:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A50E722533; Thu, 2 Dec 2021 18:49: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 1B2In4Ua068877; Thu, 2 Dec 2021 18:49:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2In4om068876; Thu, 2 Dec 2021 18:49:04 GMT (envelope-from git) Date: Thu, 2 Dec 2021 18:49:04 GMT Message-Id: <202112021849.1B2In4om068876@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: 93c67567e015 - main - Remove "options PCBGROUP" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 93c67567e01582731f3075bc68b1fc5f1fd5e5a2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638470944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gx/MA93cYwcSbWEMR0QaUlLISkKxuErqtQNUS+SEV1k=; b=Zb2nrhHt4H4244hN0kDL480P+h/+soGSm+OodBK5VmrXaOjnTZ6l28XcaeCmuXtnPggbtW zTU6DreIAlBpxznnAc6mdg6AePJNHW+D9RQ/0mnHv7VQamvO26j9ucwrPWXvt9ChbRZe1e DUYDEDtYfukxF1P9AWhHdK4AcmUSLl03PJITwOy0PzxGZog3yjJvaJEHExZ5rUoiJbL0Tw MyJ3lCDYJVK0bC5s63zf3CD5dvM0O4mEoocSrzZJrKnzkRpQq8MLJVxXnuWAgHpMz7Z79f zJ52L+vlW0e7q990EPlfscFkbQru+49v33JooOEW8dxvNX5nm/w9L0Kda0UIrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638470944; a=rsa-sha256; cv=none; b=ES85WZ8d+IO/rjiNkcb5KQNXd1NKpKs153W8ILj01LYisdQ9f1ihDu6je+XkeU9Di24/kT LX4+24xOg/sVyGKDukxubZJeezgUNrnK/yN1jF0YXy94esCUjJ0xs4W9AI49l3OLkdVqnJ LVFJ93t2vYYbq23b6CiGWAaX4/IprTdKs98CeF7n+BAyDLtWlJOEdeqs0GvSoQ/+FiBJYO 0pQPfFy9qgrkIzyAhmMc1T0ldLM0BcXAfNJsn14UwU2VYvIdb7RX0/wT89XS0yxLkdhrVK /pIO1tbUMzptA8a36yJbwZ6SrHIo9OpMo6FA5hwHtIhuE+PnvuFy9yrAPhgPlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=93c67567e01582731f3075bc68b1fc5f1fd5e5a2 commit 93c67567e01582731f3075bc68b1fc5f1fd5e5a2 Author: Gleb Smirnoff AuthorDate: 2021-12-02 18:48:48 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-02 18:48:48 +0000 Remove "options PCBGROUP" With upcoming changes to the inpcb synchronisation it is going to be broken. Even its current status after the move of PCB synchronization to the network epoch is very questionable. This experimental feature was sponsored by Juniper but ended never to be used in Juniper and doesn't exist in their source tree [sjg@, stevek@, jtl@]. In the past (AFAIK, pre-epoch times) it was tried out at Netflix [gallatin@, rrs@] with no positive result and at Yandex [ae@, melifaro@]. I'm up to resurrecting it back if there is any interest from anybody. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33020 --- sys/conf/files | 2 - sys/conf/options | 1 - sys/net/rss_config.c | 1 - sys/netinet/in_pcb.c | 316 +------------------------ sys/netinet/in_pcb.h | 66 +----- sys/netinet/in_pcbgroup.c | 566 -------------------------------------------- sys/netinet/in_rss.c | 1 - sys/netinet/tcp_syncache.c | 1 - sys/netinet6/in6_pcb.c | 252 -------------------- sys/netinet6/in6_pcb.h | 10 - sys/netinet6/in6_pcbgroup.c | 153 ------------ sys/netinet6/in6_rss.c | 1 - 12 files changed, 4 insertions(+), 1366 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 0c54622e2563..9b3683a45d80 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4323,7 +4323,6 @@ netinet/ip_id.c optional inet netinet/in_jail.c optional inet netinet/in_mcast.c optional inet netinet/in_pcb.c optional inet | inet6 -netinet/in_pcbgroup.c optional inet pcbgroup | inet6 pcbgroup netinet/in_prot.c optional inet | inet6 netinet/in_proto.c optional inet | inet6 netinet/in_rmx.c optional inet @@ -4411,7 +4410,6 @@ netinet6/in6_ifattach.c optional inet6 netinet6/in6_jail.c optional inet6 netinet6/in6_mcast.c optional inet6 netinet6/in6_pcb.c optional inet6 -netinet6/in6_pcbgroup.c optional inet6 pcbgroup netinet6/in6_proto.c optional inet6 netinet6/in6_rmx.c optional inet6 netinet6/in6_rss.c optional inet6 rss diff --git a/sys/conf/options b/sys/conf/options index 123a770ed74c..faa37d5bc67d 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -458,7 +458,6 @@ MBUF_PROFILING MBUF_STRESS_TEST MROUTING opt_mrouting.h NFSLOCKD -PCBGROUP opt_pcbgroup.h PF_DEFAULT_TO_DROP opt_pf.h ROUTE_MPATH opt_route.h ROUTETABLES opt_route.h diff --git a/sys/net/rss_config.c b/sys/net/rss_config.c index 5efa1ab3b5c1..ee15ed3da2bf 100644 --- a/sys/net/rss_config.c +++ b/sys/net/rss_config.c @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" -#include "opt_pcbgroup.h" #include #include diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 9dd2aee11bf0..f1ac46b28477 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ratelimit.h" -#include "opt_pcbgroup.h" #include "opt_route.h" #include "opt_rss.h" @@ -542,9 +541,6 @@ in_pcbinfo_init(struct inpcbinfo *pcbinfo, const char *name, &pcbinfo->ipi_porthashmask); pcbinfo->ipi_lbgrouphashbase = hashinit(porthash_nelements, M_PCB, &pcbinfo->ipi_lbgrouphashmask); -#ifdef PCBGROUP - in_pcbgroup_init(pcbinfo, hashfields, hash_nelements); -#endif pcbinfo->ipi_zone = uma_zcreate(inpcbzone_name, sizeof(struct inpcb), NULL, NULL, inpcbzone_init, inpcb_fini, UMA_ALIGN_PTR, 0); uma_zone_set_max(pcbinfo->ipi_zone, maxsockets); @@ -567,9 +563,6 @@ in_pcbinfo_destroy(struct inpcbinfo *pcbinfo) pcbinfo->ipi_porthashmask); hashdestroy(pcbinfo->ipi_lbgrouphashbase, M_PCB, pcbinfo->ipi_lbgrouphashmask); -#ifdef PCBGROUP - in_pcbgroup_destroy(pcbinfo); -#endif uma_zdestroy(pcbinfo->ipi_zone); INP_LIST_LOCK_DESTROY(pcbinfo); INP_HASH_LOCK_DESTROY(pcbinfo); @@ -1522,8 +1515,7 @@ in_pcbdetach(struct inpcb *inp) * in_pcbref() bumps the reference count on an inpcb in order to maintain * stability of an inpcb pointer despite the inpcb lock being released. This * is used in TCP when the inpcbinfo lock needs to be acquired or upgraded, - * but where the inpcb lock may already held, or when acquiring a reference - * via a pcbgroup. + * but where the inpcb lock may already held. * * in_pcbref() should be used only to provide brief memory stability, and * must always be followed by a call to INP_WLOCK() and in_pcbrele() to @@ -1783,9 +1775,6 @@ in_pcbdrop(struct inpcb *inp) } INP_HASH_WUNLOCK(inp->inp_pcbinfo); inp->inp_flags &= ~INP_INHASHLIST; -#ifdef PCBGROUP - in_pcbgroup_remove(inp); -#endif } } @@ -2097,241 +2086,6 @@ in_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, return (local_wild); } -#ifdef PCBGROUP -/* - * Lookup PCB in hash list, using pcbgroup tables. - */ -static struct inpcb * -in_pcblookup_group(struct inpcbinfo *pcbinfo, struct inpcbgroup *pcbgroup, - struct in_addr faddr, u_int fport_arg, struct in_addr laddr, - u_int lport_arg, int lookupflags, struct ifnet *ifp) -{ - struct inpcbhead *head; - struct inpcb *inp, *tmpinp; - u_short fport = fport_arg, lport = lport_arg; - bool locked; - - /* - * First look for an exact match. - */ - tmpinp = NULL; - INP_GROUP_LOCK(pcbgroup); - head = &pcbgroup->ipg_hashbase[INP_PCBHASH(faddr.s_addr, lport, fport, - pcbgroup->ipg_hashmask)]; - CK_LIST_FOREACH(inp, head, inp_pcbgrouphash) { -#ifdef INET6 - /* XXX inp locking */ - if ((inp->inp_vflag & INP_IPV4) == 0) - continue; -#endif - if (inp->inp_faddr.s_addr == faddr.s_addr && - inp->inp_laddr.s_addr == laddr.s_addr && - inp->inp_fport == fport && - inp->inp_lport == lport) { - /* - * XXX We should be able to directly return - * the inp here, without any checks. - * Well unless both bound with SO_REUSEPORT? - */ - if (prison_flag(inp->inp_cred, PR_IP4)) - goto found; - if (tmpinp == NULL) - tmpinp = inp; - } - } - if (tmpinp != NULL) { - inp = tmpinp; - goto found; - } - -#ifdef RSS - /* - * For incoming connections, we may wish to do a wildcard - * match for an RSS-local socket. - */ - if ((lookupflags & INPLOOKUP_WILDCARD) != 0) { - struct inpcb *local_wild = NULL, *local_exact = NULL; -#ifdef INET6 - struct inpcb *local_wild_mapped = NULL; -#endif - struct inpcb *jail_wild = NULL; - struct inpcbhead *head; - int injail; - - /* - * Order of socket selection - we always prefer jails. - * 1. jailed, non-wild. - * 2. jailed, wild. - * 3. non-jailed, non-wild. - * 4. non-jailed, wild. - */ - - head = &pcbgroup->ipg_hashbase[INP_PCBHASH(INADDR_ANY, - lport, 0, pcbgroup->ipg_hashmask)]; - CK_LIST_FOREACH(inp, head, inp_pcbgrouphash) { -#ifdef INET6 - /* XXX inp locking */ - if ((inp->inp_vflag & INP_IPV4) == 0) - continue; -#endif - if (inp->inp_faddr.s_addr != INADDR_ANY || - inp->inp_lport != lport) - continue; - - injail = prison_flag(inp->inp_cred, PR_IP4); - if (injail) { - if (prison_check_ip4(inp->inp_cred, - &laddr) != 0) - continue; - } else { - if (local_exact != NULL) - continue; - } - - if (inp->inp_laddr.s_addr == laddr.s_addr) { - if (injail) - goto found; - else - local_exact = inp; - } else if (inp->inp_laddr.s_addr == INADDR_ANY) { -#ifdef INET6 - /* XXX inp locking, NULL check */ - if (inp->inp_vflag & INP_IPV6PROTO) - local_wild_mapped = inp; - else -#endif - if (injail) - jail_wild = inp; - else - local_wild = inp; - } - } /* LIST_FOREACH */ - - inp = jail_wild; - if (inp == NULL) - inp = local_exact; - if (inp == NULL) - inp = local_wild; -#ifdef INET6 - if (inp == NULL) - inp = local_wild_mapped; -#endif - if (inp != NULL) - goto found; - } -#endif - - /* - * Then look for a wildcard match, if requested. - */ - if ((lookupflags & INPLOOKUP_WILDCARD) != 0) { - struct inpcb *local_wild = NULL, *local_exact = NULL; -#ifdef INET6 - struct inpcb *local_wild_mapped = NULL; -#endif - struct inpcb *jail_wild = NULL; - struct inpcbhead *head; - int injail; - - /* - * Order of socket selection - we always prefer jails. - * 1. jailed, non-wild. - * 2. jailed, wild. - * 3. non-jailed, non-wild. - * 4. non-jailed, wild. - */ - head = &pcbinfo->ipi_wildbase[INP_PCBHASH(INADDR_ANY, lport, - 0, pcbinfo->ipi_wildmask)]; - CK_LIST_FOREACH(inp, head, inp_pcbgroup_wild) { -#ifdef INET6 - /* XXX inp locking */ - if ((inp->inp_vflag & INP_IPV4) == 0) - continue; -#endif - if (inp->inp_faddr.s_addr != INADDR_ANY || - inp->inp_lport != lport) - continue; - - injail = prison_flag(inp->inp_cred, PR_IP4); - if (injail) { - if (prison_check_ip4(inp->inp_cred, - &laddr) != 0) - continue; - } else { - if (local_exact != NULL) - continue; - } - - if (inp->inp_laddr.s_addr == laddr.s_addr) { - if (injail) - goto found; - else - local_exact = inp; - } else if (inp->inp_laddr.s_addr == INADDR_ANY) { -#ifdef INET6 - /* XXX inp locking, NULL check */ - if (inp->inp_vflag & INP_IPV6PROTO) - local_wild_mapped = inp; - else -#endif - if (injail) - jail_wild = inp; - else - local_wild = inp; - } - } /* LIST_FOREACH */ - inp = jail_wild; - if (inp == NULL) - inp = local_exact; - if (inp == NULL) - inp = local_wild; -#ifdef INET6 - if (inp == NULL) - inp = local_wild_mapped; -#endif - if (inp != NULL) - goto found; - } /* if (lookupflags & INPLOOKUP_WILDCARD) */ - INP_GROUP_UNLOCK(pcbgroup); - return (NULL); - -found: - if (lookupflags & INPLOOKUP_WLOCKPCB) - locked = INP_TRY_WLOCK(inp); - else if (lookupflags & INPLOOKUP_RLOCKPCB) - locked = INP_TRY_RLOCK(inp); - else - panic("%s: locking bug", __func__); - if (__predict_false(locked && (inp->inp_flags2 & INP_FREED))) { - if (lookupflags & INPLOOKUP_WLOCKPCB) - INP_WUNLOCK(inp); - else - INP_RUNLOCK(inp); - return (NULL); - } else if (!locked) - in_pcbref(inp); - INP_GROUP_UNLOCK(pcbgroup); - if (!locked) { - if (lookupflags & INPLOOKUP_WLOCKPCB) { - INP_WLOCK(inp); - if (in_pcbrele_wlocked(inp)) - return (NULL); - } else { - INP_RLOCK(inp); - if (in_pcbrele_rlocked(inp)) - return (NULL); - } - } -#ifdef INVARIANTS - if (lookupflags & INPLOOKUP_WLOCKPCB) - INP_WLOCK_ASSERT(inp); - else - INP_RLOCK_ASSERT(inp); -#endif - return (inp); -} -#endif /* PCBGROUP */ - /* * Lookup PCB in hash list, using pcbinfo tables. This variation assumes * that the caller has locked the hash list, and will not perform any further @@ -2497,40 +2251,17 @@ in_pcblookup_hash(struct inpcbinfo *pcbinfo, struct in_addr faddr, /* * Public inpcb lookup routines, accepting a 4-tuple, and optionally, an mbuf * from which a pre-calculated hash value may be extracted. - * - * Possibly more of this logic should be in in_pcbgroup.c. */ struct inpcb * in_pcblookup(struct inpcbinfo *pcbinfo, struct in_addr faddr, u_int fport, struct in_addr laddr, u_int lport, int lookupflags, struct ifnet *ifp) { -#if defined(PCBGROUP) && !defined(RSS) - struct inpcbgroup *pcbgroup; -#endif KASSERT((lookupflags & ~INPLOOKUP_MASK) == 0, ("%s: invalid lookup flags %d", __func__, lookupflags)); KASSERT((lookupflags & (INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)) != 0, ("%s: LOCKPCB not set", __func__)); - /* - * When not using RSS, use connection groups in preference to the - * reservation table when looking up 4-tuples. When using RSS, just - * use the reservation table, due to the cost of the Toeplitz hash - * in software. - * - * XXXRW: This policy belongs in the pcbgroup code, as in principle - * we could be doing RSS with a non-Toeplitz hash that is affordable - * in software. - */ -#if defined(PCBGROUP) && !defined(RSS) - if (in_pcbgroup_enabled(pcbinfo)) { - pcbgroup = in_pcbgroup_bytuple(pcbinfo, laddr, lport, faddr, - fport); - return (in_pcblookup_group(pcbinfo, pcbgroup, faddr, fport, - laddr, lport, lookupflags, ifp)); - } -#endif return (in_pcblookup_hash(pcbinfo, faddr, fport, laddr, lport, lookupflags, ifp, M_NODOM)); } @@ -2540,39 +2271,12 @@ in_pcblookup_mbuf(struct inpcbinfo *pcbinfo, struct in_addr faddr, u_int fport, struct in_addr laddr, u_int lport, int lookupflags, struct ifnet *ifp, struct mbuf *m) { -#ifdef PCBGROUP - struct inpcbgroup *pcbgroup; -#endif KASSERT((lookupflags & ~INPLOOKUP_MASK) == 0, ("%s: invalid lookup flags %d", __func__, lookupflags)); KASSERT((lookupflags & (INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)) != 0, ("%s: LOCKPCB not set", __func__)); -#ifdef PCBGROUP - /* - * If we can use a hardware-generated hash to look up the connection - * group, use that connection group to find the inpcb. Otherwise - * fall back on a software hash -- or the reservation table if we're - * using RSS. - * - * XXXRW: As above, that policy belongs in the pcbgroup code. - */ - if (in_pcbgroup_enabled(pcbinfo) && - !(M_HASHTYPE_TEST(m, M_HASHTYPE_NONE))) { - pcbgroup = in_pcbgroup_byhash(pcbinfo, M_HASHTYPE_GET(m), - m->m_pkthdr.flowid); - if (pcbgroup != NULL) - return (in_pcblookup_group(pcbinfo, pcbgroup, faddr, - fport, laddr, lport, lookupflags, ifp)); -#ifndef RSS - pcbgroup = in_pcbgroup_bytuple(pcbinfo, laddr, lport, faddr, - fport); - return (in_pcblookup_group(pcbinfo, pcbgroup, faddr, fport, - laddr, lport, lookupflags, ifp)); -#endif - } -#endif return (in_pcblookup_hash(pcbinfo, faddr, fport, laddr, lport, lookupflags, ifp, m->m_pkthdr.numa_domain)); } @@ -2647,13 +2351,7 @@ in_pcbinshash_internal(struct inpcb *inp, struct mbuf *m) CK_LIST_INSERT_HEAD(&phd->phd_pcblist, inp, inp_portlist); CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash); inp->inp_flags |= INP_INHASHLIST; -#ifdef PCBGROUP - if (m != NULL) { - in_pcbgroup_update_mbuf(inp, m); - } else { - in_pcbgroup_update(inp); - } -#endif + return (0); } @@ -2702,13 +2400,6 @@ in_pcbrehash_mbuf(struct inpcb *inp, struct mbuf *m) CK_LIST_REMOVE(inp, inp_hash); CK_LIST_INSERT_HEAD(head, inp, inp_hash); - -#ifdef PCBGROUP - if (m != NULL) - in_pcbgroup_update_mbuf(inp, m); - else - in_pcbgroup_update(inp); -#endif } void @@ -2749,9 +2440,6 @@ in_pcbremlists(struct inpcb *inp) } CK_LIST_REMOVE(inp, inp_list); pcbinfo->ipi_count--; -#ifdef PCBGROUP - in_pcbgroup_remove(inp); -#endif } /* diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index d6a335236599..813c87559de3 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -156,7 +156,6 @@ struct in_conninfo { * (b) - Protected by the hpts lock. * (c) - Constant after initialization * (e) - Protected by the net_epoch_prempt epoch - * (g) - Protected by the pcbgroup lock * (i) - Protected by the inpcb lock * (p) - Protected by the pcbinfo lock for the inpcb * (l) - Protected by the pcblist lock for the inpcb @@ -231,7 +230,6 @@ struct m_snd_tag; struct inpcb { /* Cache line #1 (amd64) */ CK_LIST_ENTRY(inpcb) inp_hash; /* [w](h/i) [r](e/i) hash list */ - CK_LIST_ENTRY(inpcb) inp_pcbgrouphash; /* (g/i) hash list */ struct rwlock inp_lock; /* Cache line #2 (amd64) */ #define inp_start_zero inp_hpts @@ -276,8 +274,6 @@ struct inpcb { uint32_t inp_hpts_drop_reas; /* reason we are dropping the PCB (lock i&b) */ TAILQ_ENTRY(inpcb) inp_input; /* pacing in queue next lock(b) */ struct inpcbinfo *inp_pcbinfo; /* (c) PCB list info */ - struct inpcbgroup *inp_pcbgroup; /* (g/i) PCB group list */ - CK_LIST_ENTRY(inpcb) inp_pcbgroup_wild; /* (g/i/h) group wildcard entry */ struct ucred *inp_cred; /* (c) cache of socket cred */ u_int32_t inp_flow; /* (i) IPv6 flow information */ u_char inp_vflag; /* (i) IP version flag (v4/v6) */ @@ -423,7 +419,6 @@ struct inpcbport { * ipi_lock (before) * inpcb locks (before) * ipi_list locks (before) - * {ipi_hash_lock, pcbgroup locks} * * Locking key: * @@ -432,7 +427,6 @@ struct inpcbport { * (g) Locked by ipi_lock * (l) Locked by ipi_list_lock * (h) Read using either net_epoch_preempt or inpcb lock; write requires both ipi_hash_lock and inpcb lock - * (p) Protected by one or more pcbgroup locks * (x) Synchronisation properties poorly defined */ struct inpcbinfo { @@ -466,16 +460,7 @@ struct inpcbinfo { struct uma_zone *ipi_zone; /* (c) */ /* - * Connection groups associated with this protocol. These fields are - * constant, but pcbgroup structures themselves are protected by - * per-pcbgroup locks. - */ - struct inpcbgroup *ipi_pcbgroups; /* (c) */ - u_int ipi_npcbgroups; /* (c) */ - u_int ipi_hashfields; /* (c) */ - - /* - * Global lock protecting modification non-pcbgroup hash lookup tables. + * Global lock protecting modification hash lookup tables. */ struct mtx ipi_hash_lock; @@ -492,14 +477,6 @@ struct inpcbinfo { struct inpcbporthead *ipi_porthashbase; /* (h) */ u_long ipi_porthashmask; /* (h) */ - /* - * List of wildcard inpcbs for use with pcbgroups. In the past, was - * per-pcbgroup but is now global. All pcbgroup locks must be held - * to modify the list, so any is sufficient to read it. - */ - struct inpcbhead *ipi_wildbase; /* (p) */ - u_long ipi_wildmask; /* (p) */ - /* * Load balance groups used for the SO_REUSEPORT_LB option, * hashed by local port. @@ -524,31 +501,6 @@ struct inpcbinfo { }; #ifdef _KERNEL -/* - * Connection groups hold sets of connections that have similar CPU/thread - * affinity. Each connection belongs to exactly one connection group. - */ -struct inpcbgroup { - /* - * Per-connection group hash of inpcbs, hashed by local and foreign - * addresses and port numbers. - */ - struct inpcbhead *ipg_hashbase; /* (c) */ - u_long ipg_hashmask; /* (c) */ - - /* - * Notional affinity of this pcbgroup. - */ - u_int ipg_cpu; /* (p) */ - - /* - * Per-connection group lock, not to be confused with ipi_lock. - * Protects the hash table hung off the group, but also the global - * wildcard list in inpcbinfo. - */ - struct mtx ipg_lock; -} __aligned(CACHE_LINE_SIZE); - /* * Load balance groups used for the SO_REUSEPORT_LB socket option. Each group * (or unique address:port combination) can be re-used at most @@ -728,7 +680,7 @@ int inp_so_options(const struct inpcb *inp); */ #define INP_MBUF_L_ACKS 0x00000001 /* We need large mbufs for ack compression */ #define INP_MBUF_ACKCMP 0x00000002 /* TCP mbuf ack compression ok */ -#define INP_PCBGROUPWILD 0x00000004 /* in pcbgroup wildcard list */ +/* 0x00000004 */ #define INP_REUSEPORT 0x00000008 /* SO_REUSEPORT option is set */ #define INP_FREED 0x00000010 /* inp itself is not valid */ #define INP_REUSEADDR 0x00000020 /* SO_REUSEADDR option is set */ @@ -809,20 +761,6 @@ void in_pcbinfo_init(struct inpcbinfo *, const char *, struct inpcbhead *, int in_pcbbind_check_bindmulti(const struct inpcb *ni, const struct inpcb *oi); -struct inpcbgroup * - in_pcbgroup_byhash(struct inpcbinfo *, u_int, uint32_t); -struct inpcbgroup * - in_pcbgroup_byinpcb(struct inpcb *); -struct inpcbgroup * - in_pcbgroup_bytuple(struct inpcbinfo *, struct in_addr, u_short, - struct in_addr, u_short); -void in_pcbgroup_destroy(struct inpcbinfo *); -int in_pcbgroup_enabled(struct inpcbinfo *); -void in_pcbgroup_init(struct inpcbinfo *, u_int, int); -void in_pcbgroup_remove(struct inpcb *); -void in_pcbgroup_update(struct inpcb *); -void in_pcbgroup_update_mbuf(struct inpcb *, struct mbuf *); - void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); int in_pcballoc(struct socket *, struct inpcbinfo *); int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); diff --git a/sys/netinet/in_pcbgroup.c b/sys/netinet/in_pcbgroup.c deleted file mode 100644 index 11ed75be1198..000000000000 --- a/sys/netinet/in_pcbgroup.c +++ /dev/null @@ -1,566 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2010-2011 Juniper Networks, Inc. - * All rights reserved. - * - * This software was developed by Robert N. M. Watson under contract - * to Juniper Networks, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -__FBSDID("$FreeBSD$"); - -#include "opt_inet6.h" -#include "opt_rss.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#ifdef INET6 -#include -#endif /* INET6 */ - -/* - * pcbgroups, or "connection groups" are based on Willman, Rixner, and Cox's - * 2006 USENIX paper, "An Evaluation of Network Stack Parallelization - * Strategies in Modern Operating Systems". This implementation differs - * significantly from that described in the paper, in that it attempts to - * introduce not just notions of affinity for connections and distribute work - * so as to reduce lock contention, but also align those notions with - * hardware work distribution strategies such as RSS. In this construction, - * connection groups supplement, rather than replace, existing reservation - * tables for protocol 4-tuples, offering CPU-affine lookup tables with - * minimal cache line migration and lock contention during steady state - * operation. - * - * Hardware-offloaded checksums are often inefficient in software -- for - * example, Toeplitz, specified by RSS, introduced a significant overhead if - * performed during per-packge processing. It is therefore desirable to fall - * back on traditional reservation table lookups without affinity where - * hardware-offloaded checksums aren't available, such as for traffic over - * non-RSS interfaces. - * - * Internet protocols, such as UDP and TCP, register to use connection groups - * by providing an ipi_hashfields value other than IPI_HASHFIELDS_NONE; this - * indicates to the connection group code whether a 2-tuple or 4-tuple is - * used as an argument to hashes that assign a connection to a particular - * group. This must be aligned with any hardware offloaded distribution - * model, such as RSS or similar approaches taken in embedded network boards. - * Wildcard sockets require special handling, as in Willman 2006, and are - * shared between connection groups -- while being protected by group-local - * locks. This means that connection establishment and teardown can be - * signficantly more expensive than without connection groups, but that - * steady-state processing can be significantly faster. - * - * When RSS is used, certain connection group parameters, such as the number - * of groups, are provided by the RSS implementation, found in in_rss.c. - * Otherwise, in_pcbgroup.c selects possible sensible parameters - * corresponding to the degree of parallelism exposed by netisr. - * - * Most of the implementation of connection groups is in this file; however, - * connection group lookup is implemented in in_pcb.c alongside reservation - * table lookups -- see in_pcblookup_group(). - * - * TODO: - * - * Implement dynamic rebalancing of buckets with connection groups; when - * load is unevenly distributed, search for more optimal balancing on - * demand. This might require scaling up the number of connection groups - * by <<1. - * - * Provide an IP 2-tuple or 4-tuple netisr m2cpu handler based on connection - * groups for ip_input and ip6_input, allowing non-offloaded work - * distribution. - * - * Expose effective CPU affinity of connections to userspace using socket - * options. - * - * Investigate per-connection affinity overrides based on socket options; an - * option could be set, certainly resulting in work being distributed - * differently in software, and possibly propagated to supporting hardware - * with TCAMs or hardware hash tables. This might require connections to - * exist in more than one connection group at a time. - * - * Hook netisr thread reconfiguration events, and propagate those to RSS so - * that rebalancing can occur when the thread pool grows or shrinks. - * - * Expose per-pcbgroup statistics to userspace monitoring tools such as - * netstat, in order to allow better debugging and profiling. - */ - -void -in_pcbgroup_init(struct inpcbinfo *pcbinfo, u_int hashfields, - int hash_nelements) -{ - struct inpcbgroup *pcbgroup; - u_int numpcbgroups, pgn; - - /* - * Only enable connection groups for a protocol if it has been - * specifically requested. - */ - if (hashfields == IPI_HASHFIELDS_NONE) - return; - - /* - * Connection groups are about multi-processor load distribution, - * lock contention, and connection CPU affinity. As such, no point - * in turning them on for a uniprocessor machine, it only wastes - * memory. - */ - if (mp_ncpus == 1) - return; - -#ifdef RSS - /* - * If we're using RSS, then RSS determines the number of connection - * groups to use: one connection group per RSS bucket. If for some - * reason RSS isn't able to provide a number of buckets, disable - * connection groups entirely. - * - * XXXRW: Can this ever happen? - */ - numpcbgroups = rss_getnumbuckets(); - if (numpcbgroups == 0) - return; -#else - /* - * Otherwise, we'll just use one per CPU for now. If we decide to - * do dynamic rebalancing a la RSS, we'll need similar logic here. - */ - numpcbgroups = mp_ncpus; -#endif - - pcbinfo->ipi_hashfields = hashfields; - pcbinfo->ipi_pcbgroups = malloc(numpcbgroups * - sizeof(*pcbinfo->ipi_pcbgroups), M_PCB, M_WAITOK | M_ZERO); - pcbinfo->ipi_npcbgroups = numpcbgroups; - pcbinfo->ipi_wildbase = hashinit(hash_nelements, M_PCB, - &pcbinfo->ipi_wildmask); - for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++) { - pcbgroup = &pcbinfo->ipi_pcbgroups[pgn]; - pcbgroup->ipg_hashbase = hashinit(hash_nelements, M_PCB, - &pcbgroup->ipg_hashmask); - INP_GROUP_LOCK_INIT(pcbgroup, "pcbgroup"); - - /* - * Initialise notional affinity of the pcbgroup -- for RSS, - * we want the same notion of affinity as NICs to be used. In - * the non-RSS case, just round robin for the time being. - * - * XXXRW: The notion of a bucket to CPU mapping is common at - * both pcbgroup and RSS layers -- does that mean that we - * should migrate it all from RSS to here, and just leave RSS - * responsible only for providing hashing and mapping functions? - */ -#ifdef RSS - pcbgroup->ipg_cpu = rss_getcpu(pgn); -#else - pcbgroup->ipg_cpu = (pgn % mp_ncpus); -#endif - } -} - -void -in_pcbgroup_destroy(struct inpcbinfo *pcbinfo) -{ - struct inpcbgroup *pcbgroup; - u_int pgn; - - if (pcbinfo->ipi_npcbgroups == 0) - return; - - for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++) { - pcbgroup = &pcbinfo->ipi_pcbgroups[pgn]; - KASSERT(CK_LIST_EMPTY(pcbinfo->ipi_listhead), - ("in_pcbinfo_destroy: listhead not empty")); - INP_GROUP_LOCK_DESTROY(pcbgroup); - hashdestroy(pcbgroup->ipg_hashbase, M_PCB, - pcbgroup->ipg_hashmask); - } - hashdestroy(pcbinfo->ipi_wildbase, M_PCB, pcbinfo->ipi_wildmask); - free(pcbinfo->ipi_pcbgroups, M_PCB); - pcbinfo->ipi_pcbgroups = NULL; - pcbinfo->ipi_npcbgroups = 0; - pcbinfo->ipi_hashfields = 0; -} - -/* - * Given a hash of whatever the covered tuple might be, return a pcbgroup - * index. Where RSS is supported, try to align bucket selection with RSS CPU - * affinity strategy. - */ -static __inline u_int -in_pcbgroup_getbucket(struct inpcbinfo *pcbinfo, uint32_t hash) -{ - -#ifdef RSS - return (rss_getbucket(hash)); -#else - return (hash % pcbinfo->ipi_npcbgroups); -#endif -} - -/* - * Map a (hashtype, hash) tuple into a connection group, or NULL if the hash - * information is insufficient to identify the pcbgroup. This might occur if - * a TCP packet turns up with a 2-tuple hash, or if an RSS hash is present but - * RSS is not compiled into the kernel. - */ -struct inpcbgroup * -in_pcbgroup_byhash(struct inpcbinfo *pcbinfo, u_int hashtype, uint32_t hash) -{ - -#ifdef RSS - if ((pcbinfo->ipi_hashfields == IPI_HASHFIELDS_4TUPLE && - hashtype == M_HASHTYPE_RSS_TCP_IPV4) || - (pcbinfo->ipi_hashfields == IPI_HASHFIELDS_4TUPLE && - hashtype == M_HASHTYPE_RSS_UDP_IPV4) || - (pcbinfo->ipi_hashfields == IPI_HASHFIELDS_2TUPLE && - hashtype == M_HASHTYPE_RSS_IPV4)) - return (&pcbinfo->ipi_pcbgroups[ - in_pcbgroup_getbucket(pcbinfo, hash)]); -#endif - return (NULL); -} - -static struct inpcbgroup * -in_pcbgroup_bymbuf(struct inpcbinfo *pcbinfo, struct mbuf *m) -{ - - return (in_pcbgroup_byhash(pcbinfo, M_HASHTYPE_GET(m), - m->m_pkthdr.flowid)); -} - -struct inpcbgroup * -in_pcbgroup_bytuple(struct inpcbinfo *pcbinfo, struct in_addr laddr, - u_short lport, struct in_addr faddr, u_short fport) -{ - uint32_t hash; - - /* - * RSS note: we pass foreign addr/port as source, and local addr/port - * as destination, as we want to align with what the hardware is - * doing. - */ - switch (pcbinfo->ipi_hashfields) { - case IPI_HASHFIELDS_4TUPLE: -#ifdef RSS - hash = rss_hash_ip4_4tuple(faddr, fport, laddr, lport); -#else - hash = faddr.s_addr ^ fport; -#endif - break; - - case IPI_HASHFIELDS_2TUPLE: -#ifdef RSS - hash = rss_hash_ip4_2tuple(faddr, laddr); -#else - hash = faddr.s_addr ^ laddr.s_addr; -#endif - break; - - default: - hash = 0; - } - return (&pcbinfo->ipi_pcbgroups[in_pcbgroup_getbucket(pcbinfo, - hash)]); -} - -struct inpcbgroup * -in_pcbgroup_byinpcb(struct inpcb *inp) -{ -#ifdef RSS - /* - * Listen sockets with INP_RSS_BUCKET_SET set have a pre-determined - * RSS bucket and thus we should use this pcbgroup, rather than - * using a tuple or hash. - * - * XXX should verify that there's actually pcbgroups and inp_rss_listen_bucket - * fits in that! - */ - if (inp->inp_flags2 & INP_RSS_BUCKET_SET) - return (&inp->inp_pcbinfo->ipi_pcbgroups[inp->inp_rss_listen_bucket]); -#endif - - return (in_pcbgroup_bytuple(inp->inp_pcbinfo, inp->inp_laddr, - inp->inp_lport, inp->inp_faddr, inp->inp_fport)); -} - -static void -in_pcbwild_add(struct inpcb *inp) -{ - struct inpcbinfo *pcbinfo; - struct inpcbhead *head; - u_int pgn; - - INP_WLOCK_ASSERT(inp); - KASSERT(!(inp->inp_flags2 & INP_PCBGROUPWILD), - ("%s: is wild",__func__)); - - pcbinfo = inp->inp_pcbinfo; - for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++) - INP_GROUP_LOCK(&pcbinfo->ipi_pcbgroups[pgn]); - head = &pcbinfo->ipi_wildbase[INP_PCBHASH(INADDR_ANY, inp->inp_lport, - 0, pcbinfo->ipi_wildmask)]; - CK_LIST_INSERT_HEAD(head, inp, inp_pcbgroup_wild); - inp->inp_flags2 |= INP_PCBGROUPWILD; - for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++) *** 740 LINES SKIPPED *** From nobody Thu Dec 2 18:49:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F280B18A9589; Thu, 2 Dec 2021 18:49: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 4J4lNf0C22z3rBx; Thu, 2 Dec 2021 18:49:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFE3F224B2; Thu, 2 Dec 2021 18:49: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 1B2In52o068901; Thu, 2 Dec 2021 18:49:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2In5nj068900; Thu, 2 Dec 2021 18:49:05 GMT (envelope-from git) Date: Thu, 2 Dec 2021 18:49:05 GMT Message-Id: <202112021849.1B2In5nj068900@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: 565655f4e33e - main - inpcb: reduce some aliased functions after removal of PCBGROUP. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 565655f4e33e6e04c53c1c566b50fc07fd685f2f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638470946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d1itidWcuZNjqMtG91hDeRhpE+WIbZCguwoEM2MM5fY=; b=mr86Kq+Xt5/kpYs564z95Q3duyYTKCKjYhvEPBmP0PoZYxxxFXwZI8PBpUbcLWHsYX6qaD nM5iRcl8P1JehqgumWgBH6FvRXSdq0UnAp+XQEyvGgn4coJR3yLeMmoiD5GsYdV0bmClQs eoaF8LI+VQ8DrxiXP1wNVxc27RP8FUrL3jqi8J4upXyAJyQPEESEO1IJsVzUms5Gru30Lj 0xo8D2cAyO2WaMDTFbQQcSbef5x0xfV4P6yVxW6M2VN9QIQEcdrElkwg22FE4ReS4gPTqH yxnZ4ylr4Ro95FIbUXivj+MBunwFKMO8lyl1JQ0NpmnjCS25SwNDLp/8iJJmDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638470946; a=rsa-sha256; cv=none; b=J1v6EyG9FkwKKXvTijQi5BFWjF1VitUPkGpBLPvAH9XxK4ZwDxGdPIEFxkQsSYZj9nMpgq OzJcqlgcHkowNfOtz0O5TO7cRBljAhqei6gVEDwnF/rX8iA21t7DaKvmJpwD22auhOb7tG CRw/2b47G/Xj3cskAnyy8O+cemp+DCG+GoB5NZRZEEYEKx8jaCLeNLYOegmt2USS0Zy//x JvNyfi5FVeJYpvHLn4nRxT2GblB8sJUg3Ku2EjneVsYw9XtSKQV2wUjM/jvDxlc0MqQ5gB yvi7kSPPJ/oDuRM9pZnuAnbvXaz6OW8SfMxMogNlEuIzk4KnjWUOrsPbgBCTrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=565655f4e33e6e04c53c1c566b50fc07fd685f2f commit 565655f4e33e6e04c53c1c566b50fc07fd685f2f Author: Gleb Smirnoff AuthorDate: 2021-12-02 18:48:48 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-02 18:48:48 +0000 inpcb: reduce some aliased functions after removal of PCBGROUP. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33021 --- sys/netinet/in_pcb.c | 42 +++++++----------------------------------- sys/netinet/in_pcb.h | 6 +----- sys/netinet/tcp_syncache.c | 4 ++-- sys/netinet/udp_usrreq.c | 2 +- sys/netinet6/in6_pcb.c | 4 ++-- sys/netinet6/udp6_usrreq.c | 2 +- 6 files changed, 14 insertions(+), 46 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index f1ac46b28477..ecca470805d2 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1072,8 +1072,8 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr *nam, in_addr_t *laddrp, * then pick one. */ int -in_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam, - struct ucred *cred, struct mbuf *m, bool rehash) +in_pcbconnect(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred, + bool rehash) { u_short lport, fport; in_addr_t laddr, faddr; @@ -1109,9 +1109,9 @@ in_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam, inp->inp_faddr.s_addr = faddr; inp->inp_fport = fport; if (rehash) { - in_pcbrehash_mbuf(inp, m); + in_pcbrehash(inp); } else { - in_pcbinshash_mbuf(inp, m); + in_pcbinshash(inp); } if (anonport) @@ -1119,13 +1119,6 @@ in_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam, return (0); } -int -in_pcbconnect(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred) -{ - - return (in_pcbconnect_mbuf(inp, nam, cred, NULL, true)); -} - /* * Do proper source address selection on an unbound socket in case * of connect. Take jails into account as well. @@ -2285,8 +2278,8 @@ in_pcblookup_mbuf(struct inpcbinfo *pcbinfo, struct in_addr faddr, /* * Insert PCB onto various hash lists. */ -static int -in_pcbinshash_internal(struct inpcb *inp, struct mbuf *m) +int +in_pcbinshash(struct inpcb *inp) { struct inpcbhead *pcbhash; struct inpcbporthead *pcbporthash; @@ -2355,20 +2348,6 @@ in_pcbinshash_internal(struct inpcb *inp, struct mbuf *m) return (0); } -int -in_pcbinshash(struct inpcb *inp) -{ - - return (in_pcbinshash_internal(inp, NULL)); -} - -int -in_pcbinshash_mbuf(struct inpcb *inp, struct mbuf *m) -{ - - return (in_pcbinshash_internal(inp, m)); -} - /* * Move PCB to the proper hash bucket when { faddr, fport } have been * changed. NOTE: This does not handle the case of the lport changing (the @@ -2376,7 +2355,7 @@ in_pcbinshash_mbuf(struct inpcb *inp, struct mbuf *m) * not change after in_pcbinshash() has been called. */ void -in_pcbrehash_mbuf(struct inpcb *inp, struct mbuf *m) +in_pcbrehash(struct inpcb *inp) { struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct inpcbhead *head; @@ -2402,13 +2381,6 @@ in_pcbrehash_mbuf(struct inpcb *inp, struct mbuf *m) CK_LIST_INSERT_HEAD(head, inp, inp_hash); } -void -in_pcbrehash(struct inpcb *inp) -{ - - in_pcbrehash_mbuf(inp, NULL); -} - /* * Remove PCB from various lists. */ diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 813c87559de3..47ecbd4f121b 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -766,9 +766,7 @@ 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 *, u_short *, struct ucred *); -int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); -int in_pcbconnect_mbuf(struct inpcb *, struct sockaddr *, struct ucred *, - struct mbuf *, bool); +int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *, bool); int in_pcbconnect_setup(struct inpcb *, struct sockaddr *, in_addr_t *, u_short *, in_addr_t *, u_short *, struct inpcb **, struct ucred *); @@ -777,7 +775,6 @@ void in_pcbdisconnect(struct inpcb *); void in_pcbdrop(struct inpcb *); void in_pcbfree(struct inpcb *); int in_pcbinshash(struct inpcb *); -int in_pcbinshash_mbuf(struct inpcb *, struct mbuf *); int in_pcbladdr(struct inpcb *, struct in_addr *, struct in_addr *, struct ucred *); int in_pcblbgroup_numa(struct inpcb *, int arg); @@ -791,7 +788,6 @@ void in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr, int, struct inpcb *(*)(struct inpcb *, int)); void in_pcbref(struct inpcb *); void in_pcbrehash(struct inpcb *); -void in_pcbrehash_mbuf(struct inpcb *, struct mbuf *); int in_pcbrele_rlocked(struct inpcb *); int in_pcbrele_wlocked(struct inpcb *); void in_losing(struct inpcb *); diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 39ec65df7426..7dd8443cad65 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -943,8 +943,8 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) laddr = inp->inp_laddr; if (inp->inp_laddr.s_addr == INADDR_ANY) inp->inp_laddr = sc->sc_inc.inc_laddr; - if ((error = in_pcbconnect_mbuf(inp, (struct sockaddr *)&sin, - thread0.td_ucred, m, false)) != 0) { + if ((error = in_pcbconnect(inp, (struct sockaddr *)&sin, + thread0.td_ucred, false)) != 0) { inp->inp_laddr = laddr; if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { log(LOG_DEBUG, "%s; %s: in_pcbconnect failed " diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index a9d534fbc8c0..efd5c77ca8c5 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1697,7 +1697,7 @@ udp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) } NET_EPOCH_ENTER(et); INP_HASH_WLOCK(pcbinfo); - error = in_pcbconnect(inp, nam, td->td_ucred); + error = in_pcbconnect(inp, nam, td->td_ucred, true); INP_HASH_WUNLOCK(pcbinfo); NET_EPOCH_EXIT(et); if (error == 0) diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 6f3cd120d1c8..629593bb365c 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -516,9 +516,9 @@ in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam, (htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK); if (rehash) { - in_pcbrehash_mbuf(inp, m); + in_pcbrehash(inp); } else { - in_pcbinshash_mbuf(inp, m); + in_pcbinshash(inp); } return (0); diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 5939b631a1ab..5ce3a1fd1a78 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -1215,7 +1215,7 @@ udp6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) NET_EPOCH_ENTER(et); INP_HASH_WLOCK(pcbinfo); error = in_pcbconnect(inp, (struct sockaddr *)&sin, - td->td_ucred); + td->td_ucred, true); INP_HASH_WUNLOCK(pcbinfo); NET_EPOCH_EXIT(et); /* From nobody Thu Dec 2 18:49:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A61F918A925B; Thu, 2 Dec 2021 18:49: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 4J4lNg2J1bz3r6p; Thu, 2 Dec 2021 18:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9A222280F; Thu, 2 Dec 2021 18:49: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 1B2In6i0068925; Thu, 2 Dec 2021 18:49:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2In61U068924; Thu, 2 Dec 2021 18:49:06 GMT (envelope-from git) Date: Thu, 2 Dec 2021 18:49:06 GMT Message-Id: <202112021849.1B2In61U068924@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: de2d47842e88 - main - SMR protection for inpcbs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: de2d47842e880281da07f2589b9ec558b42c09c1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638470947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ME2wEWY6jK3f9MPKLX4INA+jzpneZEU7Dn+Wk+5kGwo=; b=MbbbsPoItN9xWl501C/6XII/DpAZ54V5wYiesXBlnyESd0qpcrbH1HbQj9+qigbk7aA+lA J1ZuYmN9WA8Fuzqb7r7u+yFBySccm7RSEsxeqm1qwdZdcelmXPk4KnYjDBRbMaI/QClRQ2 A+sH/qL+Z0fGoU9essPavykNuFcfCUeOj4erexv1xF0N1nccUwurT2uiN4R4LEkFFBJIyt F/3MJgReWcKwmmHODpPAQKoXnyyj7iui+VmXuApiesByuruXjnpxq/Mihb4m480SprytUe XPrhjFN9cmX5Eow0g3cQX4Mf0OZ2CuQXP3WeuESnVpedZiJ2SN6EiKWMsZHpfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638470947; a=rsa-sha256; cv=none; b=Dz0pN2bKfyTRl1LSXWHssct+8ZYclJsHpQ2er86L1KMi6Oy6jt/qd8mXBDZJOwaEdY0Hi2 5S/iDFr50BYn94/4V5wqXnN1WX3cYNfXRG1CWf3XmMA0+R4LtptEuV5XF/iAqo7OJCMfWU d9vQVnL/BAYe29PAq2TnrPA1vo8Dlx1CUoBP/PUFAG7/nkRNP9gya4WVRf20Zs4ViYg9ge +nnoJNqRiqtIRXx6iy0RhQrktENXHjKRd+5AyWJQsimhVfQU+eL176Wg4VH7IjHI1DS0d+ hpomD/uRqqI8C1PlK93AIV0JDeWRK6GDY3/9qyiPd5Gh3eL8om/+UogxTxD+qA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=de2d47842e880281da07f2589b9ec558b42c09c1 commit de2d47842e880281da07f2589b9ec558b42c09c1 Author: Gleb Smirnoff AuthorDate: 2021-12-02 18:48:48 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-02 18:48:48 +0000 SMR protection for inpcbs With introduction of epoch(9) synchronization to network stack the inpcb database became protected by the network epoch together with static network data (interfaces, addresses, etc). However, inpcb aren't static in nature, they are created and destroyed all the time, which creates some traffic on the epoch(9) garbage collector. Fairly new feature of uma(9) - Safe Memory Reclamation allows to safely free memory in page-sized batches, with virtually zero overhead compared to uma_zfree(). However, unlike epoch(9), it puts stricter requirement on the access to the protected memory, needing the critical(9) section to access it. Details: - The database is already build on CK lists, thanks to epoch(9). - For write access nothing is changed. - For a lookup in the database SMR section is now required. Once the desired inpcb is found we need to transition from SMR section to r/w lock on the inpcb itself, with a check that inpcb isn't yet freed. This requires some compexity, since SMR section itself is a critical(9) section. The complexity is hidden from KPI users in inp_smr_lock(). - For a inpcb list traversal (a pcblist sysctl, or broadcast notification) also a new KPI is provided, that hides internals of the database - inp_next(struct inp_iterator *). Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33022 --- sys/kern/subr_witness.c | 4 +- sys/kern/uipc_ktls.c | 12 +- sys/netinet/in_pcb.c | 672 ++++++++++++++++++++++++++------------------- sys/netinet/in_pcb.h | 227 ++++++--------- sys/netinet/in_pcb_var.h | 7 + sys/netinet/ip_divert.c | 75 +++-- sys/netinet/ip_gre.c | 18 +- sys/netinet/raw_ip.c | 288 +++++++++---------- sys/netinet/tcp_hpts.c | 24 +- sys/netinet/tcp_input.c | 2 - sys/netinet/tcp_lro.c | 3 +- sys/netinet/tcp_subr.c | 74 ++--- sys/netinet/tcp_var.h | 2 - sys/netinet/udp_usrreq.c | 303 ++++++++++---------- sys/netinet/udp_var.h | 10 - sys/netinet6/icmp6.c | 171 +++++------- sys/netinet6/in6_pcb.c | 112 ++++---- sys/netinet6/ip6_gre.c | 19 +- sys/netinet6/raw_ip6.c | 169 +++++------- sys/netinet6/udp6_usrreq.c | 279 +++++++++---------- 20 files changed, 1147 insertions(+), 1324 deletions(-) diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index e3fcbbb31311..db82450f0570 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -564,15 +564,15 @@ static struct witness_order_list_entry order_lists[] = { /* * UDP/IP */ - { "udp", &lock_class_mtx_sleep }, { "udpinp", &lock_class_rw }, + { "udp", &lock_class_mtx_sleep }, { "so_snd", &lock_class_mtx_sleep }, { NULL, NULL }, /* * TCP/IP */ - { "tcp", &lock_class_mtx_sleep }, { "tcpinp", &lock_class_rw }, + { "tcp", &lock_class_mtx_sleep }, { "so_snd", &lock_class_mtx_sleep }, { NULL, NULL }, /* diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 07e5a4c8399f..aee9c2374e0b 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -854,10 +854,6 @@ ktls_try_toe(struct socket *so, struct ktls_session *tls, int direction) inp = so->so_pcb; INP_WLOCK(inp); - if (inp->inp_flags2 & INP_FREED) { - INP_WUNLOCK(inp); - return (ECONNRESET); - } if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { INP_WUNLOCK(inp); return (ECONNRESET); @@ -909,10 +905,6 @@ ktls_alloc_snd_tag(struct inpcb *inp, struct ktls_session *tls, bool force, int error; INP_RLOCK(inp); - if (inp->inp_flags2 & INP_FREED) { - INP_RUNLOCK(inp); - return (ECONNRESET); - } if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { INP_RUNLOCK(inp); return (ECONNRESET); @@ -2716,8 +2708,7 @@ ktls_disable_ifnet_help(void *context, int pending __unused) INP_WLOCK(inp); so = inp->inp_socket; MPASS(so != NULL); - if ((inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) || - (inp->inp_flags2 & INP_FREED)) { + if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { goto out; } @@ -2729,7 +2720,6 @@ ktls_disable_ifnet_help(void *context, int pending __unused) counter_u64_add(ktls_ifnet_disable_ok, 1); /* ktls_set_tx_mode() drops inp wlock, so recheck flags */ if ((inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) == 0 && - (inp->inp_flags2 & INP_FREED) == 0 && (tp = intotcpcb(inp)) != NULL && tp->t_fb->tfb_hwtls_change != NULL) (*tp->t_fb->tfb_hwtls_change)(tp, 0); diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index ecca470805d2..ac8c0d3e368a 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -113,6 +113,7 @@ __FBSDID("$FreeBSD$"); #define INPCBLBGROUP_SIZMIN 8 #define INPCBLBGROUP_SIZMAX 256 +#define INP_FREED 0x00000200 /* See in_pcb.h. */ static struct callout ipport_tick_callout; @@ -145,7 +146,6 @@ VNET_DEFINE_STATIC(int, ipport_tcplastcount); #define V_ipport_tcplastcount VNET(ipport_tcplastcount) -static void in_pcbremlists(struct inpcb *inp); #ifdef INET static struct inpcb *in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, u_int fport_arg, @@ -514,38 +514,43 @@ inpcb_fini(void *mem, int size) INP_LOCK_DESTROY(inp); } +/* Make sure it is safe to use hashinit(9) on CK_LIST. */ +CTASSERT(sizeof(struct inpcbhead) == sizeof(LIST_HEAD(, inpcb))); + /* * Initialize an inpcbinfo -- we should be able to reduce the number of * arguments in time. */ void in_pcbinfo_init(struct inpcbinfo *pcbinfo, const char *name, - struct inpcbhead *listhead, int hash_nelements, int porthash_nelements, - char *inpcbzone_name, uma_init inpcbzone_init, u_int hashfields) + u_int hash_nelements, int porthash_nelements, char *inpcbzone_name, + uma_init inpcbzone_init) { - porthash_nelements = imin(porthash_nelements, IPPORT_MAX + 1); - - INP_INFO_LOCK_INIT(pcbinfo, name); - INP_HASH_LOCK_INIT(pcbinfo, "pcbinfohash"); /* XXXRW: argument? */ - INP_LIST_LOCK_INIT(pcbinfo, "pcbinfolist"); + mtx_init(&pcbinfo->ipi_lock, name, NULL, MTX_DEF); + mtx_init(&pcbinfo->ipi_hash_lock, "pcbinfohash", NULL, MTX_DEF); #ifdef VIMAGE pcbinfo->ipi_vnet = curvnet; #endif - pcbinfo->ipi_listhead = listhead; - CK_LIST_INIT(pcbinfo->ipi_listhead); + CK_LIST_INIT(&pcbinfo->ipi_listhead); pcbinfo->ipi_count = 0; pcbinfo->ipi_hashbase = hashinit(hash_nelements, M_PCB, &pcbinfo->ipi_hashmask); + porthash_nelements = imin(porthash_nelements, IPPORT_MAX + 1); pcbinfo->ipi_porthashbase = hashinit(porthash_nelements, M_PCB, &pcbinfo->ipi_porthashmask); pcbinfo->ipi_lbgrouphashbase = hashinit(porthash_nelements, M_PCB, &pcbinfo->ipi_lbgrouphashmask); pcbinfo->ipi_zone = uma_zcreate(inpcbzone_name, sizeof(struct inpcb), - NULL, NULL, inpcbzone_init, inpcb_fini, UMA_ALIGN_PTR, 0); + NULL, NULL, inpcbzone_init, inpcb_fini, UMA_ALIGN_PTR, + UMA_ZONE_SMR); uma_zone_set_max(pcbinfo->ipi_zone, maxsockets); uma_zone_set_warning(pcbinfo->ipi_zone, "kern.ipc.maxsockets limit reached"); + pcbinfo->ipi_smr = uma_zone_get_smr(pcbinfo->ipi_zone); + pcbinfo->ipi_portzone = uma_zcreate(inpcbzone_name, + sizeof(struct inpcbport), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); + uma_zone_set_smr(pcbinfo->ipi_portzone, pcbinfo->ipi_smr); } /* @@ -564,9 +569,8 @@ in_pcbinfo_destroy(struct inpcbinfo *pcbinfo) hashdestroy(pcbinfo->ipi_lbgrouphashbase, M_PCB, pcbinfo->ipi_lbgrouphashmask); uma_zdestroy(pcbinfo->ipi_zone); - INP_LIST_LOCK_DESTROY(pcbinfo); - INP_HASH_LOCK_DESTROY(pcbinfo); - INP_INFO_LOCK_DESTROY(pcbinfo); + mtx_destroy(&pcbinfo->ipi_hash_lock); + mtx_destroy(&pcbinfo->ipi_lock); } /* @@ -580,7 +584,7 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo) int error; error = 0; - inp = uma_zalloc(pcbinfo->ipi_zone, M_NOWAIT); + inp = uma_zalloc_smr(pcbinfo->ipi_zone, M_NOWAIT); if (inp == NULL) return (ENOBUFS); bzero(&inp->inp_start_zero, inp_zero_size); @@ -612,33 +616,38 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo) if (V_ip6_v6only) inp->inp_flags |= IN6P_IPV6_V6ONLY; } -#endif - INP_WLOCK(inp); - INP_LIST_WLOCK(pcbinfo); - CK_LIST_INSERT_HEAD(pcbinfo->ipi_listhead, inp, inp_list); - pcbinfo->ipi_count++; - so->so_pcb = (caddr_t)inp; -#ifdef INET6 if (V_ip6_auto_flowlabel) inp->inp_flags |= IN6P_AUTOFLOWLABEL; #endif - inp->inp_gencnt = ++pcbinfo->ipi_gencnt; - refcount_init(&inp->inp_refcount, 1); /* Reference from inpcbinfo */ - /* * Routes in inpcb's can cache L2 as well; they are guaranteed * to be cleaned up. */ inp->inp_route.ro_flags = RT_LLE_CACHE; - INP_LIST_WUNLOCK(pcbinfo); +#ifdef TCPHPTS + /* + * If using hpts lets drop a random number in so + * not all new connections fall on the same CPU. + */ + inp->inp_hpts_cpu = inp->inp_input_cpu = hpts_random_cpu(inp); +#endif + refcount_init(&inp->inp_refcount, 1); /* Reference from socket. */ + INP_WLOCK(inp); + INP_INFO_WLOCK(pcbinfo); + pcbinfo->ipi_count++; + inp->inp_gencnt = ++pcbinfo->ipi_gencnt; + CK_LIST_INSERT_HEAD(&pcbinfo->ipi_listhead, inp, inp_list); + INP_INFO_WUNLOCK(pcbinfo); + so->so_pcb = inp; + + return (0); + #if defined(IPSEC) || defined(IPSEC_SUPPORT) || defined(MAC) out: - if (error != 0) { - crfree(inp->inp_cred); - uma_zfree(pcbinfo->ipi_zone, inp); - } -#endif + crfree(inp->inp_cred); + uma_zfree_smr(pcbinfo->ipi_zone, inp); return (error); +#endif } #ifdef INET @@ -1505,192 +1514,274 @@ in_pcbdetach(struct inpcb *inp) } /* - * in_pcbref() bumps the reference count on an inpcb in order to maintain - * stability of an inpcb pointer despite the inpcb lock being released. This - * is used in TCP when the inpcbinfo lock needs to be acquired or upgraded, - * but where the inpcb lock may already held. - * - * in_pcbref() should be used only to provide brief memory stability, and - * must always be followed by a call to INP_WLOCK() and in_pcbrele() to - * garbage collect the inpcb if it has been in_pcbfree()'d from another - * context. Until in_pcbrele() has returned that the inpcb is still valid, - * lock and rele are the *only* safe operations that may be performed on the - * inpcb. + * inpcb hash lookups are protected by SMR section. * - * While the inpcb will not be freed, releasing the inpcb lock means that the - * connection's state may change, so the caller should be careful to - * revalidate any cached state on reacquiring the lock. Drop the reference - * using in_pcbrele(). + * Once desired pcb has been found, switching from SMR section to a pcb + * lock is performed with inp_smr_lock(). We can not use INP_(W|R)LOCK + * here because SMR is a critical section. + * In 99%+ cases inp_smr_lock() would obtain the lock immediately. */ -void -in_pcbref(struct inpcb *inp) +static inline void +inp_lock(struct inpcb *inp, const inp_lookup_t lock) { - KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__)); + lock == INPLOOKUP_RLOCKPCB ? + rw_rlock(&inp->inp_lock) : rw_wlock(&inp->inp_lock); +} + +static inline void +inp_unlock(struct inpcb *inp, const inp_lookup_t lock) +{ - refcount_acquire(&inp->inp_refcount); + lock == INPLOOKUP_RLOCKPCB ? + rw_runlock(&inp->inp_lock) : rw_wunlock(&inp->inp_lock); } -/* - * Drop a refcount on an inpcb elevated using in_pcbref(); because a call to - * in_pcbfree() may have been made between in_pcbref() and in_pcbrele(), we - * return a flag indicating whether or not the inpcb remains valid. If it is - * valid, we return with the inpcb lock held. - * - * Notice that, unlike in_pcbref(), the inpcb lock must be held to drop a - * reference on an inpcb. Historically more work was done here (actually, in - * in_pcbfree_internal()) but has been moved to in_pcbfree() to avoid the - * need for the pcbinfo lock in in_pcbrele(). Deferring the free is entirely - * about memory stability (and continued use of the write lock). - */ -int -in_pcbrele_rlocked(struct inpcb *inp) +static inline int +inp_trylock(struct inpcb *inp, const inp_lookup_t lock) { - struct inpcbinfo *pcbinfo; - KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__)); + return (lock == INPLOOKUP_RLOCKPCB ? + rw_try_rlock(&inp->inp_lock) : rw_try_wlock(&inp->inp_lock)); +} - INP_RLOCK_ASSERT(inp); +static inline bool +in_pcbrele(struct inpcb *inp, const inp_lookup_t lock) +{ - if (refcount_release(&inp->inp_refcount) == 0) { - /* - * If the inpcb has been freed, let the caller know, even if - * this isn't the last reference. - */ - if (inp->inp_flags2 & INP_FREED) { - INP_RUNLOCK(inp); - return (1); + return (lock == INPLOOKUP_RLOCKPCB ? + in_pcbrele_rlocked(inp) : in_pcbrele_wlocked(inp)); +} + +bool +inp_smr_lock(struct inpcb *inp, const inp_lookup_t lock) +{ + + MPASS(lock == INPLOOKUP_RLOCKPCB || lock == INPLOOKUP_WLOCKPCB); + SMR_ASSERT_ENTERED(inp->inp_pcbinfo->ipi_smr); + + if (__predict_true(inp_trylock(inp, lock))) { + if (__predict_false(inp->inp_flags & INP_FREED)) { + smr_exit(inp->inp_pcbinfo->ipi_smr); + inp_unlock(inp, lock); + return (false); } - return (0); + smr_exit(inp->inp_pcbinfo->ipi_smr); + return (true); } - KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); -#ifdef TCPHPTS - if (inp->inp_in_hpts || inp->inp_in_input) { - struct tcp_hpts_entry *hpts; + if (__predict_true(refcount_acquire_if_not_zero(&inp->inp_refcount))) { + smr_exit(inp->inp_pcbinfo->ipi_smr); + inp_lock(inp, lock); + if (__predict_false(in_pcbrele(inp, lock))) + return (false); /* - * We should not be on the hpts at - * this point in any form. we must - * get the lock to be sure. + * inp acquired through refcount & lock for sure didn't went + * through uma_zfree(). However, it may have already went + * through in_pcbfree() and has another reference, that + * prevented its release by our in_pcbrele(). */ - hpts = tcp_hpts_lock(inp); - if (inp->inp_in_hpts) - panic("Hpts:%p inp:%p at free still on hpts", - hpts, inp); - mtx_unlock(&hpts->p_mtx); - hpts = tcp_input_lock(inp); - if (inp->inp_in_input) - panic("Hpts:%p inp:%p at free still on input hpts", - hpts, inp); - mtx_unlock(&hpts->p_mtx); + if (__predict_false(inp->inp_flags & INP_FREED)) { + inp_unlock(inp, lock); + return (false); + } + return (true); + } else { + smr_exit(inp->inp_pcbinfo->ipi_smr); + return (false); } -#endif - INP_RUNLOCK(inp); - pcbinfo = inp->inp_pcbinfo; - uma_zfree(pcbinfo->ipi_zone, inp); - return (1); } -int -in_pcbrele_wlocked(struct inpcb *inp) +/* + * inp_next() - inpcb hash/list traversal iterator + * + * Requires initialized struct inpcb_iterator for context. + * The structure can be initialized with INP_ITERATOR() or INP_ALL_ITERATOR(). + * + * - Iterator can have either write-lock or read-lock semantics, that can not + * be changed later. + * - Iterator can iterate either over all pcbs list (INP_ALL_LIST), or through + * a single hash slot. Note: only rip_input() does the latter. + * - Iterator may have optional bool matching function. The matching function + * will be executed for each inpcb in the SMR context, so it can not acquire + * locks and can safely access only immutable fields of inpcb. + * + * A fresh initialized iterator has NULL inpcb in its context and that + * means that inp_next() call would return the very first inpcb on the list + * locked with desired semantic. In all following calls the context pointer + * shall hold the current inpcb pointer. The KPI user is not supposed to + * unlock the current inpcb! Upon end of traversal inp_next() will return NULL + * and write NULL to its context. After end of traversal an iterator can be + * reused. + * + * List traversals have the following features/constraints: + * - New entries won't be seen, as they are always added to the head of a list. + * - Removed entries won't stop traversal as long as they are not added to + * a different list. This is violated by in_pcbrehash(). + */ +#define II_LIST_FIRST(ipi, hash) \ + (((hash) == INP_ALL_LIST) ? \ + CK_LIST_FIRST(&(ipi)->ipi_listhead) : \ + CK_LIST_FIRST(&(ipi)->ipi_hashbase[(hash)])) +#define II_LIST_NEXT(inp, hash) \ + (((hash) == INP_ALL_LIST) ? \ + CK_LIST_NEXT((inp), inp_list) : \ + CK_LIST_NEXT((inp), inp_hash)) +#define II_LOCK_ASSERT(inp, lock) \ + rw_assert(&(inp)->inp_lock, \ + (lock) == INPLOOKUP_RLOCKPCB ? RA_RLOCKED : RA_WLOCKED ) +struct inpcb * +inp_next(struct inpcb_iterator *ii) { - struct inpcbinfo *pcbinfo; + const struct inpcbinfo *ipi = ii->ipi; + inp_match_t *match = ii->match; + void *ctx = ii->ctx; + inp_lookup_t lock = ii->lock; + int hash = ii->hash; + struct inpcb *inp; - KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__)); + if (ii->inp == NULL) { /* First call. */ + smr_enter(ipi->ipi_smr); + /* This is unrolled CK_LIST_FOREACH(). */ + for (inp = II_LIST_FIRST(ipi, hash); + inp != NULL; + inp = II_LIST_NEXT(inp, hash)) { + if (match != NULL && (match)(inp, ctx) == false) + continue; + if (__predict_true(inp_smr_lock(inp, lock))) + break; + else { + smr_enter(ipi->ipi_smr); + MPASS(inp != II_LIST_FIRST(ipi, hash)); + inp = II_LIST_FIRST(ipi, hash); + } + } - INP_WLOCK_ASSERT(inp); + if (inp == NULL) + smr_exit(ipi->ipi_smr); + else + ii->inp = inp; - if (refcount_release(&inp->inp_refcount) == 0) { - /* - * If the inpcb has been freed, let the caller know, even if - * this isn't the last reference. - */ - if (inp->inp_flags2 & INP_FREED) { - INP_WUNLOCK(inp); - return (1); + return (inp); + } + + /* Not a first call. */ + smr_enter(ipi->ipi_smr); +restart: + inp = ii->inp; + II_LOCK_ASSERT(inp, lock); +next: + inp = II_LIST_NEXT(inp, hash); + if (inp == NULL) { + smr_exit(ipi->ipi_smr); + goto found; + } + + if (match != NULL && (match)(inp, ctx) == false) + goto next; + + if (__predict_true(inp_trylock(inp, lock))) { + if (__predict_false(inp->inp_flags & INP_FREED)) { + /* + * Entries are never inserted in middle of a list, thus + * as long as we are in SMR, we can continue traversal. + * Jump to 'restart' should yield in the same result, + * but could produce unnecessary looping. Could this + * looping be unbound? + */ + inp_unlock(inp, lock); + goto next; + } else { + smr_exit(ipi->ipi_smr); + goto found; } - return (0); } - KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); -#ifdef TCPHPTS - if (inp->inp_in_hpts || inp->inp_in_input) { - struct tcp_hpts_entry *hpts; + /* + * Can't obtain lock immediately, thus going hard. Once we exit the + * SMR section we can no longer jump to 'next', and our only stable + * anchoring point is ii->inp, which we keep locked for this case, so + * we jump to 'restart'. + */ + if (__predict_true(refcount_acquire_if_not_zero(&inp->inp_refcount))) { + smr_exit(ipi->ipi_smr); + inp_lock(inp, lock); + if (__predict_false(in_pcbrele(inp, lock))) { + smr_enter(ipi->ipi_smr); + goto restart; + } /* - * We should not be on the hpts at - * this point in any form. we must - * get the lock to be sure. + * See comment in inp_smr_lock(). */ - hpts = tcp_hpts_lock(inp); - if (inp->inp_in_hpts) - panic("Hpts:%p inp:%p at free still on hpts", - hpts, inp); - mtx_unlock(&hpts->p_mtx); - hpts = tcp_input_lock(inp); - if (inp->inp_in_input) - panic("Hpts:%p inp:%p at free still on input hpts", - hpts, inp); - mtx_unlock(&hpts->p_mtx); - } -#endif - INP_WUNLOCK(inp); - pcbinfo = inp->inp_pcbinfo; - uma_zfree(pcbinfo->ipi_zone, inp); - return (1); + if (__predict_false(inp->inp_flags & INP_FREED)) { + inp_unlock(inp, lock); + smr_enter(ipi->ipi_smr); + goto restart; + } + } else + goto next; + +found: + inp_unlock(ii->inp, lock); + ii->inp = inp; + + return (ii->inp); } -static void -inpcbport_free(epoch_context_t ctx) +/* + * in_pcbref() bumps the reference count on an inpcb in order to maintain + * stability of an inpcb pointer despite the inpcb lock being released or + * SMR section exited. + * + * To free a reference later in_pcbrele_(r|w)locked() must be performed. + */ +void +in_pcbref(struct inpcb *inp) { - struct inpcbport *phd; + u_int old __diagused; - phd = __containerof(ctx, struct inpcbport, phd_epoch_ctx); - free(phd, M_PCB); + old = refcount_acquire(&inp->inp_refcount); + KASSERT(old > 0, ("%s: refcount 0", __func__)); } -static void -in_pcbfree_deferred(epoch_context_t ctx) +/* + * Drop a refcount on an inpcb elevated using in_pcbref(), potentially + * freeing the pcb, if the reference was very last. + */ +bool +in_pcbrele_rlocked(struct inpcb *inp) { - struct inpcb *inp; - int released __unused; - inp = __containerof(ctx, struct inpcb, inp_epoch_ctx); + INP_RLOCK_ASSERT(inp); - INP_WLOCK(inp); - CURVNET_SET(inp->inp_vnet); -#ifdef INET - struct ip_moptions *imo = inp->inp_moptions; - inp->inp_moptions = NULL; -#endif - /* XXXRW: Do as much as possible here. */ -#if defined(IPSEC) || defined(IPSEC_SUPPORT) - if (inp->inp_sp != NULL) - ipsec_delete_pcbpolicy(inp); -#endif -#ifdef INET6 - struct ip6_moptions *im6o = NULL; - if (inp->inp_vflag & INP_IPV6PROTO) { - ip6_freepcbopts(inp->in6p_outputopts); - im6o = inp->in6p_moptions; - inp->in6p_moptions = NULL; - } -#endif - if (inp->inp_options) - (void)m_free(inp->inp_options); - inp->inp_vflag = 0; - crfree(inp->inp_cred); -#ifdef MAC - mac_inpcb_destroy(inp); -#endif - released = in_pcbrele_wlocked(inp); - MPASS(released); -#ifdef INET6 - ip6_freemoptions(im6o); -#endif -#ifdef INET - inp_freemoptions(imo); -#endif - CURVNET_RESTORE(); + if (refcount_release(&inp->inp_refcount) == 0) + return (false); + + MPASS(inp->inp_flags & INP_FREED); + MPASS(inp->inp_socket == NULL); + MPASS(inp->inp_in_hpts == 0); + MPASS(inp->inp_in_input == 0); + INP_RUNLOCK(inp); + uma_zfree_smr(inp->inp_pcbinfo->ipi_zone, inp); + return (true); +} + +bool +in_pcbrele_wlocked(struct inpcb *inp) +{ + + INP_WLOCK_ASSERT(inp); + + if (refcount_release(&inp->inp_refcount) == 0) + return (false); + + MPASS(inp->inp_flags & INP_FREED); + MPASS(inp->inp_socket == NULL); + MPASS(inp->inp_in_hpts == 0); + MPASS(inp->inp_in_input == 0); + INP_WUNLOCK(inp); + uma_zfree_smr(inp->inp_pcbinfo->ipi_zone, inp); + return (true); } /* @@ -1698,32 +1789,81 @@ in_pcbfree_deferred(epoch_context_t ctx) * reference count, which should occur only after the inpcb has been detached * from its socket. If another thread holds a temporary reference (acquired * using in_pcbref()) then the free is deferred until that reference is - * released using in_pcbrele(), but the inpcb is still unlocked. Almost all - * work, including removal from global lists, is done in this context, where - * the pcbinfo lock is held. + * released using in_pcbrele_(r|w)locked(), but the inpcb is still unlocked. + * Almost all work, including removal from global lists, is done in this + * context, where the pcbinfo lock is held. */ void in_pcbfree(struct inpcb *inp) { struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; +#ifdef INET + struct ip_moptions *imo; +#endif +#ifdef INET6 + struct ip6_moptions *im6o; +#endif + INP_WLOCK_ASSERT(inp); KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); - KASSERT((inp->inp_flags2 & INP_FREED) == 0, + KASSERT((inp->inp_flags & INP_FREED) == 0, ("%s: called twice for pcb %p", __func__, inp)); - if (inp->inp_flags2 & INP_FREED) { - INP_WUNLOCK(inp); - return; + + inp->inp_flags |= INP_FREED; + INP_INFO_WLOCK(pcbinfo); + inp->inp_gencnt = ++pcbinfo->ipi_gencnt; + pcbinfo->ipi_count--; + CK_LIST_REMOVE(inp, inp_list); + INP_INFO_WUNLOCK(pcbinfo); + + if (inp->inp_flags & INP_INHASHLIST) { + struct inpcbport *phd = inp->inp_phd; + + INP_HASH_WLOCK(pcbinfo); + /* XXX: Only do if SO_REUSEPORT_LB set? */ + in_pcbremlbgrouphash(inp); + + CK_LIST_REMOVE(inp, inp_hash); + CK_LIST_REMOVE(inp, inp_portlist); + if (CK_LIST_FIRST(&phd->phd_pcblist) == NULL) { + CK_LIST_REMOVE(phd, phd_hash); + uma_zfree_smr(pcbinfo->ipi_portzone, phd); + } + INP_HASH_WUNLOCK(pcbinfo); + inp->inp_flags &= ~INP_INHASHLIST; } - INP_WLOCK_ASSERT(inp); - INP_LIST_WLOCK(pcbinfo); - in_pcbremlists(inp); - INP_LIST_WUNLOCK(pcbinfo); + crfree(inp->inp_cred); RO_INVALIDATE_CACHE(&inp->inp_route); - /* mark as destruction in progress */ - inp->inp_flags2 |= INP_FREED; - INP_WUNLOCK(inp); - NET_EPOCH_CALL(in_pcbfree_deferred, &inp->inp_epoch_ctx); +#ifdef MAC + mac_inpcb_destroy(inp); +#endif +#if defined(IPSEC) || defined(IPSEC_SUPPORT) + if (inp->inp_sp != NULL) + ipsec_delete_pcbpolicy(inp); +#endif +#ifdef INET + if (inp->inp_options) + (void)m_free(inp->inp_options); + imo = inp->inp_moptions; +#endif +#ifdef INET6 + if (inp->inp_vflag & INP_IPV6PROTO) { + ip6_freepcbopts(inp->in6p_outputopts); + im6o = inp->in6p_moptions; + } else + im6o = NULL; +#endif + + if (__predict_false(in_pcbrele_wlocked(inp) == false)) { + INP_WUNLOCK(inp); + } +#ifdef INET6 + ip6_freemoptions(im6o); +#endif +#ifdef INET + inp_freemoptions(imo); +#endif } /* @@ -1764,7 +1904,7 @@ in_pcbdrop(struct inpcb *inp) CK_LIST_REMOVE(inp, inp_portlist); if (CK_LIST_FIRST(&phd->phd_pcblist) == NULL) { CK_LIST_REMOVE(phd, phd_hash); - NET_EPOCH_CALL(inpcbport_free, &phd->phd_epoch_ctx); + uma_zfree_smr(inp->inp_pcbinfo->ipi_portzone, phd); } INP_HASH_WUNLOCK(inp->inp_pcbinfo); inp->inp_flags &= ~INP_INHASHLIST; @@ -1835,7 +1975,7 @@ in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr faddr, int errno, struct inpcb *inp, *inp_temp; INP_INFO_WLOCK(pcbinfo); - CK_LIST_FOREACH_SAFE(inp, pcbinfo->ipi_listhead, inp_list, inp_temp) { + CK_LIST_FOREACH_SAFE(inp, &pcbinfo->ipi_listhead, inp_list, inp_temp) { INP_WLOCK(inp); #ifdef INET6 if ((inp->inp_vflag & INP_IPV4) == 0) { @@ -1854,49 +1994,57 @@ in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr faddr, int errno, INP_INFO_WUNLOCK(pcbinfo); } +static bool +inp_v4_multi_match(const struct inpcb *inp, void *v __unused) +{ + + if ((inp->inp_vflag & INP_IPV4) && inp->inp_moptions != NULL) + return (true); + else + return (false); +} + void in_pcbpurgeif0(struct inpcbinfo *pcbinfo, struct ifnet *ifp) { + struct inpcb_iterator inpi = INP_ITERATOR(pcbinfo, INPLOOKUP_WLOCKPCB, + inp_v4_multi_match, NULL); struct inpcb *inp; struct in_multi *inm; struct in_mfilter *imf; struct ip_moptions *imo; - INP_INFO_WLOCK(pcbinfo); - CK_LIST_FOREACH(inp, pcbinfo->ipi_listhead, inp_list) { - INP_WLOCK(inp); + IN_MULTI_LOCK_ASSERT(); + + while ((inp = inp_next(&inpi)) != NULL) { + INP_WLOCK_ASSERT(inp); + imo = inp->inp_moptions; - if ((inp->inp_vflag & INP_IPV4) && - imo != NULL) { - /* - * Unselect the outgoing interface if it is being - * detached. - */ - if (imo->imo_multicast_ifp == ifp) - imo->imo_multicast_ifp = NULL; + /* + * Unselect the outgoing interface if it is being + * detached. + */ + if (imo->imo_multicast_ifp == ifp) + imo->imo_multicast_ifp = NULL; - /* - * Drop multicast group membership if we joined - * through the interface being detached. - * - * XXX This can all be deferred to an epoch_call - */ + /* + * Drop multicast group membership if we joined + * through the interface being detached. + * + * XXX This can all be deferred to an epoch_call + */ restart: - IP_MFILTER_FOREACH(imf, &imo->imo_head) { - if ((inm = imf->imf_inm) == NULL) - continue; - if (inm->inm_ifp != ifp) - continue; - ip_mfilter_remove(&imo->imo_head, imf); - IN_MULTI_LOCK_ASSERT(); - in_leavegroup_locked(inm, NULL); - ip_mfilter_free(imf); - goto restart; - } + IP_MFILTER_FOREACH(imf, &imo->imo_head) { + if ((inm = imf->imf_inm) == NULL) + continue; + if (inm->inm_ifp != ifp) + continue; + ip_mfilter_remove(&imo->imo_head, imf); + in_leavegroup_locked(inm, NULL); + ip_mfilter_free(imf); + goto restart; } - INP_WUNLOCK(inp); } - INP_INFO_WUNLOCK(pcbinfo); } /* @@ -1918,7 +2066,6 @@ in_pcblookup_local(struct inpcbinfo *pcbinfo, struct in_addr laddr, KASSERT((lookupflags & ~(INPLOOKUP_WILDCARD)) == 0, ("%s: invalid lookup flags %d", __func__, lookupflags)); - INP_HASH_LOCK_ASSERT(pcbinfo); if ((lookupflags & INPLOOKUP_WILDCARD) == 0) { @@ -2081,8 +2228,9 @@ in_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, /* * Lookup PCB in hash list, using pcbinfo tables. This variation assumes - * that the caller has locked the hash list, and will not perform any further - * locking or reference operations on either the hash list or the connection. + * that the caller has either locked the hash list, which usually happens + * for bind(2) operations, or is in SMR section, which happens when sorting + * out incoming packets. */ static struct inpcb * in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, @@ -2223,20 +2371,15 @@ in_pcblookup_hash(struct inpcbinfo *pcbinfo, struct in_addr faddr, { struct inpcb *inp; + smr_enter(pcbinfo->ipi_smr); inp = in_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, lookupflags & INPLOOKUP_WILDCARD, ifp, numa_domain); if (inp != NULL) { - if (lookupflags & INPLOOKUP_WLOCKPCB) { - INP_WLOCK(inp); - } else if (lookupflags & INPLOOKUP_RLOCKPCB) { - INP_RLOCK(inp); - } else - panic("%s: locking bug", __func__); - if (__predict_false(inp->inp_flags2 & INP_FREED)) { - INP_UNLOCK(inp); + if (__predict_false(inp_smr_lock(inp, + (lookupflags & INPLOOKUP_LOCKMASK)) == false)) inp = NULL; - } - } + } else + smr_exit(pcbinfo->ipi_smr); return (inp); } @@ -2331,11 +2474,10 @@ in_pcbinshash(struct inpcb *inp) * If none exists, malloc one and tack it on. */ if (phd == NULL) { - phd = malloc(sizeof(struct inpcbport), M_PCB, M_NOWAIT); + phd = uma_zalloc_smr(pcbinfo->ipi_portzone, M_NOWAIT); if (phd == NULL) { return (ENOBUFS); /* XXX */ } - bzero(&phd->phd_epoch_ctx, sizeof(struct epoch_context)); phd->phd_port = inp->inp_lport; CK_LIST_INIT(&phd->phd_pcblist); CK_LIST_INSERT_HEAD(pcbporthash, phd, phd_hash); @@ -2353,6 +2495,10 @@ in_pcbinshash(struct inpcb *inp) * changed. NOTE: This does not handle the case of the lport changing (the * hashed port list would have to be updated as well), so the lport must * not change after in_pcbinshash() has been called. + * + * XXXGL: a race between this function and SMR-protected hash iterator + * will lead to iterator traversing a possibly wrong hash list. However, + * this race should have been here since change from rwlock to epoch. */ void in_pcbrehash(struct inpcb *inp) @@ -2381,39 +2527,6 @@ in_pcbrehash(struct inpcb *inp) CK_LIST_INSERT_HEAD(head, inp, inp_hash); } -/* - * Remove PCB from various lists. - */ -static void -in_pcbremlists(struct inpcb *inp) -{ - struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; - - INP_WLOCK_ASSERT(inp); *** 3009 LINES SKIPPED *** From nobody Thu Dec 2 18:49:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A9ABF18A952F; Thu, 2 Dec 2021 18:49:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4lNh36xPz3rMt; Thu, 2 Dec 2021 18:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02515224B3; Thu, 2 Dec 2021 18:49: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 1B2In7nI068955; Thu, 2 Dec 2021 18:49:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2In7tH068954; Thu, 2 Dec 2021 18:49:07 GMT (envelope-from git) Date: Thu, 2 Dec 2021 18:49:07 GMT Message-Id: <202112021849.1B2In7tH068954@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: 50f081ecb7a4 - main - tcp_hpts: provide tcp_in_hpts(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 50f081ecb7a453213b15804c4b36903f1b248f8f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638470948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wf76oQhYfYSru/nBu7lJO6P2lRXOYH6OHQoVulks+hg=; b=WmSjyEdOmD5xU5Dc+qM3pCbP1TdLXzRD+INQp6A9vmoLkNsxSMt9kF+z/aHgRZhjDRmPq6 3yWzXGDj05JbyR4wAfhGQQF178x2NeBYudj2j0Y9aDq7pXHw6mqSVeOpUaSoZOS1YbXFtI oIyeWiGKVwe3u81OxCGWhWFHNR8dEWKo2nw9rhvGnovGlGriySsO6PiTKZ7va+3zKUZQQl 1XKjNZVZI+7//uY+9vaFcuwrR8Zr26i/EqlyTPSNvuIuAeZMg8LupkBxqmfmy75Rh2q1k0 o2YIQm1H3EjVknR3OJcTf3pSaKd1fBpX14NVRGKpD+pWZGBl5CPUGR1nAMh5jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638470948; a=rsa-sha256; cv=none; b=oaR/prL+I035tPF+5w7/zUiXQG3gAhtraxIKyk1wGFgvEwu8BruRtWMQ19PovXdzEr6vZI 0+x1u2yMDVz27WmCVtMXKZQ35MARkS5xJ3iyJLrHnUyHaWUYAuxX2tFnpnAxcMxrPf1n0y 3CbHcVQ6K1NWbRLKDyhAtJsx2VdfErgf4Dg2+pVWuhvTjTlEhzhcjd+7VX3GA+zRgbDaO3 cQRtXEwd4ARIjYzoWaK7oLmD8Vd0Cta/3nyPTNQsIvvgpfiE9PbqBtk0+uwRejXAVKpuZC 4qtt87GPbh477Y0DvnI5CCmt1AM+hu18KZ5DeKCN2Ic9AqIUHgNBCVCNIeU8xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=50f081ecb7a453213b15804c4b36903f1b248f8f commit 50f081ecb7a453213b15804c4b36903f1b248f8f Author: Gleb Smirnoff AuthorDate: 2021-12-02 18:48:48 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-02 18:48:48 +0000 tcp_hpts: provide tcp_in_hpts(). It will hide some internal HPTS knowledge from the consumers. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33023 --- sys/netinet/tcp_hpts.c | 2 +- sys/netinet/tcp_hpts.h | 7 ++++++ sys/netinet/tcp_stacks/bbr.c | 22 ++++++++--------- sys/netinet/tcp_stacks/rack.c | 56 +++++++++++++++++++++---------------------- 4 files changed, 47 insertions(+), 40 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 764d46a1580b..ee0b6d8f9d58 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); * its top a check to prevent unwanted calls (from user land or the * arrival of incoming ack's). So it would add something like: * - * if (inp->inp_in_hpts) + * if (tcp_in_hpts(inp)) * return; * * to prevent output processing until the time alotted has gone by. diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h index bfbd34e65ff5..b93a008fd253 100644 --- a/sys/netinet/tcp_hpts.h +++ b/sys/netinet/tcp_hpts.h @@ -201,6 +201,13 @@ struct tcp_hpts_entry *tcp_cur_hpts(struct inpcb *inp); #define tcp_hpts_remove(a, b) __tcp_hpts_remove(a, b, __LINE__) void __tcp_hpts_remove(struct inpcb *inp, int32_t flags, int32_t line); +static inline bool +tcp_in_hpts(struct inpcb *inp) +{ + + return (inp->inp_in_hpts > 0); +} + /* * To insert a TCB on the hpts you *must* be holding the * INP_WLOCK(). The hpts insert code will then acqurire diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index eb64a28f8565..74a9fada9174 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -747,7 +747,7 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts, int32_ uint32_t prev_delay = 0; inp = tp->t_inpcb; - if (inp->inp_in_hpts) { + if (tcp_in_hpts(inp)) { /* A previous call is already set up */ return; } @@ -1058,7 +1058,7 @@ bbr_timer_audit(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts, struct sock */ wrong_timer: if ((bbr->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) == 0) { - if (inp->inp_in_hpts) + if (tcp_in_hpts(inp)) tcp_hpts_remove(inp, HPTS_REMOVE_OUTPUT); bbr_timer_cancel(bbr, __LINE__, cts); bbr_start_hpts_timer(bbr, tp, cts, 1, bbr->r_ctl.rc_last_delay_val, @@ -1883,7 +1883,7 @@ bbr_fill_in_logging_data(struct tcp_bbr *bbr, struct tcp_log_bbr *l, uint32_t ct l->lt_epoch = bbr->r_ctl.rc_lt_epoch; l->pacing_gain = bbr->r_ctl.rc_bbr_hptsi_gain; l->cwnd_gain = bbr->r_ctl.rc_bbr_cwnd_gain; - l->inhpts = bbr->rc_inp->inp_in_hpts; + l->inhpts = tcp_in_hpts(bbr->rc_inp); l->ininput = bbr->rc_inp->inp_in_input; l->use_lt_bw = bbr->rc_lt_use_bw; l->pkts_out = bbr->r_ctl.rc_flight_at_input; @@ -3969,7 +3969,7 @@ bbr_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type, struct bbr_s bbr->rc_tlp_rtx_out = 0; bbr->r_ctl.recovery_lr = bbr->r_ctl.rc_pkt_epoch_loss_rate; tcp_bbr_tso_size_check(bbr, bbr->r_ctl.rc_rcvtime); - if (bbr->rc_inp->inp_in_hpts && + if (tcp_in_hpts(bbr->rc_inp) && ((bbr->r_ctl.rc_hpts_flags & PACE_TMR_RACK) == 0)) { /* * When we enter recovery, we need to restart @@ -5264,7 +5264,7 @@ bbr_timer_cancel(struct tcp_bbr *bbr, int32_t line, uint32_t cts) if (bbr->r_ctl.rc_hpts_flags & PACE_TMR_MASK) { uint8_t hpts_removed = 0; - if (bbr->rc_inp->inp_in_hpts && + if (tcp_in_hpts(bbr->rc_inp) && (bbr->rc_timer_first == 1)) { /* * If we are canceling timer's when we have the @@ -7972,7 +7972,7 @@ bbr_exit_persist(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts, int32_t li * don't want to transfer forward the time * for our sum's calculations. */ - if (bbr->rc_inp->inp_in_hpts) { + if (tcp_in_hpts(bbr->rc_inp)) { tcp_hpts_remove(bbr->rc_inp, HPTS_REMOVE_OUTPUT); bbr->rc_timer_first = 0; bbr->r_ctl.rc_hpts_flags = 0; @@ -11653,7 +11653,7 @@ bbr_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if ((tp->snd_max == tp->snd_una) && ((tp->t_flags & TF_DELACK) == 0) && - (bbr->rc_inp->inp_in_hpts) && + (tcp_in_hpts(bbr->rc_inp)) && (bbr->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT)) { /* * keep alive not needed if we are hptsi @@ -11661,7 +11661,7 @@ bbr_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, */ ; } else { - if (bbr->rc_inp->inp_in_hpts) { + if (tcp_in_hpts(bbr->rc_inp)) { tcp_hpts_remove(bbr->rc_inp, HPTS_REMOVE_OUTPUT); if ((bbr->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) && (TSTMP_GT(lcts, bbr->rc_pacer_started))) { @@ -12011,7 +12011,7 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv) } #endif if (((bbr->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) == 0) && - inp->inp_in_hpts) { + tcp_in_hpts(inp)) { /* * We are on the hpts for some timer but not hptsi output. * Possibly remove from the hpts so we can send/recv etc. @@ -12056,9 +12056,9 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv) if ((bbr->r_timer_override) || (tp->t_state < TCPS_ESTABLISHED)) { /* Timeouts or early states are exempt */ - if (inp->inp_in_hpts) + if (tcp_in_hpts(inp)) tcp_hpts_remove(inp, HPTS_REMOVE_OUTPUT); - } else if (inp->inp_in_hpts) { + } else if (tcp_in_hpts(inp)) { if ((bbr->r_ctl.rc_last_delay_val) && (bbr->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) && delay_calc) { diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index a17e598f6477..5a4849566cf9 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -2294,7 +2294,7 @@ rack_log_retran_reason(struct tcp_rack *rack, struct rack_sendmap *rsm, uint32_t log.u_bbr.flex5 = rsm->r_start; log.u_bbr.flex6 = rsm->r_end; log.u_bbr.flex8 = mod; - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked); @@ -2329,7 +2329,7 @@ rack_log_to_start(struct tcp_rack *rack, uint32_t cts, uint32_t to, int32_t slot log.u_bbr.pkts_out = 0; else log.u_bbr.pkts_out = rack->r_ctl.rc_prr_sndcnt; - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked); @@ -2354,7 +2354,7 @@ rack_log_to_event(struct tcp_rack *rack, int32_t to_num, struct rack_sendmap *rs struct timeval tv; memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; log.u_bbr.flex8 = to_num; log.u_bbr.flex1 = rack->r_ctl.rc_rack_min_rtt; @@ -2393,7 +2393,7 @@ rack_log_map_chg(struct tcpcb *tp, struct tcp_rack *rack, memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.flex8 = flag; - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; log.u_bbr.cur_del_rate = (uint64_t)prev; log.u_bbr.delRate = (uint64_t)rsm; @@ -2438,7 +2438,7 @@ rack_log_rtt_upd(struct tcpcb *tp, struct tcp_rack *rack, uint32_t t, uint32_t l union tcp_log_stackspecific log; struct timeval tv; memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; log.u_bbr.flex1 = t; log.u_bbr.flex2 = len; @@ -2588,7 +2588,7 @@ rack_log_progress_event(struct tcp_rack *rack, struct tcpcb *tp, uint32_t tick, struct timeval tv; memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; log.u_bbr.flex1 = line; log.u_bbr.flex2 = tick; @@ -2615,7 +2615,7 @@ rack_log_type_bbrsnd(struct tcp_rack *rack, uint32_t len, uint32_t slot, uint32_ union tcp_log_stackspecific log; memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; log.u_bbr.flex1 = slot; if (rack->rack_no_prr) @@ -2661,7 +2661,7 @@ rack_log_doseg_done(struct tcp_rack *rack, uint32_t cts, int32_t nxt_pkt, int32_ log.u_bbr.flex7 <<= 1; log.u_bbr.flex7 |= rack->r_wanted_output; /* Do we want output */ log.u_bbr.flex8 = rack->rc_in_persist; - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked); log.u_bbr.use_lt_bw = rack->r_ent_rec_ns; @@ -2717,7 +2717,7 @@ rack_log_type_just_return(struct tcp_rack *rack, uint32_t cts, uint32_t tlen, ui struct timeval tv; memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; log.u_bbr.flex1 = slot; log.u_bbr.flex2 = rack->r_ctl.rc_hpts_flags; @@ -2750,7 +2750,7 @@ rack_log_to_cancel(struct tcp_rack *rack, int32_t hpts_removed, int line, uint32 union tcp_log_stackspecific log; memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; log.u_bbr.flex1 = line; log.u_bbr.flex2 = rack->r_ctl.rc_last_output_to; @@ -4466,7 +4466,7 @@ rack_do_goodput_measurement(struct tcpcb *tp, struct tcp_rack *rack, rack->r_ctl.rc_app_limited_cnt, 0, 0, 10, __LINE__, NULL, quality); } - if (rack->rc_inp->inp_in_hpts && + if (tcp_in_hpts(rack->rc_inp) && (rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT)) { /* * Ok we can't trust the pacer in this case @@ -5678,7 +5678,7 @@ rack_enter_persist(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts) static void rack_exit_persist(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts) { - if (rack->rc_inp->inp_in_hpts) { + if (tcp_in_hpts(rack->rc_inp)) { tcp_hpts_remove(rack->rc_inp, HPTS_REMOVE_OUTPUT); rack->r_ctl.rc_hpts_flags = 0; } @@ -5811,7 +5811,7 @@ rack_start_hpts_timer(struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts, (tp->t_state == TCPS_LISTEN)) { return; } - if (inp->inp_in_hpts) { + if (tcp_in_hpts(inp)) { /* Already on the pacer */ return; } @@ -7244,7 +7244,7 @@ rack_timer_cancel(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts, int lin } if (rack->r_ctl.rc_hpts_flags & PACE_TMR_MASK) { rack->rc_tmr_stopped = rack->r_ctl.rc_hpts_flags & PACE_TMR_MASK; - if (rack->rc_inp->inp_in_hpts && + if (tcp_in_hpts(rack->rc_inp) && ((rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) == 0)) { /* * Canceling timer's when we have no output being @@ -9983,7 +9983,7 @@ out: (entered_recovery == 0)) { rack_update_prr(tp, rack, changed, th_ack); if ((rsm && (rack->r_ctl.rc_prr_sndcnt >= ctf_fixed_maxseg(tp)) && - ((rack->rc_inp->inp_in_hpts == 0) && + ((tcp_in_hpts(rack->rc_inp) == 0) && ((rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) == 0)))) { /* * If you are pacing output you don't want @@ -13232,7 +13232,7 @@ rack_timer_audit(struct tcpcb *tp, struct tcp_rack *rack, struct sockbuf *sb) * We will force the hpts to be stopped if any, and restart * with the slot set to what was in the saved slot. */ - if (rack->rc_inp->inp_in_hpts) { + if (tcp_in_hpts(rack->rc_inp)) { if (rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) { uint32_t us_cts; @@ -13328,7 +13328,7 @@ rack_log_input_packet(struct tcpcb *tp, struct tcp_rack *rack, struct tcp_ackent } #endif memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; if (rack->rack_no_prr == 0) log.u_bbr.flex1 = rack->r_ctl.rc_prr_sndcnt; @@ -14320,7 +14320,7 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, } #endif memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; if (rack->rack_no_prr == 0) log.u_bbr.flex1 = rack->r_ctl.rc_prr_sndcnt; @@ -14679,13 +14679,13 @@ do_output_now: /* We could not send (probably in the hpts but stopped the timer earlier)? */ if ((tp->snd_max == tp->snd_una) && ((tp->t_flags & TF_DELACK) == 0) && - (rack->rc_inp->inp_in_hpts) && + (tcp_in_hpts(rack->rc_inp)) && (rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT)) { /* keep alive not needed if we are hptsi output yet */ ; } else { int late = 0; - if (rack->rc_inp->inp_in_hpts) { + if (tcp_in_hpts(rack->rc_inp)) { if (rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) { us_cts = tcp_get_usecs(NULL); if (TSTMP_GT(rack->r_ctl.rc_last_output_to, us_cts)) { @@ -15611,7 +15611,7 @@ rack_log_fsb(struct tcp_rack *rack, struct tcpcb *tp, struct socket *so, uint32_ struct timeval tv; memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; log.u_bbr.flex1 = error; log.u_bbr.flex2 = flags; @@ -16127,7 +16127,7 @@ rack_fast_rsm_output(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendma union tcp_log_stackspecific log; memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; if (rack->rack_no_prr) log.u_bbr.flex1 = 0; @@ -16628,7 +16628,7 @@ again: union tcp_log_stackspecific log; memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; if (rack->rack_no_prr) log.u_bbr.flex1 = 0; @@ -16867,7 +16867,7 @@ rack_output(struct tcpcb *tp) cts = tcp_get_usecs(&tv); ms_cts = tcp_tv_to_mssectick(&tv); if (((rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) == 0) && - rack->rc_inp->inp_in_hpts) { + tcp_in_hpts(rack->rc_inp)) { /* * We are on the hpts for some timer but not hptsi output. * Remove from the hpts unconditionally. @@ -16893,7 +16893,7 @@ rack_output(struct tcpcb *tp) } } if (rack->rc_in_persist) { - if (rack->rc_inp->inp_in_hpts == 0) { + if (tcp_in_hpts(rack->rc_inp) == 0) { /* Timer is not running */ rack_start_hpts_timer(rack, tp, cts, 0, 0, 0); } @@ -16907,9 +16907,9 @@ rack_output(struct tcpcb *tp) (delayed) || (tp->t_state < TCPS_ESTABLISHED)) { rack->rc_ack_can_sendout_data = 0; - if (rack->rc_inp->inp_in_hpts) + if (tcp_in_hpts(rack->rc_inp)) tcp_hpts_remove(rack->rc_inp, HPTS_REMOVE_OUTPUT); - } else if (rack->rc_inp->inp_in_hpts) { + } else if (tcp_in_hpts(rack->rc_inp)) { /* * On the hpts you can't pass even if ACKNOW is on, we will * when the hpts fires. @@ -18800,7 +18800,7 @@ send: union tcp_log_stackspecific log; memset(&log.u_bbr, 0, sizeof(log.u_bbr)); - log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts; + log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); log.u_bbr.ininput = rack->rc_inp->inp_in_input; if (rack->rack_no_prr) log.u_bbr.flex1 = 0; From nobody Thu Dec 2 18:49:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 443BF18A9460; Thu, 2 Dec 2021 18:49: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 4J4lNj5H1pz3rKb; Thu, 2 Dec 2021 18:49:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20C07227F6; Thu, 2 Dec 2021 18:49: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 1B2In8BX068980; Thu, 2 Dec 2021 18:49:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2In8EQ068979; Thu, 2 Dec 2021 18:49:08 GMT (envelope-from git) Date: Thu, 2 Dec 2021 18:49:08 GMT Message-Id: <202112021849.1B2In8EQ068979@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: b0a7c008cbc6 - main - tcp_hpts: make struct tcp_hpts_entry private to the module. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b0a7c008cbc6f730749cfa90953509d0412984b1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638470950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wuvxRimRT9PCu4CxKiEZF6A8QX2tMMeoJ+CYHvouNDc=; b=gpfw5vyLADTz3K423DjsHkilu93jpzFPA/9gsQEeHjvGWzHZRSm7EiVz32jORYBDNBeI+0 2vx7sMKk/jPnegG66sPmjA7GEMn4/mrIn9iPVR4meYQUElwp5OsG1P/E9CkTa7QVUweOdc nhqt1IihxyPooLjkYILRZTrfjk8f0TqParTk47znNTqs4nJv/aOANAHB0GeFGwEEWYGqmo r+u+c3V2iYDlUC971h5WdqKhipmZ5vv6k9n8pE3tvVvj5yh2o7/mr76EgVUglHdxMkuGcm jJCEFQ9YdgZcWvMzhRzv11m1Qx0zMY9Dp487UfLEchy9zk7HtZ100G5w3X2drA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638470950; a=rsa-sha256; cv=none; b=TOPhs56IOoxMBbQ2gXJtXzg1t5AyTUF/cOXtv11JErzYz2i/G/jwAveE/WFX+Cp99cLHH0 iav9n3MUpdT8IpbNzt6R9vk0w0CjBWdkMeFNAsXCN55xK5f6dGNCPVH8dcV8jQfqnN9a1R FbJVRGJflHUUs9QV290jb5A17c3OqR2vdft1XkB8/glDXLWQXT1dp6oCJWOh325+8bcgd3 8G3MxbC0Hf6af7Ile4SPWNd6K90cuAC+M8KxpiRYxa8UPHMJRbqzfRKlwLnt5KcP8EaBxf emN9iKHS/4sWXYsfkWtjEaoeU98FWa+E8OZar1vOuOOMyKubT7Fzyxa9ASeFVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b0a7c008cbc6f730749cfa90953509d0412984b1 commit b0a7c008cbc6f730749cfa90953509d0412984b1 Author: Gleb Smirnoff AuthorDate: 2021-12-02 18:48:48 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-02 18:48:48 +0000 tcp_hpts: make struct tcp_hpts_entry private to the module. Also, make some of the functions also private to the module. Remove unused functions discovered after that. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33024 --- sys/netinet/tcp_hpts.c | 151 ++++++++++++++++++++++++------------------------- sys/netinet/tcp_hpts.h | 105 +--------------------------------- 2 files changed, 78 insertions(+), 178 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index ee0b6d8f9d58..237452932ca3 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -187,6 +187,76 @@ __FBSDID("$FreeBSD$"); #include #endif +/* + * The hpts uses a 102400 wheel. The wheel + * defines the time in 10 usec increments (102400 x 10). + * This gives a range of 10usec - 1024ms to place + * an entry within. If the user requests more than + * 1.024 second, a remaineder is attached and the hpts + * when seeing the remainder will re-insert the + * inpcb forward in time from where it is until + * the remainder is zero. + */ + +#define NUM_OF_HPTSI_SLOTS 102400 + +/* Each hpts has its own p_mtx which is used for locking */ +#define HPTS_MTX_ASSERT(hpts) mtx_assert(&(hpts)->p_mtx, MA_OWNED) +TAILQ_HEAD(hptsh, inpcb); +struct tcp_hpts_entry { + /* Cache line 0x00 */ + struct mtx p_mtx; /* Mutex for hpts */ + struct timeval p_mysleep; /* Our min sleep time */ + uint64_t syscall_cnt; + uint64_t sleeping; /* What the actual sleep was (if sleeping) */ + uint16_t p_hpts_active; /* Flag that says hpts is awake */ + uint8_t p_wheel_complete; /* have we completed the wheel arc walk? */ + uint32_t p_curtick; /* Tick in 10 us the hpts is going to */ + uint32_t p_runningslot; /* Current tick we are at if we are running */ + uint32_t p_prev_slot; /* Previous slot we were on */ + uint32_t p_cur_slot; /* Current slot in wheel hpts is draining */ + uint32_t p_nxt_slot; /* The next slot outside the current range of + * slots that the hpts is running on. */ + int32_t p_on_queue_cnt; /* Count on queue in this hpts */ + uint32_t p_lasttick; /* Last tick before the current one */ + uint8_t p_direct_wake :1, /* boolean */ + p_on_min_sleep:1, /* boolean */ + p_hpts_wake_scheduled:1, /* boolean */ + p_avail:5; + uint8_t p_fill[3]; /* Fill to 32 bits */ + /* Cache line 0x40 */ + void *p_inp; + struct hptsh p_input; /* For the tcp-input runner */ + /* Hptsi wheel */ + struct hptsh *p_hptss; + int32_t p_on_inqueue_cnt; /* Count on input queue in this hpts */ + uint32_t p_hpts_sleep_time; /* Current sleep interval having a max + * of 255ms */ + uint32_t overidden_sleep; /* what was overrided by min-sleep for logging */ + uint32_t saved_lasttick; /* for logging */ + uint32_t saved_curtick; /* for logging */ + uint32_t saved_curslot; /* for logging */ + uint32_t saved_prev_slot; /* for logging */ + uint32_t p_delayed_by; /* How much were we delayed by */ + /* Cache line 0x80 */ + struct sysctl_ctx_list hpts_ctx; + struct sysctl_oid *hpts_root; + struct intr_event *ie; + void *ie_cookie; + uint16_t p_num; /* The hpts number one per cpu */ + uint16_t p_cpu; /* The hpts CPU */ + /* There is extra space in here */ + /* Cache line 0x100 */ + struct callout co __aligned(CACHE_LINE_SIZE); +} __aligned(CACHE_LINE_SIZE); + +struct tcp_hptsi { + struct proc *rp_proc; /* Process structure for hpts */ + struct tcp_hpts_entry **rp_ent; /* Array of hptss */ + uint32_t *cts_last_ran; + uint32_t rp_num_hptss; /* Number of hpts threads */ +}; + MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts"); #ifdef RSS static int tcp_bind_threads = 1; @@ -229,12 +299,10 @@ SYSCTL_NODE(_net_inet_tcp_hpts, OID_AUTO, stats, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, static int32_t tcp_hpts_precision = 120; -struct hpts_domain_info { +static struct hpts_domain_info { int count; int cpu[MAXCPU]; -}; - -struct hpts_domain_info hpts_domains[MAXMEMDOM]; +} hpts_domains[MAXMEMDOM]; counter_u64_t hpts_hopelessly_behind; @@ -525,18 +593,7 @@ hpts_sane_input_insert(struct tcp_hpts_entry *hpts, struct inpcb *inp, int line) in_pcbref(inp); } -struct tcp_hpts_entry * -tcp_cur_hpts(struct inpcb *inp) -{ - int32_t hpts_num; - struct tcp_hpts_entry *hpts; - - hpts_num = inp->inp_hpts_cpu; - hpts = tcp_pace.rp_ent[hpts_num]; - return (hpts); -} - -struct tcp_hpts_entry * +static struct tcp_hpts_entry * tcp_hpts_lock(struct inpcb *inp) { struct tcp_hpts_entry *hpts; @@ -556,7 +613,7 @@ again: return (hpts); } -struct tcp_hpts_entry * +static struct tcp_hpts_entry * tcp_input_lock(struct inpcb *inp) { struct tcp_hpts_entry *hpts; @@ -837,19 +894,6 @@ tcp_queue_to_hpts_immediate_locked(struct inpcb *inp, struct tcp_hpts_entry *hpt return (need_wake); } -int -__tcp_queue_to_hpts_immediate(struct inpcb *inp, int32_t line) -{ - int32_t ret; - struct tcp_hpts_entry *hpts; - - INP_WLOCK_ASSERT(inp); - hpts = tcp_hpts_lock(inp); - ret = tcp_queue_to_hpts_immediate_locked(inp, hpts, line, 0); - mtx_unlock(&hpts->p_mtx); - return (ret); -} - #ifdef INVARIANTS static void check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct inpcb *inp, uint32_t inp_hptsslot, int line) @@ -1052,46 +1096,6 @@ __tcp_hpts_insert(struct inpcb *inp, uint32_t slot, int32_t line){ return (tcp_hpts_insert_diag(inp, slot, line, NULL)); } -int -__tcp_queue_to_input_locked(struct inpcb *inp, struct tcp_hpts_entry *hpts, int32_t line) -{ - int32_t retval = 0; - - HPTS_MTX_ASSERT(hpts); - if (inp->inp_in_input == 0) { - /* Ok we need to set it on the hpts in the current slot */ - hpts_sane_input_insert(hpts, inp, line); - retval = 1; - if ((hpts->p_hpts_active == 0) && - (hpts->p_on_min_sleep == 0)){ - /* - * Activate the hpts if it is sleeping. - */ - retval = 2; - hpts->p_direct_wake = 1; - tcp_wakehpts(hpts); - } - } else if ((hpts->p_hpts_active == 0) && - (hpts->p_on_min_sleep == 0)){ - retval = 4; - hpts->p_direct_wake = 1; - tcp_wakehpts(hpts); - } - return (retval); -} - -int32_t -__tcp_queue_to_input(struct inpcb *inp, int line) -{ - struct tcp_hpts_entry *hpts; - int32_t ret; - - hpts = tcp_input_lock(inp); - ret = __tcp_queue_to_input_locked(inp, hpts, line); - mtx_unlock(&hpts->p_mtx); - return (ret); -} - void __tcp_set_inp_to_drop(struct inpcb *inp, uint16_t reason, int32_t line) { @@ -1120,7 +1124,7 @@ __tcp_set_inp_to_drop(struct inpcb *inp, uint16_t reason, int32_t line) mtx_unlock(&hpts->p_mtx); } -uint16_t +static uint16_t hpts_random_cpu(struct inpcb *inp){ /* * No flow type set distribute the load randomly. @@ -1820,11 +1824,6 @@ __tcp_set_hpts(struct inpcb *inp, int32_t line) mtx_unlock(&hpts->p_mtx); } -uint16_t -tcp_hpts_delayedby(struct inpcb *inp){ - return (tcp_pace.rp_ent[inp->inp_hpts_cpu]->p_delayed_by); -} - static void __tcp_run_hpts(struct tcp_hpts_entry *hpts) { diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h index b93a008fd253..4b0fca566c3f 100644 --- a/sys/netinet/tcp_hpts.h +++ b/sys/netinet/tcp_hpts.h @@ -28,21 +28,6 @@ #ifndef __tcp_hpts_h__ #define __tcp_hpts_h__ -/* - * The hpts uses a 102400 wheel. The wheel - * defines the time in 10 usec increments (102400 x 10). - * This gives a range of 10usec - 1024ms to place - * an entry within. If the user requests more than - * 1.024 second, a remaineder is attached and the hpts - * when seeing the remainder will re-insert the - * inpcb forward in time from where it is until - * the remainder is zero. - */ - -#define NUM_OF_HPTSI_SLOTS 102400 - -TAILQ_HEAD(hptsh, inpcb); - /* Number of useconds in a hpts tick */ #define HPTS_TICKS_PER_SLOT 10 #define HPTS_MS_TO_SLOTS(x) ((x * 100) + 1) @@ -85,68 +70,6 @@ struct hpts_diag { #define DEFAULT_CONNECTION_THESHOLD 100 -#ifdef _KERNEL -/* Each hpts has its own p_mtx which is used for locking */ -struct tcp_hpts_entry { - /* Cache line 0x00 */ - struct mtx p_mtx; /* Mutex for hpts */ - struct timeval p_mysleep; /* Our min sleep time */ - uint64_t syscall_cnt; - uint64_t sleeping; /* What the actual sleep was (if sleeping) */ - uint16_t p_hpts_active; /* Flag that says hpts is awake */ - uint8_t p_wheel_complete; /* have we completed the wheel arc walk? */ - uint32_t p_curtick; /* Tick in 10 us the hpts is going to */ - uint32_t p_runningslot; /* Current tick we are at if we are running */ - uint32_t p_prev_slot; /* Previous slot we were on */ - uint32_t p_cur_slot; /* Current slot in wheel hpts is draining */ - uint32_t p_nxt_slot; /* The next slot outside the current range of - * slots that the hpts is running on. */ - int32_t p_on_queue_cnt; /* Count on queue in this hpts */ - uint32_t p_lasttick; /* Last tick before the current one */ - uint8_t p_direct_wake :1, /* boolean */ - p_on_min_sleep:1, /* boolean */ - p_hpts_wake_scheduled:1, /* boolean */ - p_avail:5; - uint8_t p_fill[3]; /* Fill to 32 bits */ - /* Cache line 0x40 */ - void *p_inp; - struct hptsh p_input; /* For the tcp-input runner */ - /* Hptsi wheel */ - struct hptsh *p_hptss; - int32_t p_on_inqueue_cnt; /* Count on input queue in this hpts */ - uint32_t p_hpts_sleep_time; /* Current sleep interval having a max - * of 255ms */ - uint32_t overidden_sleep; /* what was overrided by min-sleep for logging */ - uint32_t saved_lasttick; /* for logging */ - uint32_t saved_curtick; /* for logging */ - uint32_t saved_curslot; /* for logging */ - uint32_t saved_prev_slot; /* for logging */ - uint32_t p_delayed_by; /* How much were we delayed by */ - /* Cache line 0x80 */ - struct sysctl_ctx_list hpts_ctx; - struct sysctl_oid *hpts_root; - struct intr_event *ie; - void *ie_cookie; - uint16_t p_num; /* The hpts number one per cpu */ - uint16_t p_cpu; /* The hpts CPU */ - /* There is extra space in here */ - /* Cache line 0x100 */ - struct callout co __aligned(CACHE_LINE_SIZE); -} __aligned(CACHE_LINE_SIZE); - -struct tcp_hptsi { - struct proc *rp_proc; /* Process structure for hpts */ - struct tcp_hpts_entry **rp_ent; /* Array of hptss */ - uint32_t *cts_last_ran; - uint32_t rp_num_hptss; /* Number of hpts threads */ -}; - -#endif - -#define HPTS_REMOVE_INPUT 0x01 -#define HPTS_REMOVE_OUTPUT 0x02 -#define HPTS_REMOVE_ALL (HPTS_REMOVE_INPUT | HPTS_REMOVE_OUTPUT) - /* * When using the hpts, a TCP stack must make sure * that once a INP_DROPPED flag is applied to a INP @@ -191,15 +114,11 @@ struct tcp_hptsi { #ifdef _KERNEL -#define HPTS_MTX_ASSERT(hpts) mtx_assert(&(hpts)->p_mtx, MA_OWNED) -struct tcp_hpts_entry *tcp_hpts_lock(struct inpcb *inp); -struct tcp_hpts_entry *tcp_input_lock(struct inpcb *inp); -int __tcp_queue_to_hpts_immediate(struct inpcb *inp, int32_t line); -#define tcp_queue_to_hpts_immediate(a)__tcp_queue_to_hpts_immediate(a, __LINE__) - -struct tcp_hpts_entry *tcp_cur_hpts(struct inpcb *inp); #define tcp_hpts_remove(a, b) __tcp_hpts_remove(a, b, __LINE__) void __tcp_hpts_remove(struct inpcb *inp, int32_t flags, int32_t line); +#define HPTS_REMOVE_INPUT 0x01 +#define HPTS_REMOVE_OUTPUT 0x02 +#define HPTS_REMOVE_ALL (HPTS_REMOVE_INPUT | HPTS_REMOVE_OUTPUT) static inline bool tcp_in_hpts(struct inpcb *inp) @@ -238,15 +157,6 @@ uint32_t __tcp_hpts_insert(struct inpcb *inp, uint32_t slot, int32_t line); uint32_t tcp_hpts_insert_diag(struct inpcb *inp, uint32_t slot, int32_t line, struct hpts_diag *diag); -int - __tcp_queue_to_input_locked(struct inpcb *inp, struct tcp_hpts_entry *hpts, int32_t line); -#define tcp_queue_to_input_locked(a, b) __tcp_queue_to_input_locked(a, b, __LINE__); -int -__tcp_queue_to_input(struct inpcb *inp, int32_t line); -#define tcp_queue_to_input(a) __tcp_queue_to_input(a, __LINE__) - -uint16_t tcp_hpts_delayedby(struct inpcb *inp); - void __tcp_set_hpts(struct inpcb *inp, int32_t line); #define tcp_set_hpts(a) __tcp_set_hpts(a, __LINE__) @@ -255,8 +165,6 @@ void __tcp_set_inp_to_drop(struct inpcb *inp, uint16_t reason, int32_t line); void tcp_run_hpts(void); -uint16_t hpts_random_cpu(struct inpcb *inp); - extern int32_t tcp_min_hptsi_time; #endif /* _KERNEL */ @@ -290,13 +198,6 @@ tcp_tv_to_lusectick(const struct timeval *sv) } #ifdef _KERNEL - -static __inline void -tcp_hpts_unlock(struct tcp_hpts_entry *hpts) -{ - mtx_unlock(&hpts->p_mtx); -} - static __inline uint32_t tcp_gethptstick(struct timeval *sv) { From nobody Thu Dec 2 18:49:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7564518A9696; Thu, 2 Dec 2021 18:49: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 4J4lNl1nqvz3rQL; Thu, 2 Dec 2021 18:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F08022656; Thu, 2 Dec 2021 18:49: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 1B2InA9o069004; Thu, 2 Dec 2021 18:49:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2InAPE069003; Thu, 2 Dec 2021 18:49:10 GMT (envelope-from git) Date: Thu, 2 Dec 2021 18:49:10 GMT Message-Id: <202112021849.1B2InAPE069003@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: f971e791391d - main - tcp_hpts: rename input queue to drop queue and trim 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f971e791391d9f7ff6bfd7d7e0bed93267216329 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638470951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PFeD7pwewKjlUIUJKEFNWpFPjQZUQ95r6HpRLF1ewxw=; b=k4tuD7L3qD6sMEU8y0g+LvcWN6oyMit436/BlAJSOYd0casf/m9GAAYMNKdbzY0u7Kne1H FG1lUsim6cLCjKDd8BsFWaugGhQqZctVz8ea5QX3bPCYx/yHi5rOetKr1RKD/mehPe/oGV LlS29/ozsT8czjynEtgjuPqfxbydHqmOp1FvGy1rV5Zj48w/SVTzqOE+nRmLj/LStWNhJ+ obExYunawOVOJK0xVSz7XtCUQAHIhkzqg7DW5CkrN/A5nBCGpvV4QAH6K21mOOs26J/dJ0 cUXi6nhr4Ln1ycHWtHIj5aU2KZRp7XOR8i81LbeK7XLPhBW4Dk1T7ufinf8Tsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638470951; a=rsa-sha256; cv=none; b=bJs0It9b7P3hrOs7qZjS5saOlL4ROf9ou4gTWG0/PQn7ng3xdP+sbODqkIEJlkyMdKWlxm 9Vg+AZ5YV1ALq4qAGQbwOnEiqpA8T8wrZWVCNTD2rlEM4CYMAwuxMBWiuivijJjmW1wYlK iGcyn7f/hdAEJRC+Ty2Xp3DsmIWiXzxxmLJXy8kyLTnu8+d0mH4ryWhqTPGpKP2W94HOud BcY0gAHnYqxIMkkA2tPqMsFQzxqAnWuIO+Uj+UnHas97ew8EnYZM0+NDpF0IBQ3/sVJ400 yT+mlAP4DL367BrD86GXqx0qi6oQWRda6NYhk1IsIsk4qKonF4kyuR0p88O+zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f971e791391d9f7ff6bfd7d7e0bed93267216329 commit f971e791391d9f7ff6bfd7d7e0bed93267216329 Author: Gleb Smirnoff AuthorDate: 2021-12-02 18:48:48 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-02 18:48:48 +0000 tcp_hpts: rename input queue to drop queue and trim dead code The HPTS input queue is in reality used only for "delayed drops". When a TCP stack decides to drop a connection on the output path it can't do that due to locking protocol between main tcp_output() and stacks. So, rack/bbr utilize HPTS to drop the connection in a different context. In the past the queue could also process input packets in context of HPTS thread, but now no stack uses this, so remove this functionality. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33025 --- sys/netinet/in_pcb.c | 6 +- sys/netinet/in_pcb.h | 18 +-- sys/netinet/tcp_hpts.c | 342 ++++++++++++++++-------------------------- sys/netinet/tcp_hpts.h | 7 +- sys/netinet/tcp_lro.c | 2 +- sys/netinet/tcp_stacks/bbr.c | 2 +- sys/netinet/tcp_stacks/rack.c | 30 ++-- sys/netinet/tcp_subr.c | 2 +- 8 files changed, 163 insertions(+), 246 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index ac8c0d3e368a..081d204f559c 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -629,7 +629,7 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo) * If using hpts lets drop a random number in so * not all new connections fall on the same CPU. */ - inp->inp_hpts_cpu = inp->inp_input_cpu = hpts_random_cpu(inp); + inp->inp_hpts_cpu = inp->inp_dropq_cpu = hpts_random_cpu(inp); #endif refcount_init(&inp->inp_refcount, 1); /* Reference from socket. */ INP_WLOCK(inp); @@ -1760,7 +1760,7 @@ in_pcbrele_rlocked(struct inpcb *inp) MPASS(inp->inp_flags & INP_FREED); MPASS(inp->inp_socket == NULL); MPASS(inp->inp_in_hpts == 0); - MPASS(inp->inp_in_input == 0); + MPASS(inp->inp_in_dropq == 0); INP_RUNLOCK(inp); uma_zfree_smr(inp->inp_pcbinfo->ipi_zone, inp); return (true); @@ -1778,7 +1778,7 @@ in_pcbrele_wlocked(struct inpcb *inp) MPASS(inp->inp_flags & INP_FREED); MPASS(inp->inp_socket == NULL); MPASS(inp->inp_in_hpts == 0); - MPASS(inp->inp_in_input == 0); + MPASS(inp->inp_in_dropq == 0); INP_WUNLOCK(inp); uma_zfree_smr(inp->inp_pcbinfo->ipi_zone, inp); return (true); diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 305356914d14..3e89ba9ee90f 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -234,22 +234,21 @@ struct inpcb { * fields can *not* be collapsed into a signal bit field. */ #if defined(__amd64__) || defined(__i386__) - volatile uint8_t inp_in_hpts; /* on output hpts (lock b) */ - volatile uint8_t inp_in_input; /* on input hpts (lock b) */ + uint8_t inp_in_hpts; /* on output hpts (lock b) */ + uint8_t inp_in_dropq; /* on input hpts (lock b) */ #else - volatile uint32_t inp_in_hpts; /* on output hpts (lock b) */ - volatile uint32_t inp_in_input; /* on input hpts (lock b) */ + uint32_t inp_in_hpts; /* on output hpts (lock b) */ + uint32_t inp_in_dropq; /* on input hpts (lock b) */ #endif volatile uint16_t inp_hpts_cpu; /* Lock (i) */ volatile uint16_t inp_irq_cpu; /* Set by LRO in behalf of or the driver */ u_int inp_refcount; /* (i) refcount */ int inp_flags; /* (i) generic IP/datagram flags */ int inp_flags2; /* (i) generic IP/datagram flags #2*/ - volatile uint16_t inp_input_cpu; /* Lock (i) */ - volatile uint8_t inp_hpts_cpu_set :1, /* on output hpts (i) */ - inp_input_cpu_set : 1, /* on input hpts (i) */ + uint16_t inp_dropq_cpu; /* Lock (i) */ + uint8_t inp_hpts_cpu_set :1, /* on output hpts (i) */ + inp_dropq_cpu_set : 1, /* on input hpts (i) */ inp_hpts_calls :1, /* (i) from output hpts */ - inp_input_calls :1, /* (i) from input hpts */ inp_irq_cpu_set :1, /* (i) from LRO/Driver */ inp_spare_bits2 : 3; uint8_t inp_numa_domain; /* numa domain */ @@ -257,7 +256,8 @@ struct inpcb { struct socket *inp_socket; /* (i) back pointer to socket */ uint32_t inp_hptsslot; /* Hpts wheel slot this tcb is Lock(i&b) */ uint32_t inp_hpts_drop_reas; /* reason we are dropping the PCB (lock i&b) */ - TAILQ_ENTRY(inpcb) inp_input; /* pacing in queue next lock(b) */ + uint32_t inp_dropq_gencnt; + TAILQ_ENTRY(inpcb) inp_dropq; /* hpts drop queue next lock(b) */ struct inpcbinfo *inp_pcbinfo; /* (c) PCB list info */ struct ucred *inp_cred; /* (c) cache of socket cred */ u_int32_t inp_flow; /* (i) IPv6 flow information */ diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 237452932ca3..a620be4b3e30 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -62,15 +62,7 @@ __FBSDID("$FreeBSD$"); * Of course this is a bare bones example and the stack will probably * have more consideration then just the above. * - * Now the second function (actually two functions I guess :D) - * the tcp_hpts system provides is the ability to either abort - * a connection (later) or process input on a connection. - * Why would you want to do this? To keep processor locality - * and or not have to worry about untangling any recursive - * locks. The input function now is hooked to the new LRO - * system as well. - * - * In order to use the input redirection function the + * In order to run input queued segments from the HPTS context the * tcp stack must define an input function for * tfb_do_queued_segments(). This function understands * how to dequeue a array of packets that were input and @@ -109,6 +101,10 @@ __FBSDID("$FreeBSD$"); * you have defined the tfb_do_segment_nounlock() as * described above. * + * Now the second function the tcp_hpts system provides is the ability + * to abort a connection later. Why would you want to do this? + * To not have to worry about untangling any recursive locks. + * * The second feature of the input side of hpts is the * dropping of a connection. This is due to the way that * locking may have occured on the INP_WLOCK. So if @@ -202,6 +198,8 @@ __FBSDID("$FreeBSD$"); /* Each hpts has its own p_mtx which is used for locking */ #define HPTS_MTX_ASSERT(hpts) mtx_assert(&(hpts)->p_mtx, MA_OWNED) +#define HPTS_LOCK(hpts) mtx_lock(&(hpts)->p_mtx) +#define HPTS_UNLOCK(hpts) mtx_unlock(&(hpts)->p_mtx) TAILQ_HEAD(hptsh, inpcb); struct tcp_hpts_entry { /* Cache line 0x00 */ @@ -226,10 +224,11 @@ struct tcp_hpts_entry { uint8_t p_fill[3]; /* Fill to 32 bits */ /* Cache line 0x40 */ void *p_inp; - struct hptsh p_input; /* For the tcp-input runner */ + TAILQ_HEAD(, inpcb) p_dropq; /* Delayed drop queue */ /* Hptsi wheel */ struct hptsh *p_hptss; - int32_t p_on_inqueue_cnt; /* Count on input queue in this hpts */ + uint32_t p_dropq_cnt; /* Count on drop queue */ + uint32_t p_dropq_gencnt; uint32_t p_hpts_sleep_time; /* Current sleep interval having a max * of 255ms */ uint32_t overidden_sleep; /* what was overrided by min-sleep for logging */ @@ -270,7 +269,6 @@ static int hpts_does_tp_logging = 0; static int hpts_use_assigned_cpu = 1; static int32_t hpts_uses_oldest = OLDEST_THRESHOLD; -static void tcp_input_data(struct tcp_hpts_entry *hpts, struct timeval *tv); static int32_t tcp_hptsi(struct tcp_hpts_entry *hpts, int from_callout); static void tcp_hpts_thread(void *ctx); static void tcp_init_hptsi(void *st); @@ -558,41 +556,6 @@ hpts_sane_pace_insert(struct tcp_hpts_entry *hpts, struct inpcb *inp, struct hpt } } -static inline void -hpts_sane_input_remove(struct tcp_hpts_entry *hpts, struct inpcb *inp, int clear) -{ - HPTS_MTX_ASSERT(hpts); - KASSERT(hpts->p_cpu == inp->inp_hpts_cpu, - ("%s: hpts:%p inp:%p incorrect CPU", __FUNCTION__, hpts, inp)); - KASSERT(inp->inp_in_input != 0, - ("%s: hpts:%p inp:%p not on the input hpts?", __FUNCTION__, hpts, inp)); - TAILQ_REMOVE(&hpts->p_input, inp, inp_input); - hpts->p_on_inqueue_cnt--; - KASSERT(hpts->p_on_inqueue_cnt >= 0, - ("Hpts in goes negative inp:%p hpts:%p", - inp, hpts)); - KASSERT((((TAILQ_EMPTY(&hpts->p_input) != 0) && (hpts->p_on_inqueue_cnt == 0)) || - ((TAILQ_EMPTY(&hpts->p_input) == 0) && (hpts->p_on_inqueue_cnt > 0))), - ("%s hpts:%p input cnt (p_on_inqueue):%d and queue state mismatch", - __FUNCTION__, hpts, hpts->p_on_inqueue_cnt)); - if (clear) - inp->inp_in_input = 0; -} - -static inline void -hpts_sane_input_insert(struct tcp_hpts_entry *hpts, struct inpcb *inp, int line) -{ - HPTS_MTX_ASSERT(hpts); - KASSERT(hpts->p_cpu == inp->inp_hpts_cpu, - ("%s: hpts:%p inp:%p incorrect CPU", __FUNCTION__, hpts, inp)); - KASSERT(inp->inp_in_input == 0, - ("%s: hpts:%p inp:%p already on the input hpts?", __FUNCTION__, hpts, inp)); - TAILQ_INSERT_TAIL(&hpts->p_input, inp, inp_input); - inp->inp_in_input = 1; - hpts->p_on_inqueue_cnt++; - in_pcbref(inp); -} - static struct tcp_hpts_entry * tcp_hpts_lock(struct inpcb *inp) { @@ -614,19 +577,19 @@ again: } static struct tcp_hpts_entry * -tcp_input_lock(struct inpcb *inp) +tcp_dropq_lock(struct inpcb *inp) { struct tcp_hpts_entry *hpts; int32_t hpts_num; again: - hpts_num = inp->inp_input_cpu; + hpts_num = inp->inp_dropq_cpu; hpts = tcp_pace.rp_ent[hpts_num]; KASSERT(mtx_owned(&hpts->p_mtx) == 0, ("Hpts:%p owns mtx prior-to lock line:%d", hpts, __LINE__)); mtx_lock(&hpts->p_mtx); - if (hpts_num != inp->inp_input_cpu) { + if (hpts_num != inp->inp_dropq_cpu) { mtx_unlock(&hpts->p_mtx); goto again; } @@ -652,13 +615,38 @@ tcp_hpts_remove_locked_output(struct tcp_hpts_entry *hpts, struct inpcb *inp, in } static void -tcp_hpts_remove_locked_input(struct tcp_hpts_entry *hpts, struct inpcb *inp, int32_t flags, int32_t line) +tcp_dropq_remove(struct tcp_hpts_entry *hpts, struct inpcb *inp) { + bool released __diagused; + HPTS_MTX_ASSERT(hpts); - if (inp->inp_in_input) { - hpts_sane_input_remove(hpts, inp, 1); - tcp_remove_hpts_ref(inp, hpts, line); + INP_WLOCK_ASSERT(inp); + + if (inp->inp_in_dropq != IHPTS_ONQUEUE) + return; + + MPASS(hpts->p_cpu == inp->inp_dropq_cpu); + if (__predict_true(inp->inp_dropq_gencnt == hpts->p_dropq_gencnt)) { + TAILQ_REMOVE(&hpts->p_dropq, inp, inp_dropq); + MPASS(hpts->p_dropq_cnt > 0); + hpts->p_dropq_cnt--; + inp->inp_in_dropq = IHPTS_NONE; + released = in_pcbrele_wlocked(inp); + MPASS(released == false); + } else { + /* + * tcp_delayed_drop() now owns the TAILQ head of this inp. + * Can't TAILQ_REMOVE, just mark it. + */ +#ifdef INVARIANTS + struct inpcb *tmp; + + TAILQ_FOREACH(tmp, &hpts->p_dropq, inp_dropq) + MPASS(tmp != inp); +#endif + inp->inp_in_dropq = IHPTS_MOVING; } + } /* @@ -669,7 +657,7 @@ tcp_hpts_remove_locked_input(struct tcp_hpts_entry *hpts, struct inpcb *inp, int * * Valid values in the flags are * HPTS_REMOVE_OUTPUT - remove from the output of the hpts. - * HPTS_REMOVE_INPUT - remove from the input of the hpts. + * HPTS_REMOVE_DROPQ - remove from the drop queue of the hpts. * Note that you can use one or both values together * and get two actions. */ @@ -684,9 +672,9 @@ __tcp_hpts_remove(struct inpcb *inp, int32_t flags, int32_t line) tcp_hpts_remove_locked_output(hpts, inp, flags, line); mtx_unlock(&hpts->p_mtx); } - if (flags & HPTS_REMOVE_INPUT) { - hpts = tcp_input_lock(inp); - tcp_hpts_remove_locked_input(hpts, inp, flags, line); + if (flags & HPTS_REMOVE_DROPQ) { + hpts = tcp_dropq_lock(inp); + tcp_dropq_remove(hpts, inp); mtx_unlock(&hpts->p_mtx); } } @@ -1097,31 +1085,29 @@ __tcp_hpts_insert(struct inpcb *inp, uint32_t slot, int32_t line){ } void -__tcp_set_inp_to_drop(struct inpcb *inp, uint16_t reason, int32_t line) +tcp_set_inp_to_drop(struct inpcb *inp, uint16_t reason) { struct tcp_hpts_entry *hpts; - struct tcpcb *tp; + struct tcpcb *tp = intotcpcb(inp); - tp = intotcpcb(inp); - hpts = tcp_input_lock(tp->t_inpcb); - if (inp->inp_in_input == 0) { - /* Ok we need to set it on the hpts in the current slot */ - hpts_sane_input_insert(hpts, inp, line); - if ((hpts->p_hpts_active == 0) && - (hpts->p_on_min_sleep == 0)){ - /* - * Activate the hpts if it is sleeping. - */ - hpts->p_direct_wake = 1; - tcp_wakehpts(hpts); - } - } else if ((hpts->p_hpts_active == 0) && - (hpts->p_on_min_sleep == 0)){ + INP_WLOCK_ASSERT(inp); + inp->inp_hpts_drop_reas = reason; + if (inp->inp_in_dropq != IHPTS_NONE) + return; + hpts = tcp_dropq_lock(tp->t_inpcb); + MPASS(hpts->p_cpu == inp->inp_dropq_cpu); + + TAILQ_INSERT_TAIL(&hpts->p_dropq, inp, inp_dropq); + inp->inp_in_dropq = IHPTS_ONQUEUE; + inp->inp_dropq_gencnt = hpts->p_dropq_gencnt; + hpts->p_dropq_cnt++; + in_pcbref(inp); + + if ((hpts->p_hpts_active == 0) && (hpts->p_on_min_sleep == 0)){ hpts->p_direct_wake = 1; tcp_wakehpts(hpts); } - inp->inp_hpts_drop_reas = reason; - mtx_unlock(&hpts->p_mtx); + HPTS_UNLOCK(hpts); } static uint16_t @@ -1136,8 +1122,8 @@ hpts_random_cpu(struct inpcb *inp){ * If one has been set use it i.e. we want both in and out on the * same hpts. */ - if (inp->inp_input_cpu_set) { - return (inp->inp_input_cpu); + if (inp->inp_dropq_cpu_set) { + return (inp->inp_dropq_cpu); } else if (inp->inp_hpts_cpu_set) { return (inp->inp_hpts_cpu); } @@ -1160,8 +1146,8 @@ hpts_cpuid(struct inpcb *inp, int *failed) * If one has been set use it i.e. we want both in and out on the * same hpts. */ - if (inp->inp_input_cpu_set) { - return (inp->inp_input_cpu); + if (inp->inp_dropq_cpu_set) { + return (inp->inp_dropq_cpu); } else if (inp->inp_hpts_cpu_set) { return (inp->inp_hpts_cpu); } @@ -1249,117 +1235,50 @@ tcp_drop_in_pkts(struct tcpcb *tp) * list. */ static void -tcp_input_data(struct tcp_hpts_entry *hpts, struct timeval *tv) +tcp_delayed_drop(struct tcp_hpts_entry *hpts) { + TAILQ_HEAD(, inpcb) head = TAILQ_HEAD_INITIALIZER(head); + struct inpcb *inp, *tmp; struct tcpcb *tp; - struct inpcb *inp; - uint16_t drop_reason; - int16_t set_cpu; - uint32_t did_prefetch = 0; - int dropped; HPTS_MTX_ASSERT(hpts); NET_EPOCH_ASSERT(); - while ((inp = TAILQ_FIRST(&hpts->p_input)) != NULL) { - HPTS_MTX_ASSERT(hpts); - hpts_sane_input_remove(hpts, inp, 0); - if (inp->inp_input_cpu_set == 0) { - set_cpu = 1; - } else { - set_cpu = 0; - } - hpts->p_inp = inp; - drop_reason = inp->inp_hpts_drop_reas; - inp->inp_in_input = 0; - mtx_unlock(&hpts->p_mtx); + TAILQ_SWAP(&head, &hpts->p_dropq, inpcb, inp_dropq); + hpts->p_dropq_cnt = 0; + hpts->p_dropq_gencnt++; + HPTS_UNLOCK(hpts); + + TAILQ_FOREACH_SAFE(inp, &head, inp_dropq, tmp) { INP_WLOCK(inp); -#ifdef VIMAGE - CURVNET_SET(inp->inp_vnet); -#endif - if ((inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED))) { -out: - hpts->p_inp = NULL; - if (in_pcbrele_wlocked(inp) == 0) { + MPASS(inp->inp_hpts_drop_reas != 0); + if (__predict_false(inp->inp_in_dropq == IHPTS_MOVING)) { + inp->inp_in_dropq = IHPTS_NONE; + if (in_pcbrele_wlocked(inp) == false) INP_WUNLOCK(inp); - } -#ifdef VIMAGE - CURVNET_RESTORE(); -#endif - mtx_lock(&hpts->p_mtx); continue; } - tp = intotcpcb(inp); - if ((tp == NULL) || (tp->t_inpcb == NULL)) { - goto out; - } - if (drop_reason) { - /* This tcb is being destroyed for drop_reason */ - tcp_drop_in_pkts(tp); - tp = tcp_drop(tp, drop_reason); - if (tp == NULL) { - INP_WLOCK(inp); - } - if (in_pcbrele_wlocked(inp) == 0) + MPASS(inp->inp_in_dropq == IHPTS_ONQUEUE); + inp->inp_in_dropq = IHPTS_NONE; + if ((inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED))) { + if (in_pcbrele_wlocked(inp) == false) INP_WUNLOCK(inp); -#ifdef VIMAGE - CURVNET_RESTORE(); -#endif - mtx_lock(&hpts->p_mtx); continue; } - if (set_cpu) { - /* - * Setup so the next time we will move to the right - * CPU. This should be a rare event. It will - * sometimes happens when we are the client side - * (usually not the server). Somehow tcp_output() - * gets called before the tcp_do_segment() sets the - * intial state. This means the r_cpu and r_hpts_cpu - * is 0. We get on the hpts, and then tcp_input() - * gets called setting up the r_cpu to the correct - * value. The hpts goes off and sees the mis-match. - * We simply correct it here and the CPU will switch - * to the new hpts nextime the tcb gets added to the - * the hpts (not this time) :-) - */ - tcp_set_hpts(inp); - } - if (tp->t_fb_ptr != NULL) { - kern_prefetch(tp->t_fb_ptr, &did_prefetch); - did_prefetch = 1; - } - if ((tp->t_fb->tfb_do_queued_segments != NULL) && tp->t_in_pkt) { - if (inp->inp_in_input) - tcp_hpts_remove(inp, HPTS_REMOVE_INPUT); - dropped = (*tp->t_fb->tfb_do_queued_segments)(inp->inp_socket, tp, 0); - if (dropped) { - /* Re-acquire the wlock so we can release the reference */ - INP_WLOCK(inp); - } - } else if (tp->t_in_pkt) { - /* - * We reach here only if we had a - * stack that supported INP_SUPPORTS_MBUFQ - * and then somehow switched to a stack that - * does not. The packets are basically stranded - * and would hang with the connection until - * cleanup without this code. Its not the - * best way but I know of no other way to - * handle it since the stack needs functions - * it does not have to handle queued packets. - */ + CURVNET_SET(inp->inp_vnet); + if (__predict_true((tp = intotcpcb(inp)) != NULL)) { + MPASS(tp->t_inpcb == inp); tcp_drop_in_pkts(tp); + tp = tcp_drop(tp, inp->inp_hpts_drop_reas); + if (tp == NULL) + INP_WLOCK(inp); } - if (in_pcbrele_wlocked(inp) == 0) + if (in_pcbrele_wlocked(inp) == false) INP_WUNLOCK(inp); - INP_UNLOCK_ASSERT(inp); -#ifdef VIMAGE CURVNET_RESTORE(); -#endif - mtx_lock(&hpts->p_mtx); - hpts->p_inp = NULL; } + + mtx_lock(&hpts->p_mtx); /* XXXGL */ } static void @@ -1489,10 +1408,10 @@ again: hpts->p_nxt_slot = hpts->p_prev_slot; hpts->p_runningslot = hpts_slot(hpts->p_prev_slot, 1); } - KASSERT((((TAILQ_EMPTY(&hpts->p_input) != 0) && (hpts->p_on_inqueue_cnt == 0)) || - ((TAILQ_EMPTY(&hpts->p_input) == 0) && (hpts->p_on_inqueue_cnt > 0))), + KASSERT((((TAILQ_EMPTY(&hpts->p_dropq) != 0) && (hpts->p_dropq_cnt == 0)) || + ((TAILQ_EMPTY(&hpts->p_dropq) == 0) && (hpts->p_dropq_cnt > 0))), ("%s hpts:%p in_hpts cnt:%d and queue state mismatch", - __FUNCTION__, hpts, hpts->p_on_inqueue_cnt)); + __FUNCTION__, hpts, hpts->p_dropq_cnt)); HPTS_MTX_ASSERT(hpts); if (hpts->p_on_queue_cnt == 0) { goto no_one; @@ -1716,10 +1635,10 @@ no_one: * Check to see if we took an excess amount of time and need to run * more ticks (if we did not hit eno-bufs). */ - KASSERT((((TAILQ_EMPTY(&hpts->p_input) != 0) && (hpts->p_on_inqueue_cnt == 0)) || - ((TAILQ_EMPTY(&hpts->p_input) == 0) && (hpts->p_on_inqueue_cnt > 0))), + KASSERT((((TAILQ_EMPTY(&hpts->p_dropq) != 0) && (hpts->p_dropq_cnt == 0)) || + ((TAILQ_EMPTY(&hpts->p_dropq) == 0) && (hpts->p_dropq_cnt > 0))), ("%s hpts:%p in_hpts cnt:%d queue state mismatch", - __FUNCTION__, hpts, hpts->p_on_inqueue_cnt)); + __FUNCTION__, hpts, hpts->p_dropq_cnt)); hpts->p_prev_slot = hpts->p_cur_slot; hpts->p_lasttick = hpts->p_curtick; if ((from_callout == 0) || (loop_cnt > max_pacer_loops)) { @@ -1765,31 +1684,30 @@ no_run: * Run any input that may be there not covered * in running data. */ - if (!TAILQ_EMPTY(&hpts->p_input)) { - tcp_input_data(hpts, &tv); - /* - * Now did we spend too long running input and need to run more ticks? - * Note that if wrap_loop_cnt < 2 then we should have the conditions - * in the KASSERT's true. But if the wheel is behind i.e. wrap_loop_cnt - * is greater than 2, then the condtion most likely are *not* true. Also - * if we are called not from the callout, we don't run the wheel multiple - * times so the slots may not align either. - */ - KASSERT(((hpts->p_prev_slot == hpts->p_cur_slot) || - (wrap_loop_cnt >= 2) || (from_callout == 0)), - ("H:%p p_prev_slot:%u not equal to p_cur_slot:%u", hpts, - hpts->p_prev_slot, hpts->p_cur_slot)); - KASSERT(((hpts->p_lasttick == hpts->p_curtick) - || (wrap_loop_cnt >= 2) || (from_callout == 0)), - ("H:%p p_lasttick:%u not equal to p_curtick:%u", hpts, - hpts->p_lasttick, hpts->p_curtick)); - if (from_callout && (hpts->p_lasttick != hpts->p_curtick)) { - hpts->p_curtick = tcp_gethptstick(&tv); - counter_u64_add(hpts_loops, 1); - hpts->p_cur_slot = tick_to_wheel(hpts->p_curtick); - goto again; - } + tcp_delayed_drop(hpts); + /* + * Now did we spend too long running input and need to run more ticks? + * Note that if wrap_loop_cnt < 2 then we should have the conditions + * in the KASSERT's true. But if the wheel is behind i.e. wrap_loop_cnt + * is greater than 2, then the condtion most likely are *not* true. + * Also if we are called not from the callout, we don't run the wheel + * multiple times so the slots may not align either. + */ + KASSERT(((hpts->p_prev_slot == hpts->p_cur_slot) || + (wrap_loop_cnt >= 2) || (from_callout == 0)), + ("H:%p p_prev_slot:%u not equal to p_cur_slot:%u", hpts, + hpts->p_prev_slot, hpts->p_cur_slot)); + KASSERT(((hpts->p_lasttick == hpts->p_curtick) + || (wrap_loop_cnt >= 2) || (from_callout == 0)), + ("H:%p p_lasttick:%u not equal to p_curtick:%u", hpts, + hpts->p_lasttick, hpts->p_curtick)); + if (from_callout && (hpts->p_lasttick != hpts->p_curtick)) { + hpts->p_curtick = tcp_gethptstick(&tv); + counter_u64_add(hpts_loops, 1); + hpts->p_cur_slot = tick_to_wheel(hpts->p_curtick); + goto again; } + if (from_callout){ tcp_hpts_set_max_sleep(hpts, wrap_loop_cnt); } @@ -1814,12 +1732,12 @@ __tcp_set_hpts(struct inpcb *inp, int32_t line) inp->inp_hpts_cpu_set = 1; } mtx_unlock(&hpts->p_mtx); - hpts = tcp_input_lock(inp); - if ((inp->inp_input_cpu_set == 0) && - (inp->inp_in_input == 0)) { - inp->inp_input_cpu = hpts_cpuid(inp, &failed); + hpts = tcp_dropq_lock(inp); + if ((inp->inp_dropq_cpu_set == 0) && + (inp->inp_in_dropq == 0)) { + inp->inp_dropq_cpu = hpts_cpuid(inp, &failed); if (failed == 0) - inp->inp_input_cpu_set = 1; + inp->inp_dropq_cpu_set = 1; } mtx_unlock(&hpts->p_mtx); } @@ -2140,7 +2058,7 @@ tcp_init_hptsi(void *st) */ mtx_init(&hpts->p_mtx, "tcp_hpts_lck", "hpts", MTX_DEF | MTX_DUPOK); - TAILQ_INIT(&hpts->p_input); + TAILQ_INIT(&hpts->p_dropq); for (j = 0; j < NUM_OF_HPTSI_SLOTS; j++) { TAILQ_INIT(&hpts->p_hptss[j]); } @@ -2155,8 +2073,8 @@ tcp_init_hptsi(void *st) SYSCTL_ADD_INT(&hpts->hpts_ctx, SYSCTL_CHILDREN(hpts->hpts_root), OID_AUTO, "in_qcnt", CTLFLAG_RD, - &hpts->p_on_inqueue_cnt, 0, - "Count TCB's awaiting input processing"); + &hpts->p_dropq_cnt, 0, + "Count TCB's awaiting delayed drop"); SYSCTL_ADD_INT(&hpts->hpts_ctx, SYSCTL_CHILDREN(hpts->hpts_root), OID_AUTO, "out_qcnt", CTLFLAG_RD, diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h index 4b0fca566c3f..2f3cffe0b798 100644 --- a/sys/netinet/tcp_hpts.h +++ b/sys/netinet/tcp_hpts.h @@ -116,9 +116,9 @@ struct hpts_diag { #ifdef _KERNEL #define tcp_hpts_remove(a, b) __tcp_hpts_remove(a, b, __LINE__) void __tcp_hpts_remove(struct inpcb *inp, int32_t flags, int32_t line); -#define HPTS_REMOVE_INPUT 0x01 +#define HPTS_REMOVE_DROPQ 0x01 #define HPTS_REMOVE_OUTPUT 0x02 -#define HPTS_REMOVE_ALL (HPTS_REMOVE_INPUT | HPTS_REMOVE_OUTPUT) +#define HPTS_REMOVE_ALL (HPTS_REMOVE_DROPQ | HPTS_REMOVE_OUTPUT) static inline bool tcp_in_hpts(struct inpcb *inp) @@ -160,8 +160,7 @@ tcp_hpts_insert_diag(struct inpcb *inp, uint32_t slot, int32_t line, struct hpts void __tcp_set_hpts(struct inpcb *inp, int32_t line); #define tcp_set_hpts(a) __tcp_set_hpts(a, __LINE__) -void __tcp_set_inp_to_drop(struct inpcb *inp, uint16_t reason, int32_t line); -#define tcp_set_inp_to_drop(a, b) __tcp_set_inp_to_drop(a, b, __LINE__) +void tcp_set_inp_to_drop(struct inpcb *inp, uint16_t reason); void tcp_run_hpts(void); diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index 0357056da1b1..215b9097a4fd 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -1354,7 +1354,7 @@ tcp_lro_flush_tcphpts(struct lro_ctrl *lc, struct lro_entry *le) if (le->m_head != NULL) { counter_u64_add(tcp_inp_lro_direct_queue, 1); tcp_lro_log(tp, lc, le, NULL, 22, 1, - inp->inp_flags2, inp->inp_in_input, 1); + inp->inp_flags2, inp->inp_in_dropq, 1); tcp_queue_pkts(inp, tp, le); } if (should_wake) { diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 74a9fada9174..24d238bbd04e 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -1884,7 +1884,7 @@ bbr_fill_in_logging_data(struct tcp_bbr *bbr, struct tcp_log_bbr *l, uint32_t ct l->pacing_gain = bbr->r_ctl.rc_bbr_hptsi_gain; l->cwnd_gain = bbr->r_ctl.rc_bbr_cwnd_gain; l->inhpts = tcp_in_hpts(bbr->rc_inp); - l->ininput = bbr->rc_inp->inp_in_input; + l->ininput = bbr->rc_inp->inp_in_dropq; l->use_lt_bw = bbr->rc_lt_use_bw; l->pkts_out = bbr->r_ctl.rc_flight_at_input; l->pkt_epoch = bbr->r_ctl.rc_pkt_epoch; diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 5a4849566cf9..7391734a9786 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -2295,7 +2295,7 @@ rack_log_retran_reason(struct tcp_rack *rack, struct rack_sendmap *rsm, uint32_t log.u_bbr.flex6 = rsm->r_end; log.u_bbr.flex8 = mod; log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked); log.u_bbr.pkts_out = rack->r_ctl.rc_out_at_rto; @@ -2330,7 +2330,7 @@ rack_log_to_start(struct tcp_rack *rack, uint32_t cts, uint32_t to, int32_t slot else log.u_bbr.pkts_out = rack->r_ctl.rc_prr_sndcnt; log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked); log.u_bbr.pkts_out = rack->r_ctl.rc_out_at_rto; @@ -2355,7 +2355,7 @@ rack_log_to_event(struct tcp_rack *rack, int32_t to_num, struct rack_sendmap *rs memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; log.u_bbr.flex8 = to_num; log.u_bbr.flex1 = rack->r_ctl.rc_rack_min_rtt; log.u_bbr.flex2 = rack->rc_rack_rtt; @@ -2394,7 +2394,7 @@ rack_log_map_chg(struct tcpcb *tp, struct tcp_rack *rack, memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.flex8 = flag; log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; log.u_bbr.cur_del_rate = (uint64_t)prev; log.u_bbr.delRate = (uint64_t)rsm; log.u_bbr.rttProp = (uint64_t)next; @@ -2439,7 +2439,7 @@ rack_log_rtt_upd(struct tcpcb *tp, struct tcp_rack *rack, uint32_t t, uint32_t l struct timeval tv; memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; log.u_bbr.flex1 = t; log.u_bbr.flex2 = len; log.u_bbr.flex3 = rack->r_ctl.rc_rack_min_rtt; @@ -2589,7 +2589,7 @@ rack_log_progress_event(struct tcp_rack *rack, struct tcpcb *tp, uint32_t tick, memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; log.u_bbr.flex1 = line; log.u_bbr.flex2 = tick; log.u_bbr.flex3 = tp->t_maxunacktime; @@ -2616,7 +2616,7 @@ rack_log_type_bbrsnd(struct tcp_rack *rack, uint32_t len, uint32_t slot, uint32_ memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; log.u_bbr.flex1 = slot; if (rack->rack_no_prr) log.u_bbr.flex2 = 0; @@ -2718,7 +2718,7 @@ rack_log_type_just_return(struct tcp_rack *rack, uint32_t cts, uint32_t tlen, ui memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; log.u_bbr.flex1 = slot; log.u_bbr.flex2 = rack->r_ctl.rc_hpts_flags; log.u_bbr.flex4 = reason; @@ -2751,7 +2751,7 @@ rack_log_to_cancel(struct tcp_rack *rack, int32_t hpts_removed, int line, uint32 memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; log.u_bbr.flex1 = line; log.u_bbr.flex2 = rack->r_ctl.rc_last_output_to; log.u_bbr.flex3 = flags_on_entry; @@ -13329,7 +13329,7 @@ rack_log_input_packet(struct tcpcb *tp, struct tcp_rack *rack, struct tcp_ackent #endif memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; if (rack->rack_no_prr == 0) log.u_bbr.flex1 = rack->r_ctl.rc_prr_sndcnt; else @@ -14321,7 +14321,7 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, #endif memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; if (rack->rack_no_prr == 0) log.u_bbr.flex1 = rack->r_ctl.rc_prr_sndcnt; else @@ -15612,7 +15612,7 @@ rack_log_fsb(struct tcp_rack *rack, struct tcpcb *tp, struct socket *so, uint32_ memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; log.u_bbr.flex1 = error; log.u_bbr.flex2 = flags; log.u_bbr.flex3 = rsm_is_null; @@ -16128,7 +16128,7 @@ rack_fast_rsm_output(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendma memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; if (rack->rack_no_prr) log.u_bbr.flex1 = 0; else @@ -16629,7 +16629,7 @@ again: memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; if (rack->rack_no_prr) log.u_bbr.flex1 = 0; else @@ -18801,7 +18801,7 @@ send: memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tcp_in_hpts(rack->rc_inp); - log.u_bbr.ininput = rack->rc_inp->inp_in_input; + log.u_bbr.ininput = rack->rc_inp->inp_in_dropq; if (rack->rack_no_prr) log.u_bbr.flex1 = 0; else diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 47fa8656a51d..20591e4006b9 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2096,7 +2096,7 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.inhpts = tp->t_inpcb->inp_in_hpts; - log.u_bbr.ininput = tp->t_inpcb->inp_in_input; + log.u_bbr.ininput = tp->t_inpcb->inp_in_dropq; log.u_bbr.flex8 = 4; log.u_bbr.pkts_out = tp->t_maxseg; log.u_bbr.timeStamp = tcp_get_usecs(&tv); From nobody Thu Dec 2 18:49:11 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C0F4918A956D; Thu, 2 Dec 2021 18:49: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 4J4lNm300Rz3rGJ; Thu, 2 Dec 2021 18:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5123C221CB; Thu, 2 Dec 2021 18:49: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 1B2InBun069028; Thu, 2 Dec 2021 18:49:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2InBOU069027; Thu, 2 Dec 2021 18:49:11 GMT (envelope-from git) Date: Thu, 2 Dec 2021 18:49:11 GMT Message-Id: <202112021849.1B2InBOU069027@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: 2e27230ff932 - main - tcp_hpts: rewrite inpcb synchronization List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2e27230ff932fbe76299ce63879fcf579f7dfd4f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638470952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ecV5iR6K5jIYeHqTfidUkN8K1vk8Ju1+VJmm5lfPDTQ=; b=CJahRQ2NfO59bpMJdd4c2HH4sqRMJHQg+a5JQsTm/V/U0zcBk6ojB1MYdFRGR8MsUkdMR1 kXgdYsmxOAY4LA710Tte+usaefqaSRH37Va/USAePNtpiGKSWgzQdffrB2D5/N3rCJytIo wK8z5ZqPKzSokBgKd/HaX4tZT6yEz3gfDTlwxpBXfeIcZCMeNgF7qvMw4hGcTNhdLjhAgp wPHUDh/IfKkwEHO7dmUWKK4p2BB3IhGXx38bVR2Are261HHC3wCQswxKSMYju/sutStf/W PMwOf9hkybpjUBcfaUFrx70625RhX/rDHUtJC+AVFOG/NwUpZ2JOIEW5J5KJbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638470952; a=rsa-sha256; cv=none; b=s/j2eeRJKcV5T13Nj0rzvtbUUxLSO8NfEQkXDOthjgCKGMfY+pXvq0lX+U5qLICRzeIfxg ayyd8v/mbUpPDmKYFtbhCouYHFmSp98n7vQ6nLD2r0B/GrymDWaB1bEubeh/vNXYjThxg8 m3fX38RrAm6AaVuqH2S1u0Pi/z3uh8+eiqJTR1jZz2uNWmU8hsvNo+Q0VYLCluHHbSobzQ R1pLymQUcFAR3puFT1CuV7chR2wZEQECEGZ7kb5Qe7m18xuONA8dvz5TDe0i/JFZ7CnG/j tejunaiKpY/jH1Q8vwmrLqCCHHj94UhPSOsbZxBu/vha050rD8i0jEhF7Wq5hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=2e27230ff932fbe76299ce63879fcf579f7dfd4f commit 2e27230ff932fbe76299ce63879fcf579f7dfd4f Author: Gleb Smirnoff AuthorDate: 2021-12-02 18:48:49 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-02 18:48:49 +0000 tcp_hpts: rewrite inpcb synchronization Just trust the pcb database, that if we did in_pcbref(), no way an inpcb can go away. And if we never put a dropped inpcb on our queue, and tcp_discardcb() always removes an inpcb to be dropped from the queue, then any inpcb on the queue is valid. Now, to solve LOR between inpcb lock and HPTS queue lock do the following trick. When we are about to process a certain time slot, take the full queue of the head list into on stack list, drop the HPTS lock and work on our queue. This of course opens a race when an inpcb is being removed from the on stack queue, which was already mentioned in comments. To address this race introduce generation count into queues. If we want to remove an inpcb with generation count mismatch, we can't do that, we can only mark it with desired new time slot or -1 for remove. Reviewed by: rrs Differential revision: https://reviews.freebsd.org/D33026 --- sys/netinet/in_pcb.h | 4 +- sys/netinet/tcp_hpts.c | 513 ++++++++++++++++++++++----------------------- sys/netinet/tcp_hpts.h | 19 +- sys/netinet/tcp_subr.c | 3 + sys/netinet/tcp_timewait.c | 4 + 5 files changed, 262 insertions(+), 281 deletions(-) diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 3e89ba9ee90f..77dd85241e01 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -221,7 +221,7 @@ struct inpcb { #define inp_zero_size (sizeof(struct inpcb) - \ offsetof(struct inpcb, inp_start_zero)) TAILQ_ENTRY(inpcb) inp_hpts; /* pacing out queue next lock(b) */ - + uint32_t inp_hpts_gencnt; /* XXXGL */ uint32_t inp_hpts_request; /* Current hpts request, zero if * fits in the pacing window (i&b). */ /* @@ -254,7 +254,7 @@ struct inpcb { uint8_t inp_numa_domain; /* numa domain */ void *inp_ppcb; /* (i) pointer to per-protocol pcb */ struct socket *inp_socket; /* (i) back pointer to socket */ - uint32_t inp_hptsslot; /* Hpts wheel slot this tcb is Lock(i&b) */ + int32_t inp_hptsslot; /* Hpts wheel slot this tcb is Lock(i&b) */ uint32_t inp_hpts_drop_reas; /* reason we are dropping the PCB (lock i&b) */ uint32_t inp_dropq_gencnt; TAILQ_ENTRY(inpcb) inp_dropq; /* hpts drop queue next lock(b) */ diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index a620be4b3e30..9bf6e6773cca 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -200,7 +200,6 @@ __FBSDID("$FreeBSD$"); #define HPTS_MTX_ASSERT(hpts) mtx_assert(&(hpts)->p_mtx, MA_OWNED) #define HPTS_LOCK(hpts) mtx_lock(&(hpts)->p_mtx) #define HPTS_UNLOCK(hpts) mtx_unlock(&(hpts)->p_mtx) -TAILQ_HEAD(hptsh, inpcb); struct tcp_hpts_entry { /* Cache line 0x00 */ struct mtx p_mtx; /* Mutex for hpts */ @@ -223,10 +222,12 @@ struct tcp_hpts_entry { p_avail:5; uint8_t p_fill[3]; /* Fill to 32 bits */ /* Cache line 0x40 */ - void *p_inp; TAILQ_HEAD(, inpcb) p_dropq; /* Delayed drop queue */ - /* Hptsi wheel */ - struct hptsh *p_hptss; + struct hptsh { + TAILQ_HEAD(, inpcb) head; + uint32_t count; + uint32_t gencnt; + } *p_hptss; /* Hptsi wheel */ uint32_t p_dropq_cnt; /* Count on drop queue */ uint32_t p_dropq_gencnt; uint32_t p_hpts_sleep_time; /* Current sleep interval having a max @@ -249,12 +250,11 @@ struct tcp_hpts_entry { struct callout co __aligned(CACHE_LINE_SIZE); } __aligned(CACHE_LINE_SIZE); -struct tcp_hptsi { - struct proc *rp_proc; /* Process structure for hpts */ +static struct tcp_hptsi { struct tcp_hpts_entry **rp_ent; /* Array of hptss */ uint32_t *cts_last_ran; uint32_t rp_num_hptss; /* Number of hpts threads */ -}; +} tcp_pace; MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts"); #ifdef RSS @@ -263,7 +263,6 @@ static int tcp_bind_threads = 1; static int tcp_bind_threads = 2; #endif static int tcp_use_irq_cpu = 0; -static struct tcp_hptsi tcp_pace; static uint32_t *cts_last_ran; static int hpts_does_tp_logging = 0; static int hpts_use_assigned_cpu = 1; @@ -302,6 +301,12 @@ static struct hpts_domain_info { int cpu[MAXCPU]; } hpts_domains[MAXMEMDOM]; +enum { + IHPTS_NONE = 0, + IHPTS_ONQUEUE, + IHPTS_MOVING, +}; + counter_u64_t hpts_hopelessly_behind; SYSCTL_COUNTER_U64(_net_inet_tcp_hpts_stats, OID_AUTO, hopeless, CTLFLAG_RD, @@ -521,58 +526,42 @@ hpts_timeout_swi(void *arg) swi_sched(hpts->ie_cookie, 0); } -static inline void -hpts_sane_pace_remove(struct tcp_hpts_entry *hpts, struct inpcb *inp, struct hptsh *head, int clear) +static void +inp_hpts_insert(struct inpcb *inp, struct tcp_hpts_entry *hpts) { - HPTS_MTX_ASSERT(hpts); - KASSERT(hpts->p_cpu == inp->inp_hpts_cpu, ("%s: hpts:%p inp:%p incorrect CPU", __FUNCTION__, hpts, inp)); - KASSERT(inp->inp_in_hpts != 0, ("%s: hpts:%p inp:%p not on the hpts?", __FUNCTION__, hpts, inp)); - TAILQ_REMOVE(head, inp, inp_hpts); - hpts->p_on_queue_cnt--; - KASSERT(hpts->p_on_queue_cnt >= 0, - ("Hpts goes negative inp:%p hpts:%p", - inp, hpts)); - if (clear) { - inp->inp_hpts_request = 0; - inp->inp_in_hpts = 0; - } -} + struct hptsh *hptsh; -static inline void -hpts_sane_pace_insert(struct tcp_hpts_entry *hpts, struct inpcb *inp, struct hptsh *head, int line, int noref) -{ + INP_WLOCK_ASSERT(inp); HPTS_MTX_ASSERT(hpts); - KASSERT(hpts->p_cpu == inp->inp_hpts_cpu, - ("%s: hpts:%p inp:%p incorrect CPU", __FUNCTION__, hpts, inp)); - KASSERT(((noref == 1) && (inp->inp_in_hpts == 1)) || - ((noref == 0) && (inp->inp_in_hpts == 0)), - ("%s: hpts:%p inp:%p already on the hpts?", - __FUNCTION__, hpts, inp)); - TAILQ_INSERT_TAIL(head, inp, inp_hpts); - inp->inp_in_hpts = 1; - hpts->p_on_queue_cnt++; - if (noref == 0) { + MPASS(hpts->p_cpu == inp->inp_hpts_cpu); + MPASS(!(inp->inp_flags & (INP_DROPPED|INP_TIMEWAIT))); + + hptsh = &hpts->p_hptss[inp->inp_hptsslot]; + + if (inp->inp_in_hpts == IHPTS_NONE) { + inp->inp_in_hpts = IHPTS_ONQUEUE; in_pcbref(inp); - } + } else if (inp->inp_in_hpts == IHPTS_MOVING) { + inp->inp_in_hpts = IHPTS_ONQUEUE; + } else + MPASS(inp->inp_in_hpts == IHPTS_ONQUEUE); + inp->inp_hpts_gencnt = hptsh->gencnt; + + TAILQ_INSERT_TAIL(&hptsh->head, inp, inp_hpts); + hptsh->count++; + hpts->p_on_queue_cnt++; } static struct tcp_hpts_entry * tcp_hpts_lock(struct inpcb *inp) { struct tcp_hpts_entry *hpts; - int32_t hpts_num; -again: - hpts_num = inp->inp_hpts_cpu; - hpts = tcp_pace.rp_ent[hpts_num]; - KASSERT(mtx_owned(&hpts->p_mtx) == 0, - ("Hpts:%p owns mtx prior-to lock line:%d", - hpts, __LINE__)); - mtx_lock(&hpts->p_mtx); - if (hpts_num != inp->inp_hpts_cpu) { - mtx_unlock(&hpts->p_mtx); - goto again; - } + INP_LOCK_ASSERT(inp); + + hpts = tcp_pace.rp_ent[inp->inp_hpts_cpu]; + HPTS_LOCK(hpts); + return (hpts); } @@ -580,38 +569,23 @@ static struct tcp_hpts_entry * tcp_dropq_lock(struct inpcb *inp) { struct tcp_hpts_entry *hpts; - int32_t hpts_num; -again: - hpts_num = inp->inp_dropq_cpu; - hpts = tcp_pace.rp_ent[hpts_num]; - KASSERT(mtx_owned(&hpts->p_mtx) == 0, - ("Hpts:%p owns mtx prior-to lock line:%d", - hpts, __LINE__)); - mtx_lock(&hpts->p_mtx); - if (hpts_num != inp->inp_dropq_cpu) { - mtx_unlock(&hpts->p_mtx); - goto again; - } - return (hpts); -} + INP_LOCK_ASSERT(inp); -static void -tcp_remove_hpts_ref(struct inpcb *inp, struct tcp_hpts_entry *hpts, int line) -{ - int32_t ret; + hpts = tcp_pace.rp_ent[inp->inp_dropq_cpu]; + HPTS_LOCK(hpts); - ret = in_pcbrele_wlocked(inp); - KASSERT(ret != 1, ("inpcb:%p release ret 1", inp)); + return (hpts); } static void -tcp_hpts_remove_locked_output(struct tcp_hpts_entry *hpts, struct inpcb *inp, int32_t flags, int32_t line) +inp_hpts_release(struct inpcb *inp) { - if (inp->inp_in_hpts) { - hpts_sane_pace_remove(hpts, inp, &hpts->p_hptss[inp->inp_hptsslot], 1); - tcp_remove_hpts_ref(inp, hpts, line); - } + bool released __diagused; + + inp->inp_in_hpts = IHPTS_NONE; + released = in_pcbrele_wlocked(inp); + MPASS(released == false); } static void @@ -665,18 +639,62 @@ void __tcp_hpts_remove(struct inpcb *inp, int32_t flags, int32_t line) { struct tcp_hpts_entry *hpts; + struct hptsh *hptsh; INP_WLOCK_ASSERT(inp); - if (flags & HPTS_REMOVE_OUTPUT) { - hpts = tcp_hpts_lock(inp); - tcp_hpts_remove_locked_output(hpts, inp, flags, line); - mtx_unlock(&hpts->p_mtx); - } + if (flags & HPTS_REMOVE_DROPQ) { hpts = tcp_dropq_lock(inp); tcp_dropq_remove(hpts, inp); mtx_unlock(&hpts->p_mtx); } + + MPASS(flags & HPTS_REMOVE_OUTPUT); + + hpts = tcp_hpts_lock(inp); + if (inp->inp_in_hpts == IHPTS_ONQUEUE) { + hptsh = &hpts->p_hptss[inp->inp_hptsslot]; + inp->inp_hpts_request = 0; + if (__predict_true(inp->inp_hpts_gencnt == hptsh->gencnt)) { + TAILQ_REMOVE(&hptsh->head, inp, inp_hpts); + MPASS(hptsh->count > 0); + hptsh->count--; + MPASS(hpts->p_on_queue_cnt > 0); + hpts->p_on_queue_cnt--; + inp_hpts_release(inp); + } else { + /* + * tcp_hptsi() now owns the TAILQ head of this inp. + * Can't TAILQ_REMOVE, just mark it. + */ +#ifdef INVARIANTS + struct inpcb *tmp; + + TAILQ_FOREACH(tmp, &hptsh->head, inp_hpts) + MPASS(tmp != inp); +#endif + inp->inp_in_hpts = IHPTS_MOVING; + inp->inp_hptsslot = -1; + } + } else if (inp->inp_in_hpts == IHPTS_MOVING) { + /* + * Handle a special race condition: + * tcp_hptsi() moves inpcb to detached tailq + * tcp_hpts_remove() marks as IHPTS_MOVING, slot = -1 + * tcp_hpts_insert() sets slot to a meaningful value + * tcp_hpts_remove() again (we are here!), then in_pcbdrop() + * tcp_hptsi() finds pcb with meaningful slot and INP_DROPPED + */ + inp->inp_hptsslot = -1; + } + HPTS_UNLOCK(hpts); +} + +bool +tcp_in_hpts(struct inpcb *inp) +{ + + return (inp->inp_in_hpts == IHPTS_ONQUEUE); } static inline int @@ -841,46 +859,6 @@ max_slots_available(struct tcp_hpts_entry *hpts, uint32_t wheel_slot, uint32_t * } } -static int -tcp_queue_to_hpts_immediate_locked(struct inpcb *inp, struct tcp_hpts_entry *hpts, int32_t line, int32_t noref) -{ - uint32_t need_wake = 0; - - HPTS_MTX_ASSERT(hpts); - if (inp->inp_in_hpts == 0) { - /* Ok we need to set it on the hpts in the current slot */ - inp->inp_hpts_request = 0; - if ((hpts->p_hpts_active == 0) || - (hpts->p_wheel_complete)) { - /* - * A sleeping hpts we want in next slot to run - * note that in this state p_prev_slot == p_cur_slot - */ - inp->inp_hptsslot = hpts_slot(hpts->p_prev_slot, 1); - if ((hpts->p_on_min_sleep == 0) && (hpts->p_hpts_active == 0)) - need_wake = 1; - } else if ((void *)inp == hpts->p_inp) { - /* - * The hpts system is running and the caller - * was awoken by the hpts system. - * We can't allow you to go into the same slot we - * are in (we don't want a loop :-D). - */ - inp->inp_hptsslot = hpts->p_nxt_slot; - } else - inp->inp_hptsslot = hpts->p_runningslot; - hpts_sane_pace_insert(hpts, inp, &hpts->p_hptss[inp->inp_hptsslot], line, noref); - if (need_wake) { - /* - * Activate the hpts if it is sleeping and its - * timeout is not 1. - */ - hpts->p_direct_wake = 1; - tcp_wakehpts(hpts); - } - } - return (need_wake); -} #ifdef INVARIANTS static void @@ -917,17 +895,27 @@ check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct inpcb *inp, uin } #endif -static void -tcp_hpts_insert_locked(struct tcp_hpts_entry *hpts, struct inpcb *inp, uint32_t slot, int32_t line, - struct hpts_diag *diag, struct timeval *tv) +uint32_t +tcp_hpts_insert_diag(struct inpcb *inp, uint32_t slot, int32_t line, struct hpts_diag *diag) { - uint32_t need_new_to = 0; - uint32_t wheel_cts; - int32_t wheel_slot, maxslots, last_slot; + struct tcp_hpts_entry *hpts; + struct timeval tv; + uint32_t slot_on, wheel_cts, last_slot, need_new_to = 0; + int32_t wheel_slot, maxslots; int cpu; - int8_t need_wakeup = 0; + bool need_wakeup = false; - HPTS_MTX_ASSERT(hpts); + INP_WLOCK_ASSERT(inp); + MPASS(!tcp_in_hpts(inp)); + MPASS(!(inp->inp_flags & (INP_DROPPED|INP_TIMEWAIT))); + + /* + * We now return the next-slot the hpts will be on, beyond its + * current run (if up) or where it was when it stopped if it is + * sleeping. + */ + hpts = tcp_hpts_lock(inp); + microuptime(&tv); if (diag) { memset(diag, 0, sizeof(struct hpts_diag)); diag->p_hpts_active = hpts->p_hpts_active; @@ -941,14 +929,37 @@ tcp_hpts_insert_locked(struct tcp_hpts_entry *hpts, struct inpcb *inp, uint32_t diag->p_on_min_sleep = hpts->p_on_min_sleep; diag->hpts_sleep_time = hpts->p_hpts_sleep_time; } - KASSERT(inp->inp_in_hpts == 0, ("Hpts:%p tp:%p already on hpts and add?", hpts, inp)); if (slot == 0) { - /* Immediate */ - tcp_queue_to_hpts_immediate_locked(inp, hpts, line, 0); - return; + /* Ok we need to set it on the hpts in the current slot */ + inp->inp_hpts_request = 0; + if ((hpts->p_hpts_active == 0) || (hpts->p_wheel_complete)) { + /* + * A sleeping hpts we want in next slot to run + * note that in this state p_prev_slot == p_cur_slot + */ + inp->inp_hptsslot = hpts_slot(hpts->p_prev_slot, 1); + if ((hpts->p_on_min_sleep == 0) && + (hpts->p_hpts_active == 0)) + need_wakeup = true; + } else + inp->inp_hptsslot = hpts->p_runningslot; + if (__predict_true(inp->inp_in_hpts != IHPTS_MOVING)) + inp_hpts_insert(inp, hpts); + if (need_wakeup) { + /* + * Activate the hpts if it is sleeping and its + * timeout is not 1. + */ + hpts->p_direct_wake = 1; + tcp_wakehpts(hpts); + } + slot_on = hpts->p_nxt_slot; + HPTS_UNLOCK(hpts); + + return (slot_on); } /* Get the current time relative to the wheel */ - wheel_cts = tcp_tv_to_hptstick(tv); + wheel_cts = tcp_tv_to_hptstick(&tv); /* Map it onto the wheel */ wheel_slot = tick_to_wheel(wheel_cts); /* Now what's the max we can place it at? */ @@ -988,7 +999,8 @@ tcp_hpts_insert_locked(struct tcp_hpts_entry *hpts, struct inpcb *inp, uint32_t #ifdef INVARIANTS check_if_slot_would_be_wrong(hpts, inp, inp->inp_hptsslot, line); #endif - hpts_sane_pace_insert(hpts, inp, &hpts->p_hptss[inp->inp_hptsslot], line, 0); + if (__predict_true(inp->inp_in_hpts != IHPTS_MOVING)) + inp_hpts_insert(inp, hpts); if ((hpts->p_hpts_active == 0) && (inp->inp_hpts_request == 0) && (hpts->p_on_min_sleep == 0)) { @@ -1056,32 +1068,10 @@ tcp_hpts_insert_locked(struct tcp_hpts_entry *hpts, struct inpcb *inp, uint32_t diag->co_ret = co_ret; } } -} - -uint32_t -tcp_hpts_insert_diag(struct inpcb *inp, uint32_t slot, int32_t line, struct hpts_diag *diag) -{ - struct tcp_hpts_entry *hpts; - uint32_t slot_on; - struct timeval tv; - - /* - * We now return the next-slot the hpts will be on, beyond its - * current run (if up) or where it was when it stopped if it is - * sleeping. - */ - INP_WLOCK_ASSERT(inp); - hpts = tcp_hpts_lock(inp); - microuptime(&tv); - tcp_hpts_insert_locked(hpts, inp, slot, line, diag, &tv); slot_on = hpts->p_nxt_slot; - mtx_unlock(&hpts->p_mtx); - return (slot_on); -} + HPTS_UNLOCK(hpts); -uint32_t -__tcp_hpts_insert(struct inpcb *inp, uint32_t slot, int32_t line){ - return (tcp_hpts_insert_diag(inp, slot, line, NULL)); + return (slot_on); } void @@ -1110,7 +1100,7 @@ tcp_set_inp_to_drop(struct inpcb *inp, uint16_t reason) HPTS_UNLOCK(hpts); } -static uint16_t +uint16_t hpts_random_cpu(struct inpcb *inp){ /* * No flow type set distribute the load randomly. @@ -1215,24 +1205,8 @@ tcp_drop_in_pkts(struct tcpcb *tp) } /* - * Do NOT try to optimize the processing of inp's - * by first pulling off all the inp's into a temporary - * list (e.g. TAILQ_CONCAT). If you do that the subtle - * interactions of switching CPU's will kill because of - * problems in the linked list manipulation. Basically - * you would switch cpu's with the hpts mutex locked - * but then while you were processing one of the inp's - * some other one that you switch will get a new - * packet on the different CPU. It will insert it - * on the new hpts's input list. Creating a temporary - * link in the inp will not fix it either, since - * the other hpts will be doing the same thing and - * you will both end up using the temporary link. - * - * You will die in an ASSERT for tailq corruption if you - * run INVARIANTS or you will die horribly without - * INVARIANTS in some unknown way with a corrupt linked - * list. + * Delayed drop functionality is factored out into separate function, + * but logic is similar to the logic of tcp_hptsi(). */ static void tcp_delayed_drop(struct tcp_hpts_entry *hpts) @@ -1292,7 +1266,7 @@ tcp_hpts_set_max_sleep(struct tcp_hpts_entry *hpts, int wrap_loop_cnt) * be the sleep time. */ for (i = 0, t = hpts_slot(hpts->p_cur_slot, 1); i < NUM_OF_HPTSI_SLOTS; i++) { - if (TAILQ_EMPTY(&hpts->p_hptss[t]) == 0) { + if (TAILQ_EMPTY(&hpts->p_hptss[t].head) == 0) { fnd = 1; break; } @@ -1310,7 +1284,7 @@ static int32_t tcp_hptsi(struct tcp_hpts_entry *hpts, int from_callout) { struct tcpcb *tp; - struct inpcb *inp = NULL, *ninp; + struct inpcb *inp; struct timeval tv; uint64_t total_slots_processed = 0; int32_t slots_to_run, i, error; @@ -1322,7 +1296,6 @@ tcp_hptsi(struct tcp_hpts_entry *hpts, int from_callout) int32_t wrap_loop_cnt = 0; int32_t slot_pos_of_endpoint = 0; int32_t orig_exit_slot; - int16_t set_cpu; int8_t completed_measure = 0, seen_endpoint = 0; HPTS_MTX_ASSERT(hpts); @@ -1386,18 +1359,29 @@ again: * run them, the extra 10usecs of late (by being * put behind) does not really matter in this situation. */ -#ifdef INVARIANTS - /* - * To prevent a panic we need to update the inpslot to the - * new location. This is safe since it takes both the - * INP lock and the pacer mutex to change the inp_hptsslot. - */ - TAILQ_FOREACH(inp, &hpts->p_hptss[hpts->p_nxt_slot], inp_hpts) { + TAILQ_FOREACH(inp, &hpts->p_hptss[hpts->p_nxt_slot].head, + inp_hpts) { + MPASS(inp->inp_hptsslot == hpts->p_nxt_slot); + MPASS(inp->inp_hpts_gencnt == + hpts->p_hptss[hpts->p_nxt_slot].gencnt); + MPASS(inp->inp_in_hpts == IHPTS_ONQUEUE); + + /* + * Update gencnt and nextslot accordingly to match + * the new location. This is safe since it takes both + * the INP lock and the pacer mutex to change the + * inp_hptsslot and inp_hpts_gencnt. + */ + inp->inp_hpts_gencnt = + hpts->p_hptss[hpts->p_runningslot].gencnt; inp->inp_hptsslot = hpts->p_runningslot; } -#endif - TAILQ_CONCAT(&hpts->p_hptss[hpts->p_runningslot], - &hpts->p_hptss[hpts->p_nxt_slot], inp_hpts); + TAILQ_CONCAT(&hpts->p_hptss[hpts->p_runningslot].head, + &hpts->p_hptss[hpts->p_nxt_slot].head, inp_hpts); + hpts->p_hptss[hpts->p_runningslot].count += + hpts->p_hptss[hpts->p_nxt_slot].count; + hpts->p_hptss[hpts->p_nxt_slot].count = 0; + hpts->p_hptss[hpts->p_nxt_slot].gencnt++; slots_to_run = NUM_OF_HPTSI_SLOTS - 1; counter_u64_add(wheel_wrap, 1); } else { @@ -1412,46 +1396,79 @@ again: ((TAILQ_EMPTY(&hpts->p_dropq) == 0) && (hpts->p_dropq_cnt > 0))), ("%s hpts:%p in_hpts cnt:%d and queue state mismatch", __FUNCTION__, hpts, hpts->p_dropq_cnt)); - HPTS_MTX_ASSERT(hpts); if (hpts->p_on_queue_cnt == 0) { goto no_one; } - HPTS_MTX_ASSERT(hpts); for (i = 0; i < slots_to_run; i++) { + struct inpcb *inp, *ninp; + TAILQ_HEAD(, inpcb) head = TAILQ_HEAD_INITIALIZER(head); + struct hptsh *hptsh; + uint32_t runningslot, gencnt; + /* * Calculate our delay, if there are no extra ticks there * was not any (i.e. if slots_to_run == 1, no delay). */ - hpts->p_delayed_by = (slots_to_run - (i + 1)) * HPTS_TICKS_PER_SLOT; - HPTS_MTX_ASSERT(hpts); - while ((inp = TAILQ_FIRST(&hpts->p_hptss[hpts->p_runningslot])) != NULL) { - HPTS_MTX_ASSERT(hpts); + hpts->p_delayed_by = (slots_to_run - (i + 1)) * + HPTS_TICKS_PER_SLOT; + + runningslot = hpts->p_runningslot; + hptsh = &hpts->p_hptss[runningslot]; + TAILQ_SWAP(&head, &hptsh->head, inpcb, inp_hpts); + hpts->p_on_queue_cnt -= hptsh->count; + hptsh->count = 0; + gencnt = hptsh->gencnt++; + + HPTS_UNLOCK(hpts); + + TAILQ_FOREACH_SAFE(inp, &head, inp_hpts, ninp) { + bool set_cpu; + + if (ninp != NULL) { + /* We prefetch the next inp if possible */ + kern_prefetch(ninp, &prefetch_ninp); + prefetch_ninp = 1; + } + /* For debugging */ if (seen_endpoint == 0) { seen_endpoint = 1; - orig_exit_slot = slot_pos_of_endpoint = hpts->p_runningslot; + orig_exit_slot = slot_pos_of_endpoint = + runningslot; } else if (completed_measure == 0) { /* Record the new position */ - orig_exit_slot = hpts->p_runningslot; + orig_exit_slot = runningslot; } total_slots_processed++; - hpts->p_inp = inp; paced_cnt++; - KASSERT(hpts->p_runningslot == inp->inp_hptsslot, - ("Hpts:%p inp:%p slot mis-aligned %u vs %u", - hpts, inp, hpts->p_runningslot, inp->inp_hptsslot)); - /* Now pull it */ + + INP_WLOCK(inp); if (inp->inp_hpts_cpu_set == 0) { - set_cpu = 1; + set_cpu = true; } else { - set_cpu = 0; + set_cpu = false; } - hpts_sane_pace_remove(hpts, inp, &hpts->p_hptss[hpts->p_runningslot], 0); - if ((ninp = TAILQ_FIRST(&hpts->p_hptss[hpts->p_runningslot])) != NULL) { - /* We prefetch the next inp if possible */ - kern_prefetch(ninp, &prefetch_ninp); - prefetch_ninp = 1; + + if (__predict_false(inp->inp_in_hpts == IHPTS_MOVING)) { + if (inp->inp_hptsslot == -1) { + inp->inp_in_hpts = IHPTS_NONE; + if (in_pcbrele_wlocked(inp) == false) + INP_WUNLOCK(inp); + } else { + HPTS_LOCK(hpts); + inp_hpts_insert(inp, hpts); + HPTS_UNLOCK(hpts); + INP_WUNLOCK(inp); + } + continue; } + + MPASS(inp->inp_in_hpts == IHPTS_ONQUEUE); + MPASS(!(inp->inp_flags & (INP_DROPPED|INP_TIMEWAIT))); + KASSERT(runningslot == inp->inp_hptsslot, + ("Hpts:%p inp:%p slot mis-aligned %u vs %u", + hpts, inp, runningslot, inp->inp_hptsslot)); + if (inp->inp_hpts_request) { /* * This guy is deferred out further in time @@ -1463,54 +1480,37 @@ again: remaining_slots = slots_to_run - (i + 1); if (inp->inp_hpts_request > remaining_slots) { + HPTS_LOCK(hpts); /* * How far out can we go? */ - maxslots = max_slots_available(hpts, hpts->p_cur_slot, &last_slot); + maxslots = max_slots_available(hpts, + hpts->p_cur_slot, &last_slot); if (maxslots >= inp->inp_hpts_request) { - /* we can place it finally to be processed */ - inp->inp_hptsslot = hpts_slot(hpts->p_runningslot, inp->inp_hpts_request); + /* We can place it finally to + * be processed. */ + inp->inp_hptsslot = hpts_slot( + hpts->p_runningslot, + inp->inp_hpts_request); inp->inp_hpts_request = 0; } else { /* Work off some more time */ inp->inp_hptsslot = last_slot; - inp->inp_hpts_request-= maxslots; + inp->inp_hpts_request -= + maxslots; } - hpts_sane_pace_insert(hpts, inp, &hpts->p_hptss[inp->inp_hptsslot], __LINE__, 1); - hpts->p_inp = NULL; + inp_hpts_insert(inp, hpts); + HPTS_UNLOCK(hpts); + INP_WUNLOCK(inp); continue; } inp->inp_hpts_request = 0; /* Fall through we will so do it now */ } - /* - * We clear the hpts flag here after dealing with - * remaining slots. This way anyone looking with the - * TCB lock will see its on the hpts until just - * before we unlock. - */ - inp->inp_in_hpts = 0; - mtx_unlock(&hpts->p_mtx); - INP_WLOCK(inp); - if (in_pcbrele_wlocked(inp)) { - mtx_lock(&hpts->p_mtx); - hpts->p_inp = NULL; - continue; - } - if ((inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED))) { - out_now: - KASSERT(mtx_owned(&hpts->p_mtx) == 0, - ("Hpts:%p owns mtx prior-to lock line:%d", - hpts, __LINE__)); - INP_WUNLOCK(inp); - mtx_lock(&hpts->p_mtx); - hpts->p_inp = NULL; - continue; - } + + inp_hpts_release(inp); tp = intotcpcb(inp); - if ((tp == NULL) || (tp->t_inpcb == NULL)) { - goto out_now; - } + MPASS(tp); if (set_cpu) { /* * Setup so the next time we will move to @@ -1531,24 +1531,11 @@ again: */ tcp_set_hpts(inp); } -#ifdef VIMAGE CURVNET_SET(inp->inp_vnet); -#endif /* Lets do any logging that we might want to */ if (hpts_does_tp_logging && (tp->t_logstate != TCP_LOG_STATE_OFF)) { tcp_hpts_log(hpts, tp, &tv, slots_to_run, i, from_callout); } - /* - * There is a hole here, we get the refcnt on the - * inp so it will still be preserved but to make - * sure we can get the INP we need to hold the p_mtx - * above while we pull out the tp/inp, as long as - * fini gets the lock first we are assured of having - * a sane INP we can lock and test. - */ - KASSERT(mtx_owned(&hpts->p_mtx) == 0, - ("Hpts:%p owns mtx prior-to tcp_output call line:%d", - hpts, __LINE__)); if (tp->t_fb_ptr != NULL) { kern_prefetch(tp->t_fb_ptr, &did_prefetch); @@ -1601,15 +1588,7 @@ again: } INP_WUNLOCK(inp); skip_pacing: -#ifdef VIMAGE CURVNET_RESTORE(); -#endif - INP_UNLOCK_ASSERT(inp); - KASSERT(mtx_owned(&hpts->p_mtx) == 0, - ("Hpts:%p owns mtx prior-to lock line:%d", - hpts, __LINE__)); - mtx_lock(&hpts->p_mtx); - hpts->p_inp = NULL; } if (seen_endpoint) { /* @@ -1621,8 +1600,7 @@ again: */ completed_measure = 1; } - HPTS_MTX_ASSERT(hpts); - hpts->p_inp = NULL; + HPTS_LOCK(hpts); hpts->p_runningslot++; if (hpts->p_runningslot >= NUM_OF_HPTSI_SLOTS) { hpts->p_runningslot = 0; @@ -2025,7 +2003,6 @@ tcp_init_hptsi(void *st) uint32_t ncpus = mp_ncpus ? mp_ncpus : MAXCPU; int count, domain, cpu; - tcp_pace.rp_proc = NULL; tcp_pace.rp_num_hptss = ncpus; hpts_hopelessly_behind = counter_u64_alloc(M_WAITOK); hpts_loops = counter_u64_alloc(M_WAITOK); @@ -2060,7 +2037,9 @@ tcp_init_hptsi(void *st) "hpts", MTX_DEF | MTX_DUPOK); TAILQ_INIT(&hpts->p_dropq); for (j = 0; j < NUM_OF_HPTSI_SLOTS; j++) { - TAILQ_INIT(&hpts->p_hptss[j]); + TAILQ_INIT(&hpts->p_hptss[j].head); + hpts->p_hptss[j].count = 0; + hpts->p_hptss[j].gencnt = 0; } sysctl_ctx_init(&hpts->hpts_ctx); sprintf(unit, "%d", i); diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h index 2f3cffe0b798..ac99296e34f3 100644 --- a/sys/netinet/tcp_hpts.h +++ b/sys/netinet/tcp_hpts.h @@ -119,13 +119,7 @@ void __tcp_hpts_remove(struct inpcb *inp, int32_t flags, int32_t line); #define HPTS_REMOVE_DROPQ 0x01 #define HPTS_REMOVE_OUTPUT 0x02 #define HPTS_REMOVE_ALL (HPTS_REMOVE_DROPQ | HPTS_REMOVE_OUTPUT) - -static inline bool -tcp_in_hpts(struct inpcb *inp) -{ - - return (inp->inp_in_hpts > 0); -} +bool tcp_in_hpts(struct inpcb *); /* * To insert a TCB on the hpts you *must* be holding the @@ -151,11 +145,10 @@ tcp_in_hpts(struct inpcb *inp) * that INP_WLOCK() or from destroying your TCB where again * you should already have the INP_WLOCK(). */ -uint32_t __tcp_hpts_insert(struct inpcb *inp, uint32_t slot, int32_t line); -#define tcp_hpts_insert(a, b) __tcp_hpts_insert(a, b, __LINE__) - -uint32_t -tcp_hpts_insert_diag(struct inpcb *inp, uint32_t slot, int32_t line, struct hpts_diag *diag); +uint32_t tcp_hpts_insert_diag(struct inpcb *inp, uint32_t slot, int32_t line, + struct hpts_diag *diag); +#define tcp_hpts_insert(inp, slot) \ + tcp_hpts_insert_diag((inp), (slot), __LINE__, NULL) void __tcp_set_hpts(struct inpcb *inp, int32_t line); #define tcp_set_hpts(a) __tcp_set_hpts(a, __LINE__) @@ -164,6 +157,8 @@ void tcp_set_inp_to_drop(struct inpcb *inp, uint16_t reason); void tcp_run_hpts(void); +uint16_t hpts_random_cpu(struct inpcb *inp); + extern int32_t tcp_min_hptsi_time; #endif /* _KERNEL */ diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 20591e4006b9..5b5df6821e6a 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2587,6 +2587,9 @@ tcp_close(struct tcpcb *tp) tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; } +#ifdef TCPHPTS + tcp_hpts_remove(inp, HPTS_REMOVE_ALL); +#endif in_pcbdrop(inp); TCPSTAT_INC(tcps_closed); if (tp->t_state != TCPS_CLOSED) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 73a84a407145..b0ab3e02c61f 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef INET6 #include #endif @@ -343,6 +344,9 @@ tcp_twstart(struct tcpcb *tp) * Note: soisdisconnected() call used to be made in tcp_discardcb(), * and might not be needed here any longer. */ +#ifdef TCPHPTS + tcp_hpts_remove(inp, HPTS_REMOVE_ALL); +#endif tcp_discardcb(tp); soisdisconnected(so); tw->tw_so_options = so->so_options; From nobody Thu Dec 2 19:07:12 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EBAEC18AE9B2; Thu, 2 Dec 2021 19:07: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 4J4lnX4763z4R7m; Thu, 2 Dec 2021 19:07:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 67D5522D00; Thu, 2 Dec 2021 19:07: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 1B2J7CNt095819; Thu, 2 Dec 2021 19:07:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2J7Ca6095818; Thu, 2 Dec 2021 19:07:12 GMT (envelope-from git) Date: Thu, 2 Dec 2021 19:07:12 GMT Message-Id: <202112021907.1B2J7Ca6095818@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: 9e93d2b335a0 - main - ifnet: enable & fix if_debug build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e93d2b335a061edad8f842bed82ea68bc5221fd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638472032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ezh0KwVoncZqZN4xOG1sy+EqeEcsXjxnq/uvqR2230=; b=AF6G7TjY6wdiqDDw0O4QKCqOyzPmqw1LphIPtsUO+9ezl4HU/uy/D+sJJFYH0d0Out0qB+ QcYi/Jg9l7zZ6xaWhgiP3DyW5myhPnC0vTX7igivm3HIE/MylS6IsbwwYVpAu6iGWr/kuj CQuVDtW53qLg0bVE1grb0qEmsA+RzkTJGg0c65O/AuJgeJZMm1NLrJzNQLeyG4Fz0aCghW 07xKjiMdkxzGxEZ9X06lUznNX3P0OhSKnI/jamHvbMzEzbnyyl8NGEzqJ0f2lFllaJyviB Pb9E5U0rlU7jMUbIAqw7P7BiLu0dtpu03LEphD4fWhzr9kQbryglGMsB890kkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638472032; a=rsa-sha256; cv=none; b=Hsieq6rQ1GDOfgwhiV1UKWPSNUwmn8M2OvgMt2AyWN59WsMgdiPlYSLVGjSeJp+RXu06Hr M7Ong69lPC/E8tebvwzDJu+CpFXZSuok4P1H/vOB1OLj5Ntja8kEgu+OaU6fq6u1KzaZ3R 5Tn0meJ8mSGD6SLSgja92pHZ02GmTUiZoGUIJ4bBoNHFW2nqcQ/gQthK9OqrosSvEYVbk5 YPUev3wS2jMtiFZTbjVWvKTAguui9U9iotT+hUBjUbRBMUwZJfaRCxdFdtcl75TgnLRini +jih+g7ssmRDDSBE+oqA0dVVD4xk7hnJwLN+E74O0x9SLhpgV/blAb7NliLUaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=9e93d2b335a061edad8f842bed82ea68bc5221fd commit 9e93d2b335a061edad8f842bed82ea68bc5221fd Author: Gleb Smirnoff AuthorDate: 2021-12-02 18:59:43 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-02 18:59:43 +0000 ifnet: enable & fix if_debug build Fixes: ce40632a316c5 --- sys/net/if.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net/if.c b/sys/net/if.c index 85bf7e91fe1c..75e67c3dd8ba 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -36,6 +36,7 @@ #include "opt_bpf.h" #include "opt_inet6.h" #include "opt_inet.h" +#include "opt_ddb.h" #include #include @@ -4668,7 +4669,7 @@ DB_SHOW_ALL_COMMAND(ifnets, db_show_all_ifnets) db_printf("vnet=%p\n", curvnet); #endif for (idx = 1; idx <= V_if_index; idx++) { - ifp = V_ifindex_table[idx].ife_ifnet; + ifp = V_ifindex_table[idx]; if (ifp == NULL) continue; db_printf( "%20s ifp=%p\n", ifp->if_xname, ifp); From nobody Thu Dec 2 19:07:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1BADD18AE9B3; Thu, 2 Dec 2021 19:07: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 4J4lnY59rqz4RGL; Thu, 2 Dec 2021 19:07:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 902D722C0F; Thu, 2 Dec 2021 19:07: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 1B2J7Dq8095843; Thu, 2 Dec 2021 19:07:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2J7D5F095842; Thu, 2 Dec 2021 19:07:13 GMT (envelope-from git) Date: Thu, 2 Dec 2021 19:07:13 GMT Message-Id: <202112021907.1B2J7D5F095842@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: d96fccc50513 - main - epoch: with EPOCH_TRACE add epoch_where_report() which will report where the epoch was entered and also mark the tracker, so that exit will also be reported. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d96fccc50513b807c5ec5e880c2340c1efcb97c1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638472033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p3UOqd0XnC+rKw/lcjDu4l1p2ypioS4Pk9TdXReGDZo=; b=rJR2eNuOgl0udyAI7LY6O91dBoqaRNr12+IzZn3N0Yd9gvM6CYLkhvVxsO43bprEJWsTkp LO8+2ghCfxmqj9HrzqIxTB0YFORy4ekaJiI0KNoBSoOi4wcutA49YClTaaICMRyMVzq7aY rIKHDXlFUclMrXGiEdiAFTa8F4VpsEC2kuFiqAl3xojp9RkFRDpT2XZ52NFkaUbrheaePx p9kh97+JwavAJQuRUfSeb9e0L9lJ3YC1Jnh5jbTUZNL6bRK4MMw+57ZDzEchCrmGNsurod HjW8FCBm9Xt8NQOKFfd6pKR26g/WsBWOz69gqn0BVsgN7MYqCHMd/YAN9nHCHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638472033; a=rsa-sha256; cv=none; b=pfI1UFfmJvdYhQmCwn+T3cF0sY5IGvS3jvn3aX6LZzaVn0oSBWY08M2bkUqfVXXayQih27 joMUAKT8SOqMwx2Ega4d8GhpvmYe6MdYdNxGfqQ/HUxs7vM2K6gAYW/ZF5WN1OMM9Iz2fe Cc6ylO2CZGO+6VAHBGC/4U2I+TYDvb+l5GaH7xdD09gCS5U4f6Htv8TWJVR3hLreXB2GPw hw/CMMBtvn0Sm++d7OZiDjIauHdOh43d2CN0KPXJ+z0ymk7XhbdLT0tZiP6HAe9SM/ndYR OiEfkM6MHVGaIePD3/9LFkR0Vo2yFD9+OLfYYtk2uOMkP1qAle1fzYp1STekFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d96fccc50513b807c5ec5e880c2340c1efcb97c1 commit d96fccc50513b807c5ec5e880c2340c1efcb97c1 Author: Gleb Smirnoff AuthorDate: 2021-12-02 18:59:43 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-02 19:02:51 +0000 epoch: with EPOCH_TRACE add epoch_where_report() which will report where the epoch was entered and also mark the tracker, so that exit will also be reported. Helps to understand epoch entrance/exit scenarios in complex cases, like network stack. As everything else under EPOCH_TRACE it is a developer only tool. --- sys/kern/subr_epoch.c | 40 +++++++++++++++++++++++++++++++++------- sys/sys/epoch.h | 3 +++ 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/sys/kern/subr_epoch.c b/sys/kern/subr_epoch.c index 651fd8b419f0..74524fb3f97e 100644 --- a/sys/kern/subr_epoch.c +++ b/sys/kern/subr_epoch.c @@ -147,6 +147,13 @@ static struct sx epoch_sx; #define EPOCH_LOCK() sx_xlock(&epoch_sx) #define EPOCH_UNLOCK() sx_xunlock(&epoch_sx) +static epoch_record_t +epoch_currecord(epoch_t epoch) +{ + + return (zpcpu_get(epoch->e_pcpu_record)); +} + #ifdef EPOCH_TRACE struct stackentry { RB_ENTRY(stackentry) se_node; @@ -230,6 +237,7 @@ epoch_trace_enter(struct thread *td, epoch_t epoch, epoch_tracker_t et, et->et_epoch = epoch; et->et_file = file; et->et_line = line; + et->et_flags = 0; SLIST_INSERT_HEAD(&td->td_epochs, et, et_tlink); } @@ -250,6 +258,9 @@ epoch_trace_exit(struct thread *td, epoch_t epoch, epoch_tracker_t et, SLIST_REMOVE(&td->td_epochs, et, epoch_tracker, et_tlink); } else SLIST_REMOVE_HEAD(&td->td_epochs, et_tlink); + if (et->et_flags & ET_REPORT_EXIT) + printf("Td %p exiting epoch %s at %s:%d\n", td, epoch->e_name, + file, line); } /* Used by assertions that check thread state before going to sleep. */ @@ -262,6 +273,28 @@ epoch_trace_list(struct thread *td) printf("Epoch %s entered at %s:%d\n", iet->et_epoch->e_name, iet->et_file, iet->et_line); } + +void +epoch_where_report(epoch_t epoch) +{ + epoch_record_t er; + struct epoch_tracker *tdwait; + + MPASS(epoch != NULL); + MPASS((epoch->e_flags & EPOCH_PREEMPT) != 0); + MPASS(!THREAD_CAN_SLEEP()); + critical_enter(); + er = epoch_currecord(epoch); + TAILQ_FOREACH(tdwait, &er->er_tdlist, et_link) + if (tdwait->et_td == curthread) + break; + critical_exit(); + if (tdwait != NULL) { + tdwait->et_flags |= ET_REPORT_EXIT; + printf("Td %p entered epoch %s at %s:%d\n", curthread, + epoch->e_name, tdwait->et_file, tdwait->et_line); + } +} #endif /* EPOCH_TRACE */ static void @@ -422,13 +455,6 @@ epoch_free(epoch_t epoch) EPOCH_UNLOCK(); } -static epoch_record_t -epoch_currecord(epoch_t epoch) -{ - - return (zpcpu_get(epoch->e_pcpu_record)); -} - #define INIT_CHECK(epoch) \ do { \ if (__predict_false((epoch) == NULL)) \ diff --git a/sys/sys/epoch.h b/sys/sys/epoch.h index 85c791d3df6c..6ce0fcd01c60 100644 --- a/sys/sys/epoch.h +++ b/sys/sys/epoch.h @@ -61,6 +61,8 @@ struct epoch_tracker { SLIST_ENTRY(epoch_tracker) et_tlink; const char *et_file; int et_line; + int et_flags; +#define ET_REPORT_EXIT 0x1 #endif } __aligned(sizeof(void *)); typedef struct epoch_tracker *epoch_tracker_t; @@ -86,6 +88,7 @@ void _epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et EPOCH_FILE_LINE); void _epoch_exit_preempt(epoch_t epoch, epoch_tracker_t et EPOCH_FILE_LINE); #ifdef EPOCH_TRACE void epoch_trace_list(struct thread *); +void epoch_where_report(epoch_t); #define epoch_enter_preempt(epoch, et) _epoch_enter_preempt(epoch, et, __FILE__, __LINE__) #define epoch_exit_preempt(epoch, et) _epoch_exit_preempt(epoch, et, __FILE__, __LINE__) #else From nobody Thu Dec 2 19:11:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 04C1118AFA9C; Thu, 2 Dec 2021 19:11: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 4J4lt93sWsz4RW1; Thu, 2 Dec 2021 19:11:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6248522ABC; Thu, 2 Dec 2021 19:11: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 1B2JBDoJ005446; Thu, 2 Dec 2021 19:11:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2JBDk2005445; Thu, 2 Dec 2021 19:11:13 GMT (envelope-from git) Date: Thu, 2 Dec 2021 19:11:13 GMT Message-Id: <202112021911.1B2JBDk2005445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: bfb7a31b6a22 - main - rc: Hook zfskeys to the build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bfb7a31b6a22f4a2c6fb9881bd1e3ae7523a2290 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638472273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ms8FpiF24eSq342AkVF6+N9MciQ/RIsXCx6EyyRmxz4=; b=OoQlnBw5TVCSy05sGPe6qkhB2azs0i1hadcHmH9qnM8RvvOyOBwrJOqHj466drg4yUcfsJ KToNn+WiQR/nNPGbsv7I1SpI/8dT4B3YfxVLi6ZxuyeRFdfRx6r2Yl3/9ma1g47EEd+CXB 1GgwKd9QoNEmHtSeW0/AJLJU6jTD7oSK5zKGlTqlaeXmx4uqtWByNo3r7reUIt1Dics/IU wFAClG9QRlJlHMS0gbeDMfgzOOjemW1V0dY+fK8N0PwH8Wefn0hzA6uNYRfyMolCFq04+E NZU2VPPsDlxigrzYuhxtCZBJNOuCvaXt4jjGmGIwBOV0+TTQGgYrauP8beKuKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638472273; a=rsa-sha256; cv=none; b=Hk1zEY0li+lQAURqsO3nec5yLSMnqpfOITW+xTBekhTcpLIqHjuf8mCg5dnyqFN7sP2lPn /yJO49rMh9BS3O4npF/740J83wMylDtzaMGG51MkXhQwZBYZ5Gv86MZD4BJ1XJOcTyhDHO 0Fr9LDl7NSV3Sy1fEMy0TK2zO3LZ/77YPP8ao+ObkAK53+6dbxw9jdpfkKpA+A0xiKRrjH Ch5bDnOq8RA2KYXm8JMdL0nUs1g4tVQI0gU4xbNySwU50boH7iFNI9S2RMXVKSJRpQs9sZ F9hvlnIBAgE42gV87nXH9sQh8zdO7pDEdjgEThBlnQCdk/gm5jQ4UdJO9hkknw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bfb7a31b6a22f4a2c6fb9881bd1e3ae7523a2290 commit bfb7a31b6a22f4a2c6fb9881bd1e3ae7523a2290 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-29 15:13:09 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-12-02 19:10:52 +0000 rc: Hook zfskeys to the build Reviewed by: allanjude Approved by: allanjude (src) MFC after: 3 days Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D33230 --- libexec/rc/rc.d/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 4c7267552526..36b8a91727dc 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -323,6 +323,7 @@ CONFGROUPS+= ZFS ZFS+= zfs ZFS+= zfsbe ZFS+= zfsd +ZFS+= zfskeys ZFS+= zpool ZFS+= zvol ZFSPACKAGE= rc From nobody Thu Dec 2 19:16:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4D1E918B14DD; Thu, 2 Dec 2021 19:16: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 4J4lzx5xZcz4TNM; Thu, 2 Dec 2021 19:16:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8496A22C26; Thu, 2 Dec 2021 19:16: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 1B2JGDfq009629; Thu, 2 Dec 2021 19:16:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2JGD4C009628; Thu, 2 Dec 2021 19:16:13 GMT (envelope-from git) Date: Thu, 2 Dec 2021 19:16:13 GMT Message-Id: <202112021916.1B2JGD4C009628@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: 3cce6164ab9b - main - ip_input: remove pointless check in INP_RECVIF 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cce6164ab9bb5a8ba569e2ae0e14099b6db46fd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638472574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ZFJh6afLPnqKReKj+AnExubaWJe7gI1saKCdvMpNzg=; b=Gkro7F7/27VAMhLqlyU2H6cRkXWmTY0LJr57iL4KK1+aH1+CCbabIhUCVfk+2/nN7J7i3G qsVnlPFZ3m25ZrnxVUw4eYiAxxwU/Rdjv8igxDpAkWSCrcu+fr3E1Ko6Vj/SXKMA8cKZ7r rSnGWW6uY8FXGN9wlNuAFG8SjS5DYb1pQ0WHvYaGUa2IoUR+6uwxqyoHqG1Z5rOvp6Ylmy 9wxtdAzP2m4RvqMo00BpSfP5/KENNanV0Lln8RQFlNK9RaWnqkJHFoV9QTmpBm2Oyrq8C+ cf0cyChTD3refEm/9HC04K2082qi+R6GEOsZFpQT421rgH/3IiuoFNva8mSzQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638472574; a=rsa-sha256; cv=none; b=jfodRtwkiJGKpvM80NxX0PhhPWQ5Cf7ACJuJ5A1sesSs7FhYKqQjuSm8GkiYAnvRHYF1CR x+lcM7R4UkUdSg/r9yYfG4iE9H30S8VLX3qVwk77hdl3RtEbt2ElynndtBg0Oz5F5dfQz/ 8SJNNF77QQTW+BL42F8v1RyJLoi+JuzzOs2CDWl6aCO/OeYJdxGnpPpy2zXcA1F0aJcIT1 7xbhiS2onyUR8oPMXXwRIy05Cn0MD34qqcN5JmACbOfUo8OuHt6pJt/6BhfGALS9iiquP5 DhAEgl0Q2ERkMwrDXjYhNom0GiOXN5jUwojrbD3IR6HMaW2XtaIicbjbnhu6ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3cce6164ab9bb5a8ba569e2ae0e14099b6db46fd commit 3cce6164ab9bb5a8ba569e2ae0e14099b6db46fd Author: Gleb Smirnoff AuthorDate: 2021-12-02 19:15:04 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-02 19:15:04 +0000 ip_input: remove pointless check in INP_RECVIF handling An mbuf rcvif pointer is supposed to be valid and doesn't need extra checks. The code appeared in d314ad7b73639. --- sys/netinet/ip_input.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 9db1f8c6f2e7..44500c46b0d8 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1281,8 +1281,7 @@ ip_savecontrol(struct inpcb *inp, struct mbuf **mp, struct ip *ip, struct sockaddr_dl *sdp; struct sockaddr_dl *sdl2 = &sdlbuf.sdl; - if ((ifp = m->m_pkthdr.rcvif) && - ifp->if_index && ifp->if_index <= V_if_index) { + if ((ifp = m->m_pkthdr.rcvif)) { sdp = (struct sockaddr_dl *)ifp->if_addr->ifa_addr; /* * Change our mind and don't try copy. From nobody Thu Dec 2 21:00:55 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9EE8218C32CD; Thu, 2 Dec 2021 21:00:59 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher 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 "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4pJp2w7Fz3GT0; Thu, 2 Dec 2021 21:00:58 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.16.1/8.16.1) with ESMTPS id 1B2L0u56093049 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 2 Dec 2021 13:00:56 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.16.1/8.16.1/Submit) id 1B2L0t50093046; Thu, 2 Dec 2021 13:00:55 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 2 Dec 2021 13:00:55 -0800 From: Gleb Smirnoff To: Alan Somers Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 943c446629e3 - main - Revert "libc: Some enhancements to syslog(3)" Message-ID: References: <202111301812.1AUICgqZ088428@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: <202111301812.1AUICgqZ088428@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4J4pJp2w7Fz3GT0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 162.251.186.162 is neither permitted nor denied by domain of glebius@freebsd.org) smtp.mailfrom=glebius@freebsd.org X-Spamd-Result: default: False [-2.33 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.27)[-0.268]; FREEFALL_USER(0.00)[glebius]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[freebsd.org]; R_SPF_SOFTFAIL(0.00)[~all:c]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_HAM_LONG(-0.96)[-0.962]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Tue, Nov 30, 2021 at 06:12:42PM +0000, Alan Somers wrote: A> Revert "libc: Some enhancements to syslog(3)" A> A> This reverts commit 2886c93d1bca231260ebc01d4205743ca781f3c7. A> The original commit has two problems: A> A> * It sets SO_SNDBUF to be as large as MAXLINE. But for unix domain A> sockets, the send buffer is bypassed. Packets go directly to the A> peer's receive buffer, so setting and querying SO_SNDBUF is A> ineffective. To ensure that the socket can accept messages of a A> certain size, it would be necessary to add a SO_PEERRCVBUF socket A> option that could query the connected peer's receive buffer size. I'd rather say we don't need SO_PEERRCVBUF. The SO_SNDBUF on AF_UNIX should transparently to the application look and report peer's receive buffer. -- Gleb Smirnoff From nobody Thu Dec 2 21:03:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4DB5618C44FC for ; Thu, 2 Dec 2021 21: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 4J4pNG0T7Nz3H7G; Thu, 2 Dec 2021 21:03:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E562224358; Thu, 2 Dec 2021 21:03: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 1B2L3vpE056501; Thu, 2 Dec 2021 21: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 1B2L3vNl056500; Thu, 2 Dec 2021 21:03:57 GMT (envelope-from git) Date: Thu, 2 Dec 2021 21:03:57 GMT Message-Id: <202112022103.1B2L3vNl056500@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: bbc8f2a9ec29 - Create tag vendor/llvm-project/llvmorg-14-init-11187-g222442ec2d71 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/tags/vendor/llvm-project/llvmorg-14-init-11187-g222442ec2d71 X-Git-Reftype: annotated tag X-Git-Commit: bbc8f2a9ec2963606f80fb8a2fa701726bfc3d5e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638479038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5SFqKVC7ISv4QAV4c43ZtNtRUx3i+FY5DnDnH17JM4c=; b=w1phHqQFoRTqvlOKOMYI/nlIov6idTrrkBDAUyvwpjGtJ0cOF8o8er1ey6o/Kef7gWcPwJ NCREJEFOpuB7d3bBiLxflG5VvPp+DNeYWuXKdUCVRoZl3eoDTJcoflKU35czW+biJY5pHa Ol13naG7kcash44oGvg+XlAwz4tAC+dqsWv+BULk0VrTznFmDbrCbDGzdHW3fs9mHLD5ED 6uyKKMt5BTYFlLucb3mkQv//qw+RvNnAboKoVlu0jBoXvaOggDYsYMPcnCxqOM2jhLGU1q adMructQvUCEAUWzv03QNQfAiNVnWLGb/ckLplEIpxsoaN3Xmdq2Fn8SRDwYkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638479038; a=rsa-sha256; cv=none; b=m4alZ5Lkf0I/6AXzBb6UztdfMnGjMcgW6OAhjzTSfjEvm3dCwuKVM2STLFRhmQQR+3ifU6 tHmJS+JtU/jfYfAbHMvVCpW1zmKb3DaR6qFcc3hR2zy5AZaJUgMIYpxOKKRCD+Vvc6dzYr jUJTYF1MLroWV8TrKCj63r0YLMgJwStc32ixTNAmsKdHf5HKV6Rlt+FhODbmTojNTbHzyn 6WgxqZK9CbaDqroIvJz7TsagHVtkGqNvJ/e/REv7g8apviR1at75O2ipMRDVeNm9aw6EiN xeOITeGARs+Rjz+LSj/GHJxafG+oJCG08LFky9bNjGzzElJkHCeVPNdQxd8leg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/llvm-project/llvmorg-14-init-11187-g222442ec2d71 has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-14-init-11187-g222442ec2d71 tag vendor/llvm-project/llvmorg-14-init-11187-g222442ec2d71 Tagger: Dimitry Andric TaggerDate: 2021-12-02 21:03:20 +0000 Tag llvm-project main llvmorg-14-init-11187-g222442ec2d71. commit f65dcba83ce5035ab88a85fe17628b447eb56e1b Author: Dimitry Andric AuthorDate: 2021-12-02 21:02:54 +0000 Commit: Dimitry Andric CommitDate: 2021-12-02 21:02:54 +0000 Vendor import of llvm-project main llvmorg-14-init-11187-g222442ec2d71. From nobody Thu Dec 2 21:03:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 477B418C46D5 for ; Thu, 2 Dec 2021 21: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 4J4pNG0D5lz3H7F; Thu, 2 Dec 2021 21:03:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1D29242BD; Thu, 2 Dec 2021 21:03: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 1B2L3vEN056477; Thu, 2 Dec 2021 21: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 1B2L3vQC056476; Thu, 2 Dec 2021 21:03:57 GMT (envelope-from git) Date: Thu, 2 Dec 2021 21:03:57 GMT Message-Id: <202112022103.1B2L3vQC056476@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 846a2208a8ab..f65dcba83ce5 - vendor/llvm-project/main - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/vendor/llvm-project/main X-Git-Reftype: branch X-Git-Commit: f65dcba83ce5035ab88a85fe17628b447eb56e1b X-Git-Oldrev: 846a2208a8ab099f595fe7e8b2e6d54a7b5e67fb X-Git-Newrev: f65dcba83ce5035ab88a85fe17628b447eb56e1b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638479038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uiB9cXUnIVuHKTKBY9/emmSAPXRaICkvkscGwtkx7fM=; b=vICeH8eZYMY7gG3BRYEMinGTuVxf2BdK4SSMQajlWyjogsOvnZ9fFw0KZmLLM2K24XrUWG SqqdxjK9yEFSWL59uyR8kXa1D+qbS6MILG7vWEQfP6csGE4gJiGJRDspZ8wsItEinoJAgj YzRp0YKen5D5pFwHDuUOqzLx8YmtU9xcwEqS/eGA37N2GlHPysBfSffH4xqSfAlpCTldAl jfwijDfSmjV3xG8yOIwFCuNtrCiZSCJk3sw1UFYwaqLAs51MMSIjVVMKeWJU1Ng3qo4ijk O5cS5dOFYQGQ71XS9wUzjdWXLe52AHfBKknSfAlZofuU3xzDrIzvKSs0IisR8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638479038; a=rsa-sha256; cv=none; b=uwdSdmVWLciG7TinHFqxAM0qJLfsSg/TmDG6C7pQ5TKcmrKaV/hdiVw2r0ueYv+3XudLG9 aFyqqh+226ghv8oL8MWUN58TWQv+wLU2DnGrZ2ZfykGMBZFlgKFrnVvHuuTAMV6fvMZBP6 32vgOPQv7aGxkg1IeKI+cvckVMahNlVuSEZd2E+R3IBFyRYav+004L9PvkLb/05fz8bt2f eVKAkaFc6gSlnbrJ1Gx9nZLnN0h77ziS1rvMYsY7xyglyDAPS49XEMWAQQx6dad1C2ff7d Zu6vzEnKLMx+GMlbSWTak5PM2dF0HqqixxZHHmbcww7n7CcO9rxqhAMqQkkaGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch vendor/llvm-project/main has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=846a2208a8ab..f65dcba83ce5 f65dcba83ce5 Vendor import of llvm-project main llvmorg-14-init-11187-g222442ec2d71. From nobody Thu Dec 2 21:05:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BFC7718C4CBD; Thu, 2 Dec 2021 21:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4pQ23dKMz3Hqp; Thu, 2 Dec 2021 21:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D229242BE; Thu, 2 Dec 2021 21:05: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 1B2L5UpP056697; Thu, 2 Dec 2021 21:05:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2L5UCE056696; Thu, 2 Dec 2021 21:05:30 GMT (envelope-from git) Date: Thu, 2 Dec 2021 21:05:30 GMT Message-Id: <202112022105.1B2L5UCE056696@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: a10253cffea8 - main - mps(4): Fix unmatched devq release. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a10253cffea84c0c980a36ba6776b00ed96c3e3b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638479130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TS3++vqyJE8/HcjUKVrXhPAKmT7gr8NeIy6A0A6lmGI=; b=nUwslVjylCoq49iXQNb+TONybIBWcqcEEydCBTnFWpncsG/nHD0WXSVUlMAgHPfRNxL8hr LJXGauvEMshCTGjquLXHKkKyHEdSMk9MgtjAEbHLuxpA6ca+ad9i+PbRMVn5ZQZGwnu3gJ dob4EhM2c7X8FdgLosyZPjdjr9nRLPgLfCH7Bvm3pAmVg/auyRTBEI4ZT6jB9i+ARJ4XGT 5e5P03LA48GnRsBNVzOyN2FSLgHUCUvtUcSvTl0eJSSYiXWCzIYf/+R5XRifT3B1ZuRgNm Ly/QGzg9VOg9BP+FEvEXrlyg1my7a1CafyncfEslXZAvqpgIPmvetQKbroSbVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638479130; a=rsa-sha256; cv=none; b=om+HSmZR1vDJxbykoh4EZs730LN5uXABPNolVcBj5LRwXWim3B7SbrBgntFo/NjUGtPib6 mm2EEMrX0OyfccpcyAYseq7wyCIhYKr34BtRbUDjOohw8a/if1g2PTGnxEM3w2ALKfVut4 d6eN6c9WFwuwuEben9TTk3I9IOTDMO7SDUjVxEbmWR/9lipHSID5nlCNM8oKKeWFKAHhH9 4vpooiT56+j7rv0+9QkO6rbZ/M1R1+ZGyLAjYG36JogVepFCBP1pa/nM99enuHfisdPa0I 7f3jo+ZoiwP4tyajoRAS6pfSWBF99/hehywQcDmiokOQFNS8uH6cQEf0YEVMsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a10253cffea84c0c980a36ba6776b00ed96c3e3b commit a10253cffea84c0c980a36ba6776b00ed96c3e3b Author: Warner Losh AuthorDate: 2021-12-02 20:53:44 +0000 Commit: Warner Losh CommitDate: 2021-12-02 20:53:44 +0000 mps(4): Fix unmatched devq release. Port 9781c28c6d63 and a8837c77efd0 to the mps driver. Before this change devq was frozen only if some command was sent to the target after reset started, but release was called always. This change freezes the devq immediately, leaving mprsas_action_scsiio() check only to cover race condition due to different lock devq use. This should also avoid unnecessary requeue of the commands, creating additional log noise and confusing some broken apps. It also avoids a 'busy' requeue of I/Os failing when we're doing recovery that takes longer than the normal busy timeout. These I/Os failing can lead to filesystems being unmounted in the force unmount case for I/O errors. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D33228 --- sys/dev/mps/mps_sas.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index c54c2a82faff..681565aca2d1 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -235,8 +235,6 @@ mpssas_alloc_tm(struct mps_softc *sc) void mpssas_free_tm(struct mps_softc *sc, struct mps_command *tm) { - int target_id = 0xFFFFFFFF; - if (tm == NULL) return; @@ -245,13 +243,11 @@ mpssas_free_tm(struct mps_softc *sc, struct mps_command *tm) * free the resources used for freezing the devq. Must clear the * INRESET flag as well or scsi I/O will not work. */ - if (tm->cm_targ != NULL) { - tm->cm_targ->flags &= ~MPSSAS_TARGET_INRESET; - target_id = tm->cm_targ->tid; - } if (tm->cm_ccb) { - mps_dprint(sc, MPS_INFO, "Unfreezing devq for target ID %d\n", - target_id); + mps_dprint(sc, MPS_XINFO | MPS_RECOVERY, + "Unfreezing devq for target ID %d\n", + tm->cm_targ->tid); + tm->cm_targ->flags &= ~MPSSAS_TARGET_INRESET; xpt_release_devq(tm->cm_ccb->ccb_h.path, 1, TRUE); xpt_free_path(tm->cm_ccb->ccb_h.path); xpt_free_ccb(tm->cm_ccb); @@ -1699,11 +1695,11 @@ mpssas_action_scsiio(struct mpssas_softc *sassc, union ccb *ccb) } /* - * If target has a reset in progress, freeze the devq and return. The - * devq will be released when the TM reset is finished. + * If target has a reset in progress, the devq should be frozen. + * Geting here we likely hit a race, so just requeue. */ if (targ->flags & MPSSAS_TARGET_INRESET) { - ccb->ccb_h.status = CAM_BUSY | CAM_DEV_QFRZN; + ccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_DEV_QFRZN; mps_dprint(sc, MPS_INFO, "%s: Freezing devq for target ID %d\n", __func__, targ->tid); xpt_freeze_devq(ccb->ccb_h.path, 1); @@ -3244,11 +3240,15 @@ mpssas_async(void *callback_arg, uint32_t code, struct cam_path *path, } /* - * Set the INRESET flag for this target so that no I/O will be sent to - * the target until the reset has completed. If an I/O request does - * happen, the devq will be frozen. The CCB holds the path which is - * used to release the devq. The devq is released and the CCB is freed + * Freeze the devq and set the INRESET flag so that no I/O will be sent to + * the target until the reset has completed. The CCB holds the path which + * is used to release the devq. The devq is released and the CCB is freed * when the TM completes. + * We only need to do this when we're entering reset, not at each time we + * need to send an abort (which will happen if multiple commands timeout + * while we're sending the abort). We do not release the queue for each + * command we complete (just at the end when we free the tm), so freezing + * it each time doesn't make sense. */ void mpssas_prepare_for_tm(struct mps_softc *sc, struct mps_command *tm, @@ -3266,7 +3266,13 @@ mpssas_prepare_for_tm(struct mps_softc *sc, struct mps_command *tm, } else { tm->cm_ccb = ccb; tm->cm_targ = target; - target->flags |= MPSSAS_TARGET_INRESET; + if ((target->flags & MPSSAS_TARGET_INRESET) == 0) { + mps_dprint(sc, MPS_XINFO | MPS_RECOVERY, + "%s: Freezing devq for target ID %d\n", + __func__, target->tid); + xpt_freeze_devq(ccb->ccb_h.path, 1); + target->flags |= MPSSAS_TARGET_INRESET; + } } } } From nobody Thu Dec 2 21:10:10 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D777918C7DD6; Thu, 2 Dec 2021 21:10:28 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4pWm5jwvz3Kw6; Thu, 2 Dec 2021 21:10:28 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f41.google.com with SMTP id n104-20020a9d2071000000b005799790cf0bso1373293ota.5; Thu, 02 Dec 2021 13:10:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SuVbAkIqH1EQOz64zWYUMLd0nRQ3T+wvIlO6l9gyv1Y=; b=4U/jx0KPCXMlgJiXovBlkuH2HMpUBnt5cpVLBetRn+p9bG9aDerRgHRScZd/K7XLxA 0UzTC0wRD2/pZt+8OW70OkEkE1gkwKhAUW4lJ0l6AGkd+AqRgIG4nE6SzFoFfuFetgcv mu+/DeqXr5VLcFs9DDNncSeVxDrEpe5rv17eKxE4JJTMtdmVwb2+uV3GaaV4exfD2YzZ rYhx5mTS9yiOBBiT71o7GANKD4RvULaXVey5cNL+VtxbBgkCHxTn5nN2LTPpyCsjzbvf /haCt1AFIcqNgUu3pjEkz4nJbXX5bZyHdznAfVLlZ6rZt6UIm1sI/J4P6vbK+5h68v+N vOaQ== X-Gm-Message-State: AOAM5321yEXxFTmT+/AUQujT6ZuId4YBN8wPkXlYW/NTXJjXwt8gKWKs qjLn/TJSwvvYvdJs8zcn8TmT7BZ4mShQrO+Kkc45aQzl X-Google-Smtp-Source: ABdhPJxeWJ8itaPuJr6v5COVvj1HqqOJhVMWhCr3ZbbOeeCkEIWCPxwbB3onnwA+z53sQuRoXHuY32/HOk2ZQdJKoyM= X-Received: by 2002:a05:6830:19c8:: with SMTP id p8mr13385081otp.111.1638479421720; Thu, 02 Dec 2021 13:10:21 -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: <202111301812.1AUICgqZ088428@gitrepo.freebsd.org> In-Reply-To: From: Alan Somers Date: Thu, 2 Dec 2021 14:10:10 -0700 Message-ID: Subject: Re: git: 943c446629e3 - main - Revert "libc: Some enhancements to syslog(3)" To: Gleb Smirnoff Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4J4pWm5jwvz3Kw6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Dec 2, 2021 at 2:01 PM Gleb Smirnoff wrote: > > On Tue, Nov 30, 2021 at 06:12:42PM +0000, Alan Somers wrote: > A> Revert "libc: Some enhancements to syslog(3)" > A> > A> This reverts commit 2886c93d1bca231260ebc01d4205743ca781f3c7. > A> The original commit has two problems: > A> > A> * It sets SO_SNDBUF to be as large as MAXLINE. But for unix domain > A> sockets, the send buffer is bypassed. Packets go directly to the > A> peer's receive buffer, so setting and querying SO_SNDBUF is > A> ineffective. To ensure that the socket can accept messages of a > A> certain size, it would be necessary to add a SO_PEERRCVBUF socket > A> option that could query the connected peer's receive buffer size. > > I'd rather say we don't need SO_PEERRCVBUF. The SO_SNDBUF on AF_UNIX > should transparently to the application look and report peer's receive buffer. > > -- > Gleb Smirnoff That would work too. But the devil is in the details. Would the socket buffer's size be adjustable via both endpoints? Are there any security or setrlimit issues in allowing an unprivileged client to change the socket buffer size of its connected privileged peer? From nobody Thu Dec 2 21:37:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2406818A3974; Thu, 2 Dec 2021 21:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4q725t97z3jBv; Thu, 2 Dec 2021 21:37:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A573024D93; Thu, 2 Dec 2021 21:37: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 1B2LbYXM096540; Thu, 2 Dec 2021 21: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 1B2LbWMB096539; Thu, 2 Dec 2021 21:37:32 GMT (envelope-from git) Date: Thu, 2 Dec 2021 21:37:32 GMT Message-Id: <202112022137.1B2LbWMB096539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 266f97b5e9a7 - main - wpa: Import wpa_supplicant/hostapd commit 14ab4a816 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 266f97b5e9a7958e365e78288616a459b40d924a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638481054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aJDEqVejsLTcLQcRKBwUr6ithz6nyxLVlXDmmBlNz+E=; b=Ocb3VtaXAZWHQsELr1MJQiJ5Mo1HPG1SWiwCu5vrQlP3K6jy9vZxDqaFC3XggMzcj36Lk/ LKL/qeyrF4v1aotkTXreUF4rtt3W43gS8eS/YGtRsr3at9YOky09TM5Jd8cMCQ8Gt8qXf8 c/T6zmrCw5rIJKIS7QHYwzj5Ce0Xx1RE5pxOEPh27y7VYWTmpBLCh8nNTWFGwg9vcxClkp IfBM4DSn/sOIp9H9R0EJLzckhg8sxCPHCelciqrFxFiOEi/h1x+TFwRDxNq2/8UV+TCW6V qYItMRhRLJRVv1y9J65UxR5Exz/CRpG9hxxuS1gYLp+UTRKIhHcRvLfG56i+6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638481054; a=rsa-sha256; cv=none; b=gg9Fz4c3pEELrQRYJInl6QIpYya7JsCv8sLX3wHNjXK9iF+IaaGWl6UuvypcGBLPez5b8P 2CPqN/LfI+b0m/51ASodf0DKXSOeTm/F6nD3R3Yjpz+OHOxnlJNH/6o5eYdKe9XKVC0izo 0dH6fOhuvdSriYDAArZ/YeQAmEmDZiTDvZUlFYZABOqmG57hCq49wquBjsh8a9zyABpHS+ XreOSM9uu2d9207pGuF+COpHMJakcuid8UG/6pZ2BwihAY9RgFj30yRURgyWe6gIGYtHAt 10Xv3hTY1ElEHs7BFidsrWMo4OzdpWacEX6S0tgrAv7kIFUb3aKtN7Dx33MxOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=266f97b5e9a7958e365e78288616a459b40d924a commit 266f97b5e9a7958e365e78288616a459b40d924a Merge: a10253cffea8 56f32b0e4cc2 Author: Cy Schubert AuthorDate: 2021-12-02 21:35:14 +0000 Commit: Cy Schubert CommitDate: 2021-12-02 21:35:14 +0000 wpa: Import wpa_supplicant/hostapd commit 14ab4a816 This is the November update to vendor/wpa committed upstream 2021-11-26. MFC after: 1 month ObsoleteFiles.inc | 19 - contrib/wpa/hostapd/config_file.c | 25 +- contrib/wpa/hostapd/ctrl_iface.c | 43 +- contrib/wpa/hostapd/hlr_auc_gw.milenage_db | 2 +- contrib/wpa/hostapd/hostapd.conf | 10 +- contrib/wpa/hostapd/hostapd_cli.c | 2 +- contrib/wpa/src/ap/acs.c | 4 +- contrib/wpa/src/ap/ap_config.c | 11 +- contrib/wpa/src/ap/ap_config.h | 3 + contrib/wpa/src/ap/beacon.c | 79 +- contrib/wpa/src/ap/ctrl_iface_ap.c | 56 +- contrib/wpa/src/ap/dhcp_snoop.c | 2 + contrib/wpa/src/ap/dpp_hostapd.c | 19 +- contrib/wpa/src/ap/hostapd.h | 2 + contrib/wpa/src/ap/hw_features.c | 2 + contrib/wpa/src/ap/ieee802_11.c | 388 +++- contrib/wpa/src/ap/ieee802_11.h | 2 + contrib/wpa/src/ap/ieee802_11_he.c | 3 + contrib/wpa/src/ap/ndisc_snoop.c | 2 + contrib/wpa/src/ap/neighbor_db.c | 8 +- contrib/wpa/src/ap/neighbor_db.h | 3 +- contrib/wpa/src/ap/wnm_ap.c | 12 +- contrib/wpa/src/ap/wnm_ap.h | 4 +- contrib/wpa/src/ap/wpa_auth.c | 18 +- contrib/wpa/src/ap/wpa_auth_ft.c | 16 +- contrib/wpa/src/ap/wps_hostapd.c | 5 + contrib/wpa/src/common/dpp.c | 175 +- contrib/wpa/src/common/dpp.h | 30 +- contrib/wpa/src/common/dpp_auth.c | 18 +- contrib/wpa/src/common/dpp_backup.c | 75 +- contrib/wpa/src/common/dpp_crypto.c | 1885 +++++--------------- contrib/wpa/src/common/dpp_i.h | 70 +- contrib/wpa/src/common/dpp_pkex.c | 280 ++- contrib/wpa/src/common/dpp_reconfig.c | 34 +- contrib/wpa/src/common/dpp_tcp.c | 13 +- contrib/wpa/src/common/hw_features_common.c | 25 +- contrib/wpa/src/common/ieee802_11_common.c | 44 +- contrib/wpa/src/common/ieee802_11_common.h | 2 + contrib/wpa/src/common/ieee802_11_defs.h | 56 + contrib/wpa/src/common/ptksa_cache.c | 18 +- contrib/wpa/src/common/qca-vendor.h | 665 ++++++- contrib/wpa/src/common/sae.c | 12 +- contrib/wpa/src/common/wpa_common.c | 5 + contrib/wpa/src/common/wpa_common.h | 1 + contrib/wpa/src/common/wpa_ctrl.h | 8 + contrib/wpa/src/crypto/crypto.h | 371 +++- contrib/wpa/src/crypto/crypto_internal-rsa.c | 2 +- contrib/wpa/src/crypto/crypto_openssl.c | 1119 ++++++++++-- contrib/wpa/src/crypto/crypto_wolfssl.c | 8 +- contrib/wpa/src/crypto/random.c | 42 +- contrib/wpa/src/crypto/tls_openssl.c | 23 + contrib/wpa/src/drivers/driver.h | 6 +- contrib/wpa/src/drivers/driver_common.c | 2 +- contrib/wpa/src/drivers/driver_hostap.h | 2 - contrib/wpa/src/drivers/driver_macsec_qca.c | 58 +- contrib/wpa/src/drivers/driver_ndis.c | 16 +- contrib/wpa/src/drivers/driver_nl80211.c | 29 +- contrib/wpa/src/drivers/driver_nl80211.h | 1 + contrib/wpa/src/drivers/driver_nl80211_capa.c | 2 +- contrib/wpa/src/eap_peer/eap_proxy_dummy.c | 2 +- contrib/wpa/src/eap_peer/eap_teap.c | 10 +- contrib/wpa/src/eap_peer/eap_tls_common.h | 2 +- contrib/wpa/src/eap_server/eap_tls_common.h | 2 +- contrib/wpa/src/l2_packet/l2_packet_none.c | 2 +- contrib/wpa/src/p2p/p2p.c | 4 +- contrib/wpa/src/p2p/p2p_build.c | 2 +- contrib/wpa/src/p2p/p2p_go_neg.c | 4 +- contrib/wpa/src/p2p/p2p_i.h | 3 +- contrib/wpa/src/p2p/p2p_pd.c | 2 +- contrib/wpa/src/pae/ieee802_1x_kay.c | 10 +- contrib/wpa/src/radius/radius_client.c | 5 +- contrib/wpa/src/rsn_supp/pmksa_cache.c | 92 +- contrib/wpa/src/rsn_supp/pmksa_cache.h | 9 + contrib/wpa/src/rsn_supp/tdls.c | 43 +- contrib/wpa/src/rsn_supp/wpa.c | 27 +- contrib/wpa/src/rsn_supp/wpa.h | 6 + contrib/wpa/src/rsn_supp/wpa_i.h | 3 +- contrib/wpa/src/utils/config.c | 18 +- contrib/wpa/src/utils/eloop.c | 25 +- contrib/wpa/src/wps/wps.c | 2 +- contrib/wpa/src/wps/wps_defs.h | 2 +- contrib/wpa/src/wps/wps_registrar.c | 26 +- contrib/wpa/src/wps/wps_upnp.c | 2 +- contrib/wpa/wpa_supplicant/Android.mk | 3 +- contrib/wpa/wpa_supplicant/ChangeLog | 3 +- contrib/wpa/wpa_supplicant/Makefile | 12 +- contrib/wpa/wpa_supplicant/README | 84 + contrib/wpa/wpa_supplicant/ap.c | 126 +- contrib/wpa/wpa_supplicant/ap.h | 1 + contrib/wpa/wpa_supplicant/config.c | 50 +- contrib/wpa/wpa_supplicant/config.h | 11 + contrib/wpa/wpa_supplicant/config_file.c | 13 + contrib/wpa/wpa_supplicant/config_none.c | 2 +- contrib/wpa/wpa_supplicant/config_ssid.h | 16 + contrib/wpa/wpa_supplicant/ctrl_iface.c | 623 ++++++- .../wpa_supplicant/doc/docbook/wpa_supplicant.sgml | 2 +- contrib/wpa/wpa_supplicant/eapol_test.py | 37 +- contrib/wpa/wpa_supplicant/events.c | 237 ++- contrib/wpa/wpa_supplicant/gas_query.c | 10 - contrib/wpa/wpa_supplicant/gas_query.h | 1 - contrib/wpa/wpa_supplicant/mesh.c | 31 + contrib/wpa/wpa_supplicant/mesh_mpm.c | 10 +- contrib/wpa/wpa_supplicant/notify.c | 10 +- contrib/wpa/wpa_supplicant/op_classes.c | 8 +- contrib/wpa/wpa_supplicant/p2p_supplicant.c | 164 +- contrib/wpa/wpa_supplicant/p2p_supplicant.h | 5 +- contrib/wpa/wpa_supplicant/p2p_supplicant_sd.c | 4 +- contrib/wpa/wpa_supplicant/preauth_test.c | 6 +- contrib/wpa/wpa_supplicant/robust_av.c | 1332 ++++++++++++++ contrib/wpa/wpa_supplicant/scan.c | 57 +- .../systemd/wpa_supplicant.service.in | 1 + contrib/wpa/wpa_supplicant/wpa_cli.c | 47 + contrib/wpa/wpa_supplicant/wpa_supplicant.c | 284 ++- contrib/wpa/wpa_supplicant/wpa_supplicant.conf | 2 +- contrib/wpa/wpa_supplicant/wpa_supplicant_i.h | 138 +- contrib/wpa/wpa_supplicant/wpas_glue.c | 2 + lib/libc/net/sctp_sys_calls.c | 6 +- libexec/rc/rc.d/Makefile | 1 - share/man/man5/src.conf.5 | 10 +- sys/conf/files | 2 + sys/conf/options | 1 + sys/dev/amdtemp/amdtemp.c | 3 +- sys/dev/bce/if_bce.c | 2 +- sys/dev/e1000/em_txrx.c | 3 +- sys/dev/e1000/if_em.h | 1 + sys/dev/hyperv/netvsc/if_hn.c | 49 +- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c | 15 +- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 2 +- sys/dev/mps/mps_sas.c | 38 +- sys/fs/nfs/nfs_commonacl.c | 6 +- sys/fs/nfs/nfs_commonsubs.c | 10 - sys/fs/nfsserver/nfs_nfsdserv.c | 3 +- sys/kern/subr_bus.c | 2 +- sys/kern/subr_epoch.c | 40 +- sys/kern/subr_witness.c | 4 +- sys/kern/uipc_ktls.c | 12 +- sys/modules/i2c/Makefile | 3 +- sys/net/if.c | 3 +- sys/net/rss_config.c | 5 + sys/netinet/cc/cc.c | 7 +- sys/netinet/in_pcb.c | 1028 ++++++----- sys/netinet/in_pcb.h | 319 +++- sys/netinet/in_pcb_var.h | 7 - sys/netinet/in_pcbgroup.c | 566 ++++++ sys/netinet/in_rss.c | 5 + sys/netinet/ip_divert.c | 75 +- sys/netinet/ip_gre.c | 18 +- sys/netinet/ip_input.c | 3 +- sys/netinet/raw_ip.c | 288 +-- sys/netinet/tcp_hpts.c | 990 +++++----- sys/netinet/tcp_hpts.h | 116 +- sys/netinet/tcp_input.c | 2 + sys/netinet/tcp_lro.c | 5 +- sys/netinet/tcp_stacks/bbr.c | 24 +- sys/netinet/tcp_stacks/rack.c | 86 +- sys/netinet/tcp_subr.c | 79 +- sys/netinet/tcp_syncache.c | 5 +- sys/netinet/tcp_timewait.c | 4 - sys/netinet/tcp_var.h | 2 + sys/netinet/udp_usrreq.c | 305 ++-- sys/netinet/udp_var.h | 10 + sys/netinet6/icmp6.c | 171 +- sys/netinet6/in6_pcb.c | 368 +++- sys/netinet6/in6_pcb.h | 10 + sys/netinet6/in6_pcbgroup.c | 153 ++ sys/netinet6/in6_rss.c | 5 + sys/netinet6/ip6_gre.c | 19 +- sys/netinet6/raw_ip6.c | 169 +- sys/netinet6/udp6_usrreq.c | 281 +-- sys/sys/epoch.h | 3 - sys/sys/libkern.h | 16 - tools/build/mk/OptionalObsoleteFiles.inc | 205 +-- tools/build/options/WITHOUT_CXX | 8 +- tools/build/options/WITH_CXX | 4 +- tools/tools/git/hooks/prepare-commit-msg | 1 + 175 files changed, 10597 insertions(+), 4453 deletions(-) diff --cc ObsoleteFiles.inc index 984437f481fd,000000000000..ac84263ab1b7 mode 100644,000000..100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@@ -1,16224 -1,0 +1,16205 @@@ +# +# $FreeBSD$ +# +# This file lists old files (OLD_FILES), libraries (OLD_LIBS) and +# directories (OLD_DIRS) which should get removed at an update. Recently +# removed entries first (with the date as a comment). Dynamic libraries are +# special cased (OLD_LIBS). Static libraries or the generic links to +# the dynamic libraries (lib*.so) should (if you don't know why to make an +# exception, make this a "must") be viewed as normal files (OLD_FILES). +# +# In case of a complete directory hierarchy the sorting is in depth first +# order. +# +# Files that are installed or removed depending on some build option +# are to be listed in /usr/src/tools/build/mk/OptionalObsoleteFiles.inc +# instead of in this file. +# +# Before you commit changes to this file please check if any entries in +# tools/build/mk/OptionalObsoleteFiles.inc can be removed. The following +# command tells which files are listed more than once regardless of some +# architecture specific conditionals, so you can not blindly trust the +# output: +# ( grep '+=' /usr/src/ObsoleteFiles.inc | sort -u ; \ +# grep '+=' /usr/src/tools/build/mk/OptionalObsoleteFiles.inc | sort -u) | \ +# sort | uniq -d +# +# To find regular duplicates not dependent on optional components, you can +# also use something that will not give you false positives, e.g.: +# for t in `make -V TARGETS universe`; do +# __MAKE_CONF=/dev/null make -f Makefile.inc1 TARGET=$t \ +# -V OLD_FILES -V OLD_LIBS -V OLD_DIRS check-old | \ +# xargs -n1 | sort | uniq -d; +# done +# +# For optional components, you can use the following to see if some entries +# in OptionalObsoleteFiles.inc have been obsoleted by ObsoleteFiles.inc +# for o in tools/build/options/WITH*; do +# __MAKE_CONF=/dev/null make -f Makefile.inc1 -D${o##*/} \ +# -V OLD_FILES -V OLD_LIBS -V OLD_DIRS check-old | \ +# xargs -n1 | sort | uniq -d; +# done + +# 20211125 Old SCSI drivers removed +OLD_FILES+=usr/share/man/man4/amr.4.gz +OLD_FILES+=usr/share/man/man4/esp.4.gz +OLD_FILES+=usr/share/man/man4/iir.4.gz +OLD_FILES+=usr/share/man/man4/mly.4.gz +OLD_FILES+=usr/share/man/man4/twa.4.gz + +# 20211120 +OLD_FILES+=usr/share/man/man9/kernel_vmount.9.gz + +# 20211115: vm_page busy functions removed +OLD_FILES+=share/man/man9/vm_page_sbusy.9.gz +OLD_FILES+=share/man/man9/vm_page_xbusy.9.gz +OLD_FILES+=share/man/man9/vm_page_sleep_if_busy.9.gz + +# 20211113: new clang import which bumps version from 12.0.1 to 13.0.0. +OLD_FILES+=usr/lib/clang/12.0.1/include/cuda_wrappers/algorithm +OLD_FILES+=usr/lib/clang/12.0.1/include/cuda_wrappers/complex +OLD_FILES+=usr/lib/clang/12.0.1/include/cuda_wrappers/new +OLD_DIRS+=usr/lib/clang/12.0.1/include/cuda_wrappers +OLD_FILES+=usr/lib/clang/12.0.1/include/fuzzer/FuzzedDataProvider.h +OLD_DIRS+=usr/lib/clang/12.0.1/include/fuzzer +OLD_FILES+=usr/lib/clang/12.0.1/include/openmp_wrappers/__clang_openmp_device_functions.h +OLD_FILES+=usr/lib/clang/12.0.1/include/openmp_wrappers/cmath +OLD_FILES+=usr/lib/clang/12.0.1/include/openmp_wrappers/complex +OLD_FILES+=usr/lib/clang/12.0.1/include/openmp_wrappers/complex.h +OLD_FILES+=usr/lib/clang/12.0.1/include/openmp_wrappers/complex_cmath.h +OLD_FILES+=usr/lib/clang/12.0.1/include/openmp_wrappers/math.h +OLD_FILES+=usr/lib/clang/12.0.1/include/openmp_wrappers/new +OLD_DIRS+=usr/lib/clang/12.0.1/include/openmp_wrappers +OLD_FILES+=usr/lib/clang/12.0.1/include/ppc_wrappers/emmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/ppc_wrappers/mm_malloc.h +OLD_FILES+=usr/lib/clang/12.0.1/include/ppc_wrappers/mmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/ppc_wrappers/pmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/ppc_wrappers/smmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/ppc_wrappers/tmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/ppc_wrappers/xmmintrin.h +OLD_DIRS+=usr/lib/clang/12.0.1/include/ppc_wrappers +OLD_FILES+=usr/lib/clang/12.0.1/include/profile/InstrProfData.inc +OLD_DIRS+=usr/lib/clang/12.0.1/include/profile +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/hwasan_interface.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/netbsd_syscall_hooks.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/scudo_interface.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/tsan_interface.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/tsan_interface_atomic.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sanitizer/ubsan_interface.h +OLD_DIRS+=usr/lib/clang/12.0.1/include/sanitizer +OLD_FILES+=usr/lib/clang/12.0.1/include/xray/xray_interface.h +OLD_FILES+=usr/lib/clang/12.0.1/include/xray/xray_log_interface.h +OLD_FILES+=usr/lib/clang/12.0.1/include/xray/xray_records.h +OLD_DIRS+=usr/lib/clang/12.0.1/include/xray +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_cuda_cmath.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_cuda_complex_builtins.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_cuda_device_functions.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_cuda_intrinsics.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_cuda_libdevice_declares.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_cuda_math.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_cuda_math_forward_declares.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_cuda_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_hip_cmath.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_hip_libdevice_declares.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_hip_math.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__clang_hip_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/12.0.1/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/12.0.1/include/adxintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/altivec.h +OLD_FILES+=usr/lib/clang/12.0.1/include/ammintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/amxintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/arm64intr.h +OLD_FILES+=usr/lib/clang/12.0.1/include/arm_acle.h +OLD_FILES+=usr/lib/clang/12.0.1/include/arm_bf16.h +OLD_FILES+=usr/lib/clang/12.0.1/include/arm_cde.h +OLD_FILES+=usr/lib/clang/12.0.1/include/arm_cmse.h +OLD_FILES+=usr/lib/clang/12.0.1/include/arm_fp16.h +OLD_FILES+=usr/lib/clang/12.0.1/include/arm_mve.h +OLD_FILES+=usr/lib/clang/12.0.1/include/arm_neon.h +OLD_FILES+=usr/lib/clang/12.0.1/include/arm_sve.h +OLD_FILES+=usr/lib/clang/12.0.1/include/armintr.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512bf16intrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512bitalgintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512ifmaintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512ifmavlintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512pfintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vbmi2intrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vbmiintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vbmivlintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vlbf16intrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vlbitalgintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vlcdintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vlvbmi2intrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vlvnniintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vlvp2intersectintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vnniintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vp2intersectintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vpopcntdqintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avx512vpopcntdqvlintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avxintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/avxvnniintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/cet.h +OLD_FILES+=usr/lib/clang/12.0.1/include/cetintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/cldemoteintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/clflushoptintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/clwbintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/clzerointrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/cpuid.h +OLD_FILES+=usr/lib/clang/12.0.1/include/emmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/enqcmdintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/float.h +OLD_FILES+=usr/lib/clang/12.0.1/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/gfniintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/hresetintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/htmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/immintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/intrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/inttypes.h +OLD_FILES+=usr/lib/clang/12.0.1/include/invpcidintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/iso646.h +OLD_FILES+=usr/lib/clang/12.0.1/include/keylockerintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/limits.h +OLD_FILES+=usr/lib/clang/12.0.1/include/lwpintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/12.0.1/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/12.0.1/include/mmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/module.modulemap +OLD_FILES+=usr/lib/clang/12.0.1/include/movdirintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/msa.h +OLD_FILES+=usr/lib/clang/12.0.1/include/mwaitxintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/omp-tools.h +OLD_FILES+=usr/lib/clang/12.0.1/include/omp.h +OLD_FILES+=usr/lib/clang/12.0.1/include/ompt.h +OLD_FILES+=usr/lib/clang/12.0.1/include/opencl-c-base.h +OLD_FILES+=usr/lib/clang/12.0.1/include/opencl-c.h +OLD_FILES+=usr/lib/clang/12.0.1/include/pconfigintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/pkuintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/ptwriteintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/s390intrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/serializeintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/sgxintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/shaintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/smmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/stdalign.h +OLD_FILES+=usr/lib/clang/12.0.1/include/stdarg.h +OLD_FILES+=usr/lib/clang/12.0.1/include/stdatomic.h +OLD_FILES+=usr/lib/clang/12.0.1/include/stdbool.h +OLD_FILES+=usr/lib/clang/12.0.1/include/stddef.h +OLD_FILES+=usr/lib/clang/12.0.1/include/stdint.h +OLD_FILES+=usr/lib/clang/12.0.1/include/stdnoreturn.h +OLD_FILES+=usr/lib/clang/12.0.1/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/tgmath.h +OLD_FILES+=usr/lib/clang/12.0.1/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/tsxldtrkintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/uintrintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/unwind.h +OLD_FILES+=usr/lib/clang/12.0.1/include/vadefs.h +OLD_FILES+=usr/lib/clang/12.0.1/include/vaesintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/varargs.h +OLD_FILES+=usr/lib/clang/12.0.1/include/vecintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/vpclmulqdqintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/waitpkgintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/wasm_simd128.h +OLD_FILES+=usr/lib/clang/12.0.1/include/wbnoinvdintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/x86gprintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/x86intrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/xopintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/xsavecintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/xsaveintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/xsaveoptintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/xsavesintrin.h +OLD_FILES+=usr/lib/clang/12.0.1/include/xtestintrin.h +OLD_DIRS+=usr/lib/clang/12.0.1/include +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-aarch64.so +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-arm.so +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-armhf.so +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-preinit-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-preinit-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-preinit-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan-x86_64.so +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan_cxx-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan_cxx-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.cfi-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.cfi-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.cfi-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.cfi-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.cfi-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.cfi_diag-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.cfi_diag-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.cfi_diag-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.cfi_diag-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.cfi_diag-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.dd-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.dd-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.fuzzer-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.fuzzer-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.msan-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.msan-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.msan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.msan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.profile-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.profile-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.profile-powerpc.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.profile-powerpc64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.profile-powerpc64le.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.safestack-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.safestack-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.safestack-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.stats-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.stats-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.stats-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.stats-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.stats_client-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.stats_client-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.stats_client-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.stats_client-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.tsan-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.tsan-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_minimal-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_standalone-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-basic-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-basic-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-basic-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-basic-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-fdr-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-fdr-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-fdr-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-fdr-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-profiling-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-profiling-arm.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-profiling-armhf.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-profiling-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.1/lib/freebsd/libclang_rt.xray-x86_64.a +OLD_DIRS+=usr/lib/clang/12.0.1/lib/freebsd +OLD_DIRS+=usr/lib/clang/12.0.1/lib +OLD_DIRS+=usr/lib/clang/12.0.1 + +# 20211113: new libc++ import which bumps version from 12.0.1 to 13.0.0. +OLD_FILES+=usr/include/c++/v1/__functional_03 +OLD_FILES+=usr/include/c++/v1/__functional_base_03 +OLD_FILES+=usr/include/c++/v1/__memory/base.h +OLD_FILES+=usr/include/c++/v1/__memory/utilities.h +OLD_FILES+=usr/include/c++/v1/__sso_allocator +OLD_FILES+=usr/include/c++/v1/tr1/__availability +OLD_FILES+=usr/include/c++/v1/tr1/__bit_reference +OLD_FILES+=usr/include/c++/v1/tr1/__bits +OLD_FILES+=usr/include/c++/v1/tr1/__bsd_locale_defaults.h +OLD_FILES+=usr/include/c++/v1/tr1/__bsd_locale_fallbacks.h +OLD_FILES+=usr/include/c++/v1/tr1/__config +OLD_FILES+=usr/include/c++/v1/tr1/__debug +OLD_FILES+=usr/include/c++/v1/tr1/__errc +OLD_FILES+=usr/include/c++/v1/tr1/__functional_03 +OLD_FILES+=usr/include/c++/v1/tr1/__functional_base +OLD_FILES+=usr/include/c++/v1/tr1/__functional_base_03 +OLD_FILES+=usr/include/c++/v1/tr1/__hash_table +OLD_FILES+=usr/include/c++/v1/tr1/__libcpp_version +OLD_FILES+=usr/include/c++/v1/tr1/__locale +OLD_FILES+=usr/include/c++/v1/tr1/__mutex_base +OLD_FILES+=usr/include/c++/v1/tr1/__node_handle +OLD_FILES+=usr/include/c++/v1/tr1/__nullptr +OLD_FILES+=usr/include/c++/v1/tr1/__split_buffer +OLD_FILES+=usr/include/c++/v1/tr1/__sso_allocator +OLD_FILES+=usr/include/c++/v1/tr1/__std_stream +OLD_FILES+=usr/include/c++/v1/tr1/__string +OLD_FILES+=usr/include/c++/v1/tr1/__threading_support +OLD_FILES+=usr/include/c++/v1/tr1/__tree +OLD_FILES+=usr/include/c++/v1/tr1/__tuple +OLD_FILES+=usr/include/c++/v1/tr1/__undef_macros +OLD_FILES+=usr/include/c++/v1/tr1/algorithm +OLD_FILES+=usr/include/c++/v1/tr1/any +OLD_FILES+=usr/include/c++/v1/tr1/array +OLD_FILES+=usr/include/c++/v1/tr1/atomic +OLD_FILES+=usr/include/c++/v1/tr1/barrier +OLD_FILES+=usr/include/c++/v1/tr1/bit +OLD_FILES+=usr/include/c++/v1/tr1/bitset +OLD_FILES+=usr/include/c++/v1/tr1/cassert +OLD_FILES+=usr/include/c++/v1/tr1/ccomplex +OLD_FILES+=usr/include/c++/v1/tr1/cctype +OLD_FILES+=usr/include/c++/v1/tr1/cerrno +OLD_FILES+=usr/include/c++/v1/tr1/cfenv +OLD_FILES+=usr/include/c++/v1/tr1/cfloat +OLD_FILES+=usr/include/c++/v1/tr1/charconv +OLD_FILES+=usr/include/c++/v1/tr1/chrono +OLD_FILES+=usr/include/c++/v1/tr1/cinttypes +OLD_FILES+=usr/include/c++/v1/tr1/ciso646 +OLD_FILES+=usr/include/c++/v1/tr1/climits +OLD_FILES+=usr/include/c++/v1/tr1/clocale +OLD_FILES+=usr/include/c++/v1/tr1/cmath +OLD_FILES+=usr/include/c++/v1/tr1/codecvt +OLD_FILES+=usr/include/c++/v1/tr1/compare +OLD_FILES+=usr/include/c++/v1/tr1/complex +OLD_FILES+=usr/include/c++/v1/tr1/complex.h +OLD_FILES+=usr/include/c++/v1/tr1/concepts +OLD_FILES+=usr/include/c++/v1/tr1/condition_variable +OLD_FILES+=usr/include/c++/v1/tr1/csetjmp +OLD_FILES+=usr/include/c++/v1/tr1/csignal +OLD_FILES+=usr/include/c++/v1/tr1/cstdarg +OLD_FILES+=usr/include/c++/v1/tr1/cstdbool +OLD_FILES+=usr/include/c++/v1/tr1/cstddef +OLD_FILES+=usr/include/c++/v1/tr1/cstdint +OLD_FILES+=usr/include/c++/v1/tr1/cstdio +OLD_FILES+=usr/include/c++/v1/tr1/cstdlib +OLD_FILES+=usr/include/c++/v1/tr1/cstring +OLD_FILES+=usr/include/c++/v1/tr1/ctgmath +OLD_FILES+=usr/include/c++/v1/tr1/ctime +OLD_FILES+=usr/include/c++/v1/tr1/ctype.h +OLD_FILES+=usr/include/c++/v1/tr1/cwchar +OLD_FILES+=usr/include/c++/v1/tr1/cwctype +OLD_FILES+=usr/include/c++/v1/tr1/deque +OLD_FILES+=usr/include/c++/v1/tr1/errno.h +OLD_FILES+=usr/include/c++/v1/tr1/exception +OLD_FILES+=usr/include/c++/v1/tr1/execution +OLD_FILES+=usr/include/c++/v1/tr1/fenv.h +OLD_FILES+=usr/include/c++/v1/tr1/filesystem +OLD_FILES+=usr/include/c++/v1/tr1/float.h +OLD_FILES+=usr/include/c++/v1/tr1/forward_list +OLD_FILES+=usr/include/c++/v1/tr1/fstream +OLD_FILES+=usr/include/c++/v1/tr1/functional +OLD_FILES+=usr/include/c++/v1/tr1/future +OLD_FILES+=usr/include/c++/v1/tr1/initializer_list +OLD_FILES+=usr/include/c++/v1/tr1/inttypes.h +OLD_FILES+=usr/include/c++/v1/tr1/iomanip +OLD_FILES+=usr/include/c++/v1/tr1/ios +OLD_FILES+=usr/include/c++/v1/tr1/iosfwd +OLD_FILES+=usr/include/c++/v1/tr1/iostream +OLD_FILES+=usr/include/c++/v1/tr1/istream +OLD_FILES+=usr/include/c++/v1/tr1/iterator +OLD_FILES+=usr/include/c++/v1/tr1/latch +OLD_FILES+=usr/include/c++/v1/tr1/limits +OLD_FILES+=usr/include/c++/v1/tr1/limits.h +OLD_FILES+=usr/include/c++/v1/tr1/list +OLD_FILES+=usr/include/c++/v1/tr1/locale +OLD_FILES+=usr/include/c++/v1/tr1/locale.h +OLD_FILES+=usr/include/c++/v1/tr1/map +OLD_FILES+=usr/include/c++/v1/tr1/math.h +OLD_FILES+=usr/include/c++/v1/tr1/memory +OLD_FILES+=usr/include/c++/v1/tr1/mutex +OLD_FILES+=usr/include/c++/v1/tr1/new +OLD_FILES+=usr/include/c++/v1/tr1/numbers +OLD_FILES+=usr/include/c++/v1/tr1/numeric +OLD_FILES+=usr/include/c++/v1/tr1/optional +OLD_FILES+=usr/include/c++/v1/tr1/ostream +OLD_FILES+=usr/include/c++/v1/tr1/queue +OLD_FILES+=usr/include/c++/v1/tr1/random +OLD_FILES+=usr/include/c++/v1/tr1/ratio +OLD_FILES+=usr/include/c++/v1/tr1/regex +OLD_FILES+=usr/include/c++/v1/tr1/scoped_allocator +OLD_FILES+=usr/include/c++/v1/tr1/semaphore +OLD_FILES+=usr/include/c++/v1/tr1/set +OLD_FILES+=usr/include/c++/v1/tr1/setjmp.h +OLD_FILES+=usr/include/c++/v1/tr1/shared_mutex +OLD_FILES+=usr/include/c++/v1/tr1/span +OLD_FILES+=usr/include/c++/v1/tr1/sstream +OLD_FILES+=usr/include/c++/v1/tr1/stack +OLD_FILES+=usr/include/c++/v1/tr1/stdbool.h +OLD_FILES+=usr/include/c++/v1/tr1/stddef.h +OLD_FILES+=usr/include/c++/v1/tr1/stdexcept +OLD_FILES+=usr/include/c++/v1/tr1/stdint.h +OLD_FILES+=usr/include/c++/v1/tr1/stdio.h +OLD_FILES+=usr/include/c++/v1/tr1/stdlib.h +OLD_FILES+=usr/include/c++/v1/tr1/streambuf +OLD_FILES+=usr/include/c++/v1/tr1/string +OLD_FILES+=usr/include/c++/v1/tr1/string.h +OLD_FILES+=usr/include/c++/v1/tr1/string_view +OLD_FILES+=usr/include/c++/v1/tr1/strstream +OLD_FILES+=usr/include/c++/v1/tr1/system_error +OLD_FILES+=usr/include/c++/v1/tr1/tgmath.h +OLD_FILES+=usr/include/c++/v1/tr1/thread +OLD_FILES+=usr/include/c++/v1/tr1/tuple +OLD_FILES+=usr/include/c++/v1/tr1/type_traits +OLD_FILES+=usr/include/c++/v1/tr1/typeindex +OLD_FILES+=usr/include/c++/v1/tr1/typeinfo +OLD_FILES+=usr/include/c++/v1/tr1/unordered_map +OLD_FILES+=usr/include/c++/v1/tr1/unordered_set +OLD_FILES+=usr/include/c++/v1/tr1/utility +OLD_FILES+=usr/include/c++/v1/tr1/valarray +OLD_FILES+=usr/include/c++/v1/tr1/variant +OLD_FILES+=usr/include/c++/v1/tr1/vector +OLD_FILES+=usr/include/c++/v1/tr1/version +OLD_FILES+=usr/include/c++/v1/tr1/wchar.h +OLD_FILES+=usr/include/c++/v1/tr1/wctype.h +OLD_DIRS+=usr/include/c++/v1/tr1 + +# 20211027: libdialog shlib bumped to version 10 for dialog 1.3 +OLD_LIBS+=usr/lib/libdialog.so.9 +OLD_LIBS+=usr/lib/libdpv.so.2 +OLD_LIBS+=usr/lib32/libdialog.so.9 +OLD_LIBS+=usr/lib32/libdpv.so.2 + +# 20211026: retire obsolete iscsi initiator +OLD_FILES+=sbin/iscontrol +OLD_FILES+=usr/share/man/man4/iscsi_initiator.4.gz +OLD_FILES+=usr/share/man/man8/iscontrol.8.gz + +# 20211022 - OLD_FILES+=etc/rc.d/sppp - OLD_FILES+=rescue/spppcontrol +OLD_FILES+=sbin/spppcontrol +.if ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/cserial.h +.endif +OLD_FILES+=usr/include/net/if_sppp.h +OLD_FILES+=usr/include/netgraph/ng_sppp.h +OLD_FILES+=usr/share/man/man4/ng_sppp.4.gz +OLD_FILES+=usr/share/man/man4/sppp.4.gz +OLD_FILES+=usr/share/man/man8/spppcontrol.8.gz + - # 20211004: Removed sparc64 tests for lastcomm/sa - OLD_FILES+=usr/tests/usr.bin/lastcomm/v1-sparc64-acct.in - OLD_FILES+=usr/tests/usr.bin/lastcomm/v1-sparc64.out - OLD_FILES+=usr/tests/usr.bin/lastcomm/v2-sparc64-acct.in - OLD_FILES+=usr/tests/usr.bin/lastcomm/v2-sparc64.out - OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-sav.in - OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-sav.out - OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-u.out - OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-usr.in - OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-usr.out - OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-sav.in - OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-u.out - OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-usr.in - +# 20210929: +OLD_FILES+=usr/sbin/hcseriald +OLD_FILES+=usr/share/man/man8/hcseriald.8.gz + +# 20210929: Remove ng_h4 - OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_h4.h +OLD_FILES+=usr/share/man/man4/ng_h4.4.gz + +# 20210923: rename boot(9) to kern_reboot(9) +OLD_FILES+=usr/share/man/man9/boot.9.gz + +# 20210921: remove cloudabi +OLD_FILES+=usr/share/man/man4/cloudabi.4.gz - OLD_FILES+=usr/share/man/man4/cloudabi32.4.gz - OLD_FILES+=usr/share/man/man4/cloudabi64.4.gz + +# 20210906: stop installing {llvm,clang,lldb}-tblgen +OLD_FILES+=usr/bin/llvm-tblgen +OLD_FILES+=usr/bin/clang-tblgen +OLD_FILES+=usr/bin/lldb-tblgen +OLD_FILES+=usr/share/man/man1/llvm-tblgen.1.gz + +# 20210810: remove Pentium-related man pages and references +OLD_FILES+=usr/share/man/man3/pmc.p4.3.gz +OLD_FILES+=usr/share/man/man3/pmc.p5.3.gz +OLD_FILES+=usr/share/man/man3/pmc.p6.3.gz + +# 20210805: C.UTF-8 installed to the wrong location +OLD_FILES+=usr/share/C.UTF-8.LC_CTYPE + +# 20210619: new clang import which bumps version from 12.0.0 to 12.0.1. +OLD_FILES+=usr/lib/clang/12.0.0/include/cuda_wrappers/algorithm +OLD_FILES+=usr/lib/clang/12.0.0/include/cuda_wrappers/complex +OLD_FILES+=usr/lib/clang/12.0.0/include/cuda_wrappers/new +OLD_DIRS+=usr/lib/clang/12.0.0/include/cuda_wrappers +OLD_FILES+=usr/lib/clang/12.0.0/include/fuzzer/FuzzedDataProvider.h +OLD_DIRS+=usr/lib/clang/12.0.0/include/fuzzer +OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/__clang_openmp_device_functions.h +OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/cmath +OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/complex +OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/complex.h +OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/complex_cmath.h +OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/math.h +OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/new +OLD_DIRS+=usr/lib/clang/12.0.0/include/openmp_wrappers +OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/emmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/mm_malloc.h +OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/mmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/pmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/smmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/tmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/xmmintrin.h +OLD_DIRS+=usr/lib/clang/12.0.0/include/ppc_wrappers +OLD_FILES+=usr/lib/clang/12.0.0/include/profile/InstrProfData.inc +OLD_DIRS+=usr/lib/clang/12.0.0/include/profile +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/hwasan_interface.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/netbsd_syscall_hooks.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/scudo_interface.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/tsan_interface.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/tsan_interface_atomic.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/ubsan_interface.h +OLD_DIRS+=usr/lib/clang/12.0.0/include/sanitizer +OLD_FILES+=usr/lib/clang/12.0.0/include/xray/xray_interface.h +OLD_FILES+=usr/lib/clang/12.0.0/include/xray/xray_log_interface.h +OLD_FILES+=usr/lib/clang/12.0.0/include/xray/xray_records.h +OLD_DIRS+=usr/lib/clang/12.0.0/include/xray +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_cmath.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_complex_builtins.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_device_functions.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_intrinsics.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_libdevice_declares.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_math.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_math_forward_declares.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_hip_cmath.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_hip_libdevice_declares.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_hip_math.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_hip_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/12.0.0/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/12.0.0/include/adxintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/altivec.h +OLD_FILES+=usr/lib/clang/12.0.0/include/ammintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/amxintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/arm64intr.h +OLD_FILES+=usr/lib/clang/12.0.0/include/arm_acle.h +OLD_FILES+=usr/lib/clang/12.0.0/include/arm_bf16.h +OLD_FILES+=usr/lib/clang/12.0.0/include/arm_cde.h +OLD_FILES+=usr/lib/clang/12.0.0/include/arm_cmse.h +OLD_FILES+=usr/lib/clang/12.0.0/include/arm_fp16.h +OLD_FILES+=usr/lib/clang/12.0.0/include/arm_mve.h +OLD_FILES+=usr/lib/clang/12.0.0/include/arm_neon.h +OLD_FILES+=usr/lib/clang/12.0.0/include/arm_sve.h +OLD_FILES+=usr/lib/clang/12.0.0/include/armintr.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512bf16intrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512bitalgintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512ifmaintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512ifmavlintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512pfintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vbmi2intrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vbmiintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vbmivlintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlbf16intrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlbitalgintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlcdintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlvbmi2intrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlvnniintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlvp2intersectintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vnniintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vp2intersectintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vpopcntdqintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vpopcntdqvlintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avxintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/avxvnniintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/cet.h +OLD_FILES+=usr/lib/clang/12.0.0/include/cetintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/cldemoteintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/clflushoptintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/clwbintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/clzerointrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/cpuid.h +OLD_FILES+=usr/lib/clang/12.0.0/include/emmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/enqcmdintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/float.h +OLD_FILES+=usr/lib/clang/12.0.0/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/gfniintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/hresetintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/htmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/immintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/intrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/inttypes.h +OLD_FILES+=usr/lib/clang/12.0.0/include/invpcidintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/iso646.h +OLD_FILES+=usr/lib/clang/12.0.0/include/keylockerintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/limits.h +OLD_FILES+=usr/lib/clang/12.0.0/include/lwpintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/12.0.0/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/12.0.0/include/mmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/module.modulemap +OLD_FILES+=usr/lib/clang/12.0.0/include/movdirintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/msa.h +OLD_FILES+=usr/lib/clang/12.0.0/include/mwaitxintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/omp-tools.h +OLD_FILES+=usr/lib/clang/12.0.0/include/omp.h +OLD_FILES+=usr/lib/clang/12.0.0/include/ompt.h +OLD_FILES+=usr/lib/clang/12.0.0/include/opencl-c-base.h +OLD_FILES+=usr/lib/clang/12.0.0/include/opencl-c.h +OLD_FILES+=usr/lib/clang/12.0.0/include/pconfigintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/pkuintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/ptwriteintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/s390intrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/serializeintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/sgxintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/shaintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/smmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/stdalign.h +OLD_FILES+=usr/lib/clang/12.0.0/include/stdarg.h +OLD_FILES+=usr/lib/clang/12.0.0/include/stdatomic.h +OLD_FILES+=usr/lib/clang/12.0.0/include/stdbool.h +OLD_FILES+=usr/lib/clang/12.0.0/include/stddef.h +OLD_FILES+=usr/lib/clang/12.0.0/include/stdint.h +OLD_FILES+=usr/lib/clang/12.0.0/include/stdnoreturn.h +OLD_FILES+=usr/lib/clang/12.0.0/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/tgmath.h +OLD_FILES+=usr/lib/clang/12.0.0/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/tsxldtrkintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/uintrintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/unwind.h +OLD_FILES+=usr/lib/clang/12.0.0/include/vadefs.h +OLD_FILES+=usr/lib/clang/12.0.0/include/vaesintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/varargs.h +OLD_FILES+=usr/lib/clang/12.0.0/include/vecintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/vpclmulqdqintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/waitpkgintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/wasm_simd128.h +OLD_FILES+=usr/lib/clang/12.0.0/include/wbnoinvdintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/x86gprintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/x86intrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/xopintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/xsavecintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/xsaveintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/xsaveoptintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/xsavesintrin.h +OLD_FILES+=usr/lib/clang/12.0.0/include/xtestintrin.h +OLD_DIRS+=usr/lib/clang/12.0.0/include +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-aarch64.so +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-arm.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-arm.so +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-armhf.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-armhf.so +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-preinit-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-preinit-arm.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-preinit-armhf.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-x86_64.so +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan_cxx-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan_cxx-arm.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan_cxx-armhf.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi-arm.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi-armhf.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi-i386.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi_diag-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi_diag-arm.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi_diag-armhf.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi_diag-i386.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi_diag-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.dd-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.dd-x86_64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.fuzzer-aarch64.a +OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.fuzzer-x86_64.a *** 173420 LINES SKIPPED *** From nobody Thu Dec 2 22:47:56 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A780618C45B5; Thu, 2 Dec 2021 22:47: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 4J4rhF2PdWz4VgT; Thu, 2 Dec 2021 22:47:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DA8025AC4; Thu, 2 Dec 2021 22:47: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 1B2Mlv7a089208; Thu, 2 Dec 2021 22:47:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2Mluh8089207; Thu, 2 Dec 2021 22:47:56 GMT (envelope-from git) Date: Thu, 2 Dec 2021 22:47:56 GMT Message-Id: <202112022247.1B2Mluh8089207@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: db0ac6ded611 - main - Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db0ac6ded61105caab4700aeac255328d4238dc4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638485277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6QGWJfnQd4Lupjs8e07C+TrWiuG1/0AUK/B9jFPy71c=; b=r5HUfqFkraTpqL/7EGlC64PHNkF5AxYHa80urfFcAdogbK3LUkUkKWdD+f0QglV/Hy5Eel bzzzSoxvtzr59zNUbSL0oiiT6oFh7Fn6DVqHaXdZxiV+g25bY5Agu6xxY4aR0cVrmqtxCV hVeoQN4H7w2mbm12K/Exsgx2HidNFAeJh4dzKcQdzv71OelQMts8TrQuHTzbfiSpWK2Scj Ppkp/5Z0pjzuKzAk81X/FxLL0/rjJFwfTYNIVDIFId/C3DbJU4TMeM6b+D8RMyA0OJsUpH 7/2nYUA2WkAq2SD4zPbVFqeJZKZTD78YqUGlu4HbQt6/uPP4z7y2q4ezE179qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638485277; a=rsa-sha256; cv=none; b=QBtwW+X5I6vQJBX9CAFbjFaQapeQim8FR6Hh+BF4ZKoyPOYGbxJPF75v7plzUcfZNUTUcL saL6c9di2JU9Hf/idCBDIM7Tde/VsOOBkPFxopEDQaaWGrq7ypNDleacZq6B5HdS04Ovvo 7p8duuIlcTslCCOmmlWDU/Wazqt1l1M61XxSk+lcMKzaG/rpcUtUnsUI6WqJVOIAHfm6Fc TLjFxcgGAkxWK2votppA8Pji42imgI7Yxvv7c5JD8F2cpXQdChr8EpMNY3n27n81c84ceA jPBQAwc2PB/CehIOUW3d7nNEOJB6qRZdCUt6cjNSHiB95efMqH2Ss5mg5aENOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=db0ac6ded61105caab4700aeac255328d4238dc4 commit db0ac6ded61105caab4700aeac255328d4238dc4 Author: Cy Schubert AuthorDate: 2021-12-02 22:45:04 +0000 Commit: Cy Schubert CommitDate: 2021-12-02 22:45:04 +0000 Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816" This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b. A mismerge of a merge to catch up to main resulted in files being committed which should not have been. --- ObsoleteFiles.inc | 19 + contrib/wpa/hostapd/config_file.c | 25 +- contrib/wpa/hostapd/ctrl_iface.c | 43 +- contrib/wpa/hostapd/hlr_auc_gw.milenage_db | 2 +- contrib/wpa/hostapd/hostapd.conf | 10 +- contrib/wpa/hostapd/hostapd_cli.c | 2 +- contrib/wpa/src/ap/acs.c | 4 +- contrib/wpa/src/ap/ap_config.c | 11 +- contrib/wpa/src/ap/ap_config.h | 3 - contrib/wpa/src/ap/beacon.c | 79 +- contrib/wpa/src/ap/ctrl_iface_ap.c | 56 +- contrib/wpa/src/ap/dhcp_snoop.c | 2 - contrib/wpa/src/ap/dpp_hostapd.c | 19 +- contrib/wpa/src/ap/hostapd.h | 2 - contrib/wpa/src/ap/hw_features.c | 2 - contrib/wpa/src/ap/ieee802_11.c | 388 +--- contrib/wpa/src/ap/ieee802_11.h | 2 - contrib/wpa/src/ap/ieee802_11_he.c | 3 - contrib/wpa/src/ap/ndisc_snoop.c | 2 - contrib/wpa/src/ap/neighbor_db.c | 8 +- contrib/wpa/src/ap/neighbor_db.h | 3 +- contrib/wpa/src/ap/wnm_ap.c | 12 +- contrib/wpa/src/ap/wnm_ap.h | 4 +- contrib/wpa/src/ap/wpa_auth.c | 18 +- contrib/wpa/src/ap/wpa_auth_ft.c | 16 +- contrib/wpa/src/ap/wps_hostapd.c | 5 - contrib/wpa/src/common/dpp.c | 175 +- contrib/wpa/src/common/dpp.h | 30 +- contrib/wpa/src/common/dpp_auth.c | 18 +- contrib/wpa/src/common/dpp_backup.c | 75 +- contrib/wpa/src/common/dpp_crypto.c | 1885 +++++++++++++++----- contrib/wpa/src/common/dpp_i.h | 70 +- contrib/wpa/src/common/dpp_pkex.c | 280 +-- contrib/wpa/src/common/dpp_reconfig.c | 34 +- contrib/wpa/src/common/dpp_tcp.c | 13 +- contrib/wpa/src/common/hw_features_common.c | 25 +- contrib/wpa/src/common/ieee802_11_common.c | 44 +- contrib/wpa/src/common/ieee802_11_common.h | 2 - contrib/wpa/src/common/ieee802_11_defs.h | 56 - contrib/wpa/src/common/ptksa_cache.c | 18 +- contrib/wpa/src/common/qca-vendor.h | 665 +------ contrib/wpa/src/common/sae.c | 12 +- contrib/wpa/src/common/wpa_common.c | 5 - contrib/wpa/src/common/wpa_common.h | 1 - contrib/wpa/src/common/wpa_ctrl.h | 8 - contrib/wpa/src/crypto/crypto.h | 371 +--- contrib/wpa/src/crypto/crypto_internal-rsa.c | 2 +- contrib/wpa/src/crypto/crypto_openssl.c | 1101 ++---------- contrib/wpa/src/crypto/crypto_wolfssl.c | 8 +- contrib/wpa/src/crypto/random.c | 42 +- contrib/wpa/src/crypto/tls_openssl.c | 23 - contrib/wpa/src/drivers/driver.h | 6 +- contrib/wpa/src/drivers/driver_common.c | 2 +- contrib/wpa/src/drivers/driver_hostap.h | 2 + contrib/wpa/src/drivers/driver_macsec_qca.c | 58 +- contrib/wpa/src/drivers/driver_ndis.c | 16 +- contrib/wpa/src/drivers/driver_nl80211.c | 29 +- contrib/wpa/src/drivers/driver_nl80211.h | 1 - contrib/wpa/src/drivers/driver_nl80211_capa.c | 2 +- contrib/wpa/src/eap_peer/eap_proxy_dummy.c | 2 +- contrib/wpa/src/eap_peer/eap_teap.c | 10 +- contrib/wpa/src/eap_peer/eap_tls_common.h | 2 +- contrib/wpa/src/eap_server/eap_tls_common.h | 2 +- contrib/wpa/src/l2_packet/l2_packet_none.c | 2 +- contrib/wpa/src/p2p/p2p.c | 4 +- contrib/wpa/src/p2p/p2p_build.c | 2 +- contrib/wpa/src/p2p/p2p_go_neg.c | 4 +- contrib/wpa/src/p2p/p2p_i.h | 3 +- contrib/wpa/src/p2p/p2p_pd.c | 2 +- contrib/wpa/src/pae/ieee802_1x_kay.c | 10 +- contrib/wpa/src/radius/radius_client.c | 5 +- contrib/wpa/src/rsn_supp/pmksa_cache.c | 92 +- contrib/wpa/src/rsn_supp/pmksa_cache.h | 9 - contrib/wpa/src/rsn_supp/tdls.c | 43 +- contrib/wpa/src/rsn_supp/wpa.c | 27 +- contrib/wpa/src/rsn_supp/wpa.h | 6 - contrib/wpa/src/rsn_supp/wpa_i.h | 3 +- contrib/wpa/src/utils/config.c | 18 +- contrib/wpa/src/utils/eloop.c | 25 +- contrib/wpa/src/wps/wps.c | 2 +- contrib/wpa/src/wps/wps_defs.h | 2 +- contrib/wpa/src/wps/wps_registrar.c | 26 +- contrib/wpa/src/wps/wps_upnp.c | 2 +- contrib/wpa/wpa_supplicant/Android.mk | 3 +- contrib/wpa/wpa_supplicant/ChangeLog | 3 +- contrib/wpa/wpa_supplicant/Makefile | 12 +- contrib/wpa/wpa_supplicant/README | 84 - contrib/wpa/wpa_supplicant/ap.c | 126 +- contrib/wpa/wpa_supplicant/ap.h | 1 - contrib/wpa/wpa_supplicant/config.c | 50 +- contrib/wpa/wpa_supplicant/config.h | 11 - contrib/wpa/wpa_supplicant/config_file.c | 13 - contrib/wpa/wpa_supplicant/config_none.c | 2 +- contrib/wpa/wpa_supplicant/config_ssid.h | 16 - contrib/wpa/wpa_supplicant/ctrl_iface.c | 623 +------ .../wpa_supplicant/doc/docbook/wpa_supplicant.sgml | 2 +- contrib/wpa/wpa_supplicant/eapol_test.py | 37 +- contrib/wpa/wpa_supplicant/events.c | 237 +-- contrib/wpa/wpa_supplicant/gas_query.c | 10 + contrib/wpa/wpa_supplicant/gas_query.h | 1 + contrib/wpa/wpa_supplicant/mesh.c | 31 - contrib/wpa/wpa_supplicant/mesh_mpm.c | 10 +- contrib/wpa/wpa_supplicant/notify.c | 10 +- contrib/wpa/wpa_supplicant/op_classes.c | 8 +- contrib/wpa/wpa_supplicant/p2p_supplicant.c | 164 +- contrib/wpa/wpa_supplicant/p2p_supplicant.h | 5 +- contrib/wpa/wpa_supplicant/p2p_supplicant_sd.c | 4 +- contrib/wpa/wpa_supplicant/preauth_test.c | 6 +- contrib/wpa/wpa_supplicant/robust_av.c | 1332 -------------- contrib/wpa/wpa_supplicant/scan.c | 57 +- .../systemd/wpa_supplicant.service.in | 1 - contrib/wpa/wpa_supplicant/wpa_cli.c | 47 - contrib/wpa/wpa_supplicant/wpa_supplicant.c | 284 +-- contrib/wpa/wpa_supplicant/wpa_supplicant.conf | 2 +- contrib/wpa/wpa_supplicant/wpa_supplicant_i.h | 138 +- contrib/wpa/wpa_supplicant/wpas_glue.c | 2 - lib/libc/net/sctp_sys_calls.c | 6 +- libexec/rc/rc.d/Makefile | 1 + share/man/man5/src.conf.5 | 10 +- sys/conf/files | 2 - sys/conf/options | 1 - sys/dev/amdtemp/amdtemp.c | 3 +- sys/dev/bce/if_bce.c | 2 +- sys/dev/e1000/em_txrx.c | 3 +- sys/dev/e1000/if_em.h | 1 - sys/dev/hyperv/netvsc/if_hn.c | 49 +- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c | 15 +- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 2 +- sys/dev/mps/mps_sas.c | 38 +- sys/fs/nfs/nfs_commonacl.c | 6 +- sys/fs/nfs/nfs_commonsubs.c | 10 + sys/fs/nfsserver/nfs_nfsdserv.c | 3 +- sys/kern/subr_bus.c | 2 +- sys/kern/subr_epoch.c | 40 +- sys/kern/subr_witness.c | 4 +- sys/kern/uipc_ktls.c | 12 +- sys/modules/i2c/Makefile | 3 +- sys/net/if.c | 3 +- sys/net/rss_config.c | 5 - sys/netinet/cc/cc.c | 7 +- sys/netinet/in_pcb.c | 1028 +++++------ sys/netinet/in_pcb.h | 319 +--- sys/netinet/in_pcb_var.h | 7 + sys/netinet/in_pcbgroup.c | 566 ------ sys/netinet/in_rss.c | 5 - sys/netinet/ip_divert.c | 75 +- sys/netinet/ip_gre.c | 18 +- sys/netinet/ip_input.c | 3 +- sys/netinet/raw_ip.c | 288 ++- sys/netinet/tcp_hpts.c | 990 +++++----- sys/netinet/tcp_hpts.h | 116 +- sys/netinet/tcp_input.c | 2 - sys/netinet/tcp_lro.c | 5 +- sys/netinet/tcp_stacks/bbr.c | 24 +- sys/netinet/tcp_stacks/rack.c | 86 +- sys/netinet/tcp_subr.c | 79 +- sys/netinet/tcp_syncache.c | 5 +- sys/netinet/tcp_timewait.c | 4 + sys/netinet/tcp_var.h | 2 - sys/netinet/udp_usrreq.c | 305 ++-- sys/netinet/udp_var.h | 10 - sys/netinet6/icmp6.c | 171 +- sys/netinet6/in6_pcb.c | 368 +--- sys/netinet6/in6_pcb.h | 10 - sys/netinet6/in6_pcbgroup.c | 153 -- sys/netinet6/in6_rss.c | 5 - sys/netinet6/ip6_gre.c | 19 +- sys/netinet6/raw_ip6.c | 169 +- sys/netinet6/udp6_usrreq.c | 281 ++- sys/sys/epoch.h | 3 + sys/sys/libkern.h | 16 + tools/build/mk/OptionalObsoleteFiles.inc | 205 ++- tools/build/options/WITHOUT_CXX | 8 +- tools/build/options/WITH_CXX | 4 +- tools/tools/git/hooks/prepare-commit-msg | 1 - 175 files changed, 4444 insertions(+), 10588 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index ac84263ab1b7..984437f481fd 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -504,6 +504,8 @@ OLD_FILES+=usr/share/man/man4/iscsi_initiator.4.gz OLD_FILES+=usr/share/man/man8/iscontrol.8.gz # 20211022 +OLD_FILES+=etc/rc.d/sppp +OLD_FILES+=rescue/spppcontrol OLD_FILES+=sbin/spppcontrol .if ${TARGET_ARCH} == "i386" OLD_FILES+=usr/include/machine/cserial.h @@ -514,11 +516,26 @@ OLD_FILES+=usr/share/man/man4/ng_sppp.4.gz OLD_FILES+=usr/share/man/man4/sppp.4.gz OLD_FILES+=usr/share/man/man8/spppcontrol.8.gz +# 20211004: Removed sparc64 tests for lastcomm/sa +OLD_FILES+=usr/tests/usr.bin/lastcomm/v1-sparc64-acct.in +OLD_FILES+=usr/tests/usr.bin/lastcomm/v1-sparc64.out +OLD_FILES+=usr/tests/usr.bin/lastcomm/v2-sparc64-acct.in +OLD_FILES+=usr/tests/usr.bin/lastcomm/v2-sparc64.out +OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-sav.in +OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-sav.out +OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-u.out +OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-usr.in +OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-usr.out +OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-sav.in +OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-u.out +OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-usr.in + # 20210929: OLD_FILES+=usr/sbin/hcseriald OLD_FILES+=usr/share/man/man8/hcseriald.8.gz # 20210929: Remove ng_h4 +OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_h4.h OLD_FILES+=usr/share/man/man4/ng_h4.4.gz # 20210923: rename boot(9) to kern_reboot(9) @@ -526,6 +543,8 @@ OLD_FILES+=usr/share/man/man9/boot.9.gz # 20210921: remove cloudabi OLD_FILES+=usr/share/man/man4/cloudabi.4.gz +OLD_FILES+=usr/share/man/man4/cloudabi32.4.gz +OLD_FILES+=usr/share/man/man4/cloudabi64.4.gz # 20210906: stop installing {llvm,clang,lldb}-tblgen OLD_FILES+=usr/bin/llvm-tblgen diff --git a/contrib/wpa/hostapd/config_file.c b/contrib/wpa/hostapd/config_file.c index daf3f37ad99e..9bc1dc7756e9 100644 --- a/contrib/wpa/hostapd/config_file.c +++ b/contrib/wpa/hostapd/config_file.c @@ -13,7 +13,6 @@ #include "utils/common.h" #include "utils/uuid.h" -#include "utils/crc32.h" #include "common/ieee802_11_defs.h" #include "common/sae.h" #include "crypto/sha256.h" @@ -2397,19 +2396,16 @@ static int hostapd_config_fill(struct hostapd_config *conf, wpa_printf(MSG_INFO, "Line %d: DEPRECATED: 'dump_file' configuration variable is not used anymore", line); } else if (os_strcmp(buf, "ssid") == 0) { - struct hostapd_ssid *ssid = &bss->ssid; - - ssid->ssid_len = os_strlen(pos); - if (ssid->ssid_len > SSID_MAX_LEN || ssid->ssid_len < 1) { + bss->ssid.ssid_len = os_strlen(pos); + if (bss->ssid.ssid_len > SSID_MAX_LEN || + bss->ssid.ssid_len < 1) { wpa_printf(MSG_ERROR, "Line %d: invalid SSID '%s'", line, pos); return 1; } - os_memcpy(ssid->ssid, pos, ssid->ssid_len); - ssid->ssid_set = 1; - ssid->short_ssid = crc32(ssid->ssid, ssid->ssid_len); + os_memcpy(bss->ssid.ssid, pos, bss->ssid.ssid_len); + bss->ssid.ssid_set = 1; } else if (os_strcmp(buf, "ssid2") == 0) { - struct hostapd_ssid *ssid = &bss->ssid; size_t slen; char *str = wpa_config_parse_string(pos, &slen); if (str == NULL || slen < 1 || slen > SSID_MAX_LEN) { @@ -2418,10 +2414,9 @@ static int hostapd_config_fill(struct hostapd_config *conf, os_free(str); return 1; } - os_memcpy(ssid->ssid, str, slen); - ssid->ssid_len = slen; - ssid->ssid_set = 1; - ssid->short_ssid = crc32(ssid->ssid, ssid->ssid_len); + os_memcpy(bss->ssid.ssid, str, slen); + bss->ssid.ssid_len = slen; + bss->ssid.ssid_set = 1; os_free(str); } else if (os_strcmp(buf, "utf8_ssid") == 0) { bss->ssid.utf8_ssid = atoi(pos) > 0; @@ -3520,8 +3515,6 @@ static int hostapd_config_fill(struct hostapd_config *conf, conf->he_op.he_twt_responder = atoi(pos); } else if (os_strcmp(buf, "he_rts_threshold") == 0) { conf->he_op.he_rts_threshold = atoi(pos); - } else if (os_strcmp(buf, "he_er_su_disable") == 0) { - conf->he_op.he_er_su_disable = atoi(pos); } else if (os_strcmp(buf, "he_basic_mcs_nss_set") == 0) { conf->he_op.he_basic_mcs_nss_set = atoi(pos); } else if (os_strcmp(buf, "he_mu_edca_qos_info_param_count") == 0) { @@ -4712,8 +4705,6 @@ static int hostapd_config_fill(struct hostapd_config *conf, if (get_hex_config(bss->ext_capa, EXT_CAPA_MAX_LEN, line, "ext_capa", pos)) return 1; - } else if (os_strcmp(buf, "rnr") == 0) { - bss->rnr = atoi(pos); } else { wpa_printf(MSG_ERROR, "Line %d: unknown configuration item '%s'", diff --git a/contrib/wpa/hostapd/ctrl_iface.c b/contrib/wpa/hostapd/ctrl_iface.c index 6c99a3105f49..4a2d60627070 100644 --- a/contrib/wpa/hostapd/ctrl_iface.c +++ b/contrib/wpa/hostapd/ctrl_iface.c @@ -840,7 +840,7 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd, const char *pos, *end; int disassoc_timer = 0; struct sta_info *sta; - u8 req_mode = 0, valid_int = 0x01, dialog_token = 0x01; + u8 req_mode = 0, valid_int = 0x01; u8 bss_term_dur[12]; char *url = NULL; int ret; @@ -878,12 +878,6 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd, valid_int = atoi(pos); } - pos = os_strstr(cmd, " dialog_token="); - if (pos) { - pos += 14; - dialog_token = atoi(pos); - } - pos = os_strstr(cmd, " bss_term="); if (pos) { pos += 10; @@ -990,7 +984,7 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd, #endif /* CONFIG_MBO */ ret = wnm_send_bss_tm_req(hapd, sta, req_mode, disassoc_timer, - valid_int, bss_term_dur, dialog_token, url, + valid_int, bss_term_dur, url, nei_len ? nei_rep : NULL, nei_len, mbo_len ? mbo : NULL, mbo_len); #ifdef CONFIG_MBO @@ -1461,10 +1455,10 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd) wps_version_number & 0x0f); hostapd_wps_update_ie(hapd); } - } else if (os_strcasecmp(cmd, "wps_testing_stub_cred") == 0) { - wps_testing_stub_cred = atoi(value); - wpa_printf(MSG_DEBUG, "WPS: Testing - stub_cred=%d", - wps_testing_stub_cred); + } else if (os_strcasecmp(cmd, "wps_testing_dummy_cred") == 0) { + wps_testing_dummy_cred = atoi(value); + wpa_printf(MSG_DEBUG, "WPS: Testing - dummy_cred=%d", + wps_testing_dummy_cred); } else if (os_strcasecmp(cmd, "wps_corrupt_pkhash") == 0) { wps_corrupt_pkhash = atoi(value); wpa_printf(MSG_DEBUG, "WPS: Testing - wps_corrupt_pkhash=%d", @@ -3191,9 +3185,8 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf) u8 bssid[ETH_ALEN]; struct wpabuf *nr, *lci = NULL, *civic = NULL; int stationary = 0; - int bss_parameters = 0; char *tmp; - int ret = -1; + int ret; if (!(hapd->conf->radio_measurements[0] & WLAN_RRM_CAPS_NEIGHBOR_REPORT)) { @@ -3247,7 +3240,8 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf) if (!lci) { wpa_printf(MSG_ERROR, "CTRL: SET_NEIGHBOR: Bad LCI subelement"); - goto fail; + wpabuf_free(nr); + return -1; } } @@ -3263,7 +3257,9 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf) if (!civic) { wpa_printf(MSG_ERROR, "CTRL: SET_NEIGHBOR: Bad civic subelement"); - goto fail; + wpabuf_free(nr); + wpabuf_free(lci); + return -1; } } @@ -3273,21 +3269,10 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf) if (os_strstr(buf, "stat")) stationary = 1; - tmp = os_strstr(buf, "bss_parameter="); - if (tmp) { - bss_parameters = atoi(tmp + 14); - if (bss_parameters < 0 || bss_parameters > 0xff) { - wpa_printf(MSG_ERROR, - "CTRL: SET_NEIGHBOR: Bad bss_parameters subelement"); - goto fail; - } - } - set: ret = hostapd_neighbor_set(hapd, bssid, &ssid, nr, lci, civic, - stationary, bss_parameters); + stationary); -fail: wpabuf_free(nr); wpabuf_free(lci); wpabuf_free(civic); @@ -4485,7 +4470,7 @@ static void hostapd_ctrl_iface_flush(struct hapd_interfaces *interfaces) { #ifdef CONFIG_WPS_TESTING wps_version_number = 0x20; - wps_testing_stub_cred = 0; + wps_testing_dummy_cred = 0; wps_corrupt_pkhash = 0; #endif /* CONFIG_WPS_TESTING */ diff --git a/contrib/wpa/hostapd/hlr_auc_gw.milenage_db b/contrib/wpa/hostapd/hlr_auc_gw.milenage_db index a250653108b3..c156a29aeda0 100644 --- a/contrib/wpa/hostapd/hlr_auc_gw.milenage_db +++ b/contrib/wpa/hostapd/hlr_auc_gw.milenage_db @@ -3,7 +3,7 @@ # 4.3.20 Test Set 20. SQN is the last used SQN value. # These values can be used for both UMTS (EAP-AKA) and GSM (EAP-SIM) # authentication. In case of GSM/EAP-SIM, AMF and SQN values are not used, but -# stub values will need to be included in this file. +# dummy values will need to be included in this file. # IMSI Ki OPc AMF SQN [RES_len] 232010000000000 90dca4eda45b53cf0f12d7c9c3bc6a89 cb9cccc4b9258e6dca4760379fb82581 61df 000000000000 diff --git a/contrib/wpa/hostapd/hostapd.conf b/contrib/wpa/hostapd/hostapd.conf index 67d4cefb920b..b5d15061f850 100644 --- a/contrib/wpa/hostapd/hostapd.conf +++ b/contrib/wpa/hostapd/hostapd.conf @@ -841,11 +841,6 @@ wmm_ac_vo_acm=0 # unsigned integer = duration in units of 16 us #he_rts_threshold=0 -#he_er_su_disable: Disable 242-tone HE ER SU PPDU reception by the AP -# 0 = enable reception (default) -# 1 = disable reception -#he_er_su_disable=0 - # HE operating channel information; see matching vht_* parameters for details. # he_oper_centr_freq_seg0_idx field is used to indicate center frequency of 80 # and 160 MHz bandwidth operation. In 80+80 MHz operation, it is the center @@ -1837,7 +1832,7 @@ own_ip_addr=127.0.0.1 #assoc_sa_query_retry_timeout=201 # ocv: Operating Channel Validation -# This is a countermeasure against multi-channel on-path attacks. +# This is a countermeasure against multi-channel man-in-the-middle attacks. # Enabling this depends on the driver's support for OCV when the driver SME is # used. If hostapd SME is used, this will be enabled just based on this # configuration. @@ -2921,9 +2916,6 @@ own_ip_addr=127.0.0.1 # that allows sending of such data. Default: 0. #stationary_ap=0 -# Enable reduced neighbor reporting (RNR) -#rnr=0 - ##### Airtime policy configuration ########################################### # Set the airtime policy operating mode: diff --git a/contrib/wpa/hostapd/hostapd_cli.c b/contrib/wpa/hostapd/hostapd_cli.c index 0e7fdd6bccfb..eaa628ad0676 100644 --- a/contrib/wpa/hostapd/hostapd_cli.c +++ b/contrib/wpa/hostapd/hostapd_cli.c @@ -1048,7 +1048,7 @@ static char ** hostapd_complete_set(const char *str, int pos) int arg = get_cmd_arg_num(str, pos); const char *fields[] = { #ifdef CONFIG_WPS_TESTING - "wps_version_number", "wps_testing_stub_cred", + "wps_version_number", "wps_testing_dummy_cred", "wps_corrupt_pkhash", #endif /* CONFIG_WPS_TESTING */ #ifdef CONFIG_INTERWORKING diff --git a/contrib/wpa/src/ap/acs.c b/contrib/wpa/src/ap/acs.c index 46429f265433..a112045364e3 100644 --- a/contrib/wpa/src/ap/acs.c +++ b/contrib/wpa/src/ap/acs.c @@ -309,6 +309,8 @@ acs_survey_interference_factor(struct freq_survey *survey, s8 min_nf) else if (survey->filled & SURVEY_HAS_CHAN_TIME_RX) busy = survey->channel_time_rx; else { + /* This shouldn't really happen as survey data is checked in + * acs_sanity_check() */ wpa_printf(MSG_ERROR, "ACS: Survey data missing"); return 0; } @@ -390,7 +392,7 @@ static int acs_usable_bw40_chan(const struct hostapd_channel_data *chan) static int acs_usable_bw80_chan(const struct hostapd_channel_data *chan) { - const int allowed[] = { 5180, 5260, 5500, 5580, 5660, 5745, 5955, 6035, + const int allowed[] = { 5180, 5260, 5550, 5580, 5660, 5745, 5955, 6035, 6115, 6195, 6275, 6355, 6435, 6515, 6595, 6675, 6755, 6835, 6915, 6995 }; unsigned int i; diff --git a/contrib/wpa/src/ap/ap_config.c b/contrib/wpa/src/ap/ap_config.c index 86b6e097cf89..7b6d54c35fc2 100644 --- a/contrib/wpa/src/ap/ap_config.c +++ b/contrib/wpa/src/ap/ap_config.c @@ -273,7 +273,7 @@ struct hostapd_config * hostapd_config_defaults(void) conf->he_op.he_basic_mcs_nss_set = 0xfffc; conf->he_op.he_bss_color_disabled = 1; conf->he_op.he_bss_color_partial = 0; - conf->he_op.he_bss_color = os_random() % 63 + 1; + conf->he_op.he_bss_color = 1; conf->he_op.he_twt_responder = 1; conf->he_6ghz_max_mpdu = 2; conf->he_6ghz_max_ampdu_len_exp = 7; @@ -1423,15 +1423,6 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, } #endif /* CONFIG_SAE_PK */ -#ifdef CONFIG_FILS - if (full_config && bss->fils_discovery_min_int && - bss->unsol_bcast_probe_resp_interval) { - wpa_printf(MSG_ERROR, - "Cannot enable both FILS discovery and unsolicited broadcast Probe Response at the same time"); - return -1; - } -#endif /* CONFIG_FILS */ - return 0; } diff --git a/contrib/wpa/src/ap/ap_config.h b/contrib/wpa/src/ap/ap_config.h index b8f791e56307..ced36f9cc828 100644 --- a/contrib/wpa/src/ap/ap_config.h +++ b/contrib/wpa/src/ap/ap_config.h @@ -894,8 +894,6 @@ struct hostapd_bss_config { u8 ext_capa_mask[EXT_CAPA_MAX_LEN]; u8 ext_capa[EXT_CAPA_MAX_LEN]; - - u8 rnr; }; /** @@ -918,7 +916,6 @@ struct he_operation { u8 he_twt_required; u8 he_twt_responder; u16 he_rts_threshold; - u8 he_er_su_disable; u16 he_basic_mcs_nss_set; }; diff --git a/contrib/wpa/src/ap/beacon.c b/contrib/wpa/src/ap/beacon.c index 22782f54e480..15fc2b3db064 100644 --- a/contrib/wpa/src/ap/beacon.c +++ b/contrib/wpa/src/ap/beacon.c @@ -469,7 +469,6 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd, } #endif /* CONFIG_IEEE80211AX */ - buflen += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_PROBE_RESP); buflen += hostapd_mbo_ie_len(hapd); buflen += hostapd_eid_owe_trans_len(hapd); buflen += hostapd_eid_dpp_cc_len(hapd); @@ -574,7 +573,6 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd, (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)) pos = hostapd_eid_wb_chsw_wrapper(hapd, pos); - pos = hostapd_eid_rnr(hapd, pos, WLAN_FC_STYPE_PROBE_RESP); pos = hostapd_eid_fils_indic(hapd, pos, 0); pos = hostapd_get_rsnxe(hapd, pos, epos - pos); @@ -644,8 +642,7 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd, enum ssid_match_result { NO_SSID_MATCH, EXACT_SSID_MATCH, - WILDCARD_SSID_MATCH, - CO_LOCATED_SSID_MATCH, + WILDCARD_SSID_MATCH }; static enum ssid_match_result ssid_match(struct hostapd_data *hapd, @@ -656,9 +653,7 @@ static enum ssid_match_result ssid_match(struct hostapd_data *hapd, size_t short_ssid_list_len) { const u8 *pos, *end; - struct hostapd_iface *iface = hapd->iface; int wildcard = 0; - size_t i, j; if (ssid_len == 0) wildcard = 1; @@ -692,33 +687,7 @@ static enum ssid_match_result ssid_match(struct hostapd_data *hapd, } } - if (wildcard) - return WILDCARD_SSID_MATCH; - - if (!iface->interfaces || iface->interfaces->count <= 1 || - is_6ghz_op_class(hapd->iconf->op_class)) - return NO_SSID_MATCH; - - for (i = 0; i < iface->interfaces->count; i++) { - struct hostapd_iface *colocated; - - colocated = iface->interfaces->iface[i]; - - if (colocated == iface || - !is_6ghz_op_class(colocated->conf->op_class)) - continue; - - for (j = 0; j < colocated->num_bss; j++) { - struct hostapd_bss_config *conf; - - conf = colocated->bss[j]->conf; - if (ssid_len == conf->ssid.ssid_len && - os_memcmp(ssid, conf->ssid.ssid, ssid_len) == 0) - return CO_LOCATED_SSID_MATCH; - } - } - - return NO_SSID_MATCH; + return wildcard ? WILDCARD_SSID_MATCH : NO_SSID_MATCH; } @@ -1315,8 +1284,6 @@ static u8 * hostapd_gen_fils_discovery(struct hostapd_data *hapd, size_t *len) total_len += 3; } - total_len += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_ACTION); - pos = hostapd_eid_fils_indic(hapd, buf, 0); buf_len = pos - buf; total_len += buf_len; @@ -1385,8 +1352,6 @@ static u8 * hostapd_gen_fils_discovery(struct hostapd_data *hapd, size_t *len) /* Fill in the Length field value */ *length_pos = pos - (length_pos + 1); - pos = hostapd_eid_rnr(hapd, pos, WLAN_FC_STYPE_ACTION); - /* FILS Indication element */ if (buf_len) { os_memcpy(pos, buf, buf_len); @@ -1473,7 +1438,6 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd, } #endif /* CONFIG_IEEE80211AX */ - tail_len += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_BEACON); tail_len += hostapd_mbo_ie_len(hapd); tail_len += hostapd_eid_owe_trans_len(hapd); tail_len += hostapd_eid_dpp_cc_len(hapd); @@ -1598,7 +1562,6 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd, (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)) tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos); - tailpos = hostapd_eid_rnr(hapd, tailpos, WLAN_FC_STYPE_BEACON); tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0); tailpos = hostapd_get_rsnxe(hapd, tailpos, tailend - tailpos); @@ -1780,7 +1743,7 @@ void ieee802_11_free_ap_params(struct wpa_driver_ap_params *params) } -static int __ieee802_11_set_beacon(struct hostapd_data *hapd) +int ieee802_11_set_beacon(struct hostapd_data *hapd) { struct wpa_driver_ap_params params; struct hostapd_freq_params freq; @@ -1869,42 +1832,6 @@ fail: } -int ieee802_11_set_beacon(struct hostapd_data *hapd) -{ - struct hostapd_iface *iface = hapd->iface; - int ret; - size_t i, j; - bool is_6g; - - ret = __ieee802_11_set_beacon(hapd); - if (ret != 0) - return ret; - - if (!iface->interfaces || iface->interfaces->count <= 1) - return 0; - - /* Update Beacon frames in case of 6 GHz colocation */ - is_6g = is_6ghz_op_class(iface->conf->op_class); - for (j = 0; j < iface->interfaces->count; j++) { - struct hostapd_iface *colocated; - - colocated = iface->interfaces->iface[j]; - if (colocated == iface || !colocated || !colocated->conf) - continue; - - if (is_6g == is_6ghz_op_class(colocated->conf->op_class)) - continue; - - for (i = 0; i < colocated->num_bss; i++) { - if (colocated->bss[i] && colocated->bss[i]->started) - __ieee802_11_set_beacon(colocated->bss[i]); - } - } - - return 0; -} - - int ieee802_11_set_beacons(struct hostapd_iface *iface) { size_t i; diff --git a/contrib/wpa/src/ap/ctrl_iface_ap.c b/contrib/wpa/src/ap/ctrl_iface_ap.c index 1d8fb8246581..28e40ba9cede 100644 --- a/contrib/wpa/src/ap/ctrl_iface_ap.c +++ b/contrib/wpa/src/ap/ctrl_iface_ap.c @@ -50,35 +50,9 @@ static size_t hostapd_write_ht_mcs_bitmask(char *buf, size_t buflen, } -static int hostapd_get_sta_conn_time(struct sta_info *sta, - struct hostap_sta_driver_data *data, - char *buf, size_t buflen) -{ - struct os_reltime age; - unsigned long secs; - int ret; - - if (sta->connected_time.sec) { - /* Locally maintained time in AP mode */ - os_reltime_age(&sta->connected_time, &age); - secs = (unsigned long) age.sec; - } else if (data->flags & STA_DRV_DATA_CONN_TIME) { - /* Time from the driver in mesh mode */ - secs = data->connected_sec; - } else { - return 0; - } - - ret = os_snprintf(buf, buflen, "connected_time=%lu\n", secs); - if (os_snprintf_error(buflen, ret)) - return 0; - return ret; -} - - -static int hostapd_get_sta_info(struct hostapd_data *hapd, - struct sta_info *sta, - char *buf, size_t buflen) +static int hostapd_get_sta_tx_rx(struct hostapd_data *hapd, + struct sta_info *sta, + char *buf, size_t buflen) { struct hostap_sta_driver_data data; int ret; @@ -186,12 +160,29 @@ static int hostapd_get_sta_info(struct hostapd_data *hapd, len += ret; } - len += hostapd_get_sta_conn_time(sta, &data, buf + len, buflen - len); - return len; } +static int hostapd_get_sta_conn_time(struct sta_info *sta, + char *buf, size_t buflen) +{ + struct os_reltime age; + int ret; + + if (!sta->connected_time.sec) + return 0; + + os_reltime_age(&sta->connected_time, &age); + + ret = os_snprintf(buf, buflen, "connected_time=%u\n", + (unsigned int) age.sec); + if (os_snprintf_error(buflen, ret)) + return 0; + return ret; +} + + static const char * timeout_next_str(int val) { switch (val) { @@ -272,7 +263,8 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd, if (res >= 0) len += res; - len += hostapd_get_sta_info(hapd, sta, buf + len, buflen - len); + len += hostapd_get_sta_tx_rx(hapd, sta, buf + len, buflen - len); + len += hostapd_get_sta_conn_time(sta, buf + len, buflen - len); #ifdef CONFIG_SAE if (sta->sae && sta->sae->state == SAE_ACCEPTED) { diff --git a/contrib/wpa/src/ap/dhcp_snoop.c b/contrib/wpa/src/ap/dhcp_snoop.c index 551936b8e43c..edc77da2e797 100644 --- a/contrib/wpa/src/ap/dhcp_snoop.c +++ b/contrib/wpa/src/ap/dhcp_snoop.c @@ -88,7 +88,6 @@ static void handle_dhcp(void *ctx, const u8 *src_addr, const u8 *buf, } } -#ifdef CONFIG_HS20 if (hapd->conf->disable_dgaf && is_broadcast_ether_addr(buf)) { for (sta = hapd->sta_list; sta; sta = sta->next) { if (!(sta->flags & WLAN_STA_AUTHORIZED)) @@ -97,7 +96,6 @@ static void handle_dhcp(void *ctx, const u8 *src_addr, const u8 *buf, (u8 *) buf, len); } } -#endif /* CONFIG_HS20 */ if (msgtype == DHCPACK) { if (b->your_ip == 0) diff --git a/contrib/wpa/src/ap/dpp_hostapd.c b/contrib/wpa/src/ap/dpp_hostapd.c index 41769f475544..93ffd8cf7c36 100644 --- a/contrib/wpa/src/ap/dpp_hostapd.c +++ b/contrib/wpa/src/ap/dpp_hostapd.c @@ -2276,8 +2276,6 @@ void hostapd_dpp_deinit(struct hostapd_data *hapd) eloop_cancel_timeout(hostapd_dpp_conn_status_result_wait_timeout, hapd, NULL); hostapd_dpp_chirp_stop(hapd); - if (hapd->iface->interfaces) - dpp_controller_stop_for_ctx(hapd->iface->interfaces->dpp, hapd); #endif /* CONFIG_DPP2 */ dpp_auth_deinit(hapd->dpp_auth); hapd->dpp_auth = NULL; @@ -2389,7 +2387,6 @@ hostapd_dpp_chirp_scan_res_handler(struct hostapd_iface *iface) unsigned int i; struct hostapd_hw_modes *mode; int c; - bool chan6 = hapd->iface->hw_features == NULL; if (!bi) return; @@ -2409,21 +2406,7 @@ hostapd_dpp_chirp_scan_res_handler(struct hostapd_iface *iface) } /* Preferred chirping channels */ - mode = dpp_get_mode(hapd, HOSTAPD_MODE_IEEE80211G); - if (mode) { - for (c = 0; c < mode->num_channels; c++) { - struct hostapd_channel_data *chan = &mode->channels[c]; - - if (chan->flag & (HOSTAPD_CHAN_DISABLED | - HOSTAPD_CHAN_RADAR) || - chan->freq != 2437) - continue; - chan6 = true; - break; - } - } - if (chan6) - int_array_add_unique(&hapd->dpp_chirp_freqs, 2437); + int_array_add_unique(&hapd->dpp_chirp_freqs, 2437); mode = dpp_get_mode(hapd, HOSTAPD_MODE_IEEE80211A); if (mode) { diff --git a/contrib/wpa/src/ap/hostapd.h b/contrib/wpa/src/ap/hostapd.h index f3ca7529ac96..07d0aaa92100 100644 --- a/contrib/wpa/src/ap/hostapd.h +++ b/contrib/wpa/src/ap/hostapd.h @@ -138,8 +138,6 @@ struct hostapd_neighbor_entry { /* LCI update time */ struct os_time lci_date; int stationary; - u32 short_ssid; - u8 bss_parameters; }; struct hostapd_sae_commit_queue { diff --git a/contrib/wpa/src/ap/hw_features.c b/contrib/wpa/src/ap/hw_features.c index 4b66b02f4e16..bb5404fa7dd4 100644 --- a/contrib/wpa/src/ap/hw_features.c +++ b/contrib/wpa/src/ap/hw_features.c @@ -838,8 +838,6 @@ static int hostapd_is_usable_edmg(struct hostapd_iface *iface) iface->freq, NULL, iface->hw_features, iface->num_hw_features); - if (!pri_chan) - return 0; hostapd_encode_edmg_chan(iface->conf->enable_edmg, iface->conf->edmg_channel, pri_chan->chan, diff --git a/contrib/wpa/src/ap/ieee802_11.c b/contrib/wpa/src/ap/ieee802_11.c index db41049287fc..22cce961063e 100644 --- a/contrib/wpa/src/ap/ieee802_11.c +++ b/contrib/wpa/src/ap/ieee802_11.c @@ -2398,7 +2398,7 @@ static int pasn_wd_handle_sae_commit(struct hostapd_data *hapd, buf_len = wpabuf_len(wd); if (buf_len < 6) { - wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%zu", + wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%lu", buf_len); return -1; } @@ -2474,7 +2474,7 @@ static int pasn_wd_handle_sae_confirm(struct hostapd_data *hapd, buf_len = wpabuf_len(wd); if (buf_len < 6) { - wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%zu", + wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%lu", buf_len); return -1; } @@ -2704,7 +2704,7 @@ static int pasn_wd_handle_fils(struct hostapd_data *hapd, struct sta_info *sta, buf_len = wpabuf_len(wd); if (buf_len < 6) { - wpa_printf(MSG_DEBUG, "PASN: FILS: Buffer too short. len=%zu", + wpa_printf(MSG_DEBUG, "PASN: FILS: Buffer too short. len=%lu", buf_len); return -1; } @@ -7071,386 +7071,4 @@ u8 * hostapd_eid_wb_chsw_wrapper(struct hostapd_data *hapd, u8 *eid) return eid; } - -static size_t hostapd_eid_nr_db_len(struct hostapd_data *hapd, - size_t *current_len) -{ - struct hostapd_neighbor_entry *nr; - size_t total_len = 0, len = *current_len; - - dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry, - list) { - if (!nr->nr || wpabuf_len(nr->nr) < 12) - continue; - - if (nr->short_ssid == hapd->conf->ssid.short_ssid) - continue; - - /* Start a new element */ - if (!len || - len + RNR_TBTT_HEADER_LEN + RNR_TBTT_INFO_LEN > 255) { - len = RNR_HEADER_LEN; - total_len += RNR_HEADER_LEN; - } - - len += RNR_TBTT_HEADER_LEN + RNR_TBTT_INFO_LEN; - total_len += RNR_TBTT_HEADER_LEN + RNR_TBTT_INFO_LEN; - } - - *current_len = len; - return total_len; -} - - -static size_t hostapd_eid_rnr_iface_len(struct hostapd_data *hapd, - struct hostapd_data *reporting_hapd, - size_t *current_len) -{ - size_t total_len = 0, len = *current_len; - int tbtt_count = 0; - size_t i, start = 0; - - while (start < hapd->iface->num_bss) { - if (!len || - len + RNR_TBTT_HEADER_LEN + RNR_TBTT_INFO_LEN > 255) { - len = RNR_HEADER_LEN; - total_len += RNR_HEADER_LEN; - } - - len += RNR_TBTT_HEADER_LEN; - total_len += RNR_TBTT_HEADER_LEN; - - for (i = start; i < hapd->iface->num_bss; i++) { - struct hostapd_data *bss = hapd->iface->bss[i]; - - if (!bss || !bss->conf || !bss->started) - continue; - - if (bss == reporting_hapd || *** 22002 LINES SKIPPED *** From nobody Thu Dec 2 22:52:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AAAE518C7590; Thu, 2 Dec 2021 22:52: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 4J4rp130dMz4XjG; Thu, 2 Dec 2021 22:52:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46D4825CDB; Thu, 2 Dec 2021 22:52: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 1B2MqvLM002701; Thu, 2 Dec 2021 22:52:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2MqvNT002700; Thu, 2 Dec 2021 22:52:57 GMT (envelope-from git) Date: Thu, 2 Dec 2021 22:52:57 GMT Message-Id: <202112022252.1B2MqvNT002700@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: 0ea3e4a27bc0 - main - Style List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0ea3e4a27bc0d1b0fdf876c3ef89d790e29ad5b1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638485577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w5Jj/kOv87glgyHdP5UBayji35AJqpKdBaGLsGp1AaA=; b=T3kHReckuT1UU5qsucgvyhYwYixp2+HvAZLq5PXP3mDf56D4sHdRYBXTXlH5gocROAhz1K 96bzq2CGK1om4n3RRx1HAb/yowioqSqvBVS1+raklGtbdaN+y+vwZdwO2DuC+64HY87CbB 548U5MJ1fQPujJdyJGrvjuCk2oKD9PmVcIstIu9jahz3zk8JBwhEA5JCyiRNCSi5NxBX1d jQ3lfmbRrKvHDAgTt9wmwEa6IkWJ1E85KvBLjfdhFi/+4VXiqF+XbSCFAlyz8G+zrwyJBq tH0wcKKRPLW8RyKHsOCEu6j8G2uVD/BQ4z5qLJyUnLapP2R24teVN+aQnELFpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638485577; a=rsa-sha256; cv=none; b=a30PNWJIBVrpPgczmtNYGXxKbWNYvMJQRSqFQS2zJVJ4GIOhSr+OPUr7UWbhKT5yoh/dNe 4GvfF/GKgsxtgudPZsPGrs5a6i6yaDprwGLQ3tlS/UOROGNuqSh95uoHaIvcerR5cjNktm HlloVdqA+8fpazYNLpbhN8qXMcVgJf3+d7UleU5ag9dAzBXyhkvA/ZkzxqcJtxJaty3Rlw rc4OjFSqXI74Yg9/PEaFF/qwZ7U43LzieTzmCI0yVO96bUbcETf9laUTZ4+bzCmQXasO2x WvSzrAPpFY4A/EPbNTHSRdOJ/efYU2jiQbIThOCWOZk0jXSMyLjYqsDsXRDY3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0ea3e4a27bc0d1b0fdf876c3ef89d790e29ad5b1 commit 0ea3e4a27bc0d1b0fdf876c3ef89d790e29ad5b1 Author: Konstantin Belousov AuthorDate: 2021-12-02 18:02:26 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-02 22:52:49 +0000 Style Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libprocstat/libprocstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index b754bc568e99..b50875db1637 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -867,7 +867,7 @@ procstat_getfiles_sysctl(struct procstat *procstat, struct kinfo_proc *kp, assert(kp); if (kp->ki_fd == NULL) return (NULL); - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_SYSCTL: files = kinfo_getfile(kp->ki_pid, &cnt); break; From nobody Thu Dec 2 22:52:58 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E630A18C7691; Thu, 2 Dec 2021 22:52: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 4J4rp23ygqz4XjH; Thu, 2 Dec 2021 22:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69A1A25F02; Thu, 2 Dec 2021 22:52: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 1B2Mqw54002725; Thu, 2 Dec 2021 22:52:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2Mqw9T002724; Thu, 2 Dec 2021 22:52:58 GMT (envelope-from git) Date: Thu, 2 Dec 2021 22:52:58 GMT Message-Id: <202112022252.1B2Mqw9T002724@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: 7a9423d6f360 - main - procstat_getfiles_sysctl: do not require non-null ki_fd List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7a9423d6f360e3758ca67fbb25d309140ea93670 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638485578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Mg0GdC8S2Mc0+zVji7HLJW4UzcjlVnqoAHxYNMhe5k=; b=ClygZjp83Bh42SVfaF5MbqpKKdmViO3beZ8glkgfqUy/Ub8FKWBvGwYRF3/cNR1mW9elXG l+szYngikdXtGhqX97b5vWRjTSyDm3QLw5Mb9hlITofldctXXC5GU8lbLjU4pqbw9/Xcgh StzVHX4GFqDpo8xVa/82IkOsunOA4i/KL3+pY6yHDUqDHlSKisQMA04XP2Mz4XmuQXvEjV ihYz2VRBpXc0DLzrpJmnvvGKJT5LA5vibmZMmyL6ZznLavOQ/V25xf3STKNiQNuM6hye9Z 9pwKwQFj35cByCciwqjlijOTySvCqndIvTBZVn65KiKHF9B+sqvZQ4kxcQghUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638485578; a=rsa-sha256; cv=none; b=iqO/dJA7W+5+moVjMEJ8RuQzBmRmOW+CFdNPYrH2tMURv/7kg9dr1n/O7a7xsO5l4pu8l6 VbNzgzp75CJHrlbfQZEuLuLak0G2YuoayHr0sSL5JetpRgpfPLA/2/XRt6ezHVBU6EEZWm RckD8RyLu1vsGo++IVzYov7LN4Uh0/3tlxuHp1t0qq05mf2Irku7VGXzAqAOCjzXcGuWvS Ccd8sO1nL2EkEcLwSHMi4jUFqgHHKG/U4L1Sm1HJhvQ0KQP/f0DLRDX8mAbBO48qBUY4LN JKjHlEpWfQ7WclyfslhvJWD+ak1R9Pna2AXjHq02+XVDVC1s2jo/5sigvuzejw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7a9423d6f360e3758ca67fbb25d309140ea93670 commit 7a9423d6f360e3758ca67fbb25d309140ea93670 Author: Konstantin Belousov AuthorDate: 2021-12-02 18:03:01 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-02 22:52:49 +0000 procstat_getfiles_sysctl: do not require non-null ki_fd ki_fd is legitimately NULL when 32bit process requests process data from 64bit host kernel. The field is not used by the code for sysctl case; procstat_getfiles_kvm() checks ki_fd. PR: 260174 Reported by: Damjan Jovanovic Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libprocstat/libprocstat.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index b50875db1637..850d37598423 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -865,8 +865,6 @@ procstat_getfiles_sysctl(struct procstat *procstat, struct kinfo_proc *kp, cap_rights_t cap_rights; assert(kp); - if (kp->ki_fd == NULL) - return (NULL); switch (procstat->type) { case PROCSTAT_SYSCTL: files = kinfo_getfile(kp->ki_pid, &cnt); From nobody Thu Dec 2 23:06:21 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 55A1C18AE06F; Thu, 2 Dec 2021 23:06:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4s5T6cYQz4cdp; Thu, 2 Dec 2021 23:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDE34260DC; Thu, 2 Dec 2021 23:06: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 1B2N6LjQ016944; Thu, 2 Dec 2021 23:06:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2N6LDp016943; Thu, 2 Dec 2021 23:06:21 GMT (envelope-from git) Date: Thu, 2 Dec 2021 23:06:21 GMT Message-Id: <202112022306.1B2N6LDp016943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 2dfc1f73552d - main - APEI: Improve multiple error sources 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2dfc1f73552d5aa5d9f6fa3e642f00e87952551c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638486382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jDKDBRPv5IuF1srATtcReMo/1VSmuFGWe6HuYaUrGqo=; b=vENdiR1vTw8kp37cRwKVz9tY5GG+RXSwWxPSVoYWoUGhVoYeAKFytdr12PhXAUtOIGZ7YL CansImcLXRfbbPx4A2YG67H7nsBvFBaYegrH6OJl/PFBNoMoaPAdeOS4eyzSjYCrFi+JVl FQaD98Pom2eC7W0pQC0UrgVXQkqFODhKOdkIWW7iB+6tnHBk/Tzj9GY+ierfcTKu19gJoH Qvl26MKKj76OyeiiAiY4EkmtWSB7KZ9iLHJzFyrO5Y6gx+++P/Eo4aZlaMQwbYcYr1gYkk QBu8AJ3WQsquzGcgaCjxnVseJQ7EXjGDJNip6irlzW9P7i52Esp/uxdR7kknJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638486382; a=rsa-sha256; cv=none; b=GKm1S4hubHaP1RI1imGRow4uyoBYA5QKmq0nb+fs46obSmjNkxtFvba8jWsyZTeyu8rsqA ov6CZwlC1Hsb3CFlVvFtutGKvQTo/iuyJw0Lg8adZdIA4I/A4N674Dn7De+5oFTGRNjS5d MmsMie5nYvGrFfTOA1WjlrcU0ifJk9OhbEQewLuzdKbU9bYQDEX+Cs+To167LWrdvb29PQ p5KNPY+4nOsFd++Jtv3K31p79fynaR5e4RgFnOPeI/hHp9//YgI6Xmr4dN02sb3HoKN5kg RiXiTCA27nehwrqRsYYMZvMtgX+BcF2rewUDStVBnBwH82T4BUclDL2va2d/1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=2dfc1f73552d5aa5d9f6fa3e642f00e87952551c commit 2dfc1f73552d5aa5d9f6fa3e642f00e87952551c Author: Alexander Motin AuthorDate: 2021-12-02 23:01:02 +0000 Commit: Alexander Motin CommitDate: 2021-12-02 23:06:12 +0000 APEI: Improve multiple error sources handling. Some AMD systems I have report 8 NMI and 3591 polled error sources. Previous code could handle only one NMI source and used separate callout for each polled source. New code can handle multiple NMIs and groups polled sources by power of 2 of the polling period. MFC after: 2 weeks --- sys/dev/acpica/acpi_apei.c | 153 ++++++++++++++++++++++++++++++--------------- 1 file changed, 104 insertions(+), 49 deletions(-) diff --git a/sys/dev/acpica/acpi_apei.c b/sys/dev/acpica/acpi_apei.c index d4bc38887d9e..c957959317ce 100644 --- a/sys/dev/acpica/acpi_apei.c +++ b/sys/dev/acpica/acpi_apei.c @@ -66,13 +66,33 @@ struct apei_ge { struct resource *res2; uint8_t *buf, *copybuf; TAILQ_ENTRY(apei_ge) link; - struct callout poll; + TAILQ_ENTRY(apei_ge) nlink; +}; + +/* NMI */ +struct apei_nges { void *swi_ih; -} *apei_nmi_ge; + TAILQ_HEAD(, apei_ge) ges; +} *apei_nmi_nges; + +/* Interrupt */ +struct apei_iges { + TAILQ_HEAD(, apei_ge) ges; +}; + +/* Polling */ +struct apei_pges { + sbintime_t interval; + struct callout poll; + TAILQ_HEAD(, apei_ge) ges; +}; struct apei_softc { ACPI_TABLE_HEST *hest; TAILQ_HEAD(, apei_ge) ges; + struct apei_nges nges; + struct apei_iges iges; + struct apei_pges pges[32]; }; struct apei_mem_error { @@ -135,6 +155,8 @@ apei_bus_write_8(struct resource *res, bus_size_t offset, uint64_t val) sizeof(ACPI_HEST_GENERIC_DATA_V300) : sizeof(ACPI_HEST_GENERIC_DATA)) #define GED_DATA(ged) ((uint8_t *)(ged) + GED_SIZE(ged)) +#define PGE_ID(ge) (fls(MAX(1, (ge)->v1.Notify.PollInterval)) - 1) + int apei_nmi_handler(void); static const char * @@ -385,56 +407,66 @@ apei_ge_handler(struct apei_ge *ge, bool copy) static void apei_nmi_swi(void *arg) { - struct apei_ge *ge = arg; + struct apei_nges *nges = arg; + struct apei_ge *ge; - apei_ge_handler(ge, true); + TAILQ_FOREACH(ge, &nges->ges, nlink) + apei_ge_handler(ge, true); } int apei_nmi_handler(void) { - struct apei_ge *ge = apei_nmi_ge; + struct apei_nges *nges = apei_nmi_nges; + struct apei_ge *ge; ACPI_HEST_GENERIC_STATUS *ges, *gesc; + int handled = 0; - if (ge == NULL) - return (0); - - ges = (ACPI_HEST_GENERIC_STATUS *)ge->buf; - if (ges == NULL || ges->BlockStatus == 0) + if (nges == NULL) return (0); - /* If ACPI told the error is fatal -- make it so. */ - if (ges->ErrorSeverity == ACPI_HEST_GEN_ERROR_FATAL) - panic("APEI Fatal Hardware Error!"); - - /* Copy the buffer for later processing. */ - gesc = (ACPI_HEST_GENERIC_STATUS *)ge->copybuf; - if (gesc->BlockStatus == 0) - memcpy(ge->copybuf, ge->buf, ge->v1.ErrorBlockLength); - - /* Acknowledge the error has been processed. */ - ges->BlockStatus = 0; - if (ge->v1.Header.Type == ACPI_HEST_TYPE_GENERIC_ERROR_V2 && - ge->res2) { - uint64_t val = READ8(ge->res2, 0); - val &= ge->v2.ReadAckPreserve; - val |= ge->v2.ReadAckWrite; - WRITE8(ge->res2, 0, val); + TAILQ_FOREACH(ge, &nges->ges, nlink) { + ges = (ACPI_HEST_GENERIC_STATUS *)ge->buf; + if (ges == NULL || ges->BlockStatus == 0) + continue; + + /* If ACPI told the error is fatal -- make it so. */ + if (ges->ErrorSeverity == ACPI_HEST_GEN_ERROR_FATAL) + panic("APEI Fatal Hardware Error!"); + + /* Copy the buffer for later processing. */ + gesc = (ACPI_HEST_GENERIC_STATUS *)ge->copybuf; + if (gesc->BlockStatus == 0) + memcpy(ge->copybuf, ge->buf, ge->v1.ErrorBlockLength); + + /* Acknowledge the error has been processed. */ + ges->BlockStatus = 0; + if (ge->v1.Header.Type == ACPI_HEST_TYPE_GENERIC_ERROR_V2 && + ge->res2) { + uint64_t val = READ8(ge->res2, 0); + val &= ge->v2.ReadAckPreserve; + val |= ge->v2.ReadAckWrite; + WRITE8(ge->res2, 0, val); + } + handled = 1; } /* Schedule SWI for real handling. */ - swi_sched(ge->swi_ih, SWI_FROMNMI); + if (handled) + swi_sched(nges->swi_ih, SWI_FROMNMI); - return (1); + return (handled); } static void apei_callout_handler(void *context) { - struct apei_ge *ge = context; + struct apei_pges *pges = context; + struct apei_ge *ge; - apei_ge_handler(ge, false); - callout_schedule(&ge->poll, ge->v1.Notify.PollInterval * hz / 1000); + TAILQ_FOREACH(ge, &pges->ges, nlink) + apei_ge_handler(ge, false); + callout_schedule_sbt(&pges->poll, pges->interval, pges->interval, 0); } static void @@ -444,12 +476,8 @@ apei_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) struct apei_softc *sc = device_get_softc(dev); struct apei_ge *ge; - TAILQ_FOREACH(ge, &sc->ges, link) { - if (ge->v1.Notify.Type == ACPI_HEST_NOTIFY_SCI || - ge->v1.Notify.Type == ACPI_HEST_NOTIFY_GPIO || - ge->v1.Notify.Type == ACPI_HEST_NOTIFY_GSIV) - apei_ge_handler(ge, false); - } + TAILQ_FOREACH(ge, &sc->iges.ges, nlink) + apei_ge_handler(ge, false); } static int @@ -614,11 +642,20 @@ static int apei_attach(device_t dev) { struct apei_softc *sc = device_get_softc(dev); + struct apei_pges *pges; struct apei_ge *ge; ACPI_STATUS status; int rid; TAILQ_INIT(&sc->ges); + TAILQ_INIT(&sc->nges.ges); + TAILQ_INIT(&sc->iges.ges); + for (int i = 0; i < nitems(sc->pges); i++) { + pges = &sc->pges[i]; + pges->interval = SBT_1MS << i; + callout_init(&pges->poll, 1); + TAILQ_INIT(&pges->ges); + } /* Search and parse HEST table. */ status = AcpiGetTable(ACPI_SIG_HEST, 0, (ACPI_TABLE_HEADER **)&sc->hest); @@ -646,17 +683,25 @@ apei_attach(device_t dev) device_printf(dev, "Can't allocate ack resource.\n"); } if (ge->v1.Notify.Type == ACPI_HEST_NOTIFY_POLLED) { - callout_init(&ge->poll, 1); - callout_reset(&ge->poll, - ge->v1.Notify.PollInterval * hz / 1000, - apei_callout_handler, ge); + pges = &sc->pges[PGE_ID(ge)]; + TAILQ_INSERT_TAIL(&sc->pges[PGE_ID(ge)].ges, ge, nlink); + callout_reset_sbt(&pges->poll, pges->interval, pges->interval, + apei_callout_handler, pges, 0); + } else if (ge->v1.Notify.Type == ACPI_HEST_NOTIFY_SCI || + ge->v1.Notify.Type == ACPI_HEST_NOTIFY_GPIO || + ge->v1.Notify.Type == ACPI_HEST_NOTIFY_GSIV) { + TAILQ_INSERT_TAIL(&sc->iges.ges, ge, nlink); } else if (ge->v1.Notify.Type == ACPI_HEST_NOTIFY_NMI) { ge->copybuf = malloc(ge->v1.ErrorBlockLength, M_DEVBUF, M_WAITOK | M_ZERO); - swi_add(&clk_intr_event, "apei", apei_nmi_swi, ge, - SWI_CLOCK, INTR_MPSAFE, &ge->swi_ih); - apei_nmi_ge = ge; - apei_nmi = apei_nmi_handler; + TAILQ_INSERT_TAIL(&sc->nges.ges, ge, nlink); + if (sc->nges.swi_ih == NULL) { + swi_add(&clk_intr_event, "apei", apei_nmi_swi, + &sc->nges, SWI_CLOCK, INTR_MPSAFE, + &sc->nges.swi_ih); + apei_nmi_nges = &sc->nges; + apei_nmi = apei_nmi_handler; + } } } @@ -674,11 +719,17 @@ apei_detach(device_t dev) struct apei_ge *ge; apei_nmi = NULL; - apei_nmi_ge = NULL; + apei_nmi_nges = NULL; + if (sc->nges.swi_ih != NULL) { + swi_remove(&sc->nges.swi_ih); + sc->nges.swi_ih = NULL; + } if (acpi_get_handle(dev) != NULL) { AcpiRemoveNotifyHandler(acpi_get_handle(dev), ACPI_DEVICE_NOTIFY, apei_notify_handler); } + for (int i = 0; i < nitems(sc->pges); i++) + callout_drain(&sc->pges[i].poll); while ((ge = TAILQ_FIRST(&sc->ges)) != NULL) { TAILQ_REMOVE(&sc->ges, ge, link); @@ -691,9 +742,13 @@ apei_detach(device_t dev) ge->res2_rid, ge->res2); } if (ge->v1.Notify.Type == ACPI_HEST_NOTIFY_POLLED) { - callout_drain(&ge->poll); + TAILQ_REMOVE(&sc->pges[PGE_ID(ge)].ges, ge, nlink); + } else if (ge->v1.Notify.Type == ACPI_HEST_NOTIFY_SCI || + ge->v1.Notify.Type == ACPI_HEST_NOTIFY_GPIO || + ge->v1.Notify.Type == ACPI_HEST_NOTIFY_GSIV) { + TAILQ_REMOVE(&sc->iges.ges, ge, nlink); } else if (ge->v1.Notify.Type == ACPI_HEST_NOTIFY_NMI) { - swi_remove(&ge->swi_ih); + TAILQ_REMOVE(&sc->nges.ges, ge, nlink); free(ge->copybuf, M_DEVBUF); } if (ge->buf) { From nobody Thu Dec 2 23:08:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0BD7E18AE912; Thu, 2 Dec 2021 23:08: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 4J4s8T56YCz4cwp; Thu, 2 Dec 2021 23:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C3C626105; Thu, 2 Dec 2021 23:08: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 1B2N8vDB017236; Thu, 2 Dec 2021 23:08:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B2N8vWH017232; Thu, 2 Dec 2021 23:08:57 GMT (envelope-from git) Date: Thu, 2 Dec 2021 23:08:57 GMT Message-Id: <202112022308.1B2N8vWH017232@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 4b72b91a7132 - main - wpa: Redo import wpa_supplicant/hostapd commit 14ab4a816 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b72b91a7132df1f77bbae194e1071ac621f1edb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638486537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6e4jPUFE2DackCRBRyX7HtU+EA4RlDGusajZYDymtE=; b=A4NnO2NpccRYwb0zBkfbH1kg9hmwy59xRqZlU7FBxG+8fDdi55Aum3jGc1mzF2JO24I7Fk ccZ8WSlzW/V2jEF7RhqEsuDw/2ucpeu/1V1m/EOmCdRNVixEe4GKxCyCdQgXgUypSL8t4x gcLRgn88mNXiULlWH7dWrA4azEiI0bIaB3xJLAP9+nr9hVDc/H6BuDoOP4wDh5VNL3B5jw qDSuNDxXPqZULU2uvLeeQmoNGLo5Lj/fMC6Aaqq5qTRudH5Pw/PbqhQSquXvi4PP1vnadG AWv9u6oA9/Vt25UagWBOLXJTKAwKnJtGk96i8OYsRX6Ct2c7fiFeUqAK9zuQkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638486537; a=rsa-sha256; cv=none; b=tjivhM0Nh6Wq5ii65iq3LR7UW9eTrT7+3aZnXj7DTAoEvUhEpLzb+VC3Ry+JYx8sn9UaLj DPZnT6Q7FsEKpgiy8B6HB5Ie3fIbRX5TgtTaYqPshEMi1dOLIgMTTWiURAW9XfX4RpyjEp BaFPawsQB6DZWQLxp3qPonbOwiEocjVxdu/1AwsUgj+FMcEc1lrtJAcbfU+BgT3+fwXElc T8gs1JkNLUi8ht47ZchFWhL+7iQ28HMyE8df+gwa48mtZsiXpCtskQCxp9dJX+gcdcCOTk T1hN5u3CRq6dSgQ1bXyjfkIKloYEQbhiHKyabAM1sHAs9bkGfrCkI96Bi2d7nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=4b72b91a7132df1f77bbae194e1071ac621f1edb commit 4b72b91a7132df1f77bbae194e1071ac621f1edb Author: Cy Schubert AuthorDate: 2021-12-02 23:00:32 +0000 Commit: Cy Schubert CommitDate: 2021-12-02 23:08:52 +0000 wpa: Redo import wpa_supplicant/hostapd commit 14ab4a816 This is the November update to vendor/wpa committed upstream 2021-11-26. MFC after: 1 month --- contrib/wpa/hostapd/config_file.c | 25 +- contrib/wpa/hostapd/ctrl_iface.c | 43 +- contrib/wpa/hostapd/hlr_auc_gw.milenage_db | 2 +- contrib/wpa/hostapd/hostapd.conf | 10 +- contrib/wpa/hostapd/hostapd_cli.c | 2 +- contrib/wpa/src/ap/acs.c | 4 +- contrib/wpa/src/ap/ap_config.c | 11 +- contrib/wpa/src/ap/ap_config.h | 3 + contrib/wpa/src/ap/beacon.c | 79 +- contrib/wpa/src/ap/ctrl_iface_ap.c | 56 +- contrib/wpa/src/ap/dhcp_snoop.c | 2 + contrib/wpa/src/ap/dpp_hostapd.c | 19 +- contrib/wpa/src/ap/hostapd.h | 2 + contrib/wpa/src/ap/hw_features.c | 2 + contrib/wpa/src/ap/ieee802_11.c | 388 +++- contrib/wpa/src/ap/ieee802_11.h | 2 + contrib/wpa/src/ap/ieee802_11_he.c | 3 + contrib/wpa/src/ap/ndisc_snoop.c | 2 + contrib/wpa/src/ap/neighbor_db.c | 8 +- contrib/wpa/src/ap/neighbor_db.h | 3 +- contrib/wpa/src/ap/wnm_ap.c | 12 +- contrib/wpa/src/ap/wnm_ap.h | 4 +- contrib/wpa/src/ap/wpa_auth.c | 18 +- contrib/wpa/src/ap/wpa_auth_ft.c | 16 +- contrib/wpa/src/ap/wps_hostapd.c | 5 + contrib/wpa/src/common/dpp.c | 175 +- contrib/wpa/src/common/dpp.h | 30 +- contrib/wpa/src/common/dpp_auth.c | 18 +- contrib/wpa/src/common/dpp_backup.c | 75 +- contrib/wpa/src/common/dpp_crypto.c | 1885 +++++--------------- contrib/wpa/src/common/dpp_i.h | 70 +- contrib/wpa/src/common/dpp_pkex.c | 280 ++- contrib/wpa/src/common/dpp_reconfig.c | 34 +- contrib/wpa/src/common/dpp_tcp.c | 13 +- contrib/wpa/src/common/hw_features_common.c | 25 +- contrib/wpa/src/common/ieee802_11_common.c | 44 +- contrib/wpa/src/common/ieee802_11_common.h | 2 + contrib/wpa/src/common/ieee802_11_defs.h | 56 + contrib/wpa/src/common/ptksa_cache.c | 18 +- contrib/wpa/src/common/qca-vendor.h | 665 ++++++- contrib/wpa/src/common/sae.c | 12 +- contrib/wpa/src/common/wpa_common.c | 5 + contrib/wpa/src/common/wpa_common.h | 1 + contrib/wpa/src/common/wpa_ctrl.h | 8 + contrib/wpa/src/crypto/crypto.h | 371 +++- contrib/wpa/src/crypto/crypto_internal-rsa.c | 2 +- contrib/wpa/src/crypto/crypto_openssl.c | 1119 ++++++++++-- contrib/wpa/src/crypto/crypto_wolfssl.c | 8 +- contrib/wpa/src/crypto/random.c | 42 +- contrib/wpa/src/crypto/tls_openssl.c | 23 + contrib/wpa/src/drivers/driver.h | 6 +- contrib/wpa/src/drivers/driver_common.c | 2 +- contrib/wpa/src/drivers/driver_hostap.h | 2 - contrib/wpa/src/drivers/driver_macsec_qca.c | 58 +- contrib/wpa/src/drivers/driver_ndis.c | 16 +- contrib/wpa/src/drivers/driver_nl80211.c | 29 +- contrib/wpa/src/drivers/driver_nl80211.h | 1 + contrib/wpa/src/drivers/driver_nl80211_capa.c | 2 +- contrib/wpa/src/eap_peer/eap_proxy_dummy.c | 2 +- contrib/wpa/src/eap_peer/eap_teap.c | 10 +- contrib/wpa/src/eap_peer/eap_tls_common.h | 2 +- contrib/wpa/src/eap_server/eap_tls_common.h | 2 +- contrib/wpa/src/l2_packet/l2_packet_none.c | 2 +- contrib/wpa/src/p2p/p2p.c | 4 +- contrib/wpa/src/p2p/p2p_build.c | 2 +- contrib/wpa/src/p2p/p2p_go_neg.c | 4 +- contrib/wpa/src/p2p/p2p_i.h | 3 +- contrib/wpa/src/p2p/p2p_pd.c | 2 +- contrib/wpa/src/pae/ieee802_1x_kay.c | 10 +- contrib/wpa/src/radius/radius_client.c | 5 +- contrib/wpa/src/rsn_supp/pmksa_cache.c | 92 +- contrib/wpa/src/rsn_supp/pmksa_cache.h | 9 + contrib/wpa/src/rsn_supp/tdls.c | 43 +- contrib/wpa/src/rsn_supp/wpa.c | 27 +- contrib/wpa/src/rsn_supp/wpa.h | 6 + contrib/wpa/src/rsn_supp/wpa_i.h | 3 +- contrib/wpa/src/utils/config.c | 18 +- contrib/wpa/src/utils/eloop.c | 25 +- contrib/wpa/src/wps/wps.c | 2 +- contrib/wpa/src/wps/wps_defs.h | 2 +- contrib/wpa/src/wps/wps_registrar.c | 26 +- contrib/wpa/src/wps/wps_upnp.c | 2 +- contrib/wpa/wpa_supplicant/Android.mk | 3 +- contrib/wpa/wpa_supplicant/ChangeLog | 3 +- contrib/wpa/wpa_supplicant/Makefile | 12 +- contrib/wpa/wpa_supplicant/README | 84 + contrib/wpa/wpa_supplicant/ap.c | 126 +- contrib/wpa/wpa_supplicant/ap.h | 1 + contrib/wpa/wpa_supplicant/config.c | 50 +- contrib/wpa/wpa_supplicant/config.h | 11 + contrib/wpa/wpa_supplicant/config_file.c | 13 + contrib/wpa/wpa_supplicant/config_none.c | 2 +- contrib/wpa/wpa_supplicant/config_ssid.h | 16 + contrib/wpa/wpa_supplicant/ctrl_iface.c | 623 ++++++- .../wpa_supplicant/doc/docbook/wpa_supplicant.sgml | 2 +- contrib/wpa/wpa_supplicant/eapol_test.py | 37 +- contrib/wpa/wpa_supplicant/events.c | 237 ++- contrib/wpa/wpa_supplicant/gas_query.c | 10 - contrib/wpa/wpa_supplicant/gas_query.h | 1 - contrib/wpa/wpa_supplicant/mesh.c | 31 + contrib/wpa/wpa_supplicant/mesh_mpm.c | 10 +- contrib/wpa/wpa_supplicant/notify.c | 10 +- contrib/wpa/wpa_supplicant/op_classes.c | 8 +- contrib/wpa/wpa_supplicant/p2p_supplicant.c | 164 +- contrib/wpa/wpa_supplicant/p2p_supplicant.h | 5 +- contrib/wpa/wpa_supplicant/p2p_supplicant_sd.c | 4 +- contrib/wpa/wpa_supplicant/preauth_test.c | 6 +- contrib/wpa/wpa_supplicant/robust_av.c | 1332 ++++++++++++++ contrib/wpa/wpa_supplicant/scan.c | 57 +- .../systemd/wpa_supplicant.service.in | 1 + contrib/wpa/wpa_supplicant/wpa_cli.c | 47 + contrib/wpa/wpa_supplicant/wpa_supplicant.c | 284 ++- contrib/wpa/wpa_supplicant/wpa_supplicant.conf | 2 +- contrib/wpa/wpa_supplicant/wpa_supplicant_i.h | 138 +- contrib/wpa/wpa_supplicant/wpas_glue.c | 2 + 115 files changed, 7047 insertions(+), 2406 deletions(-) diff --git a/contrib/wpa/hostapd/config_file.c b/contrib/wpa/hostapd/config_file.c index 9bc1dc7756e9..daf3f37ad99e 100644 --- a/contrib/wpa/hostapd/config_file.c +++ b/contrib/wpa/hostapd/config_file.c @@ -13,6 +13,7 @@ #include "utils/common.h" #include "utils/uuid.h" +#include "utils/crc32.h" #include "common/ieee802_11_defs.h" #include "common/sae.h" #include "crypto/sha256.h" @@ -2396,16 +2397,19 @@ static int hostapd_config_fill(struct hostapd_config *conf, wpa_printf(MSG_INFO, "Line %d: DEPRECATED: 'dump_file' configuration variable is not used anymore", line); } else if (os_strcmp(buf, "ssid") == 0) { - bss->ssid.ssid_len = os_strlen(pos); - if (bss->ssid.ssid_len > SSID_MAX_LEN || - bss->ssid.ssid_len < 1) { + struct hostapd_ssid *ssid = &bss->ssid; + + ssid->ssid_len = os_strlen(pos); + if (ssid->ssid_len > SSID_MAX_LEN || ssid->ssid_len < 1) { wpa_printf(MSG_ERROR, "Line %d: invalid SSID '%s'", line, pos); return 1; } - os_memcpy(bss->ssid.ssid, pos, bss->ssid.ssid_len); - bss->ssid.ssid_set = 1; + os_memcpy(ssid->ssid, pos, ssid->ssid_len); + ssid->ssid_set = 1; + ssid->short_ssid = crc32(ssid->ssid, ssid->ssid_len); } else if (os_strcmp(buf, "ssid2") == 0) { + struct hostapd_ssid *ssid = &bss->ssid; size_t slen; char *str = wpa_config_parse_string(pos, &slen); if (str == NULL || slen < 1 || slen > SSID_MAX_LEN) { @@ -2414,9 +2418,10 @@ static int hostapd_config_fill(struct hostapd_config *conf, os_free(str); return 1; } - os_memcpy(bss->ssid.ssid, str, slen); - bss->ssid.ssid_len = slen; - bss->ssid.ssid_set = 1; + os_memcpy(ssid->ssid, str, slen); + ssid->ssid_len = slen; + ssid->ssid_set = 1; + ssid->short_ssid = crc32(ssid->ssid, ssid->ssid_len); os_free(str); } else if (os_strcmp(buf, "utf8_ssid") == 0) { bss->ssid.utf8_ssid = atoi(pos) > 0; @@ -3515,6 +3520,8 @@ static int hostapd_config_fill(struct hostapd_config *conf, conf->he_op.he_twt_responder = atoi(pos); } else if (os_strcmp(buf, "he_rts_threshold") == 0) { conf->he_op.he_rts_threshold = atoi(pos); + } else if (os_strcmp(buf, "he_er_su_disable") == 0) { + conf->he_op.he_er_su_disable = atoi(pos); } else if (os_strcmp(buf, "he_basic_mcs_nss_set") == 0) { conf->he_op.he_basic_mcs_nss_set = atoi(pos); } else if (os_strcmp(buf, "he_mu_edca_qos_info_param_count") == 0) { @@ -4705,6 +4712,8 @@ static int hostapd_config_fill(struct hostapd_config *conf, if (get_hex_config(bss->ext_capa, EXT_CAPA_MAX_LEN, line, "ext_capa", pos)) return 1; + } else if (os_strcmp(buf, "rnr") == 0) { + bss->rnr = atoi(pos); } else { wpa_printf(MSG_ERROR, "Line %d: unknown configuration item '%s'", diff --git a/contrib/wpa/hostapd/ctrl_iface.c b/contrib/wpa/hostapd/ctrl_iface.c index 4a2d60627070..6c99a3105f49 100644 --- a/contrib/wpa/hostapd/ctrl_iface.c +++ b/contrib/wpa/hostapd/ctrl_iface.c @@ -840,7 +840,7 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd, const char *pos, *end; int disassoc_timer = 0; struct sta_info *sta; - u8 req_mode = 0, valid_int = 0x01; + u8 req_mode = 0, valid_int = 0x01, dialog_token = 0x01; u8 bss_term_dur[12]; char *url = NULL; int ret; @@ -878,6 +878,12 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd, valid_int = atoi(pos); } + pos = os_strstr(cmd, " dialog_token="); + if (pos) { + pos += 14; + dialog_token = atoi(pos); + } + pos = os_strstr(cmd, " bss_term="); if (pos) { pos += 10; @@ -984,7 +990,7 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd, #endif /* CONFIG_MBO */ ret = wnm_send_bss_tm_req(hapd, sta, req_mode, disassoc_timer, - valid_int, bss_term_dur, url, + valid_int, bss_term_dur, dialog_token, url, nei_len ? nei_rep : NULL, nei_len, mbo_len ? mbo : NULL, mbo_len); #ifdef CONFIG_MBO @@ -1455,10 +1461,10 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd) wps_version_number & 0x0f); hostapd_wps_update_ie(hapd); } - } else if (os_strcasecmp(cmd, "wps_testing_dummy_cred") == 0) { - wps_testing_dummy_cred = atoi(value); - wpa_printf(MSG_DEBUG, "WPS: Testing - dummy_cred=%d", - wps_testing_dummy_cred); + } else if (os_strcasecmp(cmd, "wps_testing_stub_cred") == 0) { + wps_testing_stub_cred = atoi(value); + wpa_printf(MSG_DEBUG, "WPS: Testing - stub_cred=%d", + wps_testing_stub_cred); } else if (os_strcasecmp(cmd, "wps_corrupt_pkhash") == 0) { wps_corrupt_pkhash = atoi(value); wpa_printf(MSG_DEBUG, "WPS: Testing - wps_corrupt_pkhash=%d", @@ -3185,8 +3191,9 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf) u8 bssid[ETH_ALEN]; struct wpabuf *nr, *lci = NULL, *civic = NULL; int stationary = 0; + int bss_parameters = 0; char *tmp; - int ret; + int ret = -1; if (!(hapd->conf->radio_measurements[0] & WLAN_RRM_CAPS_NEIGHBOR_REPORT)) { @@ -3240,8 +3247,7 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf) if (!lci) { wpa_printf(MSG_ERROR, "CTRL: SET_NEIGHBOR: Bad LCI subelement"); - wpabuf_free(nr); - return -1; + goto fail; } } @@ -3257,9 +3263,7 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf) if (!civic) { wpa_printf(MSG_ERROR, "CTRL: SET_NEIGHBOR: Bad civic subelement"); - wpabuf_free(nr); - wpabuf_free(lci); - return -1; + goto fail; } } @@ -3269,10 +3273,21 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf) if (os_strstr(buf, "stat")) stationary = 1; + tmp = os_strstr(buf, "bss_parameter="); + if (tmp) { + bss_parameters = atoi(tmp + 14); + if (bss_parameters < 0 || bss_parameters > 0xff) { + wpa_printf(MSG_ERROR, + "CTRL: SET_NEIGHBOR: Bad bss_parameters subelement"); + goto fail; + } + } + set: ret = hostapd_neighbor_set(hapd, bssid, &ssid, nr, lci, civic, - stationary); + stationary, bss_parameters); +fail: wpabuf_free(nr); wpabuf_free(lci); wpabuf_free(civic); @@ -4470,7 +4485,7 @@ static void hostapd_ctrl_iface_flush(struct hapd_interfaces *interfaces) { #ifdef CONFIG_WPS_TESTING wps_version_number = 0x20; - wps_testing_dummy_cred = 0; + wps_testing_stub_cred = 0; wps_corrupt_pkhash = 0; #endif /* CONFIG_WPS_TESTING */ diff --git a/contrib/wpa/hostapd/hlr_auc_gw.milenage_db b/contrib/wpa/hostapd/hlr_auc_gw.milenage_db index c156a29aeda0..a250653108b3 100644 --- a/contrib/wpa/hostapd/hlr_auc_gw.milenage_db +++ b/contrib/wpa/hostapd/hlr_auc_gw.milenage_db @@ -3,7 +3,7 @@ # 4.3.20 Test Set 20. SQN is the last used SQN value. # These values can be used for both UMTS (EAP-AKA) and GSM (EAP-SIM) # authentication. In case of GSM/EAP-SIM, AMF and SQN values are not used, but -# dummy values will need to be included in this file. +# stub values will need to be included in this file. # IMSI Ki OPc AMF SQN [RES_len] 232010000000000 90dca4eda45b53cf0f12d7c9c3bc6a89 cb9cccc4b9258e6dca4760379fb82581 61df 000000000000 diff --git a/contrib/wpa/hostapd/hostapd.conf b/contrib/wpa/hostapd/hostapd.conf index b5d15061f850..67d4cefb920b 100644 --- a/contrib/wpa/hostapd/hostapd.conf +++ b/contrib/wpa/hostapd/hostapd.conf @@ -841,6 +841,11 @@ wmm_ac_vo_acm=0 # unsigned integer = duration in units of 16 us #he_rts_threshold=0 +#he_er_su_disable: Disable 242-tone HE ER SU PPDU reception by the AP +# 0 = enable reception (default) +# 1 = disable reception +#he_er_su_disable=0 + # HE operating channel information; see matching vht_* parameters for details. # he_oper_centr_freq_seg0_idx field is used to indicate center frequency of 80 # and 160 MHz bandwidth operation. In 80+80 MHz operation, it is the center @@ -1832,7 +1837,7 @@ own_ip_addr=127.0.0.1 #assoc_sa_query_retry_timeout=201 # ocv: Operating Channel Validation -# This is a countermeasure against multi-channel man-in-the-middle attacks. +# This is a countermeasure against multi-channel on-path attacks. # Enabling this depends on the driver's support for OCV when the driver SME is # used. If hostapd SME is used, this will be enabled just based on this # configuration. @@ -2916,6 +2921,9 @@ own_ip_addr=127.0.0.1 # that allows sending of such data. Default: 0. #stationary_ap=0 +# Enable reduced neighbor reporting (RNR) +#rnr=0 + ##### Airtime policy configuration ########################################### # Set the airtime policy operating mode: diff --git a/contrib/wpa/hostapd/hostapd_cli.c b/contrib/wpa/hostapd/hostapd_cli.c index eaa628ad0676..0e7fdd6bccfb 100644 --- a/contrib/wpa/hostapd/hostapd_cli.c +++ b/contrib/wpa/hostapd/hostapd_cli.c @@ -1048,7 +1048,7 @@ static char ** hostapd_complete_set(const char *str, int pos) int arg = get_cmd_arg_num(str, pos); const char *fields[] = { #ifdef CONFIG_WPS_TESTING - "wps_version_number", "wps_testing_dummy_cred", + "wps_version_number", "wps_testing_stub_cred", "wps_corrupt_pkhash", #endif /* CONFIG_WPS_TESTING */ #ifdef CONFIG_INTERWORKING diff --git a/contrib/wpa/src/ap/acs.c b/contrib/wpa/src/ap/acs.c index a112045364e3..46429f265433 100644 --- a/contrib/wpa/src/ap/acs.c +++ b/contrib/wpa/src/ap/acs.c @@ -309,8 +309,6 @@ acs_survey_interference_factor(struct freq_survey *survey, s8 min_nf) else if (survey->filled & SURVEY_HAS_CHAN_TIME_RX) busy = survey->channel_time_rx; else { - /* This shouldn't really happen as survey data is checked in - * acs_sanity_check() */ wpa_printf(MSG_ERROR, "ACS: Survey data missing"); return 0; } @@ -392,7 +390,7 @@ static int acs_usable_bw40_chan(const struct hostapd_channel_data *chan) static int acs_usable_bw80_chan(const struct hostapd_channel_data *chan) { - const int allowed[] = { 5180, 5260, 5550, 5580, 5660, 5745, 5955, 6035, + const int allowed[] = { 5180, 5260, 5500, 5580, 5660, 5745, 5955, 6035, 6115, 6195, 6275, 6355, 6435, 6515, 6595, 6675, 6755, 6835, 6915, 6995 }; unsigned int i; diff --git a/contrib/wpa/src/ap/ap_config.c b/contrib/wpa/src/ap/ap_config.c index 7b6d54c35fc2..86b6e097cf89 100644 --- a/contrib/wpa/src/ap/ap_config.c +++ b/contrib/wpa/src/ap/ap_config.c @@ -273,7 +273,7 @@ struct hostapd_config * hostapd_config_defaults(void) conf->he_op.he_basic_mcs_nss_set = 0xfffc; conf->he_op.he_bss_color_disabled = 1; conf->he_op.he_bss_color_partial = 0; - conf->he_op.he_bss_color = 1; + conf->he_op.he_bss_color = os_random() % 63 + 1; conf->he_op.he_twt_responder = 1; conf->he_6ghz_max_mpdu = 2; conf->he_6ghz_max_ampdu_len_exp = 7; @@ -1423,6 +1423,15 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, } #endif /* CONFIG_SAE_PK */ +#ifdef CONFIG_FILS + if (full_config && bss->fils_discovery_min_int && + bss->unsol_bcast_probe_resp_interval) { + wpa_printf(MSG_ERROR, + "Cannot enable both FILS discovery and unsolicited broadcast Probe Response at the same time"); + return -1; + } +#endif /* CONFIG_FILS */ + return 0; } diff --git a/contrib/wpa/src/ap/ap_config.h b/contrib/wpa/src/ap/ap_config.h index ced36f9cc828..b8f791e56307 100644 --- a/contrib/wpa/src/ap/ap_config.h +++ b/contrib/wpa/src/ap/ap_config.h @@ -894,6 +894,8 @@ struct hostapd_bss_config { u8 ext_capa_mask[EXT_CAPA_MAX_LEN]; u8 ext_capa[EXT_CAPA_MAX_LEN]; + + u8 rnr; }; /** @@ -916,6 +918,7 @@ struct he_operation { u8 he_twt_required; u8 he_twt_responder; u16 he_rts_threshold; + u8 he_er_su_disable; u16 he_basic_mcs_nss_set; }; diff --git a/contrib/wpa/src/ap/beacon.c b/contrib/wpa/src/ap/beacon.c index 15fc2b3db064..22782f54e480 100644 --- a/contrib/wpa/src/ap/beacon.c +++ b/contrib/wpa/src/ap/beacon.c @@ -469,6 +469,7 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd, } #endif /* CONFIG_IEEE80211AX */ + buflen += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_PROBE_RESP); buflen += hostapd_mbo_ie_len(hapd); buflen += hostapd_eid_owe_trans_len(hapd); buflen += hostapd_eid_dpp_cc_len(hapd); @@ -573,6 +574,7 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd, (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)) pos = hostapd_eid_wb_chsw_wrapper(hapd, pos); + pos = hostapd_eid_rnr(hapd, pos, WLAN_FC_STYPE_PROBE_RESP); pos = hostapd_eid_fils_indic(hapd, pos, 0); pos = hostapd_get_rsnxe(hapd, pos, epos - pos); @@ -642,7 +644,8 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd, enum ssid_match_result { NO_SSID_MATCH, EXACT_SSID_MATCH, - WILDCARD_SSID_MATCH + WILDCARD_SSID_MATCH, + CO_LOCATED_SSID_MATCH, }; static enum ssid_match_result ssid_match(struct hostapd_data *hapd, @@ -653,7 +656,9 @@ static enum ssid_match_result ssid_match(struct hostapd_data *hapd, size_t short_ssid_list_len) { const u8 *pos, *end; + struct hostapd_iface *iface = hapd->iface; int wildcard = 0; + size_t i, j; if (ssid_len == 0) wildcard = 1; @@ -687,7 +692,33 @@ static enum ssid_match_result ssid_match(struct hostapd_data *hapd, } } - return wildcard ? WILDCARD_SSID_MATCH : NO_SSID_MATCH; + if (wildcard) + return WILDCARD_SSID_MATCH; + + if (!iface->interfaces || iface->interfaces->count <= 1 || + is_6ghz_op_class(hapd->iconf->op_class)) + return NO_SSID_MATCH; + + for (i = 0; i < iface->interfaces->count; i++) { + struct hostapd_iface *colocated; + + colocated = iface->interfaces->iface[i]; + + if (colocated == iface || + !is_6ghz_op_class(colocated->conf->op_class)) + continue; + + for (j = 0; j < colocated->num_bss; j++) { + struct hostapd_bss_config *conf; + + conf = colocated->bss[j]->conf; + if (ssid_len == conf->ssid.ssid_len && + os_memcmp(ssid, conf->ssid.ssid, ssid_len) == 0) + return CO_LOCATED_SSID_MATCH; + } + } + + return NO_SSID_MATCH; } @@ -1284,6 +1315,8 @@ static u8 * hostapd_gen_fils_discovery(struct hostapd_data *hapd, size_t *len) total_len += 3; } + total_len += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_ACTION); + pos = hostapd_eid_fils_indic(hapd, buf, 0); buf_len = pos - buf; total_len += buf_len; @@ -1352,6 +1385,8 @@ static u8 * hostapd_gen_fils_discovery(struct hostapd_data *hapd, size_t *len) /* Fill in the Length field value */ *length_pos = pos - (length_pos + 1); + pos = hostapd_eid_rnr(hapd, pos, WLAN_FC_STYPE_ACTION); + /* FILS Indication element */ if (buf_len) { os_memcpy(pos, buf, buf_len); @@ -1438,6 +1473,7 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd, } #endif /* CONFIG_IEEE80211AX */ + tail_len += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_BEACON); tail_len += hostapd_mbo_ie_len(hapd); tail_len += hostapd_eid_owe_trans_len(hapd); tail_len += hostapd_eid_dpp_cc_len(hapd); @@ -1562,6 +1598,7 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd, (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)) tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos); + tailpos = hostapd_eid_rnr(hapd, tailpos, WLAN_FC_STYPE_BEACON); tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0); tailpos = hostapd_get_rsnxe(hapd, tailpos, tailend - tailpos); @@ -1743,7 +1780,7 @@ void ieee802_11_free_ap_params(struct wpa_driver_ap_params *params) } -int ieee802_11_set_beacon(struct hostapd_data *hapd) +static int __ieee802_11_set_beacon(struct hostapd_data *hapd) { struct wpa_driver_ap_params params; struct hostapd_freq_params freq; @@ -1832,6 +1869,42 @@ fail: } +int ieee802_11_set_beacon(struct hostapd_data *hapd) +{ + struct hostapd_iface *iface = hapd->iface; + int ret; + size_t i, j; + bool is_6g; + + ret = __ieee802_11_set_beacon(hapd); + if (ret != 0) + return ret; + + if (!iface->interfaces || iface->interfaces->count <= 1) + return 0; + + /* Update Beacon frames in case of 6 GHz colocation */ + is_6g = is_6ghz_op_class(iface->conf->op_class); + for (j = 0; j < iface->interfaces->count; j++) { + struct hostapd_iface *colocated; + + colocated = iface->interfaces->iface[j]; + if (colocated == iface || !colocated || !colocated->conf) + continue; + + if (is_6g == is_6ghz_op_class(colocated->conf->op_class)) + continue; + + for (i = 0; i < colocated->num_bss; i++) { + if (colocated->bss[i] && colocated->bss[i]->started) + __ieee802_11_set_beacon(colocated->bss[i]); + } + } + + return 0; +} + + int ieee802_11_set_beacons(struct hostapd_iface *iface) { size_t i; diff --git a/contrib/wpa/src/ap/ctrl_iface_ap.c b/contrib/wpa/src/ap/ctrl_iface_ap.c index 28e40ba9cede..1d8fb8246581 100644 --- a/contrib/wpa/src/ap/ctrl_iface_ap.c +++ b/contrib/wpa/src/ap/ctrl_iface_ap.c @@ -50,9 +50,35 @@ static size_t hostapd_write_ht_mcs_bitmask(char *buf, size_t buflen, } -static int hostapd_get_sta_tx_rx(struct hostapd_data *hapd, - struct sta_info *sta, - char *buf, size_t buflen) +static int hostapd_get_sta_conn_time(struct sta_info *sta, + struct hostap_sta_driver_data *data, + char *buf, size_t buflen) +{ + struct os_reltime age; + unsigned long secs; + int ret; + + if (sta->connected_time.sec) { + /* Locally maintained time in AP mode */ + os_reltime_age(&sta->connected_time, &age); + secs = (unsigned long) age.sec; + } else if (data->flags & STA_DRV_DATA_CONN_TIME) { + /* Time from the driver in mesh mode */ + secs = data->connected_sec; + } else { + return 0; + } + + ret = os_snprintf(buf, buflen, "connected_time=%lu\n", secs); + if (os_snprintf_error(buflen, ret)) + return 0; + return ret; +} + + +static int hostapd_get_sta_info(struct hostapd_data *hapd, + struct sta_info *sta, + char *buf, size_t buflen) { struct hostap_sta_driver_data data; int ret; @@ -160,26 +186,9 @@ static int hostapd_get_sta_tx_rx(struct hostapd_data *hapd, len += ret; } - return len; -} + len += hostapd_get_sta_conn_time(sta, &data, buf + len, buflen - len); - -static int hostapd_get_sta_conn_time(struct sta_info *sta, - char *buf, size_t buflen) -{ - struct os_reltime age; - int ret; - - if (!sta->connected_time.sec) - return 0; - - os_reltime_age(&sta->connected_time, &age); - - ret = os_snprintf(buf, buflen, "connected_time=%u\n", - (unsigned int) age.sec); - if (os_snprintf_error(buflen, ret)) - return 0; - return ret; + return len; } @@ -263,8 +272,7 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd, if (res >= 0) len += res; - len += hostapd_get_sta_tx_rx(hapd, sta, buf + len, buflen - len); - len += hostapd_get_sta_conn_time(sta, buf + len, buflen - len); + len += hostapd_get_sta_info(hapd, sta, buf + len, buflen - len); #ifdef CONFIG_SAE if (sta->sae && sta->sae->state == SAE_ACCEPTED) { diff --git a/contrib/wpa/src/ap/dhcp_snoop.c b/contrib/wpa/src/ap/dhcp_snoop.c index edc77da2e797..551936b8e43c 100644 --- a/contrib/wpa/src/ap/dhcp_snoop.c +++ b/contrib/wpa/src/ap/dhcp_snoop.c @@ -88,6 +88,7 @@ static void handle_dhcp(void *ctx, const u8 *src_addr, const u8 *buf, } } +#ifdef CONFIG_HS20 if (hapd->conf->disable_dgaf && is_broadcast_ether_addr(buf)) { for (sta = hapd->sta_list; sta; sta = sta->next) { if (!(sta->flags & WLAN_STA_AUTHORIZED)) @@ -96,6 +97,7 @@ static void handle_dhcp(void *ctx, const u8 *src_addr, const u8 *buf, (u8 *) buf, len); } } +#endif /* CONFIG_HS20 */ if (msgtype == DHCPACK) { if (b->your_ip == 0) diff --git a/contrib/wpa/src/ap/dpp_hostapd.c b/contrib/wpa/src/ap/dpp_hostapd.c index 93ffd8cf7c36..41769f475544 100644 --- a/contrib/wpa/src/ap/dpp_hostapd.c +++ b/contrib/wpa/src/ap/dpp_hostapd.c @@ -2276,6 +2276,8 @@ void hostapd_dpp_deinit(struct hostapd_data *hapd) eloop_cancel_timeout(hostapd_dpp_conn_status_result_wait_timeout, hapd, NULL); hostapd_dpp_chirp_stop(hapd); + if (hapd->iface->interfaces) + dpp_controller_stop_for_ctx(hapd->iface->interfaces->dpp, hapd); #endif /* CONFIG_DPP2 */ dpp_auth_deinit(hapd->dpp_auth); hapd->dpp_auth = NULL; @@ -2387,6 +2389,7 @@ hostapd_dpp_chirp_scan_res_handler(struct hostapd_iface *iface) unsigned int i; struct hostapd_hw_modes *mode; int c; + bool chan6 = hapd->iface->hw_features == NULL; if (!bi) return; @@ -2406,7 +2409,21 @@ hostapd_dpp_chirp_scan_res_handler(struct hostapd_iface *iface) } /* Preferred chirping channels */ - int_array_add_unique(&hapd->dpp_chirp_freqs, 2437); + mode = dpp_get_mode(hapd, HOSTAPD_MODE_IEEE80211G); + if (mode) { + for (c = 0; c < mode->num_channels; c++) { + struct hostapd_channel_data *chan = &mode->channels[c]; + + if (chan->flag & (HOSTAPD_CHAN_DISABLED | + HOSTAPD_CHAN_RADAR) || + chan->freq != 2437) + continue; + chan6 = true; + break; + } + } + if (chan6) + int_array_add_unique(&hapd->dpp_chirp_freqs, 2437); mode = dpp_get_mode(hapd, HOSTAPD_MODE_IEEE80211A); if (mode) { diff --git a/contrib/wpa/src/ap/hostapd.h b/contrib/wpa/src/ap/hostapd.h index 07d0aaa92100..f3ca7529ac96 100644 --- a/contrib/wpa/src/ap/hostapd.h +++ b/contrib/wpa/src/ap/hostapd.h @@ -138,6 +138,8 @@ struct hostapd_neighbor_entry { /* LCI update time */ struct os_time lci_date; int stationary; + u32 short_ssid; + u8 bss_parameters; }; struct hostapd_sae_commit_queue { diff --git a/contrib/wpa/src/ap/hw_features.c b/contrib/wpa/src/ap/hw_features.c index bb5404fa7dd4..4b66b02f4e16 100644 --- a/contrib/wpa/src/ap/hw_features.c +++ b/contrib/wpa/src/ap/hw_features.c @@ -838,6 +838,8 @@ static int hostapd_is_usable_edmg(struct hostapd_iface *iface) iface->freq, NULL, iface->hw_features, iface->num_hw_features); + if (!pri_chan) + return 0; hostapd_encode_edmg_chan(iface->conf->enable_edmg, iface->conf->edmg_channel, pri_chan->chan, diff --git a/contrib/wpa/src/ap/ieee802_11.c b/contrib/wpa/src/ap/ieee802_11.c index 22cce961063e..db41049287fc 100644 --- a/contrib/wpa/src/ap/ieee802_11.c +++ b/contrib/wpa/src/ap/ieee802_11.c @@ -2398,7 +2398,7 @@ static int pasn_wd_handle_sae_commit(struct hostapd_data *hapd, buf_len = wpabuf_len(wd); if (buf_len < 6) { - wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%lu", + wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%zu", buf_len); return -1; } @@ -2474,7 +2474,7 @@ static int pasn_wd_handle_sae_confirm(struct hostapd_data *hapd, buf_len = wpabuf_len(wd); if (buf_len < 6) { - wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%lu", + wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%zu", buf_len); return -1; } @@ -2704,7 +2704,7 @@ static int pasn_wd_handle_fils(struct hostapd_data *hapd, struct sta_info *sta, buf_len = wpabuf_len(wd); if (buf_len < 6) { - wpa_printf(MSG_DEBUG, "PASN: FILS: Buffer too short. len=%lu", + wpa_printf(MSG_DEBUG, "PASN: FILS: Buffer too short. len=%zu", buf_len); return -1; } @@ -7071,4 +7071,386 @@ u8 * hostapd_eid_wb_chsw_wrapper(struct hostapd_data *hapd, u8 *eid) return eid; } + +static size_t hostapd_eid_nr_db_len(struct hostapd_data *hapd, + size_t *current_len) +{ + struct hostapd_neighbor_entry *nr; + size_t total_len = 0, len = *current_len; + + dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry, + list) { + if (!nr->nr || wpabuf_len(nr->nr) < 12) + continue; + + if (nr->short_ssid == hapd->conf->ssid.short_ssid) + continue; + + /* Start a new element */ + if (!len || + len + RNR_TBTT_HEADER_LEN + RNR_TBTT_INFO_LEN > 255) { + len = RNR_HEADER_LEN; + total_len += RNR_HEADER_LEN; + } + + len += RNR_TBTT_HEADER_LEN + RNR_TBTT_INFO_LEN; + total_len += RNR_TBTT_HEADER_LEN + RNR_TBTT_INFO_LEN; + } + + *current_len = len; + return total_len; +} + + +static size_t hostapd_eid_rnr_iface_len(struct hostapd_data *hapd, + struct hostapd_data *reporting_hapd, + size_t *current_len) +{ + size_t total_len = 0, len = *current_len; + int tbtt_count = 0; + size_t i, start = 0; + + while (start < hapd->iface->num_bss) { + if (!len || + len + RNR_TBTT_HEADER_LEN + RNR_TBTT_INFO_LEN > 255) { + len = RNR_HEADER_LEN; + total_len += RNR_HEADER_LEN; + } + + len += RNR_TBTT_HEADER_LEN; + total_len += RNR_TBTT_HEADER_LEN; + + for (i = start; i < hapd->iface->num_bss; i++) { + struct hostapd_data *bss = hapd->iface->bss[i]; + + if (!bss || !bss->conf || !bss->started) + continue; + + if (bss == reporting_hapd || + bss->conf->ignore_broadcast_ssid) + continue; + + if (len + RNR_TBTT_INFO_LEN > 255 || + tbtt_count >= RNR_TBTT_INFO_COUNT_MAX) + break; + + len += RNR_TBTT_INFO_LEN; + total_len += RNR_TBTT_INFO_LEN; + tbtt_count++; + } + start = i; + } + + if (!tbtt_count) + total_len = 0; + else + *current_len = len; + + return total_len; +} + + +enum colocation_mode { + NO_COLOCATED_6GHZ, + STANDALONE_6GHZ, + COLOCATED_6GHZ, + COLOCATED_LOWER_BAND, +}; + +static enum colocation_mode get_colocation_mode(struct hostapd_data *hapd) +{ + u8 i; + bool is_6ghz = is_6ghz_op_class(hapd->iconf->op_class); + + if (!hapd->iface || !hapd->iface->interfaces) + return NO_COLOCATED_6GHZ; + + if (is_6ghz && hapd->iface->interfaces->count == 1) + return STANDALONE_6GHZ; + + for (i = 0; i < hapd->iface->interfaces->count; i++) { + struct hostapd_iface *iface; + bool is_colocated_6ghz; + + iface = hapd->iface->interfaces->iface[i]; + if (iface == hapd->iface || !iface || !iface->conf) + continue; + + is_colocated_6ghz = is_6ghz_op_class(iface->conf->op_class); + if (!is_6ghz && is_colocated_6ghz) + return COLOCATED_LOWER_BAND; + if (is_6ghz && !is_colocated_6ghz) + return COLOCATED_6GHZ; + } + + if (is_6ghz) + return STANDALONE_6GHZ; + + return NO_COLOCATED_6GHZ; +} + + +static size_t hostapd_eid_rnr_colocation_len(struct hostapd_data *hapd, + size_t *current_len) +{ + struct hostapd_iface *iface; + size_t len = 0; + size_t i; + + if (!hapd->iface || !hapd->iface->interfaces) + return 0; + + for (i = 0; i < hapd->iface->interfaces->count; i++) { + iface = hapd->iface->interfaces->iface[i]; + + if (iface == hapd->iface || + !is_6ghz_op_class(iface->conf->op_class)) + continue; + + len += hostapd_eid_rnr_iface_len(iface->bss[0], hapd, + current_len); + } + + return len; +} + + +size_t hostapd_eid_rnr_len(struct hostapd_data *hapd, u32 type) +{ + size_t total_len = 0, current_len = 0; + enum colocation_mode mode = get_colocation_mode(hapd); + + switch (type) { + case WLAN_FC_STYPE_BEACON: + if (hapd->conf->rnr) + total_len += hostapd_eid_nr_db_len(hapd, ¤t_len); + /* fallthrough */ + + case WLAN_FC_STYPE_PROBE_RESP: + if (mode == COLOCATED_LOWER_BAND) + total_len += hostapd_eid_rnr_colocation_len( + hapd, ¤t_len); + + if (hapd->conf->rnr && hapd->iface->num_bss > 1) + total_len += hostapd_eid_rnr_iface_len(hapd, hapd, + ¤t_len); + break; + + case WLAN_FC_STYPE_ACTION: + if (hapd->iface->num_bss > 1 && mode == STANDALONE_6GHZ) + total_len += hostapd_eid_rnr_iface_len(hapd, hapd, + ¤t_len); + break; *** 13352 LINES SKIPPED *** From nobody Fri Dec 3 01:06:54 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 11C1E18BD523; Fri, 3 Dec 2021 01:06:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4vmZ5nMnz3QGc; Fri, 3 Dec 2021 01:06:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2D3A27661; Fri, 3 Dec 2021 01:06: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 1B316sLr076591; Fri, 3 Dec 2021 01:06:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B316svs076590; Fri, 3 Dec 2021 01:06:54 GMT (envelope-from git) Date: Fri, 3 Dec 2021 01:06:54 GMT Message-Id: <202112030106.1B316svs076590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: a58135eb0927 - main - OptionalObsoleteFiles.inc: Add rc.d/zfskeys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a58135eb092748caf383bc82306af522ff311d9d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638493614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LNcwyM98XL4pLcFuf5nJPvHvjtaZE1dLb3Tpc88hMZM=; b=WLyo/z9IIJ1LuOaFedMoicn/51VeDwVs5iBRg+hOjS3I7CQNAokWVpNyjg9g6wISG/gzfg Uq+JDMEABlAIFMYyLn+9+GvCYgWviQi7kgzQOXFoTraO/cFXZ5NN4nc7ANMyuKFrvNecAT cts5X42CQwD2vKyxIdoTWlwJpA+K70BbSieya/57YcUGqkFpxfmiz7bXF3KXHiC24nLa4s f8bdcqY6Y8VakIafJ//jbpkzGLHhsu6UUAH0xwI0Xh6uXOFKHKgpQSdktfoh5Xfm08AQX8 JrnVbursXmW/wAekTGbN+Eg0uMxk9dB73plE4MUiMaVccb2uGGtDMEKYy8an1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638493614; a=rsa-sha256; cv=none; b=EiVZViNoUSQ181kC3qMvEb+RhJUKnGsvcVZ0deFW0FqAr+GdwUxyVXUKVwyZzMZDUN8J6y xWSO8lCyc59oRX22X9o3npVe2IZmh+tY1RRa5frBlJ2juOPMToNuF7uYyXLbTBVbaOTvFN k3oPKVRO98MgaIMDO/dqQ9iKPUSIJoojrocvqi4PCHqIh4iVkiIIlsY29tsOjsipbSi/Bk UKFV2S4Yci625qP4SNVveNpCRr7lsS5xtOFstqO5ycbtUiY9MPSDKDNp2QtkfmA2rOaUKo CqM1kMiQt/ZurmpQV3FlfOSl5wYaiD6dszNiMzsqhEDgBJzO+MePomqz3MQK6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a58135eb092748caf383bc82306af522ff311d9d commit a58135eb092748caf383bc82306af522ff311d9d Author: Herbert J. Skuhra AuthorDate: 2021-12-03 00:44:55 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-12-03 01:05:55 +0000 OptionalObsoleteFiles.inc: Add rc.d/zfskeys While here, sort the etc/rc.d entries. PR: 256483 Reviewed by: allanjude Approved by: allanjude (src) MFC after: 3 days Sponsored by: Modirum MDPay Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D33238 --- tools/build/mk/OptionalObsoleteFiles.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index e6b1b1909771..02406a3c43e2 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1118,8 +1118,9 @@ OLD_FILES+=boot/gptzfsboot OLD_FILES+=boot/zfsboot OLD_FILES+=boot/zfsloader OLD_FILES+=etc/rc.d/zfs -OLD_FILES+=etc/rc.d/zfsd OLD_FILES+=etc/rc.d/zfsbe +OLD_FILES+=etc/rc.d/zfsd +OLD_FILES+=etc/rc.d/zfskeys OLD_FILES+=etc/rc.d/zvol OLD_FILES+=etc/devd/zfs.conf OLD_FILES+=etc/periodic/daily/404.status-zfs From nobody Fri Dec 3 01:11:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 171A418BDE76; Fri, 3 Dec 2021 01:11: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 4J4vsn59Hcz3Qw4; Fri, 3 Dec 2021 01:11:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8889127676; Fri, 3 Dec 2021 01:11: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 1B31BP2l088247; Fri, 3 Dec 2021 01:11:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B31BPcr088246; Fri, 3 Dec 2021 01:11:25 GMT (envelope-from git) Date: Fri, 3 Dec 2021 01:11:25 GMT Message-Id: <202112030111.1B31BPcr088246@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 5e077e08ef87 - main - style.mdoc: Prefer Ql to Dq Li for literal display List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e077e08ef87126765b5a818def6cb99314ab192 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638493885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BXKRqZlA/VGGU1cBhEIkFAl9wvd0CY95VfOL2/rv4ZU=; b=idT4GzMBdskcJMG/FnC+VorEmlaG9NGtf/+JM/OTZXGqp/IYO7WE4hPaGHI11eD3ETD+Ug 2KNkUnryp+M+G9GCYDNBVt06Hc1wC0oWYiNDygDySl3o3Vq3P+JVBAyAULCgo4/fEI+Ynx P++TQQTsb0UGYnufUWxnjf6C6Yvec1/YVtMnWCKBcd/hjOU3doTQ3flCXk10zlph/mo6jJ 2CeC9wlAWTUIPUhw/VOWFdcuHc5e6jT5A6ICfXIbBK+hY36eZ2XRso+LN3LqfOOhUmhMo6 HcidV1vVKpP4FiKco6Tjc5W3fQG6UcH2VD3WqxT79Jvki8nGF962oi+vcizgNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638493885; a=rsa-sha256; cv=none; b=eLlzJWV75xnmb9Az3QUH8jHeDQ2usm5QkcC6AoX1oxyJLSotsA20a7uPZDnq7S4Ml9YAa5 N44jZ7yOFpg3BSXXafDggadnNPmKUXEUhZKfQooBD2Z6D7qwCkcW8a2TY6wMvQvWeb93XB h36h6oZqruZ3GfZzzaabJ4O1By2RRTdeUMo9/+e/Dk7KS2EPo5BgVWrJMcSRxhyxc106rs S+79DO7SInIBHJgU4Wwyaw04wg8cm6Q6kEyN2TwZNIsR1o2DbISmIwt6ezl7ViccRHtwx7 JbZzO/0+zDqMhqda0I3Vx/XukGfMsbvGSIA/zcP+JFxx4tNnvT1YTqY4FMhpNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5e077e08ef87126765b5a818def6cb99314ab192 commit 5e077e08ef87126765b5a818def6cb99314ab192 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-12-02 11:39:45 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-12-03 01:11:04 +0000 style.mdoc: Prefer Ql to Dq Li for literal display The Li macros has been deprecated by mdoc some time ago. Recommend the use of Ql instead. Reviewed by: debdrup MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33232 --- share/man/man5/style.mdoc.5 | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/share/man/man5/style.mdoc.5 b/share/man/man5/style.mdoc.5 index 368b6565b496..f8ad4fb4029b 100644 --- a/share/man/man5/style.mdoc.5 +++ b/share/man/man5/style.mdoc.5 @@ -1,7 +1,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD .\" -.\" Copyright (c) 2018-2019 Mateusz Piotrowski <0mp@FreeBSD.org> +.\" Copyright (c) 2018-2021 Mateusz Piotrowski <0mp@FreeBSD.org> .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 30, 2020 +.Dd December 3, 2021 .Dt STYLE.MDOC 5 .Os .Sh NAME @@ -45,13 +45,13 @@ source tree. Use literal formatting for examples and literal shell commands, e.g.: .Bd -literal -offset indent Then run -\&.Dq Li make install clean . +\&.Ql make install clean . .Ed .Pp which renders as: .Bd -filled -offset indent Then run -.Dq Li make install clean . +.Ql make install clean . .Ed .Pp The incorrect way would be to use macros like @@ -59,14 +59,22 @@ The incorrect way would be to use macros like to stylize the command invocation: .Bd -literal -offset indent Then run -\&.Dq Nm make Cm install Cm clean . +\&.Ql Nm make Cm install Cm clean . .Ed .Pp which renders as: .Bd -filled -offset indent Then run -.Dq Nm make Cm install Cm clean . +.Ql Nm make Cm install Cm clean . .Ed +.It +The +.Sy \&Ql +macro is the preferred macro for formatting literal inline fragments. +Historically, +.Sy \&Dq \&Li +was the preferred way before the deprecation of +.Sy \&Li . .El .Ss EXAMPLES Section .Bl -dash -width "" From nobody Fri Dec 3 01:30:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0399C18C5B8E; Fri, 3 Dec 2021 01:30: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 4J4wHc58Tjz3lZg; Fri, 3 Dec 2021 01:30:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 912C327E10; Fri, 3 Dec 2021 01:30: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 1B31UKk8010560; Fri, 3 Dec 2021 01:30:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B31UKni010546; Fri, 3 Dec 2021 01:30:20 GMT (envelope-from git) Date: Fri, 3 Dec 2021 01:30:20 GMT Message-Id: <202112030130.1B31UKni010546@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: 60a8277413ec - main - Only use OLD_LIBS with shared libraries. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 60a8277413eca3fa57f85caf331b080aee030fe5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638495020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o6yjVg9J+CA9mm6XaEdjbREaom4PxERQtudWOPXi80g=; b=UOExGRoGkRcp6pDurWo14Hd+QPrHVTQGzy+qJbby35YxBCpmDuG/ZAeMh4U2FbC6y/X0vl Mx+JwR5kHbcEhXczVEE+hXWfn7xDIPYF3VHhBOWZXJNcrlwJkohJLFQVEbdKQ5S32y/675 S6c/pH8YPHF+xN6pxlOfUUCrTxH0M9HvXjWWamUGdaYT4P4Nf9jEUE7+wzNNP17Ku0Qq5j rZfJ+lSW0ArTRvvHAQt2bsKZBP+xpmM9gmFLW9S7P/f1nayUOteHgASq9EWw+09XPUmw4a 2FBIzPRMQRXXYlNN0Sw9ScTU/cGPSb6Qc+vuuL4N/tdoDmF+lz1k7n21IhmkSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638495020; a=rsa-sha256; cv=none; b=CYhrreFXMZ5+zq9HAid6z6BVvf3QfmS8sqfjN2H7nJD1YgR2dbNLe3BJM/JTDIY+wa8HTR NHHnsjC7HramPvL4b/G36pGCc0WOpeOScIkmsTO/8Lc318/gvy25LCKdomDXe2cPhLQe1b XKcvezgL1q6+hrNMOy3OrNNOZMTD+mzYQeOH5nOOcU9oSslbnh8DGkUGSNW2O2uWE621Eq LDDHfCsA3U3qtenIkyBxPkVEycrTWgw916Cy8odY6714l99/l11BVioBqxBLyvT7vJ5Dlt rnlDarOJXtSTzx7FoEExDlihFYP5IQkteILn3ld5qI8DY6uMvHClzJncffvVYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=60a8277413eca3fa57f85caf331b080aee030fe5 commit 60a8277413eca3fa57f85caf331b080aee030fe5 Author: John Baldwin AuthorDate: 2021-12-03 01:30:00 +0000 Commit: John Baldwin CommitDate: 2021-12-03 01:30:00 +0000 Only use OLD_LIBS with shared libraries. Use OLD_FILES for a few symbolic links and static libraries previously included in OLD_LIBS. Add a missing shared library major number to an old libroken entry. --- ObsoleteFiles.inc | 34 ++++++++++++++++---------------- tools/build/mk/OptionalObsoleteFiles.inc | 34 ++++++++++++++++---------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 984437f481fd..fccc7681f3e9 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -9465,7 +9465,7 @@ OLD_FILES+=usr/tests/sys/geom/class/gate/conf.sh OLD_FILES+=usr/lib/libbsnmptools.a OLD_FILES+=usr/lib/libbsnmptools_p.a OLD_LIBS+=usr/lib/libbsnmptools.so.0 -OLD_LIBS+=usr/lib/libbsnmptools.so +OLD_FILES+=usr/lib/libbsnmptools.so # 20170102: sysdecode_getfsstat_flags() renamed to sysdecode_getfsstat_mode() OLD_FILES+=usr/share/man/man3/sysdecode_getfsstat_flags.3.gz # 20161230: libarchive ACL pax test renamed to test_acl_pax_posix1e.tar.uu @@ -13719,7 +13719,7 @@ OLD_FILES+=usr/share/examples/atm/fore-microcode.txt OLD_FILES+=usr/share/examples/atm/sscf-design.txt OLD_FILES+=usr/share/examples/atm/sscop-design.txt OLD_LIBS+=lib/libatm.so.5 -OLD_LIBS+=usr/lib/libatm.so +OLD_FILES+=usr/lib/libatm.so OLD_DIRS+=usr/include/netatm/sigpvc OLD_DIRS+=usr/include/netatm/spans OLD_DIRS+=usr/include/netatm/ipatm @@ -15944,16 +15944,16 @@ OLD_LIBS+=usr/lib/libobjc.so.2 OLD_LIBS+=usr/lib32/libgssapi.so.8 OLD_LIBS+=usr/lib32/libobjc.so.2 # 20070519: GCC 4.2 -OLD_LIBS+=usr/lib/libg2c.a -OLD_LIBS+=usr/lib/libg2c.so +OLD_FILES+=usr/lib/libg2c.a +OLD_FILES+=usr/lib/libg2c.so OLD_LIBS+=usr/lib/libg2c.so.2 -OLD_LIBS+=usr/lib/libg2c_p.a -OLD_LIBS+=usr/lib/libgcc_pic.a -OLD_LIBS+=usr/lib32/libg2c.a -OLD_LIBS+=usr/lib32/libg2c.so +OLD_FILES+=usr/lib/libg2c_p.a +OLD_FILES+=usr/lib/libgcc_pic.a +OLD_FILES+=usr/lib32/libg2c.a +OLD_FILES+=usr/lib32/libg2c.so OLD_LIBS+=usr/lib32/libg2c.so.2 -OLD_LIBS+=usr/lib32/libg2c_p.a -OLD_LIBS+=usr/lib32/libgcc_pic.a +OLD_FILES+=usr/lib32/libg2c_p.a +OLD_FILES+=usr/lib32/libgcc_pic.a # 20060729: OpenSSL 0.9.7e -> 0.9.8b upgrade OLD_LIBS+=lib/libcrypto.so.4 OLD_LIBS+=usr/lib/libssl.so.4 @@ -15976,14 +15976,14 @@ OLD_LIBS+=usr/lib/libpthread.so.2 # 20060127: revert libdisk to static-only OLD_LIBS+=usr/lib/libdisk.so.3 # 20051027: libc_r discontinued (removed 20101113) -OLD_LIBS+=usr/lib/libc_r.a -OLD_LIBS+=usr/lib/libc_r.so +OLD_FILES+=usr/lib/libc_r.a +OLD_FILES+=usr/lib/libc_r.so OLD_LIBS+=usr/lib/libc_r.so.7 -OLD_LIBS+=usr/lib/libc_r_p.a -OLD_LIBS+=usr/lib32/libc_r.a -OLD_LIBS+=usr/lib32/libc_r.so +OLD_FILES+=usr/lib/libc_r_p.a +OLD_FILES+=usr/lib32/libc_r.a +OLD_FILES+=usr/lib32/libc_r.so OLD_LIBS+=usr/lib32/libc_r.so.7 -OLD_LIBS+=usr/lib32/libc_r_p.a +OLD_FILES+=usr/lib32/libc_r_p.a # 20050722: bump for 6.0-RELEASE OLD_LIBS+=lib/libalias.so.4 OLD_LIBS+=lib/libatm.so.2 @@ -16150,7 +16150,7 @@ OLD_LIBS+=usr/lib/libkafs.so.3 OLD_LIBS+=usr/lib/libkafs5.so.5 OLD_LIBS+=usr/lib/libkdb.so.3 OLD_LIBS+=usr/lib/libkrb.so.3 -OLD_LIBS+=usr/lib/libroken.so. +OLD_LIBS+=usr/lib/libroken.so.5 OLD_LIBS+=usr/lib/libssl.so.2 OLD_LIBS+=usr/lib/pam_kerberosIV.so # 200208XX diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 02406a3c43e2..fea0af9edca0 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1146,10 +1146,10 @@ OLD_FILES+=usr/lib/libbe_p.a OLD_FILES+=usr/lib/libbe.so OLD_LIBS+=lib/libbe.so.1 OLD_FILES+=usr/lib/libzfs.a -OLD_LIBS+=usr/lib/libzfs.so +OLD_FILES+=usr/lib/libzfs.so OLD_FILES+=usr/lib/libzfs_core.a -OLD_LIBS+=usr/lib/libzfs_core.so -OLD_LIBS+=usr/lib/libzfs_core_p.a +OLD_FILES+=usr/lib/libzfs_core.so +OLD_FILES+=usr/lib/libzfs_core_p.a OLD_FILES+=usr/lib/libzfs_p.a OLD_FILES+=usr/lib/libzpool.a OLD_FILES+=usr/lib/libzpool.so @@ -7168,8 +7168,8 @@ OLD_FILES+=usr/share/man/man8/vendstat.8.gz .if ${MK_OPENMP} == no OLD_FILES+=usr/include/omp.h -OLD_LIBS+=usr/lib/libgomp.so -OLD_LIBS+=usr/lib32/libgomp.so +OLD_FILES+=usr/lib/libgomp.so +OLD_FILES+=usr/lib32/libgomp.so OLD_LIBS+=usr/lib/libomp.so OLD_LIBS+=usr/lib32/libomp.so .endif @@ -8438,27 +8438,27 @@ OLD_FILES+=usr/share/man/man8/telnetd.8.gz OLD_FILES+=usr/bin/atf-sh OLD_FILES+=usr/include/atf-c++/config.hpp OLD_FILES+=usr/include/atf-c/config.h -OLD_LIBS+=usr/lib/libatf-c++.a -OLD_LIBS+=usr/lib/libatf-c++.so +OLD_FILES+=usr/lib/libatf-c++.a +OLD_FILES+=usr/lib/libatf-c++.so OLD_LIBS+=usr/lib/libatf-c++.so.1 OLD_LIBS+=usr/lib/libatf-c++.so.2 -OLD_LIBS+=usr/lib/libatf-c++_p.a -OLD_LIBS+=usr/lib/libatf-c.a -OLD_LIBS+=usr/lib/libatf-c.so +OLD_FILES+=usr/lib/libatf-c++_p.a +OLD_FILES+=usr/lib/libatf-c.a +OLD_FILES+=usr/lib/libatf-c.so OLD_LIBS+=usr/lib/libatf-c.so.1 -OLD_LIBS+=usr/lib/libatf-c_p.a +OLD_FILES+=usr/lib/libatf-c_p.a OLD_LIBS+=usr/lib/libprivateatf-c.so.0 OLD_LIBS+=usr/lib/libprivateatf-c++.so.1 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" -OLD_LIBS+=usr/lib32/libatf-c++.a -OLD_LIBS+=usr/lib32/libatf-c++.so +OLD_FILES+=usr/lib32/libatf-c++.a +OLD_FILES+=usr/lib32/libatf-c++.so OLD_LIBS+=usr/lib32/libatf-c++.so.1 OLD_LIBS+=usr/lib32/libatf-c++.so.2 -OLD_LIBS+=usr/lib32/libatf-c++_p.a -OLD_LIBS+=usr/lib32/libatf-c.a -OLD_LIBS+=usr/lib32/libatf-c.so +OLD_FILES+=usr/lib32/libatf-c++_p.a +OLD_FILES+=usr/lib32/libatf-c.a +OLD_FILES+=usr/lib32/libatf-c.so OLD_LIBS+=usr/lib32/libatf-c.so.1 -OLD_LIBS+=usr/lib32/libatf-c_p.a +OLD_FILES+=usr/lib32/libatf-c_p.a OLD_LIBS+=usr/lib32/libprivateatf-c.so.0 OLD_LIBS+=usr/lib32/libprivateatf-c++.so.1 .endif From nobody Fri Dec 3 03:26:57 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BA1D718B373F; Fri, 3 Dec 2021 03:26:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4yt93DjBz4mBs; Fri, 3 Dec 2021 03:26:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A31C14E6; Fri, 3 Dec 2021 03:26: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 1B33QvBV063805; Fri, 3 Dec 2021 03:26:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B33QvQx063804; Fri, 3 Dec 2021 03:26:57 GMT (envelope-from git) Date: Fri, 3 Dec 2021 03:26:57 GMT Message-Id: <202112030326.1B33QvQx063804@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: c2d342c50906 - main - fusefs: better debugging for FUSE_RENAME in the 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: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2d342c509065bee6392624e95b75cf7b3bb9c45 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638502017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nKwJepLfKSm2lrsz2rhsXa6UiZpfbVd5O9nGbV0tAYU=; b=kVvPe7b6i6hEucbbG0KK/mT5jUHSuZQ8dxw674GF5RabjqzgEsadghj4JlW7GUuJS7Ut5n h9phX7OUyoRz5f//vk/d6bUmPBJitajx/l81x0G/mfbSonGpKICuPzZ+DnsMwW2NgSFQzw IxRA55Y2wcmNLOwcI3nSzaZfz2UxoifLsOohH20PnxktB82Ee9v6m4GRCF8MEDqjh+b4A9 YCh6Yt/5/5BqWXmt6iA3z+aOXKCXHj72q++2LKFguyCsdqRdt0Nr59MxfLSYX4Tcpl64Ln /MsaDVDpIJAPwjjnDLLIOIfwSrsXgmBUQDIESPzJM0wYNUKa/+cfjwC6SWn97g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638502017; a=rsa-sha256; cv=none; b=YbpEzikoCNMYv3x53oBdbQTDHqSlDuMdaf4tCP4yVCE4oodvM9xGh7+ulBlveuj6yicdBf G8Ea997D/rRn04qT07zpXLzbBLqz4n9VaD0dVM2bKBgadwY1Ib28ShKRWsBR56AHiJskIs 3xiaggLQjIETF3OmxruDfYWm+NKtwhuei2sikTMHKVH2xeLOJrtwJ1hW2I+pbRJFfVluoa iwewrKxTXPx0bMWblgiOyeSNjzQFf9S+ICe5JndK4NiWKt3UuldXrAkygWjoHJARnWtJmF XEjslIMS1g6H0T2sc9o/+hwEW7Qi+AymquIpCxHkv7pHIio2+5FZbrl7g+AwnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c2d342c509065bee6392624e95b75cf7b3bb9c45 commit c2d342c509065bee6392624e95b75cf7b3bb9c45 Author: Alan Somers AuthorDate: 2021-12-03 03:26:27 +0000 Commit: Alan Somers CommitDate: 2021-12-03 03:26:27 +0000 fusefs: better debugging for FUSE_RENAME in the tests MFC after: 2 weeks --- tests/sys/fs/fusefs/mockfs.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index 8a2d1f910867..a943d3d6972c 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -290,6 +290,15 @@ void MockFS::debug_request(const mockfs_buf_in &in, ssize_t buflen) in.body.release.flags, in.body.release.lock_owner); break; + case FUSE_RENAME: + { + const char *src = (const char*)in.body.bytes + + sizeof(fuse_rename_in); + const char *dst = src + strlen(src) + 1; + printf(" src=%s newdir=%" PRIu64 " dst=%s", + src, in.body.rename.newdir, dst); + } + break; case FUSE_SETATTR: if (verbosity <= 1) { printf(" valid=%#x", in.body.setattr.valid); From nobody Fri Dec 3 04:13:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3DECF18C631F; Fri, 3 Dec 2021 04:13: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 4J4zvN7265z3D9H; Fri, 3 Dec 2021 04:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2311213A; Fri, 3 Dec 2021 04:13: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 1B34D4mo029746; Fri, 3 Dec 2021 04:13:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B34D4Zt029745; Fri, 3 Dec 2021 04:13:04 GMT (envelope-from git) Date: Fri, 3 Dec 2021 04:13:04 GMT Message-Id: <202112030413.1B34D4Zt029745@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: 4b4cce02ac01 - main - xhci: add PCI IDs for USB controllers found on Supermicro M12SWA-TF List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4b4cce02ac01a943aa1816e7ea9ae6017539e7bb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638504785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1XOCYOmYqGMmUVvUUNxzXnZJ1ugCy8gJjNSJZGnsXtc=; b=T+JVP9w9fPvfoM8jI9tq0xDrZuic3N3ONft9ZCloxzsL3m9oSho11T4KI0OwB0rdKLUtmV Gm/URta2lJ/dk29UBHyRwaEkPRVfmvJsIWtWeik63BKIRTuk0PFDvQEnL4Am8qi6ADwCGI lQDKYuga1hhQesQOdhhm8yBZHl3/cu/jP2919RBUKgewuvjPhiYynwDuT+As6+2WTkfQGB Df2QSHCnXVQYwYNSrzavMmlXEbQ2xVyUJvIi6Afb7wjbmGJ1KlitQgrDtIIQPWEd126v6e 1cgRRIdmXdVbynEfhNsCxLsV+MtXcvJSC74K38ZKqhCXdLhYhQBbsdMMuyiXDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638504785; a=rsa-sha256; cv=none; b=JbQSQNhFFaCnAUHsArdTFCJ8EBxbJBJ7M77fxz2ablCoQxmTWf6w/ckoNOcXl7rlToFJqq PEaWMPbgA5/ZFnqqGDtVrwm+zyLlNaQkkb/1QTPit1bvYS8QMl1bNG34rgLorQ/WgirUcj cfhfb7LA2WmFYztUzBrhEOB4OqBnJsZSepTPPv2JB9hw588jEoMrGjkWRVXJAKcfNJet6V ZTu5HGEHLRH8nLa1mSzurQ13a5ba8L478yW6uCcrv8GbBU4w++Q4NT1BVqhQugOgnNnXYJ 7bOOxxD2EfuurX+9/YpzRvIuJ6Wz2ROOIO/7eNKlRUt5KJ6S3bK691ySqDgjCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=4b4cce02ac01a943aa1816e7ea9ae6017539e7bb commit 4b4cce02ac01a943aa1816e7ea9ae6017539e7bb Author: Gleb Smirnoff AuthorDate: 2021-12-03 04:12:33 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-03 04:12:33 +0000 xhci: add PCI IDs for USB controllers found on Supermicro M12SWA-TF --- sys/dev/usb/controller/xhci_pci.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c index f1c567ac6ded..6dbe29b7c791 100644 --- a/sys/dev/usb/controller/xhci_pci.c +++ b/sys/dev/usb/controller/xhci_pci.c @@ -95,6 +95,10 @@ xhci_pci_match(device_t self) switch (device_id) { case 0x145c1022: return ("AMD KERNCZ USB 3.0 controller"); + case 0x148c1022: + return ("AMD Starship USB 3.0 controller"); + case 0x149c1022: + return ("AMD Matisse USB 3.0 controller"); case 0x43ba1022: return ("AMD X399 USB 3.0 controller"); case 0x43b91022: /* X370 */ @@ -120,6 +124,8 @@ xhci_pci_match(device_t self) return ("ASMedia ASM1042 USB 3.0 controller"); case 0x11421b21: return ("ASMedia ASM1042A USB 3.0 controller"); + case 0x32421b21: + return ("ASMedia ASM3242 USB 3.2 controller"); case 0x0b278086: return ("Intel Goshen Ridge Thunderbolt 4 USB controller"); @@ -186,6 +192,9 @@ xhci_pci_match(device_t self) case 0xa01b177d: return ("Cavium ThunderX USB 3.0 controller"); + case 0x1ada10de: + return ("NVIDIA TU106 USB 3.1 controller"); + default: break; } From nobody Fri Dec 3 04:13:05 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B0A3818C6515; Fri, 3 Dec 2021 04:13: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 4J4zvQ1RZtz3D1s; Fri, 3 Dec 2021 04:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05D381ADD; Fri, 3 Dec 2021 04:13: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 1B34D5IJ029770; Fri, 3 Dec 2021 04:13:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B34D5ws029769; Fri, 3 Dec 2021 04:13:05 GMT (envelope-from git) Date: Fri, 3 Dec 2021 04:13:05 GMT Message-Id: <202112030413.1B34D5ws029769@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: bd1d0850452e - main - udp_multi_input(): the UDP header is only needed for probes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd1d0850452ecd0bfa6a2ae4cd9938d302a59758 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638504786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vOq5y0uamgSJMGwS4g8m8Xwtr6Vl5NVzdh08hxIg6u8=; b=BF4ocwnbojgEJ/lP6hvc03Qh3mPdoHjLbXtytvgQSbBWzU63QlsPZvaEJXY4hF1LGHi64U WgoJjbbycrjAdTqYZfIIwUhCiIuPDXafg2j7lGHVAv2+jxmpC71/9SncxxqJb/cEmr2A1w exHVu1gGACMOxThtmq2s+0kd91JYVeiMnizz5sQuIBuE8S1eLGKOgoAnY93jh4zfRi6fco Vt+JL5Fjqtc6yFnDpt7i90jB0DVRX5d9EaVTEBw//5aSusxbMhbpDi0D/6eR3UA4ziLLo2 3JSFzlCUoDehDCV8ffzgviQk1tsQXob1MCwe8mNqUHPrUK7ouXuWH9cswmudng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638504786; a=rsa-sha256; cv=none; b=uXBCDpuoGxu57oNxJneHkbCMX7ad9oiKNsE55p8kV00fkiCPMy5s8AjfdZHUFYrZGUbSd2 dApKg+77pqRKBrKFplpGHufPdACRp4wHs9Nm6vlRJ4j2SR0Wa7ZeMqzluqws40DW32hDk7 DUvzaNDEg5qVqMSVI7YG81cWMLRgmKUft6KTc5SulnNS3eebPg9VkXVaEE90GAh1jue79f lFMRqChCGbgOsPGNee95MOdzwIiAeZweenAHaYV8lRb55h006JQ8dMX0485mOmx3/Zd7Vj 48lPaZUTX0zHNOC51spuaB313Ls4bdWUiwcL1Fv7oAKxxY0f2TTO2RZGPDBgsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=bd1d0850452ecd0bfa6a2ae4cd9938d302a59758 commit bd1d0850452ecd0bfa6a2ae4cd9938d302a59758 Author: Gleb Smirnoff AuthorDate: 2021-12-03 04:12:40 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-03 04:12:40 +0000 udp_multi_input(): the UDP header is only needed for probes Reported by: kib Fixes: de2d47842e88 --- sys/netinet/udp_usrreq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index cd21b8640441..a6be949286b8 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -421,7 +421,9 @@ udp_multi_input(struct mbuf *m, int proto, struct sockaddr_in *udp_in) struct ip *ip = mtod(m, struct ip *); struct inpcb_iterator inpi = INP_ITERATOR(udp_get_inpcbinfo(proto), INPLOOKUP_RLOCKPCB, udp_multi_match, ip); +#ifdef KDTRACE_HOOKS struct udphdr *uh = (struct udphdr *)(ip + 1); +#endif struct inpcb *inp; struct mbuf *n; int appends = 0; From nobody Fri Dec 3 04:13:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E94BD18C6598; Fri, 3 Dec 2021 04:13: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 4J4zvR2vWzz3DDH; Fri, 3 Dec 2021 04:13:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E9EA1E64; Fri, 3 Dec 2021 04:13: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 1B34D6Y5029794; Fri, 3 Dec 2021 04:13:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B34D6DC029793; Fri, 3 Dec 2021 04:13:06 GMT (envelope-from git) Date: Fri, 3 Dec 2021 04:13:06 GMT Message-Id: <202112030413.1B34D6DC029793@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: 651a545143d2 - main - udp_detach(): fix set but not used 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 651a545143d2839f84a016f4e755a0b082ecfd50 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638504787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Weznx4hIiv3pEPq6UXWED9Jfp9KE4nNcPjJmPQut2dc=; b=FVh+hYI+qwHNogO/iU3bfu+bccEda57tvJoB0aDbxv/LiNuizMu0T72/1cxdYxRfCrH9O+ mR0PYX1k18gwO5GllrFhifotPXA87+nyK9Ebfo1uD4OueUMR1oho2kEgAS3ElYrIVgqh+E 3I1MXDFcMHbu2sihz2ldoCYf3Ip43EJWH8RNvsc/Xe/I73P19maTee5s0d3GFTG7V2oS5k M6D1zeN3eMMdU4cPcnjtM5vIRMOGIZthwKQYGAzCcitzjg92PAA2fJMfJPXF0Gl0ArKpxd xc5W8/d6kbugRL9kUQwf8CgQquamOssEgIVyeayxcUNmWa+LksvaRklGb/IFuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638504787; a=rsa-sha256; cv=none; b=MlWUjohsN9U79AerlonR8Q4WGiRzeEA91Xp3N/tnLUsNSbiPaYL3XUeHR9ArOhVV73O4o2 TxmnWtTAgvfI9Z1mXIjA97TLxHtMXjcoK8BWUDWaKwhqmKMi0War8lcs/d3VfQBrpQC+Tf W0lK6K2Zsk3LimIid1Mn2UYsga3Q0A5EQoJXbvSN1uzBVKsJRYvONQ4JDh6kyGT5t2oD+Y 90VMerZRttdh+ZynwlQ5R9bzmqaVHQ9LJGEsIMIQl6JmZV//z5drEHGyeB3X1cg+a63Uk3 5EjqlPIXvsEPVGqCHYor8sgFemi/pb+VkE55fAt7mXD+IzUSnRJUUHnOcPdj6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=651a545143d2839f84a016f4e755a0b082ecfd50 commit 651a545143d2839f84a016f4e755a0b082ecfd50 Author: Gleb Smirnoff AuthorDate: 2021-12-03 04:12:40 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-03 04:12:40 +0000 udp_detach(): fix set but not used warning --- sys/netinet/udp_usrreq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index a6be949286b8..237287fef1e6 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1695,10 +1695,8 @@ static void udp_detach(struct socket *so) { struct inpcb *inp; - struct inpcbinfo *pcbinfo; struct udpcb *up; - pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_detach: inp == NULL")); KASSERT(inp->inp_faddr.s_addr == INADDR_ANY, From nobody Fri Dec 3 05:10:07 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 78CF418B8572; Fri, 3 Dec 2021 05:10:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J519D1cb1z3kPL; Fri, 3 Dec 2021 05:10:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 187522CA0; Fri, 3 Dec 2021 05:10: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 1B35A8bF099610; Fri, 3 Dec 2021 05:10:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B35A7Fq099607; Fri, 3 Dec 2021 05:10:07 GMT (envelope-from git) Date: Fri, 3 Dec 2021 05:10:07 GMT Message-Id: <202112030510.1B35A7Fq099607@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: 12ae3476f35c - main - tcp_drain(): initialize the inpcb iterator when curvnet is set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 12ae3476f35c1f7c0e8cb55444728ed04c7130f9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638508208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7fT+idu9Yh9mztXFFsBsb7YHrcQWZ21aaAJJGQ4nu2M=; b=SaCRVDssqOpvvtCLqQ5a9CUEhJyqUXd05mJYj1L10OjA4oDBHOJeqzRex+ayT0ti+CkRNI YqZUYKR0KyCaUUpZL4VXYBpUfoIBcoQ7q3XZq/y8C0dM5XFI9JtyzwftIynfrx0FCX5IDu PVCzNsk2bpoh+dPrFhxF7BgYqAVQvhGCf8MRFeC27J9IR7SVW+PhGQ28816YbDCx3l36ge 56JErmYr6h4kdF6S+e1NwuMF5ArYUo7M7qz4Svfx3yoDCRZI2c8oQvjl2h1Z72xA/Zq6lH THcbhA43d8cTh9WM/Pn/agXf3o5yea69hZXhLadIQb7SIC9sMYDg3i2XWbqj0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638508208; a=rsa-sha256; cv=none; b=UcyjwVwHrxaxrDnGPdch8SZW5Kwg5mQdDrPQCgAENi7+TOPCiAoFmwaFkN0i1MfbSjrCj1 kbs9ZjP4+zhsF8KdkuEkkzI6BII09lvYhP0enmy9n97FP/zerPE8BLKLQ4UQDUQrbaYexn wmHjUEv5KD8QW3MwQM4C46MwvCwDYLt0DM9CtV6NdAB5n9nc8uZSRYE7BpFne+PlXaHO63 TiRTpOtTopCfVADDH2C07y46lhOvyj0n8sLBoXtQKayft0o5wRxkwQzPA13Paqhi7sROcF ccQfIlNx3akxHrGE/l1w60jhgMQIK8TSKsBNccOm9/k8KB0adI585v2BXUP9PA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=12ae3476f35c1f7c0e8cb55444728ed04c7130f9 commit 12ae3476f35c1f7c0e8cb55444728ed04c7130f9 Author: Gleb Smirnoff AuthorDate: 2021-12-03 05:08:30 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-03 05:08:30 +0000 tcp_drain(): initialize the inpcb iterator when curvnet is set Reported by: cy Pointy hat to: glebius Fixes: de2d47842e88 --- sys/netinet/tcp_subr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 5b5df6821e6a..86417aad5836 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2613,8 +2613,6 @@ tcp_close(struct tcpcb *tp) void tcp_drain(void) { - struct inpcb_iterator inpi = INP_ALL_ITERATOR(&V_tcbinfo, - INPLOOKUP_WLOCKPCB); VNET_ITERATOR_DECL(vnet_iter); if (!do_tcpdrain) @@ -2623,6 +2621,8 @@ tcp_drain(void) VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); + struct inpcb_iterator inpi = INP_ALL_ITERATOR(&V_tcbinfo, + INPLOOKUP_WLOCKPCB); struct inpcb *inpb; struct tcpcb *tcpb; From nobody Fri Dec 3 05:38:25 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 924D818C51AB for ; Fri, 3 Dec 2021 05:38: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 4J51ns1jknz3ryg; Fri, 3 Dec 2021 05:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B30C3124; Fri, 3 Dec 2021 05:38: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 1B35cPSb036450; Fri, 3 Dec 2021 05:38:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B35cPNV036449; Fri, 3 Dec 2021 05:38:25 GMT (envelope-from git) Date: Fri, 3 Dec 2021 05:38:25 GMT Message-Id: <202112030538.1B35cPNV036449@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: 5ac63687dbd2 - Create tag vendor/unbound/1.14.0rc1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/tags/vendor/unbound/1.14.0rc1 X-Git-Reftype: annotated tag X-Git-Commit: 5ac63687dbd2e1910add217f831e341c9afcd4b8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638509905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kigciw0EJb0Li4AtBAvK+Ikik1hCjTnjINtFu/j+amk=; b=FFAmxA3ntk3IQf23y1QJ9v+HBf+d4QanY1QH3VkmifnVx1gOc1sI+l3yPuXRpBgTi56/32 z6Rky4ac7aMfHZVse0NotpSGVmFN1qC8Jlk2rqAa7Q3C0gW8ypZC5dsfvrifsJrJkis2Cd AR0fhRVl10pyIom/5EsghAKhm4RhQGnTKaykRWwtuc/rqQAhpAnqiozrazlsMXYV7Exqi9 TV+IaL21BlpPUxEuwSzDhdpKzJA8v8uCvr+A9JZPK5gRRQo0fP1KzkpNk08c3N7BNz5wed 0BpjgqJBEYwhqAJO0hRxeFDVAjPkvFA4GPVw4wjdzO+2AMb5kHfFdVYH0a+7dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638509905; a=rsa-sha256; cv=none; b=uEDFlvED7T1No2aNwLOO2VEwoI7W+/0vPYzpzzMqkafLIE1mGkrmAqGcZfF0nrXh6ZdsKN cUo9ZimUELhFIi/mnknOrZRjwcq9FgWILL37SLXsqZnHrWulw1jYFaeAqenisOwSqz80iW i3bQBpHBGAzq3waackK4eEZDunLHjH9Yp7lWTSXi7k2lFUHLTyOsBVtnxG4BjTnR3UcjzI 6aDMjEOE4ZFLDpMKdaZ/YnMEZ69Xnllkc8rljMuyvSYCrHAm7oxDLxTOimraRtDZnQYPG3 hYtxwvIZIg1ncgq5/xTt6+b/x0UyiCnoHGVAJH4KDKIfiKpeSVOGIRPcEsRcTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/unbound/1.14.0rc1 has been created by cy: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/unbound/1.14.0rc1 tag vendor/unbound/1.14.0rc1 Tagger: Cy Schubert TaggerDate: 2021-12-03 05:37:20 +0000 unbound: Tag unbound 1.14.0rc1 This vendor import was requested by glebius@ as it should fix unbound crashes. Reported by: glebius commit 68965ba955db755e0cf7c57882a1e99da5c47644 Author: Cy Schubert AuthorDate: 2021-12-03 05:35:06 +0000 Commit: Cy Schubert CommitDate: 2021-12-03 05:35:06 +0000 unbound: Vendor import 1.14.0rc1 This vendor import was requested by glebius@ as it should fix unbound crashes. Reported by: glebius From nobody Fri Dec 3 05:38:24 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9A31218C51AC for ; Fri, 3 Dec 2021 05:38: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 4J51ns1t3Fz3rnb; Fri, 3 Dec 2021 05:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 182E7333D; Fri, 3 Dec 2021 05:38: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 1B35cOtB036426; Fri, 3 Dec 2021 05:38:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B35cOCC036425; Fri, 3 Dec 2021 05:38:24 GMT (envelope-from git) Date: Fri, 3 Dec 2021 05:38:24 GMT Message-Id: <202112030538.1B35cOCC036425@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: 625f1c1312fb..68965ba955db - vendor/unbound - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/vendor/unbound X-Git-Reftype: branch X-Git-Commit: 68965ba955db755e0cf7c57882a1e99da5c47644 X-Git-Oldrev: 625f1c1312fb7defbd148c8ba121a0cf058707ef X-Git-Newrev: 68965ba955db755e0cf7c57882a1e99da5c47644 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638509905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8X+jJ1llmaSLrkavNsXDVm/LJHRKfCB6kAMqJxxIVS4=; b=s8L3Lk9n9g/5xeDK6Pp0DD05r0FHL889XRdR0VgYiDiECH7t79PUsX2OyfUA0/kyFXXOAp MsLMhC83nalRh1JxxUwFXOHgwu4lp1Hm258TntFk3wrEThEqoU98a86K0I0OJuaywQwFM/ h4XGsvIF0FtzscX88Nxpj+kfj7f3HYVsG81G3Z/iJwzbhFY4XjCayeb4zjEMso477AQ5Xx p/1y9v8hF7SgmsFRyKAA+Ms2b60l2E4/OB9Go9asD9tyBmaOY1iAkJAZTe7f1/nYa9f8v/ GiizDnlxtMU6AdF8cKDc/kovbilHfL+WA91IMYtvtGSjrN1KNnxs8OmEMu4zkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638509905; a=rsa-sha256; cv=none; b=QCbp1acRoV0eQ1BDMZ1kMp2dx0k92X4Asrg0xmZMhneyqMSEX/H5XeVnR6fV4n3ROuvUWj KT9A22Ek39MyL+3B4XxpdOu0WUzKpyarESlFmJXbS0Fpn3KP841dTKZ+ytxU3y+FHe7l0T 1CNyN73hcsz20+ZJGhkq8uU+P9dFHKgLsNt5thMowP6oUrTpKWmaub2SSXrgRVHEPOAXP8 L0Z17btIhNZZncx+t/b6gWgxLAoHDybroIM6zQ60Z6SUX+S5/fQELP2/17iMzJsxvK3mJO 9rEGquQoYUqTkD3m/0zaJgSQH8I/ZknseI/OWOuYpQV2QcVPhMf7z38HfMOBqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch vendor/unbound has been updated by cy: URL: https://cgit.FreeBSD.org/src/log/?id=625f1c1312fb..68965ba955db 68965ba955db unbound: Vendor import 1.14.0rc1 From nobody Fri Dec 3 06:41:13 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 33EBA18C174B; Fri, 3 Dec 2021 06:41: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 4J53BK58VNz4dD1; Fri, 3 Dec 2021 06:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90B6D410D; Fri, 3 Dec 2021 06:41: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 1B36fDt4027629; Fri, 3 Dec 2021 06:41:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B36fD2h027280; Fri, 3 Dec 2021 06:41:13 GMT (envelope-from git) Date: Fri, 3 Dec 2021 06:41:13 GMT Message-Id: <202112030641.1B36fD2h027280@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 24e365220007 - main - unbount: Vendor import 1.14.0rc1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24e365220007c415f495cf8dcb228ece6002b8b7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638513673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/RPJ0ljjD9UASVV+f8xy0pTEKbcLZ6b34HUak5LRbHg=; b=qJAumro7CcdsUnwjd4AVDPGsqMefvliMtEdeONkpbZBDAPBEfIlF6huP95YHEDKa4xec9X g1iPk4Xz2rGCVidwBHe4IFmIL2wAQcG7hnXrcR1Lw2YoxR9fgCiUcCWXBrWVkbP0hzWee+ M5ZuhvCj+MzI3HUyZKBynlTWwAoLf3Pr13QG3VOv9J05SNRludw3qiLNebJ+Z2XQoZxwXK txKPXYHXrPwYRWd/dELGcrhqHBNfSbSCEFdHLJTwmbeYyn03phHvA90nwttng8/tTFd86J Z8fghm5egexgWsKecAUCkKcxldx0KnwVCy0/TxDBxGcGI1VYTrXmG4Vod26GhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638513673; a=rsa-sha256; cv=none; b=L7YZqLBjMopQXxeUKQ5ylFqjali5PI/p90BJbA3tkC3AgZSfTobLoAUUKpjkfC0/fuzMyr FGAS5z09MPzIdpqDDXOpDIUDJXpuVkp5Mqs4A477BUQ0BqOh+/oR6TcB2v53aIPEoAb1F6 Iv8BYcWtg8Prg9IxKMLMQbT3Id6lGMzHlOaRCKChEy89BZbGTnJDMQkjdJIP41I3SHA6Hm F8FRNwSk0Oc5PhBW+EtHtk3WdGvn9bDU4dCh69lx4fracCiKPQk0sxYDS4fOxk7gBcIYzF O/OzTp7Ehs+OEQQEaHzITIFng3FQ7Dvk4ZhJm6DWkuZRDsUS6AISLCBapB4l8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=24e365220007c415f495cf8dcb228ece6002b8b7 commit 24e365220007c415f495cf8dcb228ece6002b8b7 Merge: 12ae3476f35c 68965ba955db Author: Cy Schubert AuthorDate: 2021-12-03 06:11:04 +0000 Commit: Cy Schubert CommitDate: 2021-12-03 06:11:04 +0000 unbount: Vendor import 1.14.0rc1 This vendor import was requested by glebius@ as it should fix unbound crashes. Reported by: glebius MFC after: 1 week contrib/unbound/.gitattributes | 1 - contrib/unbound/.github/FUNDING.yml | 2 - .../unbound/.github/ISSUE_TEMPLATE/bug_report.md | 41 - .../.github/ISSUE_TEMPLATE/feature_request.md | 31 - .../unbound/.github/workflows/analysis_ports.yml | 346 ---- contrib/unbound/.github/workflows/ci.yml | 21 - contrib/unbound/.travis.yml | 380 ---- contrib/unbound/Makefile.in | 5 +- contrib/unbound/README-Travis.md | 2 +- contrib/unbound/acx_nlnetlabs.m4 | 66 +- contrib/unbound/cachedb/cachedb.c | 2 +- contrib/unbound/config.h.in | 6 + contrib/unbound/config.sub | 21 +- contrib/unbound/configure | 130 +- contrib/unbound/configure.ac | 43 +- contrib/unbound/contrib/Dockerfile.tests | 11 + contrib/unbound/contrib/drop2rpz | 2 +- contrib/unbound/contrib/unbound.service.in | 3 +- contrib/unbound/daemon/daemon.c | 3 +- contrib/unbound/daemon/remote.c | 2 +- contrib/unbound/daemon/stats.c | 2 +- contrib/unbound/daemon/unbound.c | 1 + contrib/unbound/daemon/worker.c | 82 +- contrib/unbound/dns64/dns64.c | 13 +- contrib/unbound/dnscrypt/dnscrypt.c | 4 +- contrib/unbound/dnscrypt/dnscrypt.h | 4 +- contrib/unbound/dnstap/dtstream.c | 6 +- contrib/unbound/dnstap/unbound-dnstap-socket.c | 12 +- contrib/unbound/doc/Changelog | 164 ++ contrib/unbound/doc/README | 2 +- contrib/unbound/doc/README.tests | 8 + contrib/unbound/doc/example.conf.in | 17 +- 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 | 6 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 95 +- contrib/unbound/doc/unbound.doxygen | 6 +- contrib/unbound/edns-subnet/edns-subnet.h | 2 +- contrib/unbound/edns-subnet/subnetmod.c | 2 +- contrib/unbound/ipsecmod/ipsecmod.c | 2 +- contrib/unbound/ipsecmod/ipsecmod.h | 2 +- contrib/unbound/iterator/iter_delegpt.c | 1 + contrib/unbound/iterator/iter_delegpt.h | 2 + contrib/unbound/iterator/iter_fwd.c | 2 + contrib/unbound/iterator/iter_hints.c | 4 +- contrib/unbound/iterator/iter_utils.c | 152 +- contrib/unbound/iterator/iter_utils.h | 7 +- contrib/unbound/iterator/iterator.c | 76 +- contrib/unbound/iterator/iterator.h | 5 +- contrib/unbound/libunbound/context.c | 2 + contrib/unbound/libunbound/context.h | 29 - contrib/unbound/libunbound/libunbound.c | 4 + contrib/unbound/libunbound/libworker.c | 10 +- contrib/unbound/libunbound/unbound-event.h | 2 +- contrib/unbound/libunbound/unbound.h | 32 +- contrib/unbound/libunbound/worker.h | 10 +- contrib/unbound/respip/respip.c | 75 +- contrib/unbound/respip/respip.h | 3 + contrib/unbound/services/authzone.c | 215 ++- contrib/unbound/services/authzone.h | 5 + contrib/unbound/services/cache/rrset.h | 4 +- contrib/unbound/services/listen_dnsport.c | 71 +- contrib/unbound/services/listen_dnsport.h | 5 + contrib/unbound/services/localzone.c | 35 +- contrib/unbound/services/localzone.h | 6 +- contrib/unbound/services/mesh.c | 95 +- contrib/unbound/services/outbound_list.h | 2 +- contrib/unbound/services/outside_network.c | 11 +- contrib/unbound/services/rpz.c | 1915 ++++++++++++++++---- contrib/unbound/services/rpz.h | 54 +- contrib/unbound/sldns/parseutil.h | 2 +- contrib/unbound/sldns/str2wire.c | 4 +- contrib/unbound/sldns/wire2str.h | 2 +- contrib/unbound/smallapp/unbound-anchor.c | 8 +- contrib/unbound/smallapp/unbound-checkconf.c | 62 +- contrib/unbound/smallapp/unbound-control.c | 2 +- contrib/unbound/smallapp/worker_cb.c | 4 +- .../testdata/auth_zonemd_xfr_chain_keyinxfr.rpl | 315 ++++ contrib/unbound/testdata/fwd_error_retries.rpl | 27 + .../fwd_udp_with_tcp_upstream.conf | 20 + .../fwd_udp_with_tcp_upstream.dsc | 16 + .../fwd_udp_with_tcp_upstream.post | 10 + .../fwd_udp_with_tcp_upstream.pre | 31 + .../fwd_udp_with_tcp_upstream.test | 35 + .../fwd_udp_with_tcp_upstream.testns | 25 + .../http_user_agent.tdir/http_user_agent.test | 10 +- contrib/unbound/testdata/rpz_clientip.rpl | 264 +++ contrib/unbound/testdata/rpz_nsdname.rpl | 390 ++++ contrib/unbound/testdata/rpz_nsip.rpl | 408 +++++ contrib/unbound/testdata/rpz_qname_tcponly.rpl | 117 ++ contrib/unbound/testdata/rpz_respip_tcponly.rpl | 207 +++ .../stub_udp_with_tcp_upstream.conf | 19 + .../stub_udp_with_tcp_upstream.dsc | 16 + .../stub_udp_with_tcp_upstream.post | 10 + .../stub_udp_with_tcp_upstream.pre | 35 + .../stub_udp_with_tcp_upstream.test | 37 + .../stub_udp_with_tcp_upstream.testns | 48 + contrib/unbound/testdata/svcb.tdir/svcb.test | 2 +- contrib/unbound/util/config_file.c | 3 + contrib/unbound/util/config_file.h | 6 +- contrib/unbound/util/configlexer.lex | 3 + contrib/unbound/util/configparser.y | 481 ++--- contrib/unbound/util/data/msgencode.c | 20 +- contrib/unbound/util/data/msgparse.c | 150 +- contrib/unbound/util/data/msgparse.h | 23 +- contrib/unbound/util/data/msgreply.c | 67 +- contrib/unbound/util/data/msgreply.h | 27 +- contrib/unbound/util/data/packed_rrset.h | 8 + contrib/unbound/util/edns.c | 50 - contrib/unbound/util/edns.h | 12 - contrib/unbound/util/fptr_wlist.c | 2 +- contrib/unbound/util/fptr_wlist.h | 2 +- contrib/unbound/util/iana_ports.inc | 1 + contrib/unbound/util/mini_event.c | 9 + contrib/unbound/util/module.h | 5 +- contrib/unbound/util/net_help.c | 25 +- contrib/unbound/util/netevent.c | 63 +- contrib/unbound/util/netevent.h | 2 +- contrib/unbound/util/regional.c | 2 + contrib/unbound/util/shm_side/shm_main.c | 2 +- contrib/unbound/util/tube.c | 6 +- contrib/unbound/util/ub_event.c | 2 +- contrib/unbound/validator/autotrust.c | 4 +- contrib/unbound/validator/validator.c | 4 +- contrib/unbound/validator/validator.h | 2 +- 128 files changed, 5445 insertions(+), 2058 deletions(-) diff --cc contrib/unbound/contrib/Dockerfile.tests index 000000000000,417daccb21f9..417daccb21f9 mode 000000,100644..100644 --- a/contrib/unbound/contrib/Dockerfile.tests +++ b/contrib/unbound/contrib/Dockerfile.tests diff --cc contrib/unbound/testdata/auth_zonemd_xfr_chain_keyinxfr.rpl index 000000000000,2feec88c075a..2feec88c075a mode 000000,100644..100644 --- a/contrib/unbound/testdata/auth_zonemd_xfr_chain_keyinxfr.rpl +++ b/contrib/unbound/testdata/auth_zonemd_xfr_chain_keyinxfr.rpl diff --cc contrib/unbound/testdata/fwd_error_retries.rpl index 000000000000,b63086c0f46a..b63086c0f46a mode 000000,100644..100644 --- a/contrib/unbound/testdata/fwd_error_retries.rpl +++ b/contrib/unbound/testdata/fwd_error_retries.rpl diff --cc contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.conf index 000000000000,6daf2eeecc36..6daf2eeecc36 mode 000000,100644..100644 --- a/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.conf +++ b/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.conf diff --cc contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.dsc index 000000000000,5b1f0d3d1ab4..5b1f0d3d1ab4 mode 000000,100644..100644 --- a/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.dsc +++ b/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.dsc diff --cc contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.post index 000000000000,0013eca71a4d..0013eca71a4d mode 000000,100644..100644 --- a/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.post +++ b/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.post diff --cc contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.pre index 000000000000,546787a5fc9f..546787a5fc9f mode 000000,100644..100644 --- a/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.pre +++ b/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.pre diff --cc contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.test index 000000000000,fad6497beb15..fad6497beb15 mode 000000,100644..100644 --- a/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.test +++ b/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.test diff --cc contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.testns index 000000000000,04089af0e1b6..04089af0e1b6 mode 000000,100644..100644 --- a/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.testns +++ b/contrib/unbound/testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.testns diff --cc contrib/unbound/testdata/rpz_clientip.rpl index 000000000000,78e05ad91994..78e05ad91994 mode 000000,100644..100644 --- a/contrib/unbound/testdata/rpz_clientip.rpl +++ b/contrib/unbound/testdata/rpz_clientip.rpl diff --cc contrib/unbound/testdata/rpz_nsdname.rpl index 000000000000,08ff3c2e2f5b..08ff3c2e2f5b mode 000000,100644..100644 --- a/contrib/unbound/testdata/rpz_nsdname.rpl +++ b/contrib/unbound/testdata/rpz_nsdname.rpl diff --cc contrib/unbound/testdata/rpz_nsip.rpl index 000000000000,ac132cae0996..ac132cae0996 mode 000000,100644..100644 --- a/contrib/unbound/testdata/rpz_nsip.rpl +++ b/contrib/unbound/testdata/rpz_nsip.rpl diff --cc contrib/unbound/testdata/rpz_qname_tcponly.rpl index 000000000000,d30b88616227..d30b88616227 mode 000000,100644..100644 --- a/contrib/unbound/testdata/rpz_qname_tcponly.rpl +++ b/contrib/unbound/testdata/rpz_qname_tcponly.rpl diff --cc contrib/unbound/testdata/rpz_respip_tcponly.rpl index 000000000000,c495de2038a1..c495de2038a1 mode 000000,100644..100644 --- a/contrib/unbound/testdata/rpz_respip_tcponly.rpl +++ b/contrib/unbound/testdata/rpz_respip_tcponly.rpl diff --cc contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.conf index 000000000000,d57c787b154c..d57c787b154c mode 000000,100644..100644 --- a/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.conf +++ b/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.conf diff --cc contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.dsc index 000000000000,526ff67f98f9..526ff67f98f9 mode 000000,100644..100644 --- a/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.dsc +++ b/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.dsc diff --cc contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.post index 000000000000,c804b6c46d64..c804b6c46d64 mode 000000,100644..100644 --- a/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.post +++ b/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.post diff --cc contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.pre index 000000000000,2bca63b9d56b..2bca63b9d56b mode 000000,100644..100644 --- a/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.pre +++ b/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.pre diff --cc contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.test index 000000000000,43591ac16c0f..43591ac16c0f mode 000000,100644..100644 --- a/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.test +++ b/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.test diff --cc contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.testns index 000000000000,f2155414e045..f2155414e045 mode 000000,100644..100644 --- a/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.testns +++ b/contrib/unbound/testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.testns diff --cc contrib/unbound/util/config_file.c index 083654ebad4c,000000000000..413d7e3221dd mode 100644,000000..100644 --- a/contrib/unbound/util/config_file.c +++ b/contrib/unbound/util/config_file.c @@@ -1,2685 -1,0 +1,2688 @@@ +/* + * util/config_file.c - reads and stores the config file for unbound. + * + * Copyright (c) 2007, NLnet Labs. All rights reserved. + * + * This software is open source. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the NLNET LABS nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * \file + * + * This file contains functions for the config file. + */ + +#include "config.h" +#include +#include +#ifdef HAVE_TIME_H +#include +#endif +#include "util/log.h" +#include "util/configyyrename.h" +#include "util/config_file.h" +#include "configparser.h" +#include "util/net_help.h" +#include "util/data/msgparse.h" +#include "util/module.h" +#include "util/regional.h" +#include "util/fptr_wlist.h" +#include "util/data/dname.h" +#include "util/rtt.h" +#include "services/cache/infra.h" +#include "sldns/wire2str.h" +#include "sldns/parseutil.h" +#include "iterator/iterator.h" +#ifdef HAVE_GLOB_H +# include +#endif +#ifdef CLIENT_SUBNET +#include "edns-subnet/edns-subnet.h" +#endif +#ifdef HAVE_PWD_H +#include +#endif + +/** from cfg username, after daemonize setup performed */ +uid_t cfg_uid = (uid_t)-1; +/** from cfg username, after daemonize setup performed */ +gid_t cfg_gid = (gid_t)-1; +/** for debug allow small timeout values for fast rollovers */ +int autr_permit_small_holddown = 0; +/** size (in bytes) of stream wait buffers max */ +size_t stream_wait_max = 4 * 1024 * 1024; +size_t http2_query_buffer_max = 4 * 1024 * 1024; +size_t http2_response_buffer_max = 4 * 1024 * 1024; + +/** global config during parsing */ +struct config_parser_state* cfg_parser = 0; + +/** init ports possible for use */ +static void init_outgoing_availports(int* array, int num); + +struct config_file* +config_create(void) +{ + struct config_file* cfg; + cfg = (struct config_file*)calloc(1, sizeof(struct config_file)); + if(!cfg) + return NULL; + /* the defaults if no config is present */ + cfg->verbosity = 1; + cfg->stat_interval = 0; + cfg->stat_cumulative = 0; + cfg->stat_extended = 0; + cfg->num_threads = 1; + cfg->port = UNBOUND_DNS_PORT; + cfg->do_ip4 = 1; + cfg->do_ip6 = 1; + cfg->do_udp = 1; + cfg->do_tcp = 1; + cfg->tcp_reuse_timeout = 60 * 1000; /* 60s in milisecs */ + cfg->max_reuse_tcp_queries = 200; + cfg->tcp_upstream = 0; + cfg->udp_upstream_without_downstream = 0; + cfg->tcp_mss = 0; + cfg->outgoing_tcp_mss = 0; + cfg->tcp_idle_timeout = 30 * 1000; /* 30s in millisecs */ + cfg->tcp_auth_query_timeout = 3 * 1000; /* 3s in millisecs */ + cfg->do_tcp_keepalive = 0; + cfg->tcp_keepalive_timeout = 120 * 1000; /* 120s in millisecs */ + cfg->ssl_service_key = NULL; + cfg->ssl_service_pem = NULL; + cfg->ssl_port = UNBOUND_DNS_OVER_TLS_PORT; + cfg->ssl_upstream = 0; + cfg->tls_cert_bundle = NULL; + cfg->tls_win_cert = 0; + cfg->tls_use_sni = 1; + cfg->https_port = UNBOUND_DNS_OVER_HTTPS_PORT; + if(!(cfg->http_endpoint = strdup("/dns-query"))) goto error_exit; + cfg->http_max_streams = 100; + cfg->http_query_buffer_size = 4*1024*1024; + cfg->http_response_buffer_size = 4*1024*1024; + cfg->http_nodelay = 1; + cfg->use_syslog = 1; + cfg->log_identity = NULL; /* changed later with argv[0] */ + cfg->log_time_ascii = 0; + cfg->log_queries = 0; + cfg->log_replies = 0; + cfg->log_tag_queryreply = 0; + cfg->log_local_actions = 0; + cfg->log_servfail = 0; +#ifndef USE_WINSOCK +# ifdef USE_MINI_EVENT + /* select max 1024 sockets */ + cfg->outgoing_num_ports = 960; + cfg->num_queries_per_thread = 512; +# else + /* libevent can use many sockets */ + cfg->outgoing_num_ports = 4096; + cfg->num_queries_per_thread = 1024; +# endif + cfg->outgoing_num_tcp = 10; + cfg->incoming_num_tcp = 10; +#else + cfg->outgoing_num_ports = 48; /* windows is limited in num fds */ + cfg->num_queries_per_thread = 24; + cfg->outgoing_num_tcp = 2; /* leaves 64-52=12 for: 4if,1stop,thread4 */ + cfg->incoming_num_tcp = 2; +#endif + cfg->stream_wait_size = 4 * 1024 * 1024; + cfg->edns_buffer_size = 1232; /* from DNS flagday recommendation */ + cfg->msg_buffer_size = 65552; /* 64 k + a small margin */ + cfg->msg_cache_size = 4 * 1024 * 1024; + cfg->msg_cache_slabs = 4; + cfg->jostle_time = 200; + cfg->rrset_cache_size = 4 * 1024 * 1024; + cfg->rrset_cache_slabs = 4; + cfg->host_ttl = 900; + cfg->bogus_ttl = 60; + cfg->min_ttl = 0; + cfg->max_ttl = 3600 * 24; + cfg->max_negative_ttl = 3600; + cfg->prefetch = 0; + cfg->prefetch_key = 0; + cfg->deny_any = 0; + cfg->infra_cache_slabs = 4; + cfg->infra_cache_numhosts = 10000; + cfg->infra_cache_min_rtt = 50; + cfg->infra_keep_probing = 0; + cfg->delay_close = 0; + cfg->udp_connect = 1; + if(!(cfg->outgoing_avail_ports = (int*)calloc(65536, sizeof(int)))) + goto error_exit; + init_outgoing_availports(cfg->outgoing_avail_ports, 65536); + if(!(cfg->username = strdup(UB_USERNAME))) goto error_exit; +#ifdef HAVE_CHROOT + if(!(cfg->chrootdir = strdup(CHROOT_DIR))) goto error_exit; +#endif + if(!(cfg->directory = strdup(RUN_DIR))) goto error_exit; + if(!(cfg->logfile = strdup(""))) goto error_exit; + if(!(cfg->pidfile = strdup(PIDFILE))) goto error_exit; + if(!(cfg->target_fetch_policy = strdup("3 2 1 0 0"))) goto error_exit; + cfg->fast_server_permil = 0; + cfg->fast_server_num = 3; + cfg->donotqueryaddrs = NULL; + cfg->donotquery_localhost = 1; + cfg->root_hints = NULL; + cfg->use_systemd = 0; + cfg->do_daemonize = 1; + cfg->if_automatic = 0; + cfg->so_rcvbuf = 0; + cfg->so_sndbuf = 0; + cfg->so_reuseport = REUSEPORT_DEFAULT; + cfg->ip_transparent = 0; + cfg->ip_freebind = 0; + cfg->ip_dscp = 0; + cfg->num_ifs = 0; + cfg->ifs = NULL; + cfg->num_out_ifs = 0; + cfg->out_ifs = NULL; + cfg->stubs = NULL; + cfg->forwards = NULL; + cfg->auths = NULL; +#ifdef CLIENT_SUBNET + cfg->client_subnet = NULL; + cfg->client_subnet_zone = NULL; + cfg->client_subnet_opcode = LDNS_EDNS_CLIENT_SUBNET; + cfg->client_subnet_always_forward = 0; + cfg->max_client_subnet_ipv4 = 24; + cfg->max_client_subnet_ipv6 = 56; + cfg->min_client_subnet_ipv4 = 0; + cfg->min_client_subnet_ipv6 = 0; + cfg->max_ecs_tree_size_ipv4 = 100; + cfg->max_ecs_tree_size_ipv6 = 100; +#endif + cfg->views = NULL; + cfg->acls = NULL; + cfg->tcp_connection_limits = NULL; + cfg->harden_short_bufsize = 1; + cfg->harden_large_queries = 0; + cfg->harden_glue = 1; + cfg->harden_dnssec_stripped = 1; + cfg->harden_below_nxdomain = 1; + cfg->harden_referral_path = 0; + cfg->harden_algo_downgrade = 0; + cfg->use_caps_bits_for_id = 0; + cfg->caps_whitelist = NULL; + cfg->private_address = NULL; + cfg->private_domain = NULL; + cfg->unwanted_threshold = 0; + cfg->hide_identity = 0; + cfg->hide_version = 0; + cfg->hide_trustanchor = 0; + cfg->hide_http_user_agent = 0; + cfg->identity = NULL; + cfg->version = NULL; + cfg->http_user_agent = NULL; + cfg->nsid_cfg_str = NULL; + cfg->nsid = NULL; + cfg->nsid_len = 0; + cfg->auto_trust_anchor_file_list = NULL; + cfg->trust_anchor_file_list = NULL; + cfg->trust_anchor_list = NULL; + cfg->trusted_keys_file_list = NULL; + cfg->trust_anchor_signaling = 1; + cfg->root_key_sentinel = 1; + cfg->domain_insecure = NULL; + cfg->val_date_override = 0; + cfg->val_sig_skew_min = 3600; /* at least daylight savings trouble */ + cfg->val_sig_skew_max = 86400; /* at most timezone settings trouble */ + cfg->val_max_restart = 5; + cfg->val_clean_additional = 1; + cfg->val_log_level = 0; + cfg->val_log_squelch = 0; + cfg->val_permissive_mode = 0; + cfg->aggressive_nsec = 0; + cfg->ignore_cd = 0; + cfg->serve_expired = 0; + cfg->serve_expired_ttl = 0; + cfg->serve_expired_ttl_reset = 0; + cfg->serve_expired_reply_ttl = 30; + cfg->serve_expired_client_timeout = 0; + cfg->serve_original_ttl = 0; + cfg->zonemd_permissive_mode = 0; + cfg->add_holddown = 30*24*3600; + cfg->del_holddown = 30*24*3600; + cfg->keep_missing = 366*24*3600; /* one year plus a little leeway */ + cfg->permit_small_holddown = 0; + cfg->key_cache_size = 4 * 1024 * 1024; + cfg->key_cache_slabs = 4; + cfg->neg_cache_size = 1 * 1024 * 1024; + cfg->local_zones = NULL; + cfg->local_zones_nodefault = NULL; +#ifdef USE_IPSET + cfg->local_zones_ipset = NULL; +#endif + cfg->local_zones_disable_default = 0; + cfg->local_data = NULL; + cfg->local_zone_overrides = NULL; + cfg->unblock_lan_zones = 0; + cfg->insecure_lan_zones = 0; + cfg->python_script = NULL; + cfg->dynlib_file = NULL; + cfg->remote_control_enable = 0; + cfg->control_ifs.first = NULL; + cfg->control_ifs.last = NULL; + cfg->control_port = UNBOUND_CONTROL_PORT; + cfg->control_use_cert = 1; + cfg->minimal_responses = 1; + cfg->rrset_roundrobin = 1; + cfg->unknown_server_time_limit = 376; + cfg->max_udp_size = 4096; + if(!(cfg->server_key_file = strdup(RUN_DIR"/unbound_server.key"))) + goto error_exit; + if(!(cfg->server_cert_file = strdup(RUN_DIR"/unbound_server.pem"))) + goto error_exit; + if(!(cfg->control_key_file = strdup(RUN_DIR"/unbound_control.key"))) + goto error_exit; + if(!(cfg->control_cert_file = strdup(RUN_DIR"/unbound_control.pem"))) + goto error_exit; + +#ifdef CLIENT_SUBNET + if(!(cfg->module_conf = strdup("subnetcache validator iterator"))) goto error_exit; +#else + if(!(cfg->module_conf = strdup("validator iterator"))) goto error_exit; +#endif + if(!(cfg->val_nsec3_key_iterations = + strdup("1024 150 2048 150 4096 150"))) goto error_exit; +#if defined(DNSTAP_SOCKET_PATH) + if(!(cfg->dnstap_socket_path = strdup(DNSTAP_SOCKET_PATH))) + goto error_exit; +#endif + cfg->dnstap_bidirectional = 1; + cfg->dnstap_tls = 1; + cfg->disable_dnssec_lame_check = 0; + cfg->ip_ratelimit = 0; + cfg->ratelimit = 0; + cfg->ip_ratelimit_slabs = 4; + cfg->ratelimit_slabs = 4; + cfg->ip_ratelimit_size = 4*1024*1024; + cfg->ratelimit_size = 4*1024*1024; + cfg->ratelimit_for_domain = NULL; + cfg->ratelimit_below_domain = NULL; ++ cfg->outbound_msg_retry = 5; + cfg->ip_ratelimit_factor = 10; + cfg->ratelimit_factor = 10; + cfg->qname_minimisation = 1; + cfg->qname_minimisation_strict = 0; + cfg->shm_enable = 0; + cfg->shm_key = 11777; + cfg->edns_client_strings = NULL; + cfg->edns_client_string_opcode = 65001; + cfg->dnscrypt = 0; + cfg->dnscrypt_port = 0; + cfg->dnscrypt_provider = NULL; + cfg->dnscrypt_provider_cert = NULL; + cfg->dnscrypt_provider_cert_rotated = NULL; + cfg->dnscrypt_secret_key = NULL; + cfg->dnscrypt_shared_secret_cache_size = 4*1024*1024; + cfg->dnscrypt_shared_secret_cache_slabs = 4; + cfg->dnscrypt_nonce_cache_size = 4*1024*1024; + cfg->dnscrypt_nonce_cache_slabs = 4; + cfg->pad_responses = 1; + cfg->pad_responses_block_size = 468; /* from RFC8467 */ + cfg->pad_queries = 1; + cfg->pad_queries_block_size = 128; /* from RFC8467 */ +#ifdef USE_IPSECMOD + cfg->ipsecmod_enabled = 1; + cfg->ipsecmod_ignore_bogus = 0; + cfg->ipsecmod_hook = NULL; + cfg->ipsecmod_max_ttl = 3600; + cfg->ipsecmod_whitelist = NULL; + cfg->ipsecmod_strict = 0; +#endif +#ifdef USE_CACHEDB + if(!(cfg->cachedb_backend = strdup("testframe"))) goto error_exit; + if(!(cfg->cachedb_secret = strdup("default"))) goto error_exit; +#ifdef USE_REDIS + if(!(cfg->redis_server_host = strdup("127.0.0.1"))) goto error_exit; + cfg->redis_timeout = 100; + cfg->redis_server_port = 6379; + cfg->redis_expire_records = 0; +#endif /* USE_REDIS */ +#endif /* USE_CACHEDB */ +#ifdef USE_IPSET + cfg->ipset_name_v4 = NULL; + cfg->ipset_name_v6 = NULL; +#endif + return cfg; +error_exit: + config_delete(cfg); + return NULL; +} + +struct config_file* config_create_forlib(void) +{ + struct config_file* cfg = config_create(); + if(!cfg) return NULL; + /* modifications for library use, less verbose, less memory */ + free(cfg->chrootdir); + cfg->chrootdir = NULL; + cfg->verbosity = 0; + cfg->outgoing_num_ports = 16; /* in library use, this is 'reasonable' + and probably within the ulimit(maxfds) of the user */ + cfg->outgoing_num_tcp = 2; + cfg->msg_cache_size = 1024*1024; + cfg->msg_cache_slabs = 1; + cfg->rrset_cache_size = 1024*1024; + cfg->rrset_cache_slabs = 1; + cfg->infra_cache_slabs = 1; + cfg->use_syslog = 0; + cfg->key_cache_size = 1024*1024; + cfg->key_cache_slabs = 1; + cfg->neg_cache_size = 100 * 1024; + cfg->donotquery_localhost = 0; /* allow, so that you can ask a + forward nameserver running on localhost */ + cfg->val_log_level = 2; /* to fill why_bogus with */ + cfg->val_log_squelch = 1; + cfg->minimal_responses = 0; + cfg->harden_short_bufsize = 1; + return cfg; +} + +/** check that the value passed is >= 0 */ +#define IS_NUMBER_OR_ZERO \ + if(atoi(val) == 0 && strcmp(val, "0") != 0) return 0 +/** check that the value passed is > 0 */ +#define IS_NONZERO_NUMBER \ + if(atoi(val) == 0) return 0 +/** check that the value passed is not 0 and a power of 2 */ +#define IS_POW2_NUMBER \ + if(atoi(val) == 0 || !is_pow2((size_t)atoi(val))) return 0 +/** check that the value passed is yes or no */ +#define IS_YES_OR_NO \ + if(strcmp(val, "yes") != 0 && strcmp(val, "no") != 0) return 0 +/** put integer_or_zero into variable */ +#define S_NUMBER_OR_ZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NUMBER_OR_ZERO; cfg->var = atoi(val); } +/** put integer_nonzero into variable */ +#define S_NUMBER_NONZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NONZERO_NUMBER; cfg->var = atoi(val); } +/** put integer_or_zero into unsigned */ +#define S_UNSIGNED_OR_ZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NUMBER_OR_ZERO; cfg->var = (unsigned)atoi(val); } +/** put integer_or_zero into size_t */ +#define S_SIZET_OR_ZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NUMBER_OR_ZERO; cfg->var = (size_t)atoi(val); } +/** put integer_nonzero into size_t */ +#define S_SIZET_NONZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NONZERO_NUMBER; cfg->var = (size_t)atoi(val); } +/** put yesno into variable */ +#define S_YNO(str, var) if(strcmp(opt, str) == 0) \ + { IS_YES_OR_NO; cfg->var = (strcmp(val, "yes") == 0); } +/** put memsize into variable */ +#define S_MEMSIZE(str, var) if(strcmp(opt, str)==0) \ + { return cfg_parse_memsize(val, &cfg->var); } +/** put pow2 number into variable */ +#define S_POW2(str, var) if(strcmp(opt, str)==0) \ + { IS_POW2_NUMBER; cfg->var = (size_t)atoi(val); } +/** put string into variable */ +#define S_STR(str, var) if(strcmp(opt, str)==0) \ + { free(cfg->var); return (cfg->var = strdup(val)) != NULL; } +/** put string into strlist */ +#define S_STRLIST(str, var) if(strcmp(opt, str)==0) \ + { return cfg_strlist_insert(&cfg->var, strdup(val)); } +/** put string into strlist if not present yet*/ +#define S_STRLIST_UNIQ(str, var) if(strcmp(opt, str)==0) \ + { if(cfg_strlist_find(cfg->var, val)) { return 0;} \ + return cfg_strlist_insert(&cfg->var, strdup(val)); } +/** append string to strlist */ +#define S_STRLIST_APPEND(str, var) if(strcmp(opt, str)==0) \ + { return cfg_strlist_append(&cfg->var, strdup(val)); } + +int config_set_option(struct config_file* cfg, const char* opt, + const char* val) +{ + char buf[64]; + if(!opt) return 0; + if(opt[strlen(opt)-1] != ':' && strlen(opt)+2stat_interval = 0; + else if(atoi(val) == 0) + return 0; + else cfg->stat_interval = atoi(val); + } else if(strcmp(opt, "num_threads:") == 0) { + /* not supported, library must have 1 thread in bgworker */ + return 0; + } else if(strcmp(opt, "outgoing-port-permit:") == 0) { + return cfg_mark_ports(val, 1, + cfg->outgoing_avail_ports, 65536); + } else if(strcmp(opt, "outgoing-port-avoid:") == 0) { + return cfg_mark_ports(val, 0, + cfg->outgoing_avail_ports, 65536); + } else if(strcmp(opt, "local-zone:") == 0) { + return cfg_parse_local_zone(cfg, val); + } else if(strcmp(opt, "val-override-date:") == 0) { + if(strcmp(val, "") == 0 || strcmp(val, "0") == 0) { + cfg->val_date_override = 0; + } else if(strlen(val) == 14) { + cfg->val_date_override = cfg_convert_timeval(val); + return cfg->val_date_override != 0; + } else { + if(atoi(val) == 0) return 0; + cfg->val_date_override = (uint32_t)atoi(val); + } + } else if(strcmp(opt, "local-data-ptr:") == 0) { + char* ptr = cfg_ptr_reverse((char*)opt); + return cfg_strlist_insert(&cfg->local_data, ptr); + } else if(strcmp(opt, "logfile:") == 0) { + cfg->use_syslog = 0; + free(cfg->logfile); + return (cfg->logfile = strdup(val)) != NULL; + } + else if(strcmp(opt, "log-time-ascii:") == 0) + { IS_YES_OR_NO; cfg->log_time_ascii = (strcmp(val, "yes") == 0); + log_set_time_asc(cfg->log_time_ascii); } + else S_SIZET_NONZERO("max-udp-size:", max_udp_size) + else S_YNO("use-syslog:", use_syslog) + else S_STR("log-identity:", log_identity) + else S_YNO("extended-statistics:", stat_extended) + else S_YNO("statistics-cumulative:", stat_cumulative) + else S_YNO("shm-enable:", shm_enable) + else S_NUMBER_OR_ZERO("shm-key:", shm_key) + else S_YNO("do-ip4:", do_ip4) + else S_YNO("do-ip6:", do_ip6) + else S_YNO("do-udp:", do_udp) + else S_YNO("do-tcp:", do_tcp) + else S_YNO("prefer-ip4:", prefer_ip4) + else S_YNO("prefer-ip6:", prefer_ip6) + else S_YNO("tcp-upstream:", tcp_upstream) + else S_YNO("udp-upstream-without-downstream:", + udp_upstream_without_downstream) + else S_NUMBER_NONZERO("tcp-mss:", tcp_mss) + else S_NUMBER_NONZERO("outgoing-tcp-mss:", outgoing_tcp_mss) + else S_NUMBER_NONZERO("tcp-auth-query-timeout:", tcp_auth_query_timeout) + else S_NUMBER_NONZERO("tcp-idle-timeout:", tcp_idle_timeout) + else S_NUMBER_NONZERO("max-reuse-tcp-queries:", max_reuse_tcp_queries) + else S_NUMBER_NONZERO("tcp-reuse-timeout:", tcp_reuse_timeout) + else S_YNO("edns-tcp-keepalive:", do_tcp_keepalive) + else S_NUMBER_NONZERO("edns-tcp-keepalive-timeout:", tcp_keepalive_timeout) + else S_YNO("ssl-upstream:", ssl_upstream) + else S_STR("ssl-service-key:", ssl_service_key) + else S_STR("ssl-service-pem:", ssl_service_pem) + else S_NUMBER_NONZERO("ssl-port:", ssl_port) + else S_STR("tls-cert-bundle:", tls_cert_bundle) + else S_YNO("tls-win-cert:", tls_win_cert) + else S_STRLIST("additional-tls-port:", tls_additional_port) + else S_STRLIST("tls-additional-ports:", tls_additional_port) + else S_STRLIST("tls-additional-port:", tls_additional_port) + else S_STRLIST_APPEND("tls-session-ticket-keys:", tls_session_ticket_keys) + else S_STR("tls-ciphers:", tls_ciphers) + else S_STR("tls-ciphersuites:", tls_ciphersuites) + else S_YNO("tls-use-sni:", tls_use_sni) + else S_NUMBER_NONZERO("https-port:", https_port) + else S_STR("http-endpoint:", http_endpoint) + else S_NUMBER_NONZERO("http-max-streams:", http_max_streams) + else S_MEMSIZE("http-query-buffer-size:", http_query_buffer_size) + else S_MEMSIZE("http-response-buffer-size:", http_response_buffer_size) + else S_YNO("http-nodelay:", http_nodelay) + else S_YNO("http-notls-downstream:", http_notls_downstream) + else S_YNO("interface-automatic:", if_automatic) + else S_YNO("use-systemd:", use_systemd) + else S_YNO("do-daemonize:", do_daemonize) + else S_NUMBER_NONZERO("port:", port) + else S_NUMBER_NONZERO("outgoing-range:", outgoing_num_ports) + else S_SIZET_OR_ZERO("outgoing-num-tcp:", outgoing_num_tcp) + else S_SIZET_OR_ZERO("incoming-num-tcp:", incoming_num_tcp) + else S_MEMSIZE("stream-wait-size:", stream_wait_size) + else S_SIZET_NONZERO("edns-buffer-size:", edns_buffer_size) + else S_SIZET_NONZERO("msg-buffer-size:", msg_buffer_size) + else S_MEMSIZE("msg-cache-size:", msg_cache_size) + else S_POW2("msg-cache-slabs:", msg_cache_slabs) + else S_SIZET_NONZERO("num-queries-per-thread:",num_queries_per_thread) + else S_SIZET_OR_ZERO("jostle-timeout:", jostle_time) + else S_MEMSIZE("so-rcvbuf:", so_rcvbuf) + else S_MEMSIZE("so-sndbuf:", so_sndbuf) + else S_YNO("so-reuseport:", so_reuseport) + else S_YNO("ip-transparent:", ip_transparent) + else S_YNO("ip-freebind:", ip_freebind) + else S_NUMBER_OR_ZERO("ip-dscp:", ip_dscp) + else S_MEMSIZE("rrset-cache-size:", rrset_cache_size) + else S_POW2("rrset-cache-slabs:", rrset_cache_slabs) + else S_YNO("prefetch:", prefetch) + else S_YNO("prefetch-key:", prefetch_key) + else S_YNO("deny-any:", deny_any) + else if(strcmp(opt, "cache-max-ttl:") == 0) + { IS_NUMBER_OR_ZERO; cfg->max_ttl = atoi(val); MAX_TTL=(time_t)cfg->max_ttl;} + else if(strcmp(opt, "cache-max-negative-ttl:") == 0) + { IS_NUMBER_OR_ZERO; cfg->max_negative_ttl = atoi(val); MAX_NEG_TTL=(time_t)cfg->max_negative_ttl;} + else if(strcmp(opt, "cache-min-ttl:") == 0) + { IS_NUMBER_OR_ZERO; cfg->min_ttl = atoi(val); MIN_TTL=(time_t)cfg->min_ttl;} + else if(strcmp(opt, "infra-cache-min-rtt:") == 0) { + IS_NUMBER_OR_ZERO; cfg->infra_cache_min_rtt = atoi(val); + RTT_MIN_TIMEOUT=cfg->infra_cache_min_rtt; + } + else S_YNO("infra-keep-probing:", infra_keep_probing) + else S_NUMBER_OR_ZERO("infra-host-ttl:", host_ttl) + else S_POW2("infra-cache-slabs:", infra_cache_slabs) + else S_SIZET_NONZERO("infra-cache-numhosts:", infra_cache_numhosts) + else S_NUMBER_OR_ZERO("delay-close:", delay_close) + else S_YNO("udp-connect:", udp_connect) + else S_STR("chroot:", chrootdir) + else S_STR("username:", username) + else S_STR("directory:", directory) + else S_STR("pidfile:", pidfile) + else S_YNO("hide-identity:", hide_identity) + else S_YNO("hide-version:", hide_version) + else S_YNO("hide-trustanchor:", hide_trustanchor) + else S_YNO("hide-http-user-agent:", hide_http_user_agent) + else S_STR("identity:", identity) + else S_STR("version:", version) + else S_STR("http-user-agent:", http_user_agent) + else if(strcmp(opt, "nsid:") == 0) { + free(cfg->nsid_cfg_str); + if (!(cfg->nsid_cfg_str = strdup(val))) + return 0; + /* Empty string is just validly unsetting nsid */ + if (*val == 0) { + free(cfg->nsid); + cfg->nsid = NULL; + cfg->nsid_len = 0; + return 1; + } + cfg->nsid = cfg_parse_nsid(val, &cfg->nsid_len); + return cfg->nsid != NULL; + } + else S_STRLIST("root-hints:", root_hints) + else S_STR("target-fetch-policy:", target_fetch_policy) + else S_YNO("harden-glue:", harden_glue) + else S_YNO("harden-short-bufsize:", harden_short_bufsize) + else S_YNO("harden-large-queries:", harden_large_queries) + else S_YNO("harden-dnssec-stripped:", harden_dnssec_stripped) + else S_YNO("harden-below-nxdomain:", harden_below_nxdomain) + else S_YNO("harden-referral-path:", harden_referral_path) + else S_YNO("harden-algo-downgrade:", harden_algo_downgrade) + else S_YNO("use-caps-for-id:", use_caps_bits_for_id) + else S_STRLIST("caps-whitelist:", caps_whitelist) + else S_SIZET_OR_ZERO("unwanted-reply-threshold:", unwanted_threshold) + else S_STRLIST("private-address:", private_address) + else S_STRLIST("private-domain:", private_domain) + else S_YNO("do-not-query-localhost:", donotquery_localhost) + else S_STRLIST("do-not-query-address:", donotqueryaddrs) + else S_STRLIST("auto-trust-anchor-file:", auto_trust_anchor_file_list) + else S_STRLIST("trust-anchor-file:", trust_anchor_file_list) + else S_STRLIST("trust-anchor:", trust_anchor_list) + else S_STRLIST("trusted-keys-file:", trusted_keys_file_list) + else S_YNO("trust-anchor-signaling:", trust_anchor_signaling) + else S_YNO("root-key-sentinel:", root_key_sentinel) + else S_STRLIST("domain-insecure:", domain_insecure) + else S_NUMBER_OR_ZERO("val-bogus-ttl:", bogus_ttl) + else S_YNO("val-clean-additional:", val_clean_additional) + else S_NUMBER_OR_ZERO("val-log-level:", val_log_level) + else S_YNO("val-log-squelch:", val_log_squelch) + else S_YNO("log-queries:", log_queries) + else S_YNO("log-replies:", log_replies) + else S_YNO("log-tag-queryreply:", log_tag_queryreply) + else S_YNO("log-local-actions:", log_local_actions) + else S_YNO("log-servfail:", log_servfail) + else S_YNO("val-permissive-mode:", val_permissive_mode) + else S_YNO("aggressive-nsec:", aggressive_nsec) + else S_YNO("ignore-cd-flag:", ignore_cd) + else if(strcmp(opt, "serve-expired:") == 0) + { IS_YES_OR_NO; cfg->serve_expired = (strcmp(val, "yes") == 0); + SERVE_EXPIRED = cfg->serve_expired; } + else if(strcmp(opt, "serve-expired-ttl:") == 0) + { IS_NUMBER_OR_ZERO; cfg->serve_expired_ttl = atoi(val); SERVE_EXPIRED_TTL=(time_t)cfg->serve_expired_ttl;} + else S_YNO("serve-expired-ttl-reset:", serve_expired_ttl_reset) + else if(strcmp(opt, "serve-expired-reply-ttl:") == 0) + { IS_NUMBER_OR_ZERO; cfg->serve_expired_reply_ttl = atoi(val); SERVE_EXPIRED_REPLY_TTL=(time_t)cfg->serve_expired_reply_ttl;} + else S_NUMBER_OR_ZERO("serve-expired-client-timeout:", serve_expired_client_timeout) + else S_YNO("serve-original-ttl:", serve_original_ttl) + else S_STR("val-nsec3-keysize-iterations:", val_nsec3_key_iterations) + else S_YNO("zonemd-permissive-mode:", zonemd_permissive_mode) + else S_UNSIGNED_OR_ZERO("add-holddown:", add_holddown) + else S_UNSIGNED_OR_ZERO("del-holddown:", del_holddown) + else S_UNSIGNED_OR_ZERO("keep-missing:", keep_missing) + else if(strcmp(opt, "permit-small-holddown:") == 0) + { IS_YES_OR_NO; cfg->permit_small_holddown = (strcmp(val, "yes") == 0); + autr_permit_small_holddown = cfg->permit_small_holddown; } + else S_MEMSIZE("key-cache-size:", key_cache_size) + else S_POW2("key-cache-slabs:", key_cache_slabs) + else S_MEMSIZE("neg-cache-size:", neg_cache_size) + else S_YNO("minimal-responses:", minimal_responses) + else S_YNO("rrset-roundrobin:", rrset_roundrobin) + else S_NUMBER_OR_ZERO("unknown-server-time-limit:", unknown_server_time_limit) + else S_STRLIST("local-data:", local_data) + else S_YNO("unblock-lan-zones:", unblock_lan_zones) + else S_YNO("insecure-lan-zones:", insecure_lan_zones) + else S_YNO("control-enable:", remote_control_enable) + else S_STRLIST_APPEND("control-interface:", control_ifs) + else S_NUMBER_NONZERO("control-port:", control_port) + else S_STR("server-key-file:", server_key_file) + else S_STR("server-cert-file:", server_cert_file) + else S_STR("control-key-file:", control_key_file) + else S_STR("control-cert-file:", control_cert_file) + else S_STR("module-config:", module_conf) + else S_STRLIST("python-script:", python_script) + else S_STRLIST("dynlib-file:", dynlib_file) + else S_YNO("disable-dnssec-lame-check:", disable_dnssec_lame_check) +#ifdef CLIENT_SUBNET + /* Can't set max subnet prefix here, since that value is used when + * generating the address tree. */ + /* No client-subnet-always-forward here, module registration depends on + * this option. */ +#endif +#ifdef USE_DNSTAP + else S_YNO("dnstap-enable:", dnstap) + else S_YNO("dnstap-bidirectional:", dnstap_bidirectional) + else S_STR("dnstap-socket-path:", dnstap_socket_path) + else S_STR("dnstap-ip:", dnstap_ip) + else S_YNO("dnstap-tls:", dnstap_tls) + else S_STR("dnstap-tls-server-name:", dnstap_tls_server_name) + else S_STR("dnstap-tls-cert-bundle:", dnstap_tls_cert_bundle) + else S_STR("dnstap-tls-client-key-file:", dnstap_tls_client_key_file) + else S_STR("dnstap-tls-client-cert-file:", + dnstap_tls_client_cert_file) + else S_YNO("dnstap-send-identity:", dnstap_send_identity) + else S_YNO("dnstap-send-version:", dnstap_send_version) + else S_STR("dnstap-identity:", dnstap_identity) + else S_STR("dnstap-version:", dnstap_version) + else S_YNO("dnstap-log-resolver-query-messages:", + dnstap_log_resolver_query_messages) + else S_YNO("dnstap-log-resolver-response-messages:", + dnstap_log_resolver_response_messages) + else S_YNO("dnstap-log-client-query-messages:", + dnstap_log_client_query_messages) + else S_YNO("dnstap-log-client-response-messages:", + dnstap_log_client_response_messages) + else S_YNO("dnstap-log-forwarder-query-messages:", + dnstap_log_forwarder_query_messages) + else S_YNO("dnstap-log-forwarder-response-messages:", + dnstap_log_forwarder_response_messages) +#endif +#ifdef USE_DNSCRYPT + else S_YNO("dnscrypt-enable:", dnscrypt) + else S_NUMBER_NONZERO("dnscrypt-port:", dnscrypt_port) + else S_STR("dnscrypt-provider:", dnscrypt_provider) + else S_STRLIST_UNIQ("dnscrypt-provider-cert:", dnscrypt_provider_cert) + else S_STRLIST("dnscrypt-provider-cert-rotated:", dnscrypt_provider_cert_rotated) + else S_STRLIST_UNIQ("dnscrypt-secret-key:", dnscrypt_secret_key) *** 1956 LINES SKIPPED *** From nobody Fri Dec 3 07:26:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 71FCA18AD6F2; Fri, 3 Dec 2021 07:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J54BX1Qt5z4r91; Fri, 3 Dec 2021 07:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 111864C10; Fri, 3 Dec 2021 07:26: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 1B37QRQA082399; Fri, 3 Dec 2021 07:26:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B37QRJZ082398; Fri, 3 Dec 2021 07:26:27 GMT (envelope-from git) Date: Fri, 3 Dec 2021 07:26:27 GMT Message-Id: <202112030726.1B37QRJZ082398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: bab53d35329c - stable/13 - twsi: sort headers, remove unneeded List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bab53d35329c587c953600de6d1dd03d24bdcea7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638516388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pr3RlACRmytVDiRBh/xIB68aRaicxhe2sZs8T5tgVmU=; b=mIMjWV5MbfYczQn3SE+6EwH64UVWiYmrjkEI2qyUDmlbvLU5P7ojFMgs9uEGyBZod+ur5M bL7RhdVeIgHYUIJpuvKLRYlmVLLI1OGSAeK9lbWaahMFjcQz7otFbzwsfhLnzfpuvvn2w4 b7qwHuPgC9LCM/zPcLIZQbWqdymHfHmOSw8zCr8ENYQ0ZSD/vt4T7Z8If40hJDLwe4kvzX OUnujr3wJqrSriwab1RB8aWPI3E12tqKW/YD802nKfuVVMO8qVARS6yALPudjAH3PWqtK5 s4x2dFBg9DpUlAltl/dGJZcNyHoV1QU8StsKskHVZRw3NIqhSC2jghvrydbORQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638516388; a=rsa-sha256; cv=none; b=kU5jStlnrkQ5EeuGbhUOvf4JOUu89/DTPs16NNb6KljL/Vif7xxOCaSbSwngKo2PVDc9UJ ObdnZxjxU6wH7w0lGo/QfESpvJbF44KOU8W94aSocIqkwkpq397CuHmQts653PZlKkubAv COZ+AXTKIUR0vdgfA6day9IVYaGzkQDNEUHlUfgWxKsnQoDpWWCSgNoMXyTVxW/kiN0wK+ F/uwt+E876kTNI9pHIkF8SCGt0pUD/EBFYWvMzv514Lg32EF8Xsht6ivnNNhUkz0EtGeah WJwpP9++QwFEwvefEp5mkwqIgMkZ2nJl76EMFrTdwBJ/4plbzpj8G8V+WAe33Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=bab53d35329c587c953600de6d1dd03d24bdcea7 commit bab53d35329c587c953600de6d1dd03d24bdcea7 Author: Andriy Gapon AuthorDate: 2021-11-26 06:28:41 +0000 Commit: Andriy Gapon CommitDate: 2021-12-03 07:21:36 +0000 twsi: sort headers, remove unneeded (cherry picked from commit 26559dd1770bb49c68f58a5fbcea3b4c96534c94) --- sys/dev/iicbus/twsi/twsi.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index a606c2aefd36..aa5de857c1d9 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -44,22 +44,18 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include +#include #include #include #include -#include - -#include -#include - #include #include -#include -#include #include From nobody Fri Dec 3 07:26:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AC7DA18AD6F5; Fri, 3 Dec 2021 07:26: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 4J54BY27Rkz4qlY; Fri, 3 Dec 2021 07:26:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A3CB4B35; Fri, 3 Dec 2021 07:26: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 1B37QTSo082423; Fri, 3 Dec 2021 07:26:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B37QT7E082422; Fri, 3 Dec 2021 07:26:29 GMT (envelope-from git) Date: Fri, 3 Dec 2021 07:26:29 GMT Message-Id: <202112030726.1B37QT7E082422@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 3b7478a7c4df - stable/13 - twsi: add more of status definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3b7478a7c4df6111c921a8e88e89a3dc9dae18f9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638516389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FnY3OwPI7GKXPxpX/cxS4DJHEJDQ3A3Dg8wJdF3PVbo=; b=fPQHSqO6nTY2j3C/8wz3y2vggE29V6avoRZBEL89PRwBSN8cjekOxIqivKFyqAjyhjIR9B GDfpDADbocxzNC4CYdzyRB6XtGeFrl0iAED4UsRxJBV2/H4aJTU8XwsZpJ2nuq7gWCoIlO YNMJExSywRLv/RoqUxNWRkBfL3uClr/l5OYUvbu+mlxsU/oxf3gl3a9lZmehyhhFzHFsTz sOtW48ezgrgZq+CGfLIQNlDSvi1wL9nWi76TX+F/PJFX8VGrKCQdQlS8KwuP8JXHo74e5B nq1vFV4W/V1TD56CGoks1UZIRbvOc4PbZppqlt+RAk1fPXPw7jIBM3XlWFmf+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638516389; a=rsa-sha256; cv=none; b=DTN75Ta11B5DQmkhMBYl+o06bHAJnalxfupWeZVBGTWCM0zK+lP75XHs9D4wF9KyDKMeAB wceV36T+F1MByzef3uqR5LAfHpY8Cdnw4nuF4h4+i0b5z8Mc+UuOHF8/3/bnEVzlUSGUHd f5HW6kwS33zh5VX8EQKTQT5bb/ormPoNDyvHRNp8JMsF60QU+BuTtpE0tROzh85P3bC7aJ x1UbSRkzYGtwLZgnT9rk67WwRTLFr2uudhsgYaMi7wKC1FFeKZzy0VIlHWTFo6f1LCdF3F BhR4T+6ZHHcj1MTcXv98G6YqqCtnUwJhaprztWmMTZFiy48jUBberOZK7keR6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=3b7478a7c4df6111c921a8e88e89a3dc9dae18f9 commit 3b7478a7c4df6111c921a8e88e89a3dc9dae18f9 Author: Andriy Gapon AuthorDate: 2021-11-26 06:30:22 +0000 Commit: Andriy Gapon CommitDate: 2021-12-03 07:23:58 +0000 twsi: add more of status definitions For completeness and for future use. (cherry picked from commit de86f339cdda0a10130033ff1771fb13cfacd9d0) --- sys/dev/iicbus/twsi/twsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index aa5de857c1d9..84bf0223fba7 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -68,16 +68,19 @@ __FBSDID("$FreeBSD$"); #define TWSI_CONTROL_TWSIEN (1 << 6) #define TWSI_CONTROL_INTEN (1 << 7) +#define TWSI_STATUS_BUS_ERROR 0x00 #define TWSI_STATUS_START 0x08 #define TWSI_STATUS_RPTD_START 0x10 #define TWSI_STATUS_ADDR_W_ACK 0x18 #define TWSI_STATUS_ADDR_W_NACK 0x20 #define TWSI_STATUS_DATA_WR_ACK 0x28 #define TWSI_STATUS_DATA_WR_NACK 0x30 +#define TWSI_STATUS_ARBITRATION_LOST 0x38 #define TWSI_STATUS_ADDR_R_ACK 0x40 #define TWSI_STATUS_ADDR_R_NACK 0x48 #define TWSI_STATUS_DATA_RD_ACK 0x50 #define TWSI_STATUS_DATA_RD_NOACK 0x58 +#define TWSI_STATUS_IDLE 0xf8 #define TWSI_DEBUG #undef TWSI_DEBUG From nobody Fri Dec 3 07:26:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2604818AD8BA; Fri, 3 Dec 2021 07:26: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 4J54BZ4dQXz4r57; Fri, 3 Dec 2021 07:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CB1E4BF3; Fri, 3 Dec 2021 07:26: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 1B37QU2o082447; Fri, 3 Dec 2021 07:26:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B37QU45082446; Fri, 3 Dec 2021 07:26:30 GMT (envelope-from git) Date: Fri, 3 Dec 2021 07:26:30 GMT Message-Id: <202112030726.1B37QU45082446@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: c141cad41d94 - stable/13 - twsi: remove write-only softc 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: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c141cad41d949b344c177fc838f0828442b61a14 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638516390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FPwzOtgZQmRWrujL5VxHmu21VPXu+kRLEX7E7tZ46h8=; b=yDVDEaeZj3bDSC8tTnuAwDBmBx5E/rAQNnO1abZlwb92EtAYPZ6U7Y/iJLJCZtkAJZGi6v iVRU68CFf2bTpLYvsHGF6GR9u7PGX/97LYi24284jxutONMgzAra9AG1SVeqbfOh4Nhxif 01DafyxkiYyZdMyip/+BJsHal/oFuNIICSL/CmQGn8hNQ7MZ0j7ooJsQ43yt84UmAla0tC lE3PVdvx+t36eC5chGmzhnbNt1kkytTAqFiEwjaR9SMkKWYSrdhaJUoiksrfyC+4FSrfpX rcpIio01QvASV+c7QOFyRNTI250shCDRqh0GCtPugtJBWSel1RP5LAHbdHaNkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638516390; a=rsa-sha256; cv=none; b=yAX32cIm2u5be7HzITMzFk0hnlCsjW4YErZfPoXY4eFV12BZCG2Owg3EvjrKaB64XLlyff fJEXsi9X4zHo5Kgpo//ZRE6Jna5cxymOLGlGg1P03+5W/BLgo58bdHf673KoMD7nn9YLnI zwsH3VigPSfZTFIzJRnYbMG8Q1ptesDHLiUlMMfxJavu7vjWAorGampdnUa+lSCce7MGX+ bRov4f+H8aMCsCSmQYkHmbmcESEKSoup4g31VC6r6g2Cc34Vg6hjb0/1C/pUniwc9Emdno bBkpENiI/sGcQJ4f7GAtfZzUHXHN7RwCBAoMopUgGfDXdNntPCzYRIrBkMnhtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=c141cad41d949b344c177fc838f0828442b61a14 commit c141cad41d949b344c177fc838f0828442b61a14 Author: Andriy Gapon AuthorDate: 2021-11-26 06:45:12 +0000 Commit: Andriy Gapon CommitDate: 2021-12-03 07:24:11 +0000 twsi: remove write-only softc field (cherry picked from commit f00bc54f62c455c7ed44afee736c3c64873a305a) --- sys/dev/iicbus/twsi/a10_twsi.c | 2 -- sys/dev/iicbus/twsi/twsi.h | 1 - 2 files changed, 3 deletions(-) diff --git a/sys/dev/iicbus/twsi/a10_twsi.c b/sys/dev/iicbus/twsi/a10_twsi.c index 17f551f27234..7554db0fbc94 100644 --- a/sys/dev/iicbus/twsi/a10_twsi.c +++ b/sys/dev/iicbus/twsi/a10_twsi.c @@ -121,8 +121,6 @@ a10_twsi_attach(device_t dev) sc->reg_baud_rate = TWI_CCR; sc->reg_soft_reset = TWI_SRST; - sc->need_ack = true; - if (ofw_bus_is_compatible(dev, "allwinner,sun6i-a31-i2c") || ofw_bus_is_compatible(dev, "allwinner,sun6i-a83t-i2c")) sc->iflag_w1c = true; diff --git a/sys/dev/iicbus/twsi/twsi.h b/sys/dev/iicbus/twsi/twsi.h index 631486fb3f0c..b10ce45be6f4 100644 --- a/sys/dev/iicbus/twsi/twsi.h +++ b/sys/dev/iicbus/twsi/twsi.h @@ -65,7 +65,6 @@ struct twsi_softc { int transfer; int error; uint32_t control_val; - bool need_ack; bool iflag_w1c; bus_size_t reg_data; From nobody Fri Dec 3 07:26:31 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BD02D18AD8C8; Fri, 3 Dec 2021 07:26: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 4J54Bb6HpPz4r3n; Fri, 3 Dec 2021 07:26:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71D9E4C11; Fri, 3 Dec 2021 07:26: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 1B37QVJ0082471; Fri, 3 Dec 2021 07:26:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B37QVDZ082470; Fri, 3 Dec 2021 07:26:31 GMT (envelope-from git) Date: Fri, 3 Dec 2021 07:26:31 GMT Message-Id: <202112030726.1B37QVDZ082470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: a138038f6934 - stable/13 - twsi: compile in support for debug messages, disabled 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: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a138038f69342b30d45d9da056438e7e4e3a1d56 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638516392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oJv8r6xN38Tsl6R0NQ+beX2YNjdBsiA9mbkYVLgbEMo=; b=YGB4+GpUnbnNZZVWWiP5Nm6DNtAsI4esk+sXGtSdM2ckpEck3m9BGhKBigQyoPYDrJ7jSi NM+vf58cIdBey1HV10Eq1/2YlAfwl7Z2NCiJRMoOA6Q/vBebQpiJD1rYRaF7gmjd9CPVR1 jG284LvP5pryUkDf0yFil5uj1fod0hGC4KFhHt8SVHVwNbfjNsHgfqkhcSxDOihRacpy6R BIU+zJVGyug2g4nt9ngh1kcXAHBLyF2O+anshvOv1RODuoZEkot8BNkNpxEA9sTl6zwB+6 GuSzgmTkTHI6AAp5HHZ8ORtrYDXjDGeFUSxspsdV6hNH5ljVJ43KYwoze+kcew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638516392; a=rsa-sha256; cv=none; b=Gv46RurFMq6bUn21a9D4kxd2z4iAOlLlnOIty3Z2XREAvt7Rfqow0wYU5fJOJn4XwJyMV4 8iuahvmnxy6CmUuRpiHZqXxqxHa/sxGzn2ZJa1OMaEa9K0ZsSnuktZ4O9dyn5ZZgDNYZgL Rk92yEaGY4m59tvNIxhfVicNLV4BCoHgAfZuWJudqZbpIPvM9kH1anfwCUOOVjoLfXwf7k K874Fhywury24gtzRsfFJ1MADl5u+mmUekr2AZ+YJUS+4dVro2w4dURL+Y9ebSM+wNOrIA 59Y2n8LfUjKDpymkJLzdFnqZCNJ50X7VLEAvi3AxYlPvhRGe9wCwHeHsOhPxFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=a138038f69342b30d45d9da056438e7e4e3a1d56 commit a138038f69342b30d45d9da056438e7e4e3a1d56 Author: Andriy Gapon AuthorDate: 2021-11-26 06:52:56 +0000 Commit: Andriy Gapon CommitDate: 2021-12-03 07:24:22 +0000 twsi: compile in support for debug messages, disabled by default Debug messages can now be enabled per driver instance via a new sysctl. Also, debug messages in TWSI_READ and TWSI_WRITE require debug level greater than 1 as they are mostly redundant because callers of those functions already log most interesting results. NB: the twsi drivers call their device iichb, so the new sysctl will appear under dev.iichb.N. (cherry picked from commit a2793d6182256b8edf647c11c642ad3c7c83809e) --- sys/dev/iicbus/twsi/twsi.c | 136 ++++++++++++++++++++++++--------------------- sys/dev/iicbus/twsi/twsi.h | 1 + 2 files changed, 75 insertions(+), 62 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 84bf0223fba7..49fe608473b2 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -85,11 +86,8 @@ __FBSDID("$FreeBSD$"); #define TWSI_DEBUG #undef TWSI_DEBUG -#ifdef TWSI_DEBUG -#define debugf(dev, fmt, args...) device_printf(dev, "%s: " fmt, __func__, ##args) -#else -#define debugf(dev, fmt, args...) -#endif +#define debugf(sc, fmt, args...) if ((sc)->debug) \ + device_printf((sc)->dev, "%s: " fmt, __func__, ##args) static struct resource_spec res_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, @@ -103,7 +101,8 @@ TWSI_READ(struct twsi_softc *sc, bus_size_t off) uint32_t val; val = bus_read_4(sc->res[0], off); - debugf(sc->dev, "read %x from %lx\n", val, off); + if (sc->debug > 1) + debugf(sc, "read %x from %lx\n", val, off); return (val); } @@ -111,7 +110,8 @@ static __inline void TWSI_WRITE(struct twsi_softc *sc, bus_size_t off, uint32_t val) { - debugf(sc->dev, "Writing %x to %lx\n", val, off); + if (sc->debug > 1) + debugf(sc, "Writing %x to %lx\n", val, off); bus_write_4(sc->res[0], off, val); } @@ -121,10 +121,10 @@ twsi_control_clear(struct twsi_softc *sc, uint32_t mask) uint32_t val; val = TWSI_READ(sc, sc->reg_control); - debugf(sc->dev, "read val=%x\n", val); + debugf(sc, "read val=%x\n", val); val &= ~(TWSI_CONTROL_STOP | TWSI_CONTROL_START); val &= ~mask; - debugf(sc->dev, "write val=%x\n", val); + debugf(sc, "write val=%x\n", val); TWSI_WRITE(sc, sc->reg_control, val); } @@ -134,10 +134,10 @@ twsi_control_set(struct twsi_softc *sc, uint32_t mask) uint32_t val; val = TWSI_READ(sc, sc->reg_control); - debugf(sc->dev, "read val=%x\n", val); + debugf(sc, "read val=%x\n", val); val &= ~(TWSI_CONTROL_STOP | TWSI_CONTROL_START); val |= mask; - debugf(sc->dev, "write val=%x\n", val); + debugf(sc, "write val=%x\n", val); TWSI_WRITE(sc, sc->reg_control, val); } @@ -166,13 +166,13 @@ twsi_poll_ctrl(struct twsi_softc *sc, int timeout, uint32_t mask) { timeout /= 10; - debugf(sc->dev, "Waiting for ctrl reg to match mask %x\n", mask); + debugf(sc, "Waiting for ctrl reg to match mask %x\n", mask); while (!(TWSI_READ(sc, sc->reg_control) & mask)) { DELAY(10); if (--timeout < 0) return (timeout); } - debugf(sc->dev, "done\n"); + debugf(sc, "done\n"); return (0); } @@ -196,11 +196,11 @@ twsi_locked_start(device_t dev, struct twsi_softc *sc, int32_t mask, /* read IFLG to know if it should be cleared later; from NBSD */ iflg_set = TWSI_READ(sc, sc->reg_control) & TWSI_CONTROL_IFLG; - debugf(dev, "send start\n"); + debugf(sc, "send start\n"); twsi_control_set(sc, TWSI_CONTROL_START); if (mask == TWSI_STATUS_RPTD_START && iflg_set) { - debugf(dev, "IFLG set, clearing (mask=%x)\n", mask); + debugf(sc, "IFLG set, clearing (mask=%x)\n", mask); twsi_clear_iflg(sc); } @@ -211,16 +211,16 @@ twsi_locked_start(device_t dev, struct twsi_softc *sc, int32_t mask, DELAY(1000); if (twsi_poll_ctrl(sc, timeout, TWSI_CONTROL_IFLG)) { - debugf(dev, "timeout sending %sSTART condition\n", + debugf(sc, "timeout sending %sSTART condition\n", mask == TWSI_STATUS_START ? "" : "repeated "); return (IIC_ETIMEOUT); } status = TWSI_READ(sc, sc->reg_status); - debugf(dev, "status=%x\n", status); + debugf(sc, "status=%x\n", status); if (status != mask) { - debugf(dev, "wrong status (%02x) after sending %sSTART condition\n", + debugf(sc, "wrong status (%02x) after sending %sSTART condition\n", status, mask == TWSI_STATUS_START ? "" : "repeated "); return (IIC_ESTATUS); } @@ -230,7 +230,7 @@ twsi_locked_start(device_t dev, struct twsi_softc *sc, int32_t mask, DELAY(1000); if (twsi_poll_ctrl(sc, timeout, TWSI_CONTROL_IFLG)) { - debugf(dev, "timeout sending slave address (timeout=%d)\n", timeout); + debugf(sc, "timeout sending slave address (timeout=%d)\n", timeout); return (IIC_ETIMEOUT); } @@ -238,7 +238,7 @@ twsi_locked_start(device_t dev, struct twsi_softc *sc, int32_t mask, status = TWSI_READ(sc, sc->reg_status); if (status != (read_access ? TWSI_STATUS_ADDR_R_ACK : TWSI_STATUS_ADDR_W_ACK)) { - debugf(dev, "no ACK (status: %02x) after sending slave address\n", + debugf(sc, "no ACK (status: %02x) after sending slave address\n", status); return (IIC_ENOACK); } @@ -264,7 +264,7 @@ twsi_calc_baud_rate(struct twsi_softc *sc, const u_int target, if (clk_get_freq(sc->clk_core, &clk) < 0) return (-1); - debugf(sc->dev, "Bus clock is at %ju\n", clk); + debugf(sc, "Bus clock is at %ju\n", clk); for (n = 0; n < 8; n++) { for (m = 0; m < 16; m++) { @@ -306,23 +306,23 @@ twsi_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) case IIC_SLOW: case IIC_FAST: param = sc->baud_rate[speed].param; - debugf(dev, "Using IIC_FAST mode with speed param=%x\n", param); + debugf(sc, "Using IIC_FAST mode with speed param=%x\n", param); break; case IIC_FASTEST: case IIC_UNKNOWN: default: param = sc->baud_rate[IIC_FAST].param; - debugf(dev, "Using IIC_FASTEST/UNKNOWN mode with speed param=%x\n", param); + debugf(sc, "Using IIC_FASTEST/UNKNOWN mode with speed param=%x\n", param); break; } #ifdef EXT_RESOURCES } #endif - debugf(dev, "Using clock param=%x\n", param); + debugf(sc, "Using clock param=%x\n", param); mtx_lock(&sc->mutex); - TWSI_WRITE(sc, sc->reg_soft_reset, 0x0); + TWSI_WRITE(sc, sc->reg_soft_reset, 0x1); TWSI_WRITE(sc, sc->reg_baud_rate, param); TWSI_WRITE(sc, sc->reg_control, TWSI_CONTROL_TWSIEN); DELAY(1000); @@ -338,7 +338,7 @@ twsi_stop(device_t dev) sc = device_get_softc(dev); - debugf(dev, "%s\n", __func__); + debugf(sc, "%s\n", __func__); mtx_lock(&sc->mutex); twsi_control_clear(sc, TWSI_CONTROL_ACK); twsi_control_set(sc, TWSI_CONTROL_STOP); @@ -360,7 +360,7 @@ twsi_repeated_start(device_t dev, u_char slave, int timeout) sc = device_get_softc(dev); - debugf(dev, "%s: slave=%x\n", __func__, slave); + debugf(sc, "%s: slave=%x\n", __func__, slave); mtx_lock(&sc->mutex); rv = twsi_locked_start(dev, sc, TWSI_STATUS_RPTD_START, slave, timeout); @@ -384,7 +384,7 @@ twsi_start(device_t dev, u_char slave, int timeout) sc = device_get_softc(dev); - debugf(dev, "%s: slave=%x\n", __func__, slave); + debugf(sc, "%s: slave=%x\n", __func__, slave); mtx_lock(&sc->mutex); rv = twsi_locked_start(dev, sc, TWSI_STATUS_START, slave, timeout); mtx_unlock(&sc->mutex); @@ -422,7 +422,7 @@ twsi_read(device_t dev, char *buf, int len, int *read, int last, int delay) DELAY(1000); if (twsi_poll_ctrl(sc, delay, TWSI_CONTROL_IFLG)) { - debugf(dev, "timeout reading data (delay=%d)\n", delay); + debugf(sc, "timeout reading data (delay=%d)\n", delay); rv = IIC_ETIMEOUT; goto out; } @@ -430,7 +430,7 @@ twsi_read(device_t dev, char *buf, int len, int *read, int last, int delay) status = TWSI_READ(sc, sc->reg_status); if (status != (last_byte ? TWSI_STATUS_DATA_RD_NOACK : TWSI_STATUS_DATA_RD_ACK)) { - debugf(dev, "wrong status (%02x) while reading\n", status); + debugf(sc, "wrong status (%02x) while reading\n", status); rv = IIC_ESTATUS; goto out; } @@ -461,14 +461,14 @@ twsi_write(device_t dev, const char *buf, int len, int *sent, int timeout) twsi_clear_iflg(sc); DELAY(1000); if (twsi_poll_ctrl(sc, timeout, TWSI_CONTROL_IFLG)) { - debugf(dev, "timeout writing data (timeout=%d)\n", timeout); + debugf(sc, "timeout writing data (timeout=%d)\n", timeout); rv = IIC_ETIMEOUT; goto out; } status = TWSI_READ(sc, sc->reg_status); if (status != TWSI_STATUS_DATA_WR_ACK) { - debugf(dev, "wrong status (%02x) while writing\n", status); + debugf(sc, "wrong status (%02x) while writing\n", status); rv = IIC_ESTATUS; goto out; } @@ -495,8 +495,8 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) sc->control_val = TWSI_CONTROL_TWSIEN | TWSI_CONTROL_INTEN | TWSI_CONTROL_ACK; TWSI_WRITE(sc, sc->reg_control, sc->control_val); - debugf(dev, "transmitting %d messages\n", nmsgs); - debugf(sc->dev, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + debugf(sc, "transmitting %d messages\n", nmsgs); + debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); sc->nmsgs = nmsgs; sc->msgs = msgs; sc->msg_idx = 0; @@ -504,7 +504,7 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) #ifdef TWSI_DEBUG for (int i = 0; i < nmsgs; i++) - debugf(sc->dev, "msg %d is %d bytes long\n", i, msgs[i].len); + debugf(sc, "msg %d is %d bytes long\n", i, msgs[i].len); #endif /* Send start and re-enable interrupts */ sc->control_val = TWSI_CONTROL_TWSIEN | @@ -515,17 +515,17 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) while (sc->error == 0 && sc->transfer != 0) { tsleep_sbt(sc, 0, "twsi", SBT_1MS * 30, SBT_1MS, 0); } - debugf(sc->dev, "pause finish\n"); + debugf(sc, "pause finish\n"); if (sc->error) { - debugf(sc->dev, "Error, aborting (%d)\n", sc->error); + debugf(sc, "Error, aborting (%d)\n", sc->error); TWSI_WRITE(sc, sc->reg_control, 0); } /* Disable module and interrupts */ - debugf(sc->dev, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); TWSI_WRITE(sc, sc->reg_control, 0); - debugf(sc->dev, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); return (sc->error); } @@ -539,16 +539,16 @@ twsi_intr(void *arg) sc = arg; - debugf(sc->dev, "Got interrupt Current msg=%x\n", sc->msg_idx); + debugf(sc, "Got interrupt Current msg=%x\n", sc->msg_idx); status = TWSI_READ(sc, sc->reg_status); - debugf(sc->dev, "reg control=%x\n", TWSI_READ(sc, sc->reg_control)); + debugf(sc, "reg control=%x\n", TWSI_READ(sc, sc->reg_control)); switch (status) { case TWSI_STATUS_START: case TWSI_STATUS_RPTD_START: /* Transmit the address */ - debugf(sc->dev, "Send the address (%x)", sc->msgs[sc->msg_idx].slave); + debugf(sc, "Send the address (%x)", sc->msgs[sc->msg_idx].slave); if (sc->msgs[sc->msg_idx].flags & IIC_M_RD) TWSI_WRITE(sc, sc->reg_data, @@ -560,10 +560,10 @@ twsi_intr(void *arg) break; case TWSI_STATUS_ADDR_W_ACK: - debugf(sc->dev, "Ack received after transmitting the address (write)\n"); + debugf(sc, "Ack received after transmitting the address (write)\n"); /* Directly send the first byte */ sc->sent_bytes = 1; - debugf(sc->dev, "Sending byte 0 (of %d) = %x\n", + debugf(sc, "Sending byte 0 (of %d) = %x\n", sc->msgs[sc->msg_idx].len, sc->msgs[sc->msg_idx].buf[0]); TWSI_WRITE(sc, sc->reg_data, sc->msgs[sc->msg_idx].buf[0]); @@ -572,7 +572,7 @@ twsi_intr(void *arg) break; case TWSI_STATUS_ADDR_R_ACK: - debugf(sc->dev, "Ack received after transmitting the address (read)\n"); + debugf(sc, "Ack received after transmitting the address (read)\n"); sc->recv_bytes = 0; TWSI_WRITE(sc, sc->reg_control, sc->control_val); @@ -580,7 +580,7 @@ twsi_intr(void *arg) case TWSI_STATUS_ADDR_W_NACK: case TWSI_STATUS_ADDR_R_NACK: - debugf(sc->dev, "No ack received after transmitting the address\n"); + debugf(sc, "No ack received after transmitting the address\n"); sc->transfer = 0; sc->error = IIC_ENOACK; sc->control_val = 0; @@ -588,29 +588,29 @@ twsi_intr(void *arg) break; case TWSI_STATUS_DATA_WR_ACK: - debugf(sc->dev, "Ack received after transmitting data\n"); + debugf(sc, "Ack received after transmitting data\n"); if (sc->sent_bytes == sc->msgs[sc->msg_idx].len) { - debugf(sc->dev, "Done sending all the bytes for msg %d\n", sc->msg_idx); + debugf(sc, "Done sending all the bytes for msg %d\n", sc->msg_idx); /* Send stop, no interrupts on stop */ if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) { - debugf(sc->dev, "Done TX data, send stop\n"); + debugf(sc, "Done TX data, send stop\n"); TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_STOP); } else { - debugf(sc->dev, "Done TX data with NO_STOP\n"); + debugf(sc, "Done TX data with NO_STOP\n"); TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); } sc->msg_idx++; if (sc->msg_idx == sc->nmsgs) { - debugf(sc->dev, "transfer_done=1\n"); + debugf(sc, "transfer_done=1\n"); transfer_done = 1; sc->error = 0; } else { - debugf(sc->dev, "Send repeated start\n"); + debugf(sc, "Send repeated start\n"); TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_START); } } else { - debugf(sc->dev, "Sending byte %d (of %d) = %x\n", + debugf(sc, "Sending byte %d (of %d) = %x\n", sc->sent_bytes, sc->msgs[sc->msg_idx].len, sc->msgs[sc->msg_idx].buf[sc->sent_bytes]); @@ -623,18 +623,18 @@ twsi_intr(void *arg) break; case TWSI_STATUS_DATA_RD_ACK: - debugf(sc->dev, "Ack received after receiving data\n"); + debugf(sc, "Ack received after receiving data\n"); sc->msgs[sc->msg_idx].buf[sc->recv_bytes++] = TWSI_READ(sc, sc->reg_data); - debugf(sc->dev, "msg_len=%d recv_bytes=%d\n", sc->msgs[sc->msg_idx].len, sc->recv_bytes); + debugf(sc, "msg_len=%d recv_bytes=%d\n", sc->msgs[sc->msg_idx].len, sc->recv_bytes); /* If we only have one byte left, disable ACK */ if (sc->msgs[sc->msg_idx].len - sc->recv_bytes == 1) sc->control_val &= ~TWSI_CONTROL_ACK; if (sc->msgs[sc->msg_idx].len == sc->recv_bytes) { - debugf(sc->dev, "Done with msg %d\n", sc->msg_idx); + debugf(sc, "Done with msg %d\n", sc->msg_idx); sc->msg_idx++; if (sc->msg_idx == sc->nmsgs - 1) { - debugf(sc->dev, "No more msgs\n"); + debugf(sc, "No more msgs\n"); transfer_done = 1; sc->error = 0; } @@ -645,12 +645,12 @@ twsi_intr(void *arg) case TWSI_STATUS_DATA_RD_NOACK: if (sc->msgs[sc->msg_idx].len - sc->recv_bytes == 1) { sc->msgs[sc->msg_idx].buf[sc->recv_bytes++] = TWSI_READ(sc, sc->reg_data); - debugf(sc->dev, "Done RX data, send stop (2)\n"); + debugf(sc, "Done RX data, send stop (2)\n"); if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_STOP); } else { - debugf(sc->dev, "No ack when receiving data, sending stop anyway\n"); + debugf(sc, "No ack when receiving data, sending stop anyway\n"); if (!(sc->msgs[sc->msg_idx].flags & IIC_M_NOSTOP)) TWSI_WRITE(sc, sc->reg_control, sc->control_val | TWSI_CONTROL_STOP); @@ -661,14 +661,14 @@ twsi_intr(void *arg) break; default: - debugf(sc->dev, "status=%x hot handled\n", status); + debugf(sc, "status=%x hot handled\n", status); sc->transfer = 0; sc->error = IIC_EBUSERR; sc->control_val = 0; wakeup(sc); break; } - debugf(sc->dev, "Refresh reg_control\n"); + debugf(sc, "Refresh reg_control\n"); /* * Newer Allwinner chips clear IFLG after writing 1 to it. @@ -676,7 +676,7 @@ twsi_intr(void *arg) TWSI_WRITE(sc, sc->reg_control, sc->control_val | (sc->iflag_w1c ? TWSI_CONTROL_IFLG : 0)); - debugf(sc->dev, "Done with interrupts\n\n"); + debugf(sc, "Done with interrupts\n\n"); if (transfer_done == 1) { sc->transfer = 0; wakeup(sc); @@ -701,6 +701,9 @@ int twsi_attach(device_t dev) { struct twsi_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree_node; + struct sysctl_oid_list *tree; sc = device_get_softc(dev); sc->dev = dev; @@ -713,6 +716,15 @@ twsi_attach(device_t dev) return (ENXIO); } +#ifdef TWSI_DEBUG + sc->debug = 1; +#endif + ctx = device_get_sysctl_ctx(dev); + tree_node = device_get_sysctl_tree(dev); + tree = SYSCTL_CHILDREN(tree_node); + SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "debug", CTLFLAG_RWTUN, + &sc->debug, 0, "Set debug level (zero to disable)"); + /* Attach the iicbus. */ if ((sc->iicbus = device_add_child(dev, "iicbus", -1)) == NULL) { device_printf(dev, "could not allocate iicbus instance\n"); diff --git a/sys/dev/iicbus/twsi/twsi.h b/sys/dev/iicbus/twsi/twsi.h index b10ce45be6f4..ed0ea72ab819 100644 --- a/sys/dev/iicbus/twsi/twsi.h +++ b/sys/dev/iicbus/twsi/twsi.h @@ -64,6 +64,7 @@ struct twsi_softc { uint16_t recv_bytes; int transfer; int error; + int debug; uint32_t control_val; bool iflag_w1c;